SRL Archive - Research & Development Lounge

How can I make this include better?


Too Soon

2012-07-22 16:10:54

I'm newbie, I made this.. :b

You'll have the basic idea once you've visualized the script so here:
procedure FollowSpiral(Color : LongInt; Amount : LongInt);
begin
repeat
i := i + 1;
if FindColorSpiral(x,y,Color,305,3,818,330) then
MoveMouseSmoothEx(x,y,20,40,45,25,20);
Wait(45);
until(i>=Amount);
end;

To run:
FollowSpiral(Color,AmountOfRepeats);

It kinda lag follows, and it moves all over the screen when other guards cross with the first color found (top to bottem, left to right) on screen.

I know the second problem can't really be solved (well I don't think so) but is there anyway to make it a bit better?


Don't think its possible, would be awesome though.
Any helps appreciated.

riwu

2012-07-22 17:53:54

You want to get the mouse to trace a color but dont click it? If you want it to be really smooth, remove/reduce the wait. Its going to be pretty botlike to trace an npc like that though, why not just click it once? What's the MoveMouseSmoothEx procedure? Im assuming you are not using this for official RS since u didn't use tolerance?

Also u can shorten it slightly by using a for loop. (u have to declare ur 'i' variable too). You can just do (Color, Amount : LongInt) too. Also you should just use 'procedure' instead of 'include' in ur title, kinna misleading.