Jump to content

Reading the absorbtion text in nmz


Recommended Posts

Posted

Each 1 of the absorption number is equals to 1 damage hit

So in this picture, you have 349 Absorption, which means you can take 349 DAMAGE before it runs out.

Bretend it is a saradomin brew that adds an extra 349 hp on top of your NORMAL HP.

 

So I have to track the hits the monsters do?

 

Isn't it easier to just read the text?

Posted

implement the onMessage method in your Script class.

void onMessage(Message message) {
    if(message.getType() == MessageType.GAME && message.getMessage().contains("damage absorption left")) {
        String[] parts = message.getMessage().split(" ");
        try {
            int pointsLeft = Integer.parseInt(parts[3]);
        } catch(NumberFormatException | ArrayIndexOutOfBoundsException ex) {}    
    }
}

NOTE: Typed it out without an IDE. The syntax may be faulty.

Posted

Lol, I hadn't even noticed that.

There will be a client config (VARP) that you can read the value from directly, then (most likely). Try using the client config debugger

 

 

Cause you are obv not as good as me? OSD PLZ.

 

But yer i have this in my script ill post the widget thingy when i get home from work :P

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...