private boolean inChat() { String[] options = NPCChat.getOptions(); for (int i = 0; i < options.length; i++) { // println(options[i]); if (options[i].contains("What")) { // println("In chat"); return true; } } return false; }
private boolean waitChatOption(String option, long time) { long maxTime = System.currentTimeMillis() + time; while (System.currentTimeMillis() < maxTime) { String[] options = NPCChat.getOptions(); if (options.length > 0) { for (int i = 0; i < options.length; i++) { if (options[i].contains(option)) { return true; } } } } return false; }