SRL Archive - Help

SPS Help


CowFish

2012-07-07 22:08:51

I'm trying to use SPS to verify at the start of my script that I am indeed in the Grand Exchange. How could I do this? I have the function SPS_GetMyPos but I'm not sure where to go from there. Is there a way I can specify something like a range of acceptable TPoints to make sure I'm starting in the right area? Thanks for any help!

Nebula

2012-07-07 22:19:05

Take a look at this, from my Planking script.
Obviously you would have to change the coordinates, but that is the basic structure you should use.


rocedure NotInArea;
var
P : TPoint;
Begin
P := SPS_GetMyPos;
if ((P.x <= 4825) or (P.x >= 5080) or (P.y <= 2525) or (P.y >= 3000)) then
begin
writeln('not in area');
Logout;
TerminateScript;
end else
writeln('in area');
end;

CowFish

2012-07-07 22:23:45

Alright thanks I think that should do it! :D