Page 1 of 2 12 LastLast
Results 1 to 25 of 32

Thread: Checking if the tree is cut down problem..

  1. #1
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default Checking if the tree is cut down problem..

    Okay, so the problem still exists, despite what I said before. I updated the script.

    Hello

    I'm wondering why it's not detecting when the tree has been cut down. I've tried tweaking and messing around with tolerances, box sizes, debugging, etc., but nothing seems to be working.

    It used to work, and I don't know if I changed something or there was an update that made it not work. Either way, I can't seem to find the problem.

    Here are the two functions.

    SCAR Code:
    program DraynorChopNBank;
      {.Include SRL\SRL\Misc\SMART.SCAR}
      {.include SRL\SRL.scar}
      {.include SRL\SRL\Misc\Debug.scar}
     
    var
      NumOfLogs, Loads, TotalProggies : Integer;
      TP : TPoint;
     
    procedure DeclarePlayers;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active := True;//Use this player?
      Players[0].Pin := '';//Bank pin.  Leave blank if you don't have one.
      Players[0].Integers[0] := 000;//How many logs to cut?
      Players[0].Booleans[0] := True;//Is hatchet equiped?
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume'];

     {Players[0].Name := '';
      Players[0].Pass := '';
      Players[0].Nick := '';
      Players[0].Active := True;
      Players[0].Pin := '';
      Players[0].Integers[0] := 000;
      Players[0].Booleans[0] := True;
      Players[0].BoxRewards := ['Xp', 'mote', 'ostume'];}

    end;

    procedure S_FindRandoms;
    begin
      LampSkill := 'woodcutting';
      FindNormalRandoms;
    end;

    function S_LevelUp: Boolean;
    begin
      if FindNPCChatText('ongrat', Nothing)then
      begin
        ClickContinue(True, True);
        Wait(80 + Random(100));
        HoverSkill('woodcutting', True);
        CloseWindow;
        Writeln('Congratulations, you have gained a Woodcutting level!');
        Result := True;
      end;
    end;

    procedure S_MyAntiBan;
    begin
      case Random(70) of
        0: RandomMovement;
        1: BoredHuman;
        2: HoverSkill('random', false);
        3: RandomRClick;
        4: begin
             case Random(2) of
               0: begin
                    MakeCompass(20 + Random(40));
                    MakeCompass(320 - Random(40));
                  end;
               1: begin
                    MakeCompass(50 + Random(30));
                    MakeCompass(300 - Random(30));
                  end;
              end;
           end;
        5: begin
             MakeCompass(80 + Random(20));
             MakeCompass(280 - Random(80));
           end;
        6: begin
             MakeCompass(120 + Random(50));
             MakeCompass(220 - Random(30));
           end;
      end;
    end;

    procedure W_WalkToWillows;
    var
      x, y : Integer;
    begin
      if not LoggedIn then Exit;
      RunEnergy(60);
      MakeCompass('n');
      if RadialWalk(FindWaterColor, 180, 220, 60, 2, 1)then
      begin
        Wait(80 + Random(100));
        Writeln('Walking to Willows.');
        FFlag(0);
      end else
      if FindSymbol(x, y, 'fish')then
      begin
        Wait(80 + Random(100));
        Writeln('Found fishing symbol, walking to Willows.');
        Mouse(x, y + Random(20), 4, 4, True);
        FFlag(0);
      end else
      begin
        Writeln('Couldn''t walk to Willows.');
        Logout;
        Players[CurrentPlayer].Active := False;
      end;
    end;

    function W_BankColor: Integer;
    var
      Bank, x, y : Integer;
    begin
      Bank := DTMFromString('78DA632C6162608866400181DEDE0CFF81342' +
           '310FF0702C62CA09A4454357FFE30313043D58000584D1C116AC2' +
           'F0AB0100EC370F0C');
      if DTMRotated(Bank, x, y, MMX1, MMY1, MMX2, MMY2)then
      begin
        Result := GetColor(x + 15, y);
        Writeln('Bank floor color = ' + IntToStr(Result));
      end else
        Writeln('Didn''t find bank color.');
      FreeDTM(Bank);
    end;

    procedure W_WalkToBank;
    var
      x, y : Integer;
    begin
      if not LoggedIn then Exit;
      RunEnergy(60);
      MakeCompass('n');
      if RadialWalk(W_BankColor, 0, 77, 68, -2, 1)then
      begin
        Wait(80 + Random(100));
        Writeln('Inventory full, walking to bank.');
        FFlag(2);
      end else
      if FindSymbol(x, y, 'bank')then
      begin
        Wait(80 + Random(100));
        Mouse(x, y, 4, 4, True);
        Writeln('Found bank symbol, walking to bank.');
        FFlag(2);
      end else
      begin
        Writeln('Couldn''t walk to bank.');
        Logout;
        Players[CurrentPlayer].Active := False;
      end;
    end;

    procedure Cut_FindHatchet;
    var
      HatchetDTM, x, y : Integer;
    begin
      HatchetDTM := DTMFromString('78DA63CC6664605805C448A0354590811F488' +
           '344FF0301631690B509550D44164602E934206B23013520739611' +
           '50930F642D24A0A61CC85A44404D2990B51ABF1A00963F0CC9');
      if Players[CurrentPlayer].Booleans[0] = True then
        GameTab(5)
      else
        GameTab(4);
      if FindDTM(HatchetDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        Writeln('Found hatchet.')
      else
      begin
        Writeln('Didn''t find hatchet, logging out.');
        Logout;
        Players[CurrentPlayer].Active := False;
      end;
      FreeDTM(HatchetDTM);
    end;

    procedure Cut_WhileChopping;
    var
      ClickTree, NCTime, LastCount : Integer;
    begin
      MarkTime(ClickTree);
      NCTime := 15000 + Random(10000);
      LastCount := InvCount;
      while(InvCount < 28)and LoggedIn do
      begin
        if TimeFromMark(ClickTree) > NCTime then
          if InvCount = LastCount then Break;
        S_MyAntiBan;
        Wait(80 + Random(5000));
        S_LevelUp;
        S_FindRandoms;
      end;
    end;

    function Cut_TreeCutDown: Boolean;
    var
      TPA : TPointArray;
    begin
      if not LoggedIn then Exit;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.11, 0.87);
      FindColorsTolerance(TPA, 7774874, TP.x - 20, TP.y - 20, TP.x + 20, TP.y + 20, 15);
      if(Length(TPA) < 10)then
      begin
        Writeln('Length inside box: ' + IntToStr(Length(TPA)));
        Result := False;
      end;
      SetColorSpeed2Modifiers(0.2, 0.2);
      ColorToleranceSpeed(1);
    end;

    procedure Cut_ChopTrees;
    var
      fx, fy, i, x, y : Integer;
      s : String;
      TPA : TPointArray;
      ATPA : T2DPointArray;
    begin
      if not LoggedIn then Exit;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.11, 0.87);
      repeat
        FindColorsSpiralTolerance(fx, fy, TPA, 7774874, MSX1, MSY1, MSX2, MSY2, 15);
        ATPA := SplitTPAEx(TPA, 5, 5);
        DebugATPA(ATPA, '');
        if Length(ATPA) = 0 then Exit;
        SortATPAFromFirstPoint(ATPA, Point(MSCX, MSCY));

        for i := 0 to High(ATPA) do
        begin
          Writeln('Length:' + IntToStr(Length(ATPA[i])));
          if(Length(ATPA[i]) < 30)then Continue;
          MiddleTPAEx(ATPA[i], fx, fy);
          Wait(30 + Random(20));
          MMouse(fx, fy, 4, 4);
          s := RS_GetUpText;
          if((Pos('hop', s) > 0) and (Pos('illow', s) > 0))then
          begin
            GetMousePos(x, y);
            Wait(80 + Random(100));
            Mouse(x, y, 0, 0, True);
            TP := IntToPoint(x, y);
            repeat
              Cut_WhileChopping;
            until(Cut_TreeCutDown or InvFull);
          end;
        end;
      until(InvFull or not LoggedIn);
      SetColorSpeed2Modifiers(0.2, 0.2);
      ColorToleranceSpeed(1);
    end;

    function B_BankItems: Integer;
    var
      Logs, x, y : Integer;
    begin
      Logs := DTMFromString('78DA630C6364607804C44820C84B96811F48C' +
           '34419C381AC2BA86A60B270358940D675026AA280AC6704D4B803' +
           '598FF1AB0100F99906E6');
      if FindDTM(Logs, x, y, MIX1, MIY1, MIX2, MIY2) then
        Result := CountItems(Logs, 'dtm', []);
      if OpenBank('db', True, True)then
      begin
        if Players[CurrentPlayer].Booleans[0] = True then
        begin
          DepositAll;
          CloseBank;
          NumOfLogs := NumOfLogs + Result;
          Inc(Loads);
        end else
        begin
          Deposit(2, 28, True);
          CloseBank;
          NumOfLogs := NumOfLogs + Result;
          Inc(Loads);
        end;
       
        if(NumOfLogs >= Players[CurrentPlayer].Integers[0])then
        begin
          Writeln('Cut desired number of logs, logging out.');
          Wait(80 + Random(100));
          Logout;
          Players[CurrentPlayer].Active := False;
        end;
      end else
      begin
        Wait(80 + Random(100));
        Writeln('Couldn''t find bank booth, logging out.');
        Logout;
        Players[CurrentPlayer].Active := False;
      end;
      FreeDTM(Logs);
    end;

    {*******************************************************************************
     function Prg_PlayerActivity(i: integer): string;
     By: Drags111
     Description: Determines whether the player is active or not.
     *******************************************************************************}


    function Prg_PlayerActive(i : Integer): String;
    begin
      if Players[i].Active then Result := 'T' else Result := 'F';
    end;

    procedure Prg_ProgReport;
    var
      i : Integer;
    begin
      Inc(TotalProggies);
      Players[i].Integers[9] := Loads;
      Players[i].Integers[10] := NumOfLogs;
      Writeln(' _______________________________________________');
      Writeln(PadR('|          Draynor Willow Chop N'' Bank', 48) + '|');
      Writeln('|______________________V.4______________________|');
      Writeln('|                                               |');
      Writeln(PadR('|  Time run: ' + TimeRunning, 48) + '|');
      Writeln(PadR('|  Loads: ' + IntToStr(Loads), 48) + '|');
      Writeln(PadR('|  Logs: ' + IntToStr(NumOfLogs), 48) + '|');
      Writeln(PadR('|  Exp Gained: ' + FloatToStr(NumOfLogs * 67.5), 48) + '|');
      Writeln('|_______________________________________________|');
      Writeln('|________________Player''s Stats_________________|');
      Writeln('|      Nick      T/F      Loads      Logs       |');
      Writeln('|      ¯¯¯¯      ¯¯¯      ¯¯¯¯¯      ¯¯¯¯       |');
      for i := 0 to High(Players)do
        Writeln('|      ' + PadR(Players[i].Nick, 10) + PadR(Prg_PlayerActive(i), 9)
                          + PadR(IntToStr(Players[i].Integers[9]), 11)
                          + PadR(IntToStr(Players[i].Integers[10]), 11) + '|');
      Writeln('|_______________________________________________|');
    end;

    procedure F_Setup;
    begin
      //ClearDebug;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
    end;

    begin
      F_Setup;
      repeat
        SetAngle(True);
        repeat
          Cut_FindHatchet;
          begin
            W_WalkToWillows;
            Cut_ChopTrees;
            W_WalkToBank;
            B_BankItems;
            Prg_ProgReport;
          end;
        until(NumOfLogs >= Players[CurrentPlayer].Integers[0])or(not LoggedIn);
        NextPlayer(LoggedIn);
      until AllPlayersInactive;
    end.

    If you know the problem that'd be awesome. It's probably something small that is just passing right through me.

    Thanks.
    Last edited by Coh3n; 06-23-2009 at 10:17 AM.

  2. #2
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Your Cut_TreeCutDown function might not be working as you'd like. Maybe its picking up the grass colour or other objects as well and thinking the tree is still there when it actually isn't.

  3. #3
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    Your Cut_TreeCutDown function might not be working as you'd like. Maybe its picking up the grass colour or other objects as well and thinking the tree is still there when it actually isn't.
    Hmm yeah that's possible, I guess I can try some different colors. Thanks.

    If anyone else has any suggestions, please post.

    Thanks.

    EDIT: Lol I heard some guy say "WATWATINDABUTT" on XBox Live the other day, reminded me of you,

  4. #4
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    Hmm yeah that's possible, I guess I can try some different colors. Thanks.

    If anyone else has any suggestions, please post.

    Thanks.

    EDIT: Lol I heard some guy say "WATWATINDABUTT" on XBox Live the other day, reminded me of you,
    If you really want to you could start experimenting with color tolerance speeds and hue/sat modifiers. They'll solve your problems for sure.

  5. #5
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by ZephyrsFury View Post
    If you really want to you could start experimenting with color tolerance speeds and hue/sat modifiers. They'll solve your problems for sure.
    Okay, thanks! I'll do that as you seem to be pretty sure that will work.

  6. #6
    Join Date
    Jan 2007
    Location
    Nomming bits in your RAM
    Posts
    385
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    Okay, thanks! I'll do that as you seem to be pretty sure that will work.
    *points to *SCAR*\Includes\SRL\Scripting Tools\Auto Color Aid v2*

    Set CTS to 2, pick a color, mark it, and change the Hue/Sat/Tol mods and see how accurate you get.
    Current Project: Catching up. XD. Potentially back for the summer, depending on how things go.

  7. #7
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    Okay, thanks! I'll do that as you seem to be pretty sure that will work.
    If you wanna come on IRC or add me on msn I'll explain it the best I can.

    Basically what Macro_FTW said ^.

  8. #8
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Macro_FTW View Post
    *points to *SCAR*\Includes\SRL\Scripting Tools\Auto Color Aid v2*

    Set CTS to 2, pick a color, mark it, and change the Hue/Sat/Tol mods and see how accurate you get.
    Quote Originally Posted by ZephyrsFury View Post
    If you wanna come on IRC or add me on msn I'll explain it the best I can.

    Basically what Macro_FTW said ^.
    Awesome, guys, thanks.

  9. #9
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Sorry for the double post, but the problem still exists, and I know my colors and tolerances and modifiers could be wrong, but I've tried many different times and I'm tired.

    Open for any suggestions from anyone.

    Thanks.

  10. #10
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    How many colours are you using?

    Tried using DebugTPA to see what you are picking up?

    Lost your mind sitting in that shack yet?
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  11. #11
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    How many colours are you using?

    Tried using DebugTPA to see what you are picking up?

    Lost your mind sitting in that shack yet?
    Ehm, yes I have lost my mind, I'm ready to kill myself any day now.

    And, yes I have tried DebugTPA, and it looks fine. Also, I'm using one color.

  12. #12
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I'd try it with a few colors..

  13. #13
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    @99_ - I was afraid someone was going to say that.

  14. #14
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Coh3n View Post
    Ehm, yes I have lost my mind, I'm ready to kill myself any day now.

    And, yes I have tried DebugTPA, and it looks fine. Also, I'm using one color.
    Like, did you use ACA to find a few colours, or?
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  15. #15
    Join Date
    Apr 2008
    Location
    Marquette, MI
    Posts
    15,252
    Mentioned
    138 Post(s)
    Quoted
    680 Post(s)

    Default

    Quote Originally Posted by Nava2 View Post
    Like, did you use ACA to find a few colours, or?
    Yeah, I used ... I think ... 4 colors.

  16. #16
    Join Date
    Jan 2008
    Location
    California, US
    Posts
    2,765
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Did you mark all the found colors? Did it pick up the grass?

  17. #17
    Join Date
    Apr 2007
    Location
    Perth, Australia
    Posts
    3,926
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    SCAR Code:
    function Cut_TreeCutDown: Boolean;
    var
      TPA : TPointArray;
    begin
      if not LoggedIn then Exit;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.11, 0.87);
      FindColorsTolerance(TPA, 7774874, TP.x - 20, TP.y - 20, TP.x + 20, TP.y + 20, 15);
      if(Length(TPA) < 10)then
      begin
        Writeln('Length inside box: ' + IntToStr(Length(TPA)));
        Result := False; //True?
      end;
      SetColorSpeed2Modifiers(0.2, 0.2);
      ColorToleranceSpeed(1);
    end;

    Wouldn't you want to set the Result to True if the tree was cut down?

    Also you'd want to check if the tree was cut down in here too, wouldn't you?

    SCAR Code:
    procedure Cut_WhileChopping;
    var
      ClickTree, NCTime, LastCount : Integer;
    begin
      MarkTime(ClickTree);
      NCTime := 15000 + Random(10000);
      LastCount := InvCount;
      while(InvCount < 28)and LoggedIn do
      begin
        if (Tree_TreeCutDown) then Break;  //This?
        if TimeFromMark(ClickTree) > NCTime then
          if InvCount = LastCount then Break;
        S_MyAntiBan;
        Wait(80 + Random(5000));
        S_LevelUp;
        S_FindRandoms;
      end;
    end;

    You also have two loops for no reason:

    SCAR Code:
    repeat  //Loop in Cut_ChopTrees
              Cut_WhileChopping;
            until(Cut_TreeCutDown or InvFull);

    and a loop in Cut_WhileChopping.
    Last edited by ZephyrsFury; 06-23-2009 at 02:22 PM.

  18. #18
    Join Date
    Feb 2009
    Posts
    1,447
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    in Cut_WhileChopping
    SCAR Code:
    while(InvCount < 28)and LoggedIn do
    LMFAO
    What if the tree is cut down and invcount is less than 28?

    Im almost shitting my pants reading my post!!!
    Last edited by TRiLeZ; 06-23-2009 at 02:21 PM.

  19. #19
    Join Date
    Oct 2007
    Location
    Denmark
    Posts
    409
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by TRiLeZ View Post
    in Cut_WhileChopping
    SCAR Code:
    while(InvCount < 28)and LoggedIn do
    LMFAO
    What if the tree is cut down and invcount is less than 28?

    Im almost shitting my pants reading my post!!!
    Did you also read this line:
    SCAR Code:
    if InvCount = LastCount then Break;

  20. #20
    Join Date
    Feb 2009
    Posts
    1,447
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Frt View Post
    Did you also read this line:
    SCAR Code:
    if InvCount = LastCount then Break;
    Ya I did.
    After 15-25 seconds it will check if InvCount = LastCount

    By that time you should have gained a log so for example

    When entering WhileCutting LastCount gets set to lets say 7.
    15-25 seconds after it checks the InvCount and you should have gained a log so InvCount = 8

    8 dosnt equal 7 so it dosnt break!!

    Make sence? It just stays in the loop

  21. #21
    Join Date
    Oct 2007
    Location
    Denmark
    Posts
    409
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by TRiLeZ View Post
    Ya I did.
    After 15-25 seconds it will check if InvCount = LastCount

    By that time you should have gained a log so for example

    When entering WhileCutting LastCount gets set to lets say 7.
    15-25 seconds after it checks the InvCount and you should have gained a log so InvCount = 8

    8 dosnt equal 7 so it dosnt break!!

    Make sence? It just stays in the loop
    Exactly.
    It counts the logs before entering the loop and when 15-25 seconds have passed it counts them again. Now, imagine that the tree had been chopped, that would cause us to not get any logs, wouldn't it?
    Then the count would equal the last count which would cause it to break the loop.
    So yes, it does break.

  22. #22
    Join Date
    Feb 2009
    Posts
    1,447
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Frt View Post
    Exactly.
    It counts the logs before entering the loop and when 15-25 seconds have passed it counts them again. Now, imagine that the tree had been chopped, that would cause us to not get any logs, wouldn't it?
    Then the count would equal the last count which would cause it to break the loop.
    So yes, it does break.
    If you were a noobish woodcutter it would break because a lot of other people cutting the willow, resulting in you getting none. If there were no other cutters cutting the tree, you would get some logs, making the script loop forever. Most people can get 1 or more logs out of a willow before it get chopped down though.

    When using this script, you must never gain a log in order for it to not get stuck in a loop.

  23. #23
    Join Date
    Oct 2007
    Location
    Denmark
    Posts
    409
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by TRiLeZ View Post
    If you were a noobish woodcutter it would break because a lot of other people cutting the willow, resulting in you getting none. If there were no other cutters cutting the tree, you would get some logs, making the script loop forever. Most people can get 1 or more logs out of a willow before it get chopped down though.

    When using this script, you must never gain a log in order for it to not get stuck in a loop.
    Well, now you're forgetting about the Invcount < 28.
    This will never be a infinite loop.
    He checks if the inventory is full, he's checks if the character is logged in, and if it's more than 25 seconds since last gained log it will move on.

  24. #24
    Join Date
    Feb 2009
    Posts
    1,447
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by Frt View Post
    Well, now you're forgetting about the Invcount < 28.
    This will never be a infinite loop.
    He checks if the inventory is full, he's checks if the character is logged in, and if it's more than 25 seconds since last gained log it will move on.
    No if its 15-25 seconds cutting and you havnt gained a log it will break
    If you have gained a log and it isnt the last thing in your inv, it will loop forever unless it keeps cutting until your inv is full.

  25. #25
    Join Date
    Oct 2007
    Location
    Denmark
    Posts
    409
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by TRiLeZ View Post
    No if its 15-25 seconds cutting and you havnt gained a log it will break
    If you have gained a log and it isnt the last thing in your inv, it will loop forever unless it keeps cutting until your inv is full.
    Oops, my bad, sorry. Just reread it and yeah, that function will cause an infinite loop.
    Rep+ for begin smarter than me

Page 1 of 2 12 LastLast

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
  •