Пример #1
0
 private boolean talkingToKaylee() {
   String name = NPCChat.getName();
   if (name.contains("Kaylee")) {
     return true;
   }
   return false;
 }
Пример #2
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;
 }
Пример #3
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;
  }