@Override public String onKill(L2Npc npc, L2PcInstance player, boolean isPet) { if (player.getClan() == null) { return null; } QuestState st = null; if (player.isClanLeader()) { st = player.getQuestState(getClass()); } else { L2PcInstance pleader = player.getClan().getLeader().getPlayerInstance(); if (pleader != null && player.isInsideRadius(pleader, 1500, true, false)) { st = pleader.getQuestState(getClass()); } } if (st != null && st.isStarted()) { int raid = st.getInt("raid"); if (REWARD_POINTS.containsKey(raid)) { if (npc.getNpcId() == REWARD_POINTS.get(raid)[0] && !st.hasQuestItems(REWARD_POINTS.get(raid)[1])) { st.rewardItems(REWARD_POINTS.get(raid)[1], 1); st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET); } } } return null; }
@Override public String onTalk(L2Npc npc, QuestState st) { L2PcInstance player = st.getPlayer(); if (npc.getNpcId() == Типия) { switch (st.getState()) { case COMPLETED: return "orbis_typia_q10318_03.htm"; case CREATED: QuestState previous = player.getQuestState(_10317_OrbisWitch.class); if (previous == null || !previous.isCompleted() || player.getLevel() < 95) { st.exitQuest(QuestType.REPEATABLE); return "orbis_typia_q10318_02.htm"; } else { return "orbis_typia_q10318_01.htm"; } case STARTED: if (st.getCond() == 1) { return !st.hasQuestItems(ПроклятаяСлизь) ? "orbis_typia_q10318_08.htm" : "orbis_typia_q10318_09.htm"; } else if (st.getCond() == 2 && st.getQuestItemsCount(ПроклятаяСлизь) >= 8) { st.addExpAndSp(79260650, 36253450); st.giveAdena(5427900, true); st.playSound(QuestSound.ITEMSOUND_QUEST_FINISH); st.exitQuest(QuestType.ONE_TIME); return "orbis_typia_q10318_10.htm"; } } } return getNoQuestMsg(player); }
@Override public String onTalk(L2Npc npc, QuestState st) { L2PcInstance player = st.getPlayer(); L2Clan clan = player.getClan(); switch (st.getState()) { case CREATED: return clan == null || !player.isClanLeader() || clan.getLevel() < 6 ? "31331-0a.htm" : "31331-0b.htm"; case STARTED: if (clan == null || !player.isClanLeader()) { st.exitQuest(QuestType.REPEATABLE); return "31331-6.html"; } int raid = st.getInt("raid"); if (REWARD_POINTS.containsKey(raid)) { if (st.hasQuestItems(REWARD_POINTS.get(raid)[1])) { st.playSound(QuestSound.ITEMSOUND_QUEST_FANFARE_1); st.takeItems(REWARD_POINTS.get(raid)[1], -1); clan.addReputationScore(REWARD_POINTS.get(raid)[2], true); player.sendPacket( SystemMessage.getSystemMessage( SystemMessageId.CLAN_QUEST_COMPLETED_AND_S1_POINTS_GAINED) .addNumber(REWARD_POINTS.get(raid)[2])); clan.broadcastToOnlineMembers(new PledgeShowInfoUpdate(clan)); return "31331-" + raid + "b.html"; } else { return "31331-" + raid + "a.html"; } } else { return "31331-0.html"; } } return null; }