powerbot/RSBot-API — pull request #425 by Ploo (2012-07-10 17:35:28+00:00)
Title: I have found Character#getHpPercent to result in rounding errors. I had ...

...multiple scenarios where an NPC had 4/650 lifepoints yet the method returned 0 and the script claimed the npc was dead. Although I am stumbled as to how such a rounding error would occur looking at the method.

The most obvious solution to this is to simply introduce Character#getHpRatio the way it should be. I'm not sure why a method to return it as a percentage even exists.