I am trying to make a simple script to find my player position. I use SPS_GetMyPos
to find the position but how do I make it print it in the debug box?
Code:program new; {$i SRL\SRL.scar} {$i sps/sps.simba} begin SPS_GetMyPos end.
I am trying to make a simple script to find my player position. I use SPS_GetMyPos
to find the position but how do I make it print it in the debug box?
Code:program new; {$i SRL\SRL.scar} {$i sps/sps.simba} begin SPS_GetMyPos end.
WriteLn(); is used to print stuff in the debug box, but as you have it right now, I am pretty confident that it wont output anything worthwhile. SPS works in the sense that you have to tell it what areas you are most likely standing in; meaning SPS wont output the tile location in the way reflection did (reflection could just search the client. SPS has to compare minimap colors)
Oh, no SPS works great (!), but the way you are trying to do it now wont work, as you have to setup surface and areas for SPS to search on
There are several ways of walking. TPA, Color, (D)DTM, RadialWalk, and symbols are some keywords
Take a look in the tutorial section, IIRC there's a tutorial for walking in there somewhere
You should ,but any SPS function will not print message in debug box. SPS_GetMyPos gives you TPoint as output. So you need to make var to store this output and then print it...
Simba Code:program new;
{$i SRL\SRL.scar}
{$i sps/sps.simba}
var
MyPos :TPoint;
begin
MyPos := SPS_GetMyPos;
Writeln('My position is x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));
end.
Here's a tutorial on how to use SPS: http://villavu.com/forum/showthread.php?t=71461
There are currently 1 users browsing this thread. (0 members and 1 guests)