Results 1 to 21 of 21

Thread: Seer Yew Woodcutter

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

    Cool Seer Yew Woodcutter

    This is the first time I've ever attempted writing a script.. So warning, there are bugs. No where near as buggy as it was before, please post any bugs.

    What it does:
    Cuts Yew trees in Seer's Village, banks, and repeats.

    Things that need to be done:
    --Script currently just runs to the western yew trees, when they are not there the script does not have anything to chop down and in turn just waits for the trees to respawn. I'm not 100% positive how to implement walking to separate trees when they're gone, and will look into it tomorrow.
    --Bank Pin Support
    --Failsafes -- Failsafed chopping trees, walking + banking needs it.

    Known Problem(s):
    Clicks the tree more then one time when trying to cut it down.
    Only chops western trees.


    Current Version: 1.0
    Update Log:
    1/17/11: Script Released
    1/18/11: Fixed walking to and from bank.
    1/19/11: Walking completely redone with ObjectDTMs
    1/23/11: Fix'd the script, no longer in beta. Version 1.0 released.

    In order to use the script, please download: ObjDTMs
    Simba Code:
    program Seers_Yews;
    {$DEFINE SMART}
    {$DEFINE PAINT}
    {$i srl/srl/misc/smart.simba}
    {$i SRL/srl.simba}
    {$i SRL\SRL\Misc\PaintSmart.simba}
    {$i ObjectDTM\ObjDTMInclude.simba}

       {var
        x,y: Integer;
        Walk,WalkYew,Walk2,Walk3:Array[0..120] of Integer;
        aFound:Extended;}

      //const
       // Bank_CT = 'clt'
      var
      AngleHigh: integer;

     Procedure DeclarePlayers;
      begin
        HowManyPlayers := 1;
        NumberOfPlayers(HowManyPlayers);
        CurrentPlayer := 0;
        with Players[0] do
        begin
          Name         := ''; //Username
          Pass         := '';   //Password
          Pin          := '';       //Pin
          BoxRewards   := ['XP','xp','lamp']; //Reward
          LampSkill    := 'Woodcutting';     //What to use Gene Lamp on
          Active       := True;
        end;
      end;

      procedure Antiban;
      begin
        if(not(LoggedIn))then
        Exit;
        case Random(500) of
        0:
        begin
          HoverSkill('Woodcutting', false);
          wait(1000+Random(200));
        end;
        10: PickUpMouse;
        20: BoredHuman;
        30: RandomMovement;
        40:
        begin
          MakeCompass('S');
          wait(125+random(100));
          MakeCompass('N');
          wait(75+random(100));
          MakeCompass('N');
          FindNormalRandoms;
        end;
        50: MakeCompass('Random');
      end;
     end;
      //procedure WalkToNewTree;

      procedure ChopTree;
      var x,y,colorz: integer;
      begin
        if(InvFull) then
          Exit;
        repeat
          FindNormalRandoms;
          AntiBan;
          MakeCompass('N');
          SetAngle(AngleHigh);
            if FindObjCustom(x,y,['ew','hop','own'],[2182722,5474683,1654580],5) then
              begin
                Writeln('Found Yew Tree chopping now..');
                Wait(550+random(500));
                Mouse(x,y,4,4,true);
                ChooseOption('hop');
                  repeat
                    wait(250+random(250));
                  until not IsUpTextMultiCustom(['hop','ew']) or (InvCount=28);
                    end else Writeln('Cannot find Yew Tree.. Walking to new tree..');
                      begin
                        ObjDTM_Walk('117:83:5:1:7:74:67:0:7:116:52:1:7:123:119:1:7:53:128:1:7:74:87',0,100,80,true);
                        Wait(500+random(275));
                      end;
            if FindObjCustom(x,y,['ew','hop','own'],[2182722,5474683,1654580],5) then
              begin
                Writeln('Found Yew Tree chopping now..');
                Wait(550+random(500));
                Mouse(x,y,4,4,true);
                ChooseOption('hop');
                  repeat
                    wait(250+random(250));
                  until not IsUpTextMultiCustom(['hop','ew']) or (InvCount=28);
              end else Writeln('Cannot find Yew Tree.. Walking to new tree..');
                begin
                  ObjDTM_Walk('38:77:4:1:7:36:62:1:7:116:62:1:7:121:126:5:7:38:118',0,100,80,true);
                end;
                  begin
                    if IsUpTextMultiCustom(['ead,ak,agic,aple']) then
                      ObjDTM_Walk('128:133:5:1:7:55:66:1:7:102:56:0:7:98:80:1:7:120:119:1:7:28:113',0,100,80,true);
                  end;
        Antiban;
      until(InvFull);
     end;

     procedure WalkToYew;  //Thanks for the help in IRC (Euphemism, [J]ustin)
      begin
        if(InvEmpty) then
        Writeln('Inventory is empty, walking to Yews.');
      begin
        if ObjDTM_WalkPath(['73:113:4:10:7:66:70:0:7:83:87:8:7:90:120:5:7:30:100','64:139:5:5:7:40:67:0:7:95:56:1:7:126:71:1:7:82:127:8:7:65:114','57:119:5:0:7:47:88:8:7:69:62:0:7:134:83:1:7:98:126:3:7:29:103', '36:81:5:0:7:71:52:8:7:97:66:1:7:78:118:5:7:33:119:1:7:30:68'],0,100,80,false,true) then
        Writeln('Arriving at Yews.');
        begin
        wait(250 + random(250));
          MakeCompass('n');
        end;
     end;
    end;

      procedure WalkToBank;
      begin
      if(InvFull) then
        Writeln('Inventory is full, walking to bank..');
      begin
        if ObjDTM_WalkPath(['97:61:6:1:7:37:63:0:7:79:47:8:7:106:61:1:7:87:115:5:7:61:115:3:7:39:96', '106:28:4:1:7:104:100:1:7:23:88:0:7:66:51:1:7:112:58', '84:36:4:1:7:82:95:0:7:44:108:1:7:58:55:1:7:110:58', '88:63:5:1:7:34:36:1:7:109:46:1:7:106:105:1:7:55:103:5:7:41:75'],0,100,80,false,true) then
          Writeln('Arriving at Camelot bank.');
        begin
        wait(250+random(250));
        Antiban;
        MakeCompass('N');
      end;
      end
    end;

       { procedure Bank
     begin
     if(Invfull)then
      //begin
       repeat
     Writeln('Inventory full, banking.')
        OpenBank('clt',True,True)
       Wait(250+random(100));
        if PinScreen then
          InPin(Players[CurrentPlayer].Pin);
          Until(BankScreen);
        //if(PinScreen)then InPin(Players[CurrentPlayer].Pin);
        //if(bankscreen)then
         //if BankScreen
          Depositall;
     CloseBank;
     end;
     //end;}


     procedure Banking;
     begin
      if(InvFull) then
        begin
          SetAngle(AngleHigh);
            repeat
              WriteLn('Inventory full, banking.');
              OpenBankNPC;
                if(PinScreen)then
                  InPin(Players[CurrentPlayer].Pin );
                if(BankScreen) then
                  DepositAll;
                  CloseBank;
            until(InvEmpty);
       end;
    end;

    begin
      Smart_Server := 12;
      Smart_Members := True;
      Smart_Signed := True;
      Smart_SuperDetail := False;
      SetupSRL;
      ActivateClient;
      ObjDTM_Setup;
      ClearDebug;
      DeclarePlayers;
      if not(LoggedIn) then
      LogInPlayer;
      repeat
      WalkToYew;;
      ChopTree;
      WalkToBank;
      Banking;
      until(false);
      //repeat
      //NextPlayer(True);
      //until(AllPlayersInactive);
    end.
    Last edited by jatex; 01-27-2012 at 07:15 PM.

  2. #2
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Congratulations on your first script! How well does that walking work for you? If I might make a suggestion, ObjectDTMs might prove to be superior here.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  3. #3
    Join Date
    Oct 2006
    Posts
    371
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    This is a MUCH better script than my first script, I'll admit that! You're on a good track right now. Just a little challenge for you, try implementing multi-player support, or make the script available for free to play locations. I would be more than happy to test it for you, but unfortunately I do not have a member account to use.

    Best of luck, maybe once this script is stable and fully functional, you could apply with it! Looks very promising.

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

    Default

    Thanks for the link Flight, once he finishes his guide on Walking+Paths I will be surely replacing my current methods with those.

    Thanks Sebo
    I will work on multi-player support once walking is perfected and I actually figure out how to chop effectively.. As well, I plan on adding the Yews by Draynor, or maybe GE.

  5. #5
    Join Date
    Oct 2007
    Location
    If (Online) then Loc := ('On comp') else Loc := ('Somewhere else!');
    Posts
    2,020
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Really good first script congrats, you seem like a good aqaintence to have to the SRL members if this is your first released script, I would like to see what you can do when you are fully aquainted, and upto scratch with the internals of the SRL include.

    As Flight says take alook at better walking methods as that dont seem praticual and seems like the way we use to do it back in 2007 lol when i first styarted here everyone seemed to use walking like that.

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

    Default

    Fixed the walking and the script now waits when the two western trees are down..
    Thanks Scaper

    I'll look further into the walking.. Currently I'm only using DTM and it doesn't have any fail safes implemented (yet..)

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

    Default

    Updated it.. A LOT.

    Thanks Flight for the Object DTM suggestion.

  8. #8
    Join Date
    Dec 2011
    Posts
    126
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nice bot but need one thing and it will own do it skiller support so you can use other axe end bronze and beginner

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

    Default

    It can use any axe as long as it's weilded prior to the bot being started. Do you mean as the bot levels up, it switches axes?

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

    Default

    This makes no sense? My character will start chopping at the tree and then it will just run away before it even starts. Then it repeats that same process and doesn't even chop one yew.

  11. #11
    Join Date
    Dec 2011
    Posts
    126
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    but a lvl 3 can't weilded a dragon axe so it only for other with 60 at it good for not skillers

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

    Default

    Quote Originally Posted by jordaneddy View Post
    This makes no sense? My character will start chopping at the tree and then it will just run away before it even starts. Then it repeats that same process and doesn't even chop one yew.
    Will fix it, was working on a different script.

    I'll will post again when script is working.

    Fix'd!

    Quote Originally Posted by hader dem2 View Post
    but a lvl 3 can't weilded a dragon axe so it only for other with 60 at it good for not skillers
    If people want it, I'll try to add support.
    Last edited by jatex; 01-23-2012 at 05:29 AM.

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

    Default

    Update: Script is running great now.

    Failsafes for walking need to be added and I will do that tomorrow.
    Last edited by jatex; 01-23-2012 at 05:28 AM.

  14. #14
    Join Date
    Jan 2012
    Posts
    45
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I don't know how to add scripts, I'm sad!

  15. #15
    Join Date
    Nov 2011
    Posts
    46
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by TheGamer666 View Post
    I don't know how to add scripts, I'm sad!
    You simply download the script at the bottom of the op and save it under simba/scripts(I believe).
    Op: Nice 1st script going to try to learn a bit from it

  16. #16
    Join Date
    Nov 2011
    Posts
    93
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'm getting this Error:
    C:\Simba\Includes\ObjectDTMUNClude.simba<447:11>: Du
    plicate identifier 'SMART_CLEARCANVAS' at line 446.

    Help plz!

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

    Default

    Quote Originally Posted by chelmid View Post
    I'm getting this Error:
    C:\Simba\Includes\ObjectDTMUNClude.simba<447:11>: Du
    plicate identifier 'SMART_CLEARCANVAS' at line 446.

    Help plz!
    You need to download ObjDTMs

    This can be found here: http://villavu.com/forum/showthread.php?t=68112


    Also, thanks FailedPure :P.

  18. #18
    Join Date
    Jan 2012
    Posts
    56
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Error: Out Of Range at line 1768
    The following DTMs were not freed: [SRL - Lamp bitmap, 1]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Flag bitmap]

    1768 -if (ObjDTM_Walk(Path[i - 1], 0, 100, 10, GroundLevel) and (not Reset)) then

  19. #19
    Join Date
    Nov 2011
    Posts
    93
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by jatex View Post
    You need to download ObjDTMs

    This can be found here: http://villavu.com/forum/showthread.php?t=68112


    Also, thanks FailedPure :P.

    I downloaded OBJ DTMs.same ERROR comes.

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

    Default

    Great Script i will post a proggie tomorrow

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

    Default

    Doesn't work...

    [Error] (30:36): Type mismatch at line 29
    Compiling failed.

    This is what is on line 29..
    LampSkill := 'Woodcutting'; //What to use Gene Lamp on
    Last edited by exilednoob; 02-09-2012 at 01:45 AM.

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
  •