Results 1 to 7 of 7

Thread: SPS returning negative values

  1. #1
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default SPS returning negative values

    I got this script to figure out some things with SPS
    Simba Code:
    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?

    Script source code available here: Github

  2. #2
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

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

  3. #3
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    Quote Originally Posted by ggzz View Post
    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

    Script source code available here: Github

  4. #4
    Join Date
    Mar 2012
    Location
    127.0.0.1
    Posts
    3,383
    Mentioned
    95 Post(s)
    Quoted
    717 Post(s)

    Default

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

  5. #5
    Join Date
    Dec 2011
    Location
    Hyrule
    Posts
    8,662
    Mentioned
    179 Post(s)
    Quoted
    1870 Post(s)

  6. #6
    Join Date
    Dec 2011
    Location
    The Netherlands
    Posts
    1,631
    Mentioned
    47 Post(s)
    Quoted
    254 Post(s)

    Default

    Quote Originally Posted by NKN View Post
    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.

    Quote Originally Posted by ashaman88 View Post
    Negative values are ok.
    Hm ok

    Script source code available here: Github

  7. #7
    Join Date
    Nov 2011
    Posts
    1,589
    Mentioned
    9 Post(s)
    Quoted
    17 Post(s)

    Default

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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •