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

Thread: Making a Woodcutter!

  1. #1
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default Making a Woodcutter!

    O-U-T-D-A-T-E-D-!



    Hello! Im Torrent, You may recognise me for my work on updating older Tutorials, more recently my one on the PowerMiner update, which is why some of those words found in the PowerMiner tutorial will be found here, as they are 100% relevant!

    Well, Im here now to create one on Woodcutting, I already have a Chopping and Banking Tutorial out there, and this will show you how to take into account the fact you have to walk to the bank, and walk back to the willows.

    The original guide by The_Rs_Monkey is found here: http://www.villavu.com/forum/showthread.php?t=16602

    If you like this Tutorial, please, Spread the Word, Rep Me, or Rank The Thread!!

    Thanks In Advance.

    Anyway...

    Welcome to the Updated Guide to Making a Woodcutter!

    This tutorial will include:
    - Walking
    - Banking
    - Cutting
    - Switching Players
    - FailSafes
    - Main Looping
    - The basic part of using BankPins!
    - Constants and Variables
    - The Necessity of Descriptions!


    To Start we should name the the program that we are going to use, calling it something significant to the program you are going to make:

    SCAR Code:
    program MyFirstWoodCutter;


    Then you HAVE to include this part, as it controls everything that we need to use in this script (FindObjCustom, etc.), aswell as Including WoodCutting.scar (Incase we need find axe, find ent, etc. which we wont in this tutorial, but its always a good thing to have)


    SCAR Code:
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/WoodCutting.scar}

    The we include our constants. Constants are basically what they say they are, something that is ALWAYS the same, like RockColours, TreeColours, SMART Worlds, etc.


    SCAR Code:
    const
    //-->Loads<--\\

    Loads = 10; //How many loads per player before switching

    //--->SRL ID<---\\
    YourSRLId = '';
    YourSRLPassword ='';

    //--->Pin - Make same for ALL chars. If no Pin, leave blank<---\\
    YourPin = '';

    These are our constants, note that we have a description above them, telling our script user what the constant is for, and giving more information next to them if needed. We see that we have Loads, SRLId's and Bank Pins. I will cover all of these later.


    Then we have to declare our variables, not variables again explain themselves, something that is a variable, can constantly change. The variables in this case are the x and the y, the co-ordinates on the game screen. It is an "integer" as they are co-ordinates, which are numerical. Tries will be explained later.

    SCAR Code:
    var x, y, LoadsNum, LoadsNum2: integer;

    Then we have to declare our variables, not variables again explain themselves, something that is a variable, can constantly change. The variables in this case are the x and the y, the co-ordinates on the game screen. It is an "integer" as they are co-ordinates, which are numerical. LoadsNum and LoadsNum2 are integers aswell, but these will be explained later on.

    Then we have our first procedure. I will explain the procedure after we see the overview.

    SCAR Code:
    {-------------------------------------------------------
                           Player Setup
    --------------------------------------------------------}


    procedure DeclarePlayers;
    begin
     
         HowManyPlayers := 1;  
         NumberOfPlayers(HowManyPlayers);
         CurrentPlayer:= 0
     
         Players[0].Name   := 'Username';
         Players[0].Pass   := 'Password';
         Players[0].Nick   := 'erna';
         Players[0].Active := True;
     
    end;

    {----------------------------Do Not Edit Below This----------------------------}

    Procedure DeclarePlayers tells us the name of the procedure that we are using. Begin starts the procedure [Every "Begin" has an "End", Every "Repeat" has an "Until" and Every "If" has a "Then" - Follow this and it should stop "Idenfitifer Expected ]. How Many Players means how many players we are going to use, and Current player tells us which player to start with. Username, Password are pretty basic, but the Nickname HAS to be 3-4 letters of non-capital or without a space of your Username, like mine is. The Active = True tells us if the player is to be run in the script or not. Note again the description, it tells us that we should set up our players here, and then not edit below the next line. We would put our variables under here to be safe, but I introduced them earlier just to be with the constants. In our final script you will see the variables under the "Do Not Edit..." part.

    Now we have our AntiBan and AntiRandoms, but again Im not going to go into details about them, as I have written a Tutorial about them found here: http://www.villavu.com/forum/showthread.php?t=27515

    SCAR Code:
    Procedure AntiRandoms;
    begin
      If(FindFight)then
      RunAway('N', True,1,15000);
      FindNormalRandoms;
      FindLamp('Woodcutting');
    end;

    And our AntiBan:

    SCAR Code:
    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
      case Random(30) of
        1: RandomRClick;
        2: HoverSkill('Woodcutting', False);
        3: RandomMovement;
        4: BoredHuman;
        5: AlmostLogout;
        6: DoEmote(400 +Random(90));
      end;
    end;

    Now onto our actual WoodCutting procedure. This part will be merged with an explanation of Fail Safes:

    SCAR Code:
    //---------------------------------ChopTree-----------------------------------\\

    procedure ChopTree;
    var CuttingTime: integer;
        Tries: integer;
    begin
      MarkTime(CuttingTime);
      MakeCompass('S');
      repeat
        if FindObjCustom(x, y, ['Wil', 'low'], [1989969, 3760987, 2844763], 7)) then
         begin
           Mouse(x,y,0,0,false);
           if(IsUpText('Chop'))then
             Wait(5000 + (random(150)));
             ChooseOption('hop')
             AntiBan;
             if (not (FindObjCustom(x, y, ['Wil', 'low'], [1989969, 3760987, 2844763], 7))) then
               Wait(100+random(100));
               Tries := Tries + 1;
               if(Tries = 50)then
               begin
                 Writeln ('Willow Logs not found. Switching Players..');
                 Logout;
                 NextPlayer(False);
                 Exit;
               end;
         end;
      until(InvFull) or (TimeFromMark(CuttingTime) > 800000+random(60000));
    end;

    Now this part looks very daunting. But we can break it down bit by bit.

    We have the description at the top, this is for you more than anyone else, so when you need to find your procedure to do some editing, you can find it alot easier! [It is basically a NEED to be neat with scripts, untidy scripts are often less read as people cant be bothered to look through it, as it is alot harder to do.]

    We name our procedure, like always.

    We then declare two unique variables, as in, they are only used in this procedure, so I dont need to declare them at the top as Global Variables [Right word?]

    SCAR Code:
    var CuttingTime: integer;
        Tries: integer;

    These will be explained later on.
    SCAR Code:
    begin
      MarkTime(CuttingTime);
      MakeCompass('S');

    We begin the procedure, as always, and it Marks the time that the script starts to cut. It makes the compass face South (Needs to in my script..)but you could make it face Notrh, or whatever, or even just take it out.

    SCAR Code:
    repeat
        if FindObjCustom(x, y, ['Wil', 'low'], [1989969, 3760987, 2844763], 7)) then
         begin
           Mouse(x,y,0,0,false);
           if(IsUpText('Chop'))then
             Wait(5000 + (random(150)));
             ChooseOption('hop')
             AntiBan;

    Repeat, it repeats the procedure as a whole. If it finds an object called 'Willow' with those 3 colours, and with a tolerance of 7. If it does find it it will move over it, and it the 'Chop' is up in the corner of the screen, it will wait 5-5.15 seconds, and chops it. It will then AntiBan whilst you are chopping.

    SCAR Code:
    if (not (FindObjCustom(x, y, ['Wil', 'low'], [1989969, 3760987, 2844763], 7))) then
               Wait(100+random(100));
               Tries := Tries + 1;
               if(Tries = 50)then
                 Writeln ('Willow Logs not found. Switching Players..');
                 Logout;
                 NextPlayer(False);
         end;

    This is our First Failsafe! If it doesnt find the object willow, it waits 0.2 seconds, and adds 1 to the integer Tries. If it tries 50 times then it will write that statement in our debug box, and logout, moving onto the next player but leaving the player inactive, so it will not run this character again. It then ends the part of the procedure.

    Then our Final bit. I bet your like? Cutting Time? HUH?

    Lets explain it now.

    SCAR Code:
    until(InvFull) or (TimeFromMark(CuttingTime) > 800000+random(60000));
    end;

    So, the until part goes with the repeat at the start of the procedure. It will repeat this procedure until it has a Full Inventory, or until it Finds that our Integer "Cutting Time" is about 140-150 minutes. (A bit long I know but you never know how long it could take to get a full inventory?)

    Now we move onto our Walk to bank procedure.

    SCAR Code:
    //----------------------Walking from Willows to Bank--------------------------\\
    procedure WalkToBank;
    begin
      if (not(LoggedIn)) then
        Exit;
        SymbolAccuracy:= 0.2;
        MakeCompass('N');
        if (FindSymbol(x, y, 'bank')) then
        begin
          Mouse(x, y, 2, 2, true);
          FFlag(0);
          Writeln('Got to bank');
        end;
    end;

    Well, we tell ourselves what our procedure is in the description, and name the procedure. A failsafe first, if we are not logged in, we will exit the script. It gives a SymbolAccuracy of 0.2, so is very accurate. It will make the compass face North, like it has to in my script. If it finds the Bank Symbol on the X and the Y axis, and then it says "FFlag". I took this description straight from the SRL Manual:

    procedure FFlag(Distance: Integer);
    By: Wizzup? / WT-Fakawi.
    Description:
    Waits until Flag is within "Distance" distance.

    Seeing as my distance is "0", It waits until the Flag has disappeared, but this is useful for walking on roads as a failsafe, as you dont always wait to get to the flag all the time.

    It then writes "Got To Bank" in our Debug Box, then ends the part of the procedure, and ends the procedure.

    You could use RadialWalking, or anything of the sort, Failsafes with DTM's, but this is for beginners and I dont think it is necissary to get inot too much detail about those at the moment.

    Now onto the banking procedure. I took this part out of my Tutorial on Chopping and banking:

    SCAR Code:
    procedure Banking
    begin
      if (InvFull) then
      begin
        MakeCompass('W')
        Wait (300 + random(160));
        OpenBankQuiet('db');
        if (PinScreen) then
        InPin(YourPin);
          if(FindColorSpiral(x, y, 4155248, 547, 206, 734, 464))then
        begin
         Mouse(x, y, 4, 3, false);
         ChooseOption('All');
         Result := True;
         if Result = True then
         begin
           LoadsNum := LoadsNum + 1;
           LoadsNum2 := LoadsNum2 + 1;
           ReportVars[1] := ReportVars[1] + 1;
           SendSRLReport;
         end;
        end;
       CloseBank;
       Wait(150 + random (278));
       MakeCompass('S');
      end;
    end;

    So! Lets start.

    SCAR Code:
    procedure Banking
    begin
      if (InvFull) then

    We name our procedure, as par usual. We then begin it [Man this gets harder and harder..] and then it checks if the inventory is full. If it is full...

    SCAR Code:
    begin
        MakeCompass('W')
        Wait (300 + random(160));
        OpenBankQuiet('db');

    ...then it begins, makes the compass "West" to face the bank, (in Draynor its West..) and waits 300-460 milliseconds. IT then opens the Bank 'Quiet'. This is a procedure that is a little more laggy, but is omre human like. The 'Db' tells us what bank we are at, so it could be VWB, VEB, Go figure.

    SCAR Code:
    if (PinScreen) then
        InPin(YourPin);
          if(FindColorSpiral(x, y, 4155248, 547, 206, 734, 464))then

    If the script detects a pin screen it will InPin(YourPin). The YourPin is the constant we set up at the beginning of the script. This could be something like this if we wanted to add it to the declare players:

    SCAR Code:
    Players[0].Integers[0] := 0000;

    Then we could put the InPin(YourPin) as InPin(Players[0].Integers[0]) [I Think??]

    And then if it finds the Colour of the Willow Logs (In Mine..) on the X and Y axis, in the coordinate box of the inventory, it will...

    SCAR Code:
    begin
         Mouse(x, y, 4, 3, false);
         ChooseOption('All');
         Result := True;
         if Result = True then
         begin
           LoadsNum := LoadsNum + 1;
           LoadsNum2 := LoadsNum2 + 1;
           ReportVars[1] := ReportVars[1] + 1;
           SendSRLReport;
         end;
        end;
       CloseBank;
       Wait(150 + random (278));
       MakeCompass('S');
      end;
    end;

    ...begin another part of the procedure. It moves over the Logs, and chooses the option "All" like a player would.

    Now, whats that part underneath? Well this is the SRL Stats part. Im not going to go into this part, but I will link you to an indepth tutorial that looks at exactly this, by Hy71194: http://www.villavu.com/forum/showthread.php?t=27772

    Now we have the LoadsNum and LoadsNum2. This will come into effect later on in the script when we start on the main loop, so we can ignore this for now.

    It then ends this part, closes the Bank, waits about 0.4 seconds, and makes the compass South ready to walk back to our Draynor willows. It then ends the procedure.


    Walking back to the willows..

    SCAR Code:
    procedure WalkToWillow;
    begin
      if (FindSymbol(x, y, 'fish')) then
      begin
        Mouse(x, y, 2, 2, true);
        FFlag(0);
        Writeln('Got to Willows');
      end;
    end;

    Nice and basic :]. We name it, begin it, if it finds the fish symbol, it clicks it, it gets to the flag, makes the compass east, writes Got To Willows in the debug box and ends it. Simple as

    NOW.... Onto our Main Loop!

    Lets first setup our Script, with a little bit before our main loop, this saves on the size of our main loop.

    Lets make it shall we?

    SCAR Code:
    procedure SetupScript;
    begin
      SRLId := YourSRLId;
      SRLPassword:= YourSRLPassword;
      SetupSRL;
      ScriptID:= '687';
      DeclarePlayers;
    end;

    Sends your SRL Id/Password, sets up SRL so that it can run faster. And The script ID is covered in Hy's tutorial on SRL Stats. We then Declare our Players and end the Setup.

    Now ONTO our Main Loop..

    SCAR Code:
    begin
      SetupScript;
      repeat
       WalkToWillow;
       ChopTree;
       AntiBan;
       WalkToBank;
       Banking;
       if (LoadsNum2=Loads) then
        begin
           NextPlayer(True);
           LoadsNum2 := 0;
           MakeCompass('S')
           Writeln('Players Switched successfully')
        end;
      until (false)
    end.


    So, a little more complicated then it seems.

    SCAR Code:
    begin
      SetupScript;
      repeat
       WalkToWillow;
       ChopTree;
       AntiBan;
       WalkToBank;
       Banking;

    IT begins by doing SetupScript, then Repeats the WalkToWillow, ChopTree, AntiBanning, Walking to the Bank and Banking.

    SCAR Code:
    if (LoadsNum2=Loads) then
        begin
           NextPlayer(True);
           LoadsNum2 := 0;
           MakeCompass('S')
           Writeln('Players Switched successfully')

    Now remember earlier I said that we should ignore the LoadsNum2 but for now? Well now we use it. If the LoadsNum2 = The Loads we setup to do at the constants at the start, it will begin by Logging in the Next Player, making sure that this player is True, IE, it will always repeat. It makes the LoadsNum2 = 0 again so that it doesnt logout instantly, and makes the compass south, writing in the Debug box "Players switched sucessfully'"

    Now when we compile this whole script together we can finally have our FIRST Script:

    SCAR Code:
    {/\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
    |                    WoodCutter Tutorial by Torrent of Flame                   |
    |                           For educational use ONLY                           |
    //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\}

     
     
     
     
    program MyFirstWoodCutter;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/WoodCutting.scar}
     
    const
    //-->Loads<--\\
     
    Loads = 10; //How many loads per player before switching
     
    //--->SRL ID<---\\
    YourSRLId = '';
    YourSRLPassword ='';
     
    //--->Pin - Make same for ALL chars. If no Pin, leave blank<---\\
    YourPin = '';
     
    {-------------------------------------------------------
                           Player Setup
    --------------------------------------------------------}

     
    procedure DeclarePlayers;
    begin
     
         HowManyPlayers := 1;
         NumberOfPlayers(HowManyPlayers);
         CurrentPlayer:= 0
     
         Players[0].Name   := 'Username';
         Players[0].Pass   := 'Password';
         Players[0].Nick   := 'erna';
         Players[0].Active := True;
     
    end;
     
    {----------------------------Do Not Edit Below This----------------------------}
    var x, y, LoadsNum, LoadsNum2: integer;
     
    //-----------------------------AntiRandoms/AntiBan----------------------------\\
     
    Procedure AntiRandoms;
    begin
      If(FindFight)then
      RunAway('N', True,1,15000);
      FindNormalRandoms;
      FindLamp('Woodcutting');
    end;
     
    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
      case Random(30) of
        1: RandomRClick;
        2: HoverSkill('Woodcutting', False);
        3: RandomMovement;
        4: BoredHuman;
        5: AlmostLogout;
        6: DoEmote(400 +Random(90));
      end;
    end;
     
    //---------------------------------ChopTree-----------------------------------\\
     
    procedure ChopTree;
    var CuttingTime: integer;
        Tries: integer;
    begin
      MarkTime(CuttingTime);
      MakeCompass('S');
      repeat
        if FindObjCustom(x, y, ['Wil', 'low'], [1989969, 3760987, 2844763], 7) then
        begin
           Mouse(x,y,0,0,false);
           if(IsUpText('Chop'))then
             Wait(5000 + (random(150)));
             ChooseOption('hop')
             AntiBan;
             if (not (FindObjCustom(x, y, ['Wil', 'low'], [1989969, 3760987, 2844763], 7))) then
               Wait(100+random(100));
               Tries := Tries + 1;
               if(Tries = 50)then
               begin
                 Writeln ('Willow Logs not found. Switching Players..');
                 Logout;
                 NextPlayer(False);
                 Exit;
               end;
           end;
      until(InvFull) or (TimeFromMark(CuttingTime) > 800000+random(60000));
    end;
     
    //----------------------Walking from Willows to Bank--------------------------\\
     
    procedure WalkToBank;
    begin
      if (not(LoggedIn)) then
        Exit;
        SymbolAccuracy:= 0.2;
        MakeCompass('N');
        if (FindSymbol(x, y, 'bank')) then
        begin
          Mouse(x, y, 2, 2, true);
          FFlag(0);
          Writeln('Got to bank');
        end;
    end;
     
    //--------------------------------Banking-------------------------------------\\
     
    procedure Banking;
    begin
      if (InvFull) then
      begin
        MakeCompass('W')
        Wait (300 + random(160));
        OpenBankQuiet('db');
        if (PinScreen) then
        InPin(YourPin);
          if(FindColorSpiral(x, y, 4155248, 547, 206, 734, 464))then
        begin
         Mouse(x, y, 4, 3, false);
         ChooseOption('All');
         begin
           LoadsNum := LoadsNum + 1;
           LoadsNum2 := LoadsNum2 + 1;
           ReportVars[1] := ReportVars[1] + 1;
           SendSRLReport;
         end;
        end;
       CloseBank;
       Wait(150 + random (278));
       MakeCompass('S');
      end;
    end;
     
    //Willows to Bank\\
     
    procedure WalkToWillow;
    begin
      if (FindSymbol(x, y, 'fish')) then
      begin
        Mouse(x, y, 2, 2, true);
        FFlag(0);
        Writeln('Got to Willows');
      end;
    end;
     
    //SetupScript\\
     
    procedure SetupScript;
    begin
      SRLId := YourSRLId;
      SRLPassword:= YourSRLPassword;
      SetupSRL;
      ScriptID:= '687';
      DeclarePlayers;
    end;
     
    //THE MAIN LOOPAGE!\\
     
    begin
      SetupScript;
      repeat
       WalkToWillow;
       ChopTree;
       AntiBan;
       WalkToBank;
       Banking;
       if (LoadsNum2=Loads) then
        begin
           NextPlayer(True);
           LoadsNum2 := 0;
           MakeCompass('S')
           Writeln('Players Switched successfully')
        end;
      until (false)
    end.

    Thanks to Pwnt for the Fix.

    Thanks for Reading!!!
    Jus' Lurkin'

  2. #2
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    not bad, i mostly skimmed through it but it looks pretty in depth and detailed.

    Suggestions:

    - those standards make my eyes hurt in certain procedures

    SCAR Code:
    if(Tries = 50)then
      Writeln ('Willow Logs not found. Switching Players..');
      Logout;
      NextPlayer(True);

    Whenever you want an if then statment to do more than one thing, you MUST have a begin after it. Otherwise it will always Logout no matter if there are 50 tries or not. It is fine if you only have one procedure or function after the statement, but for multiple make sure you have begins and ends.

    Also you might want to make that a NextPlayer(False); as the script messed up and is probably not by the willows if it didnt find it. Through in an Exit after the NextPlayers as well.

    SCAR Code:
    if(Tries = 50)then
    begin
      Writeln ('Willow Logs not found. Switching Players..');
      Logout;
      NextPlayer(False);
      Exit;
    end;

    Good tut though, keep up the good work
    METAL HEAD FOR LIFE!!!

  3. #3
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    I know some of the standards are well... terrible..

    But trying to write scripts in the "New Thread" box is kinda difficult.

    Anyways, that way I can tell if people just copy, the standards would be the same

    Thanks! When dyo think I'll get that SRL Tutorial Writer Award?
    Jus' Lurkin'

  4. #4
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Torrent of Flame View Post
    I know some of the standards are well... terrible..

    But trying to write scripts in the "New Thread" box is kinda difficult.

    Anyways, that way I can tell if people just copy, the standards would be the same

    Thanks! When dyo think I'll get that SRL Tutorial Writer Award?
    Well, when i wrote my tut I had scar open in one window and the tutorial in the other and i just copy and paste directly from scar into the scar tags and it worked perfect for me...of course now that I look back at it my standards have been tweaked since i wrote it

    You can take a look at it if you want...been a long time since I got a reply

    As for the cup, I really didnt expect to get one but Fakawi saw the tut and gave it to me. So if an admin sees your tut and likes it enough then bam you got yourself a cup
    METAL HEAD FOR LIFE!!!

  5. #5
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Woo

    Ill keep posting tutorials =]

    Ill take a look *Pity Checks*

    :P

    Nah im playing.


    Yeah, I had SCAR open, but My WoodCutter has DDTM's and RadialWalk and more complex stuff, so I have to take some of it out and the standards get messed up..
    Jus' Lurkin'

  6. #6
    Join Date
    Apr 2007
    Location
    Michigan -.-
    Posts
    1,357
    Mentioned
    2 Post(s)
    Quoted
    4 Post(s)

    Default

    Quote Originally Posted by Torrent of Flame View Post

    Ill take a look *Pity Checks*
    you bastard. jk jk
    METAL HEAD FOR LIFE!!!

  7. #7
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Hahah. Fuck you :P

    J/p
    Jus' Lurkin'

  8. #8
    Join Date
    Feb 2007
    Posts
    433
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    {/\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\
    |                    WoodCutter Tutorial by Torrent of Flame                   |
    |                           For educational use ONLY                           |
    //\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\\//\}





    program MyFirstWoodCutter;
    {.include SRL/SRL.scar}
    {.include SRL/SRL/Skill/WoodCutting.scar}

    const
    //-->Loads<--\\

    Loads = 10; //How many loads per player before switching

    //--->SRL ID<---\\
    YourSRLId = '';
    YourSRLPassword ='';

    //--->Pin - Make same for ALL chars. If no Pin, leave blank<---\\
    YourPin = '';

    {-------------------------------------------------------
                           Player Setup
    --------------------------------------------------------}


    procedure DeclarePlayers;
    begin

         HowManyPlayers := 1;
         NumberOfPlayers(HowManyPlayers);
         CurrentPlayer:= 0

         Players[0].Name   := 'Username';
         Players[0].Pass   := 'Password';
         Players[0].Nick   := 'erna';
         Players[0].Active := True;

    end;

    {----------------------------Do Not Edit Below This----------------------------}
    var x, y, LoadsNum, LoadsNum2: integer;

    //-----------------------------AntiRandoms/AntiBan----------------------------\\

    Procedure AntiRandoms;
    begin
      If(FindFight)then
      RunAway('N', True,1,15000);
      FindNormalRandoms;
      FindLamp('Woodcutting');
    end;

    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
      case Random(30) of
        1: RandomRClick;
        2: HoverSkill('Woodcutting', False);
        3: RandomMovement;
        4: BoredHuman;
        5: AlmostLogout;
        6: DoEmote(400 +Random(90));
      end;
    end;

    //---------------------------------ChopTree-----------------------------------\\

    procedure ChopTree;
    var CuttingTime: integer;
        Tries: integer;
    begin
      MarkTime(CuttingTime);
      MakeCompass('S');
      repeat
        if FindObjCustom(x, y, ['Wil', 'low'], [1989969, 3760987, 2844763], 7) then
        begin
           Mouse(x,y,0,0,false);
           if(IsUpText('Chop'))then
             Wait(5000 + (random(150)));
             ChooseOption('hop')
             AntiBan;
             if (not (FindObjCustom(x, y, ['Wil', 'low'], [1989969, 3760987, 2844763], 7))) then
               Wait(100+random(100));
               Tries := Tries + 1;
               if(Tries = 50)then
               begin
                 Writeln ('Willow Logs not found. Switching Players..');
                 Logout;
                 NextPlayer(False);
                 Exit;
               end;
           end;
      until(InvFull) or (TimeFromMark(CuttingTime) > 800000+random(60000));
    end;

    //----------------------Walking from Willows to Bank--------------------------\\

    procedure WalkToBank;
    begin
      if (not(LoggedIn)) then
        Exit;
        SymbolAccuracy:= 0.2;
        MakeCompass('N');
        if (FindSymbol(x, y, 'bank')) then
        begin
          Mouse(x, y, 2, 2, true);
          FFlag(0);
          Writeln('Got to bank');
        end;
    end;

    //--------------------------------Banking-------------------------------------\\

    procedure Banking;
    begin
      if (InvFull) then
      begin
        MakeCompass('W')
        Wait (300 + random(160));
        OpenBankQuiet('db');
        if (PinScreen) then
        InPin(YourPin);
          if(FindColorSpiral(x, y, 4155248, 547, 206, 734, 464))then
        begin
         Mouse(x, y, 4, 3, false);
         ChooseOption('All');
         begin
           LoadsNum := LoadsNum + 1;
           LoadsNum2 := LoadsNum2 + 1;
           ReportVars[1] := ReportVars[1] + 1;
           SendSRLReport;
         end;
        end;
       CloseBank;
       Wait(150 + random (278));
       MakeCompass('S');
      end;
    end;

    //Willows to Bank\\

    procedure WalkToWillow;
    begin
      if (FindSymbol(x, y, 'fish')) then
      begin
        Mouse(x, y, 2, 2, true);
        FFlag(0);
        Writeln('Got to Willows');
      end;
    end;

    //SetupScript\\

    procedure SetupScript;
    begin
      SRLId := YourSRLId;
      SRLPassword:= YourSRLPassword;
      SetupSRL;
      ScriptID:= '687';
      DeclarePlayers;
    end;

    //THE MAIN LOOPAGE!\\

    begin
      SetupScript;
      repeat
       WalkToWillow;
       ChopTree;
       AntiBan;
       WalkToBank;
       Banking;
       if (LoadsNum2=Loads) then
        begin
           NextPlayer(True);
           LoadsNum2 := 0;
           MakeCompass('S')
           Writeln('Players Switched successfully')
        end;
      until (false)
    end.

    some things weren't working because you either forgot something (parenthesis, semi-colons, etc.) and the Result = True; thing wouldn't work so I just took it out... you can add it back in if you want

    (yes, I know, this is for educational purposes, but you should at least know if a script works or not ^^)

    SCAR Code:
    if (InvFull) then
      begin

    you don't need that do you?

  9. #9
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Ah. What do you expect? Its just a tutorial.

    Im not perfect. :P
    Jus' Lurkin'

  10. #10
    Join Date
    Feb 2007
    Posts
    433
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  11. #11
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Yeha, but Im fed up with Random adds, so Im not spreading it anymore =]

    I added you anyway. Pwnt_by_pwnt...
    Jus' Lurkin'

  12. #12
    Join Date
    Feb 2007
    Posts
    433
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    O_o how did you get my MSN? and I don't see an add..

  13. #13
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    You told me to add you.
    Jus' Lurkin'

  14. #14
    Join Date
    Jul 2007
    Location
    Ohio
    Posts
    1,103
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I was wondering what the symbol accuracy does and how you find out what number you put there. This was a great tut. rep ++ for you!

  15. #15
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    hmmm nice tuts u makin u on a role eh? i jus noticed from wat i know...i NEVR saw an autofighting tut yet....so therz an idea but yea....w/e u wish to do..

  16. #16
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    I might look into it.

    And Symbol accuracy tells SCAR how close to the image it has of the Bank Symbol it should look for.
    Jus' Lurkin'

  17. #17
    Join Date
    Mar 2008
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Nicely done

  18. #18
    Join Date
    Apr 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    YES! it works!!!

  19. #19
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Lol =P

    Bump
    Jus' Lurkin'

  20. #20
    Join Date
    Apr 2008
    Posts
    89
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Very nice tutorial. I love the clean simple code, definitely a good guide for a newbie making his own tree killer.

  21. #21
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    Wouldnt mind seeing you make one =]

    The rep button is there if you feel like giving me some, its the little tick.

    Note to an admin: IF he feels like it. Im not telling him too?
    Jus' Lurkin'

  22. #22
    Join Date
    Sep 2006
    Location
    include srl/srl.scar ( aussie)
    Posts
    2,875
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    your a lier when i say the post above me im like ' HAVE TO REP TOF' but then i snapped out of it lolz

    anyay i read this tut a while back it tought me sybol clicking`


    tyyy

  23. #23
    Join Date
    Feb 2007
    Location
    South East England
    Posts
    2,906
    Mentioned
    2 Post(s)
    Quoted
    8 Post(s)

    Default

    I see you got Site Supporter Nicbaz ^^
    Jus' Lurkin'

  24. #24
    Join Date
    Sep 2006
    Location
    include srl/srl.scar ( aussie)
    Posts
    2,875
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    had it for like 4 months or something like that, anyway get on MSN n33b been waiting for you for 3 hours lol

  25. #25
    Join Date
    Apr 2007
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the tut, this will help me get some coding back , almost a year ago i did that and almost know nothing anymore

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)

Similar Threads

  1. Woodcutter
    By guinner in forum OSR Help
    Replies: 6
    Last Post: 11-28-2008, 01:30 AM
  2. Need lvl 75 woodcutter.
    By skilld u in forum News and General
    Replies: 14
    Last Post: 02-29-2008, 02:50 AM
  3. Woodcutter
    By TViYH in forum RS3 Outdated / Broken Scripts
    Replies: 6
    Last Post: 10-31-2007, 06:11 AM
  4. Best woodcutter ever!
    By mstandlee in forum RS3 Outdated / Broken Scripts
    Replies: 7
    Last Post: 10-27-2007, 04:40 AM
  5. woodcutter help
    By psychojamesd in forum RS3 Outdated / Broken Scripts
    Replies: 2
    Last Post: 07-27-2007, 02:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •