Jump to content

NMZ Power Ups


Mikee_

Recommended Posts

Well the color of the power up's text when you right click it is the same color as a GroundItem even through it appears to be an object... so at first I tried this

        if (getGroundItems().closest("Recurrent damage") != null) {
            state = 2;
            getGroundItems().closest("Recurrent damage").interact("Activate");

but that wasn't detecting or doing anything wasn't switching to state 2 at all

 

then I tried as an object...

        if (getObjects().closest("Recurrent damage") != null) {
            state = 2;
            getObjects().closest("Recurrent damage").interact("Activate");

Ideas? Anyone know how to detect as just plain "Any Entity" ??

 

Or maybe I have the right idea, but I'm making some beginner mistake?

 

Thanks in advance for help <3

Edited by puremikeg943
Link to comment
Share on other sites

That means the object is still null. You need to keep looking for the object by either walking around or something to try and find those objects.

 

It isn't working even when the power ups appear next to me. That's why I was wondering if i could use "closest()" in a broad spectrum sense like instead of grounditem.closest() or object.closest() i could perhaps use entity.closest()...

Link to comment
Share on other sites

If you use entity hover debug in the client what do you see about the object and it's id? Perhaps instead of calling it by the string name you can call it by the id instead?

 

Wowowowow.... I thought it was a ground item because of the orange color but it turns out the problem was that it is an object but Jagex just used a "<col=" code thing in the beginning of the name string... therefore it wasnt being detected as either because it's like an invisible part of the name...

 

I also feel dumb for completely forgetting about the entity hover debug...

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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