lazarbeam Posted March 2, 2013 Share Posted March 2, 2013 (edited) Returns value of HP via stats game tab (Would not work for HP > 99, but does work for 1 and 2-digit HP levels) I had considered making a function that can obtain all current and base player stats, but saw little reason. Get HP Function GetHP:Integer; Begin If(RS07_LoggedIn)Then Begin If(Not(RS07_GameTabOpen(1)))Then RS07_OpenGameTab(1); Result := StrToInt(GetTextAtEx(645, 210, 0, RS07_StatFont, False, False, 0, 2, 65535, 2, True, tr_AllChars)); end; end; Get HP Percentage (Rounded to integer) Function GetHpPercentage:Integer; var cur,base:Integer; Begin If(RS07_LoggedIn)Then Begin If(Not(RS07_GameTabOpen(1)))Then RS07_OpenGameTab(1); cur := StrToInt(GetTextAtEx(645, 210, 0, RS07_StatFont, False, False, 0, 2, 65535, 2, True, tr_AllChars)); base:= StrToInt(GetTextAtEx(657,222, 0, RS07_StatFont, False, False, 0, 2, 65535, 2, True, tr_AllChars)); If(base>0)Then Result:=Round(100*cur/base); end; end; Edited March 2, 2013 by lazarbeam Quote Link to comment Share on other sites More sharing options...
Janilabo Posted March 2, 2013 Share Posted March 2, 2013 Very nice contribution man! Good job, lb. -Jani Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted March 3, 2013 Share Posted March 3, 2013 Yes. Wow, excellent! Quote Link to comment Share on other sites More sharing options...