Page 1 of 3 123 LastLast
Results 1 to 25 of 51

Thread: SPS for OldSchool RS(RS 07)

  1. #1
    Join Date
    May 2012
    Location
    Moscow, Russia
    Posts
    661
    Mentioned
    35 Post(s)
    Quoted
    102 Post(s)

    Default SPS for OldSchool RS(RS 07)

    Hey I prepared a SPS version for P07Include. It works with Custom SPS maps, the truth is not quite stable. But still works.

    How to use:

    1) Place p07sps.simba to your_simba_directory/SPS/

    2)

    Simba Code:
    {$I SRL/SRL.Simba}
    {$I SRL/P07Include.Simba}
    {$I SPS/p07sps.simba}

    Enjoy.

    How to use SPS see in to official SPS thread.

    Cheers, Cynic.
    Attached Files Attached Files
    Last edited by CynicRus; 03-01-2013 at 08:02 AM.
    Per aspera ad Astra!
    ----------------------------------------
    Slow and steady wins the race.

  2. #2
    Join Date
    Mar 2007
    Posts
    937
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for this. I'll try it out now.
    Exam period.

  3. #3
    Join Date
    Nov 2011
    Location
    United States
    Posts
    815
    Mentioned
    6 Post(s)
    Quoted
    284 Post(s)

    Default

    Interesting, ill defiantly bookmark this incase i decide to make any 07 scape scripts. Cheers

  4. #4
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    This is gonna help a lot of people nice job!

    Creds to DannyRS for this wonderful sig!

  5. #5
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Nice.

  6. #6
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Good luck, overtime you will lose accuracy and such

  7. #7
    Join Date
    Jan 2012
    Location
    In A Farm
    Posts
    3,301
    Mentioned
    30 Post(s)
    Quoted
    444 Post(s)

    Default

    Thank you for your work..

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

    Default

    Quote Originally Posted by Ollybest View Post
    Good luck, overtime you will lose accuracy and such
    Indeed, stupid Jagex messing with angles and colors :S

    Script source code available here: Github

  9. #9
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    Quote Originally Posted by J J View Post
    Indeed, stupid Jagex messing with angles and colors :S
    Eh its not too much the colors, more of the fact you look round and your compass says north but the compass minimap angle is like at a 20 degree angle haha.

  10. #10
    Join Date
    Feb 2013
    Posts
    64
    Mentioned
    0 Post(s)
    Quoted
    21 Post(s)

    Default



    Thank you sir!

  11. #11
    Join Date
    Feb 2013
    Location
    Ames, Iowa
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Looks very good. Currently making my own Map for 2007 slowly with paint. Are there any pre-existing 2007 surface maps(such as with an official 2007 include) or is it going to be everyone makes their own?

  12. #12
    Join Date
    Feb 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    Quote Originally Posted by BoxxyBabee View Post
    Looks very good. Currently making my own Map for 2007 slowly with paint. Are there any pre-existing 2007 surface maps(such as with an official 2007 include) or is it going to be everyone makes their own?
    There's a tutorial somewhere on how to make an sps map.. what your doing certainly is not the way to do it. You gotta use the minimap and line it up in photoshop.

  13. #13
    Join Date
    Feb 2013
    Location
    Ames, Iowa
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    I am using about 20 png frames and using paint to put them together as I do not own photoshop yet

  14. #14
    Join Date
    Mar 2006
    Location
    Belgium
    Posts
    3,564
    Mentioned
    111 Post(s)
    Quoted
    1475 Post(s)

    Default

    Quote Originally Posted by BoxxyBabee View Post
    I am using about 20 png frames and using paint to put them together as I do not own photoshop yet
    use Gimp

    Creds to DannyRS for this wonderful sig!

  15. #15
    Join Date
    Oct 2006
    Location
    Finland
    Posts
    433
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    Something I noticed that points it returns in game arent the same (no idea why) as the ones you would get in pathmaker or MS paint, whatever you guys use to get your points. Instead you guys should make your paths by looping something along the lines:
    Code:
    MyLoc:=sps_getMyPos;
    writeln('sps returns '+inttostr(myloc.x)+','+inttostr(myloc.y));
    Points returned this way are pretty much constant.

    also heres a modified SPS_walkpath more suitable for 07 ( made max distance 70, min distance 5, added ismoving which works in 07 just fine )

    Code:
        // Edited For P07Include by Cynic // more edits for better usability in 07 by Dwu
        // Author: marpis & Coh3n
        // Walks the path "Path"; always walks to the furthest point possible
        function SPS_WalkPath(Path: TPointArray): boolean;
        var
          I, H, T, D, Fails: integer;
          P, MM, MMF: TPoint;
        begin
          if (not SPS_IsSetup) then
          begin
            writeln('SPS ERROR: SPS_Setup was never called');
            exit;
          end;
         
          P07_MakeCompassNorth;
         
          H := High(Path);
          T := GetSystemTime + 20000 + Random(5000);
          Fails := 0;
         
          while (not Result) and (GetSystemTime < T) and (Fails < 5) do
          begin
            if (not P07_LoggedIn) then
              Exit;
         
            P := SPS_GetMyPos();
         
            for I := H downto 0 do
            begin
              MM := RotatePoint(Point(P07_MMCX + Path[I].X - P.X, P07_MMCY + Path[I].Y - P.Y),0, P07_MMCX, P07_MMCY);
         
              if MM = MMF then
                Inc(Fails);
         
              D := Distance(MM.X, MM.Y, P07_MMCX, P07_MMCY);
         
              if (D < 5) then
                break
              else
                if (D < 70) then
                begin
                  P07_MouseBox(MM.X-2, MM.Y-2, MM.X+2, MM.Y+2, mouse_left);
                     while(ismoving) do begin
                       wait(10+random(100));
                       end;
                  MMF := MM;
                  P07_FindMMFlag;
         
                  T := getSystemTime + 20000 + Random(1000);
                        Break;
                end;
            end;
         
            Result := (I = H);
          end;
        end;

  16. #16
    Join Date
    Nov 2011
    Location
    The Netherlands
    Posts
    90
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    If I would make a custom map and flip it, would it work with the compass on east?
    RangeGuilder by Ricky
    ~ 01010010 01101001 01111001 01111001 01101001 ~

  17. #17
    Join Date
    Feb 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    32 Post(s)

    Default

    lmfao..
    >spend 20 minutes making first map
    >compass is like, random degrees east

  18. #18
    Join Date
    Oct 2012
    Location
    Italy
    Posts
    145
    Mentioned
    0 Post(s)
    Quoted
    44 Post(s)

    Default

    Does it support SPS_AnyAngle?




    Quote Originally Posted by Le_don View Post
    lmfao..
    >spend 20 minutes making first map
    >compass is like, random degrees east
    you need to adjust the map manually every time you are making a screenshot

  19. #19
    Join Date
    Nov 2011
    Location
    England
    Posts
    3,072
    Mentioned
    296 Post(s)
    Quoted
    1094 Post(s)

    Default

    no sps_anyangle will not work.

  20. #20
    Join Date
    Oct 2012
    Location
    Italy
    Posts
    145
    Mentioned
    0 Post(s)
    Quoted
    44 Post(s)

    Default

    Quote Originally Posted by Ollybest View Post
    no sps_anyangle will not work.
    For me it is not working anything..

    Code:
    Error: Exception: The bitmap[0] does not exist at line 664
    The following DTMs were not freed: [0, 1, 2, 3]
    It gives this error when calling SPS_WalkPath

  21. #21
    Join Date
    Feb 2013
    Posts
    88
    Mentioned
    0 Post(s)
    Quoted
    37 Post(s)

    Default

    Quote Originally Posted by Le_don View Post
    There's a tutorial somewhere on how to make an sps map.. what your doing certainly is not the way to do it. You gotta use the minimap and line it up in photoshop.
    For anyone interested, I think this is the tutorial being talked about.

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

  22. #22
    Join Date
    Oct 2012
    Location
    Italy
    Posts
    145
    Mentioned
    0 Post(s)
    Quoted
    44 Post(s)

    Default

    Quote Originally Posted by Zorgatone View Post
    For me it is not working anything..

    Code:
    Error: Exception: The bitmap[0] does not exist at line 664
    The following DTMs were not freed: [0, 1, 2, 3]
    It gives this error when calling SPS_WalkPath
    Solved the error... My script still returns negative coordinates in Al Kharid with my custom map.

  23. #23
    Join Date
    Feb 2013
    Location
    hertfordshire, uk
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Hi there,

    I am having a problem whereby my game screen freezes after about 1-2 seconds until i stop the script allowing it to un freeze.

    Any advice?

    Thanks greg


    Im using a mildly edited version of the tutorial script

    Code:
    Program TestPath;
    //{$DEFINE SMART} //< Edit this out if using Rs Client
    {$I SRL/SRL.Simba}
    {$i P07Include.simba}
    {$I SPS/p07sps.simba}
    
    var //{path name}
        //{delcare the sps variable}
      togarden: tpointarray;
    
      status: string;
    
    procedure paths;
    begin
      togarden := [Point(41, 143), Point(46, 141), Point(53, 136), Point(62, 135), Point(69, 135), Point(73, 135), Point(82, 131), Point(87, 131), Point(94, 131), Point(99, 131), Point(107, 136), Point(116, 136), Point(124, 136), Point(132, 136), Point(136, 135), Point(143, 132), Point(150, 132), Point(155, 132), Point(160, 132), Point(167, 130)]
      end;
    procedure testpath;
    begin
      if sps_walkpath(togarden) then
        status := 'walking to the garden'
      else begin
        status :='failed walking to the garden';
        writeln(status + ' + time running:' +timerunning);
     end;
      writeln(status + ' + time running:' +timerunning);
    end;
    begin
    
      setupsrl;
    SetupP07Include;
    
       //{call path variables here}
      //{Mistake I see a lot only call the map once, Not in the procedure}
      //{If using multiple accounts it will always give an error when trying to pull the map}
      sps_setup(runescape_other,['Fally_west_bank']);
    
      P07_MakeCompassNorth;
       writeln('lookingnorth')
      paths;
      writeln('Walking')
      //testpath;
      //writeln('testing walk')
    
      repeat
      until P07_InvFull ;
    
    end.

  24. #24
    Join Date
    Nov 2011
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I am having a bit of trouble with this, just wondering if anyone could help me.

    I made a custom map, it looks like this:



    I then made a path using a path generator, this is the path:

    Code:
    BankToFlaxPath := [Point(90, 85), Point(89, 95), Point(90, 103), Point(91, 113), Point(91, 119), Point(91, 130), Point(94, 136), Point(95, 145), Point(98, 155), Point(98, 163), Point(98, 177), Point(100, 188), Point(100, 201), Point(103, 207), Point(103, 212), Point(103, 216), Point(103, 228), Point(107, 237), Point(107, 242), Point(111, 251), Point(111, 258), Point(111, 268), Point(111, 271), Point(112, 281), Point(114, 285), Point(118, 291), Point(127, 295), Point(135, 295), Point(143, 293), Point(150, 288), Point(144, 279)];
    My procedure to walk is:

    Code:
    procedure WalkBankToFlax;
    Begin
      writeln('Walking to flax...');
    
      if (SPS_WalkPath(BankToFlaxPath)) then
        writeln('Walking...')
      else
        writeln('Failed...');
    End;
    When the procedure is called, I get this in the log:

    Code:
    Walking to flax...
    Failed...
    Successfully executed.
    It takes about 30seconds to a minute for 'Failed...' to come up, after 'Walking to flax...'.

    Does anyone know what I am doing wrong?

    I have called SPS_Setup correctly, I believe.

    Code:
    SPS_Setup(RUNESCAPE_OTHER, ['seers_flax']);
    Thanks!

  25. #25
    Join Date
    May 2012
    Location
    Moscow, Russia
    Posts
    661
    Mentioned
    35 Post(s)
    Quoted
    102 Post(s)

    Default

    Show me a SPS_GetMyPos output.
    Per aspera ad Astra!
    ----------------------------------------
    Slow and steady wins the race.

Page 1 of 3 123 LastLast

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
  •