SRL Archive - OSR Help

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


rcheat6

2013-03-29 15:25:02

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!

rj

2013-03-29 15:49:38

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;

My House

2013-03-29 15:55:32

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.

rcheat6

2013-03-29 17:26:34

From: RJJ95
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.