SRL Archive - OSR Help

help with my gnome agility course script


justleveling

2012-01-11 10:55:05

As of now I've made a nearly working gnome agility course script but I just have a few problems I still need to fix, if anyone can shed some ideas on how to do them it'd be of great assistance :D

What i need is after each click the script has to check and make sure the characters successfully moved over the obstacle.
example: the log at the start, after it clicks the log, I need it to check the bot successfully clicked it and moved to the right position
I've been thinking maybe this can be done by tracking the characters position on the minimap? But i don't have the closest idea of how to do so.

This check will need to be performed after each obstacle to make sure its successful and check if the character is not moving before continuing.
If it fails, ill need it to retry that action and check again, and then maybe after 3 fails it will break the script with an error code?

Anyway, thanks in advance if someone could help :)

YoHoJo

2012-01-11 10:57:00

Just make it so you check the uptext or chooseption menu (if you rick click it) before you click. If the proper text is there before your click, you can assume you did it properly. Yeah?

You can also look at stuff in animation.simba and ask for help about that, they can tell if your player is moving or still or not. But I think my first idea will be just fine.

justleveling

2012-01-11 10:59:10

thats how i got it to work, by checking uptext, but that failed at the end when im entering the pipes because if another player is going through the pipe and my script tries to do it simultaneously, my character will just stand at the entrance of the pipe and wont go in (and then the script will move on and skip this part causing it to screw up because none of the other coordinates will match anymore)

YoHoJo

2012-01-11 11:08:49

Then right click instead of up text for the parts like that?
Right click and use ChooseOption?

NexPB

2012-01-11 11:41:24

Maybe using a boolean like this.


Function CheckClick: Boolean;
var
x, y: Integer;
begin
If (BLABLA) then
begin
Mouse(x, y, 3, 3, False);
If (ChooseOption('Climb') then result := true;
end;
end;