Page 3 of 3 FirstFirst 123
Results 51 to 56 of 56

Thread: Trying to get the bot to ChopTree for me

  1. #51
    Join Date
    Dec 2010
    Location
    Hawaii
    Posts
    612
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    I'm only 13 and don't understand half the things I read from the tuts....

  2. #52
    Join Date
    Dec 2010
    Posts
    808
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Add my msn, dynamite-boom@hotmail.co.uk

    You can ask me all the nooby questions you need

    -Boom

  3. #53
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by Huthaifah View Post
    I'm only 13 and don't understand half the things I read from the tuts....
    That's the fun of this forum ... I was 12 and understood much less than you.

    Lol - I used t o play spam the help forums lol...
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  4. #54
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by Huthaifah View Post
    It's okay, I quit making the script, I don't understand anything I'm doing so I don't want to leech, thanks for the help though
    You're not allowed to quit once you start scripting. I will try to help you understand your script.

    If you press run on simba it will start running the between the begin and end.(notice the point). So that is were I will start explaining.

    Simba Code:
    begin
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      Logs_Chopped := 0;
      repeat
        while (not(InvFull)) do
        begin
          FindTree;
          //your wait function
        end;
        WalkToBank;
        BankLogs;
        WalkToTrees;
      until (Logs_Chopped >= LOGS);
      Logout;
    end.

    The following lines are used to set up the script. SetupSRL loads everything it needs and sets the mouse speeds. It's placed correctly at the beginning of the loop. DeclarePlayers will run the procedure were you entered your player information. This is used by LoginPlayer, so it should always be before LoginPlayer. You did this correctly.
    LoginPlayer will fill in the form and logs you in. It is however a better practice to call it after a check if the player is already LoggedIn. Final code can be seen down here. Notice I didn't use a begin and end; there, If they aren't used only one line of code will be run after the if-statement.

    Simba Code:
    SetupSRL;
    DeclarePlayers;
    if not(LoggedIn) then
      LoginPlayer;

    The next code you used is Logs_Chopped := 0;, this code isn't needed. If you declare(make) a variable of the type Integer(a number) it will start as 0. So it's already 0 here.

    I hope I still got you here? Cause now it's getting interesting. I will explain the loops you use.

    You start with a repeat loop. A repeat loop repeats everything between repeat and until(condition);. When it reaches the bottom it will go up again. Unless the condition after until is True. Then it will continue at the next line.

    Another loop you used is the while loop. There are a few differences between them. One of those is that you don't need two line like repeat and until, but only one. So the same rules apply as with if statements. Only the line after then is run, unless it's a begin, in that case it will run everything between the begin and the end;.

    One of your problems is in the while loop. Here is a possible situation:
    1. Is your InvFull?
    2. No it isn't.
    3. Click a tree.
    4. Is your InvFull?
    5. No it isn't.
    6. Click a tree.
    7. Is your InvFull?
    8. No it isn't.
    9. Click a tree.

    This all happens within a second. That is the spam clicking you were talking about. You want to wait until the tree is down. This is the hardest part of writing a woodcutter. With a wait function it could look like this:
    1. Is your InvFull?
    2. No it isn't.
    3. Click a tree.
    4. Wait till tree is down.
    5. Is your InvFull?
    6. No it isn't.
    7. Click a tree.
    8. Wait till tree is down.
    9. Is your InvFull?
    10. Yes it is full.
    11. Walk to bank.

    This will eliminate the spam clicking.

    I will help you further tomorrow.
    Working on: Tithe Farmer

  5. #55
    Join Date
    Oct 2006
    Posts
    1,190
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    I told you that you could message me with any help you need, don't let a few mistakes phase you

    Everyone starts out the same way



  6. #56
    Join Date
    Aug 2007
    Location
    Hawaii
    Posts
    3,880
    Mentioned
    7 Post(s)
    Quoted
    152 Post(s)

    Default

    Huthaifah pay close attention to what your fellow scripters are trying to teach you.
    Faith is an oasis in the heart which will never be reached by the caravan of thinking.

Page 3 of 3 FirstFirst 123

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
  •