Results 1 to 9 of 9

Thread: What Am I Doing Wrong [SPS]

  1. #1
    Join Date
    Feb 2011
    Location
    Earth
    Posts
    1,784
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default What Am I Doing Wrong [SPS]

    EDIT:Solved by not using SPS and switching to Camero's Color Walking method.


    All I really need to do to complete my come-back script, a color dwarven resource miner, is make walking work and add variables and stats to make progress reports smooth.

    Unfortunately, SPS is giving me trouble. I know I am most likely omitting something small, but I cannot find it at all. I properly added the extension at the top of the script, and I know I am properly calling this procedure, as it returns "Failed to walk to the mine" then logs out because its lost as its supposed to.

    Simba Code:
    procedure Walk;
    var
      pts: TPointArray;
    begin
      SPS_Setup(RUNESCAPE_SURFACE,['9_8']);
      pts := [Point(3870, 3215), Point(3912, 3224),
      Point(3940, 3267), Point(3903, 3281)];
      if (Players[CurrentPlayer].Loc='ready') then
      begin
        if (SPS_WalkPath(pts)) then
        begin
          writeln('Walked to mine');
          Players[CurrentPlayer].Loc:='at ladder';
        end else
        begin
          writeln('Failed to walk to the mine');
          Players[CurrentPlayer].Loc :='lost';
          Exit;
        end;
      end else
      if (Players[CurrentPlayer].Loc='invfull guild') then
       begin
        InvertTPA(pts);
        if (SPS_WalkPath(pts)) then
        begin
          writeln('Walked to the bank');
          Players[CurrentPlayer].Loc:='banking';
        end else
        begin
          writeln('Failed to walk to the bank');
          Exit;
        end;
       end;
    end;
    Last edited by PatDuffy; 11-04-2011 at 03:57 PM.

    Currently: Working on Defending&Attacking in my Castle-Wars Script
    Project Rebuild: 90M/170M

  2. #2
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    SPS doesn't work in the Resource dungeons (it will soon, though). But if you're walking from the bank to the mining guild ladders... Do you get some kind of error? Set SPS_Debug to true at the top of your mainloop and you'll be able to see exactly what it's doing.

  3. #3
    Join Date
    Feb 2011
    Location
    Earth
    Posts
    1,784
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Alright ill try that then see what it says

    Currently: Working on Defending&Attacking in my Castle-Wars Script
    Project Rebuild: 90M/170M

  4. #4
    Join Date
    Feb 2011
    Location
    Earth
    Posts
    1,784
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Did the debug and got this as my problem, seems its stuck constantly getting my position?

    Code:
    [SPS] SPS_Surface: Runescape Surface
    [SPS] SPS_Areas: ['9_8']
    [SPS] Maps loaded in 31ms.
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 93 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 93 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 93 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 93 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 93 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 93 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 94 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 93 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)
    [SPS] Area coords (9, 8)
    [SPS] GetMyPos: Finished in 78 ms. Location = (3675, 3355)

    Currently: Working on Defending&Attacking in my Castle-Wars Script
    Project Rebuild: 90M/170M

  5. #5
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    your path is way far from the path you want.
    Your x & y offsets must be wrong. I suggest you get your starting position (3675, 3355), compare it to your path's starting position (3870, 3215) and workout the x, y offset of (195, -140)

    Apply that offset to all your points and you *should* be able toy walk

    -RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  6. #6
    Join Date
    Feb 2011
    Location
    Earth
    Posts
    1,784
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Sir R. M8gic1an View Post
    your path is way far from the path you want.
    Your x & y offsets must be wrong. I suggest you get your starting position (3675, 3355), compare it to your path's starting position (3870, 3215) and workout the x, y offset of (195, -140)

    Apply that offset to all your points and you *should* be able toy walk

    -RM
    Well you were right, it was my path, but it still will not walk properly(but it does atleast move now). I made a new path using SPS_GetMyPos and used those points as the path, but it ends up missing each point by a fair margin, resulting in it not being able to walk the full path.

    As I am typing this I noticed that the values I was getting for SPS_GetMyPos are different now than they were 5 minutes ago by roughly (-100,50). Apparently the WalkPath and GetMyPos are returning different starting values?

    Currently: Working on Defending&Attacking in my Castle-Wars Script
    Project Rebuild: 90M/170M

  7. #7
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by PatDuffy View Post
    Well you were right, it was my path, but it still will not walk properly(but it does atleast move now). I made a new path using SPS_GetMyPos and used those points as the path, but it ends up missing each point by a fair margin, resulting in it not being able to walk the full path.

    As I am typing this I noticed that the values I was getting for SPS_GetMyPos are different now than they were 5 minutes ago by roughly (-100,50). Apparently the WalkPath and GetMyPos are returning different starting values?
    Seems like yet another SPS map problem... I'd suggest you check Camaro's walking method if you want a quick temporary fix to this SPS problem..

    -RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  8. #8
    Join Date
    Feb 2011
    Location
    Earth
    Posts
    1,784
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Sir R. M8gic1an View Post
    Seems like yet another SPS map problem... I'd suggest you check Camaro's walking method if you want a quick temporary fix to this SPS problem..

    -RM
    I did a little research on that area of the map and fally east bank, my starting location, is very close to the edges of 9_8 and 9_7. I tried adding 9_7 to SPS_Setup which helped slightly, but every time I try to run my path, I get a different starting location for the same point. I keep attempting to compensate the x,y values for the differences, but its just not working.

    I'll just not use SPS for my walking for now, it definitely has something to do with the borders of two areas messing with points.

    Currently: Working on Defending&Attacking in my Castle-Wars Script
    Project Rebuild: 90M/170M

  9. #9
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    I'm not sure what the problem is. I've been using MSI's Crafting Guild Miner a lot and SPS is working just fine at Fally East bank. Have you tried just making the points in the path a lot closer together?

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
  •