@Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { String htmltext = event; QuestState st = player.getQuestState(qn); if (st == null) return htmltext; if (event.equalsIgnoreCase("30686-2.htm")) { st.setState(STATE_STARTED); st.set("cond", "1"); st.playSound(QuestState.SOUND_ACCEPT); } else if (event.equalsIgnoreCase("30686-7.htm")) { final int count = st.getQuestItemsCount(JADE_CRYSTAL); if (count == 0) htmltext = "30686-4.htm"; else { int reward = (count * 425) + 3500; if (count >= 100) reward += 7400; st.takeItems(JADE_CRYSTAL, -1); st.rewardItems(57, reward); } } else if (event.equalsIgnoreCase("30686-8.htm")) { st.playSound(QuestState.SOUND_FINISH); st.exitQuest(true); } return htmltext; }
@Override public String onTalk(L2Npc npc, L2PcInstance player) { QuestState st = player.getQuestState(qn); String htmltext = getNoQuestMsg(); if (st == null) return htmltext; switch (st.getState()) { case STATE_CREATED: if (player.getLevel() >= 18) htmltext = "30361-03.htm"; else { htmltext = "30361-02.htm"; st.exitQuest(true); } break; case STATE_STARTED: int shards = st.getQuestItemsCount(WIND_SHARD); if (shards == 0) htmltext = "30361-05.htm"; else { int reward = 40 * shards + (shards >= 10 ? 2988 : 0); htmltext = "30361-07.htm"; st.takeItems(WIND_SHARD, -1); st.rewardItems(57, reward); } break; } return htmltext; }
@Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { String htmltext = event; QuestState st = player.getQuestState(qn); if (st == null) return htmltext; // Manakia if (event.equalsIgnoreCase("30515-03.htm")) { st.setState(STATE_STARTED); st.set("cond", "1"); st.set("condStone", "1"); st.playSound(QuestState.SOUND_ACCEPT); } else if (event.startsWith("30515-06-")) { if (st.getQuestItemsCount(CAVE_BEAST_TOOTH) >= 65 && st.getQuestItemsCount(DEATH_WAVE_LIGHT) >= 65) { htmltext = "30515-06.htm"; st.playSound(QuestState.SOUND_MIDDLE); int[] reward = REWARDS[Integer.parseInt(event.substring(9, 10))]; st.takeItems(CAVE_BEAST_TOOTH, -1); st.takeItems(DEATH_WAVE_LIGHT, -1); st.rewardItems(57, reward[2]); st.giveItems(reward[0], reward[1]); } else htmltext = "30515-07.htm"; } else if (event.equalsIgnoreCase("30515-08.htm")) { st.playSound(QuestState.SOUND_FINISH); st.exitQuest(true); } // Torai else if (event.equalsIgnoreCase("30557-02.htm")) { if (st.getInt("cond") == 2 && st.hasQuestItems(SEALED_MYSTERIOUS_STONE)) { st.set("cond", "3"); st.takeItems(SEALED_MYSTERIOUS_STONE, -1); st.giveItems(MYSTERIOUS_STONE, 1); st.playSound(QuestState.SOUND_MIDDLE); } else htmltext = "30557-03.htm"; } return htmltext; }
@Override public String onTalk(L2Npc npc, L2PcInstance player) { String htmltext = getNoQuestMsg(); QuestState st = player.getQuestState(qn); if (st == null) return htmltext; switch (st.getState()) { case STATE_CREATED: htmltext = (player.getLevel() < 56) ? "30515-01.htm" : "30515-02.htm"; break; case STATE_STARTED: final int cond = st.getInt("cond"); switch (npc.getNpcId()) { case MANAKIA: if (!(st.hasQuestItems(SEALED_MYSTERIOUS_STONE))) { if (st.getQuestItemsCount(CAVE_BEAST_TOOTH) >= 65 && st.getQuestItemsCount(DEATH_WAVE_LIGHT) >= 65) htmltext = "30515-05.htm"; else htmltext = "30515-04.htm"; } else { if (cond == 1) { htmltext = "30515-09.htm"; st.set("cond", "2"); st.playSound(QuestState.SOUND_MIDDLE); } else htmltext = "30515-10.htm"; } break; case TORAI: if (cond == 2 && st.hasQuestItems(SEALED_MYSTERIOUS_STONE)) htmltext = "30557-01.htm"; break; } break; } return htmltext; }
@Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { String htmltext = event; QuestState st = player.getQuestState(qn); if (st == null) return htmltext; if (event.equalsIgnoreCase("30754-04.htm")) { st.setState(STATE_STARTED); st.set("cond", "1"); st.playSound(QuestState.SOUND_ACCEPT); } else if (event.equalsIgnoreCase("30754-07.htm")) { if (st.get("success") != null) { st.set("cond", "1"); st.unset("success"); st.playSound(QuestState.SOUND_MIDDLE); } } else if (event.equalsIgnoreCase("30754-08.htm")) { st.playSound(QuestState.SOUND_FINISH); st.exitQuest(true); } else if (event.equalsIgnoreCase("30754-06.htm")) { if (!st.hasQuestItems(ARTICLE_DEAD_HERO)) htmltext = "30754-06a.htm"; else { final int amount = st.getQuestItemsCount(ARTICLE_DEAD_HERO); st.takeItems(ARTICLE_DEAD_HERO, -1); st.giveItems(57, amount * 60); // Special item, % based on actual number of qItems. if (Rnd.get(1000) < Math.min(10, Math.max(1, amount / 10))) htmltext = "30754-10.htm"; } } else if (event.equalsIgnoreCase("30754-11.htm")) { final int random = Rnd.get(4); if (random < 1) { htmltext = "30754-12.htm"; st.giveItems(OLD_KEY, 1); } else if (random < 2) { htmltext = "30754-13.htm"; st.giveItems(OLD_HILT, 1); } else if (random < 3) { htmltext = "30754-14.htm"; st.giveItems(OLD_TOTEM, 1); } else st.giveItems(CRUCIFIX, 1); st.set("cond", "2"); st.playSound(QuestState.SOUND_MIDDLE); } return htmltext; }
@Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { String htmltext = getNoQuestMsg(); QuestState st = player.getQuestState(getName()); if (st == null) return htmltext; if (Util.isDigit(event)) { final int eventId = Integer.parseInt(event); if (eventId >= 0 && eventId <= 7) { if (st.getQuestItemsCount(HORN) >= BUFF[eventId - 1][2]) { st.takeItems(HORN, BUFF[eventId - 1][2]); npc.setTarget(player); npc.doCast(SkillTable.getInstance().getInfo(BUFF[eventId - 1][0], BUFF[eventId - 1][1])); npc.setCurrentHpMp(npc.getMaxHp(), npc.getMaxMp()); htmltext = "31372-4.htm"; } } } else if (event.equals("Withdraw")) { if (player.getWarehouse().getSize() == 0) htmltext = "31374-0.htm"; else { player.sendPacket(ActionFailed.STATIC_PACKET); player.setActiveWarehouse(player.getWarehouse()); player.sendPacket(new WareHouseWithdrawalList(player, 1)); } } else if (event.equals("Teleport")) { switch (player.getAllianceWithVarkaKetra()) { case 4: htmltext = "31376-4.htm"; break; case 5: htmltext = "31376-5.htm"; break; } } return htmltext; }
@Override public String onKill(L2Npc npc, L2PcInstance player, boolean isPet) { QuestState st = checkPlayerState(player, npc, STATE_STARTED); if (st == null) return null; if (st.getInt("cond") == 2) { switch (npc.getNpcId()) { case PUNCHER: if (st.dropItemsAlways(PUNCHER_SHARD, 1, 10)) if (st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10 && st.getQuestItemsCount(DRONE_CHITIN) >= 10 && st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10 && st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10 && st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10 && st.getQuestItemsCount(CHIEF_AMULET) >= 10 && st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10) st.set("cond", "3"); break; case NOBLE_ANT_LEADER: if (st.dropItemsAlways(NOBLE_ANT_FEELER, 1, 10)) if (st.getQuestItemsCount(PUNCHER_SHARD) >= 10 && st.getQuestItemsCount(DRONE_CHITIN) >= 10 && st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10 && st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10 && st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10 && st.getQuestItemsCount(CHIEF_AMULET) >= 10 && st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10) st.set("cond", "3"); break; case MARSH_STAKATO_DRONE: if (st.dropItemsAlways(DRONE_CHITIN, 1, 10)) if (st.getQuestItemsCount(PUNCHER_SHARD) >= 10 && st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10 && st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10 && st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10 && st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10 && st.getQuestItemsCount(CHIEF_AMULET) >= 10 && st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10) st.set("cond", "3"); break; case DEAD_SEEKER: if (st.dropItemsAlways(DEAD_SEEKER_FANG, 1, 10)) if (st.getQuestItemsCount(PUNCHER_SHARD) >= 10 && st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10 && st.getQuestItemsCount(DRONE_CHITIN) >= 10 && st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10 && st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10 && st.getQuestItemsCount(CHIEF_AMULET) >= 10 && st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10) st.set("cond", "3"); break; case BREKA_ORC_OVERLORD: if (st.dropItemsAlways(OVERLORD_NECKLACE, 1, 10)) if (st.getQuestItemsCount(PUNCHER_SHARD) >= 10 && st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10 && st.getQuestItemsCount(DRONE_CHITIN) >= 10 && st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10 && st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10 && st.getQuestItemsCount(CHIEF_AMULET) >= 10 && st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10) st.set("cond", "3"); break; case FETTERED_SOUL: if (st.dropItemsAlways(FETTERED_SOUL_CHAIN, 1, 10)) if (st.getQuestItemsCount(PUNCHER_SHARD) >= 10 && st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10 && st.getQuestItemsCount(DRONE_CHITIN) >= 10 && st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10 && st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10 && st.getQuestItemsCount(CHIEF_AMULET) >= 10 && st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10) st.set("cond", "3"); break; case LETO_LIZARDMAN_OVERLORD: if (st.dropItemsAlways(CHIEF_AMULET, 1, 10)) if (st.getQuestItemsCount(PUNCHER_SHARD) >= 10 && st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10 && st.getQuestItemsCount(DRONE_CHITIN) >= 10 && st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10 && st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10 && st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10 && st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10) st.set("cond", "3"); break; case ENCHANTED_MONSTEREYE: if (st.dropItemsAlways(ENCHANTED_EYE_MEAT, 1, 10)) if (st.getQuestItemsCount(PUNCHER_SHARD) >= 10 && st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10 && st.getQuestItemsCount(DRONE_CHITIN) >= 10 && st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10 && st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10 && st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10 && st.getQuestItemsCount(CHIEF_AMULET) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10) st.set("cond", "3"); break; case TAMLIN_ORC: if (st.dropItemsAlways(TAMRIN_ORC_RING, 1, 10)) if (st.getQuestItemsCount(PUNCHER_SHARD) >= 10 && st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10 && st.getQuestItemsCount(DRONE_CHITIN) >= 10 && st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10 && st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10 && st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10 && st.getQuestItemsCount(CHIEF_AMULET) >= 10 && st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10) st.set("cond", "3"); break; case TAMLIN_ORC_ARCHER: if (st.dropItemsAlways(TAMRIN_ORC_ARROW, 1, 10)) if (st.getQuestItemsCount(PUNCHER_SHARD) >= 10 && st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10 && st.getQuestItemsCount(DRONE_CHITIN) >= 10 && st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10 && st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10 && st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10 && st.getQuestItemsCount(CHIEF_AMULET) >= 10 && st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10 && st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10) st.set("cond", "3"); break; } } else if (st.getInt("cond") == 4) { switch (npc.getNpcId()) { case EXCURO: if (st.dropItemsAlways(EXCURO_SKIN, 1, 3)) if (st.getQuestItemsCount(KRATOR_SHARD) >= 3 && st.getQuestItemsCount(LAKIN_MACE) >= 3 && st.getQuestItemsCount(GRANDIS_SKIN) >= 3 && st.getQuestItemsCount(TIMAK_ORC_BELT) >= 3) st.set("cond", "5"); break; case KRATOR: if (st.dropItemsAlways(KRATOR_SHARD, 1, 3)) if (st.getQuestItemsCount(EXCURO_SKIN) >= 3 && st.getQuestItemsCount(LAKIN_MACE) >= 3 && st.getQuestItemsCount(GRANDIS_SKIN) >= 3 && st.getQuestItemsCount(TIMAK_ORC_BELT) >= 3) st.set("cond", "5"); break; case LAKIN: if (st.dropItemsAlways(LAKIN_MACE, 1, 3)) if (st.getQuestItemsCount(EXCURO_SKIN) >= 3 && st.getQuestItemsCount(KRATOR_SHARD) >= 3 && st.getQuestItemsCount(GRANDIS_SKIN) >= 3 && st.getQuestItemsCount(TIMAK_ORC_BELT) >= 3) st.set("cond", "5"); break; case GRANDIS: if (st.dropItemsAlways(GRANDIS_SKIN, 1, 3)) if (st.getQuestItemsCount(EXCURO_SKIN) >= 3 && st.getQuestItemsCount(KRATOR_SHARD) >= 3 && st.getQuestItemsCount(LAKIN_MACE) >= 3 && st.getQuestItemsCount(TIMAK_ORC_BELT) >= 3) st.set("cond", "5"); break; case TIMAK_ORC_OVERLORD: if (st.dropItemsAlways(TIMAK_ORC_BELT, 1, 3)) if (st.getQuestItemsCount(EXCURO_SKIN) >= 3 && st.getQuestItemsCount(KRATOR_SHARD) >= 3 && st.getQuestItemsCount(LAKIN_MACE) >= 3 && st.getQuestItemsCount(GRANDIS_SKIN) >= 3) st.set("cond", "5"); break; } } return null; }
@Override public String onTalk(L2Npc npc, L2PcInstance player) { QuestState st = player.getQuestState(qn); String htmltext = getNoQuestMsg(); if (st == null) return htmltext; switch (st.getState()) { case STATE_CREATED: if (player.getRace() == Race.Elf) { if (player.getLevel() >= 3) htmltext = "30370-03.htm"; else { htmltext = "30370-02.htm"; st.exitQuest(true); } } else { htmltext = "30370-00.htm"; st.exitQuest(true); } break; case STATE_STARTED: int cond = st.getInt("cond"); switch (npc.getNpcId()) { case NERUPA: if (cond >= 1 && cond <= 3) htmltext = "30370-05.htm"; else if (cond == 4) { if (st.getQuestItemsCount(NIGHTSHADE_LEAF) == 1) { htmltext = "30370-06.htm"; st.playSound(QuestState.SOUND_FINISH); st.takeItems(NIGHTSHADE_LEAF, 1); st.rewardItems(LESSER_HEALING_POTION, 5); st.rewardExpAndSp(1000, 0); st.exitQuest(false); } } break; case UNOREN: if (cond == 1) { st.set("cond", "2"); htmltext = "30147-01.htm"; st.playSound(QuestState.SOUND_MIDDLE); st.takeItems(SILVERY_SPIDERSILK, 1); st.giveItems(UNOS_RECEIPT, 1); } else if (cond == 2) htmltext = "30147-02.htm"; else if (cond == 4) htmltext = "30147-03.htm"; break; case CREAMEES: if (cond == 2) { st.set("cond", "3"); htmltext = "30149-01.htm"; st.takeItems(UNOS_RECEIPT, 1); st.giveItems(CELS_TICKET, 1); st.playSound(QuestState.SOUND_MIDDLE); } else if (cond == 3) htmltext = "30149-02.htm"; else if (cond == 4) htmltext = "30149-03.htm"; break; case JULIA: if (cond == 3) { st.set("cond", "4"); htmltext = "30152-01.htm"; st.takeItems(CELS_TICKET, -1); st.giveItems(NIGHTSHADE_LEAF, 1); st.playSound(QuestState.SOUND_MIDDLE); } else if (cond == 4) htmltext = "30152-02.htm"; break; } break; case STATE_COMPLETED: htmltext = getAlreadyCompletedMsg(); break; } return htmltext; }
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { String htmltext = ""; QuestState st = player.getQuestState(getName()); htmltext = event; if (event.equalsIgnoreCase("c_grade_pin")) { if (st.getQuestItemsCount(13898) > 0) { if (st.getQuestItemsCount(57) > 3200) { if (Rnd.get(100) < 30) { st.takeItems(57, 3200); st.takeItems(13898, 1); st.giveItems(PINS_C[st.getRandom((PINS_C).length)], 1); } else { st.takeItems(57, 3200); st.takeItems(13898, 1); npc.broadcastPacket( new NpcSay(npc.getObjectId(), 0, npc.getNpcId(), "真是狼狽不堪啊...力氣大,果然不好控制。")); } return null; } else htmltext = npc.getNpcId() + "-5.htm"; } else htmltext = npc.getNpcId() + "-4.htm"; st.exitQuest(true); } else if (event.equalsIgnoreCase("b_grade_pin")) { if (st.getQuestItemsCount(13899) > 0) { if (st.getQuestItemsCount(57) > 11800) { if (Rnd.get(100) < 25) { st.takeItems(57, 11800); st.takeItems(13899, 1); st.giveItems(PINS_B[st.getRandom((PINS_B).length)], 1); } else { st.takeItems(57, 11800); st.takeItems(13899, 1); npc.broadcastPacket( new NpcSay(npc.getObjectId(), 0, npc.getNpcId(), "真是狼狽不堪啊...力氣大,果然不好控制。")); } return null; } else htmltext = npc.getNpcId() + "-5.htm"; } else htmltext = npc.getNpcId() + "-4.htm"; st.exitQuest(true); } else if (event.equalsIgnoreCase("a_grade_pin")) { if (st.getQuestItemsCount(13900) > 0) { if (st.getQuestItemsCount(57) > 26500) { if (Rnd.get(100) < 20) { st.takeItems(57, 26500); st.takeItems(13900, 1); st.giveItems(PINS_A[st.getRandom((PINS_A).length)], 1); } else { st.takeItems(57, 26500); st.takeItems(13900, 1); npc.broadcastPacket( new NpcSay(npc.getObjectId(), 0, npc.getNpcId(), "真是狼狽不堪啊...力氣大,果然不好控制。")); } return null; } else htmltext = npc.getNpcId() + "-5.htm"; } else htmltext = npc.getNpcId() + "-4.htm"; st.exitQuest(true); } else if (event.equalsIgnoreCase("s_grade_pin")) { if (st.getQuestItemsCount(13901) > 0) { if (st.getQuestItemsCount(57) > 136600) { if (Rnd.get(100) < 15) { st.takeItems(57, 136600); st.takeItems(13901, 1); st.giveItems(PINS_S[st.getRandom((PINS_S).length)], 1); } else { st.takeItems(57, 136600); st.takeItems(13901, 1); npc.broadcastPacket( new NpcSay(npc.getObjectId(), 0, npc.getNpcId(), "真是狼狽不堪啊...力氣大,果然不好控制。")); } return null; } else htmltext = npc.getNpcId() + "-5.htm"; } else htmltext = npc.getNpcId() + "-4.htm"; st.exitQuest(true); } else if (event.equalsIgnoreCase("c_grade_pouch")) { if (st.getQuestItemsCount(13918) > 0) { if (st.getQuestItemsCount(57) > 2600) { if (Rnd.get(100) < 30) { st.takeItems(57, 2600); st.takeItems(13918, 1); st.giveItems(POUCHS_C[st.getRandom((POUCHS_C).length)], 1); } else { st.takeItems(57, 2600); st.takeItems(13918, 1); npc.broadcastPacket( new NpcSay(npc.getObjectId(), 0, npc.getNpcId(), "真是狼狽不堪啊...力氣大,果然不好控制。")); } return null; } else htmltext = npc.getNpcId() + "-5.htm"; } else htmltext = npc.getNpcId() + "-4.htm"; st.exitQuest(true); } else if (event.equalsIgnoreCase("b_grade_pouch")) { if (st.getQuestItemsCount(13919) > 0) { if (st.getQuestItemsCount(57) > 9400) { if (Rnd.get(100) < 25) { st.takeItems(57, 9400); st.takeItems(13919, 1); st.giveItems(POUCHS_B[st.getRandom((POUCHS_B).length)], 1); } else { st.takeItems(57, 9400); st.takeItems(13919, 1); npc.broadcastPacket( new NpcSay(npc.getObjectId(), 0, npc.getNpcId(), "真是狼狽不堪啊...力氣大,果然不好控制。")); } return null; } else htmltext = npc.getNpcId() + "-5.htm"; } else htmltext = npc.getNpcId() + "-4.htm"; st.exitQuest(true); } else if (event.equalsIgnoreCase("a_grade_pouch")) { if (st.getQuestItemsCount(13920) > 0) { if (st.getQuestItemsCount(57) > 21200) { if (Rnd.get(100) < 20) { st.takeItems(57, 21200); st.takeItems(13920, 1); st.giveItems(POUCHS_A[st.getRandom((POUCHS_A).length)], 1); } else { st.takeItems(57, 21200); st.takeItems(13920, 1); npc.broadcastPacket( new NpcSay(npc.getObjectId(), 0, npc.getNpcId(), "真是狼狽不堪啊...力氣大,果然不好控制。")); } return null; } else htmltext = npc.getNpcId() + "-5.htm"; } else htmltext = npc.getNpcId() + "-4.htm"; st.exitQuest(true); } else if (event.equalsIgnoreCase("s_grade_pouch")) { if (st.getQuestItemsCount(13921) > 0) { if (st.getQuestItemsCount(57) > 109300) { if (Rnd.get(100) < 15) { st.takeItems(57, 109300); st.takeItems(13921, 1); st.giveItems(POUCHS_S[st.getRandom((POUCHS_S).length)], 1); } else { st.takeItems(57, 109300); st.takeItems(13921, 1); npc.broadcastPacket( new NpcSay(npc.getObjectId(), 0, npc.getNpcId(), "真是狼狽不堪啊...力氣大,果然不好控制。")); } return null; } else htmltext = npc.getNpcId() + "-5.htm"; } else htmltext = npc.getNpcId() + "-4.htm"; st.exitQuest(true); } return htmltext; }