SRL Archive - Help

Trouble with sps-(


CynicRus

2012-06-18 08:25:22

Hi. So, i have a problem with a script.
I initialize sps:
[PHP]procedure SetupSps;
begin
SPS_Setup(RUNESCAPE_SURFACE, ['6_8']);
end; [/PHP]
after - generate waypoint path with Wolygon's Path Creator,
and use this path:
[PHP]
procedure GoToBank;
var
GoBank: TPointArray;
begin
ClickNorth(SRL_ANGLE_None);
Writeln('Walking to Bank…');
GoBank := [Point(2508, 3412), Point(2482, 3417), Point(2472, 3444), Point(2451, 3475), Point(2430, 3489), Point(2412, 3496), Point(2410, 3526), Point(2454, 3526)];
if SPS_WalkPath(GoBank) then
Writeln('At the Bank..');
while(IsMoving) do
Wait(Random(5000));

end;
[/PHP]
This code is compile without any error, but after run it I infinitely see
[PHP]formWriteln: Walking At Bank[/PHP] and doesn't nothing. How i can fix to this problem?

Mat

2012-06-18 08:42:26

The World Map might need updating where is '6_8' that location as some location are bad on world Map.

putonajonny

2012-06-18 08:48:23

if it isn't coming up with "At the Bank.." then that means it is failing to walk.. is everything else in the script working ok?

put this in your script just after SPS_Setup

SPS_Debug := True;
Then run the script and It will give you more of an idea of what is going wrong…

CynicRus

2012-06-18 09:20:43

After - SPS_Debug:= true - script is working. Mystic.

But after second start,
[PHP]SPS_GetMyPos: Finished in 281 ms. Result = (-1, -1)
SPS_GetMyPos: Finished in 297 ms. Result = (-1, -1)
SPS_GetMyPos: Finished in 280 ms. Result = (-1, -1)[/PHP] i see that in debug window.
After first run with debug :
[PHP]
formWriteln: Walking to Bank…
formWriteln: SPS_GetMyPos: Finished in 296 ms. Result = (2503, 3407)
formWriteln: SPS_GetMyPos: Finished in 296 ms. Result = (2479, 3431)
formWriteln: SPS_GetMyPos: Finished in 296 ms. Result = (2475, 3463)
formWriteln: At the Bank..
formWriteln: Successfully executed.
[/PHP]