Results 1 to 18 of 18

Thread: Script won't walk

  1. #1
    Join Date
    Dec 2012
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default Script won't walk

    Hey,

    so after getting two things done (see my other thread), which took hours but btw feels great now that I got understand how several procedures work I'm back with a different problem: My second walking procedure isn't working.

    The first one does its job more or less well, but the second one just isn't doing anything except turning the screen, not even an attempt to walk can be seen!

    I'm using SPS_Path_Generator.
    The path which works looks like this (note: these are not the exact paths but pretty close):


    Code looks like this:
    Code:
    Procedure WalkToGate;
    
     var
      myPath:TPointArray;
    
    begin
      SPS_Setup(RUNESCAPE_SURFACE,['7_5', '7_6', '7_7', '8_5', '8_6', '8_7']);//SPS Areas
      myPath := [Point(3401, 2536), Point(3432, 2547), Point(3426, 2593), Point(3412, 2627), Point(3406, 2657), Point(3406, 2692), Point(3427, 2716), Point(3470, 2722), Point(3502, 2725), Point(3525, 2761), Point(3528, 2800), Point(3523, 2836), Point(3529, 2881), Point(3569, 2892)];
      SPS_WalkPath(myPath);
      Writeln('Walked to the gate. Waiting for 4 seconds.');
      Wait(4000);
      end;

    The second, broken one looks about like this:



    Code:
    Code:
    Procedure FromGateToLoadstone;
    
     var
      myPath:TPointArray;
    
    begin
      Writeln('Starting to walk to the second lodestone');
      SPS_Setup(RUNESCAPE_SURFACE,['8_6', '8_7', '9_6', '9_7']);//SPS Areas
      myPath := [Point(3621, 2893), Point(3631, 2930), Point(3647, 2964), Point(3673, 2983), Point(3711, 3022)];
      SPS_WalkPath(myPath);
      Wait(2000);
    end;
    Redid it several times, won't work. Help please?

  2. #2
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Is there a procedure in-between them, like for opening the gate?

    Must just not be able to find the points, do you have the newest maps and such?
    Current Project: Retired

  3. #3
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    try putting points closer / more points

    and just FYI you cant call
    Simba Code:
    SPS_Setup(RUNESCAPE_SURFACE,['8_6', '8_7', '9_6', '9_7']);//SPS Areas

    more than once in the script, for example:

    Simba Code:
    Program walkingscript;

    var
    GateToLoadstonePath :TPointArray;

    Procedure WalkFromGateToLoadstone;
    begin
      Writeln('Starting to walk to the second lodestone');
      SPS_WalkPath(GateToLoadstonePath);
      Wait(2000);
    end;

    Procedure setglobals;
    begin
      SPS_Setup(RUNESCAPE_SURFACE,['8_6', '8_7', '9_6', '9_7']);//SPS Areas
      GateToLoadstonePath := [Point(3621, 2893), Point(3631, 2930), Point(3647, 2964), Point(3673, 2983), Point(3711, 3022)];
    end;

    begin
    setglobals;
    WalkFromGateToLoadstone;
    end.
    Last edited by DannyRS; 12-27-2012 at 02:01 AM.


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  4. #4
    Join Date
    Dec 2012
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Is there a procedure in-between them, like for opening the gate?
    There are, but for testing they're currently commented out:
    Code:
    WalkToGate;
    TurnToMakeGateOpenScriptWork;
    OpenGate;
    FromGateToLoadstone; //this is the second walking script
    do you have the newest maps and such?
    SPS is up2date.


    Code:
    and just FYI you cant call
    
    
    Code:
    SPS_Setup(RUNESCAPE_SURFACE,['8_6', '8_7', '9_6', '9_7']);//SPS Areas
    more than once in the script, for example:
    This is actually what I did. Could this be a problem? Just redid the code as you suggested:

    Code:
    Program WalkFromStartToDwarven;
    
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    
     var
      WalkToGatePath:TPointArray;
      GateToLoadstonePath :TPointArray;
    
    (...)
    
    Procedure WalkToGate;
    
    begin
      SPS_WalkPath(WalkToGatePath);
      Writeln('Walked to the gate. Waiting for 4 seconds.');
      Wait(4000);
      end;
    
    (...)
    
    
    Procedure FromGateToLoadstone;
    
    begin
      Writeln('Starting to walk to the second lodestone');
      SPS_WalkPath(GateToLoadstonePath);
      Wait(2000);
    end;
    
    
    Procedure setglobals;
    begin
      SPS_Setup(RUNESCAPE_SURFACE,['7_5', '7_6', '7_7', '8_5', '8_6', '8_7', '9_6', '9_7']);//SPS Areas
      GateToLoadstonePath := [Point(3621, 2893), Point(3631, 2930), Point(3647, 2964), Point(3673, 2983), Point(3711, 3022)];
      WalkToGatePath := [Point(3401, 2536), Point(3432, 2547), Point(3426, 2593), Point(3412, 2627), Point(3406, 2657), Point(3406, 2692), Point(3427, 2716), Point(3470, 2722), Point(3502, 2725), Point(3525, 2761), Point(3528, 2800), Point(3523, 2836), Point(3529, 2881), Point(3569, 2892)];
    
    
    end;
    
    
    begin
     SRL_SixHourFix := True;
     SetupSRL;
     StartLogin;
     setglobals;
     //WalkToGate;
     //TurnToMakeGateOpenScriptWork;
     //OpenGate;
     FromGateToLoadstone;
    
    end.
    The second walking script still doesn't do anything though, apart from turning the screen and giving out the Writeln of course.

  5. #5
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by SomeGuyFromHere View Post
    The second walking script still doesn't do anything though, apart from turning the screen and giving out the Writeln of course.
    try re-doing points closer together? and take a look at

    http://villavu.com/forum/showthread.php?t=93381

    that might still be working


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  6. #6
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Try this path:

    Simba Code:
    FromGateToLodestone := [Point(3581,2842),Point(3588,2882),Point(3603,2915),Point(3634,2935),Point(3676,2944)];

    And judging from the difference of your path and mine I'm thinking it can't find the points you've set
    Current Project: Retired

  7. #7
    Join Date
    Sep 2012
    Location
    Legolan, Ireland
    Posts
    542
    Mentioned
    0 Post(s)
    Quoted
    50 Post(s)

    Default

    If you are walking to the lodestone, why not just use a lodestone teleport?
    Have you felt the whale lately?
    .__________.
    Whale so hard.

  8. #8
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Quote Originally Posted by ___ View Post
    If you are walking to the lodestone, why not just use a lodestone teleport?
    Lol can't believe no one else mentioned that

    Yeah you could teleport using:

    Simba Code:
    LodestoneTeleport('Falador');
    Current Project: Retired

  9. #9
    Join Date
    Dec 2012
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Part of the job of the script is to activate lodestones, on the way to the dwarven mine. You will see when the whole thing is finished

    Trying the corrected path now, will report back shortly.

    EDIT: No movement, and this time I made the points so close to each other it's ridiculous. Really out of ideas right now.

    It's not the only path that doesn't work: For example I created another simple script that just walks around a little in the area before the gate:

    Code:
    SPS_Setup(RUNESCAPE_SURFACE,['7_6', '7_7', '8_6', '8_7']);//SPS Areas
      myPath := [Point(3576, 2894), Point(3564, 2891), Point(3545, 2888), Point(3530, 2880), Point(3527, 2853), Point(3527, 2832), Point(3528, 2812), Point(3529, 2797)]
      SPS_WalkPath(myPath);
      Wait(2000);
    A similar path worked fine before, now it doesn't do anything.
    The "walk to path" one works fine though.
    Last edited by SomeGuyFromHere; 12-27-2012 at 02:15 PM.

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

    Default

    Quote Originally Posted by Gucci View Post
    Lol can't believe no one else mentioned that

    Yeah you could teleport using:

    Simba Code:
    LodestoneTeleport('Falador');
    Pretty sure that does just click on the falador lodestone in the lodestone screen.
    Watch out for people closing the Taverley gate.

    Script source code available here: Github

  11. #11
    Join Date
    Dec 2012
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    OK, I'm pretty sure it has nothing to do with the path since, as I wrote above, the second walking procedure doesn't do anything, no matter if the walking points are before or after the gate. In fact when I use the exact same path in a different script it works great, but not in the one I'm working at.

    Here's the whole thing as it looks right now. The path used in GateToLodestonePath is not walking you to any lodestone but nethermind that, I just want it to do anything except turning...

    Could you guys scan through it and tell me what I did wrong?

    Code:
    Program WalkFromStartToDwarven;
    
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    
     var
      WalkToGatePath:TPointArray;
      GateToLodestonePath :TPointArray;
    
    
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
    
      with Players[0] do
      begin
        Name       := '********'; // Player username
        Pass       := '********';  // Player password
        BoxRewards := ['XP', 'ostume', 'mote', 'oins', 'une', 'ssence'];
        LampSkill  := Skill_Mining;
        Active     := True;
      end;
    end;
    
    
    
    Procedure StartLogin;
    
    begin
      ClearDebug;
      {$IFDEF SMART}
        {$IFDEF SIMBAMAJOR980}
          Smart_Server := 10;
          Smart_Members := False;
          Smart_Signed := True;
          Smart_SuperDetail := False;
        {$ELSE}
          SRL_SixHourFix := True;
          Smart_FixSpeed := True;
        {$ENDIF}
      {$ENDIF}
      DeclarePlayers;
      LoginPlayer;
    
    end;
    
    Procedure WalkToGate;
    
    begin
      SPS_WalkPath(WalkToGatePath);
      Writeln('Walked to the gate. Waiting for 4 seconds.');
      Wait(4000);
      end;
    
    Procedure OpenGate;
    
    var
        x, y: Integer;
    
    begin
    if FindObjCustom(x, y, ['Open Gate'], [3622483, 3094077], 3)
    then
      begin
      Writeln('Gate found. Clicking.');
      ClickMouse(x, y, mouse_Left);
      Writeln('OK, clicked on the gate. Waiting for 12 seconds for the process to finish...');
      Wait(12000);
      end
    else Writeln('Gate not found, is it already open? Checking...');
      if FindObjCustom(x, y, ['Close Gate'], [3622483, 3094077], 3)
      then Writeln('Gate is already open! Continuing with walking.')
      else
      Writeln('Something might have gone wrong, no gate in sight, neither open or closed. Teleporting back to Burthorpe.')
      LodestoneTeleport('Burthorpe');
    end;
    
    
    
    
    Procedure TurnToMakeGateOpenScriptWork;
    begin
      //ClickMouse(260, 188, mouse_Left);
      KeyDown(37);
      wait(1000);
      KeyUp(37);
      wait(3000);
    end;
    
    
    
    
    Procedure FromGateToLodestone;
    
    begin
      Writeln('Starting to walk to the second lodestone');
      SPS_WalkPath(GateToLodestonePath);
      Wait(2000);
    end;
    
    
    Procedure setglobals;
    begin
    
    SPS_Setup(RUNESCAPE_SURFACE,['7_5', '7_6', '7_7', '8_5', '8_6', '8_7', '9_6', '9_7']);//SPS Areas
    GateToLodestonePath := [Point(3568, 2889), Point(3540, 2890), Point(3531, 2870), Point(3529, 2842), Point(3529, 2803), Point(3529, 2768), Point(3523, 2727), Point(3518, 2690), Point(3506, 2657), Point(3505, 2624), Point(3517, 2600), Point(3512, 2563), Point(3518, 2522), Point(3476, 2522), Point(3435, 2533), Point(3393, 2539), Point(3386, 2505)];
    WalkToGatePath := [Point(3422, 2482), Point(3435, 2519), Point(3431, 2563), Point(3419, 2606), Point(3404, 2653), Point(3409, 2695), Point(3444, 2731), Point(3483, 2730), Point(3526, 2778), Point(3527, 2814), Point(3527, 2856), Point(3531, 2891), Point(3573, 2889)];
    
    end;
    
    
    begin
     SRL_SixHourFix := True;
     SetupSRL;
     StartLogin;
     setglobals;
     WalkToGate;
     TurnToMakeGateOpenScriptWork;
     OpenGate;
     FromGateToLodestone;
    
    end.

  12. #12
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    what part is not working

    and can you post whole script

    Simba Code:
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i sps/sps.simba}

     var
      WalkToGatePath:TPointArray;
      GateToLodestonePath :TPointArray;


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

      with Players[0] do
      begin
        Name       := '********'; // Player username
        Pass       := '********';  // Player password
        BoxRewards := ['XP', 'ostume', 'mote', 'oins', 'une', 'ssence'];
        LampSkill  := Skill_Mining;
        Active     := True;
      end;
    end;



    Procedure StartLogin;

    begin
      ClearDebug;
      {$IFDEF SMART}
        {$IFDEF SIMBAMAJOR980}
          Smart_Server := 10;
          Smart_Members := False;
          Smart_Signed := True;
          Smart_SuperDetail := False;
        {$ELSE}
          SRL_SixHourFix := True;
          Smart_FixSpeed := True;
        {$ENDIF}
      {$ENDIF}
      DeclarePlayers;
      LoginPlayer;

    end;

    Procedure WalkToGate;

    begin
      SPS_WalkPath(WalkToGatePath);
      Writeln('Walked to the gate. Waiting for 4 seconds.');
      Wait(4000);
    end;

    Procedure OpenGate;
    var
      x, y: Integer;
    begin
      if FindObjCustom(x, y, ['pen'], [3622483, 3094077], 3)
      then
      begin
        Writeln('Gate found. Clicking.');
        ClickMouse(x, y, mouse_Left);
        Writeln('OK, clicked on the gate. Waiting for 12 seconds for the process to finish...');
        Wait(12000);
      end else
        Writeln('Gate not found, is it already open? Checking...');

      if FindObjCustom(x, y, ['lose'], [3622483, 3094077], 3) then
        Writeln('Gate is already open! Continuing with walking.')
      else
      begin // needed because two lines or more after
        Writeln('Something might have gone wrong, no gate in sight, neither open or closed. Teleporting back to Burthorpe.')
        LodestoneTeleport('Burthorpe');
      end;  // needed
    end;

    begin

    end.
    Last edited by DannyRS; 12-28-2012 at 09:54 PM.


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  13. #13
    Join Date
    Dec 2012
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Hey DannyRS,

    as I wrote above the problem is within the second walking script (FromGateToLodestone), and I suspect that it might be some error in my scripting.
    The rest of the script works fine more or less.

    and can you post whole script
    It is the whole script!

    Also: Could the whole thing be a problem with the SPS maps? They're up2date according to Simba, but look at this comparison between the SPS map and an actual screenshot from Runescape:

    Last edited by SomeGuyFromHere; 12-29-2012 at 12:50 AM.

  14. #14
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    I don't think the new maps have been pushed through Simba, get it all from here
    Current Project: Retired

  15. #15
    Join Date
    Dec 2012
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Even with the new SPS maps stuff still looks different. Just have a look at 8_7 in your SPS image folder (the region near the dwarven mine), the objects are completely misplaced compared to the actual map, no wonder SPS can't find anything!

    Or is the map dependant on the server/world you use?

  16. #16
    Join Date
    Feb 2012
    Location
    Discord
    Posts
    3,114
    Mentioned
    37 Post(s)
    Quoted
    538 Post(s)

    Default

    Quote Originally Posted by SomeGuyFromHere View Post
    Even with the new SPS maps stuff still looks different. Just have a look at 8_7 in your SPS image folder (the region near the dwarven mine), the objects are completely misplaced compared to the actual map, no wonder SPS can't find anything!

    Or is the map dependant on the server/world you use?
    just make a custom map.
    and the map isn't dependant on the world you use.
    edit: if you don't know how check out google's tut here

  17. #17
    Join Date
    Jan 2012
    Location
    Calgary, AB, Canada
    Posts
    1,819
    Mentioned
    5 Post(s)
    Quoted
    120 Post(s)

    Default

    Or use radial walk, it would work really well there
    Current Project: Retired

  18. #18
    Join Date
    Dec 2012
    Posts
    73
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Used RadicalWalk, works like a charm - Thanks everyone!

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
  •