diff --git a/trunk/dist/game/data/instances/MuseumDungeon.xml b/trunk/dist/game/data/instances/MuseumDungeon.xml index 187d89dc25..93e8acd9e3 100644 --- a/trunk/dist/game/data/instances/MuseumDungeon.xml +++ b/trunk/dist/game/data/instances/MuseumDungeon.xml @@ -1,21 +1,18 @@ - - - + + - - - + \ 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 index 6290493a76..ff251d1933 100644 --- a/trunk/dist/game/data/scripts/ai/npc/Toyron/Toyron.java +++ b/trunk/dist/game/data/scripts/ai/npc/Toyron/Toyron.java @@ -79,29 +79,22 @@ public final class Toyron extends AbstractNpcAI 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 ((world != null) && (world.getTemplateId() == TEMPLATE_ID) && (qs != null)) { - if (qs != null) + switch (qs.getCond()) { - switch (qs.getCond()) + case 1: { - case 1: - { - return "33004-01.html"; - } - case 2: - { - return "33004-02.html"; - } - case 3: - { - return "33004.html"; - } + return "33004-01.html"; + } + case 2: + { + return "33004-02.html"; + } + case 3: + { + return "33004.html"; } - } - else - { - return "33004.html"; } } return "33004.html"; diff --git a/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/LabyrinthOfBelis.java b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/LabyrinthOfBelis.java index 515776e96e..185932fb0b 100644 --- a/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/LabyrinthOfBelis.java +++ b/trunk/dist/game/data/scripts/instances/LabyrinthOfBelis/LabyrinthOfBelis.java @@ -125,11 +125,6 @@ public final class LabyrinthOfBelis extends AbstractInstance switch (event) { - case "enter_instance": - { - enterInstance(player, new LOBWorld(), "LabyrinthOfBelis.xml", TEMPLATE_ID); - break; - } case "officer_wait_1": { if (world.getStatus() == 1) @@ -508,18 +503,17 @@ public final class LabyrinthOfBelis extends AbstractInstance @Override public void onEnterInstance(L2PcInstance player, InstanceWorld world, boolean firstEntrance) { - final LOBWorld tmpworld = (LOBWorld) world; if (firstEntrance) { - tmpworld.setStatus(1); - tmpworld.addAllowed(player.getObjectId()); - tmpworld.terian = (L2QuestGuardInstance) addSpawn(OFFICER, TERIAN_SPAWN_LOC, false, 0, false, tmpworld.getInstanceId()); - tmpworld.terian.setSpawn(null); - tmpworld.savedSpawns = spawnGroup("room_1", tmpworld.getInstanceId()); - tmpworld.generator = addSpawn(ELECTRICITY_GENERATOR, GENERATOR_SPAWN_LOC, false, 0, false, tmpworld.getInstanceId()); - openDoor(DOOR_1, tmpworld.getInstanceId()); - startQuestTimer("officer_wait_1", 5000, tmpworld.terian, player); + world.setStatus(1); + world.addAllowed(player.getObjectId()); + ((LOBWorld) world).terian = (L2QuestGuardInstance) addSpawn(OFFICER, TERIAN_SPAWN_LOC, false, 0, false, world.getInstanceId()); + ((LOBWorld) world).terian.setSpawn(null); + ((LOBWorld) world).savedSpawns = spawnGroup("room_1", world.getInstanceId()); + ((LOBWorld) world).generator = addSpawn(ELECTRICITY_GENERATOR, GENERATOR_SPAWN_LOC, false, 0, false, world.getInstanceId()); + openDoor(DOOR_1, world.getInstanceId()); + startQuestTimer("officer_wait_1", 5000, ((LOBWorld) world).terian, player); } - teleportPlayer(player, START_LOC, tmpworld.getInstanceId()); + teleportPlayer(player, START_LOC, world.getInstanceId()); } } \ 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 deleted file mode 100644 index c4b256eefe..0000000000 --- a/trunk/dist/game/data/scripts/instances/MuseumDungeon/33126.html +++ /dev/null @@ -1,4 +0,0 @@ -[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 index ab34249a27..e108272f09 100644 --- a/trunk/dist/game/data/scripts/instances/MuseumDungeon/MuseumDungeon.java +++ b/trunk/dist/game/data/scripts/instances/MuseumDungeon/MuseumDungeon.java @@ -20,16 +20,15 @@ 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.ai.CtrlIntention; import com.l2jserver.gameserver.enums.ChatType; import com.l2jserver.gameserver.instancemanager.InstanceManager; import com.l2jserver.gameserver.model.Location; +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; @@ -41,7 +40,7 @@ import com.l2jserver.gameserver.network.NpcStringId; import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage; /** - * @author Neanrakyr + * @author Mobius */ public final class MuseumDungeon extends AbstractInstance { @@ -49,33 +48,21 @@ public final class MuseumDungeon extends AbstractInstance private static final int PANTHEON = 32972; private static final int TOYRON = 33004; private static final int DESK = 33126; + // Monster private static final int THIEF = 23121; - // Items + // Item 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 + // Others 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 - }; + private static final Location START_LOC = new Location(-114711, 243911, -7968); + private static final Location TOYRON_SPAWN_LOC = new Location(-114707, 245428, -7968); 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; + protected List deskSpawns = null; + protected List thiefSpawns = null; + protected int randomDesk = 0; } public MuseumDungeon() @@ -83,226 +70,113 @@ public final class MuseumDungeon extends AbstractInstance 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 + if (event.equals("assist_player")) { final InstanceWorld tmpworld = InstanceManager.getInstance().getPlayerWorld(player); - - if ((tmpworld != null) && (tmpworld instanceof MDWorld)) + if ((tmpworld == null) || !(tmpworld instanceof MDWorld)) { - final MDWorld world = (MDWorld) tmpworld; - switch (event) + return null; + } + final MDWorld world = (MDWorld) tmpworld; + + world.toyron.setIsRunning(true); + if (player.isInCombat() && (player.getTarget() != null) && player.getTarget().isMonster() && !((L2MonsterInstance) player.getTarget()).isAlikeDead()) + { + if (world.toyron.calculateDistance(player.getTarget(), false, false) > 50) { - 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; - } + world.toyron.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, player.getTarget().getLocation()); + broadcastNpcSay(world.toyron, ChatType.NPC_GENERAL, NpcStringId.ENOUGH_OF_THIS_COME_AT_ME); + } + else if (world.toyron.getTarget() != player.getTarget()) + { + world.toyron.addDamageHate((L2Character) player.getTarget(), 0, 1000); } } + else + { + world.toyron.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player); + } + + if (world.thiefSpawns.get(0).isDead() && world.thiefSpawns.get(1).isDead()) + { + final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName()); + if ((qs != null) && qs.isCond(2)) + { + qs.setCond(3, true); + showOnScreenMsg(player, NpcStringId.TALK_TO_TOYRON_TO_RETURN_TO_THE_MUSEUM_LOBBY, ExShowScreenMessage.TOP_CENTER, 5000); + } + } + else + { + startQuestTimer("assist_player", 1000, world.toyron, player); + } + } + else if (event.equals("enter_instance")) + { + if (npc.getId() != PANTHEON) + { + return null; + } + enterInstance(player, new MDWorld(), "MuseumDungeon.xml", TEMPLATE_ID); } return super.onAdvEvent(event, npc, player); } @Override - public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon) + public String onFirstTalk(L2Npc npc, L2PcInstance player) { + final MDWorld world = (MDWorld) InstanceManager.getInstance().getWorld(npc.getInstanceId()); final QuestState qs = player.getQuestState(Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName()); - final InstanceWorld tmpworld = InstanceManager.getInstance().getWorld(npc.getInstanceId()); - final MDWorld world = (MDWorld) tmpworld; + String htmltext = null; - if ((qs != null) && qs.isCond(2)) + if (qs.isCond(1)) { - if (world.killedThiefs >= 1) + if (world.deskSpawns.get(world.randomDesk) == npc) { - qs.setCond(3, true); - showOnScreenMsg(player, NpcStringId.TALK_TO_TOYRON_TO_RETURN_TO_THE_MUSEUM_LOBBY, ExShowScreenMessage.TOP_CENTER, 4500); + qs.setCond(2); + giveItems(player, THE_WAR_OF_GODS_AND_GIANTS, 1); + world.thiefSpawns = spawnGroup("thiefs", world.getInstanceId()); + showOnScreenMsg(player, NpcStringId.WATCH_OUT_YOU_ARE_BEING_ATTACKED, ExShowScreenMessage.TOP_CENTER, 5000); + startQuestTimer("assist_player", 2000, world.toyron, player); + htmltext = "desk_correct.html"; } else { - world.killedThiefs++; + htmltext = "desk_wrong.html"; } } - return super.onKill(npc, player, isSummon); + return htmltext; } @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) + 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); + ((L2MonsterInstance) npc).setCurrentHp(npc.getCurrentHp() + damage); + showOnScreenMsg(attacker, NpcStringId.USE_YOUR_SKILL_ATTACKS_AGAINST_THEM, ExShowScreenMessage.TOP_CENTER, 5000); } 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) { + ((MDWorld) world).toyron = (L2QuestGuardInstance) addSpawn(TOYRON, TOYRON_SPAWN_LOC, false, 0, false, world.getInstanceId()); + ((MDWorld) world).toyron.setSpawn(null); if (firstEntrance) { world.addAllowed(player.getObjectId()); - spawnToyron(player, (MDWorld) world); - spawnDesks(player, (MDWorld) world); + ((MDWorld) world).deskSpawns = spawnGroup("desks", world.getInstanceId()); + ((MDWorld) world).randomDesk = getRandom(3) + 1; } teleportPlayer(player, START_LOC, world.getInstanceId()); - checkStage(player, (MDWorld) world); } } \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html b/trunk/dist/game/data/scripts/instances/MuseumDungeon/desk_correct.html similarity index 86% rename from trunk/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html rename to trunk/dist/game/data/scripts/instances/MuseumDungeon/desk_correct.html index e85fda93fd..b96ef65c73 100644 --- a/trunk/dist/game/data/scripts/instances/MuseumDungeon/33126-01.html +++ b/trunk/dist/game/data/scripts/instances/MuseumDungeon/desk_correct.html @@ -1,3 +1,3 @@ [Desk]:
You've found The War of Gods and Giants. Take it back to Pantheon. - + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/instances/MuseumDungeon/33126-02.html b/trunk/dist/game/data/scripts/instances/MuseumDungeon/desk_wrong.html similarity index 100% rename from trunk/dist/game/data/scripts/instances/MuseumDungeon/33126-02.html rename to trunk/dist/game/data/scripts/instances/MuseumDungeon/desk_wrong.html 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 index fafed6603a..37c0678442 100644 --- a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-04.htm +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-04.htm @@ -1,5 +1,5 @@ Pantheon:
-You're still here +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 index 25bf1ff8b6..62a64a26ad 100644 --- a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-05.htm +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-05.htm @@ -1,4 +1,5 @@ -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!
- +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-06.htm b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-06.htm index de5bf69043..8528007c48 100644 --- a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-06.htm +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-06.htm @@ -1,5 +1,6 @@ -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.
- +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. \ 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 index 5dc6709fe6..951438b5dc 100644 --- a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-07.htm +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-07.htm @@ -1,6 +1,4 @@ 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. - +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-08.htm b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-08.htm deleted file mode 100644 index 296f582994..0000000000 --- a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-08.htm +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index 6f86191730..0000000000 --- a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/32972-09.htm +++ /dev/null @@ -1,4 +0,0 @@ -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 index 770034412b..af8a4154fe 100644 --- a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/Q10327_IntruderWhoWantsTheBookOfGiants.java +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/Q10327_IntruderWhoWantsTheBookOfGiants.java @@ -22,7 +22,6 @@ 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; @@ -30,26 +29,27 @@ import com.l2jserver.gameserver.network.NpcStringId; import com.l2jserver.gameserver.network.serverpackets.ExShowScreenMessage; /** - * @author Gladicek + * Intruder Who Wants the Book of Giants (10327) + * @author Mobius */ public class Q10327_IntruderWhoWantsTheBookOfGiants extends Quest { - // Npcs + // Npc 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 APPRENTICE_EARRING = 112; + // Other private static final int MAX_LEVEL = 20; public Q10327_IntruderWhoWantsTheBookOfGiants() { - super(10327, Q10327_IntruderWhoWantsTheBookOfGiants.class.getSimpleName(), "Intruder Who Wants the Book of Giants "); + 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"); + addCondMaxLevel(MAX_LEVEL, "no_level.htm"); + addCondCompletedQuest(Q10326_RespectYourElders.class.getSimpleName(), "no_level.htm"); } @Override @@ -75,16 +75,15 @@ public class Q10327_IntruderWhoWantsTheBookOfGiants extends Quest htmltext = event; break; } - case "32972-07.htm": + case "32972-06.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); + giveAdena(player, 159, true); + giveItems(player, APPRENTICE_EARRING, 2); addExpAndSp(player, 7800, 5); + showOnScreenMsg(player, NpcStringId.ACCESSORIES_HAVE_BEEN_ADDED_TO_YOUR_INVENTORY, ExShowScreenMessage.TOP_CENTER, 5000); qs.exitQuest(false, true); - break; } break; } @@ -107,28 +106,23 @@ public class Q10327_IntruderWhoWantsTheBookOfGiants extends Quest } case State.STARTED: { - if (qs.isCond(1)) - { - htmltext = "32972-04.htm"; - break; - } - else if (qs.isCond(2)) + if (qs.isCond(3)) { htmltext = "32972-05.htm"; - break; } - else if (qs.isCond(3)) + else { - htmltext = "32972-06.htm"; - break; + htmltext = "32972-04.htm"; } + break; } case State.COMPLETED: { - htmltext = "32972-08.htm"; + htmltext = "32972-07.htm"; break; } } + return htmltext; } } \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/no_level.htm b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/no_level.htm new file mode 100644 index 0000000000..f7b7db13e2 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q10327_IntruderWhoWantsTheBookOfGiants/no_level.htm @@ -0,0 +1,4 @@ +Pantheon:
+This mission can't be give to just anyone!
+(Only characters below 20, who have completed the "Respect Your Elders" quest, may start this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/stats/npcs/23100-23199.xml b/trunk/dist/game/data/stats/npcs/23100-23199.xml index cc1fd67a3a..4a4a855692 100644 --- a/trunk/dist/game/data/stats/npcs/23100-23199.xml +++ b/trunk/dist/game/data/stats/npcs/23100-23199.xml @@ -952,7 +952,7 @@ - +