Results 1 to 10 of 10

Thread: SPS being weird

  1. #1
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default SPS being weird

    Im trying to get my script to walk from the tanner to the bank in al-kharid, but there are a few issues
    1: When the script goes to click the second point, it clicks horribly off since my person is running
    2: Script sometimes skips points and just stops walking in the middle of my path
    3: Since script missclicks, it clicks behind the bankers, and gets stuck since the flag never leaves



    Any way to fix any of these errors? Heres the script so far, its unfinished, all it does so far is walk from the tanner to the bank, then open the bank.

    Simba Code:
    program SPSS;
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    var
     MyPath:TPointarray;
     Counter, X, Y, Bankfails:Integer;


    procedure getmyposition;
    var
      P: TPoint;
    begin
      P := SPS_GetMyPos;
      writeln('Point'+ToStr(P));
    end;

    Function CustomBank:boolean;
    begin
      if Bankfails > 2 then
        begin
          writeln('We cant find the bank! Logging off!');
          Logout;
          Terminatescript;
        end;
      if findcolorspiraltolerance(x, y, 10801140, 148, 140, 190, 244, 10) then
        begin
          Mouse(x, y, 5, 5, mouse_right);
          waitoption('Bank Bank', 1000);
          Marktime(Counter);
          repeat
            wait(randomrange(100, 200));
            if timefrommark(counter) > 10000 then
              begin
                writeln('We cant find the bank, Likely missclicked! We will try again.)');
                inc(BankFails);
                Result := False;
                exit;
              end;
          until(Bankscreen);
          Writeln('Bank sucessfully found!');
        end else
          begin
            Writeln('We couldnt find the Bank! Color not found! We will try again!');
            inc(bankfails);
            Result := False;
            Exit;
          end;
      Result := True;
      Bankfails := 0

    end;

    Procedure Setupstuff;
    begin
      SetupSRL;
      Activateclient;
      wait(randomrange(100, 200));
      SPS_Setup(RUNESCAPE_SURFACE,['12_10','12_9']);
      myPath := [(Point(4943, 3947)), (Point(4935, 3983)), (Point(4923, 3971)), (Point(4911, 3991))];
    end;

    Procedure WalkingToBank;
    begin
      SPS_WalkPath(Mypath);
      flagex(5, false);
      wait(randomrange(50, 250));
    end;

    begin
      Setupstuff;
      WalkingToBank;
      repeat
        CustomBank;
      until(BankScreen);
      //getmyposition;
    end.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  2. #2
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If you wait for a while, it will eventually end the walkpath procedure. Or don't make your point to bank so close to the banker. But I would edit the sps_walkpath if I were you so I could use FFlag.

  3. #3
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SPS_walkpath appears to use FFlag, ill try using flagex or just moving my points around... Blindwalk also looks like an interesting way to do it.
    SPS_WalkPath
    Simba Code:
    // Walks the path "Path"; always walks to the furthest point possible
    function SPS_WalkPath(Path: TPointArray): boolean;
    var
      I, H, T, D: integer;
      P, MM: TPoint;
    begin
      H := High(Path);
      T := GetSystemTime + 20000 + Random(5000);

      while (not Result) and (GetSystemTime < T) do
      begin
        RunEnergy(20);

        P := SPS_GetMyPos;
        for I := H downto 0 do
        begin
          MM.X := MMCX + Path[I].X - P.X;
          MM.Y := MMCY + Path[I].Y - P.Y;

          D := Distance(MM.X, MM.Y, MMCX, MMCY);

          if (D < 10) then
            break
          else
            if (D < 70) then
            begin
              if (SPS_MultiMouse) then
                MultiMouse(MM.X, MM.Y, 25, 3, false)
              else
                Mouse(MM.X, MM.Y, 5, 5, mouse_Left);

              FFlag(Integer(I <> H) * 15);

              T := getSystemTime + 20000 + Random(1000);
                Break;
            end;
        end;

        Result := (I = H);
      end;
    end;
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  4. #4
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

  5. #5
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Tried using those once, didnt work so well, I think I found a solution using SPS, if it doesent work, ill try ODTM's again.
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  6. #6
    Join Date
    May 2012
    Location
    UK
    Posts
    85
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If your going to apply for members with this it might be worth using some techniques like ddtms or radialwalk with autocolor functions. SPS is known to be a bit buggy at Al kharid and the wildy. GOODLUCK!

  7. #7
    Join Date
    Mar 2012
    Location
    Color :D
    Posts
    938
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Editing the SPS_walkpath works for me. I did it in my astral script since it always clicks behind the bankers.

  8. #8
    Join Date
    Jun 2012
    Posts
    2,182
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by BigFate View Post
    If your going to apply for members with this it might be worth using some techniques like ddtms or radialwalk with autocolor functions. SPS is known to be a bit buggy at Al kharid and the wildy. GOODLUCK!
    Thats a good point. I was thinking of applying with this or another script i was planning, ODTM will work for now, works very well!
    Thx Euphemism and Vinyl for the awesome siggy and avatar!

  9. #9
    Join Date
    Jun 2007
    Posts
    532
    Mentioned
    1 Post(s)
    Quoted
    68 Post(s)

    Default

    Best bet is to make a custom map for it as well.
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  10. #10
    Join Date
    Oct 2011
    Location
    Australia, Vic
    Posts
    1,517
    Mentioned
    2 Post(s)
    Quoted
    120 Post(s)

    Default

    Quote Originally Posted by 14578 View Post
    Best bet is to make a custom map for it as well.
    Agreed, Use A custom SPS Map, They Work Wonders.

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
  •