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
  • Get other players equipment


    Dorkinator

    Recommended Posts

    5 minutes ago, LostVirt said:

    Well depends how you want to find the other player..

    Seems like the way you got their exact hitpoints before has been deprecated and could only find health precent.
    I guess you could do something like this:

    
    Player enemy = Players.closest(p -> p != null && p.getComposite().getAppearance()[1] == 1337);
    int health = enemy.getHealthPercent();

    this also seems to work, but now i'm a bit confused. i thought that maybe the 1337 in the first one was just something you put as a placeholder for the item id that i'm looking for, but its in the second snippit too, what does it do?

    Link to comment
    Share on other sites

    Just now, LostVirt said:

    you are correct, its a placeholder.
    same here,  you could change how you want to filter out players :)

    oh cool, so i can just leave it as that for the enemy health one? just noticed your pfp btw, love it

    Link to comment
    Share on other sites

    sorry for all the questions btw, i dropped dreambot for a while and just picked it back up yesterday, so i kinda have to relearn a lot of stuff

    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.