Beispiel #1
0
 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;
 }
Beispiel #2
0
  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;
  }