diff --git a/trunk/dist/game/data/instances/MuseumDungeon.xml b/trunk/dist/game/data/instances/MuseumDungeon.xml new file mode 100644 index 0000000000..187d89dc25 --- /dev/null +++ b/trunk/dist/game/data/instances/MuseumDungeon.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/trunk/dist/game/data/scripts.cfg b/trunk/dist/game/data/scripts.cfg index 5be22c7b67..f59ccf2505 100644 --- a/trunk/dist/game/data/scripts.cfg +++ b/trunk/dist/game/data/scripts.cfg @@ -85,6 +85,8 @@ ai/npc/Teleports/TeleportToUndergroundColiseum/TeleportToUndergroundColiseum.jav ai/npc/Teleports/TeleportWithCharm/TeleportWithCharm.java ai/npc/Teleports/ToIVortex/ToIVortex.java ai/npc/Teleports/Warpgate/Warpgate.java +ai/npc/Teleports/YeSagiraTeleporter/YeSagiraTeleporter.java +ai/npc/Toyron/Toyron.java ai/npc/Trainers/HealerTrainer/HealerTrainer.java ai/npc/Trandon/Trandon.java ai/npc/Tunatun/Tunatun.java diff --git a/trunk/dist/game/data/scripts/ai/npc/Teleports/YeSagiraTeleporter/33180.html b/trunk/dist/game/data/scripts/ai/npc/Teleports/YeSagiraTeleporter/33180.html new file mode 100644 index 0000000000..097406d93c --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/Teleports/YeSagiraTeleporter/33180.html @@ -0,0 +1,3 @@ +Ye Sagira Teleport Device:
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/Teleports/YeSagiraTeleporter/YeSagiraTeleporter.java b/trunk/dist/game/data/scripts/ai/npc/Teleports/YeSagiraTeleporter/YeSagiraTeleporter.java new file mode 100644 index 0000000000..723940e5fa --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/Teleports/YeSagiraTeleporter/YeSagiraTeleporter.java @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2004-2015 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 . + */ +package ai.npc.Teleports.YeSagiraTeleporter; + +import ai.npc.AbstractNpcAI; + +import com.l2jserver.gameserver.model.Location; +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.events.EventType; +import com.l2jserver.gameserver.model.events.ListenerRegisterType; +import com.l2jserver.gameserver.model.events.annotations.RegisterEvent; +import com.l2jserver.gameserver.model.events.annotations.RegisterType; +import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerCreate; + +/** + * @author Neanrakyr + */ +public final class YeSagiraTeleporter extends AbstractNpcAI +{ + // NPC + private static final int YE_SAGIRA_TELEPORTER = 33180; + // Location + private static final Location TELEPORT = new Location(-114675, 230171, -1648); + // Misc + private static final int MAX_LEVEL = 20; + // Variables names + private static final String MOVIE_VAR = "TI_YeSagira_movie"; + // Movies + public static final int YE_SAGIRA = 103; + + private YeSagiraTeleporter() + { + super(YeSagiraTeleporter.class.getSimpleName(), "ai/npc/Teleports"); + addStartNpc(YE_SAGIRA_TELEPORTER); + addFirstTalkId(YE_SAGIRA_TELEPORTER); + addTalkId(YE_SAGIRA_TELEPORTER); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + if (event.equals("teleport")) + { + if (player.getVariables().getBoolean(MOVIE_VAR, false)) + { + if (player.getLevel() <= MAX_LEVEL) + { + player.showQuestMovie(YE_SAGIRA); + } + player.getVariables().remove(MOVIE_VAR); + } + player.teleToLocation(TELEPORT); + } + return super.onAdvEvent(event, npc, player); + } + + @RegisterEvent(EventType.ON_PLAYER_CREATE) + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) + public void OnPlayerCreate(OnPlayerCreate event) + { + final L2PcInstance player = event.getActiveChar(); + player.getVariables().set(MOVIE_VAR, true); + } + + public static void main(String[] args) + { + new YeSagiraTeleporter(); + } +} diff --git a/trunk/dist/game/data/scripts/ai/npc/Toyron/33004-01.html b/trunk/dist/game/data/scripts/ai/npc/Toyron/33004-01.html new file mode 100644 index 0000000000..9c6ee54ab5 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/Toyron/33004-01.html @@ -0,0 +1,3 @@ +Toyron:
+You! Aren't you here to find the book? + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/Toyron/33004-02.html b/trunk/dist/game/data/scripts/ai/npc/Toyron/33004-02.html new file mode 100644 index 0000000000..8bf9d7f72c --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/Toyron/33004-02.html @@ -0,0 +1,4 @@ +Toyron:
+They're destroying the holy museum!
+Defeat them! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/Toyron/33004.html b/trunk/dist/game/data/scripts/ai/npc/Toyron/33004.html new file mode 100644 index 0000000000..f857057e93 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/Toyron/33004.html @@ -0,0 +1,5 @@ +Toyron:
+This museum displays the Giants' relics. Unfortunately, it's sometimes plagued by thieves.
+There are always more. We still uncover treasures in their ruins.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/ai/npc/Toyron/Toyron.java b/trunk/dist/game/data/scripts/ai/npc/Toyron/Toyron.java new file mode 100644 index 0000000000..6290493a76 --- /dev/null +++ b/trunk/dist/game/data/scripts/ai/npc/Toyron/Toyron.java @@ -0,0 +1,114 @@ +/* + * Copyright (C) 2004-2015 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 . + */ +package ai.npc.Toyron; + +import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheBookOfGiants; +import ai.npc.AbstractNpcAI; + +import com.l2jserver.gameserver.instancemanager.InstanceManager; +import com.l2jserver.gameserver.model.Location; +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.instancezone.InstanceWorld; +import com.l2jserver.gameserver.model.quest.QuestState; + +/** + * @author Neanrakyr + */ +public final class Toyron extends AbstractNpcAI +{ + // NPC + private static final int TOYRON = 33004; + // Misc + private static final int TEMPLATE_ID = 182; + // Location + private static final Location MUSEUM_OUT = new Location(-114359, 260120, -1192); + + private Toyron() + { + super(Toyron.class.getSimpleName(), "ai/npc"); + addStartNpc(TOYRON); + addFirstTalkId(TOYRON); + addTalkId(TOYRON); + addSpawnId(TOYRON); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player); + + if (event.equals("museum_teleport")) + { + if ((world != null) && (world.getTemplateId() == TEMPLATE_ID)) + { + world.removeAllowed(player.getObjectId()); + teleportPlayer(player, MUSEUM_OUT, 0); + } + player.teleToLocation(MUSEUM_OUT); + } + return super.onAdvEvent(event, npc, player); + } + + @Override + public String onSpawn(L2Npc npc) + { + npc.setIsInvul(true); + return super.onSpawn(npc); + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + final InstanceWorld world = InstanceManager.getInstance().getWorld(npc.getInstanceId()); + final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName()); + + if ((world != null) && (world.getTemplateId() == TEMPLATE_ID)) + { + if (qs != null) + { + switch (qs.getCond()) + { + case 1: + { + return "33004-01.html"; + } + case 2: + { + return "33004-02.html"; + } + case 3: + { + return "33004.html"; + } + } + } + else + { + return "33004.html"; + } + } + return "33004.html"; + } + + public static void main(String[] args) + { + new Toyron(); + } +} \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/instances/InstanceLoader.java b/trunk/dist/game/data/scripts/instances/InstanceLoader.java index db1b6158d6..7f8cfb73ca 100644 --- a/trunk/dist/game/data/scripts/instances/InstanceLoader.java +++ b/trunk/dist/game/data/scripts/instances/InstanceLoader.java @@ -47,6 +47,7 @@ import instances.LibraryOfSages.LibraryOfSages; import instances.MithrilMine.MithrilMine; import instances.MonasteryOfSilence1.MonasteryOfSilence1; import instances.MonasteryOfSilence2.MonasteryOfSilence2; +import instances.MuseumDungeon.MuseumDungeon; import instances.NornilsGarden.NornilsGarden; import instances.PailakaDevilsLegacy.PailakaDevilsLegacy; import instances.PailakaSongOfIceAndFire.PailakaSongOfIceAndFire; @@ -94,6 +95,7 @@ public final class InstanceLoader MithrilMine.class, MonasteryOfSilence1.class, MonasteryOfSilence2.class, + MuseumDungeon.class, NornilsGarden.class, PailakaDevilsLegacy.class, PailakaSongOfIceAndFire.class, diff --git a/trunk/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html b/trunk/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html new file mode 100644 index 0000000000..e85fda93fd --- /dev/null +++ b/trunk/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html @@ -0,0 +1,3 @@ +[Desk]:
+You've found The War of Gods and Giants. Take it back to Pantheon. + diff --git a/trunk/dist/game/data/scripts/instances/MuseumDungeon/33126-02.html b/trunk/dist/game/data/scripts/instances/MuseumDungeon/33126-02.html new file mode 100644 index 0000000000..6a13a00fbb --- /dev/null +++ b/trunk/dist/game/data/scripts/instances/MuseumDungeon/33126-02.html @@ -0,0 +1,4 @@ +[Desk]:
+After searching, you are unable to find The War of Gods and Giants on this desk.
+Try another desk. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/instances/MuseumDungeon/33126.html b/trunk/dist/game/data/scripts/instances/MuseumDungeon/33126.html new file mode 100644 index 0000000000..c4b256eefe --- /dev/null +++ b/trunk/dist/game/data/scripts/instances/MuseumDungeon/33126.html @@ -0,0 +1,4 @@ +[Desk]
+A desk normally used by Pantheon.
+It's so disorganized, it'll take a while to search it. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/instances/MuseumDungeon/MuseumDungeon.java b/trunk/dist/game/data/scripts/instances/MuseumDungeon/MuseumDungeon.java new file mode 100644 index 0000000000..ab34249a27 --- /dev/null +++ b/trunk/dist/game/data/scripts/instances/MuseumDungeon/MuseumDungeon.java @@ -0,0 +1,308 @@ +/* + * Copyright (C) 2004-2015 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 . + */ +package instances.MuseumDungeon; + +import instances.AbstractInstance; + +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; + +import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheBookOfGiants; + +import com.l2jserver.gameserver.enums.ChatType; +import com.l2jserver.gameserver.instancemanager.InstanceManager; +import com.l2jserver.gameserver.model.Location; +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.actor.instance.L2QuestGuardInstance; +import com.l2jserver.gameserver.model.instancezone.InstanceWorld; +import com.l2jserver.gameserver.model.quest.QuestState; +import com.l2jserver.gameserver.model.skills.Skill; +import com.l2jserver.gameserver.network.NpcStringId; +import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage; + +/** + * @author Neanrakyr + */ +public final class MuseumDungeon extends AbstractInstance +{ + // Npcs + private static final int PANTHEON = 32972; + private static final int TOYRON = 33004; + private static final int DESK = 33126; + private static final int THIEF = 23121; + // Items + private static final int THE_WAR_OF_GODS_AND_GIANTS = 17575; + // Locations + private static final Location START_LOC = new Location(-114711, 243911, -7968); + private static final Location TOYRON_SPAWN = new Location(-114707, 245428, -7968); + // Misc + private static final int TEMPLATE_ID = 182; + private static final NpcStringId[] TOYRON_SHOUT = + { + NpcStringId.YOUR_NORMAL_ATTACKS_AREN_T_WORKING, + NpcStringId.LOOKS_LIKE_ONLY_SKILL_BASED_ATTACKS_DAMAGE_THEM + }; + private static final NpcStringId[] THIEF_SHOUT = + { + NpcStringId.YOU_LL_NEVER_LEAVE_WITH_THAT_BOOK, + NpcStringId.FINALLY_I_THOUGHT_I_WAS_GOING_TO_DIE_WAITING + }; + + protected class MDWorld extends InstanceWorld + { + protected L2QuestGuardInstance toyron = null; + protected L2MonsterInstance thief = null; + protected List desks; + protected Set spawnedThiefs = Collections.newSetFromMap(new ConcurrentHashMap()); + protected int bookDesk = 0; + protected int killedThiefs = 0; + } + + public MuseumDungeon() + { + super(MuseumDungeon.class.getSimpleName()); + addStartNpc(PANTHEON); + addTalkId(PANTHEON); + addTalkId(TOYRON); + addFirstTalkId(DESK); + addAttackId(THIEF); + addKillId(THIEF); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + if (event.equals("enter_instance")) + { + enterInstance(player, new MDWorld(), "MuseumDungeon.xml", TEMPLATE_ID); + } + else + { + final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player); + + if ((tmpworld != null) && (tmpworld instanceof MDWorld)) + { + final MDWorld world = (MDWorld) tmpworld; + switch (event) + { + case "toyron_follow": + { + world.toyron.getAI().startFollow(player); + break; + } + case "toyron_shout": + { + if (!world.toyron.canTarget(player)) + { + cancelQuestTimer("toyron_shout", world.toyron, player); + } + broadcastNpcSay(world.toyron, ChatType.NPC_GENERAL, TOYRON_SHOUT[getRandom(2)]); + break; + } + case "spawn_thiefs_stage_1": + { + final List thiefs = spawnGroup("thiefs", world.getInstanceId()); + world.spawnedThiefs.addAll(thiefs); + for (L2Npc thief : world.spawnedThiefs) + { + thief.setIsRunning(true); + addAttackPlayerDesire(thief, player); + broadcastNpcSay(thief, ChatType.NPC_GENERAL, THIEF_SHOUT[getRandom(2)]); + } + break; + } + case "spawn_thiefs_stage_2": + { + final List thiefs = spawnGroup("thiefs", world.getInstanceId()); + world.spawnedThiefs.addAll(thiefs); + for (L2Npc thief : world.spawnedThiefs) + { + thief.setIsRunning(true); + } + break; + } + case "check_follow": + { + if (world.toyron.canTarget(player)) + { + startQuestTimer("toyron_follow", 500, world.toyron, player); + } + break; + } + case "kill_thief": + { + npc.doDie(player); + startQuestTimer("toyron_follow", 500, world.toyron, player); + break; + } + } + } + } + return super.onAdvEvent(event, npc, player); + } + + @Override + public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon) + { + final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName()); + final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId()); + final MDWorld world = (MDWorld) tmpworld; + + if ((qs != null) && qs.isCond(2)) + { + if (world.killedThiefs >= 1) + { + qs.setCond(3, true); + showOnScreenMsg(player, NpcStringId.TALK_TO_TOYRON_TO_RETURN_TO_THE_MUSEUM_LOBBY, ExShowScreenMessage.TOP_CENTER, 4500); + } + else + { + world.killedThiefs++; + } + } + return super.onKill(npc, player, isSummon); + } + + @Override + public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon, Skill skill) + { + final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId()); + final MDWorld world = (MDWorld) tmpworld; + + if (skill != null) + { + broadcastNpcSay(world.toyron, ChatType.NPC_GENERAL, NpcStringId.ENOUGH_OF_THIS_COME_AT_ME); + world.toyron.reduceCurrentHp(1, npc, null); + npc.reduceCurrentHp(1, world.toyron, null); + startQuestTimer("kill_thief", 2500, npc, attacker); + } + else + { + showOnScreenMsg(attacker, NpcStringId.USE_YOUR_SKILL_ATTACKS_AGAINST_THEM, ExShowScreenMessage.TOP_CENTER, 4500); + } + return super.onAttack(npc, attacker, damage, isSummon, skill); + } + + @Override + public String onFirstTalk(L2Npc npc, L2PcInstance player) + { + final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId()); + final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName()); + final MDWorld world = (MDWorld) tmpworld; + String htmltext = null; + + if (qs == null) + { + htmltext = "33126.html"; + } + else if (qs.isCond(1)) + { + if (((npc.getObjectId() == world.bookDesk) && !qs.hasQuestItems(THE_WAR_OF_GODS_AND_GIANTS))) + { + qs.setCond(2); + giveItems(player, THE_WAR_OF_GODS_AND_GIANTS, 1); + showOnScreenMsg(player, NpcStringId.WATCH_OUT_YOU_ARE_BEING_ATTACKED, ExShowScreenMessage.TOP_CENTER, 4500); + startQuestTimer("spawn_thiefs_stage_1", 500, world.thief, player); + startQuestTimer("toyron_follow", 500, world.toyron, player); + htmltext = "33126-01.html"; + } + else + { + htmltext = "33126-02.html"; + } + } + else if (qs.isCond(2)) + { + htmltext = "33126.html"; + } + return htmltext; + } + + protected void spawnToyron(L2PcInstance player, MDWorld world) + { + if (world.toyron != null) + { + world.toyron.deleteMe(); + } + world.toyron = (L2QuestGuardInstance) addSpawn(TOYRON, TOYRON_SPAWN, false, 0, true, world.getInstanceId()); + world.toyron.setIsRunning(true); + world.toyron.setCanReturnToSpawnPoint(false); + } + + protected void checkStage(L2PcInstance player, MDWorld world) + { + final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName()); + + if (qs != null) + { + if (qs.isCond(1)) + { + showOnScreenMsg(player, NpcStringId.AMONG_THE_4_BOOKSHELVES_FIND_THE_ONE_CONTAINING_A_VOLUME_CALLED_THE_WAR_OF_GODS_AND_GIANTS, ExShowScreenMessage.TOP_CENTER, 4500); + } + else if (qs.isCond(2)) + { + if (world.spawnedThiefs.isEmpty()) + { + startQuestTimer("spawn_thiefs_stage_2", 500, world.thief, player); + startQuestTimer("toyron_follow", 500, world.toyron, player); + } + else + { + startQuestTimer("check_follow", 1000, world.toyron, player); + } + } + } + } + + protected void spawnDesks(L2PcInstance player, MDWorld world) + { + final List desks = spawnGroup("desks", world.getInstanceId()); + for (L2Npc desk : desks) + { + double point = Math.random(); + int counter = 0; + if (((point <= 0.25) && (counter == 0)) || ((point > 0.25) && (point <= 0.5) && (counter == 1)) || ((point > 0.5) && (point <= 0.75) && (counter == 2)) || ((point > 0.75) && (counter == 3))) + { + world.bookDesk = desk.getObjectId(); + } + ++counter; + } + if ((world.bookDesk == 0) && (desks.size() > 0)) + { + world.bookDesk = desks.get(0).getObjectId(); + } + } + + @Override + public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance) + { + if (firstEntrance) + { + world.addAllowed(player.getObjectId()); + spawnToyron(player, (MDWorld) world); + spawnDesks(player, (MDWorld) world); + } + teleportPlayer(player, START_LOC, world.getInstanceId()); + checkStage(player, (MDWorld) world); + } +} \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-01.htm b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-01.htm new file mode 100644 index 0000000000..caa9937a87 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-01.htm @@ -0,0 +1,5 @@ +Pantheon:
+Gallint is hurt and cannot move, but we must do something about the books before they get stolen.
+They're looking for The War of Gods and Giants mostly, but there are a couple of others they'd probably find useful too.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-02.htm b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-02.htm new file mode 100644 index 0000000000..900d898323 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-02.htm @@ -0,0 +1,5 @@ +Pantheon:
+We think they were looking for anything related to the Giants,and tried to steal The War of Gods and Giants, an ancient book that was discovered in Ye Sagira.
+It has many stories about the powers of the Giants, how that power can be learned, and about others species from their time. Now that the island has crashed, perhaps we should think about safeguarding the book...
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-03.htm b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-03.htm new file mode 100644 index 0000000000..a78d596f51 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-03.htm @@ -0,0 +1,6 @@ +Pantheon:
+Thank you! +When you get to the museum, you should see a number of desks - one of them has The War of Giants and Gods on it. Find it, and bring it to me.
+Would you like to go to the museum?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-04.htm b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-04.htm new file mode 100644 index 0000000000..fafed6603a --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-04.htm @@ -0,0 +1,5 @@ +Pantheon:
+You're still here +Go into the museum!
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-05.htm b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-05.htm new file mode 100644 index 0000000000..25bf1ff8b6 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-05.htm @@ -0,0 +1,4 @@ +Pantheon:
+I just saw suspicious intruders entering the Museum! I fear for the rare valuable articles inside the Museum. Please hurry into the Museum and deal with the intruders!
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-06.htm b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-06.htm new file mode 100644 index 0000000000..de5bf69043 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-06.htm @@ -0,0 +1,5 @@ +Pantheon:
+You've brought the book? Good! It must have been difficult to find it amongst all those others!
+I hope you didn't get hurt either - Gallint may be a fool, but plenty have hurt themselves moving books around before him.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-07.htm b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-07.htm new file mode 100644 index 0000000000..5dc6709fe6 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-07.htm @@ -0,0 +1,6 @@ +Pantheon:
+What? The thieves are getting more brash by the day!
+Hmm... So, I wonder if the books related to Giants... are also related to Embryo. It's just speculation, but something worth considering.
+Now, I must apologize for placing you in harm's way. Please accept these Earrings - accessories such as these help protect you against magic!
+Remember: you can wear up to two earrings at a time. Purchase more from the General Merchant if you wish. + diff --git a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-08.htm b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-08.htm new file mode 100644 index 0000000000..296f582994 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-08.htm @@ -0,0 +1,4 @@ +Pantheon:
+I'm still looking into things, friend. I'll let you know when I find anything
+(You have already completed this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-09.htm b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-09.htm new file mode 100644 index 0000000000..6f86191730 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-09.htm @@ -0,0 +1,4 @@ +Pantheon:
+This mission can't be give to just anyone!
+(Only characters below 20, who've completed the "Let's Respect Elders" quest, may start this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/Q10327_IntruderWhoWantsTheBookOfGiants.java b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/Q10327_IntruderWhoWantsTheBookOfGiants.java new file mode 100644 index 0000000000..0b32d13c26 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/Q10327_IntruderWhoWantsTheBookOfGiants.java @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2004-2015 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 . + */ +package quests.Q10327_IntruderWhoWantsTheBookOfGiants; + +import quests.Q10326_RespectYourElders.Q10326_RespectYourElders; + +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.holders.ItemHolder; +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.network.NpcStringId; +import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage; + +/** + * @author Neanrakyr + */ +public class Q10327_IntruderWhoWantsTheBookOfGiants extends Quest +{ + // Npcs + private static final int PANTHEON = 32972; + // Items + private static final int THE_WAR_OF_GODS_AND_GIANTS = 17575; + private static final ItemHolder APPRENTICE_EARRING = new ItemHolder(112, 2); + // Level Condition + private static final int MAX_LEVEL = 20; + + public Q10327_IntruderWhoWantsTheBookOfGiants() + { + super(10327, Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName(), "Intruder Who Wants the Book of Giants "); + addStartNpc(PANTHEON); + addTalkId(PANTHEON); + registerQuestItems(THE_WAR_OF_GODS_AND_GIANTS); + addCondMaxLevel(MAX_LEVEL, "32972-09.htm"); + addCondCompletedQuest(Q10326_RespectYourElders.class.getSimpleName(), "32972-09.htm"); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "32972-02.htm": + { + htmltext = event; + break; + } + case "32972-03.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "32972-07.htm": + { + if (qs.isCond(3)) + { + showOnScreenMsg(player, NpcStringId.ACCESSORIES_HAVE_BEEN_ADDED_TO_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 4500); + giveAdena(player, 160, true); + giveItems(player, APPRENTICE_EARRING); + addExpAndSp(player, 7800, 5); + qs.exitQuest(false, true); + break; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = null; + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "32972-01.htm"; + break; + } + case State.STARTED: + { + if (qs.isCond(1)) + { + htmltext = "32972-04.htm"; + break; + } + else if (qs.isCond(2)) + { + htmltext = "32972-05.htm"; + break; + } + else if (qs.isCond(3)) + { + htmltext = "32972-06.htm"; + break; + } + } + case State.COMPLETED: + { + htmltext = "32972-08.htm"; + break; + } + } + return htmltext; + } +} \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-01.htm b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-01.htm new file mode 100644 index 0000000000..3dccbd17fd --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-01.htm @@ -0,0 +1,4 @@ +Pa'agrio Lord Kakai:
+What... what do you have there in your hand? Whatever it is, it's giving me a killer headache... Oh, you've got yourself a nasty little Evil Fragment, huh. You've seen Pantheon, have you? Hand that thing over and let me quench it before we both get migraines.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-02.htm b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-02.htm new file mode 100644 index 0000000000..0c11c33d48 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-02.htm @@ -0,0 +1,4 @@ +Pa'agrio Lord Kakai:
+Whoa! Step back a bit, that's one potent and nasty Evil Fragment you've got there. From Pantheon, huh? What does he want me to do with it?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-03.htm b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-03.htm new file mode 100644 index 0000000000..2961ba94e4 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-03.htm @@ -0,0 +1,4 @@ +Pa'agrio Lord Kakai:
+Hmm, good idea. Sealing it is probably safer than destroying it. This stuff tends to cause quite the explosion if you mess up when trying to destroy it. I can weave the power of Pa'agrio around it. That should make a sufficient seal. Nasty piece of work.
+Did you know that these things were parasitic? Yah. There's been an influx of Evil Fragments in Ruins of Ye Sagira. When anyone dies out there, the pieces latch on to the corpse. Gross. But it's even worse when they latch on to living bodies! We've had a few outbreaks in the village lately. The damage those things inflict is incredible and down right disturbing! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-04.htm b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-04.htm new file mode 100644 index 0000000000..d3ea3f21a1 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/30565-04.htm @@ -0,0 +1,4 @@ +Pa'agrio Lord Kakai:
+If you're wondering about that Evil Fragment, no worries, It's been nullified.
+(You have already completed this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-01.htm b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-01.htm new file mode 100644 index 0000000000..c34e8fb402 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-01.htm @@ -0,0 +1,6 @@ +Pantheon:
+I have a favor to ask of you. + As I mentioned, the people who attacked you in the museum have broken in before, and we want to find out who they are. As luck would have it, they dropped this little beauty. I want you to take it to a friend of mine...
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-02.htm b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-02.htm new file mode 100644 index 0000000000..1ea683a6aa --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-02.htm @@ -0,0 +1,5 @@ +Pantheon:
+It's an Evil Fragment. Our research has shown that by itself it is completely harmless.
+However, when they incubate in the corpses buried under Ye Sagira they create horrible creatures.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-03.htm b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-03.htm new file mode 100644 index 0000000000..3352164c15 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-03.htm @@ -0,0 +1,5 @@ +Pantheon:
+Well, we don't know when the monster will hatch, so we want you to destroy it as soon as possible! Asterios, the head of the elves, is away, so the only one that can seal the seed is Kakai, leader of the Orcs.
+We want you to take the seed to Pa'agrio Lord Kakai, he's in the Administration Office.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-04.htm b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-04.htm new file mode 100644 index 0000000000..a39f5ce2f4 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-04.htm @@ -0,0 +1,4 @@ +Pantheon:
+Thank you! + Here it is, now hurry to Pa'agrio Lord Kakai before the fragment hatches! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-05.htm b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-05.htm new file mode 100644 index 0000000000..780c950325 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-05.htm @@ -0,0 +1,3 @@ +Pantheon:
+If the fragment hatches in the museum, it'ill be a complete disaster! Go to Pa'agrio Lord Kakai in the Administration Office and have him destroy it! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-06.htm b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-06.htm new file mode 100644 index 0000000000..2509d9b7b5 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-06.htm @@ -0,0 +1,4 @@ +Pantheon:
+I'm sorry. The time hasn't come for you.
+(Only characters under level 20, who have completed the "Looking for New Power" quest, may start this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-07.htm b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-07.htm new file mode 100644 index 0000000000..6999da6f98 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/32972-07.htm @@ -0,0 +1,4 @@ +Pantheon:
+Evil Fragment is a walking corpse! It's horriable, don't you think?
+(You have already completed this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/Q10328_RequestToSealTheEvilFragment.java b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/Q10328_RequestToSealTheEvilFragment.java new file mode 100644 index 0000000000..5152839e6f --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10328_RequestToSealTheEvilFragment/Q10328_RequestToSealTheEvilFragment.java @@ -0,0 +1,126 @@ +/* + * Copyright (C) 2004-2015 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 . + */ +package quests.Q10328_RequestToSealTheEvilFragment; + +import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheBookOfGiants; + +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.quest.Quest; +import com.l2jserver.gameserver.model.quest.QuestState; +import com.l2jserver.gameserver.model.quest.State; + +/** + * @author Neanrakyr + */ +public final class Q10328_RequestToSealTheEvilFragment extends Quest +{ + // Npcs + private static final int PANTHEON = 32972; + private static final int KAKAI = 30565; + + // Items + private static final int EVIL_FRAGMENT = 17577; + + // Level Condition + private static final int MAX_LEVEL = 20; + + public Q10328_RequestToSealTheEvilFragment() + { + super(10328, Q10328_RequestToSealTheEvilFragment.class.getSimpleName(), "Request to Seal the Evil Fragment"); + addStartNpc(PANTHEON); + addTalkId(PANTHEON, KAKAI); + addCondMaxLevel(MAX_LEVEL, "32972-06.htm"); + registerQuestItems(EVIL_FRAGMENT); + addCondCompletedQuest(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName(), "32972-06.htm"); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "32972-04.htm": + { + qs.startQuest(); + qs.giveItems(EVIL_FRAGMENT, 1); + htmltext = event; + break; + } + case "32972-02.htm": + case "32972-03.htm": + case "30565-02.htm": + { + htmltext = event; + break; + } + case "30565-03.htm": + { + if (qs.isStarted()) + { + giveAdena(player, 20000, true); + addExpAndSp(player, 13000, 5); + qs.exitQuest(false, true); + htmltext = event; + break; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = null; + + switch (qs.getState()) + { + case State.CREATED: + { + if (npc.getId() == PANTHEON) + { + htmltext = "32972-01.htm"; + break; + } + break; + } + case State.STARTED: + { + htmltext = npc.getId() == PANTHEON ? "32972-05.htm" : "30565-01.htm"; + break; + } + case State.COMPLETED: + { + htmltext = npc.getId() == PANTHEON ? "32972-07.htm" : "30565-04.htm"; + break; + } + } + return htmltext; + } +} \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-01.htm b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-01.htm new file mode 100644 index 0000000000..66f4d3936a --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-01.htm @@ -0,0 +1,4 @@ +Pa'agrio Lord Kakai:
+Young one, I've been watching you for some time. You are powerful and good, yes, you've got a true Heart of Flame! Would you like to apply that flame and your enthusiasm to aid the village?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-02.htm b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-02.htm new file mode 100644 index 0000000000..1b01e6d7e1 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-02.htm @@ -0,0 +1,5 @@ +Pa'agrio Lord Kakai:
+The Evil Fragments continue to spread. It's beginning to be a toss up whether we're doing archaeology or parasite control over in the ruins. I'd love to send over some reinforcements, but we've had a rash of monster attacks in the village, so I can't just reassign troops.
+Could you head on over to Ye Sagira and help out?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-03.htm b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-03.htm new file mode 100644 index 0000000000..2eef2136f4 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-03.htm @@ -0,0 +1,4 @@ +Pa'agrio Lord Kakai:
+You can find Atran at the crossroads, on the way from the village to Ye Sagira. Don't let his gruff exterior fool you, he talks like an ogre, but he's sweet as spun candy at the core.
+If you tell him I sent you, he'll tell you how to get to Ye Sagira. May the luck of Pa'agrio always find you. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-04.htm b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-04.htm new file mode 100644 index 0000000000..8fdbb7a53a --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-04.htm @@ -0,0 +1,3 @@ +Pa'agrio Lord Kakai:
+Have you met Atran before? He's at the crossroads, between the village and Esaria. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-05.htm b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-05.htm new file mode 100644 index 0000000000..71423c32b6 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-05.htm @@ -0,0 +1,4 @@ +Pa'agrio Lord Kakai:
+I taught Pantheon's son, Saril, swordmanship when he was a young lad. Nice kid. Has a mean. sixte parry.
+(Only characters who have completed the Level 20 or below quest, Request to Seal Pieces of Evil, can take this quest.). + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-06.htm b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-06.htm new file mode 100644 index 0000000000..f5815aeb33 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/30565-06.htm @@ -0,0 +1,4 @@ +Pa'agrio Lord Kakai:
+I will pray that the flame of Pa'agrio always support you in your journeys.
+(You have already completed this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/33448-01.htm b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/33448-01.htm new file mode 100644 index 0000000000..959ec020d8 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/33448-01.htm @@ -0,0 +1,4 @@ +Atran:
+Why are you looking at me like that? It makes me feel terrible! Who are you? Huh?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/33448-02.htm b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/33448-02.htm new file mode 100644 index 0000000000..0d3cc443d2 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/33448-02.htm @@ -0,0 +1,4 @@ +Atran:
+What? Kakai sent you? You should've told me - I almost hit you! Identify yourself next time!
+Well, to be honest, you're useless to me. There's no reason for you to be here. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/33448-03.htm b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/33448-03.htm new file mode 100644 index 0000000000..05ff30da7c --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/33448-03.htm @@ -0,0 +1,4 @@ +Atran:
+So, so, so, so, so bored.
+(The quest has already been completed) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/Q10329_BackupSeekers.java b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/Q10329_BackupSeekers.java new file mode 100644 index 0000000000..3425dffcd1 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10329_BackupSeekers/Q10329_BackupSeekers.java @@ -0,0 +1,293 @@ +/* + * Copyright (C) 2004-2015 L2J Mobius 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 . + */ +package quests.Q10329_BackupSeekers; + +import quests.Q10328_RequestToSealTheEvilFragment.Q10328_RequestToSealTheEvilFragment; + +import com.l2jserver.gameserver.enums.ChatType; +import com.l2jserver.gameserver.model.Location; +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.events.EventType; +import com.l2jserver.gameserver.model.events.ListenerRegisterType; +import com.l2jserver.gameserver.model.events.annotations.RegisterEvent; +import com.l2jserver.gameserver.model.events.annotations.RegisterType; +import com.l2jserver.gameserver.model.events.impl.character.player.OnPlayerTransform; +import com.l2jserver.gameserver.model.holders.ItemHolder; +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.network.NpcStringId; +import com.l2jserver.gameserver.network.serverpackets.ExRotation; +import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage; +import com.l2jserver.gameserver.network.serverpackets.NpcSay; +import com.l2jserver.gameserver.util.Util; + +/** + * @author Neanrakyr + */ +public class Q10329_BackupSeekers extends Quest +{ + // Npcs + private static final int KAKAI = 30565; + private static final int ATRAN = 33448; + private static final int BART = 33204; + + // Items + private static final ItemHolder RING_OF_KNOWLEDGE = new ItemHolder(875, 2); + private static final ItemHolder NECKLACE_OF_KNOWLEDGE = new ItemHolder(906, 1); + + // Misc + private static final int MAX_LEVEL = 20; + private static final Location BART_SPAWN_1 = new Location(-117955, 255832, -1320); + private static final Location BART_SPAWN_2 = new Location(-114121, 252445, -1560); + private final static Location[] BART_LOC_1 = + { + new Location(-117063, 255528, -1296), + new Location(-115766, 254791, -1504), + new Location(-114753, 254755, -1528), + new Location(-114606, 253534, -1528), + new Location(-114375, 252807, -1536), + }; + private final static Location[] BART_LOC_2 = + { + new Location(-114410, 252220, -1591), + new Location(-114416, 250812, -1760), + new Location(-113217, 250445, -1912), + new Location(-112721, 250479, -1984), + new Location(-112093, 249769, -2248), + new Location(-110988, 249191, -2512), + new Location(-110110, 248374, -2688), + new Location(-109831, 247993, -2760), + new Location(-109702, 247037, -2960), + new Location(-109180, 247015, -3088), + new Location(-107839, 248766, -3216), + }; + + public Q10329_BackupSeekers() + { + super(10329, Q10329_BackupSeekers.class.getSimpleName(), "Backup Seekers"); + addStartNpc(KAKAI); + addTalkId(KAKAI, ATRAN); + addSpawnId(BART); + addMoveFinishedId(BART); + addCondMaxLevel(MAX_LEVEL, "30565-05.htm"); + addCondCompletedQuest(Q10328_RequestToSealTheEvilFragment.class.getSimpleName(), "30565-05.htm"); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "30565-02.htm": + { + htmltext = event; + break; + } + case "30565-03.htm": + { + qs.startQuest(); + htmltext = event; + qs.setMemoState(1); + final L2Npc bart = addSpawn(BART, BART_SPAWN_1, false, 300000); + bart.broadcastPacket(new NpcSay(bart.getObjectId(), ChatType.NPC_GENERAL, bart.getTemplate().getDisplayId(), NpcStringId.I_WILL_GUIDE_YOU_FOLLOW_ME)); + startQuestTimer("MOVE_DELAY", 500, bart, player); + break; + } + case "33448-02.htm": + { + if (qs.isStarted()) + { + showOnScreenMsg(player, NpcStringId.ACCESSORIES_HAVE_BEEN_ADDED_TO_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 4500); + giveAdena(player, 25000, true); + giveItems(player, RING_OF_KNOWLEDGE); + giveItems(player, NECKLACE_OF_KNOWLEDGE); + addExpAndSp(player, 16900, 5); + qs.exitQuest(false, true); + htmltext = event; + break; + } + break; + } + case "CHECK_PLAYER": + { + final L2PcInstance owner = npc.getVariables().getObject("OWNER", L2PcInstance.class); + if (owner != null) + { + if (npc.calculateDistance(owner, false, false) < 150) + { + npc.getVariables().set("FAIL_COUNT", 0); + final int loc_index = npc.getVariables().getInt("MOVE_INDEX", -1) + 1; + if (loc_index > 0) + { + if (qs.isMemoState(1)) + { + if (loc_index == 5) + { + npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.TALK_TO_THAT_APPRENTICE_AND_GET_ON_KUKURI)); + startQuestTimer("DELETE_NPC", 2000, npc, owner); + break; + } + npc.getVariables().set("MOVE_INDEX", loc_index); + addMoveToDesire(npc, BART_LOC_1[loc_index], 0); + } + else if (qs.isMemoState(2)) + { + if (loc_index == 11) + { + npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.THIS_IS_IT_FOR_ME)); + startQuestTimer("DELETE_NPC", 2000, npc, owner); + break; + } + npc.getVariables().set("MOVE_INDEX", loc_index); + addMoveToDesire(npc, BART_LOC_2[loc_index], 0); + } + } + } + else + { + final int failCount = npc.getVariables().getInt("FAIL_COUNT", 0); + npc.getVariables().set("FAIL_COUNT", failCount + 1); + + if (failCount >= 30) + { + npc.deleteMe(); + break; + } + + startQuestTimer("CHECK_PLAYER", 1200, npc, owner); + + if (getRandom(100) < 10) + { + npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.HEY_KID_HURRY_UP_AND_FOLLOW_ME)); + } + } + } + else + { + npc.deleteMe(); + } + break; + } + case "MOVE_DELAY": + { + if (qs.isMemoState(1)) + { + npc.getVariables().set("OWNER", player); + npc.setIsRunning(true); + npc.broadcastInfo(); + addMoveToDesire(npc, BART_LOC_1[0], 0); + npc.getVariables().set("MOVE_INDEX", 0); + npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.YOU_MUST_BE_THE_ONE_KAKAI_TALKED_ABOUT)); + npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.YOU_SHOULD_RIDE_KUKURI_TO_GO_TO_YE_SAGIRA)); + break; + } + else if (qs.isMemoState(2)) + { + npc.getVariables().set("OWNER", player); + npc.setIsRunning(true); + npc.broadcastInfo(); + addMoveToDesire(npc, BART_LOC_2[0], 0); + npc.getVariables().set("MOVE_INDEX", 0); + npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.OPEN_YOUR_MAP_WHEN_YOU_ARRIVE_AT_YE_SAGIRA)); + npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.IT_S_HARD_TO_TELL_WHERE_YOU_ARE_AT_WITHOUT_A_MAP_IN_YE_SAGIRA)); + break; + } + break; + } + case "DELETE_NPC": + { + npc.deleteMe(); + break; + } + case "RESPAWN_BART": + { + qs.setMemoState(2); + final L2Npc bart = addSpawn(BART, BART_SPAWN_2, false, 300000); + bart.broadcastPacket(new NpcSay(bart.getObjectId(), ChatType.NPC_GENERAL, bart.getTemplate().getDisplayId(), NpcStringId.I_WILL_GUIDE_YOU_FOLLOW_ME)); + startQuestTimer("MOVE_DELAY", 500, bart, player); + break; + } + } + return htmltext; + } + + @RegisterEvent(EventType.ON_PLAYER_TRANSFORM) + @RegisterType(ListenerRegisterType.GLOBAL_PLAYERS) + public void onPlayerTransform(OnPlayerTransform event) + { + if (event.getTransformId() == 137) + { + startQuestTimer("RESPAWN_BART", 500, null, event.getActiveChar()); + } + } + + @Override + public void onMoveFinished(L2Npc npc) + { + final L2PcInstance owner = npc.getVariables().getObject("OWNER", L2PcInstance.class); + + if (owner != null) + { + npc.setHeading(Util.calculateHeadingFrom(npc, owner)); + npc.broadcastPacket(new ExRotation(npc.getObjectId(), npc.getHeading())); + npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getTemplate().getDisplayId(), NpcStringId.HEY_KID_HURRY_UP_AND_FOLLOW_ME)); + startQuestTimer("CHECK_PLAYER", 1200, npc, owner); + } + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = null; + + switch (qs.getState()) + { + case State.CREATED: + { + if (npc.getId() == KAKAI) + { + htmltext = "30565-01.htm"; + break; + } + break; + } + case State.STARTED: + { + htmltext = npc.getId() == KAKAI ? "30565-04.htm" : "33448-01.htm"; + break; + } + case State.COMPLETED: + { + htmltext = npc.getId() == KAKAI ? "30565-06.htm" : "33448-03.htm"; + break; + } + } + return htmltext; + } +} \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-01.htm b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-01.htm new file mode 100644 index 0000000000..bf27083888 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-01.htm @@ -0,0 +1,5 @@ +Lakcis:
+Why are you here? It's not safe here - you should go back to town now! Hell, even I'm thinking of leaving if this many monsters keep showing up!
+It's embarrassing to say this but I don't even know how to use magic because I am just a scholar.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-02.htm b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-02.htm new file mode 100644 index 0000000000..62611ad34c --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-02.htm @@ -0,0 +1,5 @@ +Lakcis:
+What? Atran did? That kid was badly hurt last time he was here, I hope he's okay these days.
+Did you have a message or anything? I doubt Atran wanted you to have the same thing that happened to him happen to you.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-03.htm b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-03.htm new file mode 100644 index 0000000000..96423d006f --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-03.htm @@ -0,0 +1,4 @@ +Lakcis:
+Hahaha! Yeah, that sounds like Atran alright - He always looks out for me in his own special way.
+Thanks for the message - it's good to hear he's doing well, and that his injury didn't eviscerate his sense of humor.
+ \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-04.htm b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-04.htm new file mode 100644 index 0000000000..60ac51aafc --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-04.htm @@ -0,0 +1,4 @@ +Lakcis:
+I wouln't advise sight-seeing in a place like this, friend. Unless you enjoy being eaten alive, that is.
+This quest can only be started by characters working on the quest "To the Esagria Ruins".) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-05.htm b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-05.htm new file mode 100644 index 0000000000..f0dd06661b --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/32977-05.htm @@ -0,0 +1,4 @@ +Lakcis:
+If there were no monsters, the investigations would be so much easier...
+(You've already completed this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-01.htm b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-01.htm new file mode 100644 index 0000000000..4922b77f66 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-01.htm @@ -0,0 +1,5 @@ +Atran:
+You're still here?
+Why?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-02.htm b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-02.htm new file mode 100644 index 0000000000..58791e9b9c --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-02.htm @@ -0,0 +1,7 @@ +Atran:
+You want to go to Ye Sagira? For what reason? +There are not many rangers left at the Ruins of Ye Sagira... maybe one or two per exploration zone, but they're not fighters, and can't help you if you find yourself in danger.
+Idiots go there without a plan, and idiots get hurt. That's how I broke my...
+No, no... That's not why I got hurt. Anyway. Are you really going there?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-03.htm b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-03.htm new file mode 100644 index 0000000000..b3ddcb3369 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-03.htm @@ -0,0 +1,5 @@ +Atran:
+Well then, it is my duty to help you as much as I can.
+To get to the ruins, follow the path you came, only in the opposite direction. Walk until you meet Lakcis - he stands at the Ruins of Ye Sagira Entrance . + He's a scholar, so can't go into Ruins of Ye Sagira. Go help him. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-04.htm b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-04.htm new file mode 100644 index 0000000000..3882239705 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-04.htm @@ -0,0 +1,3 @@ +Atran:
+Why are you still here? Hurry and meet Lakcis at the Ruins of Ye Sagira Entrance. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-05.htm b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-05.htm new file mode 100644 index 0000000000..dcb0d4436b --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-05.htm @@ -0,0 +1,4 @@ +Atran:
+You're still free? If you have time to play around here, you have time to go somewhere else and hunt.
+(Only characters level 10 or higher, who have completed the 'Backup Seekers' quest, can start this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-06.htm b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-06.htm new file mode 100644 index 0000000000..592ad584ab --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/33448-06.htm @@ -0,0 +1,4 @@ +Atran:
+You're still free?
+(You've already completed this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/Q10330_ToTheRuinsOfYeSagira.java b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/Q10330_ToTheRuinsOfYeSagira.java new file mode 100644 index 0000000000..ba33712f95 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10330_ToTheRuinsOfYeSagira/Q10330_ToTheRuinsOfYeSagira.java @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2004-2015 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 . + */ +package quests.Q10330_ToTheRuinsOfYeSagira; + +import quests.Q10329_BackupSeekers.Q10329_BackupSeekers; + +import com.l2jserver.gameserver.model.actor.L2Npc; +import com.l2jserver.gameserver.model.actor.instance.L2PcInstance; +import com.l2jserver.gameserver.model.holders.ItemHolder; +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.network.NpcStringId; +import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage; + +/** + * @author Neanrakyr + */ +public class Q10330_ToTheRuinsOfYeSagira extends Quest +{ + // Npcs + private static final int ATRAN = 33448; + private static final int LAKCIS = 32977; + + // Items + private static final ItemHolder LEATHER_SHIRT = new ItemHolder(22, 1); + private static final ItemHolder LEATHER_PANTS = new ItemHolder(29, 1); + + // Level Condition + private static final int MIN_LEVEL = 8; + private static final int MAX_LEVEL = 20; + + public Q10330_ToTheRuinsOfYeSagira() + { + super(10330, Q10330_ToTheRuinsOfYeSagira.class.getSimpleName(), "To the Ruins of Ye Sagira"); + addStartNpc(ATRAN); + addTalkId(ATRAN, LAKCIS); + addCondMinLevel(MIN_LEVEL, "33448-05.htm"); + addCondMaxLevel(MAX_LEVEL, "33448-05.htm"); + addCondCompletedQuest(Q10329_BackupSeekers.class.getSimpleName(), "33448-05.htm"); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, false); + if (qs == null) + { + return null; + } + + String htmltext = null; + switch (event) + { + case "33448-02.htm": + case "32977-02.htm": + { + htmltext = event; + break; + } + case "33448-03.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "32977-03.htm": + { + if (qs.isStarted()) + { + showOnScreenMsg(player, NpcStringId.ARMOR_HAS_BEEN_ADDED_TO_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 4500); + giveAdena(player, 620, true); + giveItems(player, LEATHER_SHIRT); + giveItems(player, LEATHER_PANTS); + addExpAndSp(player, 23000, 5); + qs.exitQuest(false, true); + htmltext = event; + break; + } + break; + } + } + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance player) + { + final QuestState qs = getQuestState(player, true); + String htmltext = null; + + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = npc.getId() == ATRAN ? "33448-01.htm" : "32977-04.htm"; + break; + } + case State.STARTED: + { + htmltext = npc.getId() == ATRAN ? "33448-04.htm" : "32977-01.htm"; + break; + } + case State.COMPLETED: + { + htmltext = npc.getId() == ATRAN ? "33448-06.htm" : "32977-05.htm"; + break; + } + } + return htmltext; + } +} \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java index 3084c0e381..e695c7ffbc 100644 --- a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -189,6 +189,10 @@ import quests.Q10323_TrainLikeItsReal.Q10323_TrainLikeItsReal; import quests.Q10324_FindingMagisterGallint.Q10324_FindingMagisterGallint; import quests.Q10325_SearchingForNewPower.Q10325_SearchingForNewPower; import quests.Q10326_RespectYourElders.Q10326_RespectYourElders; +import quests.Q10327_IntruderWhoWantsTheBookOfGiants.Q10327_IntruderWhoWantsTheBookOfGiants; +import quests.Q10328_RequestToSealTheEvilFragment.Q10328_RequestToSealTheEvilFragment; +import quests.Q10329_BackupSeekers.Q10329_BackupSeekers; +import quests.Q10330_ToTheRuinsOfYeSagira.Q10330_ToTheRuinsOfYeSagira; import quests.Q10331_StartOfFate.Q10331_StartOfFate; import quests.Q10338_SeizeYourDestiny.Q10338_SeizeYourDestiny; import quests.Q10390_KekropusLetter.Q10390_KekropusLetter; @@ -398,6 +402,10 @@ public class QuestMasterHandler Q10324_FindingMagisterGallint.class, Q10325_SearchingForNewPower.class, Q10326_RespectYourElders.class, + Q10327_IntruderWhoWantsTheBookOfGiants.class, + Q10328_RequestToSealTheEvilFragment.class, + Q10329_BackupSeekers.class, + Q10330_ToTheRuinsOfYeSagira.class, Q10331_StartOfFate.class, Q10338_SeizeYourDestiny.class, Q10390_KekropusLetter.class, diff --git a/trunk/dist/game/data/stats/npcs/33000-33099.xml b/trunk/dist/game/data/stats/npcs/33000-33099.xml index df8e6cfe97..cd4ca1a7be 100644 --- a/trunk/dist/game/data/stats/npcs/33000-33099.xml +++ b/trunk/dist/game/data/stats/npcs/33000-33099.xml @@ -91,7 +91,7 @@ - + HUMAN diff --git a/trunk/dist/game/data/stats/npcs/33200-33299.xml b/trunk/dist/game/data/stats/npcs/33200-33299.xml index 6b067ae0f9..2535d45c86 100644 --- a/trunk/dist/game/data/stats/npcs/33200-33299.xml +++ b/trunk/dist/game/data/stats/npcs/33200-33299.xml @@ -104,7 +104,7 @@ 398 - +