Jump to content

Listening to NPC yells not visible in the chatbox


GSC

Recommended Posts

 

Don't honestly know.

But i'd assume something like this.

 npcs.closest(new Filter<NPC>() {
                        @Override
                        public boolean match(NPC npc) {
                            return npc.getHeadMessage().equals("YOLO!") && npc.getRecentMessages().contains("YOLO!");
                        }
                    });

 

You clearly know what you're doing. smile.png

 

Somehow I had missed the getHeadMessage() API. It returns null when there's no head message so one null check needs to be added and I didn't need the recent messages myself. But essentially solved my problem, thanks!

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...