@Override public String onTalk(NpcInstance npc, QuestState st) { String htmltext = "noquest"; int npcId = npc.getNpcId(); int cond = st.getCond(); if (npcId == Droph) if (cond == 0) { if (st.getPlayer().getLevel() >= 79) htmltext = "droph_q307_1.htm"; else { htmltext = "droph_q307_0.htm"; st.exitCurrentQuest(true); } } else if (cond == 1) { if (st.getQuestItemsCount(CaveExplorationText1Sheet) >= 1 && st.getQuestItemsCount(CaveExplorationText2Sheet) >= 1 && st.getQuestItemsCount(CaveExplorationText3Sheet) >= 1) if (ServerVariables.getLong("HekatonPrimeRespawn", 0) < System.currentTimeMillis()) htmltext = "droph_q307_3.htm"; else htmltext = "droph_q307_4.htm"; else htmltext = "droph_q307_2a.htm"; } else if (cond == 2) { htmltext = "droph_q307_5.htm"; st.giveItems(DrophsSupportItems, 1); st.playSound(SOUND_FINISH); st.exitCurrentQuest(true); } return htmltext; }
@Override public String onEvent(String event, QuestState st, NpcInstance npc) { int _state = st.getState(); int cond = st.getCond(); if (event.equalsIgnoreCase("jeremy_q0625_0104.htm") && _state == CREATED) { if (st.getQuestItemsCount(Soy_Sauce_Jar) == 0) { st.exitCurrentQuest(true); return "jeremy_q0625_0102.htm"; } st.setState(STARTED); st.setCond(1); st.takeItems(Soy_Sauce_Jar, 1); st.giveItems(Food_for_Bumbalump, 1); st.playSound(SOUND_ACCEPT); } else if (event.equalsIgnoreCase("jeremy_q0625_0301.htm") && _state == STARTED && cond == 3) { st.exitCurrentQuest(true); if (st.getQuestItemsCount(Special_Yeti_Meat) == 0) return "jeremy_q0625_0302.htm"; st.takeItems(Special_Yeti_Meat, 1); st.giveItems(Rnd.get(Reward_First, Reward_Last), 5, true); } else if (event.equalsIgnoreCase("yetis_table_q0625_0201.htm") && _state == STARTED && cond == 1) { if (ServerVariables.getLong(_625_TheFinestIngredientsPart2.class.getSimpleName(), 0) + 3 * 60 * 60 * 1000 > System.currentTimeMillis()) return "yetis_table_q0625_0204.htm"; if (st.getQuestItemsCount(Food_for_Bumbalump) == 0) return "yetis_table_q0625_0203.htm"; if (BumbalumpSpawned()) return "yetis_table_q0625_0202.htm"; st.takeItems(Food_for_Bumbalump, 1); st.setCond(2); ThreadPoolManager.getInstance().schedule(new BumbalumpSpawner(), 1000); } return event; }
@Override public String onEvent(String event, QuestState st, NpcInstance npc) { String htmltext = event; if (event.equalsIgnoreCase("droph_q307_2.htm")) { st.setCond(1); st.setState(STARTED); } else if (event.equalsIgnoreCase("loc1")) { htmltext = "droph_q307_2a_1.htm"; RadarControlPacket rc = new RadarControlPacket(0, 1, GorgolosLoc); st.getPlayer().sendPacket(rc); } else if (event.equalsIgnoreCase("loc2")) { htmltext = "droph_q307_2a_2.htm"; RadarControlPacket rc = new RadarControlPacket(0, 1, LastTitanUtenusLoc); st.getPlayer().sendPacket(rc); } else if (event.equalsIgnoreCase("loc3")) { htmltext = "droph_q307_2a_3.htm"; RadarControlPacket rc = new RadarControlPacket(0, 1, GiantMarpanakLoc); st.getPlayer().sendPacket(rc); } else if (event.equalsIgnoreCase("summon_rb")) { if (ServerVariables.getLong("HekatonPrimeRespawn", 0) < System.currentTimeMillis() && st.getQuestItemsCount(CaveExplorationText1Sheet) >= 1 && st.getQuestItemsCount(CaveExplorationText2Sheet) >= 1 && st.getQuestItemsCount(CaveExplorationText3Sheet) >= 1) { st.takeItems(CaveExplorationText1Sheet, 1); st.takeItems(CaveExplorationText2Sheet, 1); st.takeItems(CaveExplorationText3Sheet, 1); ServerVariables.set( "HekatonPrimeRespawn", System.currentTimeMillis() + HekatonPrimeRespawn); NpcInstance boss = st.addSpawn( HekatonPrime, HekatonPrimeLoc.x, HekatonPrimeLoc.y, HekatonPrimeLoc.z, HekatonPrimeLoc.h, 0, 0); boss.getMinionList().spawnMinions(); htmltext = "droph_q307_3a.htm"; } else htmltext = "droph_q307_2b.htm"; } return htmltext; }
@Override public String onTalk(NpcInstance npc, QuestState st) { int _state = st.getState(); int npcId = npc.getNpcId(); if (_state == CREATED) { if (npcId != Jeremy) return "noquest"; if (st.getPlayer().getLevel() < 73) { st.exitCurrentQuest(true); return "jeremy_q0625_0103.htm"; } if (st.getQuestItemsCount(Soy_Sauce_Jar) == 0) { st.exitCurrentQuest(true); return "jeremy_q0625_0102.htm"; } st.setCond(0); return "jeremy_q0625_0101.htm"; } if (_state != STARTED) return "noquest"; int cond = st.getCond(); if (npcId == Jeremy) { if (cond == 1) return "jeremy_q0625_0105.htm"; if (cond == 2) return "jeremy_q0625_0202.htm"; if (cond == 3) return "jeremy_q0625_0201.htm"; } if (npcId == Yetis_Table) { if (ServerVariables.getLong(_625_TheFinestIngredientsPart2.class.getSimpleName(), 0) + 3 * 60 * 60 * 1000 > System.currentTimeMillis()) return "yetis_table_q0625_0204.htm"; if (cond == 1) return "yetis_table_q0625_0101.htm"; if (cond == 2) { if (BumbalumpSpawned()) return "yetis_table_q0625_0202.htm"; ThreadPoolManager.getInstance().schedule(new BumbalumpSpawner(), 1000); return "yetis_table_q0625_0201.htm"; } if (cond == 3) return "yetis_table_q0625_0204.htm"; } return "noquest"; }