Jump to content
shadowrecon

Tree Checking method hat do u guys think?

Recommended Posts

Here my tree checking method ive been trying to find a new way to do it,i n my willow chopper i used a wait time between checking inventory and if new > old then it waited again but it ran into problems like if the tree died when u got ur last log it would stand there for ur wait time before moving on. since there are only 2 yew trees i figured i could use findobj since it has up text, anyone have any ideas, this has been buggin me to figure out a smarter method of finding if there tree is still alive or not.

 

Procedure CheckingTree;
Var
X,Y,T,Tries:integer;
TreeAlive: Boolean;
begin
T := GetSystemTime + 60000
Tries := 0;
 Repeat
   begin
     inc(Tries);
     SetColorSet(2,PickedColorHue[Color],PickedColorSat[Color]);
     TreeAlive := FindObjSpiral(X,Y,PickedColor[color],PickedColorTol[color],10,10,['hop do','down ye','Yew']);
     ColorToleranceSpeed(1);
       If (TreeAlive = True) then
         begin
           Status('Oh what fun.. Just Chopping is!');
           Wait(2000);
         end else If (TreeAlive = False) then
           begin
             Status('Looking for New Tree');
             SpiltTheDifference;
             waitRR(250,450);
             ChangeDir;
             Tries := 30;
             exit;
           end;
   end;
 until (GetSystemTime > T) or (Tries = 30) or (InvFull = True);
  exit;
end;

Edited by shadowrecon
Link to comment
Share on other sites

How do you expect it to determine if there is a tree if your already waiting for it.

 

Take out the wait. use findcolor if nots ( You dont need to click or even move your mouse over it , just check and use If Nots with a RY checking above your spot making sure it finds another color.

Better than a wait.....

 

 

Also even to be sure for a catch you could take the ground color and if you move your mouse RY make sure uptext. dont need to click it either jsut be there.

 

 

There is many ways to do this, of course you will need minor waits but its better than standing there for like a minute. ( exageration )

Link to comment
Share on other sites

there is only a 2 second wait.. and this function will be called after the tree has been clicked, if i just used findcolor it could possibly find the tree trunk color and be standing there for 60 seconds, this method works pretty good but i was seeing if anyone had anything to add for additional fail-safes, i have 3 different fail-safes on that function, a timeout, a looped through 30 times, and a invfull which can all call an end to the function.

 

Thank for the ideas tho, i need to add some anti-ban so the mouse isnt just hover over the color until its gone tho. I did end up adding another function to this and it checks for the tree stump color which adds another fail-safe =)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...