October 21, 20205 yr so I am trying to detect the end of a NMZ dream to make the account logout, and client stop. I was thinking the best way of doing this would be using Chatbox.MessageType.valueOf("you wakeup feeling refreshed"); If there is a better way of doing this please comment below. I am struggling fairly hard lol EDIT: could also create a area around player ~15 tiles and create a check for players onloop, what do you guys think is best? Edited October 21, 20205 yr by Fich420
October 21, 20205 yr I would say... override the RandomEvent.BREAK_MANAGER and in shouldActivate make that player in square and in onLoop logout and stop script Edited October 21, 20205 yr by Nbacon
October 21, 20205 yr Assuming there is a chatbox message, just use the onMessage() method and check for that message and if it appears set youself to stop the script. public void onMessage(final Message message) { if (message.getMessage().contains("you wakeup feeling refreshed")) { //TODO either set a boolean to stop or just stop. } }
Create an account or sign in to comment