Results 1 to 11 of 11

Thread: Needing Some Help With My First Script Please

  1. #1
    Join Date
    May 2013
    Posts
    38
    Mentioned
    1 Post(s)
    Quoted
    21 Post(s)

    Default Needing Some Help With My First Script Please

    Hey, i am working on my first ever script " AnonymousNormals ". Where I can start the script at the Varrock West bank, walk to trees, until inv. Full, Go bank, Repeat. I have the path with sps and everything..

    coming from Griff's tutorial on script down your first rs tree!:
    (http://villavu.com/forum/showthread.php?t=44942)

    I have started trying to use SPS, creating my path from Wolygon's path creator:
    (http://villavu.com/forum/showthread.php?t=44942)

    Here is what i have so far.

    PHP Code:
    program AnonymousNormals;
    {
    $DEFINE SMART}
    {
    $i srl/srl.simba}
    {
    $i sps/sps.simba}

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

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

    procedure AntiBan;
    begin
      
    if(not(LoggedIn))then
      
    Exit;
      
    FindNormalRandoms;
      case 
    Random(8of
       0
    :
       
    begin
         HoverSkill
    ('Woodcutting'false);
         
    wait(2453+Random(432));
       
    end;
       
    1PickUpMouse;
       
    2:
       
    begin
         MakeCompass
    ('N');
         
    wait(100+random(133));
         
    MakeCompass('S');
         
    wait(50+random(133));
         
    MakeCompass('N');
         
    FindNormalRandoms;
       
    end;
      
    end;
    end;
    Var
      
    mypath:TPointArray;
    begin
    SPS_Areas 
    := ['11_7','11_6','];
    myPath := [Point(4529, 2832), Point(4505, 2802),
     Point(4479, 2791), Point(4455, 2786), Point(4441, 2789)];


    procedure ChopTree;
    var x, y: integer;
    begin
        repeat
        FindNormalRandoms;
        if FindObj(x, y, '
    hop', 1785912, 35) then
        begin
          Mouse(x, y, 0, 0, false);
          ChooseOption('
    hop');
        end;
          repeat
          wait(400+random(250));
          AntiBan;
          Until not IsUpText('
    ew') or (InvFull);
      until(InvFull);
    end;

    begin
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      LoginPlayer;
      ChopTree;
    end. 
    ~AnonymousUser
    Last edited by AnonymousUser; 06-28-2013 at 02:55 PM.

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

    Default

    Why not just post your script? Can get more help and quicker.
    Finished B.S. Program in Radiology!!

    Projects: A big one! Total secret! hehe

  3. #3
    Join Date
    Mar 2008
    Posts
    426
    Mentioned
    1 Post(s)
    Quoted
    116 Post(s)

    Default

    Do you have skype?

    Add: PEANUTS123123



  4. #4
    Join Date
    May 2013
    Posts
    38
    Mentioned
    1 Post(s)
    Quoted
    21 Post(s)

    Default

    There we go, i have added my script. I know it probably needs A LOT of work... that's why i wasn't going to add it here.
    Last edited by AnonymousUser; 06-28-2013 at 02:59 PM.

  5. #5
    Join Date
    Mar 2008
    Posts
    426
    Mentioned
    1 Post(s)
    Quoted
    116 Post(s)

    Default

    Quote Originally Posted by AnonymousUser View Post
    There we go, i have added my script. I know it probably needs A LOT of work... that's why i wasn't going to add it here.
    I fixed it and it now walks to the trees....
    You had a few things in the wrong spot..

    The variable for the SPS_PATH is set at the top of the script, above declare players.

    Also you should use 'if not logged in then log in player' ( that will help it stop typing ur password / user in the game )

    I changed a couple other things around too..

    Yeah.. Ask any questions / paste anything if you need more help..
    Maybe i didn't even help. :P

    Code:
    program AnonymousNormals;
    {$DEFINE SMART8}
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    
    Var
      mypath: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 AntiBan;
    begin
      if(not(LoggedIn))then
      Exit;
      FindNormalRandoms;
      case Random(8) of
       0:
       begin
         HoverSkill('Woodcutting', false);
         wait(2453+Random(432));
       end;
       1: PickUpMouse;
       2:
       begin
         MakeCompass('N');
         wait(100+random(133));
         MakeCompass('S');
         wait(50+random(133));
         MakeCompass('N');
         FindNormalRandoms;
       end;
      end;
    end;
    
    
    
    procedure ChopTree;
    var x, y: integer;
    begin
        repeat
        FindNormalRandoms;
        if FindObj(x, y, 'hop', 1785912, 35) then
        begin
          Mouse(x, y, 0, 0, false);
          ChooseOption('hop');
        end;
          repeat
          wait(400+random(250));
          AntiBan;
          Until not IsUpText('ew') or (InvFull);
      until(InvFull);
    end;
    
    begin
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
    
      SPS_Setup(RUNESCAPE_SURFACE, ['11_7','10_7','11_6','10_6']);
      myPath := [Point(4529, 2832), Point(4505, 2802),
      Point(4479, 2791), Point(4455, 2786), Point(4441, 2789)];
    
      
      if not LoggedIn then
        LoginPlayer;
      SetAngle(SRL_ANGLE_HIGH); // Set camera angle high
      SPS_WalkPath(MyPath);     // walks your path.
      Fflag(0);                 // will wait for the flag to go from minimap before continuing.
      ChopTree;
    end.



  6. #6
    Join Date
    May 2013
    Posts
    38
    Mentioned
    1 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by Peanuts View Post
    I fixed it and it now walks to the trees....
    You had a few things in the wrong spot..

    The variable for the SPS_PATH is set at the top of the script, above declare players.

    Also you should use 'if not logged in then log in player' ( that will help it stop typing ur password / user in the game )

    I changed a couple other things around too..

    Yeah.. Ask any questions / paste anything if you need more help..
    Maybe i didn't even help. :P

    Code:
    program AnonymousNormals;
    {$DEFINE SMART8}
    {$i srl/srl.simba}
    {$i sps/sps.simba}
    
    Var
      mypath: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 AntiBan;
    begin
      if(not(LoggedIn))then
      Exit;
      FindNormalRandoms;
      case Random(8) of
       0:
       begin
         HoverSkill('Woodcutting', false);
         wait(2453+Random(432));
       end;
       1: PickUpMouse;
       2:
       begin
         MakeCompass('N');
         wait(100+random(133));
         MakeCompass('S');
         wait(50+random(133));
         MakeCompass('N');
         FindNormalRandoms;
       end;
      end;
    end;
    
    
    
    procedure ChopTree;
    var x, y: integer;
    begin
        repeat
        FindNormalRandoms;
        if FindObj(x, y, 'hop', 1785912, 35) then
        begin
          Mouse(x, y, 0, 0, false);
          ChooseOption('hop');
        end;
          repeat
          wait(400+random(250));
          AntiBan;
          Until not IsUpText('ew') or (InvFull);
      until(InvFull);
    end;
    
    begin
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
    
      SPS_Setup(RUNESCAPE_SURFACE, ['11_7','10_7','11_6','10_6']);
      myPath := [Point(4529, 2832), Point(4505, 2802),
      Point(4479, 2791), Point(4455, 2786), Point(4441, 2789)];
    
      
      if not LoggedIn then
        LoginPlayer;
      SetAngle(SRL_ANGLE_HIGH); // Set camera angle high
      SPS_WalkPath(MyPath);     // walks your path.
      Fflag(0);                 // will wait for the flag to go from minimap before continuing.
      ChopTree;
    end.

    How could i make it to where when the inv. is full, Sps to walk back to the bank, and bank? and if maybe rewalking centered to trees if wonders off to far?

  7. #7
    Join Date
    Mar 2008
    Posts
    426
    Mentioned
    1 Post(s)
    Quoted
    116 Post(s)

    Default

    You can make the main loop something like this....

    Code:
    repeat
    
    WalkToTrees;
    
    Repeat
       chopTree;
    until(InvFull) 
    
    
    walktobank;
    progressreport;
    until(Finished)
    You can put a timer to walk back to the trees if you havne't found a tree for a set amount of time.

    look through the banking functions... plenty of stuff there.. otherwise TPA finding works pretty good for me..



  8. #8
    Join Date
    May 2013
    Posts
    38
    Mentioned
    1 Post(s)
    Quoted
    21 Post(s)

    Default

    okay, sorry for all the questions! Just now trying to get a little money making script/wc. I'm really wanting to learn to script!

  9. #9
    Join Date
    Mar 2008
    Posts
    426
    Mentioned
    1 Post(s)
    Quoted
    116 Post(s)

    Default

    Quote Originally Posted by AnonymousUser View Post
    okay, sorry for all the questions! Just now trying to get a little money making script/wc. I'm really wanting to learn to script!
    That's okay man..
    Over the last few months I've being learning to script and asking thousands of questions lol..

    I'm probably not the best at explaining things though ;p

    By the way, are you using pixel shift?

    its realllllly good for detecting if you're cutting a tree..

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



  10. #10
    Join Date
    May 2013
    Posts
    38
    Mentioned
    1 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by Peanuts View Post
    That's okay man..
    Over the last few months I've being learning to script and asking thousands of questions lol..

    I'm probably not the best at explaining things though ;p

    By the way, are you using pixel shift?

    its realllllly good for detecting if you're cutting a tree..

    TUTORIAL: http://villavu.com/forum/showthread.php?t=74090
    Thanks man i'll check it out! You mind if i PM you if i have a question?

  11. #11
    Join Date
    Mar 2008
    Posts
    426
    Mentioned
    1 Post(s)
    Quoted
    116 Post(s)

    Default

    Quote Originally Posted by AnonymousUser View Post
    Thanks man i'll check it out! You mind if i PM you if i have a question?
    Any time man.
    Sometimes I vanish for 1-5 days though.
    Usually pretty quick to respond though

    I'm still learning though, might not be able to help with complex things.. xD



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
  •