SRL Archive - OSR Help

Need help with failsaves!


Verfy

2014-08-23 09:05:20

Hi guys!

I'm making myself a script and currently I'm making failsafes. I already did it for banking but now I wanna do it for morty myre gate.

I was thinking of checking the two tiles you get to after you open gate and repeating the find and click gate process if payer isn't on the right spot(these two tiles) after procedure finishes. I can't find a way to check this condition….I've tried:


repeat
OpenGate;
until(R_GetTileGlobal = Point[(3443, 3457)])

repeat
OpenGate;
until(R_GetTileGlobal = (3443, 3457))

repeat
OpenGate;
until(R_GetTileGlobal = tile) //tile was declared globaly


None of this things work…could anyone tell me the way to check that? :)

Also I have one more question…which way is better for fs.. putting them in main program or in separate procedures?

Dezval

2014-09-05 02:31:36

Try getting the distance from the tile you are trying to get on.

Like so:


repeat
OpenGate;
until(R_DistanceFromTile(Point(3443, 3457))<1)

repeat
OpenGate;
until(R_DistanceFromTile(Point(3443, 3457))=0)

Also, add some wait time so that it doesn't click the gate 50 times per second. That'll throw up a red flag for jagex.

Something like:


repeat
OpenGate;
Wait(RandomRange(500,1000));
until(R_DistanceFromTile(Point(3443, 3457))<1)

repeat
OpenGate;
Wait(RandomRange(500,1000));
until(R_DistanceFromTile(Point(3443, 3457))=0)

Good luck on your script!
If you have any other questions, post them on this thread and I'll be sure to help you to the best of my knowledge. :spot: