@Override
 public String onTalk(NpcInstance npc, QuestState st) {
   int npcId = npc.getNpcId();
   String htmltext = "noquest";
   int cond = st.getCond();
   if (npcId == NANARIN) {
     if (cond == 0) {
       if (st.getPlayer().getLevel() < 15) {
         htmltext = "30956-00.htm";
         st.exitCurrentQuest(true);
       } else {
         htmltext = "30956_1.htm";
       }
     } else if (cond == 1) {
       htmltext = "30956_8.htm";
     } else if (cond == 2) {
       htmltext = "30956_3.htm";
     } else if (cond == 3) {
       htmltext = "30956_6.htm";
     } else if (cond == 4) {
       htmltext = "30956_5.htm";
     }
   } else if (npcId == BARBADO) {
     if (cond == 3) {
       if (st.getQuestItemsCount(EVENT_CLOTHES) > 0) {
         st.takeItems(EVENT_CLOTHES, -1);
         htmltext = "30959_2.htm";
         st.exitCurrentQuest(true);
       } else if (st.getQuestItemsCount(SABRINS_BLACK_BEER) > 0) {
         st.takeItems(SABRINS_BLACK_BEER, -1);
         htmltext = "30959_2.htm";
         st.exitCurrentQuest(true);
       } else {
         st.takeItems(NANARINS_FLUTE, -1);
         st.setCond(4);
         st.playSound(SOUND_MIDDLE);
         htmltext = "30959_1.htm";
       }
     } else if (cond == 4) {
       htmltext = "30959_3.htm";
     }
   } else if (npcId == HOLVAS && (cond == 1 || cond == 2)) {
     st.setCond(2);
     if (Rnd.chance(60)) {
       htmltext = "30058_2.htm";
     } else {
       htmltext = "30058_1.htm";
     }
   } else if (npcId == POITAN && (cond == 1 || cond == 2)) {
     st.setCond(2);
     if (Rnd.chance(60)) {
       htmltext = "30458_2.htm";
     } else {
       htmltext = "30458_1.htm";
     }
   }
   return htmltext;
 }
Пример #2
0
  @Override
  public String onTalk(NpcInstance npc, QuestState st) {
    String htmltext = "noquest";
    int npcId = npc.getNpcId();
    int cond = st.getCond();

    if (npcId == Dilios) {
      if (cond == 0) {
        if (st.getPlayer().getLevel() >= 75) {
          htmltext = "dilios_q692_1.htm";
        } else {
          htmltext = "dilios_q692_0.htm";
          st.exitCurrentQuest(true);
        }
      }
    } else if (npcId == Kutran) {
      if (cond == 2) {
        htmltext = "kutran_q692_1.htm";
      } else if (cond == 3) {
        htmltext = "kutran_q692_3.htm";
      }
    } else if (npcId == Lekon) {
      if (cond == 1) {
        htmltext = "lekon_q692_1.htm";
      }
    }
    return htmltext;
  }
 @Override
 public String onEvent(String event, QuestState st, NpcInstance npc) {
   String htmltext = event;
   if (event.equalsIgnoreCase("30956_2.htm")) {
     st.setCond(1);
     st.setState(STARTED);
     st.playSound(SOUND_ACCEPT);
     st.takeItems(EVENT_CLOTHES, -1);
     st.takeItems(NANARINS_FLUTE, -1);
     st.takeItems(SABRINS_BLACK_BEER, -1);
   } else if (event.equalsIgnoreCase("30956_4.htm")) {
     st.giveItems(NANARINS_FLUTE, 1);
     st.playSound(SOUND_MIDDLE);
     st.setCond(3);
   } else if (event.equalsIgnoreCase("answer1")) {
     st.giveItems(EVENT_CLOTHES, 1);
     st.playSound(SOUND_MIDDLE);
     st.setCond(3);
     htmltext = "30956_6.htm";
   } else if (event.equalsIgnoreCase("answer2")) {
     st.giveItems(SABRINS_BLACK_BEER, 1);
     st.playSound(SOUND_MIDDLE);
     st.setCond(3);
     htmltext = "30956_6.htm";
   } else if (event.equalsIgnoreCase("30956_7.htm")) {
     st.giveItems(Musical_Score, 1);
     st.playSound(SOUND_FINISH);
     st.exitCurrentQuest(true);
   }
   return htmltext;
 }
Пример #4
0
  @Override
  public String onTalk(NpcInstance npc, QuestState st) {
    String htmltext = "noquest";
    int cond = st.getCond();
    if (npc.getNpcId() == Roderik) {
      switch (st.getState()) {
        case CREATED:
          if (st.getPlayer().getLevel() >= 95) {
            if (st.isNowAvailableByTime()) {
              htmltext = "30631.htm";
            } else {
              htmltext = "30631-0.htm";
            }
          } else {
            htmltext = "lvl.htm";
            st.exitCurrentQuest(true);
          }
          break;
        case STARTED:
          if (cond == 1) {
            htmltext = "30631-3.htm";
          } else if (cond == 2) {
            htmltext = "30631-4.htm";
          }
          break;
      }
    }

    return htmltext;
  }
 @Override
 public String onTalk(NpcInstance npc, QuestState st) {
   String htmltext = "noquest";
   int npcId = npc.getNpcId();
   int cond = st.getCond();
   int id = st.getState();
   Player player = st.getPlayer();
   if (npcId == CROOP) {
     if (id == CREATED && player.getLevel() >= 79) {
       htmltext = "30676-01.htm";
     } else if (cond == 1) {
       htmltext = "30676-04.htm";
     } else if (cond == 2) {
       htmltext = "30676-05.htm";
       st.setCond(3);
       st.playSound(SOUND_MIDDLE);
       st.giveItems(CROOP_INTRO, 1);
     } else if (cond >= 3 && cond <= 5) {
       htmltext = "30676-06.htm";
     } else if (cond == 6) {
       htmltext = "30676-07.htm";
     } else if (id == COMPLETED) {
       htmltext = "30676-13.htm";
     } else if (player.getLevel() < 79) {
       htmltext = "30676-00.htm";
       st.exitCurrentQuest(true);
     }
   } else if (npcId == HECTOR) {
     if (cond == 3) {
       htmltext = "30197-01.htm";
     }
     if (cond >= 4 && cond <= 7) {
       htmltext = "30197-04.htm";
     }
   } else if (npcId == STAN) {
     if (cond == 4) {
       htmltext = "30200-01.htm";
     }
     if (cond >= 5 && cond <= 7) {
       htmltext = "30200-05.htm";
     }
   } else if (npcId == CORPSE) {
     if (cond == 5) {
       htmltext = "32568-01.htm";
     }
   } else if (npcId == HOLLINT) {
     if (cond == 7) {
       htmltext = "30191-01.htm";
     }
   }
   return htmltext;
 }
 @Override
 public String onEvent(String event, QuestState st, NpcInstance npc) {
   String htmltext = event;
   if (event.equalsIgnoreCase("seer_moirase_q0113_0104.htm")) {
     st.setCond(1);
     st.giveItems(BOX, 1);
     st.setState(STARTED);
     st.playSound(SOUND_ACCEPT);
   } else if (event.equalsIgnoreCase("torant_q0113_0201.htm")) {
     st.giveItems(ADENA_ID, 154800);
     st.addExpAndSp(619300, 44200);
     st.takeItems(BOX, 1);
     st.playSound(SOUND_FINISH);
     st.exitCurrentQuest(false);
   }
   return htmltext;
 }
Пример #7
0
 @Override
 public String onEvent(String event, QuestState st, NpcInstance npc) {
   String htmltext = event;
   if (event.equalsIgnoreCase("30631-3.htm")) {
     st.setState(STARTED);
     st.setCond(1);
     st.playSound(SOUND_ACCEPT);
   } else if (event.equalsIgnoreCase("30631-5.htm")) {
     st.getPlayer().addExpAndSp(600000000, 0);
     st.takeItems(Deadmans_Flesh, 40);
     st.unset(SCALDISECT_KILL);
     st.setState(COMPLETED);
     st.playSound(SOUND_FINISH);
     st.exitCurrentQuest(this);
   }
   return htmltext;
 }
 @Override
 public String onEvent(String event, QuestState st, NpcInstance npc) {
   Player player = st.getPlayer();
   String htmltext = event;
   if (event.equalsIgnoreCase("30676-03.htm")) {
     st.setCond(1);
     st.setState(STARTED);
     st.playSound(SOUND_ACCEPT);
   } else if (event.equalsIgnoreCase("8")) {
     st.setCond(2);
     st.playSound(SOUND_MIDDLE);
     player.showQuestMovie(ExStartScenePlayer.SCENE_SSQ_SUSPICIOUS_DEATH);
     return "";
   } else if (event.equalsIgnoreCase("30197-03.htm")) {
     st.setCond(4);
     st.takeItems(CROOP_INTRO, 1);
     st.playSound(SOUND_MIDDLE);
   } else if (event.equalsIgnoreCase("30200-04.htm")) {
     st.setCond(5);
     st.playSound(SOUND_MIDDLE);
   } else if (event.equalsIgnoreCase("32568-02.htm")) {
     st.setCond(6);
     st.giveItems(JACOB_NECK, 1);
     st.playSound(SOUND_MIDDLE);
   } else if (event.equalsIgnoreCase("30676-12.htm")) {
     st.setCond(7);
     st.takeItems(JACOB_NECK, 1);
     st.giveItems(CROOP_LETTER, 1);
     st.playSound(SOUND_MIDDLE);
   } else if (event.equalsIgnoreCase("30191-03.htm")) {
     if (player.getLevel() < 79) {
       htmltext =
           "<html><body>Only characters who are <font color=\"LEVEL\">level 79</font> or higher may complete this quest.</body></html>";
     } else if (player.getBaseClassId() == player.getActiveClassId()) {
       st.addExpAndSp(10000000, 2500000);
       st.setState(COMPLETED);
       st.exitCurrentQuest(false);
       st.playSound(SOUND_FINISH);
     } else {
       return "subclass_forbidden.htm";
     }
   }
   return htmltext;
 }
 @Override
 public String onTalk(NpcInstance npc, QuestState st) {
   String htmltext = "noquest";
   int npcId = npc.getNpcId();
   int id = st.getState();
   int cond = st.getCond();
   if (id == COMPLETED) {
     htmltext = "completed";
   } else if (npcId == MOIRA) {
     if (id == CREATED) {
       if (st.getPlayer().getLevel() >= 40) {
         htmltext = "seer_moirase_q0113_0101.htm";
       } else {
         htmltext = "seer_moirase_q0113_0103.htm";
         st.exitCurrentQuest(true);
       }
     } else if (cond == 1) {
       htmltext = "seer_moirase_q0113_0105.htm";
     }
   } else if (npcId == TORRANT && st.getQuestItemsCount(BOX) == 1) {
     htmltext = "torant_q0113_0101.htm";
   }
   return htmltext;
 }
Пример #10
0
 @Override
 public String onTalk(NpcInstance npc, QuestState st) {
   String htmltext = "noquest";
   int npcId = npc.getNpcId();
   int cond = st.getCond();
   int id = st.getState();
   Player player = st.getPlayer();
   if (npcId == DISURVIVOR) {
     if (cond == 0) {
       if (player.getLevel() < 61 || player.getLevel() > 67) {
         htmltext = "32498-no.htm";
         st.exitCurrentQuest(true);
       } else {
         return "32498-01.htm";
       }
     } else if (id == COMPLETED) {
       htmltext = "32498-no.htm";
     } else if (cond == 1 || cond == 2) {
       htmltext = "32498-06.htm";
     } else {
       htmltext = "32498-07.htm";
     }
   } else if (npcId == SUPPORTER) {
     if (cond == 1 || cond == 2) {
       htmltext = "32501-01.htm";
     } else {
       htmltext = "32501-04.htm";
     }
   } else if (npcId == DADVENTURER) {
     if (st.getQuestItemsCount(SWORD) > 0 && st.getQuestItemsCount(KDROP) == 0) {
       htmltext = "32508-01.htm";
     }
     if (st.getQuestItemsCount(ENCHSWORD) > 0 && st.getQuestItemsCount(ADROP) == 0) {
       htmltext = "32508-01.htm";
     }
     if (st.getQuestItemsCount(SWORD) == 0 && st.getQuestItemsCount(KDROP) > 0) {
       htmltext = "32508-05.htm";
     }
     if (st.getQuestItemsCount(ENCHSWORD) == 0 && st.getQuestItemsCount(ADROP) > 0) {
       htmltext = "32508-05.htm";
     }
     if (st.getQuestItemsCount(SWORD) == 0 && st.getQuestItemsCount(ENCHSWORD) == 0) {
       htmltext = "32508-05.htm";
     }
     if (st.getQuestItemsCount(KDROP) == 0 && st.getQuestItemsCount(ADROP) == 0) {
       htmltext = "32508-01.htm";
     }
     if (player.getPets() != null) {
       htmltext = "32508-04.htm";
     }
     if (st.getQuestItemsCount(SWORD) > 0 && st.getQuestItemsCount(KDROP) > 0) {
       st.takeItems(SWORD, 1);
       st.takeItems(KDROP, 1);
       st.giveItems(ENCHSWORD, 1);
       htmltext = "32508-02.htm";
     }
     if (st.getQuestItemsCount(ENCHSWORD) > 0 && st.getQuestItemsCount(ADROP) > 0) {
       st.takeItems(ENCHSWORD, 1);
       st.takeItems(ADROP, 1);
       st.giveItems(LASTSWORD, 1);
       htmltext = "32508-03.htm";
     }
     if (st.getQuestItemsCount(LASTSWORD) > 0) {
       htmltext = "32508-03.htm";
     }
   } else if (npcId == DADVENTURER2) {
     if (cond == 4) {
       // if(player.getPets() != null)
       // htmltext = "32511-03.htm";
       // if(player.getPets() == null)
       // {
       st.giveItems(ScrollOfEscape, 1);
       st.giveItems(PBRACELET, 1);
       st.giveItems(57, 411500);
       st.addExpAndSp(4010000, 1235000);
       st.setCond(5);
       st.setState(COMPLETED);
       st.playSound(SOUND_FINISH);
       st.exitCurrentQuest(false);
       player.getReflection().startCollapseTimer(60000);
       htmltext = "32511-01.htm";
       // }
     } else if (id == COMPLETED) {
       htmltext = "32511-02.htm";
     }
   }
   return htmltext;
 }
Пример #11
0
 @Override
 public String onEvent(String event, QuestState st, NpcInstance npc) {
   String htmltext = event;
   int cond = st.getCond();
   if (event.equalsIgnoreCase("take_test") && cond == 0) {
     QuestState GoodDayToFly = st.getPlayer().getQuestState(_10273_GoodDayToFly.class);
     if (GoodDayToFly != null && GoodDayToFly.isCompleted()) {
       st.setCond(2);
       st.setState(STARTED);
       st.playSound(SOUND_ACCEPT);
       htmltext = "dilios_q692_4.htm";
     } else {
       st.setCond(1);
       st.setState(STARTED);
       st.playSound(SOUND_ACCEPT);
       htmltext = "dilios_q692_3.htm";
     }
   } else if (event.equalsIgnoreCase("lekon_q692_2.htm") && cond == 1) {
     st.exitCurrentQuest(true);
   } else if (event.equalsIgnoreCase("kutran_q692_2.htm") && cond == 2) {
     st.setCond(3);
     st.playSound(SOUND_MIDDLE);
   } else if (event.equalsIgnoreCase("exchange_sod") && cond == 3) {
     if (st.getQuestItemsCount(FleetSteedTroupsTotem) < 5) {
       htmltext = "kutran_q692_7.htm";
     } else {
       int _charmstogive = Math.round(st.getQuestItemsCount(FleetSteedTroupsTotem) / 5);
       st.takeItems(FleetSteedTroupsTotem, 5 * _charmstogive);
       st.giveItems(FleetSteedTroupsCharm, _charmstogive);
       htmltext = "kutran_q692_4.htm";
     }
   } else if (event.equalsIgnoreCase("exchange_soi") && cond == 3) {
     if (st.getQuestItemsCount(NucleusofanIncompleteSoul) < 5) {
       htmltext = "kutran_q692_7.htm";
     } else {
       int _soulstogive = Math.round(st.getQuestItemsCount(NucleusofanIncompleteSoul) / 5);
       st.takeItems(NucleusofanIncompleteSoul, 5 * _soulstogive);
       st.giveItems(NucleusofaFreedSoul, _soulstogive);
       htmltext = "kutran_q692_5.htm";
     }
   } else if (event.equalsIgnoreCase("exchange_soa") && cond == 3) {
     if (st.getQuestItemsCount(SpiritStoneDust) < 5) {
       htmltext = "kutran_q692_7.htm";
     } else {
       int _soulstogive = Math.round(st.getQuestItemsCount(SpiritStoneDust) / 5);
       st.takeItems(SpiritStoneDust, 5 * _soulstogive);
       st.giveItems(SpiritStoneFragment, _soulstogive);
       htmltext = "kutran_q692_5.htm";
     }
   } else if (event.equalsIgnoreCase("exchange_breath") && cond == 3) {
     if (st.getQuestItemsCount(BreathofTiat) == 0) {
       htmltext = "kutran_q692_7.htm";
     } else {
       st.giveItems(ADENA_ID, st.getQuestItemsCount(BreathofTiat) * 2500);
       st.takeItems(BreathofTiat, -1);
       htmltext = "kutran_q692_5.htm";
     }
   } else if (event.equalsIgnoreCase("exchange_portion") && cond == 3) {
     if (st.getQuestItemsCount(PortionofaSoul) == 0) {
       htmltext = "kutran_q692_7.htm";
     } else {
       st.giveItems(ADENA_ID, st.getQuestItemsCount(PortionofaSoul) * 2500);
       st.takeItems(PortionofaSoul, -1);
       htmltext = "kutran_q692_5.htm";
     }
   } else if (event.equalsIgnoreCase("exchange_energy") && cond == 3) {
     if (st.getQuestItemsCount(ConcentratedSpiritEnergy) == 0) {
       htmltext = "kutran_q692_7.htm";
     } else {
       st.giveItems(ADENA_ID, st.getQuestItemsCount(ConcentratedSpiritEnergy) * 25000);
       st.takeItems(ConcentratedSpiritEnergy, -1);
       htmltext = "kutran_q692_5.htm";
     }
   }
   return htmltext;
 }