Results 1 to 10 of 10

Thread: Any way to create an isChopping Boolean?

  1. #1
    Join Date
    May 2013
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Any way to create an isChopping Boolean?

    I want a boolean or something that says when chopping do this. How would I make this?

  2. #2
    Join Date
    Jun 2012
    Posts
    4,867
    Mentioned
    74 Post(s)
    Quoted
    1663 Post(s)

    Default

    Check out Flight's tutorial on using Pixelshift: http://villavu.com/forum/showthread.php?t=74090

  3. #3
    Join Date
    Sep 2012
    Posts
    270
    Mentioned
    4 Post(s)
    Quoted
    97 Post(s)

    Default

    You could make the time between clicking the tree and a log added to your inv as isChopping and then just if(isChopping) then (...)

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

    Default

    Quote Originally Posted by denart5 View Post
    You could make the time between clicking the tree and a log added to your inv as isChopping and then just if(isChopping) then (...)
    The problem with that is is that the times always vary, so you'll get false negative.

    @OP, I'd definitely follow BMWxi's advice
    <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.

  5. #5
    Join Date
    Dec 2011
    Location
    U.S.A.
    Posts
    635
    Mentioned
    5 Post(s)
    Quoted
    249 Post(s)

    Default

    If it is EOC, you could count the xp bar total, have a wait, and if it gains xp in that amount of time, it returns a true. if not, it returns a false. I have used this method a few times.

  6. #6
    Join Date
    Sep 2012
    Posts
    270
    Mentioned
    4 Post(s)
    Quoted
    97 Post(s)

    Default

    Quote Originally Posted by Rich View Post
    The problem with that is is that the times always vary, so you'll get false negative.

    @OP, I'd definitely follow BMWxi's advice
    Yes the time varies but I mean that it returns true untill the log is added to the inv.

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

    Default

    Quote Originally Posted by denart5 View Post
    Yes the time varies but I mean that it returns true untill the log is added to the inv.
    What about when the tree has been cut? It would return true because it would be waiting for a log to be added, but that wouldn't happen because there's no tree.
    <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.

  8. #8
    Join Date
    Sep 2012
    Posts
    270
    Mentioned
    4 Post(s)
    Quoted
    97 Post(s)

    Default

    Quote Originally Posted by Rich View Post
    What about when the tree has been cut? It would return true because it would be waiting for a log to be added, but that wouldn't happen because there's no tree.
    It could check if the tree is still there every x secs but what Sawyer suggested is way better I guess.

  9. #9
    Join Date
    May 2007
    Location
    knoxville
    Posts
    2,873
    Mentioned
    7 Post(s)
    Quoted
    70 Post(s)

    Default

    pixelshift is the only way to go, there's an entire include file just for checking if your player is animating.
    <TViYH> i had a dream about you again awkwardsaw
    Malachi 2:3

  10. #10
    Join Date
    Apr 2013
    Location
    Las Vegas
    Posts
    111
    Mentioned
    1 Post(s)
    Quoted
    35 Post(s)

    Default

    An effective method is to like as everyone said use pixelshift. This is function I use:

    Simba Code:
    Function isChopping: Boolean;
      var
        PBox: TBox;
      begin
        PBox := IntToBox(MSCX - 20, MSCY - 35, MSCX + 20, MSCY + 10);;
        Result := (AveragePixelShift(PBox, 250, 500) > 90);
        Report(true);
        SMART_DrawBoxEx(false, false, PBox, clRed);
        //writeln(IntToStr(AveragePixelShift(PBox, 250, 500)));
      end;

    Directly jacked from INeedBot's AIOChopper.


    There HAVE been false positives caused by people around you, but for the most part is a effective and reliable.

    Another method off the top of my head is to click the tree and while having your cursor over the tree wait for the uptext to change. When the uptext disappears it means the tree has been cut down.

    The only issue to this is how you are going to get your cursor over the tree. If you click it from a few squares away, the position of the tree on the page changes and it may come out from under the cursor. You could then use say findobj to find it, but if there are multiple trees then it may move the cursor over the wrong one.

    A combination of both methods can be utilized for damn near 100% accuracy.

    If you are working on a magic tree chopper, you may need to teach your cursor to move slightly every 3 minutes to prevent being logged out. Only if you are in one of the few areas without several other people.

    <Offtopic>

    I am assuming you are making a woodcutter so I am going to post my ent detection code here for you.

    The Function

    Simba Code:
    Procedure FindEnt;
    begin

      if (not (IsUpText('hop'))) then
      begin
      writeln  ('Error: Cursor must be on the tree!');
      Exit;
      end;

         if (CountColorTolerance(65535,82, 5, 110, 23, 55) > 20) then
         begin
         writeln ('An ent has been detected, getting off...');
         Mmouse(643, 84, 3, 3);
         Clickmouse2(mouse_left);
         writeln ('Waiting a moment for the ent to go away...');
         wait(randomrange(20000,25000));
         end;

    end;

    Function Usage (please don't use findobj. just an example.)
    Simba Code:
    if ((not(isuptext('Mag'))) AND (FindObjCustom (x, y, ['Mag', 'agic'], [6130056, 3692372, 1988429], 3))) then
    begin
    writeln ('Moving cursor to the active magic tree...');
    MMouse(x, y, 3, 3);
    end;

    FindEnt;

    </Offtopic>
    Last edited by bob_dole; 06-13-2013 at 01:34 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
  •