At the moment i use InFight, but it gives false results when there are others fighting near me. Should i use PixelShift?
Any other ideas how to detect if in fight? Thanks in advance![]()
At the moment i use InFight, but it gives false results when there are others fighting near me. Should i use PixelShift?
Any other ideas how to detect if in fight? Thanks in advance![]()
There used to be something meaningful here.
Check for hp bar right above your head.
It seems odd that SRL's current InFight wouldn't just search a box above your char's head. Hmmm..
You could try out some Animation.scar functions though![]()
Last edited by NCDS; 02-07-2010 at 09:30 AM.
There used to be something meaningful here.
Still wont work properly, here are the colors im using:
All counts combined should result in 90+.SCAR Code:9984 //Green outline 1
10496 //Green outline 2
198716 //Red outline 1
There used to be something meaningful here.
Search for hp bar colors in that box. Don't count colors though.
Yeah great idea, this is what i came up with:
Works 100%SCAR Code:function F_InFight: Boolean;
var x, y: Integer;
begin
Result := False;
if ( FindColorTolerance( x, y, 49499, 258, 137, 272, 164, 2 ) ) then
Result := True;
end;
EDIT: Restarted scar etc and now it stopped working. Whats going on with my color finding functions
EDIT2: The search area must be wider because the hits get on the way.
EDIT3: This is the final function, works good (now that my color finding works lol).
SCAR Code:function F_InFight: Boolean;
var x, y: Integer;
begin
Result := FindColorTolerance( x, y, 49499, 226, 118, 262, 147, 40 );
end;
Last edited by Frement; 02-07-2010 at 02:59 PM.
There used to be something meaningful here.
By "color counting" findcolor... Is what I meant. Just seemed easier to explain then the feared TPA . Also
you may want to have an amount to compare it to. Currently it will return true if it finds that color at all. Where as if you put result := findcolor() > 30;
that would mean that if it finds the color on more than 30 pixels in your search box it will result true. It's just sort of a failsafe. Play with that a bit.
Last edited by NCDS; 02-07-2010 at 03:15 PM.
Yeah did that, works flawlessly
SCAR Code:function F_InFight: Boolean;
var GTPA, RTPA: TPointArray;
begin
FindColorsTolerance( GTPA, 49499, 226, 118, 262, 147, 20 );
FindColorsTolerance( RTPA, 590010, 226, 118, 262, 147, 20 );
Result := ( ( GetArrayLength( GTPA ) + GetArrayLength( RTPA ) ) >= 20 );
end;
Last edited by Frement; 02-07-2010 at 06:00 PM.
There used to be something meaningful here.
There are currently 1 users browsing this thread. (0 members and 1 guests)