Hi, is there a method or function that gets the players current hp or hp percentage or something like that.
cheers![]()
Hi, is there a method or function that gets the players current hp or hp percentage or something like that.
cheers![]()
GetMMLevels('hp', {var} color) gets the Hp at the MM icon, then use your max hp to calculate the percent. Alternatively get the hp percent from the combat tab (hover over the hp bar), or calculate it based on the amount of green pixels on the bar.
GetMMLevels works for 07?

You may have to change the coords around a little bit:
Simba Code:Program testP06;
{$I SRL/SRL.Simba}
{$I SRL/SRL/Misc/Debug.Simba}
{$I P07Include.Simba}
Const
YourHealth = 10;
var
GreenP,RedP,MyHP:Integer;
Health,HealthPercent,AllP,HpPercentMissing,Missing_Health:Extended;
PercentHP:Extended;
Procedure ShowHealth;
Begin
if (RedP < 1) or (GreenP < 1) Then
Begin
Exit;
End;
AllP := (RedP + GreenP);
HpPercentMissing := (RedP/AllP);
Missing_Health := (MyHP*HpPercentMissing);
Health := ((MyHp) - (Missing_Health));
PercentHP := ((RedP/AllP)*100);
Writeln('I have about ' + ToStr(Health)+ ' HP left');
Writeln('Percent:' + ToStr(PercentHP));
End;
Procedure WriteColors;
Begin
Writeln('Green:' + IntToStr(GreenP));
Writeln('Red:' + IntToStr(RedP));
End;
Procedure CountColors;
Begin
GreenP := CountColorTolerance(65280,245,140,281,154,3);
RedP := CountColorTolerance(255,245,140,281,154,3);
End;
Begin
SetupP07Include;
ActivateClient;
Wait(500);
P06_MakeCompassNorth;
P07_MakeCameraAngleHigh;
MyHP := YourHealth;
CountColors;
WriteColors;
ShowHealth;
End.
There is a function called HPPercent in SRL-OSR...
Miner & Urn Crafter & 07 Chicken Killer
SPS BlindWalk Tutorial
Working on: Nothing
teacher in every art, brought the fire that hath proved to mortals a means to mighty ends
Miner & Urn Crafter & 07 Chicken Killer
SPS BlindWalk Tutorial
Working on: Nothing
teacher in every art, brought the fire that hath proved to mortals a means to mighty ends
under SRL-OSR do you mean the unofficial 07-include or is there sth else I dont know about?
E: Downloaded the include from Github and also placed the fonts uploaded here: http://villavu.com/forum/showthread.php?t=98324 to C:/Simba/Fonts, but... I still get this error:Simba Code:[Error] C:\Simba\Includes\SRL-OSR/SRL/core/text.simba(805:13): Unknown identifier 'UpChars07' at line 804
What should I do about it?
Last edited by l6bustank; 03-17-2013 at 02:00 PM.
There are currently 1 users browsing this thread. (0 members and 1 guests)