Results 1 to 9 of 9

Thread: Techniques for Yew cutter?

  1. #1
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Question Techniques for Yew cutter?

    Okay, I haven't been on the SRL forums since quite a while ago, I've been primarily standing on my own as far as scripting goes.

    In short, I want to expand my techniques, and I want to make a script cut Yews. I'm not sure exactly how to use DTM, TPointArray, etc.

    I've gone through all of the tutorials I can find, and none of them really help me because the best thing I can script is one that fixes the compass using a constant or two.

    If anyone can help me, it would be greatly appreciated. Don't get me wrong, those tutorials were great. They just look too advanced for me.
    ~Zeek
    Last major script: November 2009
    Attempted to rejoin: January 2011
    Rejoining: [][][][][]
    Current task: writing basic alching script

  2. #2
    Join Date
    Jan 2008
    Location
    Frankfurt, Germany
    Posts
    742
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Erm... the problem is, that they simply are advanced (well, at least TPA)... explaining everything about them would take up a huge ammount of time, and, well, it would be hard to make it more basic than it is in the other tuts...
    It'd be a lot easier if you read through a tut, and ask about certain parts which you don't understand...
    There is nothing right in my left brain and there is nothing left in my right brain.

  3. #3
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    You dont have to use a DTM or TPA to find and Cut down a Yew tree. Dont worry so much about what method you use, just make sure it works good.

    For Instance!

    This:
    SCAR Code:
    function FindIt : Boolean;
    var
     X, Y : Integer;
    begin
      if not LoggedIn then
        Exit;
      if FindObjTPA( X, Y,[1120794, 1187104], 5, 3, 1, 1, 1, 'hest') then
      begin
        Mouse(X, Y, 0, 0, False);
        Wait(RandomRange(50, 100));
        ChooseOption('earch');
        Result := True;
        Inc(Times);
        Status('');
          Exit;
      end else
        Exit;
    end;

    Will do the same thing as this:
    SCAR Code:
    function SearchForTraps : Boolean;
    var
      Colors: TIntegerArray;
       X, Y, I, A, H : Integer;
      TPA : TPointArray;
      ATPA : T2DPointArray;
    begin
      if (not (LoggedIn)) then
        Exit;
      Status('Searching For Traps');
      Colors := [1120794, 1187104, 1385254, 1253154, 1910059, 1054744, 1451047];
      for I := 0 to High(Colors) do
      begin
        FindColorsSpiralTolerance(MSCX, MSCY, TPA, Colors[I], MSX1, MSY1, MSX2, MSY2,0);
        if Length(TPA) = 0 then Continue;
        ATPA := TPAtoATPAEx(TPA, 5, 5);
        H := High(ATPA);
        for A := 0 to H do
          if MiddleTPAEx(ATPA[A], X, Y) then
          begin
            MMouse(X, Y, 3, 3);
            Wait(RandomRange(50, 100));
            if Pos('hest', RS_GetUpText) > 0 then
            begin
              GetMousePos(X, Y);
              Mouse(X, Y, 0, 0, False);
              Wait(RandomRange(50, 100));
              ChooseOption('earch');
              Result := True;
              Inc(Times);
              EAmt := RuneAmount('inv', 'nature');
              ECAmt := CoinAmount('inv');
              NatAmt := (EAmt - SAmt);
              CAmt := (SCAmt - ECAmt);
              ColorToleranceSpeed(GCTS);
              Status('');
                Exit;
            end;
          end;
      end;
    end;

    The first one is wayy more simple, but they will both have the same out come (Theoretically).
    Last edited by NCDS; 04-27-2009 at 11:40 PM.

  4. #4
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    except that the first one doesn't count runes in inv :>

  5. #5
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Haha. Okay, I suppose that as long as I don't have to fully learn TPA to be able to bot woodcutting. Man, yews are annoying. :P

    Edit: I tried NCDS's first method:
    Quote Originally Posted by NCDS
    SCAR Code:
    function FindIt : Boolean;
    var
      X, Y : Integer;
    begin
      if not LoggedIn then
        Exit;
      if FindObjTPA( X, Y,[1120794, 1187104], 5, 3, 1, 1, 1, 'hest') then
        begin
          Mouse(X, Y, 0, 0, False);
          Wait(RandomRange(50, 100));
          ChooseOption('earch');
          Result := True;
          Inc(Times);
          Status('');
          Exit;
        end else
          Exit;
    end;
    ...and here's my outcome.
    SCAR Code:
    program BotYews;
    {.include SRL/SRL.scar}
    var
      x, y: Integer;
    procedure SetupLoop;
    begin
      SetupSRL;
      ClearDebug;
    end;
    procedure SetupScreen;
    begin
      MakeCompass('N');
      Wait(500+random(500));
      SetAngle(true);
      Wait(500+random(500));
    end;
    function FindYew: Boolean;
    begin
        if not LoggedIn then
          Result := False;
          Exit;
        if FindObjTPA(x, y, [1198139, 5544845], 5, 121, 115, 1, 'ew') then
          Begin
            Mouse(x, y, 1, 1, true);
            Wait(RandomRange(500, 100));
            Result := True;
            Status('');
          end;
    end;
    procedure Proggie;
    begin
      WriteLn('   _____________________   ');
      WriteLn(' /~~~~~~~~~~~~~~~~~~~~~~~\ ');
      WriteLn('|~~~~Zeeky111 presents~~~~|');
      WriteLn('|~~~~~Program BotYews~~~~~|');
      WriteLn('|~~~~~~~~~~~~~~~~~~~~~~~~~|');
      WriteLn('|~(c)2009:Shawn Lutch~~~~~|');
      WriteLn('|~~~(Zeeky111)~~~~~~~~~~~~|');
      WriteLn(' \~~~~~~~~~~~~~~~~~~~~~~~/ ');
      WriteLn('----Script has finished----');
    end;
    begin
      SetupLoop;
      SetupScreen;
      FindYew;
      Proggie;
    end;

    ...and I get this error:

    Quote Originally Posted by the debug box
    Line 22: [Error] (16228:64): Invalid number of parameters in script C:\Program Files\SCAR 3.15\Scripts\Skills\WC (proto).scar
    Last edited by zeeky111; 04-28-2009 at 05:33 AM. Reason: Error...
    ~Zeek
    Last major script: November 2009
    Attempted to rejoin: January 2011
    Rejoining: [][][][][]
    Current task: writing basic alching script

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

    Default

    You had forgotten a paramater in the FindObjTPA. Play with this. This works. You don't need the result := False. Booleans are set to false by default.
    SCAR Code:
    function FindYew: Boolean;
    begin
        if not LoggedIn then
          Exit;
        if FindObjTPA(x, y, 1198139, 5, 121, 115, 1, 5, ['ew', 'Yew']) then
          begin
            Mouse(x, y, 1, 1, true);
            Wait(RandomRange(500, 100));
            Result := True;
            Status('');
          end;
    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.


  7. #7
    Join Date
    Mar 2009
    Location
    About six feet off the ground.
    Posts
    95
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah, okay.
    Man, I kept checking those freaking parameters until I was sure...
    Oh, well! Ha ha, thanks, Camo Kyle.

    EDIT: Okay, I played with it for a bit. How would I work that into a script that waits for it to reappear after disappearing?
    I know it can be done... I just can't figure it out.
    I guess I've just been kind of scratching at the surface, because all of the "while not"s, the "while"s, and the "if, then" statements just aren't seeming to do the job.
    Last edited by zeeky111; 05-02-2009 at 02:46 PM.
    ~Zeek
    Last major script: November 2009
    Attempted to rejoin: January 2011
    Rejoining: [][][][][]
    Current task: writing basic alching script

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

    Default

    Here is a fairly simple cut tree procedure :
    SCAR Code:
    procedure CutTree;
    var
     A : Integer;
    begin
      MakeCompass('N');
      if (not LoggedIn) then
        Exit;
      MouseSpeed := RandomRange(13, 16);
      if FindObjTPA(x, y, {Color}, 30, 2, 15, 25, 10, {UpText}) then
        begin
        repeat
          FindObjTPA(x, y, {Color}, 30, 2, 15, 25, 10, {UpText})
          Wait(100 + Random(300));
          MMouse(x, y, 2, 2);
          begin
            Wait(100 + Random(200));
            GetMousePos(x, y);
            FindEnt(x, y, True);
            Wait(100 + Random(200));
            case Random(2) of
              0  :  begin
                      Mouse(x, y, 4, 4, False);
                      Wait(100 + Random(200));
                      ChooseOption('hop');
                      GetMousePos(x, y);
                    end;
              1  :  begin
                      Mouse(x, y, 4, 4, True);
                      GetMousePos(x, y);
                    end;
            end
            Wait(2000 + Random(400));
            FindObjTPA(x, y, {Color}, 30, 2, 15, 25, 10, {UpText})
            MMouse(x, y, 2, 2);
            FindObjTPA(x, y, {Color}, 30, 2, 15, 25, 10, {UpText})
        until Invfull or not FindObjTPA(x, y, {Color}, 30, 2, 15, 25, 10, {UpText});
          if Invfull then
            begin
              {Put code here}
            end;
        end;
        while (not FindObjTPA(x, y, {Color}, 30, 2, 15, 25, 10, {UpText})) do
        repeat
          MakeCompass('S');
          Wait(3000 + Random(1500));
          if (not FindObjTPA(x, y, {Color}, 30, 2, 15, 25, 10, {UpText})) then
            begin
              MakeCompass('N');
              Wait(3000 + Random(1500));
            end;
          if (not FindObjTPA(x, y, {Color}, 30, 2, 15, 25, 10, {UpText})) then
            Inc(A);
        until FindObjTPA(x, y, {Color}, 30, 2, 15, 25, 10, {UpText}) or (A = 4);
        if (A = 4) then
          begin
            WriteLn('Couldn''t find Tree :(');
            {If you're using multiplayer, you can use the NextPlayer() here}
          end;
    end;

    Hope this helps

    ~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
    NSW, Australia
    Posts
    2,823
    Mentioned
    3 Post(s)
    Quoted
    25 Post(s)

    Default

    BUT you need to learn walking yourself.. Because then that proves you know to script.

    Walking isnt that hard example Edgeville Yew trees would be the easiest place to walk due to the distance.

    Ive made 2 tutorials for DDTM and Radialwalk. If you cant understand them.. wow u must fail english more then me. (i got 1 1/2 out of 15 in my test).

    No walking no Yew cutter .

    Goodluck.

    DDTM Tut - http://www.villavu.com/forum/showthread.php?t=32608
    Radialwalk Tut - http://www.villavu.com/forum/showthread.php?t=11584

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
  •