Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • How to tell if fighting enemy with 0hp?


    PapaH

    Recommended Posts

    I've tried quite a few different methods of trying to tell if your fighting an enemy with 0hp and nothing seems to work. Any hints? Thank you.

    Link to comment
    Share on other sites

    if (getLocalPlayer().getCharacterInteractingWithMe().getHealthPercent() < 20)

    This is what I'm trying to use, but if enemy health hits 0, it no longer recognizes the enemy as fighting.

    Even if I use the game explorer. The NPC is removed from the list when it hits 0 HP even if the enemy isn't dead.

    Link to comment
    Share on other sites

    14 hours ago, BeepBoopBop said:

    Once an enemy is killed, "Character.exists()" returns false. There's probably a better way to get this info, but it's what I've been using.

    The enemies I'm fighting are still alive and fighting at 0 hp, I tried Character.exists() too, but it seems like the api removes the npc is removed from the game explorer even tho it still exists

    Link to comment
    Share on other sites

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.