Results 1 to 18 of 18

Thread: Noobish Willow Chopper

  1. #1
    Join Date
    Mar 2009
    Location
    Antaractica, Penguin Drive
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Noobish Willow Chopper

    Willow Chopper


    Features:
    • Chops Willows
    • Banks Willows
    • Half Decent Antiban


    Updates:
    • Added SMART
    • Dark Arcana fixed my standards
    • Camo Kyle fixed WalkToTrees procedure
    • R1ch helped with AntiRandoms
    • All That Is Man helped with Tree Cutting procedure
    Last edited by CowFish; 05-03-2009 at 08:53 PM.

  2. #2
    Join Date
    Mar 2009
    Location
    Illinois
    Posts
    292
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Good start mate but you should use some more failsafes

    I would change:
    SCAR Code:
    procedure KillaWilla;
    begin
     if not LoggedIn then Exit;
       repeat
       if FindObj(x, y,'illow',WillowColor, 10) then
         begin
           Mouse(x, y, 2, 3, True);
           Wait(2000 + Random(800));
         end;
       until(InChat('full to'));
    end;
    to
    SCAR Code:
    procedure KillaWilla;
    begin
     if not LoggedIn then Exit;
       repeat
       if FindObj(x, y,'illow',WillowColor, 10) then
         begin
           Mouse(x, y, 2, 3, True);
           Wait(2000 + Random(800));
         end;
       until(InvFull) <----Changed this line
    end;
    just incase someone says something it might not catch it, also in the procedure above its going to keep on clicking on the same tree over and over. So you might want to change that.

  3. #3
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    First of all, not a bad script. Simple and decent for a first one. Here are some things to help :

    1) Your walk to willows procedure looks for the bank symbol. You need to change it to tree.
    Change :
    SCAR Code:
    procedure WalkToWillows;
    begin
      if not LoggedIn then Exit;
      symbolAccuracy := 0.5;
      if FindSymbol(x, y, 'bank') then
      Mouse(x-33, y+33, 6, 6, True);
    end;
    To :
    SCAR Code:
    procedure WalkToWillows;
    begin
      if(not LoggedIn)then
        Exit;
      symbolAccuracy := 0.5;
      if FindSymbol(x, y, 'tree') then
        Mouse(x-33, y+33, 6, 6, True);
    end;

    2) Why would you log out if the player is logged in?

    3) You kinda have a multiplayer going, but you only have one set in the Declare Players.

    4) Work on standards.

    Overall, not a bad script. You're getting it. Here is the changed version

    SCAR Code:
    program WillaKilla;
    {.include SRL\SRL.scar}
    {.include SRL\SRL\skill\WoodCutting.scar}

    const
      WillowColor = 330249;//Color of Willow; Change this if it won't work.
      LoadsPerPlayer = 5;//Loads Per Player(Self-Explanatory) :)

    var
      x, y, CurrentLoads: Integer;
     
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := '';//Name of Player
      Players[0].Pass := '';//Password of Player
      Players[0].Nick := '';//3-4 letters from Player's name
      Players[0].Active := True;
    end;

    procedure AntiBan;
    begin
      if(not LoggedIn)then
        Exit;
        case Random(36) of
          0..5  : RandomRClick;
          6..12 : HoverSkill('woodcutting', False);
          13..17: BoredHuman;
          18..24: PickUpMouse;
          25..31: RandomMovement;
          32..36: Wait(1750 + Random(500));
      end;
    end;

    procedure ProgressReport;
    begin
      WriteLn('********************************');
      WriteLn('');
      WriteLn('Tree Chopper! :)');
      WriteLn('');
      WriteLn('Worked for ' + TimeRunning);
      WriteLn('********************************');
    end;

    procedure KillaWilla;
    begin
     if(not LoggedIn)then
      Exit;
       repeat
       if FindObj(x, y, 'illow', WillowColor, 10) then
         begin
           Mouse(x, y, 2, 3, True);
           Wait(2000 + Random(800));
         end;
       until(InChat('full to'));
    end;

    procedure WalkToBank;
    begin
      if(not LoggedIn)then
        Exit;
      SetRun(True);
      symbolAccuracy := 0.5;
      if FindSymbol(x, y, 'bank') then
        Mouse(x, y, 4, 4, True);
    end;

    procedure BankWillows;
    begin
      if(not LoggedIn)then
        Exit;
      OpenBankQuiet('db');
      DepositAll;
      CloseBank;
      Inc(CurrentLoads);
    end;

    procedure WalkToWillows;
    begin
      if(not LoggedIn)then
        Exit;
      symbolAccuracy := 0.5;
      if FindSymbol(x, y, 'tree') then
        Mouse(x-33, y+33, 6, 6, True);
    end;

    begin
      SetUpSRL;
      DeclarePlayers;
      LoginPlayer;
      repeat
        WalkToWillows;
        KillaWilla;
        WalkToBank;
        BankWillows;
        AntiBan;
        Wait(3000);
        ProgressReport;
        if CurrentLoads = LoadsPerPlayer then
          NextPlayer(true);
        if(not LoggedIn)then
          NextPlayer(false);
      until IsFKeyDown(12);
    end.

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  4. #4
    Join Date
    Feb 2007
    Location
    Alberta,Canada
    Posts
    2,358
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    your walking looks very similiar to that of cycrosism's, you should maybe think of crediting him (if it is similar/his). But thats just me, so if I'm wrong then I apologize.
    “Ignorance, the root and the stem of every evil.”

  5. #5
    Join Date
    Feb 2009
    Location
    Philipines
    Posts
    600
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try adding this to procedure declareplayers
    SCAR Code:
    Players[X].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

    That solves the reward box from a random event, and also try to learn how to add anti randoms they are not very hard to add.

  6. #6
    Join Date
    May 2007
    Location
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    Quote Originally Posted by Dark Arcana View Post
    Try adding this to procedure declareplayers
    SCAR Code:
    Players[X].BoxRewards  := ['mote', 'ostume', 'XP', 'Gem', 'ithril', 'oal', 'une', 'oins'];

    That solves the reward box from a random event, and also try to learn how to add anti randoms they are not very hard to add.
    No need to know that as a beginner. Its not a bad script very simple. Add Antirandoms, and learn more advances techniques of scripting then youll be a good scripter.

    Also you could add an axe finder and stuff.

  7. #7
    Join Date
    Mar 2009
    Location
    Antaractica, Penguin Drive
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Okay guys thanks for all the advice on it and I will change the walking procedure as well. I would of tried to do Antirandoms but I thought those were broken? Also, is there a way for it to slightly randomize when it clicks the tree so that it doesn't click the same spot over and over?

    Oh Camo also there is no Tree symbol at Draynor, but I could make it utilize the fishing symbol instead.
    Last edited by CowFish; 05-01-2009 at 05:17 AM.

  8. #8
    Join Date
    Oct 2008
    Location
    C:\Simba\Includes\
    Posts
    7,566
    Mentioned
    19 Post(s)
    Quoted
    180 Post(s)

    Default

    Quote Originally Posted by banditmeow View Post
    Okay guys thanks for all the advice on it and I will change the walking procedure as well. I would of tried to do Antirandoms but I thought those were broken? Also, is there a way for it to slightly randomize when it clicks the tree so that it doesn't click the same spot over and over?

    Oh Camo also there is no Tree symbol at Draynor, but I could make it utilize the fishing symbol instead.
    Eh, well I don't play RS. So I tried lol. Good luck bro

    ~Camo
    Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
    { MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }

    When posting a bug, please post debug! Help us, help you!

    I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
    If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.


    SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.


  9. #9
    Join Date
    May 2007
    Location
    England
    Posts
    4,140
    Mentioned
    11 Post(s)
    Quoted
    266 Post(s)

    Default

    Yes, you could use the Fishing symbol, as that is right near the trees.

    Anti-randoms are not broken, just add something like this to your script:
    SCAR Code:
    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
      case Random(150) of
        0: RandomRClick;
        1: BoredHuman;
        2: HoverSkill('Attack', False);
      end;
    end;

    procedure AntiRandoms;
    begin
      if not LoggedIn then Exit;
      FindNormalRandoms;
      if FindFight then
      RunAway('W', True, 1, 5000 + Random(2500));
      AntiBan;
    end;
    <3

    Quote Originally Posted by Eminem
    I don't care if you're black, white, straight, bisexual, gay, lesbian, short, tall, fat, skinny, rich or poor. If you're nice to me, I'll be nice to you. Simple as that.

  10. #10
    Join Date
    Mar 2009
    Location
    Antaractica, Penguin Drive
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Where in the main loop do antirandoms go?

  11. #11
    Join Date
    Feb 2009
    Location
    Philipines
    Posts
    600
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I fixed your standards.

  12. #12
    Join Date
    Mar 2009
    Location
    Antaractica, Penguin Drive
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Yay thanks I sorta understand standards but not completely... never used them in my days of php and html. Anyways thanks again I'll update the one in the first post. Added SMART also cause that stuff is the bomb

  13. #13
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Try using TPA's for tree finding
    Atleast that's what I'm doing in my script. I also have an auto axe-detector 'n stuff
    Ce ne sont que des gueux


  14. #14
    Join Date
    Mar 2009
    Location
    Antaractica, Penguin Drive
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I don't know much about TPAs but I was wondering if it would be possible for me to include reflection and use GetAnimation to see when the character is chopping a tree, and at that time, perform AntiBan and AntiRandoms, and when the animation stops, it could find a new tree. But I would make the AntiBan very small so it does not always happen such as:

    Code:
    procedure AntiBan;
    begin
      if not LoggedIn then Exit;
       case Random(125) of
         1:RandomRClick;
         2:BoredHuman;
         3:AlmostLogout;  
         4:HoverSkill(Woodcutting, False);
       end;
    end;

  15. #15
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    Using reflection gives you less chance of getting SRL members, but makes the script work better...
    IMO reflection isn't needed. My script is 100% colour and just checks the UpText of the tree you're chopping, if the uptext doesn't contain "hop" (from Chop) switch trees.
    Ce ne sont que des gueux


  16. #16
    Join Date
    Mar 2009
    Location
    Antaractica, Penguin Drive
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Good point I was more planning on using reflection as a sort of, let's say "safety net" in future scripts where more walking would be involved. I don't wanna overdo it with reflection but I would just like to use it to get the character's location and help get it back on track, or for the purposes of animation. I would probably try to use RadialWalk though I haven't gotten it working yet.

  17. #17
    Join Date
    Feb 2009
    Location
    Philipines
    Posts
    600
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    If you are trying to apply for membership with this script try reading this TPA/ATPA tutorial.

  18. #18
    Join Date
    Mar 2009
    Location
    Antaractica, Penguin Drive
    Posts
    140
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks for the tutorial but no I don't think I will try to get membership yet I'm going to work on my scripting skills first

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
  •