..a NPC is in a fight
..a NPC is in a fight
....
Off my clan war fighter.
Simba Code:Function Fighting( T: Tpoint): Boolean;
//Finds If hp bar is present around the given point 'T', I use it to check If other is in fight.
Var
OFX, OFY: Tpoint;
HPMod: Integer;
Begin
HPMod := 100 * ( T.Y - MSCY) / MSY2;
OFX := IntToPoint( T.X - 25, T.X + 25);
OFY := IntToPoint( T.Y - ( 100 + HPMod), T.Y);
If OFX.X < 0 Then
OFX.X := 0;
If OFY.X < 0 Then
OFY.X := 0;
Result := FindColorSpiralTolerance( T.X, T.Y, 52606, OFX.X, OFY.X, OFX.Y, OFY.Y, 39) OR FindColorSpiralTolerance( T.X, T.Y, 327842, OFX.X, OFY.X, OFX.Y, OFY.Y, 25);
End;
It look for hp bar around the possible areas for a monster that equal or smaller than a normal player, (so if you have like a corp beast or jad it wouldn't work that well).
The color might still work, if not just update it with the current color of the green and red (in hp bar).
Last edited by Main; 12-13-2011 at 09:52 PM.
Oh Hai Dar
srl_inFight?
EDIT:'d
Away for awhile, life is keeping me busy. | Want to get my attention in a thread? @Kyle Undefined; me.
{ MSI Phoenix || SRL Stats Sigs || Paste || Scripts || Quotes || Graphics }
When posting a bug, please post debug! Help us, help you!
I would love to change the world, but they won't give me the source code. || To be the best, you've got to beat the rest. || Logic never changes, just the syntax.
If you PM me with a stupid question or one listed in FAQ, or about a script that is not mine, I will NOT respond.
SRL is a Library of routines made by the SRL community written for the Program Simba. We produce Scripts for the game Runescape.
There are currently 1 users browsing this thread. (0 members and 1 guests)