Results 1 to 20 of 20

Thread: need help with first script!

  1. #1
    Join Date
    Dec 2011
    Posts
    29
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default need help with first script!

    Hello everyone I’m trying to make my first script (first time ever writing code lol) and it’s not going to well. I’m trying to walk from fally west bank to furnace. I have read a lot of walking tutorials but I can seem to get any to work. I followed the thread "SPS Walking guide" but my character doesn't want to walk. Not sure if it’s outdated or... I’m just doing something wrong.

    I’m using movemouse and Clickmouse to walk around but I don’t think it’s the right way to do it. was just messing around to get a moral boost lol :/


    Please go easy on me it’s my first time

  2. #2
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Could you post what you have so far? SPS should work fine

  3. #3
    Join Date
    Dec 2011
    Posts
    29
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by BMWxi View Post
    Could you post what you have so far? SPS should work fine
    dont laugh

    PHP Code:
    program Script;
    {
    $DEFINE SMART}
    {
    $i SRL/SRL.simba}
    {
    $i sps/sps.simba}
    {
    $i ObjectDTM\ObjDTMInclude.simba}

    Procedure Walk;
    Var
      
    myPath:TPointArray;
    begin
      SetupSRL
    ;
      
    SPS_Setup (RUNESCAPE_SURFACE,['9_7']);
      
    myPath := [Point(249376), Point(246356), Point(196345), Point(174325), Point(137311), Point(93304), Point(87321)];            //Path
      
    SPS_WalkPath(myPath);
    end;

    Procedure walkhere;
    begin
      SetupSRL
    ;
      
    SetAngle(SRL_ANGLE_HIGH);
      
    MakeCompass('n');

      
    Movemouse (14783)
      
    wait(200);
      
    Clickmouse (14783mouse_Left);
      
    wait(200)
    end;
    begin
      walkhere
    ;
    end.

    begin
      SetupSRL
    ;
      
    ActivateClient;
      
    ClickNorth(SRL_ANGLE_HIGH);
      
    //DeclarePlayers;
      //LoginPlayer;
    end.

    begin
    end


  4. #4
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Ok, it appears that you have multiple main loops. Delete the one at the end with nothing in it, and delete the one that is just

    begin
    WalkHere;
    end.

    Also remove SetupSRL; from your walking procedures, you only need to call it once in your mainloop.

    Now, to add the SPS walking procedure to the main loop so it actually gets executed, put

    Walk;

    after

    ClickNorth(SRL_ANGLE_HIGH);

    now see if it walks

  5. #5
    Join Date
    Dec 2011
    Posts
    29
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    ok so i want to use SPS for walking. so i removed movemouse and clickmouse.

    are movemouse and clickmouse good method of walking or SPS is better?


    here is what i have its probably all wrong

    PHP Code:
    program Script;
    {
    $DEFINE SMART}
    {
    $i SRL/SRL.simba}
    {
    $i sps/sps.simba}
    {
    $i ObjectDTM\ObjDTMInclude.simba}

    Procedure Walk;
    Var
      
    myPath:TPointArray;
    begin
    SetupSRL
    ;
     
    SetAngle(SRL_ANGLE_HIGH);
      
    SPS_Setup (RUNESCAPE_SURFACE,['9_7']);
      
    myPath := [Point(249376), Point(246356), Point(196345), Point(174325), Point(137311), Point(93304), Point(87321)];            //Path
      
    SPS_WalkPath(myPath);
      
    end;

    begin
      SetupSRL
    ;
      
    ActivateClient;
      
    ClickNorth(SRL_ANGLE_HIGH);
      
    Walk;
      
    //DeclarePlayers;
      //LoginPlayer;
    end
    i ran it, it adjusts compass then spawns another SMART client.

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

    Default

    Simba encounters issues on occasions when it is spawning a smart client.
    Just close the smart clients and press play again.

    Remove SetupSRL; in your procedure Walk;
    As Bmwxi stated: 'Call SetupSRL once in Mainloop'.

    Put DeclarePlayers; and LoginPlayer; after SetupSRL;

    Creds to DannyRS for this wonderful sig!

  7. #7
    Join Date
    Dec 2011
    Posts
    29
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    I think I have done what you guys have told me but still doesn't want to walk.

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

    Default

    Quote Originally Posted by x44 View Post
    I think I have done what you guys have told me but still doesn't want to walk.
    Post code?
    PS: U can use [SIMBA] tags instead of the [CODE] u are using at the moment.

    Creds to DannyRS for this wonderful sig!

  9. #9
    Join Date
    Dec 2011
    Posts
    29
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by Sjoekeloe View Post
    Post code?
    PS: U can use [SIMBA] tags instead of the [CODE] u are using at the moment.
    ah thanks! sorry im very new to this if you cant tell already lol

    Simba Code:
    program Script;
    {$DEFINE SMART}
    {$i SRL/SRL.simba}
    {$i sps/sps.simba}
    {$i ObjectDTM\ObjDTMInclude.simba}

    Procedure Walk;
    Var
      myPath:TPointArray;
    begin
      SetAngle(SRL_ANGLE_HIGH);
      SPS_Setup (RUNESCAPE_SURFACE,['9_7']);
      myPath := [Point(-276, 40), Point(246, 356), Point(196, 345), Point(174, 325), Point(137, 311), Point(93, 304), Point(87, 321)];            //Path
      SPS_WalkPath(myPath);
      end;

    begin
      SetupSRL;
      ActivateClient;
      ClickNorth(SRL_ANGLE_HIGH);
      Walk;
      //DeclarePlayers;
      //LoginPlayer;

    end.

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

    Default

    Quote Originally Posted by x44 View Post
    ah thanks! sorry im very new to this if you cant tell already lol

    Simba Code:
    program Script;
    {$DEFINE SMART}
    {$i SRL/SRL.simba}
    {$i sps/sps.simba}
    {$i ObjectDTM\ObjDTMInclude.simba}

    Procedure Walk;
    Var
      myPath:TPointArray;
    begin
      SetAngle(SRL_ANGLE_HIGH);
      SPS_Setup (RUNESCAPE_SURFACE,['9_7']);
      myPath := [Point(-276, 40), Point(246, 356), Point(196, 345), Point(174, 325), Point(137, 311), Point(93, 304), Point(87, 321)];            //Path
      SPS_WalkPath(myPath);
      end;

    begin
      SetupSRL;
      ActivateClient;
      ClickNorth(SRL_ANGLE_HIGH);
      Walk;
      //DeclarePlayers;
      //LoginPlayer;

    end.
    Put DeclarePlayers; and LoginPlayer; right after SetupSRL; for future uses.

    U are using few points. Try to make them closer to eachother: like this example .



    If that doesn't work. It might be cause your map is too small.
    It is best to get 2 MINIMAPS distance from your path, like in the example.(don't mind the text)
    As u see my red dots are not near the edge of the map.
    SPS does not work well when your path is near the edge of the map.

    I hope this'll help.

    Creds to DannyRS for this wonderful sig!

  11. #11
    Join Date
    Dec 2011
    Posts
    29
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    i added more points still doesnt work. what do i do know?

    is this the reason why people font use fally furnace for scripts?
    Last edited by x44; 03-02-2013 at 05:35 AM.

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

    Default

    Quote Originally Posted by x44 View Post
    i added more points still doesnt work. what do i do know?

    is this the reason why people font use fally furnace for scripts?
    No that was just an example, it's part of the map I used for my ZammyWineRunner.

    Cut a custom map using Runescape_surface. which is big enough. Using the conditions I gave u.
    and instead of calling
    SPS_Setup (RUNESCAPE_SURFACE,['9_7']);

    call the custom map by the name u gave him
    eg: Fally.png
    SPS_Setup (RUNESCAPE_SURFACE,['Fally']);

    Creds to DannyRS for this wonderful sig!

  13. #13
    Join Date
    Dec 2011
    Posts
    29
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    so i made my own map. when i try to run it sps tab opens and highlights FoundMatches := SPS_FindMapInMap(P.x, P.y, SPS_AreaMaps, SmallMap, SPS_Tolerance);

  14. #14
    Join Date
    Dec 2011
    Posts
    29
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    WHOA i think its working now! THank you guys!! my script is finally getting somewhere

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

    Default

    Quote Originally Posted by x44 View Post
    WHOA i think its working now! THank you guys!! my script is finally getting somewhere
    How did u solve it?

    Creds to DannyRS for this wonderful sig!

  16. #16
    Join Date
    Dec 2011
    Posts
    29
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by Sjoekeloe View Post
    How did u solve it?
    I made the custom map you told me about then I realized that error was happening cuz I would leave path creator open -_-

    also this walking isn't very accurate. I'm having a hard time getting to walk in front of furnace so I can start next part of script

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

    Default

    Quote Originally Posted by x44 View Post
    I made the custom map you told me about then I realized that error was happening cuz I would leave path creator open -_-

    also this walking isn't very accurate. I'm having a hard time getting to walk in front of furnace so I can start next part of script
    It's more accurate when you're standing still, then use eg : SPS_WalkToPos(Point(123,323));

    To get an accurate point is by using:
    writeln(SPS_GetMyPos)
    By standing on the place u want to be.

    If it's still not accurate, try a bigger map.

    Creds to DannyRS for this wonderful sig!

  18. #18
    Join Date
    Dec 2011
    Posts
    29
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    Quote Originally Posted by Sjoekeloe View Post
    It's more accurate when you're standing still, then use eg : SPS_WalkToPos(Point(123,323));

    To get an accurate point is by using:
    writeln(SPS_GetMyPos)
    By standing on the place u want to be.

    If it's still not accurate, try a bigger map.
    yeah im lost :/ not sure how to use those

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

    Default

    Quote Originally Posted by x44 View Post
    yeah im lost :/ not sure how to use those
    Step 1: Stand next to your furnace. The spot where u want to end.

    Step 2: Play the script with SPS_Setup (RUNESCAPE_SURFACE,['Your_map']); and Writeln(SPS_GetMyPos);

    Step 3: eg: Debug will write eg: Point(142,80)

    Step 4: Walk to that point By using function SPS_WalkToPos(142,80); . Better result when your character is NOT moving

    Creds to DannyRS for this wonderful sig!

  20. #20
    Join Date
    Dec 2011
    Posts
    29
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    here is what i have so far after 100's of trial and error runs. what do you think? haha
    still seems a bit buggy to me but oh well. next is to actually select the furnace LOL


    Simba Code:
    program Script;
    {$DEFINE SMART}
    {$i SRL/SRL.simba}
    {$i sps/sps.simba}
    {$i ObjectDTM\ObjDTMInclude.simba}

    Procedure Walk;
    Var
      myPath:TPointArray;
    begin
      SetAngle(SRL_ANGLE_HIGH);
      SPS_Setup (RUNESCAPE_SURFACE,['fally1']);
      myPath := [Point(514, 511), Point(500, 496), Point(478, 486),
       Point(454, 478), Point(436, 473), Point(419, 466),
       Point(392, 457), Point(377, 446)];
      SPS_WalkPath(myPath);
      wait(5000);
      //SPS_WalkToPos(Point(351, 443));
      SPS_WalkToPos(Point(355, 455));
      end;

    begin
      SetupSRL;
      //DeclarePlayers;
      //LoginPlayer;
      ActivateClient;
      ClickNorth(SRL_ANGLE_HIGH);
      Walk;
      //findfurance;
      //walkbacktobank;
      //selectlace;
    end.

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
  •