Page 4 of 9 FirstFirst ... 23456 ... LastLast
Results 76 to 100 of 223

Thread: Script down your first rs tree!

  1. #76
    Join Date
    Jun 2007
    Posts
    108
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Griff View Post
    It shouldn't do that. Did you remember to change the until so that the UpText is for the tree that you are cutting, because it's set for yews in the tutorial.
    Copied your script line by line and it continually clicks.

    Problem with mine is that when I walk to the tree it'll move the X/Y coordinates and in turn click 1 or two more times.

    What I wrote up.. (Don't hate to much porfavor, never scripted in my life.)
    Simba Code:
    procedure ChopTree;
      var x,y,colorz: integer;
      begin
        repeat
          FindNormalRandoms;
          if FindObj(x,y,'hop',3563606,15) then
          begin
            Writeln('Found Yew Tree chopping now..');
            colorz:=GetColor(x,y);
            Mouse(x,y,4,4,false);
            ChooseOption('hop');
            while GetColor(x,y)=colorz do
            begin
              wait(100);
              end;
          end else Writeln('Cannot find Yew Tree');
            Wait(1250+random(200));
            AntiBan;
        until(InvFull);
       end;

    Note: Chase helped come up with the idea to use GetColor/helped write it.
    Last edited by jatex; 01-17-2012 at 03:14 AM.

  2. #77
    Join Date
    Nov 2011
    Posts
    67
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Before saying anything, Id like to say thank you for making this tutorial.

    Now, for my question (one of many probably)

    if FindObj(x, y, 'hop', 1785912, 35) then
    begin
    Mouse(x, y, 0, 0, false);
    ChooseOption('hop');

    In this piece of code, What do the 0, 0 do???

    There was a similar code

    if FindObj(x, y, 'hop', 2380663, 35) then
    begin
    Mouse(x, y, 2, 2, true);
    ChooseOption('hop');

    Similarly, what does 2, 2 do here?


    Also, I am cutting citadel roots which have a long respawn time and put wait as 10000, my script clicks the roots, but ends as soon as it does that. Why doesnt it wait for the root to respawn and click it again?
    Last edited by redgiant61; 01-18-2012 at 04:31 PM.

  3. #78
    Join Date
    Nov 2011
    Posts
    67
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Thanks for the guide i hope ill get better at sciprting

  4. #79
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by redgiant61 View Post
    Before saying anything, Id like to say thank you for making this tutorial.

    Now, for my question (one of many probably)

    if FindObj(x, y, 'hop', 1785912, 35) then
    begin
    Mouse(x, y, 0, 0, false);
    ChooseOption('hop');

    In this piece of code, What do the 0, 0 do???

    There was a similar code

    if FindObj(x, y, 'hop', 2380663, 35) then
    begin
    Mouse(x, y, 2, 2, true);
    ChooseOption('hop');

    Similarly, what does 2, 2 do here?


    Also, I am cutting citadel roots which have a long respawn time and put wait as 10000, my script clicks the roots, but ends as soon as it does that. Why doesnt it wait for the root to respawn and click it again?
    The 2, 2 is randomness in the mouse. It means it will click 2 pixels left or right from where we actually want to for the first 2, and then the same but vertically for the second 2. Honestly they should both be 2, 2 for less chance of being banned, but it doesn't really affect it in this situation.

    For your second question, this script stops as soon as it can't find the tree, so you'll need to add some failsafes! For example, if there is only 1 tree in the area (I don't know what citadel roots are), then you would need a if not(FindTree) then wait(10000).
    And remember that 10000 is only 10 seconds, so you may need it longer!

  5. #80
    Join Date
    Nov 2011
    Posts
    67
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Alright. Thanks for the answer..Gonna try making this script considering there arent any on here.
    Last edited by redgiant61; 01-19-2012 at 07:22 AM.

  6. #81
    Join Date
    Nov 2011
    Posts
    67
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Whats wrong with this code??
    begin
    if FindObj(x, y, 'hop', 2380663, 35) then
    begin
    FindNormalRandoms;
    Mouse(x, y, 2, 2, true);
    ChooseOption('hop');
    if not FindObj(x, y, 'hop', 2578557, 35) then
    begin
    FindNormalRandoms;
    Mouse(x, y, 2, 2, true);
    ChooseOption('hop');
    end;
    end;
    end;

    To my understanding, ive made it so that it cuts a root....And using the ifnot, it should cut the other root, when it doesnt find the first.
    Though it just stops anyways....

  7. #82
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by redgiant61 View Post
    Whats wrong with this code??
    begin
    if FindObj(x, y, 'hop', 2380663, 35) then
    begin
    FindNormalRandoms;
    Mouse(x, y, 2, 2, true);
    ChooseOption('hop');
    if not FindObj(x, y, 'hop', 2578557, 35) then
    begin
    FindNormalRandoms;
    Mouse(x, y, 2, 2, true);
    ChooseOption('hop');
    end;
    end;
    end;

    To my understanding, ive made it so that it cuts a root....And using the ifnot, it should cut the other root, when it doesnt find the first.
    Though it just stops anyways....
    Remember to always use Simba tags when you're posting code on the forums.

    Simba Code:
    procedure chop;
    var x, y;
    begin
      if FindObj(x, y, 'hop', 2380663, 35) then
        begin
         Mouse(x, y, 2, 2, false);
         ChooseOption('hop');
        end;
    end;
    You had it so that if it didn't find the tree, it would just randomly click anyways. And you don't want FindNormalRandoms in between your finding and clicking functions, that will just mess it up. I put it at the very beginning of the procedure. Try that out and see if it works.

  8. #83
    Join Date
    Jan 2012
    Location
    Newark, DE
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This has been very helpful. Not perfect, but a great bit of information.

  9. #84
    Join Date
    Nov 2011
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Amazing tutorial. Very well laid out and explained. I manage to cut down a tree woot

  10. #85
    Join Date
    Jan 2012
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    helped me out a lot thanks

  11. #86
    Join Date
    Jan 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I am really new here,

    I have A question, I followed your tutorial exactly but when I try to run the script before you added the antiban i get nothing, my mouse takes over my computer and I have literally had to wrestle with my computer to shut down the script, 1. shouldn't there be a stop script hotkey? 2, how do I get the script to run? No client poped up and my mouse just started moving.

    Any help is much appreciated,

    Thanks.

  12. #87
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by Wilko View Post
    This has been very helpful. Not perfect, but a great bit of information.
    YOU SICK CHILD IT'S PERFECT! JK, glad you liked it

    Quote Originally Posted by Eatshrimp View Post
    I am really new here,

    I have A question, I followed your tutorial exactly but when I try to run the script before you added the antiban i get nothing, my mouse takes over my computer and I have literally had to wrestle with my computer to shut down the script, 1. shouldn't there be a stop script hotkey? 2, how do I get the script to run? No client poped up and my mouse just started moving.

    Any help is much appreciated,

    Thanks.
    I believe Ctrl Alt S stops the script. And about the client, I don't have SMART included in this script, so it just uses the runescape on your browser.

  13. #88
    Join Date
    Feb 2006
    Location
    Aussie
    Posts
    937
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Griff View Post
    After SetUpSRL, you should put activate client.
    If you are going to tell them what code should be included, that should be ActivateClient;

    Quote Originally Posted by Griff View Post
    This will make scar minimize when you run the script.
    We're using Simba now

    Quote Originally Posted by Griff View Post
    WE will use one of SRL incudesfor this.
    That should be SRL procedures i think. If not, then includes is still spelt wrong anyway

    Quote Originally Posted by Griff View Post
    We now have some space to work with. In those are lines that we name, you need to write procedure, name it, and then put a semicolon( ; )
    This isn't a very clear explanation.

    Quote Originally Posted by Griff View Post
    Notice how the word procedure went in bold when you typed it? Different words in Simba do that when you type them, like procedure, function, or, do, for, and, else, begin, end, just to name a few. We now need to begin our procedure by putting a begin at right under your procedure name.
    Perhaps explain about restricted keywords, rather then just listing a couple of them.

    Quote Originally Posted by Griff View Post
    This is where the user of the script will but their username, in between the ''. Notice how the '' are pink, and everything in between is pink.
    I think strings and chars are actually blue now.

    Quote Originally Posted by Griff View Post
    There are those three lines above what I mentioned
    You didn't mention them, and not worded correctly either

    Quote Originally Posted by Griff View Post
    Remember that we always count starting from 0, so your first player will be [0], your second will be [1], and so on.
    For arrays and such, this is correct, however there will be cases where the scripter has a variable that will start from 1.

    Quote Originally Posted by Griff View Post
    Great we now have our declareplayers procedure. Click script-> compile to make sure you've done everything correctly. But this procedure does nothing unless we put it in our main loop. So, we put declareplayers; in there, and we also put LoginPlayer; after. It should look like this:

    SCAR Code:
    program New;
    {$i srl/srl.simba}

    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;
     [B] ActivateClient;
      DeclarePlayers;
    end.[/B]
    You forgot to add LoginPlayer; here.

    Quote Originally Posted by Griff View Post

    SCAR Code:
    procedure ChopTree;
    var x, y: integer;
    begin
      if FindObj(x, y, 'hop', 1785912, 35) then
      begin
       [B] Mouse(x, y, 2, 2, false);[/B]
        ChooseOption('hop');
      end;
    end;
    Here you use a randomness of 2, later on you use 0.

    Quote Originally Posted by Griff View Post
    So what this does is if it finds the tree, it will write click,
    right, not write.

    Quote Originally Posted by Griff View Post
    SCAR Code:
    program New;
    {$i srl/srl.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 ChopTree;
    var x, y: integer;
    begin
      if FindObj(x, y, 'hop', 1785912, 35) then
      begin
        [B]Mouse(x, y, 0, 0, false);[/B]
        ChooseOption('hop');
      end;
    end;
    Here you changed to 0 randomness on the click.

    Quote Originally Posted by Griff View Post
    SCAR Code:
    begin
      SetUpSRL;
      ActivateClient;
    [B]  DeclarePlayers;
      ChopTree;[/B]
    end.
    No LoginPlayer;

    Quote Originally Posted by Griff View Post
    The next thing we need to do is find randoms, we we don't get pwned while the script is trying to run. Since this is a beginner tut, I'll keep is simple, and just add

    SCAR Code:
    [B]FindNormalRandoms;[/B]

    SCAR Code:
    program New;
    {$i srl/srl.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 ChopTree;
    var x, y: integer;
    begin
        repeat
          if FindObj(x, y, 'hop', 1785912, 35) then
          Mouse(x, y, 0, 0, false);
          ChooseOption('hop');
          repeat
            wait(1200+random(250));
            Until not IsUpText('ew') or (InvFull);
        until(InvFull);
    end;

    begin
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      ChopTree;
    end.
    You never added the FindNormalRandoms; until later.

    Quote Originally Posted by Griff View Post
    Welcome to part 2 of making a script! I'm now going to show you how to add antiban, antirandoms, and walking to the script!
    Not sure if you realise you have this in here, even though you haven't added it just yet.

    Quote Originally Posted by Griff View Post

    Whoa! I've added a lot of stuff there. The first thing you see there, the case random(8); is for randomness purposes. So there is a 1/8 chance that every one of the following options will be chosen.
    Explain why we don't use an Anti-ban every single time?

    Quote Originally Posted by Griff View Post

    SCAR Code:
    program New;
    {$i srl/srl.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(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;
    [B]
    begin
      SetUpSRL;
      ActivateClient;
      DeclarePlayers;
      ChopTree;
    end.[/B]
    No LoginPlayer;

    Quote Originally Posted by Griff View Post
    Please post what you liked, what was confusing, and what I did wrong.

    Thanks for reading,

    -Griff721
    I don't mean to sound like a jerk, but i just thought i would pick out a couple of areas i saw that could possibly use some improvement. There were a couple of issues with standards as well, but i decided not to point them out.

    If you want some help pin pointing exactly where these errors, or the standards issues are, just let me know

  14. #89
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Thanks, not sounding like a jerk. I kind of rushed some of the updates with changing it from Scar to Simba, and I'm really not that strong of a scripter anyways, so I'm sure that came into play a few times Thanks again for the ideas
    Last edited by Griff; 01-30-2012 at 06:08 PM.

  15. #90
    Join Date
    Feb 2006
    Location
    Aussie
    Posts
    937
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No worries. Well, practice makes perfect! Either way, i thought it was a great tutorial and repped you for it Keep up the good work.

  16. #91
    Join Date
    Jan 2012
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Nvm i found out where i messed up about to test it
    Last edited by alwaysasuspect; 01-31-2012 at 10:09 PM.

  17. #92
    Join Date
    Jan 2012
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    awesome guide! thanks, ill def look at this, this weekend when i get some time.

  18. #93
    Join Date
    Jan 2012
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I am having a problem, when ever I compile this script a "SCAR Divi CDE" window pops up saying "Unable to find file 'srl'srl.simba' used from " "

    In the script where i have {$i srl/srl.simba} it is not green like yours it is in italics..how do I fix this?
    Thankyou,

  19. #94
    Join Date
    Jan 2012
    Location
    AUSSIE BOII
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    wow im not evan going to try! lol

  20. #95
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    387
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    What does this mean?

    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.

  21. #96
    Join Date
    Feb 2012
    Posts
    390
    Mentioned
    2 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by exilednoob View Post
    What does this mean?

    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    o.0 happens to me too in lots of scripts

  22. #97
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by bottingbackup View Post
    I am having a problem, when ever I compile this script a "SCAR Divi CDE" window pops up saying "Unable to find file 'srl'srl.simba' used from " "

    In the script where i have {$i srl/srl.simba} it is not green like yours it is in italics..how do I fix this?
    Thankyou,
    You're using SCAR, you need Simba

    Quote Originally Posted by exilednoob View Post
    What does this mean?

    Warning! You passed a wrong ys to a finder function: -5. That is below 0, thus out of bounds. Setting the value to 0 for now.
    This means that it couldn't find the object in the width of the window, so it starting looking outside. This can happen with things like FindObj, because you don't tell it where to look, unlike something that you give it an area to look.
    Last edited by Griff; 02-10-2012 at 07:21 PM.

  23. #98
    Join Date
    Feb 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    [Error] (54:4): Identifier expected at line 53
    Compiling failed.
    I tried running the script and this is what happend :/

  24. #99
    Join Date
    Mar 2007
    Location
    Alberta, Canada
    Posts
    1,780
    Mentioned
    0 Post(s)
    Quoted
    11 Post(s)

    Default

    Quote Originally Posted by Jack_Sowe View Post
    [Error] (54:4): Identifier expected at line 53
    Compiling failed.
    I tried running the script and this is what happend :/
    Is that the final version you're compiling? Do you have the latest Simba/SRL? Because it should compile.

  25. #100
    Join Date
    Jan 2012
    Posts
    81
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    [Error] (17:1): Semicolon (';') expected at line 16
    Compiling failed.

    Is the tutorial script...broken? Lmfao.

    EDIT: The line of code is fine. It reads "var x,y,:integer;"
    Last edited by Solidone40; 02-12-2012 at 06:37 PM.

Page 4 of 9 FirstFirst ... 23456 ... 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
  •