Skip to content

Instantly share code, notes, and snippets.

@nonom
Last active June 28, 2017 23:36
Show Gist options
  • Save nonom/b8405b6864cfea2346ec to your computer and use it in GitHub Desktop.
Save nonom/b8405b6864cfea2346ec to your computer and use it in GitHub Desktop.
Index: dist/game/data/scripts.cfg
===================================================================
--- dist/game/data/scripts.cfg (revision 9958)
+++ dist/game/data/scripts.cfg (working copy)
@@ -183,8 +183,6 @@
instances/Kamaloka/Kamaloka.java
#instances/MithrilMine/MithrilMine.java
instances/NornilsGarden/NornilsGarden.java
-instances/Pailaka/PailakaDevilsLegacy.java
-instances/Pailaka/PailakaSongOfIceAndFire.java
instances/RankuFloor/RankuFloor.java
instances/SanctumOftheLordsOfDawn/SanctumOftheLordsOfDawn.java
instances/SecretArea/SecretArea.java
@@ -300,6 +298,8 @@
quests/Q00124_MeetingTheElroki/Q00124_MeetingTheElroki.java
quests/Q00125_TheNameOfEvil1/Q00125_TheNameOfEvil1.java
quests/Q00126_TheNameOfEvil2/Q00126_TheNameOfEvil2.java
+quests/Q00128_PailakaSongOfIceAndFire/Q00128_PailakaSongOfIceAndFire.java
+quests/Q00129_PailakaDevilsLegacy/Q00129_PailakaDevilsLegacy.java
quests/Q00130_PathToHellbound/Q00130_PathToHellbound.java
quests/Q00131_BirdInACage/Q00131_BirdInACage.java
quests/Q00132_MatrasCuriosity/Q00132_MatrasCuriosity.java
Index: dist/game/data/scripts/instances/Pailaka/PailakaDevilsLegacy.java
===================================================================
--- dist/game/data/scripts/instances/Pailaka/PailakaDevilsLegacy.java (revision 9942)
+++ dist/game/data/scripts/instances/Pailaka/PailakaDevilsLegacy.java (working copy)
@@ -1,624 +0,0 @@
-/*
- * Copyright (C) 2004-2013 L2J DataPack
- *
- * This file is part of L2J DataPack.
- *
- * L2J DataPack is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * L2J DataPack is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package instances.Pailaka;
-
-import java.util.List;
-
-import javolution.util.FastList;
-
-import com.l2jserver.gameserver.ThreadPoolManager;
-import com.l2jserver.gameserver.ai.CtrlIntention;
-import com.l2jserver.gameserver.datatables.SkillTable;
-import com.l2jserver.gameserver.enums.QuestSound;
-import com.l2jserver.gameserver.instancemanager.InstanceManager;
-import com.l2jserver.gameserver.model.actor.L2Attackable;
-import com.l2jserver.gameserver.model.actor.L2Character;
-import com.l2jserver.gameserver.model.actor.L2Npc;
-import com.l2jserver.gameserver.model.actor.L2Playable;
-import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance;
-import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jserver.gameserver.model.entity.Instance;
-import com.l2jserver.gameserver.model.instancezone.InstanceWorld;
-import com.l2jserver.gameserver.model.quest.Quest;
-import com.l2jserver.gameserver.model.quest.QuestState;
-import com.l2jserver.gameserver.model.quest.State;
-import com.l2jserver.gameserver.model.skills.L2Skill;
-import com.l2jserver.gameserver.model.zone.L2ZoneType;
-import com.l2jserver.gameserver.network.SystemMessageId;
-import com.l2jserver.gameserver.network.serverpackets.MagicSkillUse;
-
-/**
- * Pailaka (Devil's Isle) instance zone.
- */
-public class PailakaDevilsLegacy extends Quest
-{
- private static final int MIN_LEVEL = 61;
- private static final int MAX_LEVEL = 67;
- private static final int EXIT_TIME = 5;
- private static final int INSTANCE_ID = 44;
- protected static final int[] TELEPORT =
- {
- 76428,
- -219038,
- -3752
- };
- private static final int ZONE = 20109;
-
- private static final int SURVIVOR = 32498;
- private static final int SUPPORTER = 32501;
- private static final int ADVENTURER1 = 32508;
- private static final int ADVENTURER2 = 32511;
-
- private static final int KAMS = 18629;
- private static final int HIKORO = 18630;
- private static final int ALKASO = 18631;
- private static final int GERBERA = 18632;
- private static final int LEMATAN = 18633;
- private static final int FOLLOWERS = 18634;
- private static final int TREASURE_BOX = 32495;
- private static final int POWDER_KEG = 18622;
- private static final int[] MONSTERS =
- {
- KAMS,
- HIKORO,
- ALKASO,
- GERBERA,
- LEMATAN,
- FOLLOWERS,
- TREASURE_BOX,
- POWDER_KEG,
- 18623,
- 18624,
- 18625,
- 18626,
- 18627
- };
-
- private static final int SWORD = 13042;
- private static final int ENH_SWORD1 = 13043;
- private static final int ENH_SWORD2 = 13044;
- private static final int SCROLL_1 = 13046;
- private static final int SCROLL_2 = 13047;
- private static final int HEALING_POTION = 13033;
- private static final int ANTIDOTE_POTION = 13048;
- private static final int DIVINE_POTION = 13049;
- private static final int DEFENCE_POTION = 13059;
- private static final int PAILAKA_KEY = 13150;
-
- private static boolean _isTeleportScheduled = false;
- private static boolean _isOnShip = false;
- private static L2Npc _lematanNpc = null;
- private List<L2Npc> _followerslist;
-
- private static final int[] ITEMS =
- {
- SWORD,
- ENH_SWORD1,
- ENH_SWORD2,
- SCROLL_1,
- SCROLL_2,
- HEALING_POTION,
- ANTIDOTE_POTION,
- DIVINE_POTION,
- DEFENCE_POTION,
- PAILAKA_KEY
- };
-
- // @formatter:off
- private static final int[][] DROPLIST =
- {
- // must be sorted by npcId !
- // npcId, itemId, chance, max
- { TREASURE_BOX, HEALING_POTION, 20 },
- { TREASURE_BOX, DIVINE_POTION, 40 },
- { TREASURE_BOX, DEFENCE_POTION, 60 },
- { TREASURE_BOX, PAILAKA_KEY, 80 },
- { TREASURE_BOX, ANTIDOTE_POTION, 100 }
- };
-
- private static final int[][] HP_HERBS_DROPLIST =
- {
- // itemId, count, chance
- { 8602, 1, 10 },
- { 8601, 1, 40 },
- { 8600, 1, 70 }
- };
-
- private static final int[][] MP_HERBS_DROPLIST =
- {
- // itemId, count, chance
- { 8605, 1, 10 },
- { 8604, 1, 40 },
- { 8603, 1, 70 }
- };
-
- private static final int[] REWARDS =
- {
- 13295,
- 13129
- };
-
- private static final int[][] FOLLOWERS_SPAWNS =
- {
- { 85067, -208943, -3336, 20106, 60 },
- { 84904, -208944, -3336, 10904, 60 },
- { 85062, -208538, -3336, 44884, 60 },
- { 84897, -208542, -3336, 52973, 60 },
- { 84808, -208633, -3339, 65039, 60 },
- { 84808, -208856, -3339, 0, 60 },
- { 85144, -208855, -3341, 33380, 60 },
- { 85139, -208630, -3339, 31777, 60 }
- };
- // @formatter:on
-
- private static L2Skill boom_skill = SkillTable.getInstance().getInfo(5714, 1);
- private static L2Skill energy_skill = SkillTable.getInstance().getInfo(5712, 1);
-
- private void attackPlayer(L2Attackable npc, L2Playable attacker)
- {
- npc.setIsRunning(true);
- npc.addDamageHate(attacker, 0, 999);
- npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker);
- }
-
- private static final void dropHerb(L2Npc mob, L2PcInstance player, int[][] drop)
- {
- final int chance = getRandom(100);
- for (int[] element : drop)
- {
- if (chance < element[2])
- {
- ((L2MonsterInstance) mob).dropItem(player, element[0], element[1]);
- return;
- }
- }
- }
-
- private static final void dropItem(L2Npc mob, L2PcInstance player)
- {
- final int npcId = mob.getId();
- final int chance = getRandom(100);
- for (int[] drop : DROPLIST)
- {
- if (npcId == drop[0])
- {
- if (chance < drop[2])
- {
- ((L2MonsterInstance) mob).dropItem(player, drop[1], getRandom(1, 6));
- return;
- }
- }
- if (npcId < drop[0])
- {
- return; // not found
- }
- }
- }
-
- protected static final void teleportPlayer(L2PcInstance player, int[] coords, int instanceId)
- {
- player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
- player.setInstanceId(instanceId);
- player.teleToLocation(coords[0], coords[1], coords[2], true);
- }
-
- private final synchronized void enterInstance(L2PcInstance player)
- {
- // check for existing instances for this player
- InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
- if (world != null)
- {
- if (world.getTemplateId() != INSTANCE_ID)
- {
- player.sendPacket(SystemMessageId.ALREADY_ENTERED_ANOTHER_INSTANCE_CANT_ENTER);
- return;
- }
- Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
- if (inst != null)
- {
- teleportPlayer(player, TELEPORT, world.getInstanceId());
- }
- return;
- }
- // New instance
- final int instanceId = InstanceManager.getInstance().createDynamicInstance("PailakaDevilsLegacy.xml");
- world = new InstanceWorld();
- world.setInstanceId(instanceId);
- world.setTemplateId(INSTANCE_ID);
- InstanceManager.getInstance().addWorld(world);
-
- world.addAllowed(player.getObjectId());
- teleportPlayer(player, TELEPORT, instanceId);
-
- _lematanNpc = addSpawn(LEMATAN, 88108, -209252, -3744, 64255, false, 0, false, instanceId);
-
- }
-
- @Override
- public final String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
- {
- // Must be here, because of player == null
- if ((npc.getId() == FOLLOWERS) && event.equals("follower_cast"))
- {
- if (!npc.isCastingNow() && !npc.isDead() && !_lematanNpc.isDead())
- {
- npc.setTarget(_lematanNpc);
- npc.doCast(energy_skill);
- }
- startQuestTimer("follower_cast", 2000 + getRandom(100, 1000), npc, null);
- return null;
- }
- else if ((npc.getId() == POWDER_KEG) && event.equalsIgnoreCase("keg_trigger"))
- {
- onAttack(npc, player, 600, false);
- }
-
- final QuestState st = player.getQuestState(getName());
- if (st == null)
- {
- return getNoQuestMsg(player);
- }
-
- if (event.equalsIgnoreCase("enter"))
- {
- enterInstance(player);
- if (st.isCond(1))
- {
- st.setCond(2, true);
- return "32498-07.htm";
- }
- return "32498-09.htm";
- }
- else if (event.equalsIgnoreCase("32498-05.htm"))
- {
- if (st.isCond(0))
- {
- st.startQuest();
- }
- }
- else if (event.equalsIgnoreCase("32501-03.htm"))
- {
- if (st.isCond(2))
- {
- giveItems(player, SWORD, 1);
- st.setCond(3, true);
- }
- }
- else if (event.equalsIgnoreCase("lematan_teleport"))
- {
- if ((npc.getId() == LEMATAN) && !npc.isMovementDisabled() && !_isOnShip)
- {
- // Reduce Hate
- ((L2Attackable) npc).reduceHate(player, 9999);
- ((L2Attackable) npc).abortAttack();
- ((L2Attackable) npc).abortCast();
- // Broadcast Escape
- npc.broadcastPacket(new MagicSkillUse(npc, 2100, 1, 1000, 0));
- // Schedule telport - when Lematan Finish casting
- startQuestTimer("lematan_finish_teleport", 1500, npc, player);
- }
- else
- {
- _isTeleportScheduled = false;
- }
- return null;
- }
- else if ((npc.getId() == LEMATAN) && event.equalsIgnoreCase("lematan_finish_teleport") && !_isOnShip)
- {
- // Teleport Lematan
- npc.teleToLocation(84973, -208721, -3340);
- // Set onShip
- _isOnShip = true;
- // Set Spawn loc to ship. If he loose aggro he should stay on board ;)
- npc.getSpawn().setX(84973);
- npc.getSpawn().setY(-208721);
- npc.getSpawn().setZ(-3340);
- // To be sure, reduce again
- ((L2Attackable) npc).reduceHate(player, 9999);
- // Spawn followers
- _followerslist = new FastList<>();
- for (int[] SPAWN : FOLLOWERS_SPAWNS)
- {
- L2Npc _follower = addSpawn(FOLLOWERS, SPAWN[0], SPAWN[1], SPAWN[2], SPAWN[3], false, 0, true, player.getInstanceId());
- if (_follower != null)
- {
- _followerslist.add(_follower);
- }
- }
- return null;
- }
- return event;
- }
-
- @Override
- public final String onFirstTalk(L2Npc npc, L2PcInstance player)
- {
- final QuestState st = player.getQuestState(getName());
- if ((npc.getId() != ADVENTURER2) || (st == null) || !st.isCompleted())
- {
- return npc.getId() + ".htm";
- }
- return "32511-03.htm";
- }
-
- @Override
- public final String onTalk(L2Npc npc, L2PcInstance player)
- {
- final QuestState st = player.getQuestState(getName());
- if (st == null)
- {
- return getNoQuestMsg(player);
- }
-
- switch (npc.getId())
- {
- case SURVIVOR:
- switch (st.getState())
- {
- case State.CREATED:
- if (player.getLevel() < MIN_LEVEL)
- {
- return "32498-11.htm";
- }
- if (player.getLevel() > MAX_LEVEL)
- {
- return "32498-12.htm";
- }
- return "32498-01.htm";
- case State.STARTED:
- if (st.getCond() > 1)
- {
- return "32498-08.htm";
- }
- return "32498-06.htm";
- case State.COMPLETED:
- return "32498-10.htm";
- default:
- return "32498-01.htm";
- }
- case SUPPORTER:
- if (st.getCond() > 2)
- {
- return "32501-04.htm";
- }
- return "32501-01.htm";
- case ADVENTURER1:
- if (!player.hasSummon())
- {
- if (hasQuestItems(player, SWORD))
- {
- if (hasQuestItems(player, SCROLL_1))
- {
- takeItems(player, SWORD, -1);
- takeItems(player, SCROLL_1, -1);
- giveItems(player, ENH_SWORD1, 1);
- return "32508-03.htm";
- }
- return "32508-02.htm";
- }
-
- if (hasQuestItems(player, ENH_SWORD1))
- {
- if (hasQuestItems(player, SCROLL_2))
- {
- takeItems(player, ENH_SWORD1, -1);
- takeItems(player, SCROLL_2, -1);
- giveItems(player, ENH_SWORD2, 1);
- return "32508-05.htm";
- }
- return "32508-04.htm";
- }
-
- if (hasQuestItems(player, ENH_SWORD2))
- {
- return "32508-06.htm";
- }
- return "32508-00.htm";
- }
- return "32508-07.htm";
- case ADVENTURER2:
- if (!player.hasSummon())
- {
- st.exitQuest(false, true);
-
- Instance inst = InstanceManager.getInstance().getInstance(npc.getInstanceId());
- inst.setDuration(EXIT_TIME * 60000);
- inst.setEmptyDestroyTime(0);
-
- if (inst.containsPlayer(player.getObjectId()))
- {
- player.setVitalityPoints(20000, true);
- addExpAndSp(player, 10800000, 950000);
- for (int id : REWARDS)
- {
- giveItems(player, id, 1);
- }
- }
- return "32511-01.htm";
- }
- return "32511-02.htm";
- }
- return getNoQuestMsg(player);
- }
-
- @Override
- public final String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon)
- {
- if ((npc.getId() == POWDER_KEG) && !npc.isDead())
- {
- npc.doCast(boom_skill);
-
- if (npc.getKnownList() != null)
- {
- for (L2Character target : npc.getKnownList().getKnownCharactersInRadius(900))
- {
- target.reduceCurrentHp(500 + getRandom(0, 200), npc, boom_skill);
-
- if (target instanceof L2MonsterInstance)
- {
- if (target.getId() == POWDER_KEG)
- {
- startQuestTimer("keg_trigger", 500, (L2Npc) target, attacker);
- }
- else
- {
- if (isSummon)
- {
- attackPlayer((L2Attackable) npc, attacker.getSummon());
- }
- else
- {
- attackPlayer((L2Attackable) npc, attacker);
- }
- }
- }
- }
- }
- if (!npc.isDead())
- {
- npc.doDie(attacker);
- }
- }
- else if ((npc.getId() == LEMATAN) && (npc.getCurrentHp() < (npc.getMaxHp() / 2)) && !_isTeleportScheduled)
- {
- startQuestTimer("lematan_teleport", 1000, npc, attacker);
- }
- else if (npc.getId() == TREASURE_BOX)
- {
- dropItem(npc, attacker);
- npc.doDie(attacker);
- }
-
- return super.onAttack(npc, attacker, damage, isSummon);
- }
-
- @Override
- public final String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
- {
- final QuestState st = player.getQuestState(getName());
- if ((st != null) && st.isStarted())
- {
- switch (npc.getId())
- {
- case KAMS:
- if (hasQuestItems(player, SWORD))
- {
- giveItems(player, SCROLL_1, 1);
- playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
- }
- break;
- case ALKASO:
- if (hasQuestItems(player, ENH_SWORD1))
- {
- giveItems(player, SCROLL_2, 1);
- playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
- }
- break;
- case LEMATAN:
- if ((_followerslist != null) && !_followerslist.isEmpty())
- {
- for (L2Npc _follower : _followerslist)
- {
- _follower.deleteMe();
- }
- _followerslist.clear();
- }
- st.setCond(4, true);
- addSpawn(ADVENTURER2, 84983, -208736, -3336, 49915, false, 0, false, npc.getInstanceId());
- break;
- case POWDER_KEG:
- case TREASURE_BOX:
- case FOLLOWERS:
- // do nothing
- break;
- default:
- // hardcoded herb drops
- dropHerb(npc, player, HP_HERBS_DROPLIST);
- dropHerb(npc, player, MP_HERBS_DROPLIST);
- break;
- }
- }
- return super.onKill(npc, player, isSummon);
- }
-
- @Override
- public final String onSpawn(L2Npc npc)
- {
- startQuestTimer("follower_cast", 1000 + getRandom(100, 1000), npc, null);
- npc.disableCoreAI(true);
- return null;
- }
-
- @Override
- public String onEnterZone(L2Character character, L2ZoneType zone)
- {
- if ((character instanceof L2PcInstance) && !character.isDead() && !character.isTeleporting() && ((L2PcInstance) character).isOnline())
- {
- InstanceWorld world = InstanceManager.getInstance().getWorld(character.getInstanceId());
- if ((world != null) && (world.getTemplateId() == INSTANCE_ID))
- {
- ThreadPoolManager.getInstance().scheduleGeneral(new Teleport(character, world.getInstanceId()), 1000);
- }
- }
- return super.onEnterZone(character, zone);
- }
-
- static final class Teleport implements Runnable
- {
- private final L2Character _char;
- private final int _instanceId;
-
- public Teleport(L2Character c, int id)
- {
- _char = c;
- _instanceId = id;
- }
-
- @Override
- public void run()
- {
- try
- {
- teleportPlayer((L2PcInstance) _char, TELEPORT, _instanceId);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
-
- private PailakaDevilsLegacy()
- {
- super(129, "129_PailakaDevilsLegacy", "Pailaka - Devil's Legacy");
- addStartNpc(SURVIVOR);
- addFirstTalkId(SURVIVOR, SUPPORTER, ADVENTURER1, ADVENTURER2);
- addTalkId(SURVIVOR, SUPPORTER, ADVENTURER1, ADVENTURER2);
- addAttackId(TREASURE_BOX, POWDER_KEG, LEMATAN);
- addKillId(MONSTERS);
- addEnterZoneId(ZONE);
- addSpawnId(FOLLOWERS);
- registerQuestItems(ITEMS);
- }
-
- public static void main(String[] args)
- {
- new PailakaDevilsLegacy();
- }
-}
\ No newline at end of file
Index: dist/game/data/scripts/instances/Pailaka/PailakaSongOfIceAndFire.java
===================================================================
--- dist/game/data/scripts/instances/Pailaka/PailakaSongOfIceAndFire.java (revision 9942)
+++ dist/game/data/scripts/instances/Pailaka/PailakaSongOfIceAndFire.java (working copy)
@@ -1,574 +0,0 @@
-/*
- * Copyright (C) 2004-2013 L2J DataPack
- *
- * This file is part of L2J DataPack.
- *
- * L2J DataPack is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * L2J DataPack is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-package instances.Pailaka;
-
-import com.l2jserver.gameserver.ThreadPoolManager;
-import com.l2jserver.gameserver.ai.CtrlIntention;
-import com.l2jserver.gameserver.enums.QuestSound;
-import com.l2jserver.gameserver.instancemanager.InstanceManager;
-import com.l2jserver.gameserver.model.actor.L2Character;
-import com.l2jserver.gameserver.model.actor.L2Npc;
-import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance;
-import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
-import com.l2jserver.gameserver.model.entity.Instance;
-import com.l2jserver.gameserver.model.instancezone.InstanceWorld;
-import com.l2jserver.gameserver.model.quest.Quest;
-import com.l2jserver.gameserver.model.quest.QuestState;
-import com.l2jserver.gameserver.model.quest.State;
-import com.l2jserver.gameserver.model.zone.L2ZoneType;
-import com.l2jserver.gameserver.network.NpcStringId;
-import com.l2jserver.gameserver.network.SystemMessageId;
-import com.l2jserver.gameserver.network.clientpackets.Say2;
-import com.l2jserver.gameserver.network.serverpackets.NpcSay;
-import com.l2jserver.gameserver.util.Broadcast;
-
-/**
- * Pailaka (Forgotten Temple) instance zone.
- */
-public class PailakaSongOfIceAndFire extends Quest
-{
- private static final int MIN_LEVEL = 36;
- private static final int MAX_LEVEL = 42;
- private static final int EXIT_TIME = 5;
- private static final int INSTANCE_ID = 43;
- protected static final int[] TELEPORT =
- {
- -52875,
- 188232,
- -4696
- };
- private static final int ZONE = 20108;
-
- private static final int ADLER1 = 32497;
- private static final int ADLER2 = 32510;
- private static final int SINAI = 32500;
- private static final int INSPECTOR = 32507;
-
- private static final int HILLAS = 18610;
- private static final int PAPION = 18609;
- private static final int KINSUS = 18608;
- private static final int GARGOS = 18607;
- private static final int ADIANTUM = 18620;
- private static final int BLOOM = 18616;
- private static final int BOTTLE = 32492;
- private static final int BRAZIER = 32493;
- private static final int[] MONSTERS =
- {
- HILLAS,
- PAPION,
- KINSUS,
- GARGOS,
- ADIANTUM,
- BLOOM,
- BOTTLE,
- BRAZIER,
- 18611,
- 18612,
- 18613,
- 18614,
- 18615
- };
-
- private static final int SWORD = 13034;
- private static final int ENH_SWORD1 = 13035;
- private static final int ENH_SWORD2 = 13036;
- private static final int BOOK1 = 13130;
- private static final int BOOK2 = 13131;
- private static final int BOOK3 = 13132;
- private static final int BOOK4 = 13133;
- private static final int BOOK5 = 13134;
- private static final int BOOK6 = 13135;
- private static final int BOOK7 = 13136;
- private static final int WATER_ESSENCE = 13038;
- private static final int FIRE_ESSENCE = 13039;
- private static final int SHIELD_POTION = 13032;
- private static final int HEAL_POTION = 13033;
- private static final int FIRE_ENHANCER = 13040;
- private static final int WATER_ENHANCER = 13041;
- private static final int[] ITEMS =
- {
- SWORD,
- ENH_SWORD1,
- ENH_SWORD2,
- BOOK1,
- BOOK2,
- BOOK3,
- BOOK4,
- BOOK5,
- BOOK6,
- BOOK7,
- WATER_ESSENCE,
- FIRE_ESSENCE,
- SHIELD_POTION,
- HEAL_POTION,
- FIRE_ENHANCER,
- WATER_ENHANCER
- };
-
- // @formatter:off
- private static final int[][] DROPLIST =
- {
- // must be sorted by npcId !
- // npcId, itemId, chance
- {
- BLOOM, SHIELD_POTION, 30
- },
- {
- BLOOM, HEAL_POTION, 80
- },
- {
- BOTTLE, SHIELD_POTION, 10
- },
- {
- BOTTLE, WATER_ENHANCER, 40
- },
- {
- BOTTLE, HEAL_POTION, 80
- },
- {
- BRAZIER, SHIELD_POTION, 10
- },
- {
- BRAZIER, FIRE_ENHANCER, 40
- },
- {
- BRAZIER, HEAL_POTION, 80
- }
- };
-
- /**
- * itemId, count, chance
- */
- private static final int[][] HP_HERBS_DROPLIST =
- {
- {
- 8602, 1, 10
- },
- {
- 8601, 1, 40
- },
- {
- 8600, 1, 70
- }
- };
-
- /**
- * itemId, count, chance
- */
- private static final int[][] MP_HERBS_DROPLIST =
- {
- {
- 8605, 1, 10
- },
- {
- 8604, 1, 40
- },
- {
- 8603, 1, 70
- }
- };
- // @formatter:on
-
- private static final int[] REWARDS =
- {
- 13294,
- 13293,
- 13129
- };
- /** Flag for "see creature". */
- private boolean _seenCreature = false;
-
- private static final void dropHerb(L2Npc mob, L2PcInstance player, int[][] drop)
- {
- final int chance = getRandom(100);
- for (int[] element : drop)
- {
- if (chance < element[2])
- {
- ((L2MonsterInstance) mob).dropItem(player, element[0], element[1]);
- return;
- }
- }
- }
-
- private static final void dropItem(L2Npc mob, L2PcInstance player)
- {
- final int npcId = mob.getId();
- final int chance = getRandom(100);
- for (int[] drop : DROPLIST)
- {
- if (npcId == drop[0])
- {
- if (chance < drop[2])
- {
- ((L2MonsterInstance) mob).dropItem(player, drop[1], getRandom(1, 6));
- return;
- }
- }
- if (npcId < drop[0])
- {
- return; // not found
- }
- }
- }
-
- protected static final void teleportPlayer(L2PcInstance player, int[] coords, int instanceId)
- {
- player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
- player.setInstanceId(instanceId);
- player.teleToLocation(coords[0], coords[1], coords[2], true);
- }
-
- private final synchronized void enterInstance(L2PcInstance player)
- {
- // check for existing instances for this player
- InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
- if (world != null)
- {
- if (world.getTemplateId() != INSTANCE_ID)
- {
- player.sendPacket(SystemMessageId.ALREADY_ENTERED_ANOTHER_INSTANCE_CANT_ENTER);
- return;
- }
- Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
- if (inst != null)
- {
- teleportPlayer(player, TELEPORT, world.getInstanceId());
- }
- return;
- }
- // New instance
- final int instanceId = InstanceManager.getInstance().createDynamicInstance("PailakaSongOfIceAndFire.xml");
-
- world = new InstanceWorld();
- world.setInstanceId(instanceId);
- world.setTemplateId(INSTANCE_ID);
- InstanceManager.getInstance().addWorld(world);
-
- world.addAllowed(player.getObjectId());
- teleportPlayer(player, TELEPORT, instanceId);
-
- }
-
- @Override
- public final String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
- {
- final QuestState st = player.getQuestState(getName());
- if (st == null)
- {
- return getNoQuestMsg(player);
- }
-
- switch (event)
- {
- case "enter":
- enterInstance(player);
- return null;
- case "32497-03.htm":
- if (!st.isStarted())
- {
- st.startQuest();
- }
- break;
- case "32500-06.htm":
- if (st.isCond(1))
- {
- st.setCond(2, true);
- giveItems(player, SWORD, 1);
- giveItems(player, BOOK1, 1);
- }
- break;
- case "32507-04.htm":
- if (st.isCond(3))
- {
- st.setCond(4, true);
- takeItems(player, SWORD, -1);
- takeItems(player, WATER_ESSENCE, -1);
- takeItems(player, BOOK2, -1);
- giveItems(player, BOOK3, 1);
- giveItems(player, ENH_SWORD1, 1);
- }
- break;
- case "32507-08.htm":
- if (st.isCond(6))
- {
- st.setCond(7, true);
- takeItems(player, ENH_SWORD1, -1);
- takeItems(player, BOOK5, -1);
- takeItems(player, FIRE_ESSENCE, -1);
- giveItems(player, ENH_SWORD2, 1);
- giveItems(player, BOOK6, 1);
- }
- break;
- case "32510-02.htm":
- st.exitQuest(false, true);
-
- Instance inst = InstanceManager.getInstance().getInstance(npc.getInstanceId());
- inst.setDuration(EXIT_TIME * 60000);
- inst.setEmptyDestroyTime(0);
-
- if (inst.containsPlayer(player.getObjectId()))
- {
- player.setVitalityPoints(20000, true);
- addExpAndSp(player, 810000, 50000);
- for (int id : REWARDS)
- {
- giveItems(player, id, 1);
- }
- }
- break;
- case "GARGOS_LAUGH":
- {
- Broadcast.toKnownPlayers(npc, new NpcSay(npc.getObjectId(), Say2.NPC_SHOUT, npc.getTemplate().getIdTemplate(), NpcStringId.OHHOHOH));
- break;
- }
- }
- return event;
- }
-
- @Override
- public final String onFirstTalk(L2Npc npc, L2PcInstance player)
- {
- return npc.getId() + ".htm";
- }
-
- @Override
- public final String onTalk(L2Npc npc, L2PcInstance player)
- {
- final QuestState st = player.getQuestState(getName());
- if (st == null)
- {
- return getNoQuestMsg(player);
- }
-
- switch (npc.getId())
- {
- case ADLER1:
- switch (st.getState())
- {
- case State.CREATED:
- if (player.getLevel() < MIN_LEVEL)
- {
- return "32497-05.htm";
- }
- if (player.getLevel() > MAX_LEVEL)
- {
- return "32497-06.htm";
- }
- return "32497-01.htm";
- case State.STARTED:
- if (st.getCond() > 1)
- {
- return "32497-00.htm";
- }
- return "32497-03.htm";
- case State.COMPLETED:
- return "32497-07.htm";
- default:
- return "32497-01.htm";
- }
- case SINAI:
- if (st.getCond() > 1)
- {
- return "32500-00.htm";
- }
- return "32500-01.htm";
- case INSPECTOR:
- switch (st.getCond())
- {
- case 1:
- return "32507-01.htm";
- case 2:
- return "32507-02.htm";
- case 3:
- return "32507-03.htm";
- case 4:
- case 5:
- return "32507-05.htm";
- case 6:
- return "32507-06.htm";
- default:
- return "32507-09.htm";
- }
- case ADLER2:
- if (st.isCompleted())
- {
- return "32510-00.htm";
- }
- else if (st.isCond(9))
- {
- return "32510-01.htm";
- }
- }
- return getNoQuestMsg(player);
- }
-
- @Override
- public final String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon)
- {
- if (!npc.isDead())
- {
- npc.doDie(attacker);
- }
-
- return super.onAttack(npc, attacker, damage, isSummon);
- }
-
- @Override
- public final String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
- {
- final QuestState st = player.getQuestState(getName());
- if ((st != null) && st.isStarted())
- {
- switch (npc.getId())
- {
- case HILLAS:
- if (st.isCond(2))
- {
- st.setCond(3);
- playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
- takeItems(player, BOOK1, -1);
- giveItems(player, BOOK2, 1);
- giveItems(player, WATER_ESSENCE, 1);
- }
- addSpawn(PAPION, -53903, 181484, -4555, 30456, false, 0, false, npc.getInstanceId());
- break;
- case PAPION:
- if (st.isCond(4))
- {
- st.setCond(5);
- takeItems(player, BOOK3, -1);
- giveItems(player, BOOK4, 1);
- playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
- }
- addSpawn(KINSUS, -61415, 181418, -4818, 63852, false, 0, false, npc.getInstanceId());
- break;
- case KINSUS:
- if (st.isCond(5))
- {
- st.setCond(6);
- playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
- takeItems(player, BOOK4, -1);
- giveItems(player, BOOK5, 1);
- giveItems(player, FIRE_ESSENCE, 1);
- }
- addSpawn(GARGOS, -61354, 183624, -4821, 63613, false, 0, false, npc.getInstanceId());
- break;
- case GARGOS:
- if (st.isCond(7))
- {
- st.setCond(8);
- playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
- takeItems(player, BOOK6, -1);
- giveItems(player, BOOK7, 1);
- }
- addSpawn(ADIANTUM, -53297, 185027, -4617, 1512, false, 0, false, npc.getInstanceId());
- break;
- case ADIANTUM:
- if (st.isCond(8))
- {
- st.setCond(9);
- playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
- takeItems(player, BOOK7, -1);
- addSpawn(ADLER2, -53297, 185027, -4617, 33486, false, 0, false, npc.getInstanceId());
- }
- break;
- case BOTTLE:
- case BRAZIER:
- case BLOOM:
- dropItem(npc, player);
- break;
- default:
- // hardcoded herb drops
- dropHerb(npc, player, HP_HERBS_DROPLIST);
- dropHerb(npc, player, MP_HERBS_DROPLIST);
- break;
- }
- }
- return super.onKill(npc, player, isSummon);
- }
-
- @Override
- public String onExitZone(L2Character character, L2ZoneType zone)
- {
- if ((character instanceof L2PcInstance) && !character.isDead() && !character.isTeleporting() && ((L2PcInstance) character).isOnline())
- {
- InstanceWorld world = InstanceManager.getInstance().getWorld(character.getInstanceId());
- if ((world != null) && (world.getTemplateId() == INSTANCE_ID))
- {
- ThreadPoolManager.getInstance().scheduleGeneral(new Teleport(character, world.getInstanceId()), 1000);
- }
- }
- return super.onExitZone(character, zone);
- }
-
- @Override
- public String onSeeCreature(L2Npc npc, L2Character creature, boolean isSummon)
- {
- if (!_seenCreature && creature.isPlayer())
- {
- _seenCreature = true;
- startQuestTimer("GARGOS_LAUGH", 1000, npc, creature.getActingPlayer());
- }
- return super.onSeeCreature(npc, creature, isSummon);
- }
-
- static final class Teleport implements Runnable
- {
- private final L2Character _char;
- private final int _instanceId;
-
- public Teleport(L2Character c, int id)
- {
- _char = c;
- _instanceId = id;
- }
-
- @Override
- public void run()
- {
- try
- {
- teleportPlayer((L2PcInstance) _char, TELEPORT, _instanceId);
- }
- catch (Exception e)
- {
- e.printStackTrace();
- }
- }
- }
-
- private PailakaSongOfIceAndFire()
- {
- super(128, "128_PailakaSongOfIceAndFire", "Pailaka - Song of Ice and Fire");
- addStartNpc(ADLER1);
- addFirstTalkId(ADLER1, ADLER2, SINAI, INSPECTOR);
- addTalkId(ADLER1, ADLER2, SINAI, INSPECTOR);
- addAttackId(BOTTLE, BRAZIER);
- addKillId(MONSTERS);
- addExitZoneId(ZONE);
- addSeeCreatureId(GARGOS);
- registerQuestItems(ITEMS);
- }
-
- public static void main(String[] args)
- {
- new PailakaSongOfIceAndFire();
- }
-}
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-00.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-00.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-00.htm (working copy)
@@ -1,4 +0,0 @@
-<html><body>Inspector Adler:<br>
-Ah, we meet again! Apparently the chaos caused by Pailaka has still not been resolved. If you are willing, I can send you to Pailaka again. What would you like to do?<br>
-<a action="bypass -h Quest 128_PailakaSongOfIceAndFire enter">Enter Pailaka.</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-01.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-01.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-01.htm (working copy)
@@ -1,6 +0,0 @@
-<html><body>Inspector Adler:<br>
-What do you know about Pailaka? The Ivory Tower discovered it shortly after Kamaloka.<br>
-Apparently, it's a kind of "pocket reality" created by Kamaloka's energy acting on places that are filled with a high degree of chaos: old battlefields or the sites of powerful magical experiments, for example.<br>
-Although Pailaka is not part of our reality, what happens there can affect our world...<br>
-<a action="bypass -h Quest 128_PailakaSongOfIceAndFire 32497-02.htm">Keep listening.</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-02.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-02.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-02.htm (working copy)
@@ -1,9 +0,0 @@
-<html><body>Inspector Adler:<br>
-We inspectors were sent by the Ivory Tower to find more about that place.<br>
-We followed the flow of mana and traced the energy of Kamaloka to find likely spots.<br>
-At present, Pailaka has not affected our reality, but who knows what may happen in time? It may even impact next year's harvest.<br>
-We discovered Pailaka in the Forgotten Temple close to here. If you are willing, I would like you to enter Pailaka and restore order. Will you do it?<br>
-<font color="LEVEL">(You will be rewarded for your efforts. Vitality points will be granted to you immediately upon completing the quest. If you receive the reward while your Vitality Level is high, though, you may notice a slight reduction.)</font><br>
-<a action="bypass -h Quest 128_PailakaSongOfIceAndFire 32497-03.htm">Say yes.</a><br>
-<a action="bypass -h Quest 128_PailakaSongOfIceAndFire 32497-04.htm">Say no.</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-03.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-03.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-03.htm (working copy)
@@ -1,6 +0,0 @@
-<html><body>Inspector Adler:<br>
-We really don't know what you will encounter when you open the gateway to Pailaka. But as with Kamaloka, I suspect you will find an ally there willing to share information.<br>
-You should have no difficulty learning what you must do.<br>
-Good luck!<br>
-<a action="bypass -h Quest 128_PailakaSongOfIceAndFire enter">Accept the challenge of Pailaka.</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-04.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-04.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-04.htm (working copy)
@@ -1,3 +0,0 @@
-<html><body>Inspector Adler:<br>
-That's your answer, eh? Well, there's nothing I can say to change your mind. But in my opinion, it would do you good to expand your horizons...
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-05.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-05.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-05.htm (working copy)
@@ -1,5 +0,0 @@
-<html><body>Inspector Adler:<br>
-You don't seem ready to solve the mystery of that place just yet.<br>
-Come back when you are more experienced, and I will entrust you with this mission.<br>
-(Only characters level 36 and higher may undertake this quest.)
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-06.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-06.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-06.htm (working copy)
@@ -1,4 +0,0 @@
-<html><body>Inspector Adler:<br>
-Your spirit is too strong to enter such an unstable region as Pailaka.<br>
-(Only characters level 42 and lower may undertake this quest.)
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-07.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-07.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497-07.htm (working copy)
@@ -1,5 +0,0 @@
-<html><body>Inspector Adler:<br>
-Ah, you are the adventurer I spoke to before! Thanks to your efforts, the strange omens we feared seem to have disappeared.<br>
-But I worry that Pailaka may be different from Kamaloka... True, it has not shown any signs of reappearing.<br>
-But I suspect this is not only Pailaka out there; perhaps in your adventures you will encounter another Pailaka somewhere else.
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32497.htm (working copy)
@@ -1,4 +0,0 @@
-<html><body>Inspector Adler:<br>
-I hear that strange omens have been observed near the Forgotten Temple. I can only hope it's nothing serious...<br>
-<a action="bypass -h npc_%objectId%_Quest">Quest</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-00.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-00.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-00.htm (working copy)
@@ -1,3 +0,0 @@
-<html><body>Inspector Sinai:<br>
-Just do what you've been trained to do. Your book will tell you the specifics.
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-01.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-01.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-01.htm (working copy)
@@ -1,6 +0,0 @@
-<html><body>Inspector Sinai:<br>
-Are you an adventurer? Hmm, finding an adventurer in a dangerous place like this...<br>
-I suppose I shouldn't be surprised! Still, I must admit I didn't expect to find you here.<br>
-Were you sent by the Adventurers Association? Or perhaps you found your way here on your own? Ah, you look puzzled, my friend!<br>
-<a action="bypass -h Quest 128_PailakaSongOfIceAndFire 32500-02.htm">Ask for an explanation.</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-02.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-02.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-02.htm (working copy)
@@ -1,6 +0,0 @@
-<html><body>Inspector Sinai:<br>
-Hmm... Let's see if I can make this brief... Once there was a balance here between the power of the Water and Fire Sprites, but now those two have become increasingly aggressive.<br>
-Worse, I've received a report that some of the Sprites have embraced the chaos and are changing into fearsome monsters.<br>
-We have crafted a weapon to fight them, but we need someone who can wield it...<br>
-<a action="bypass -h Quest 128_PailakaSongOfIceAndFire 32500-03.htm">Ask how to use the weapon.</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-03.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-03.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-03.htm (working copy)
@@ -1,7 +0,0 @@
-<html><body>Inspector Sinai:<br>
-First, of course, you must be able to enter the temple itself.<br>
-We can magically protect ourselves, but others...<br>
-Wait -- you really believe you can do this, don't you? Perhaps you're right! I don't know how, but your aura seems immune to the chaos that has infected this place. It's even better than our magic!<br>
-Who are you, adventurer?<br>
-<a action="bypass -h Quest 128_PailakaSongOfIceAndFire 32500-04.htm">Explain how you got here.</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-04.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-04.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-04.htm (working copy)
@@ -1,7 +0,0 @@
-<html><body>Inspector Sinai:<br>
-If what you say is true, then you really did come here from another dimension!<br>
-There has been much speculation about other dimensions at our Ivory Tower, but it seems your Ivory Tower is even more advanced... <br>
-If the cause of our troubles lies in the fissure of power in this dimension, you should be able to return to your dimension by stabilizing that fissure. What I mean is that if you can restore the balance of the Sprites' power here, you will be able to return to your world.<br>
-In any case, as an otherworlder you will surely be less affected by their power than we are. I place this task on your shoulders, my friend.<br>
-<a action="bypass -h Quest 128_PailakaSongOfIceAndFire 32500-05.htm">Accept</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-05.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-05.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-05.htm (working copy)
@@ -1,6 +0,0 @@
-<html><body>Inspector Sinai:<br>
-Please defeat those chaotic Sprites in the temple and restore stability.<br>
-You may use this Sprite's Sword, forged with both the power of water and fire. I know you will use it well.<br>
-Also, take this book written by the Elves who built this place -- it will tell you if something is wrong with the temple. When you enter the temple, follow the book's instructions.<br>
-<a action="bypass -h Quest 128_PailakaSongOfIceAndFire 32500-06.htm">Accept the sword and the book.</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-06.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-06.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500-06.htm (working copy)
@@ -1,6 +0,0 @@
-<html><body>Inspector Sinai:<br>
-There are 4 chaotic Sprites. If you defeat them in a certain order, their powers will revert to their former stable state.<br>
-Inside, you will also meet our inspectors. They are superior enchanters, and they will certainly help you if you need it.<br>
-You should know that the power of this sword is not yet complete; you will need a Sprite's help to strengthen it to its full potential. The book contains instructions about how to do that.<br>
-Finally, the fish in the temple may provide useful items. I recommend you catch them if you can!
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32500.htm (working copy)
@@ -1,4 +0,0 @@
-<html><body>Inspector Sinai:<br>
-The chaotic power of the Sprites in the Forgotten Temple is growing. It must be stopped soon or else...<br>
-<a action="bypass -h npc_%objectId%_Quest">Quest</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-01.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-01.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-01.htm (working copy)
@@ -1,4 +0,0 @@
-<html><body>Temple Inspector:<br>
-Who are you? We don't allow just anybody to enter this place...<br>
-If you have questions, ask <font color="LEVEL">Inspector Sinai</font>.
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-02.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-02.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-02.htm (working copy)
@@ -1,4 +0,0 @@
-<html><body>Temple Inspector:<br>
-That's the Sprite's Sword! It was forged long ago, a mighty dualsword made of fire and water. We use it to stabilize the energy of the temple. But now the situation is too far gone for the sword alone to repair!<br>
-If the legends are to be believed, something capable of strengthening the power of the Sprite's Sword should have appeared somewhere in the temple...
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-03.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-03.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-03.htm (working copy)
@@ -1,7 +0,0 @@
-<html><body>Temple Inspector:<br>
-The Sprite's Sword... Under normal circumstances, that sword can stabilize the power of the Sprite -- but the current situation is beyond its ability alone.<br>
-However, combined with the Essence of Water you have, we may have a chance. According to legend, when the sword can't stabilize the temple itself, the temple will actually find a way to strengthen the sword. I suppose the legend must be true!<br>
-Will you use the Essence of Water to strengthen the sword?<br>
-<br>
-<a action="bypass -h Quest 128_PailakaSongOfIceAndFire 32507-04.htm">Strengthen the sword.</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-04.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-04.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-04.htm (working copy)
@@ -1,5 +0,0 @@
-<html><body>Temple Inspector:<br>
-Converto augeo aquae...<br>
-Thanks to the Essence of Water, your sword has been strengthened by two levels! Now you can access <font color="LEVEL">Shalin Heal</font> to aid recovery.<br>
-Take up the sword again and seek out other enemies! That book will be helpful.
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-05.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-05.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-05.htm (working copy)
@@ -1,4 +0,0 @@
-<html><body>Temple Inspector:<br>
-Your sword has already absorbed the power of the Essence of Water. Bring me the Essence of Fire and I will be able to strengthen your weapon again.<br>
-Ah, your book is shining! Perhaps something has changed; you should read it at once.
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-06.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-06.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-06.htm (working copy)
@@ -1,6 +0,0 @@
-<html><body>Temple Inspector:<br>
-Hmm, the chaos seems more serious that I first thought.<br>
-Fire magic in particular seems an issue...<br>
-Tell me, has your weapon already absorbed the Essence of Water? Ah, then it's simple! We have never before tried to combine the Essences of Water and Fire at this level, but it should be possible...at least in theory. Now, give me your sword and the Essence of Fire.<br>
-<a action="bypass -h Quest 128_PailakaSongOfIceAndFire 32507-07.htm">Hand over the sword and the Essence of Fire.</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-07.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-07.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-07.htm (working copy)
@@ -1,5 +0,0 @@
-<html><body>Temple Inspector:<br>
-Permissum incendia successio!<br>
-May even greater power descend on this sword!<br>
-<a action="bypass -h Quest 128_PailakaSongOfIceAndFire 32507-08.htm">Watch</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-08.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-08.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-08.htm (working copy)
@@ -1,6 +0,0 @@
-<html><body>Temple Inspector:<br>
-Ah! The sword is finished!<br>
-I can feel its power! Can't you feel it calling to the power of the Sprite?<br>
-Besides Shalin Heal, <font color="LEVEL">a powerful attack skill called Shalin Strike</font> has been added.<br>
-I am sure you can now stabilize the energy of confusion in this place. Go quickly!
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-09.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-09.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507-09.htm (working copy)
@@ -1,3 +0,0 @@
-<html><body>Temple Inspector:<br>
-Take this newly-strengthed Sprite's Sword and restore peace in this temple!
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32507.htm (working copy)
@@ -1,4 +0,0 @@
-<html><body>Temple Inspector:<br>
-The temple's balance is slipping... I don't think it can be easily restored.<br>
-<a action="bypass -h npc_%objectId%_Quest">Quest</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32510-00.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32510-00.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32510-00.htm (working copy)
@@ -1,3 +0,0 @@
-<html><body>Inspector Adler:<br>
-It is time for you to use the Scroll of Escape I gave you.
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32510-01.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32510-01.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32510-01.htm (working copy)
@@ -1,6 +0,0 @@
-<html><body>Inspector Adler:<br>
-The Spirite's power is flowing smoothly. You have certainly justfield my trust in you!<br>
-Thanks to you, we are rapidy restoring stability. Of course, that means the dimensional portal that connects your world to ours is also quickly closing.<br>
-Hurry and take my hand! That sword belongs to this dimension, so you'd best leave it behind. Ah, I can see you'd rather keep it -- but such a powerful item may desrupt travel between dimensions!<br>
-<a action="bypass -h Quest 128_PailakaSongOfIceAndFire 32510-02.htm">Take his hand.</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32510-02.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32510-02.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32510-02.htm (working copy)
@@ -1,3 +0,0 @@
-<html><body>Inspector Adler:<br>
-Please accept this Scroll of Escape. Its power will allow you to safely return to your world.
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32510.htm
===================================================================
--- dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32510.htm (revision 9958)
+++ dist/game/data/scripts/quests/128_PailakaSongOfIceAndFire/32510.htm (working copy)
@@ -1,4 +0,0 @@
-<html><body>Inspector Adler:<br>
-Ta da! Don't look so surprised! I used a secret method known to the Pathfinders of Kamaloka to fly here<br>
-<a action="bypass -h npc_%objectId%_Quest">Quest</a>
-</body></html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-01.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-01.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-01.htm (working copy)
@@ -1,7 +0,0 @@
-<html>
-<body>Devil's Isle Survivor:<br>
-Devil's Isle... Oh, I am the sole survivor from that awful place... I don't want to mislead you -- many adventurers still go to Devil's Isle and return.<br>
-But I am the only one to return from the worst spot on that accursed island: Lematan's Fleet.<br>
-<a action="bypass -h Quest 129_PailakaDevilsLegacy 32498-02.htm">Ask about Lematan's Fleet.</a><br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-02.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-02.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-02.htm (working copy)
@@ -1,9 +0,0 @@
-<html>
-<body>Devil's Isle Survivor:<br>
-Uh... I suppose I can talk about Lematan's Fleet with someone of your skill and experience...<br>
-Lematan was a pirate who lusted after Zaken's treasure... But instead of making him rich, it brought him only evil.<br>
-As soon as he touched the treasure, a powerful curse was cast about Lematan. He and his men were transformed into something...indescribable.<br>
-And that wasn't the end of it. An unnatural darkness, blacker than black, suddenly arose and swallowed them all. It was like looking into the pit of chaos itself...<br>
-<a action="bypass -h Quest 129_PailakaDevilsLegacy 32498-03.htm">Ask him to tell you more.</a><br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-03.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-03.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-03.htm (working copy)
@@ -1,9 +0,0 @@
-<html>
-<body>Devil's Isle Survivor:<br>
-Chaos... That's right. That's the best word I can use to describe it...<br>
-It was like something ripped a hole in reality itself. Both captain and crew were sucked in...<br>
-I later heard that that power is called Kamaloka or Pailaka or somesuch. They say that it will engulf the entire world.<br>
-That's when my nightmares came... Soon after closing my eyes, I dream of strange and horrible monsters who torture me until I wake again. Ah, but the real problem was something else... Do you know what it is?<br>
-<a action="bypass -h Quest 129_PailakaDevilsLegacy 32498-04.htm">Ask him to tell you.</a><br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-04.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-04.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-04.htm (working copy)
@@ -1,10 +0,0 @@
-<html>
-<body>Devil's Isle Survivor:<br>
-I'm not the only one who has these nightmares! And all of us are both emotionally -- and, strangely enough, even physically -- drained upon waking.<br>
-I thought it was this Kamaloka I've heard about, but they say it's something else. It couldn't be entered in the same way as Kamaloka.<br>
-The mages say it's called Pailaka.<br>
-Whatever its name, someone must penetrate it and defeat this coming darkness... I believe you have the ability to set things right. What do you say? Will you do it?<br>
-<font color="LEVEL">(You will be rewarded for your efforts. Vitality points will be granted to you immediately upon completing the quest. If you already have maximum Vitality, you will not gain any additional Vitality.)</font><br>
-<a action="bypass -h Quest 129_PailakaDevilsLegacy 32498-05.htm">Say yes.</a><br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-05.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-05.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-05.htm (working copy)
@@ -1,4 +0,0 @@
-<html><body>Devil's Isle Survivor:<br>
-Thank you! When you're ready, come find me.<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-06.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-06.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-06.htm (working copy)
@@ -1,9 +0,0 @@
-<html>
-<body>Devil's Isle Survivor:<br>
-I looked into it while you were gone -- even the scholars can't agree about the nature of Pailaka...<br>
-But most think, as I do, that you should find an ally once you cross over.<br>
-We just don't know the specifics! Stay alert and you'll do fine.<br>
-Now then, we've talked long enough! Ready to go?<br>
-<a action="bypass -h Quest 129_PailakaDevilsLegacy Enter">Enter Pailaka.</a><br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-07.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-07.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-07.htm (working copy)
@@ -1,5 +0,0 @@
-<html>
-<body>Devil's Isle Survivor:<br>
-Keep your eyes open for someone who can help you there. Good luck -- we're all counting on you!<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-08.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-08.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-08.htm (working copy)
@@ -1,6 +0,0 @@
-<html>
-<body>Devil's Isle Survivor:<br>
-Do you want to enter Pailaka again? Don't forget what I told you before!<br>
-<a action="bypass -h Quest 129_PailakaDevilsLegacy Enter">Enter Pailaka.</a><br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-09.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-09.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-09.htm (working copy)
@@ -1,5 +0,0 @@
-<html>
-<body>Devil's Isle Survivor:<br>
-Remember what needs to be done!<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-10.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-10.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-10.htm (working copy)
@@ -1,7 +0,0 @@
-<html>
-<body>Devil's Isle Survivor:<br>
-Uh... it was very difficult...<br>
-But thanks to you, I think my nightmares may finally stop... <br>
-(This quest has already been completed)<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-11.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-11.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-11.htm (working copy)
@@ -1,6 +0,0 @@
-<html>
-<body>Devil's Isle Survivor:<br>
-What's the use of knowing more? If you try your luck there now, there'll just be one more corpse: yours!<br>
-(Only characters level 61 and higher may undertake this quest)<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-12.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-12.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498-12.htm (working copy)
@@ -1,6 +0,0 @@
-<html>
-<body>Devil's Isle Survivor:<br>
-Why do you want to know? There are better ways to spend your time, believe me!<br>
-(Only characters level 67 and lower may undertake this quest)<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32498.htm (working copy)
@@ -1,8 +0,0 @@
-<html>
-<body>Devil's Isle Survivor:<br>
-You know about Devil's Isle?<br>
-I guess if you're from around here you must have heard about it... It was the hideout of that legendary pirate king, Zaken -- only the bravest of the brave dare to venture there now.<br>
-But be warned...<br>
-<a action="bypass -h npc_%objectId%_Quest">Quest</a><br>
-</body>
-</html>
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32501-01.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32501-01.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32501-01.htm (working copy)
@@ -1,7 +0,0 @@
-<html>
-<body>Devil's Isle Supporter:<br>
-Some time ago, powerful pirates came from the other side of the sky and occupied Devil's Isle.<br>
-I believe they are the ones who touched Zaken's relic. I don't know what they've done, but since then the monsters have become especially violent -- now nobody can even set foot on the island!<br>
-<a action="bypass -h Quest 129_PailakaDevilsLegacy 32501-02.htm">Listen to his story.</a><br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32501-02.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32501-02.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32501-02.htm (working copy)
@@ -1,7 +0,0 @@
-<html>
-<body>Devil's Isle Supporter:<br>
-I don't know where they came from. But they occupied Devil's Isle and kicked out all the Humans and Dwarves. We can't just do nothing...<br>
-We must fight them! Here, take this sword. It can summon the <font color="LEVEL">Tigress</font>, our fleet's guardian spirit. She will certainly be able to help you!<br>
-<a action="bypass -h Quest 129_PailakaDevilsLegacy 32501-03.htm">Take the sword.</a><br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32501-03.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32501-03.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32501-03.htm (working copy)
@@ -1,9 +0,0 @@
-<html>
-<body>Devil's Isle Supporter:<br>
-This sword is an ancient relic of Devil's Isle. It was used to destroy those who fell under the curse.<br>
-Fearing its power, they were finally able to weaken it by sealing away a few of its powers in a number of scrolls.<br>
-As you use it to defeat our enemies, though, you'll acquire the ability to enhance the weapon to its former strength.<br>
-You should know that there are several Dwarven adventurers also trapped on the island. Take the sword and a Scroll of Enchant Weapon to one of them and they'll make your weapon even more powerful!<br>
-<a action="bypass -h Quest 129_PailakaDevilsLegacy 32501-04.htm">Ask about the enemy.</a><br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32501-04.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32501-04.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32501-04.htm (working copy)
@@ -1,6 +0,0 @@
-<html>
-<body>Devil's Isle Supporter:<br>
-The enemies who invaded Devil's Isle are <font color="LEVEL">Lematan's Followers</font>. Four of them are especially dangerous: <font color="LEVEL">Kams, Hikoro, Alkaso and Gerbera</font>. Some of them will have Scrolls of Enchant Weapon.<br>
-Defeat them and you can enhance your sword and Tigress...and eventually become powerful enough to destroy Lematan himself!<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32501.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32501.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32501.htm (working copy)
@@ -1,6 +0,0 @@
-<html>
-<body>Devil's Isle Supporter:<br>
-There's something strange happening on Devil's Isle! Monstrous pirates suddenly appeared and are wreaking havoc everywhere!<br>
-<a action="bypass -h npc_%objectId%_Quest">Quest</a><br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-00.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-00.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-00.htm (working copy)
@@ -1,5 +0,0 @@
-<html>
-<body>Dwarf Adventurer:<br>
-You will need a special weapon to solve the problems facing us... The <font color="LEVEL">Devil's Isle Supporter</font> is somewhere around here -- go find him!<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-01.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-01.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-01.htm (working copy)
@@ -1,5 +0,0 @@
-<html>
-<body>Dwarf Adventurer:<br>
-You will need a special weapon to solve the problems facing us... The <font color="LEVEL">Devil's Isle Supporter</font> is somewhere around here -- go find him!<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-02.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-02.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-02.htm (working copy)
@@ -1,5 +0,0 @@
-<html>
-<body>Dwarf Adventurer:<br>
-Unless you have a Scroll of Enchant Weapon, I can't enchant either your weapon or your pet. Defeat the pirates and bring back the Scroll of Enchant Weapon!<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-03.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-03.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-03.htm (working copy)
@@ -1,6 +0,0 @@
-<html>
-<body>Dwarf Adventurer:<br>
-Your weapon has been enhanced! In addition to allowing you to summon Tigress, it now also possesses a powerful long-range water attack called <font color="LEVEL">Ice Ball</font>.<br>
-If you wish to enhance the sword a final time, find the last remaining Scroll of Enchant Weapon!<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-04.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-04.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-04.htm (working copy)
@@ -1,5 +0,0 @@
-<html>
-<body>Dwarf Adventurer:<br>
-Bring back the second Enchant Scroll. I'm sure some pirate thug has it!<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-05.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-05.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-05.htm (working copy)
@@ -1,6 +0,0 @@
-<html>
-<body>Dwarf Adventurer:<br>
-Your weapon has been enhanced! In addition to <font color="LEVEL">Ice Ball</font>, your Complete Ancient Legacy Sword now possesses <font color="LEVEL">Chill Strike</font>, which inflicts a powerful short-range water attack.<br>
-Your Tigress has also been enhanced! She now possesses more power than ever!<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-06.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-06.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-06.htm (working copy)
@@ -1,5 +0,0 @@
-<html>
-<body>Dwarf Adventurer:<br>
-Your weapon has been enhanced! With this strengthened Ancient Legacy Sword, you're more than a match for any pirate!<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-07.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-07.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508-07.htm (working copy)
@@ -1,6 +0,0 @@
-<html>
-<body>Dwarf Adventurer:<br>
-In order to enhance the sword, Tigress must first be returned to it. Any other summoned pets or servitors will also disrupt the process. Until they have been dismissed, we cannot begin.<br>
-Let me know when you are ready.<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32508.htm (working copy)
@@ -1,7 +0,0 @@
-<html>
-<body>Dwarf Adventurer:<br>
-Ah, an adventurer who wields the Ancient Legacy Sword has finally come! Since you have made it this far, I will place my trust in you as well!<br>
-If you have the <font color="LEVEL">Pailaka Scroll of Enchant Weapon</font>, I will enhance both your Ancient Legacy Sword and your Tigress!<br>
-<a action="bypass -h npc_%objectId%_Quest">Enhance your weapon.</a>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32511-01.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32511-01.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32511-01.htm (working copy)
@@ -1,8 +0,0 @@
-<html>
-<body>Dwarf Adventurer:<br>
-Thanks! Is it my imagination, or did your body just become a bit blurry?<br>
-You don't look like you're from around here... Am I right? You appeared just as suddenly as those pirates!<br>
-Anyway, thank you. Please take these gifts.<br>
-Among them is a magic item capable of returning you to your world. Use the Scroll of Escape to leave Pailaka and return to where you belong!<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32511-02.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32511-02.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32511-02.htm (working copy)
@@ -1,5 +0,0 @@
-<html>
-<body>Dwarf Adventurer:<br>
-After dismissing Tigress, please do the same with any other summoned pets or servitors.<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32511-03.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32511-03.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32511-03.htm (working copy)
@@ -1,5 +0,0 @@
-<html>
-<body>Dwarf Adventurer:<br>
-Use the Scroll of Escape that I gave you to return to your world.<br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32511.htm
===================================================================
--- dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32511.htm (revision 9958)
+++ dist/game/data/scripts/quests/129_PailakaDevilsLegacy/32511.htm (working copy)
@@ -1,7 +0,0 @@
-<html>
-<body>Dwarf Adventurer:<br>
-That cursed pirate has finally fallen! Now I must ask you to return the sword. It is also a legacy of this place, so if you take it away -- even by mistake -- you will incur the curse of Devil's Isle.<br>
-<font color="LEVEL">If your Tigress is beside you, return her to the sword before giving it to me.</font><br>
-<a action="bypass -h npc_%objectId%_Quest">Return the sword.</a><br>
-</body>
-</html>
\ No newline at end of file
Index: dist/game/data/scripts/quests/Q00128_PailakaSongOfIceAndFire/Q00128_PailakaSongOfIceAndFire.java
===================================================================
--- dist/game/data/scripts/quests/Q00128_PailakaSongOfIceAndFire/Q00128_PailakaSongOfIceAndFire.java (revision 0)
+++ dist/game/data/scripts/quests/Q00128_PailakaSongOfIceAndFire/Q00128_PailakaSongOfIceAndFire.java (working copy)
@@ -0,0 +1,575 @@
+/*
+ * Copyright (C) 2004-2013 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * L2J DataPack is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package quests.Q00128_PailakaSongOfIceAndFire;
+
+import com.l2jserver.gameserver.ThreadPoolManager;
+import com.l2jserver.gameserver.ai.CtrlIntention;
+import com.l2jserver.gameserver.enums.QuestSound;
+import com.l2jserver.gameserver.instancemanager.InstanceManager;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.entity.Instance;
+import com.l2jserver.gameserver.model.instancezone.InstanceWorld;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.model.quest.State;
+import com.l2jserver.gameserver.model.zone.L2ZoneType;
+import com.l2jserver.gameserver.network.NpcStringId;
+import com.l2jserver.gameserver.network.SystemMessageId;
+import com.l2jserver.gameserver.network.clientpackets.Say2;
+import com.l2jserver.gameserver.network.serverpackets.NpcSay;
+import com.l2jserver.gameserver.util.Broadcast;
+
+/**
+ * Pailaka (Forgotten Temple) instance zone.
+ */
+public class Q00128_PailakaSongOfIceAndFire extends Quest
+{
+ private static final int MIN_LEVEL = 36;
+ private static final int MAX_LEVEL = 42;
+ private static final int EXIT_TIME = 5;
+ private static final int INSTANCE_ID = 43;
+ protected static final int[] TELEPORT =
+ {
+ -52875,
+ 188232,
+ -4696
+ };
+ private static final int ZONE = 20108;
+
+ private static final int ADLER1 = 32497;
+ private static final int ADLER2 = 32510;
+ private static final int SINAI = 32500;
+ private static final int INSPECTOR = 32507;
+
+ private static final int HILLAS = 18610;
+ private static final int PAPION = 18609;
+ private static final int KINSUS = 18608;
+ private static final int GARGOS = 18607;
+ private static final int ADIANTUM = 18620;
+ private static final int BLOOM = 18616;
+ private static final int BOTTLE = 32492;
+ private static final int BRAZIER = 32493;
+ private static final int[] MONSTERS =
+ {
+ HILLAS,
+ PAPION,
+ KINSUS,
+ GARGOS,
+ ADIANTUM,
+ BLOOM,
+ BOTTLE,
+ BRAZIER,
+ 18611,
+ 18612,
+ 18613,
+ 18614,
+ 18615
+ };
+
+ private static final int SWORD = 13034;
+ private static final int ENH_SWORD1 = 13035;
+ private static final int ENH_SWORD2 = 13036;
+ private static final int BOOK1 = 13130;
+ private static final int BOOK2 = 13131;
+ private static final int BOOK3 = 13132;
+ private static final int BOOK4 = 13133;
+ private static final int BOOK5 = 13134;
+ private static final int BOOK6 = 13135;
+ private static final int BOOK7 = 13136;
+ private static final int WATER_ESSENCE = 13038;
+ private static final int FIRE_ESSENCE = 13039;
+ private static final int SHIELD_POTION = 13032;
+ private static final int HEAL_POTION = 13033;
+ private static final int FIRE_ENHANCER = 13040;
+ private static final int WATER_ENHANCER = 13041;
+ private static final int[] ITEMS =
+ {
+ SWORD,
+ ENH_SWORD1,
+ ENH_SWORD2,
+ BOOK1,
+ BOOK2,
+ BOOK3,
+ BOOK4,
+ BOOK5,
+ BOOK6,
+ BOOK7,
+ WATER_ESSENCE,
+ FIRE_ESSENCE,
+ SHIELD_POTION,
+ HEAL_POTION,
+ FIRE_ENHANCER,
+ WATER_ENHANCER
+ };
+
+ // @formatter:off
+ private static final int[][] DROPLIST =
+ {
+ // must be sorted by npcId !
+ // npcId, itemId, chance
+ {
+ BLOOM, SHIELD_POTION, 30
+ },
+ {
+ BLOOM, HEAL_POTION, 80
+ },
+ {
+ BOTTLE, SHIELD_POTION, 10
+ },
+ {
+ BOTTLE, WATER_ENHANCER, 40
+ },
+ {
+ BOTTLE, HEAL_POTION, 80
+ },
+ {
+ BRAZIER, SHIELD_POTION, 10
+ },
+ {
+ BRAZIER, FIRE_ENHANCER, 40
+ },
+ {
+ BRAZIER, HEAL_POTION, 80
+ }
+ };
+
+ /**
+ * itemId, count, chance
+ */
+ private static final int[][] HP_HERBS_DROPLIST =
+ {
+ {
+ 8602, 1, 10
+ },
+ {
+ 8601, 1, 40
+ },
+ {
+ 8600, 1, 70
+ }
+ };
+
+ /**
+ * itemId, count, chance
+ */
+ private static final int[][] MP_HERBS_DROPLIST =
+ {
+ {
+ 8605, 1, 10
+ },
+ {
+ 8604, 1, 40
+ },
+ {
+ 8603, 1, 70
+ }
+ };
+ // @formatter:on
+
+ private static final int[] REWARDS =
+ {
+ 13294,
+ 13293,
+ 13129
+ };
+
+ /** Flag for "see creature". */
+ private boolean _seenCreature = false;
+
+ private Q00128_PailakaSongOfIceAndFire(int questId, String name, String descr)
+ {
+ super(questId, name, descr);
+ addStartNpc(ADLER1);
+ addFirstTalkId(ADLER1, ADLER2, SINAI, INSPECTOR);
+ addTalkId(ADLER1, ADLER2, SINAI, INSPECTOR);
+ addAttackId(BOTTLE, BRAZIER);
+ addKillId(MONSTERS);
+ addExitZoneId(ZONE);
+ addSeeCreatureId(GARGOS);
+ registerQuestItems(ITEMS);
+ }
+
+ private static final void dropHerb(L2Npc mob, L2PcInstance player, int[][] drop)
+ {
+ final int chance = getRandom(100);
+ for (int[] element : drop)
+ {
+ if (chance < element[2])
+ {
+ ((L2MonsterInstance) mob).dropItem(player, element[0], element[1]);
+ return;
+ }
+ }
+ }
+
+ private static final void dropItem(L2Npc mob, L2PcInstance player)
+ {
+ final int npcId = mob.getId();
+ final int chance = getRandom(100);
+ for (int[] drop : DROPLIST)
+ {
+ if (npcId == drop[0])
+ {
+ if (chance < drop[2])
+ {
+ ((L2MonsterInstance) mob).dropItem(player, drop[1], getRandom(1, 6));
+ return;
+ }
+ }
+ if (npcId < drop[0])
+ {
+ return; // not found
+ }
+ }
+ }
+
+ protected static final void teleportPlayer(L2PcInstance player, int[] coords, int instanceId)
+ {
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
+ player.setInstanceId(instanceId);
+ player.teleToLocation(coords[0], coords[1], coords[2], true);
+ }
+
+ private final synchronized void enterInstance(L2PcInstance player)
+ {
+ // check for existing instances for this player
+ InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
+ if (world != null)
+ {
+ if (world.getTemplateId() != INSTANCE_ID)
+ {
+ player.sendPacket(SystemMessageId.ALREADY_ENTERED_ANOTHER_INSTANCE_CANT_ENTER);
+ return;
+ }
+ Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
+ if (inst != null)
+ {
+ teleportPlayer(player, TELEPORT, world.getInstanceId());
+ }
+ return;
+ }
+ // New instance
+ final int instanceId = InstanceManager.getInstance().createDynamicInstance("PailakaSongOfIceAndFire.xml");
+
+ world = new InstanceWorld();
+ world.setInstanceId(instanceId);
+ world.setTemplateId(INSTANCE_ID);
+ InstanceManager.getInstance().addWorld(world);
+
+ world.addAllowed(player.getObjectId());
+ teleportPlayer(player, TELEPORT, instanceId);
+
+ }
+
+ @Override
+ public final String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ final QuestState st = player.getQuestState(getName());
+ if (st == null)
+ {
+ return getNoQuestMsg(player);
+ }
+
+ switch (event)
+ {
+ case "enter":
+ enterInstance(player);
+ return null;
+ case "32497-03.htm":
+ if (!st.isStarted())
+ {
+ st.startQuest();
+ }
+ break;
+ case "32500-06.htm":
+ if (st.isCond(1))
+ {
+ st.setCond(2, true);
+ giveItems(player, SWORD, 1);
+ giveItems(player, BOOK1, 1);
+ }
+ break;
+ case "32507-04.htm":
+ if (st.isCond(3))
+ {
+ st.setCond(4, true);
+ takeItems(player, SWORD, -1);
+ takeItems(player, WATER_ESSENCE, -1);
+ takeItems(player, BOOK2, -1);
+ giveItems(player, BOOK3, 1);
+ giveItems(player, ENH_SWORD1, 1);
+ }
+ break;
+ case "32507-08.htm":
+ if (st.isCond(6))
+ {
+ st.setCond(7, true);
+ takeItems(player, ENH_SWORD1, -1);
+ takeItems(player, BOOK5, -1);
+ takeItems(player, FIRE_ESSENCE, -1);
+ giveItems(player, ENH_SWORD2, 1);
+ giveItems(player, BOOK6, 1);
+ }
+ break;
+ case "32510-02.htm":
+ st.exitQuest(false, true);
+
+ Instance inst = InstanceManager.getInstance().getInstance(npc.getInstanceId());
+ inst.setDuration(EXIT_TIME * 60000);
+ inst.setEmptyDestroyTime(0);
+
+ if (inst.containsPlayer(player.getObjectId()))
+ {
+ player.setVitalityPoints(20000, true);
+ addExpAndSp(player, 810000, 50000);
+ for (int id : REWARDS)
+ {
+ giveItems(player, id, 1);
+ }
+ }
+ break;
+ case "GARGOS_LAUGH":
+ {
+ Broadcast.toKnownPlayers(npc, new NpcSay(npc.getObjectId(), Say2.NPC_SHOUT, npc.getTemplate().getIdTemplate(), NpcStringId.OHHOHOH));
+ break;
+ }
+ }
+ return event;
+ }
+
+ @Override
+ public final String onFirstTalk(L2Npc npc, L2PcInstance player)
+ {
+ return npc.getId() + ".htm";
+ }
+
+ @Override
+ public final String onTalk(L2Npc npc, L2PcInstance player)
+ {
+ final QuestState st = player.getQuestState(getName());
+ if (st == null)
+ {
+ return getNoQuestMsg(player);
+ }
+
+ switch (npc.getId())
+ {
+ case ADLER1:
+ switch (st.getState())
+ {
+ case State.CREATED:
+ if (player.getLevel() < MIN_LEVEL)
+ {
+ return "32497-05.htm";
+ }
+ if (player.getLevel() > MAX_LEVEL)
+ {
+ return "32497-06.htm";
+ }
+ return "32497-01.htm";
+ case State.STARTED:
+ if (st.getCond() > 1)
+ {
+ return "32497-00.htm";
+ }
+ return "32497-03.htm";
+ case State.COMPLETED:
+ return "32497-07.htm";
+ default:
+ return "32497-01.htm";
+ }
+ case SINAI:
+ if (st.getCond() > 1)
+ {
+ return "32500-00.htm";
+ }
+ return "32500-01.htm";
+ case INSPECTOR:
+ switch (st.getCond())
+ {
+ case 1:
+ return "32507-01.htm";
+ case 2:
+ return "32507-02.htm";
+ case 3:
+ return "32507-03.htm";
+ case 4:
+ case 5:
+ return "32507-05.htm";
+ case 6:
+ return "32507-06.htm";
+ default:
+ return "32507-09.htm";
+ }
+ case ADLER2:
+ if (st.isCompleted())
+ {
+ return "32510-00.htm";
+ }
+ else if (st.isCond(9))
+ {
+ return "32510-01.htm";
+ }
+ }
+ return getNoQuestMsg(player);
+ }
+
+ @Override
+ public final String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon)
+ {
+ if (!npc.isDead())
+ {
+ npc.doDie(attacker);
+ }
+
+ return super.onAttack(npc, attacker, damage, isSummon);
+ }
+
+ @Override
+ public final String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
+ {
+ final QuestState st = player.getQuestState(getName());
+ if ((st != null) && st.isStarted())
+ {
+ switch (npc.getId())
+ {
+ case HILLAS:
+ if (st.isCond(2))
+ {
+ st.setCond(3);
+ playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ takeItems(player, BOOK1, -1);
+ giveItems(player, BOOK2, 1);
+ giveItems(player, WATER_ESSENCE, 1);
+ }
+ addSpawn(PAPION, -53903, 181484, -4555, 30456, false, 0, false, npc.getInstanceId());
+ break;
+ case PAPION:
+ if (st.isCond(4))
+ {
+ st.setCond(5);
+ takeItems(player, BOOK3, -1);
+ giveItems(player, BOOK4, 1);
+ playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ }
+ addSpawn(KINSUS, -61415, 181418, -4818, 63852, false, 0, false, npc.getInstanceId());
+ break;
+ case KINSUS:
+ if (st.isCond(5))
+ {
+ st.setCond(6);
+ playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ takeItems(player, BOOK4, -1);
+ giveItems(player, BOOK5, 1);
+ giveItems(player, FIRE_ESSENCE, 1);
+ }
+ addSpawn(GARGOS, -61354, 183624, -4821, 63613, false, 0, false, npc.getInstanceId());
+ break;
+ case GARGOS:
+ if (st.isCond(7))
+ {
+ st.setCond(8);
+ playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ takeItems(player, BOOK6, -1);
+ giveItems(player, BOOK7, 1);
+ }
+ addSpawn(ADIANTUM, -53297, 185027, -4617, 1512, false, 0, false, npc.getInstanceId());
+ break;
+ case ADIANTUM:
+ if (st.isCond(8))
+ {
+ st.setCond(9);
+ playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
+ takeItems(player, BOOK7, -1);
+ addSpawn(ADLER2, -53297, 185027, -4617, 33486, false, 0, false, npc.getInstanceId());
+ }
+ break;
+ case BOTTLE:
+ case BRAZIER:
+ case BLOOM:
+ dropItem(npc, player);
+ break;
+ default:
+ // hardcoded herb drops
+ dropHerb(npc, player, HP_HERBS_DROPLIST);
+ dropHerb(npc, player, MP_HERBS_DROPLIST);
+ break;
+ }
+ }
+ return super.onKill(npc, player, isSummon);
+ }
+
+ @Override
+ public String onExitZone(L2Character character, L2ZoneType zone)
+ {
+ if ((character instanceof L2PcInstance) && !character.isDead() && !character.isTeleporting() && ((L2PcInstance) character).isOnline())
+ {
+ InstanceWorld world = InstanceManager.getInstance().getWorld(character.getInstanceId());
+ if ((world != null) && (world.getTemplateId() == INSTANCE_ID))
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new Teleport(character, world.getInstanceId()), 1000);
+ }
+ }
+ return super.onExitZone(character, zone);
+ }
+
+ @Override
+ public String onSeeCreature(L2Npc npc, L2Character creature, boolean isSummon)
+ {
+ if (!_seenCreature && creature.isPlayer())
+ {
+ _seenCreature = true;
+ startQuestTimer("GARGOS_LAUGH", 1000, npc, creature.getActingPlayer());
+ }
+ return super.onSeeCreature(npc, creature, isSummon);
+ }
+
+ static final class Teleport implements Runnable
+ {
+ private final L2Character _char;
+ private final int _instanceId;
+
+ public Teleport(L2Character c, int id)
+ {
+ _char = c;
+ _instanceId = id;
+ }
+
+ @Override
+ public void run()
+ {
+ try
+ {
+ teleportPlayer((L2PcInstance) _char, TELEPORT, _instanceId);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ new Q00128_PailakaSongOfIceAndFire(128, Q00128_PailakaSongOfIceAndFire.class.getSimpleName(), "Pailaka - Song of Ice and Fire");
+ }
+}
\ No newline at end of file
Index: dist/game/data/scripts/quests/Q00129_PailakaDevilsLegacy/Q00129_PailakaDevilsLegacy.java
===================================================================
--- dist/game/data/scripts/quests/Q00129_PailakaDevilsLegacy/Q00129_PailakaDevilsLegacy.java (revision 0)
+++ dist/game/data/scripts/quests/Q00129_PailakaDevilsLegacy/Q00129_PailakaDevilsLegacy.java (working copy)
@@ -0,0 +1,624 @@
+/*
+ * Copyright (C) 2004-2013 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * L2J DataPack is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+package quests.Q00129_PailakaDevilsLegacy;
+
+import java.util.List;
+
+import javolution.util.FastList;
+
+import com.l2jserver.gameserver.ThreadPoolManager;
+import com.l2jserver.gameserver.ai.CtrlIntention;
+import com.l2jserver.gameserver.datatables.SkillTable;
+import com.l2jserver.gameserver.enums.QuestSound;
+import com.l2jserver.gameserver.instancemanager.InstanceManager;
+import com.l2jserver.gameserver.model.actor.L2Attackable;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.L2Playable;
+import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.entity.Instance;
+import com.l2jserver.gameserver.model.instancezone.InstanceWorld;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.model.quest.State;
+import com.l2jserver.gameserver.model.skills.L2Skill;
+import com.l2jserver.gameserver.model.zone.L2ZoneType;
+import com.l2jserver.gameserver.network.SystemMessageId;
+import com.l2jserver.gameserver.network.serverpackets.MagicSkillUse;
+
+/**
+ * Pailaka (Devil's Isle) instance zone.
+ */
+public class Q00129_PailakaDevilsLegacy extends Quest
+{
+ private static final int MIN_LEVEL = 61;
+ private static final int MAX_LEVEL = 67;
+ private static final int EXIT_TIME = 5;
+ private static final int INSTANCE_ID = 44;
+ protected static final int[] TELEPORT =
+ {
+ 76428,
+ -219038,
+ -3752
+ };
+ private static final int ZONE = 20109;
+
+ private static final int SURVIVOR = 32498;
+ private static final int SUPPORTER = 32501;
+ private static final int ADVENTURER1 = 32508;
+ private static final int ADVENTURER2 = 32511;
+
+ private static final int KAMS = 18629;
+ private static final int HIKORO = 18630;
+ private static final int ALKASO = 18631;
+ private static final int GERBERA = 18632;
+ private static final int LEMATAN = 18633;
+ private static final int FOLLOWERS = 18634;
+ private static final int TREASURE_BOX = 32495;
+ private static final int POWDER_KEG = 18622;
+ private static final int[] MONSTERS =
+ {
+ KAMS,
+ HIKORO,
+ ALKASO,
+ GERBERA,
+ LEMATAN,
+ FOLLOWERS,
+ TREASURE_BOX,
+ POWDER_KEG,
+ 18623,
+ 18624,
+ 18625,
+ 18626,
+ 18627
+ };
+
+ private static final int SWORD = 13042;
+ private static final int ENH_SWORD1 = 13043;
+ private static final int ENH_SWORD2 = 13044;
+ private static final int SCROLL_1 = 13046;
+ private static final int SCROLL_2 = 13047;
+ private static final int HEALING_POTION = 13033;
+ private static final int ANTIDOTE_POTION = 13048;
+ private static final int DIVINE_POTION = 13049;
+ private static final int DEFENCE_POTION = 13059;
+ private static final int PAILAKA_KEY = 13150;
+
+ private static boolean _isTeleportScheduled = false;
+ private static boolean _isOnShip = false;
+ private static L2Npc _lematanNpc = null;
+ private List<L2Npc> _followerslist;
+
+ private static final int[] ITEMS =
+ {
+ SWORD,
+ ENH_SWORD1,
+ ENH_SWORD2,
+ SCROLL_1,
+ SCROLL_2,
+ HEALING_POTION,
+ ANTIDOTE_POTION,
+ DIVINE_POTION,
+ DEFENCE_POTION,
+ PAILAKA_KEY
+ };
+
+ // @formatter:off
+ private static final int[][] DROPLIST =
+ {
+ // must be sorted by npcId !
+ // npcId, itemId, chance, max
+ { TREASURE_BOX, HEALING_POTION, 20 },
+ { TREASURE_BOX, DIVINE_POTION, 40 },
+ { TREASURE_BOX, DEFENCE_POTION, 60 },
+ { TREASURE_BOX, PAILAKA_KEY, 80 },
+ { TREASURE_BOX, ANTIDOTE_POTION, 100 }
+ };
+
+ private static final int[][] HP_HERBS_DROPLIST =
+ {
+ // itemId, count, chance
+ { 8602, 1, 10 },
+ { 8601, 1, 40 },
+ { 8600, 1, 70 }
+ };
+
+ private static final int[][] MP_HERBS_DROPLIST =
+ {
+ // itemId, count, chance
+ { 8605, 1, 10 },
+ { 8604, 1, 40 },
+ { 8603, 1, 70 }
+ };
+
+ private static final int[] REWARDS =
+ {
+ 13295,
+ 13129
+ };
+
+ private static final int[][] FOLLOWERS_SPAWNS =
+ {
+ { 85067, -208943, -3336, 20106, 60 },
+ { 84904, -208944, -3336, 10904, 60 },
+ { 85062, -208538, -3336, 44884, 60 },
+ { 84897, -208542, -3336, 52973, 60 },
+ { 84808, -208633, -3339, 65039, 60 },
+ { 84808, -208856, -3339, 0, 60 },
+ { 85144, -208855, -3341, 33380, 60 },
+ { 85139, -208630, -3339, 31777, 60 }
+ };
+ // @formatter:on
+
+ private static L2Skill boom_skill = SkillTable.getInstance().getInfo(5714, 1);
+ private static L2Skill energy_skill = SkillTable.getInstance().getInfo(5712, 1);
+
+ private Q00129_PailakaDevilsLegacy(int questId, String name, String descr)
+ {
+ super(questId, name, descr);
+ addStartNpc(SURVIVOR);
+ addFirstTalkId(SURVIVOR, SUPPORTER, ADVENTURER1, ADVENTURER2);
+ addTalkId(SURVIVOR, SUPPORTER, ADVENTURER1, ADVENTURER2);
+ addAttackId(TREASURE_BOX, POWDER_KEG, LEMATAN);
+ addKillId(MONSTERS);
+ addEnterZoneId(ZONE);
+ addSpawnId(FOLLOWERS);
+ registerQuestItems(ITEMS);
+ }
+
+ private void attackPlayer(L2Attackable npc, L2Playable attacker)
+ {
+ npc.setIsRunning(true);
+ npc.addDamageHate(attacker, 0, 999);
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, attacker);
+ }
+
+ private static final void dropHerb(L2Npc mob, L2PcInstance player, int[][] drop)
+ {
+ final int chance = getRandom(100);
+ for (int[] element : drop)
+ {
+ if (chance < element[2])
+ {
+ ((L2MonsterInstance) mob).dropItem(player, element[0], element[1]);
+ return;
+ }
+ }
+ }
+
+ private static final void dropItem(L2Npc mob, L2PcInstance player)
+ {
+ final int npcId = mob.getId();
+ final int chance = getRandom(100);
+ for (int[] drop : DROPLIST)
+ {
+ if (npcId == drop[0])
+ {
+ if (chance < drop[2])
+ {
+ ((L2MonsterInstance) mob).dropItem(player, drop[1], getRandom(1, 6));
+ return;
+ }
+ }
+ if (npcId < drop[0])
+ {
+ return; // not found
+ }
+ }
+ }
+
+ protected static final void teleportPlayer(L2PcInstance player, int[] coords, int instanceId)
+ {
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
+ player.setInstanceId(instanceId);
+ player.teleToLocation(coords[0], coords[1], coords[2], true);
+ }
+
+ private final synchronized void enterInstance(L2PcInstance player)
+ {
+ // check for existing instances for this player
+ InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
+ if (world != null)
+ {
+ if (world.getTemplateId() != INSTANCE_ID)
+ {
+ player.sendPacket(SystemMessageId.ALREADY_ENTERED_ANOTHER_INSTANCE_CANT_ENTER);
+ return;
+ }
+ Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
+ if (inst != null)
+ {
+ teleportPlayer(player, TELEPORT, world.getInstanceId());
+ }
+ return;
+ }
+ // New instance
+ final int instanceId = InstanceManager.getInstance().createDynamicInstance("PailakaDevilsLegacy.xml");
+ world = new InstanceWorld();
+ world.setInstanceId(instanceId);
+ world.setTemplateId(INSTANCE_ID);
+ InstanceManager.getInstance().addWorld(world);
+
+ world.addAllowed(player.getObjectId());
+ teleportPlayer(player, TELEPORT, instanceId);
+
+ _lematanNpc = addSpawn(LEMATAN, 88108, -209252, -3744, 64255, false, 0, false, instanceId);
+
+ }
+
+ @Override
+ public final String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ // Must be here, because of player == null
+ if ((npc.getId() == FOLLOWERS) && event.equals("follower_cast"))
+ {
+ if (!npc.isCastingNow() && !npc.isDead() && !_lematanNpc.isDead())
+ {
+ npc.setTarget(_lematanNpc);
+ npc.doCast(energy_skill);
+ }
+ startQuestTimer("follower_cast", 2000 + getRandom(100, 1000), npc, null);
+ return null;
+ }
+ else if ((npc.getId() == POWDER_KEG) && event.equalsIgnoreCase("keg_trigger"))
+ {
+ onAttack(npc, player, 600, false);
+ }
+
+ final QuestState st = player.getQuestState(getName());
+ if (st == null)
+ {
+ return getNoQuestMsg(player);
+ }
+
+ if (event.equalsIgnoreCase("enter"))
+ {
+ enterInstance(player);
+ if (st.isCond(1))
+ {
+ st.setCond(2, true);
+ return "32498-07.htm";
+ }
+ return "32498-09.htm";
+ }
+ else if (event.equalsIgnoreCase("32498-05.htm"))
+ {
+ if (st.isCond(0))
+ {
+ st.startQuest();
+ }
+ }
+ else if (event.equalsIgnoreCase("32501-03.htm"))
+ {
+ if (st.isCond(2))
+ {
+ giveItems(player, SWORD, 1);
+ st.setCond(3, true);
+ }
+ }
+ else if (event.equalsIgnoreCase("lematan_teleport"))
+ {
+ if ((npc.getId() == LEMATAN) && !npc.isMovementDisabled() && !_isOnShip)
+ {
+ // Reduce Hate
+ ((L2Attackable) npc).reduceHate(player, 9999);
+ ((L2Attackable) npc).abortAttack();
+ ((L2Attackable) npc).abortCast();
+ // Broadcast Escape
+ npc.broadcastPacket(new MagicSkillUse(npc, 2100, 1, 1000, 0));
+ // Schedule telport - when Lematan Finish casting
+ startQuestTimer("lematan_finish_teleport", 1500, npc, player);
+ }
+ else
+ {
+ _isTeleportScheduled = false;
+ }
+ return null;
+ }
+ else if ((npc.getId() == LEMATAN) && event.equalsIgnoreCase("lematan_finish_teleport") && !_isOnShip)
+ {
+ // Teleport Lematan
+ npc.teleToLocation(84973, -208721, -3340);
+ // Set onShip
+ _isOnShip = true;
+ // Set Spawn loc to ship. If he loose aggro he should stay on board ;)
+ npc.getSpawn().setX(84973);
+ npc.getSpawn().setY(-208721);
+ npc.getSpawn().setZ(-3340);
+ // To be sure, reduce again
+ ((L2Attackable) npc).reduceHate(player, 9999);
+ // Spawn followers
+ _followerslist = new FastList<>();
+ for (int[] SPAWN : FOLLOWERS_SPAWNS)
+ {
+ L2Npc _follower = addSpawn(FOLLOWERS, SPAWN[0], SPAWN[1], SPAWN[2], SPAWN[3], false, 0, true, player.getInstanceId());
+ if (_follower != null)
+ {
+ _followerslist.add(_follower);
+ }
+ }
+ return null;
+ }
+ return event;
+ }
+
+ @Override
+ public final String onFirstTalk(L2Npc npc, L2PcInstance player)
+ {
+ final QuestState st = player.getQuestState(getName());
+ if ((npc.getId() != ADVENTURER2) || (st == null) || !st.isCompleted())
+ {
+ return npc.getId() + ".htm";
+ }
+ return "32511-03.htm";
+ }
+
+ @Override
+ public final String onTalk(L2Npc npc, L2PcInstance player)
+ {
+ final QuestState st = player.getQuestState(getName());
+ if (st == null)
+ {
+ return getNoQuestMsg(player);
+ }
+
+ switch (npc.getId())
+ {
+ case SURVIVOR:
+ switch (st.getState())
+ {
+ case State.CREATED:
+ if (player.getLevel() < MIN_LEVEL)
+ {
+ return "32498-11.htm";
+ }
+ if (player.getLevel() > MAX_LEVEL)
+ {
+ return "32498-12.htm";
+ }
+ return "32498-01.htm";
+ case State.STARTED:
+ if (st.getCond() > 1)
+ {
+ return "32498-08.htm";
+ }
+ return "32498-06.htm";
+ case State.COMPLETED:
+ return "32498-10.htm";
+ default:
+ return "32498-01.htm";
+ }
+ case SUPPORTER:
+ if (st.getCond() > 2)
+ {
+ return "32501-04.htm";
+ }
+ return "32501-01.htm";
+ case ADVENTURER1:
+ if (!player.hasSummon())
+ {
+ if (hasQuestItems(player, SWORD))
+ {
+ if (hasQuestItems(player, SCROLL_1))
+ {
+ takeItems(player, SWORD, -1);
+ takeItems(player, SCROLL_1, -1);
+ giveItems(player, ENH_SWORD1, 1);
+ return "32508-03.htm";
+ }
+ return "32508-02.htm";
+ }
+
+ if (hasQuestItems(player, ENH_SWORD1))
+ {
+ if (hasQuestItems(player, SCROLL_2))
+ {
+ takeItems(player, ENH_SWORD1, -1);
+ takeItems(player, SCROLL_2, -1);
+ giveItems(player, ENH_SWORD2, 1);
+ return "32508-05.htm";
+ }
+ return "32508-04.htm";
+ }
+
+ if (hasQuestItems(player, ENH_SWORD2))
+ {
+ return "32508-06.htm";
+ }
+ return "32508-00.htm";
+ }
+ return "32508-07.htm";
+ case ADVENTURER2:
+ if (!player.hasSummon())
+ {
+ st.exitQuest(false, true);
+
+ Instance inst = InstanceManager.getInstance().getInstance(npc.getInstanceId());
+ inst.setDuration(EXIT_TIME * 60000);
+ inst.setEmptyDestroyTime(0);
+
+ if (inst.containsPlayer(player.getObjectId()))
+ {
+ player.setVitalityPoints(20000, true);
+ addExpAndSp(player, 10800000, 950000);
+ for (int id : REWARDS)
+ {
+ giveItems(player, id, 1);
+ }
+ }
+ return "32511-01.htm";
+ }
+ return "32511-02.htm";
+ }
+ return getNoQuestMsg(player);
+ }
+
+ @Override
+ public final String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon)
+ {
+ if ((npc.getId() == POWDER_KEG) && !npc.isDead())
+ {
+ npc.doCast(boom_skill);
+
+ if (npc.getKnownList() != null)
+ {
+ for (L2Character target : npc.getKnownList().getKnownCharactersInRadius(900))
+ {
+ target.reduceCurrentHp(500 + getRandom(0, 200), npc, boom_skill);
+
+ if (target instanceof L2MonsterInstance)
+ {
+ if (target.getId() == POWDER_KEG)
+ {
+ startQuestTimer("keg_trigger", 500, (L2Npc) target, attacker);
+ }
+ else
+ {
+ if (isSummon)
+ {
+ attackPlayer((L2Attackable) npc, attacker.getSummon());
+ }
+ else
+ {
+ attackPlayer((L2Attackable) npc, attacker);
+ }
+ }
+ }
+ }
+ }
+ if (!npc.isDead())
+ {
+ npc.doDie(attacker);
+ }
+ }
+ else if ((npc.getId() == LEMATAN) && (npc.getCurrentHp() < (npc.getMaxHp() / 2)) && !_isTeleportScheduled)
+ {
+ startQuestTimer("lematan_teleport", 1000, npc, attacker);
+ }
+ else if (npc.getId() == TREASURE_BOX)
+ {
+ dropItem(npc, attacker);
+ npc.doDie(attacker);
+ }
+
+ return super.onAttack(npc, attacker, damage, isSummon);
+ }
+
+ @Override
+ public final String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
+ {
+ final QuestState st = player.getQuestState(getName());
+ if ((st != null) && st.isStarted())
+ {
+ switch (npc.getId())
+ {
+ case KAMS:
+ if (hasQuestItems(player, SWORD))
+ {
+ giveItems(player, SCROLL_1, 1);
+ playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ }
+ break;
+ case ALKASO:
+ if (hasQuestItems(player, ENH_SWORD1))
+ {
+ giveItems(player, SCROLL_2, 1);
+ playSound(player, QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ }
+ break;
+ case LEMATAN:
+ if ((_followerslist != null) && !_followerslist.isEmpty())
+ {
+ for (L2Npc _follower : _followerslist)
+ {
+ _follower.deleteMe();
+ }
+ _followerslist.clear();
+ }
+ st.setCond(4, true);
+ addSpawn(ADVENTURER2, 84983, -208736, -3336, 49915, false, 0, false, npc.getInstanceId());
+ break;
+ case POWDER_KEG:
+ case TREASURE_BOX:
+ case FOLLOWERS:
+ // do nothing
+ break;
+ default:
+ // hardcoded herb drops
+ dropHerb(npc, player, HP_HERBS_DROPLIST);
+ dropHerb(npc, player, MP_HERBS_DROPLIST);
+ break;
+ }
+ }
+ return super.onKill(npc, player, isSummon);
+ }
+
+ @Override
+ public final String onSpawn(L2Npc npc)
+ {
+ startQuestTimer("follower_cast", 1000 + getRandom(100, 1000), npc, null);
+ npc.disableCoreAI(true);
+ return null;
+ }
+
+ @Override
+ public String onEnterZone(L2Character character, L2ZoneType zone)
+ {
+ if ((character instanceof L2PcInstance) && !character.isDead() && !character.isTeleporting() && ((L2PcInstance) character).isOnline())
+ {
+ InstanceWorld world = InstanceManager.getInstance().getWorld(character.getInstanceId());
+ if ((world != null) && (world.getTemplateId() == INSTANCE_ID))
+ {
+ ThreadPoolManager.getInstance().scheduleGeneral(new Teleport(character, world.getInstanceId()), 1000);
+ }
+ }
+ return super.onEnterZone(character, zone);
+ }
+
+ static final class Teleport implements Runnable
+ {
+ private final L2Character _char;
+ private final int _instanceId;
+
+ public Teleport(L2Character c, int id)
+ {
+ _char = c;
+ _instanceId = id;
+ }
+
+ @Override
+ public void run()
+ {
+ try
+ {
+ teleportPlayer((L2PcInstance) _char, TELEPORT, _instanceId);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ public static void main(String[] args)
+ {
+ new Q00129_PailakaDevilsLegacy(129, Q00129_PailakaDevilsLegacy.class.getSimpleName(), "Pailaka - Devil's Legacy");
+ }
+}
\ No newline at end of file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment