Results 1 to 8 of 8

Thread: SPS no longer working?

  1. #1
    Join Date
    Dec 2014
    Posts
    48
    Mentioned
    2 Post(s)
    Quoted
    28 Post(s)

    Default SPS no longer working?

    EDIT: this problem has been resolved by reinstalling SIMBA and restarting my PC. Looking at the actual code for TSPSArea.walkPath(path: TPointArray), I assume the problem had something to do with getSystemTime() not returning the correct value.



    Hi, I am currently experiencing a problem with SPS: the character moves to the first listed point, but seems to ignore all the other points listed in the Tpointarray.

    For example, given the following procedure
    Simba Code:
    procedure walkballoon();
    var
    castlewars: TSPSArea;
    pathtoball: Tpointarray;
    begin
    if tabBackpack.isfull then
      begin
       castlewars.setup('castlewars3', RUNESCAPE_OTHER);
       pathtoball := [Point(216, 201), Point(230, 182), Point(250, 179), Point(271, 179), Point(276, 160), Point(273, 142), Point(273, 124), Point(278, 113), Point(283, 107)];
       castlewars.walkPath(pathtoball);
       minimap.waitPlayerMoving();
      end;
    end;
    the character will only walk to Point(216, 201), then he will stop and move on to the next procedure - even though he has not reached the balloon yet.

    The script used to walk all the Tpoints, all the way up to the balloon; but as of 2-3 days ago, it ignores all points other than the first. I am wondering if there was an update to SIMBA, changing how SPS.walkPath works? Because otherwise, I am baffled as to why the script will no longer walk properly, when I did not change anything in the walking procedures.

    I already tried updating my SPS map twice, and that did not work either.
    Help with this [confusing] issue is greatly appreciated.
    Last edited by meep152; 04-16-2015 at 11:56 PM.

  2. #2
    Join Date
    Feb 2015
    Location
    Taguig, Philippines
    Posts
    342
    Mentioned
    15 Post(s)
    Quoted
    137 Post(s)

    Default

    Quote Originally Posted by meep152 View Post
    <snip>
    How about you do the basic way and do:
    Simba Code:
    procedure walkballoon();
    var
    pathtoball: Tpointarray;
    begin
    if tabBackpack.isfull then
      begin
       pathtoball := [Point(216, 201), Point(230, 182), Point(250, 179), Point(271, 179), Point(276, 160), Point(273, 142), Point(273, 124), Point(278, 113), Point(283, 107)];
       if SPS.walkPath(pathtoball) then
         minimap.waitPlayerMoving();
      end;
    end;

    //other code goes here..

    begin
      declarePlayers();
      setupSRL();
     
      SPS.setup('castlewars3', RUNESCAPE_OTHER);

    end.

    Not sure as to why yours isn't working, but I'm pretty sure this would.

  3. #3
    Join Date
    Dec 2014
    Posts
    48
    Mentioned
    2 Post(s)
    Quoted
    28 Post(s)

    Default

    Quote Originally Posted by renzanity View Post
    How about you do the basic way and do:
    Simba Code:
    snip
    Not sure as to why yours isn't working, but I'm pretty sure this would.
    Hi, thank you for your response.

    I had to "locally declare" the SPS map in that procedure because that is the only way I know of to walk multiple SPS maps, and it used to work fine jsut a few days ago. I use your method (the basic way) for the only other walking procedure in my script, listed below. ( I picked a bad example in my original post to hilight my problem... sorry!)
    Simba Code:
    procedure walkentrana();
    var
    pathtoAltar: TPointArray;
    o: TPoint;
    begin
    if minimap.findSymbol(o, MM_SYMBOL_WATER , minimap.getBounds()) then
      begin
       pathtoAltar := [Point(209, 194), Point(219, 212), Point(228, 227), Point(246, 233), Point(265, 231), Point(284, 233), Point(307, 234), Point(322, 230), Point(326, 215), Point(347, 213), Point(368, 210), Point(385, 212), Point(401, 212), Point(414, 212), Point(416, 195), Point(406, 177), Point(403, 152), Point(406, 127), Point(406, 106)];
       SPS.walkpath(pathtoAltar);
       minimap.waitPlayermoving();
      end;
    end;

    And I call the SPS map in the "main loop" of the script:
    Simba Code:
    begin
      clearDebug();              
      smartEnableDrawing := true;
      setupSRL();                  
      declarePlayers();            

      if not isLoggedIn() then          
      begin
        players[currentPlayer].login();  
        exitTreasure();            
        minimap.clickCompass();
      end;

    begin
    SPS.setup('entrana3', RUNESCAPE_OTHER); //calling SPS map
    repeat
    openBank();
    withdrawEss();
    repairpouchesifneeded();
    walkballoon();
    clickballoon();
    waitwhiletravelling();
    walkentrana();
    enteraltar();
    craftrunes();
    teletocw();
    until (false);
    end;
    End.

    Unfortunately, even then, the script still only walks to the first point, then moves on to the next procedure.
    Thank you for the input though... hopefully we can find a fix to this problem!

  4. #4
    Join Date
    Jan 2012
    Posts
    1,596
    Mentioned
    78 Post(s)
    Quoted
    826 Post(s)

    Default

    Post your map. On inspection of the walking points, it seems as if they are too far away. 3-5 tiles is best.

  5. #5
    Join Date
    Dec 2014
    Posts
    48
    Mentioned
    2 Post(s)
    Quoted
    28 Post(s)

    Default

    Quote Originally Posted by Turpinator View Post
    Post your map. On inspection of the walking points, it seems as if they are too far away. 3-5 tiles is best.
    Here are both maps I used for walking.
    entrana3.pngcastlewars3.png

    (I know they are a bit sloppy with debug boxes/lines/etc., but they used to work without problem)

  6. #6
    Join Date
    Dec 2014
    Posts
    48
    Mentioned
    2 Post(s)
    Quoted
    28 Post(s)

    Default

    Just as an update to this problem:
    I don't think this problem is due to faulty maps, because when I check the Ln message on the script, I see the following:

    ---- Path exists (C:\Simba\Includes\SPS\img\runescape_other\castlew ars3.png)
    ---- Setup area "castlewars3" in 4294967343ms
    -- .init()
    -- .getPlayerPos(): result = {X = 214, Y = 206}, took 4294967530 ms
    ---- Waiting while the player is moving...
    -- .walkPath(): result = False
    ---- Waiting while the player is moving...

    I have no idea why it says that it is taking 4294967530 ms to set up the map, but this appears to be a problem with getSystemTime(). So does anyone have an idea on how to "reset" getSystemTime() to display the proper value? Of course, I may be wrong in assuming that this is the source of my problem... but it's worth a shot!

  7. #7
    Join Date
    Feb 2015
    Location
    Taguig, Philippines
    Posts
    342
    Mentioned
    15 Post(s)
    Quoted
    137 Post(s)

    Default

    Quote Originally Posted by meep152 View Post
    <snip>...hopefully we can find a fix to this problem!
    Hi again,

    Hmm, how about you call your SPS.setup like so:
    Preview
    Simba Code:
    begin
      clearDebug();              
      smartEnableDrawing := true;
      setupSRL();                  
      declarePlayers();

      SPS.setup('entrana3', RUNESCAPE_OTHER); //call your SPS map here and not on the mainloop            
                                              //so that it may load before the script proceeds
      if not isLoggedIn() then                //with the following procedures (worth a shot)          
      begin
        players[currentPlayer].login();  
        exitTreasure();            
        minimap.clickCompass();
      end;

    begin
    repeat
    openBank();
    withdrawEss();
    repairpouchesifneeded();
    walkballoon();
    clickballoon();
    waitwhiletravelling();
    walkentrana();
    enteraltar();
    craftrunes();
    teletocw();
    until (false);
    end;
    End.


    I hope sometime soon you get to work it out. Goodluck, pal.

  8. #8
    Join Date
    Dec 2014
    Posts
    48
    Mentioned
    2 Post(s)
    Quoted
    28 Post(s)

    Default

    Quote Originally Posted by renzanity View Post
    Hi again,

    Hmm, how about you call your SPS.setup like so:
    Preview
    Simba Code:
    begin
      clearDebug();              
      smartEnableDrawing := true;
      setupSRL();                  
      declarePlayers();

      SPS.setup('entrana3', RUNESCAPE_OTHER); //call your SPS map here and not on the mainloop            
                                              //so that it may load before the script proceeds
      if not isLoggedIn() then                //with the following procedures (worth a shot)          
      begin
        players[currentPlayer].login();  
        exitTreasure();            
        minimap.clickCompass();
      end;

    begin
    repeat
    openBank();
    withdrawEss();
    repairpouchesifneeded();
    walkballoon();
    clickballoon();
    waitwhiletravelling();
    walkentrana();
    enteraltar();
    craftrunes();
    teletocw();
    until (false);
    end;
    End.


    I hope sometime soon you get to work it out. Goodluck, pal.
    Hello, thank you for the suggestion and encouragement.
    We both were barking up the wrong tree, as the problem ended up being a result of getSystemTime() not producing the correct value. Why it happened is beyond me, but I removed/reinstalled SIMBA +restarted my PC, and I am happy to say that upon restarting, getSystemTime() provided the correct value - allowing my character to make use of sps.walkpath once again.

    Thank you once again, for your diligence and persistence in brainstorming solutions; it is much appreciated.

    ((Updated original post as resolved, and posted fix))

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
  •