Mocro Posted October 13, 2015 Share Posted October 13, 2015 my whole bot crashes when getting messages is there a way to get the last message only so not the whole array im using this. else if(api.chatbox.contains(MessageType.ALL, "Welcome to runescape.")) and then i get nulled when someone types a message or when i typ somthing Quote Link to comment Share on other sites More sharing options...
Flamezzz Posted October 13, 2015 Share Posted October 13, 2015 (edited) Option 1: listen for messagesimplement this method in your script class, it will be called when there is a new game/player message (see MessageType). public void onMessage(Message m) throws InterruptedException { } Option 2: get the widget text directly(note: this might include color tags like <col=....></col>, use stripFormatting to remove this)parent widget id = 162, dunno about the child/grandchild id, use the widget debugger Edited October 13, 2015 by Flamezzz 2 Quote Link to comment Share on other sites More sharing options...