SRL Archive - OSR Help

SPS returning negative values


J J

2012-04-19 13:51:12

I got this script to figure out some things with SPS
program Test;
{$DEFINE SMART}
{$i srl/srl.simba}
{$i sps/sps.simba}

procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := '';
Pass := '';
Pin := '';
Active := True;
end;
end;

procedure SetupLogin;
begin
ClearDebug;
Smart_Server := 10;
Smart_Members := False;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
DeclarePlayers;
LoginPlayer;
Wait(1000 + Random(3000));
ClickNorth(0);
end;

procedure Test;
var
MyPath:TPointArray;
MyPos:TPoint;

begin
SPS_Setup(RC_ALTARS, ['0_0RC']);
//myPath := [Point(211, -9)]
//SPS_WalkPath(MyPath);

MyPos:=SPS_GetMyPos;
Writeln('My position is x: '+inttostr(MyPos.x)+' y: '+inttostr(MyPos.y));
if MyPos = Point(91, 2503) then
begin
WriteLn('We are on the correct spot!');
end else
end;

begin
SetUpLogin;
Test;
end.

Made custom map (will add as attachment) and edit the SPS thing etc. to make it work. But when I run the script it returns negative values:
My position is x: 239 y: -325
My position is x: 235 y: -325
My position is x: 231 y: -325
My position is x: 239 y: -321
Is this correct or what is wrong?

Brandon

2012-04-19 15:22:42

It is fine as long as it does not return a constant point for an entire area or point(-1, -1);

J J

2012-04-20 16:02:19

From: ggzz
It is fine as long as it does not return a constant point for an entire area or point(-1, -1);

Hm okay, it has never returned (-1, -1) so far I think. Any more opinions? :P

NKN

2012-04-20 23:40:53

Is it working currently, or is it messing up the script?

Ashaman88

2012-04-21 01:13:25

Negative values are ok.

J J

2012-04-21 18:59:52

From: NKN
Is it working currently, or is it messing up the script?

So far it has been working, it's just really a small start. Making a script in parts and this is the walking part.

From: ashaman88
Negative values are ok.

Hm ok

Mat

2012-04-22 08:46:05

I've never know SPS to return - Values unless its not finding your Position.
But Ggzz says its fine :)
This is for great orb?