Bitshift Posted January 4, 2016 Share Posted January 4, 2016 (edited) For some odd reason, no matter the method of trying to return the player's current health (percent or current). a weird value is returned. I'm accessing the getter through a private API instance, so it's being called as follows: api.myPlayer().getHealthPrecent(); OR api.myPlayer().getHealth(); OR api.myPlayer().getCurrentHealth(); All of these return odd values. As an example, the account I've been testing scripts with has 13 HP, but getCurrentHealth() returns a different value than that. Any ideas on what could be causing this? Edited January 4, 2016 by Bitshift Quote Link to comment Share on other sites More sharing options...
Vilius Posted January 4, 2016 Share Posted January 4, 2016 well, why not just use getSkills().getDynamic(Skill.HITPOINTS); ? :xdoge: Quote Link to comment Share on other sites More sharing options...
Bitshift Posted January 4, 2016 Author Share Posted January 4, 2016 well, why not just use getSkills().getDynamic(Skill.HITPOINTS); ? I suppose that will suffice for now. I would still like to know if this is a fault on my end or some hooks are not working properly at the moment. Quote Link to comment Share on other sites More sharing options...
Vilius Posted January 4, 2016 Share Posted January 4, 2016 I suppose that will suffice for now. I would still like to know if this is a fault on my end or some hooks are not working properly at the moment. Well you didn't tell us what values it was returning tho, which makes it harder to know whats up with it. Quote Link to comment Share on other sites More sharing options...
blm95 Posted January 4, 2016 Share Posted January 4, 2016 Health returns odd values if the HP bar is not rendered, so I assume you were not in combat? Quote Link to comment Share on other sites More sharing options...
Joseph Posted January 5, 2016 Share Posted January 5, 2016 (edited) For some odd reason, no matter the method of trying to return the player's current health (percent or current). a weird value is returned. I'm accessing the getter through a private API instance, so it's being called as follows: api.myPlayer().getHealthPrecent(); OR api.myPlayer().getHealth(); OR api.myPlayer().getCurrentHealth(); All of these return odd values. As an example, the account I've been testing scripts with has 13 HP, but getCurrentHealth() returns a different value than that. Any ideas on what could be causing this? those methods all fall back to the health bar your character displays on top of its head when in combat. SO for example if you are fighting and you can see it. You will get the right values. If the hp bar goes way and you eat food. It will still have the old value instead of the new updated values. When the hp bar Is visible again the value gets updates. Edited January 5, 2016 by Joseph Quote Link to comment Share on other sites More sharing options...