Page 1 of 7 123 ... LastLast
Results 1 to 25 of 171

Thread: [NEED TESTING!] SPS-OSR (2007Scape)

  1. #1
    Join Date
    Jul 2012
    Posts
    113
    Mentioned
    7 Post(s)
    Quoted
    34 Post(s)

    Default [NEED TESTING!] SPS-OSR (2007Scape)

    Hello VillaVu, releasing an sps version for OldSchool RuneScape (2007Scape)

    THIS IS USED WITH THE OFFICIAL SRL-OSR INCLUDE WHICH CAN BE FOUND HERE: https://github.com/SRL/SRL-OSR
    Tutorial for setting up SRL-OSR: http://villavu.com/forum/showthread.php?t=100543

    You can get the fonts here: Fonts.zip (Extract into your Fonts folder)

    CHANGE LOG
    Added DegreeFix, basically loops through adding 0, 5, -5, 10, -10, 15, and -15 to the current degrees until it finds a point. (Also tries previous degreefix in the array first) - 3/9/2013
    Changed DegreeFix from WalkPath proceedure to the SPS_GetMyPos, changed tolerances + match percentages enough to hopefully prevent false positives on most locations. - 3/27/2013
    Downloads:
    sps-osr.simba
    runescape_surface07.zip

    To use this, download the attachments and place sps-osr.simba in your Includes/SPS/ folder, and extract the runescape_surface07 zip file to your Includes/SPS/img/ folder.

    Then test it the exact same way you would using regular SRL/SPS.

    I recommend using SPS Path Generator to make paths to test! (Please make your points closer together than normal when making paths!)

    Then insert path data into the script below and test it out (I recommend using SPS_AnyAngle at the moment, makes for more accurate read most of the time due to imperfect north):
    Simba Code:
    program TestSPS;
    {$DEFINE SMART}
    {$I SRL-OSR/SRL.Simba}
    {$I SPS/sps-osr.simba}
    var
      MyLoc: TPoint;

    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

       Players[0].Name := '';
       Players[0].Pass :='';
       Players[0].Nick :='';
       Players[0].Active:=True;
    End;
    begin
     SetupSRL;
     DeclarePlayers;
     LoginPlayer;
     wait(2000);
     MakeCompass(5);
     SPS_AnyAngle := True;
     SPS_Setup(runescape_surface, []);
     MyLoc:=sps_getMyPos;
     writeln('SPS returns '+inttostr(myloc.x)+','+inttostr(myloc.y));
     SPS_WalkPath([]);
    end.

    As of 3/27/2013 DegreeFix has been updated to use SPS_GetMyPos rather than use only with SPS_WalkPath!
    What this means for you, the user:
    Depending on where you are setting up your walking to work, you may want to change the match percentages + tolerances a bit. I've found that .4 (for match percentage) is generally good for cities and things, while .5 or .6 would be best for areas that have a lot of grass and empty spaces. You can change the match percentage with the SPS_MatchesPercent global variable. The default is .4 or 40%, but the higher you can get without breaking your walking, the better. This is because we are trying to avoid false positives which would lead to an incorrect coordinate.

    Note that the percentages/tolerance can be a bit touchy depending on your walking location, but 07 sps isn't exactly easy to do.
    If you would like to debug the DegreeFix offset or current matchespercent, uncomment lines 374 and 407 in sps-osr.simba.

    EDIT: Unable to attach the images for runescape_surface07 because the archive is too large (12MB)
    Attached Files Attached Files
    Last edited by SeanStar; 04-02-2013 at 07:21 AM. Reason: Changed DegreeFix to work with SPS_GetMyPos

  2. #2
    Join Date
    Dec 2011
    Posts
    164
    Mentioned
    4 Post(s)
    Quoted
    23 Post(s)

    Default

    Hi there,

    Error at Line 54
    [Error] C:\Simba\Includes\SPS/sps-osr.simba(55:35): Unknown identifier 'MMCX' at line 54
    Compiling failed.

    Don't know if that's an error because me, or the includes file.

  3. #3
    Join Date
    Jul 2012
    Posts
    113
    Mentioned
    7 Post(s)
    Quoted
    34 Post(s)

    Default

    Quote Originally Posted by Iambubbleman View Post
    Hi there,

    Error at Line 54
    [Error] C:\Simba\Includes\SPS/sps-osr.simba(55:35): Unknown identifier 'MMCX' at line 54
    Compiling failed.

    Don't know if that's an error because me, or the includes file.
    Are you trying to run this as a script? SPS is an include itself... and you need SRL-OSR, as stated in bold up there.

  4. #4
    Join Date
    Dec 2011
    Posts
    164
    Mentioned
    4 Post(s)
    Quoted
    23 Post(s)

    Default

    Quote Originally Posted by SeanStar View Post
    Are you trying to run this as a script? SPS is an include itself... and you need SRL-OSR, as stated in bold up there.
    Yep, put both in the includes folder, I'll get back to you with some more debug in just a second.

    E:
    Looks to be a problem with SRL-OSR, now I'm getting a compiling error in text
    [Error] C:\Simba\Includes\SRL-OSR/SRL/core/text.simba(805:13): Unknown identifier 'UpChars07' at line 804
    Last edited by Iambubbleman; 03-10-2013 at 05:42 AM.

  5. #5
    Join Date
    Sep 2010
    Location
    Finland
    Posts
    298
    Mentioned
    8 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Iambubbleman View Post
    Hi there,

    Error at Line 54
    [Error] C:\Simba\Includes\SPS/sps-osr.simba(55:35): Unknown identifier 'MMCX' at line 54
    Compiling failed.

    Don't know if that's an error because me, or the includes file.
    Include the SRL-OSR before you include SPS. Can't show you an example since I'm currently using my phone.

    E: Just check the example that OP has posted, it shows you how includes should be.
    Last edited by Smidqe; 03-10-2013 at 05:45 AM.
    Rusting away

  6. #6
    Join Date
    Mar 2007
    Posts
    5,125
    Mentioned
    275 Post(s)
    Quoted
    901 Post(s)

    Default

    I strongly suggest you wait until the include if official released as we could change functions the SPS currently use.

    Forum account issues? Please send me a PM

  7. #7
    Join Date
    Jul 2012
    Posts
    113
    Mentioned
    7 Post(s)
    Quoted
    34 Post(s)

    Default

    Quote Originally Posted by Justin View Post
    I strongly suggest you wait until the include if official released as we could change functions the SPS currently use.
    I can adjust as necessary Justin. No harm in releasing it now, as long as it gets updated as the include does.

  8. #8
    Join Date
    Dec 2011
    Posts
    164
    Mentioned
    4 Post(s)
    Quoted
    23 Post(s)

    Default

    Hi there,

    Hate to be a pest, just checked to make extra super sure that the files were properly seated in the Includes folder. They are, I promise

    Though it does appear my problem is with SRL-OSR as opposed to being with SPS-OSR, So I'll try get those worked out first, then test SPS-OSR out

  9. #9
    Join Date
    Jul 2012
    Posts
    113
    Mentioned
    7 Post(s)
    Quoted
    34 Post(s)

    Default

    Quote Originally Posted by Iambubbleman View Post
    Hi there,

    Hate to be a pest, just checked to make extra super sure that the files were properly seated in the Includes folder. They are, I promise

    Though it does appear my problem is with SRL-OSR as opposed to being with SPS-OSR, So I'll try get those worked out first, then test SPS-OSR out
    One moment, let me get you the fonts.


    Extract the attachment into your Fonts folder.
    Attached Files Attached Files
    Last edited by SeanStar; 03-10-2013 at 07:21 AM.

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

  11. #11
    Join Date
    Jul 2012
    Posts
    113
    Mentioned
    7 Post(s)
    Quoted
    34 Post(s)

    Default

    Quote Originally Posted by Ashaman88 View Post
    How well is this working?
    Try it out, works extremely well in my limited test runs. (Would help if you could help test!)

  12. #12
    Join Date
    Dec 2011
    Posts
    164
    Mentioned
    4 Post(s)
    Quoted
    23 Post(s)

    Default

    Quote Originally Posted by SeanStar View Post
    One moment, let me get you the fonts.


    Extract the attachment into your Fonts folder.
    +Rep, thanks a lot :3

    Simba Code:
    program TestSPS;
    {$DEFINE SMART}
    {$I SRL-OSR/SRL.Simba}
    {$I SPS/sps-osr.simba}
    var
      MyLoc: TPoint;
      ToMine:TPointArray;

    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

       Players[0].Name := '';
       Players[0].Pass :='';
       Players[0].Nick :='';
       Players[0].Active:=True;
    End;

    Procedure WalkToFlax;

    begin


      SPS_Setup(RUNESCAPE_SURFACE,['11_9','12_9','11_10']);
      ToMine := [Point(4532,3704), Point(4492,3704), Point(4472,3728), Point(4769, 3839), Point(4768, 3863), Point(4770, 3889), Point(4792, 3887), Point(4801, 3903), Point(4800, 3944), Point(4792, 3978), Point(4784, 4009), Point(4778, 4037), Point(4750, 4079)];
      SPS_WalkPath(ToMine);


    end;
    begin
     SetupSRL;
     DeclarePlayers;
     LoginPlayer;
     wait(2000);
     MakeCompass(5);
     SPS_AnyAngle := True;
     SPS_Setup(runescape_surface, ['11_9','12_9','11_10']);
     MyLoc:=sps_getMyPos;
     writeln('SPS returns '+inttostr(myloc.x)+','+inttostr(myloc.y));
     WalkToFlax;
    end.

    Debug:
    SPS returns 4484,3716
    Successfully executed.

    I'm currently in the courtyard of Lumbridge, the script shows the current position, then clicks on the utilities tab, clicks the run option, and then stops.
    The walking path is made to walk from the courtyard to the mines near Lumbridge Swap, and was made using Wolygons parth maker, with the Surface Map for 07. The script either sends the character into the castle to the West, going inside the kitchen, then clicking outside, or it goes out East, crossing the bridge, near the desert gate. The script should be going south, and does go south if started further down, after the castle has disappeared from the minimap.

    I then used the GetPos function, and inserted those positions instead of the path creators, the result was the same.

  13. #13
    Join Date
    Jul 2012
    Posts
    113
    Mentioned
    7 Post(s)
    Quoted
    34 Post(s)

    Default

    Quote Originally Posted by Iambubbleman View Post
    +Rep, thanks a lot :3

    Simba Code:
    program TestSPS;
    {$DEFINE SMART}
    {$I SRL-OSR/SRL.Simba}
    {$I SPS/sps-osr.simba}
    var
      MyLoc: TPoint;
      ToMine:TPointArray;

    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

       Players[0].Name := '';
       Players[0].Pass :='';
       Players[0].Nick :='';
       Players[0].Active:=True;
    End;

    Procedure WalkToFlax;

    begin


      SPS_Setup(RUNESCAPE_SURFACE,['11_9','12_9','11_10']);
      ToMine := [Point(4532,3704), Point(4492,3704), Point(4472,3728), Point(4769, 3839), Point(4768, 3863), Point(4770, 3889), Point(4792, 3887), Point(4801, 3903), Point(4800, 3944), Point(4792, 3978), Point(4784, 4009), Point(4778, 4037), Point(4750, 4079)];
      SPS_WalkPath(ToMine);


    end;
    begin
     SetupSRL;
     DeclarePlayers;
     LoginPlayer;
     wait(2000);
     MakeCompass(5);
     SPS_AnyAngle := True;
     SPS_Setup(runescape_surface, ['11_9','12_9','11_10']);
     MyLoc:=sps_getMyPos;
     writeln('SPS returns '+inttostr(myloc.x)+','+inttostr(myloc.y));
     WalkToFlax;
    end.

    Debug:
    SPS returns 4484,3716
    Successfully executed.

    I'm currently in the courtyard of Lumbridge, the script shows the current position, then clicks on the utilities tab, clicks the run option, and then stops.
    The walking path is made to walk from the courtyard to the mines near Lumbridge Swap, and was made using Wolygons parth maker, with the Surface Map for 07. The script either sends the character into the castle to the West, going inside the kitchen, then clicking outside, or it goes out East, crossing the bridge, near the desert gate. The script should be going south, and does go south if started further down, after the castle has disappeared from the minimap.

    I then used the GetPos function, and inserted those positions instead of the path creators, the result was the same.
    Set your compass to south, and then make sure you're using the latest sps-osr.simba I have on this thread. (Redownload and replace)

    Let me know results after you've done this.

  14. #14
    Join Date
    Dec 2011
    Posts
    164
    Mentioned
    4 Post(s)
    Quoted
    23 Post(s)

    Default

    Quote Originally Posted by SeanStar View Post
    Set your compass to south, and then make sure you're using the latest sps-osr.simba I have on this thread. (Redownload and replace)

    Let me know results after you've done this.
    Does the exact same thing as it did before, even after changing the MakeCompass from 5 to 185.

  15. #15
    Join Date
    Jul 2012
    Posts
    113
    Mentioned
    7 Post(s)
    Quoted
    34 Post(s)

    Default

    Quote Originally Posted by Iambubbleman View Post
    Does the exact same thing as it did before, even after changing the MakeCompass from 5 to 185.
    Will look into this as soon as I can. Thanks for helping test!

  16. #16
    Join Date
    Jul 2012
    Posts
    113
    Mentioned
    7 Post(s)
    Quoted
    34 Post(s)

    Default

    Quote Originally Posted by Iambubbleman View Post
    +Rep, thanks a lot :3

    Simba Code:
    program TestSPS;
    {$DEFINE SMART}
    {$I SRL-OSR/SRL.Simba}
    {$I SPS/sps-osr.simba}
    var
      MyLoc: TPoint;
      ToMine:TPointArray;

    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

       Players[0].Name := '';
       Players[0].Pass :='';
       Players[0].Nick :='';
       Players[0].Active:=True;
    End;

    Procedure WalkToFlax;

    begin


      SPS_Setup(RUNESCAPE_SURFACE,['11_9','12_9','11_10']);
      ToMine := [Point(4532,3704), Point(4492,3704), Point(4472,3728), Point(4769, 3839), Point(4768, 3863), Point(4770, 3889), Point(4792, 3887), Point(4801, 3903), Point(4800, 3944), Point(4792, 3978), Point(4784, 4009), Point(4778, 4037), Point(4750, 4079)];
      SPS_WalkPath(ToMine);


    end;
    begin
     SetupSRL;
     DeclarePlayers;
     LoginPlayer;
     wait(2000);
     MakeCompass(5);
     SPS_AnyAngle := True;
     SPS_Setup(runescape_surface, ['11_9','12_9','11_10']);
     MyLoc:=sps_getMyPos;
     writeln('SPS returns '+inttostr(myloc.x)+','+inttostr(myloc.y));
     WalkToFlax;
    end.

    Debug:
    SPS returns 4484,3716
    Successfully executed.

    I'm currently in the courtyard of Lumbridge, the script shows the current position, then clicks on the utilities tab, clicks the run option, and then stops.
    The walking path is made to walk from the courtyard to the mines near Lumbridge Swap, and was made using Wolygons parth maker, with the Surface Map for 07. The script either sends the character into the castle to the West, going inside the kitchen, then clicking outside, or it goes out East, crossing the bridge, near the desert gate. The script should be going south, and does go south if started further down, after the castle has disappeared from the minimap.

    I then used the GetPos function, and inserted those positions instead of the path creators, the result was the same.
    I found your problem. The points are too apart from each other. Maximum distance they can be apart is 60, I will be changing it to 65. If you make your points closer together, it should walk just fine.

  17. #17
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    Quote Originally Posted by SeanStar View Post
    I found your problem. The points are too apart from each other. Maximum distance they can be apart is 60, I will be changing it to 65. If you make your points closer together, it should walk just fine.
    Or just use blindwalk... Seriously, I don't get why people insist on not using blindwalk, when it would make creating paths much esier. For most paths, three or four coordinates are enough to walk the whole distance using blindwalk.
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

  18. #18
    Join Date
    Dec 2011
    Posts
    164
    Mentioned
    4 Post(s)
    Quoted
    23 Post(s)

    Default

    Simba Code:
    program TestSPS;
    {$DEFINE SMART8}
    {$I SRL-OSR/SRL.Simba}
    {$I SPS/sps-osr.simba}
    var
      MyLoc: TPoint;
      ToMine:TPointArray;

    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

       Players[0].Name := '';
       Players[0].Pass :='';
       Players[0].Nick :='';
       Players[0].Active:=True;
    End;

    Procedure WalkToFlax;

    begin


      SPS_Setup(RUNESCAPE_SURFACE,['11_9','12_9','11_10']);
      ToMine := [Point(4711, 3814), Point(4723, 3815), Point(4733, 3816), Point(4746, 3815), Point(4759, 3817), Point(4769, 3826), Point(4769, 3839), Point(4764, 3850), Point(4770, 3858), Point(4769, 3869), Point(4771, 3877), Point(4771, 3887), Point(4785, 3884), Point(4794, 3886), Point(4805, 3892), Point(4805, 3900), Point(4803, 3910), Point(4804, 3923), Point(4801, 3934), Point(4799, 3947), Point(4801, 3956), Point(4796, 3967), Point(4789, 3968), Point(4791, 3979), Point(4785, 3986), Point(4781, 3996), Point(4775, 4005), Point(4780, 4011), Point(4781, 4025), Point(4784, 4036), Point(4779, 4045), Point(4771, 4065), Point(4766, 4077), Point(4756, 4093), Point(4736, 4101)];
      SPS_WalkPath(ToMine);


    end;
    begin
     SetupSRL;
     DeclarePlayers;
     LoginPlayer;
     wait(2000);
     MakeCompass(5);
     SPS_AnyAngle := True;
     SPS_Setup(runescape_surface, ['11_9','12_9','11_10']);
     MyLoc:=sps_getMyPos;
     writeln('SPS returns '+inttostr(myloc.x)+','+inttostr(myloc.y));
     WalkToFlax;
    end.

    Works! Wow!

  19. #19
    Join Date
    Jul 2011
    Location
    /home/litoris
    Posts
    2,226
    Mentioned
    0 Post(s)
    Quoted
    159 Post(s)

    Default

    Just spent over an hour testing this. I created custom maps out of the pieces in the surface folder, that way it doesn't get confused with similar shapes in the minimap.
    It walks well with blindwalk, at all angles. I'm making a law crafter now
    +rep to OP
    Miner & Urn Crafter & 07 Chicken Killer
    SPS BlindWalk Tutorial

    Working on: Nothing

    teacher in every art, brought the fire that hath proved to mortals a means to mighty ends

  20. #20
    Join Date
    Jul 2012
    Posts
    113
    Mentioned
    7 Post(s)
    Quoted
    34 Post(s)

    Default

    Quote Originally Posted by litoris View Post
    Just spent over an hour testing this. I created custom maps out of the pieces in the surface folder, that way it doesn't get confused with similar shapes in the minimap.
    It walks well with blindwalk, at all angles. I'm making a law crafter now
    +rep to OP
    I've been running scripts with a lot of walking flawlessly for days.

    The DegreeFix helps a lot.

  21. #21
    Join Date
    Dec 2006
    Location
    New York
    Posts
    473
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Works really well! There is many opportunities in the future

  22. #22
    Join Date
    Aug 2007
    Location
    Oregon, USA
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Seems to be working very well, when it works. My only issue is I have a script setup to two areas, a runecraft altar and a bank. It will walk back and fourth for quite sometime. By printing out the results of (sps_getMyPos) I can see that when it finally breaks down half way through a path the coordinates jump down from 3776, 3576 to 3776, 2876. It's considerably random, but what I've noticed it normally loses the coordinates half way through a path.

    Also I noticed sometimes it clicks inaccurately, usually up to 10 tiles. So I'm not sure if that is accuracy or a anti-random that you put in to make the coordinates more random.




    Better Results:
    Using a for loop through blindwalk path seems to get the most accurate walking. Also I would change the minimum for SPS_WalkPath to 5 and 70. I saw that your method was the same as that was mentioned from @DaWu, and his opinion on the matter for minimum and maximum distances seems to be more accurate.

    Simba Code:
    for i := 0 to High(ToBank) do
        repeat
          Wait(RandomRange(600,800));
        until(SPS_BlindWalk(ToBank[i]));
    Last edited by helcast; 03-15-2013 at 04:49 AM.

  23. #23
    Join Date
    Jul 2012
    Posts
    113
    Mentioned
    7 Post(s)
    Quoted
    34 Post(s)

    Default

    Quote Originally Posted by helcast View Post
    Seems to be working very well, when it works. My only issue is I have a script setup to two areas, a runecraft altar and a bank. It will walk back and fourth for quite sometime. By printing out the results of (sps_getMyPos) I can see that when it finally breaks down half way through a path the coordinates jump down from 3776, 3576 to 3776, 2876. It's considerably random, but what I've noticed it normally loses the coordinates half way through a path.

    Also I noticed sometimes it clicks inaccurately, usually up to 10 tiles. So I'm not sure if that is accuracy or a anti-random that you put in to make the coordinates more random.




    Better Results:
    Using a for loop through blindwalk path seems to get the most accurate walking. Also I would change the minimum for SPS_WalkPath to 5 and 70. I saw that your method was the same as that was mentioned from @DaWu, and his opinion on the matter for minimum and maximum distances seems to be more accurate.

    Simba Code:
    for i := 0 to High(ToBank) do
        repeat
          Wait(RandomRange(600,800));
        until(SPS_BlindWalk(ToBank[i]));
    I've had issues when using north, looking into that now (I know north isn't perfect, but anyangle works damn good)

  24. #24
    Join Date
    Aug 2007
    Location
    Oregon, USA
    Posts
    4
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    I have only thoroughly tested the anyangle method, but the compass was always pointing north.

  25. #25
    Join Date
    Jul 2012
    Posts
    113
    Mentioned
    7 Post(s)
    Quoted
    34 Post(s)

    Default

    Quote Originally Posted by helcast View Post
    I have only thoroughly tested the anyangle method, but the compass was always pointing north.
    If compass is north, it's set not to rotate the bitmap even if anyangle is set to true.. and I don't believe makecompass is working with the degreefix very well.

Page 1 of 7 123 ... LastLast

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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