Jump to content

Listening to NPC yells not visible in the chatbox


Recommended Posts

Posted

 

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!");
                        }
                    });

how long u been scripting for mate? curiosity :D

Posted

 

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!

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