SRL Archive - Help and Support

Animation Colors


FreakyMonkey

2008-05-02 20:57:19

Me again. im trying to start on an alcher at the moments but would it be efficient to use color finding TPAs to find the animation? or is there a method to freeze the screen after a certain function to check the colors of the animation?
i think if i found out a way to model this function it would be effective as a failsafe.

could anyone help me with this problem?

Method

2008-05-02 21:53:27

I don't think there's a way to properly detect the animation without using a program with animation detection (iBot, KYAB, etc.). I think your best bet would be waiting randomly within a time range that guarantees that the spell will be completed, then clicking it again at that time.

The Claw

2008-05-02 21:57:21

well what i would do is do a findcolorstolerance of the alching colour, save to a tpa, and get the length of it. then do another one quickly after that, and if the length of it has increased heaps then we're alching, if its decreased we're probably not alching. do them regurlarly, and we could be able to get a pretty accurate idea of what we're doing. just an idea

FreakyMonkey

2008-05-02 22:24:48

@theclaw i dont know though because the TPA could change dramatically cause the animation size decreases then increases, but its a good idea ill check it out.

@method–that could work but i would have to put some extra failsafes to make sure it works

thanks for the advice guys, ill look into it Rep+ for both of u XD

Naum

2008-05-03 06:28:35

Or Maybe Do a repeat Until Loop??
Like:
 
Repeat
Wait(1);
Until(//Find thingy)

I think it would work but the only thing is you would need to find every second of animation and make a Tries for each of them :S.

R0b0t1

2008-05-03 08:46:34

Why not just wait three seconds?

Seriously, even if it lags, you just miss one click.


program New;
{.include SRL/SRL.scar}
var x, y: Integer;
begin
MouseSpeed:= 12;
repeat
if not FindColorTolerance(x, y, 3195184, 705, 325, 725, 340, 10) then
begin
WriteLn('Did not find potion color, stopping!');
WriteLn('Please relocate your mouse and switch to the correct screen.');
repeat
Wait(1);
until(FindColorTolerance(x, y, 3195184, 705, 325, 725, 340, 10))
end;
Mouse(710, 338, Random(5), Random(5), True);
Wait(20+Random(10));
Mouse(710, 338, 0, 0, True);
Wait(2500+Random(1200)); //Right here
until(IsFKeyDown(12))
end.

I do actually use this for alching…

Camaro'

2008-05-03 11:26:34

Well im guessing the animation color changes.. So i would say make an autocolor for the mainscreen of that color and have it search for it 2 - 3 times.. If it finds it (result:=true) then Alching :=true; but dont use Msx1 msy1 etc.. make a box ur self.. On the small side would work.. like.
————
I……….. I
I……….. I
————-

FreakyMonkey

2008-05-03 12:05:23

ya i think i should make an autocolor….the colors dont really change just get bigger than smaller. (haha, autocoloring gets boring for me) but ill do it =). thanks guys

n3ss3s

2008-05-03 15:51:06

Aww come on! You don't have to autocolor mainscreen, just use CTS 2 and 5 Tolerance. You can freeze the screen in theory, by doing a CopyClientToBitmap, but if you operate like that the alching may be over after you're done. As Robot said, waiting the 3 seconds is just as good.

FreakyMonkey

2008-05-05 21:01:23

haha, srry n3, i sometimes just get carried away the most basic of procedures (especially when it comes to TPAs)