Jump to content
View in the app

A better way to browse. Learn more.

OSBot :: 2007 OSRS Botting

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to get NPCs hitpoints

Featured Replies

Wiki maybe? I'm sure that you could Google that and find the answer somewhere!

You should really learn how to read the API documentation, which this site provides you in the navigation bar. I'm not a script developer, but as a programmer, I can dig into the API, find the NPC class's method summary and see that it inherits a getHealth() method (as Apaec mentioned) from Character.

 

 

Edited by fixthissite

npc.getHealth() ?

 

 

You should really learn how to read the API documentation, which this site provides you in the navigation bar. I'm not a script developer, but as a programmer, I can dig into the API, find the NPC class's method summary and see that it inherits a getHealth() method (as Apaec mentioned) from Character.

getHealth returns the health as a percentage, I think he means to get the actual number of hitpoints remaining. There is no way to do this, only for players by getting the skillTracker.getDynamicLevel(SKILL) method. Maybe someone else needs to read the API :doge:

 

18b9955faf.png

getHealth returns the health as a percentage, I think he means to get the actual number of hitpoints remaining. There is no way to do this, only for players by getting the skillTracker.getDynamicLevel(SKILL) method. Maybe someone else needs to read the API doge.png

 

18b9955faf.png

 

You learn something new every day lol

getHealth returns the health as a percentage, I think he means to get the actual number of hitpoints remaining. There is no way to do this, only for players by getting the skillTracker.getDynamicLevel(SKILL) method. Maybe someone else needs to read the API :doge:

18b9955faf.png

Why would you need to get the NPC's health maximum? I mean like I said, I don't know much about botting, but I personally don't see a reason for it, and apparently the API designers thought so too. Seems as if he should refer to the XY problem, and explain exactly what he wants to do.

From playing RuneScape in the past, the only health related situations referred to eating and possibly running away (if your health is low or if the opponent's health is high). This is why I believe the actual amount of hitpoints was never added to the API, seeing how it seems to be a reasonable thing to add, and percentage was added instead.

Plus, he never mentioned that he already checked the API, so as far as we know, he doesn't know it exists. I was giving a quick introduction. No need to be rude..

Edited by fixthissite

Guest
This topic is now closed to further replies.

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.