Results 1 to 4 of 4

Thread: [AutoFighter] AIO Fighter with Health detection. Release in comments!

  1. #1
    Join Date
    Mar 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default [AutoFighter] AIO Fighter with Health detection. Release in comments!

    Hey guys.

    New here, first downloaded [07] AIO Fighter Release [0.1] - SMART Compatible and started tweaking it.
    So far I have implemented a health checker and two low health alert functions.

    I'd like to make this modification public, however I'd like to add a little bit more functionality for babysitting first.

    What I'm trying to do:
    Send alerts for different randoms. The quicker you deal with a random, the quicker you can get back to training.
    Currently I can only tell there is a random when I get low health alerts, notifying me that it is killing my toon.

    Does anyone want to share a code blob that just searches the screen for a particular color? Ill do the work behind properly identifying the randoms.

    Once I get the code blob I will probably be able to implement and upload it by the end of the day!

    Much appreciated!

  2. #2
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Simba Code:
    Function Click: Boolean;
    Var
      tmpCTS,i, L,Counter: Integer;
      ObjTPA: TPointArray;
      ObjATPA: T2DPointArray;
      X,Y,DMCount,Moves: Integer;
    Begin
      Moves:=0;
      DMCount:=0;

      tmpCTS := GetToleranceSpeed;
      SetColorToleranceSpeed(2);
                      // set sat and hue mod's
      SetToleranceSpeed2Modifiers(0.06, 0.41);
      // color and tol
      FindColorsTolerance(ObjTPA, 3172740, MSX1, MSY1, MSX2, MSY2, 4);
      // splits colors into little box like things :)
      SplitTPAWrap(ObjTPA, 10, ObjATPA);

      SortATPAFromFirstPoint(ObjATPA, Point(MSCX,MSCY));
      SetColorToleranceSpeed(tmpCTS);
      // sets mod's back to defualt
      SetToleranceSpeed2Modifiers(0.02, 0.02);
      DMCount:=RandomRange(3,5);
      // sets amount of boxes to amount found (objATPA)
      L := High(ObjATPA)
      MarkTime(Counter);
      // repeats for how ever many boxes there are
      For i := 0 To L Do
        Begin
          MiddleTPAEx(ObjATPA[i], X, Y);

          Repeat Begin

            Moves:=Moves+1;
            mmouse(x, y, 5, 5);
            Wait(RandomRange(140, 200));
            // hovers over area, if the correct uptext is there it clicks and exits
            // if not it goes to the next area
            If (P07_IsUpTextMultiCustom(['Use','Bank boo', 'Bank booth'])) Then
            Begin
              clickmouse2(mouse_Left);
              Exit;
            End;
          End; Until (Moves > DMCount) Or (TimeFromMark(Counter) > 5000)
         Break;
        End;
      Result:=False;
    End;

  3. #3
    Join Date
    Mar 2013
    Posts
    10
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Its not clicking fast enough, when the mob is dead. and PLus it sometimes eats food when its not meant to even though i've done everything correct.

  4. #4
    Join Date
    Mar 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Quote Originally Posted by RJJ95 View Post
    Simba Code:
    Function Click: Boolean;
    Var
      tmpCTS,i, L,Counter: Integer;
      ObjTPA: TPointArray;
      ObjATPA: T2DPointArray;
      X,Y,DMCount,Moves: Integer;
    Begin
      Moves:=0;
      DMCount:=0;

      tmpCTS := GetToleranceSpeed;
      SetColorToleranceSpeed(2);
                      // set sat and hue mod's
      SetToleranceSpeed2Modifiers(0.06, 0.41);
      // color and tol
      FindColorsTolerance(ObjTPA, 3172740, MSX1, MSY1, MSX2, MSY2, 4);
      // splits colors into little box like things :)
      SplitTPAWrap(ObjTPA, 10, ObjATPA);

      SortATPAFromFirstPoint(ObjATPA, Point(MSCX,MSCY));
      SetColorToleranceSpeed(tmpCTS);
      // sets mod's back to defualt
      SetToleranceSpeed2Modifiers(0.02, 0.02);
      DMCount:=RandomRange(3,5);
      // sets amount of boxes to amount found (objATPA)
      L := High(ObjATPA)
      MarkTime(Counter);
      // repeats for how ever many boxes there are
      For i := 0 To L Do
        Begin
          MiddleTPAEx(ObjATPA[i], X, Y);

          Repeat Begin

            Moves:=Moves+1;
            mmouse(x, y, 5, 5);
            Wait(RandomRange(140, 200));
            // hovers over area, if the correct uptext is there it clicks and exits
            // if not it goes to the next area
            If (P07_IsUpTextMultiCustom(['Use','Bank boo', 'Bank booth'])) Then
            Begin
              clickmouse2(mouse_Left);
              Exit;
            End;
          End; Until (Moves > DMCount) Or (TimeFromMark(Counter) > 5000)
         Break;
        End;
      Result:=False;
    End;


    Awesome post, going to spend a few hours pondering this and collecting random data. (now I know to grab their uptext!). Will post the information I gather later if someone wants to help code as well.

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
  •