diff --git a/trunk/dist/game/data/html/teleporter/33853.htm b/trunk/dist/game/data/html/teleporter/33853.htm index 22f2dbb991..7c67792dcf 100644 --- a/trunk/dist/game/data/html/teleporter/33853.htm +++ b/trunk/dist/game/data/html/teleporter/33853.htm @@ -1,5 +1,5 @@ -Giant’s Minion Hansen:
-Shhh! Keep it dow. We shouldn’t irritate them for no reason.
+Giant's Minion Hansen:
+Shhh! Keep it dow. We shouldn't irritate them for no reason.
diff --git a/trunk/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml b/trunk/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml index 0a58d74932..833a431dc1 100644 --- a/trunk/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml +++ b/trunk/dist/game/data/instances/Pailaka/PailakaInjuredDragon.xml @@ -81,6 +81,7 @@ + diff --git a/trunk/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-09.html b/trunk/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-09.html new file mode 100644 index 0000000000..8f913cb7e6 --- /dev/null +++ b/trunk/dist/game/data/scripts/instances/PailakaInjuredDragon/32499-09.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+Remember to seek out a Ketra Orc in that world. There must be one there who will aid you in your quest! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java b/trunk/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java new file mode 100644 index 0000000000..d07200d6a4 --- /dev/null +++ b/trunk/dist/game/data/scripts/instances/PailakaInjuredDragon/PailakaInjuredDragon.java @@ -0,0 +1,271 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program 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. + * + * This program 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.PailakaInjuredDragon; + +import java.util.HashMap; +import java.util.Map; + +import com.l2jmobius.gameserver.model.Location; +import com.l2jmobius.gameserver.model.actor.L2Character; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.holders.SkillHolder; +import com.l2jmobius.gameserver.model.instancezone.Instance; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.zone.L2ZoneType; + +import instances.AbstractInstance; +import quests.Q00144_PailakaInjuredDragon.Q00144_PailakaInjuredDragon; + +/** + * @author Mathael + */ +public class PailakaInjuredDragon extends AbstractInstance +{ + // NPCs + private static final int KETRA_ORC_SHAMAN = 34799; + private static final int KETRA_ORC_SUPPORTER = 32502; + // Monsters + private static final int RECRUIT = 18635; + private static final int FOOTMAN = 18636; + private static final int WARRIOR = 18642; + private static final int OFFICER = 18646; + private static final int GREAT_MAGUS = 18649; + private static final int GENERAL = 18650; + private static final int ELITE_GUARD = 18653; + private static final int COMMANDER = 18654; + private static final int HEAD_GUARD = 18655; + private static final int PROPHET_GUARD = 18657; + private static final int PROPHET = 18659; + private static final int LATANA = 18660; + // Zones + private static final int BARRIER1 = 200001; // Zone 1 + private static final int BARRIER2 = 200002; // Zone 1 + private static final int BARRIER3 = 200003; // Zone 1 + private static final int BARRIER4 = 200004; // Zone 1 + private static final int BARRIER5 = 200005; // Zone 2 + private static final int BARRIER6 = 200006; // Zone 2 + private static final int BARRIER7 = 200007; // Zone 2 + private static final int BARRIER8 = 200008; // Zone 3 + private static final int BARRIER9 = 200009; // Zone 3 + private static final Map ZONE_TELEPORTS = new HashMap<>(); + static + { + ZONE_TELEPORTS.put(BARRIER1, new Location(122452, -45808, -2981)); + ZONE_TELEPORTS.put(BARRIER2, new Location(116610, -46418, -2641)); + ZONE_TELEPORTS.put(BARRIER3, new Location(116237, -50961, -2636)); + ZONE_TELEPORTS.put(BARRIER4, new Location(117384, -52141, -2544)); + ZONE_TELEPORTS.put(BARRIER5, new Location(112169, -44004, -2707)); + ZONE_TELEPORTS.put(BARRIER6, new Location(109460, -45869, -2265)); + ZONE_TELEPORTS.put(BARRIER7, new Location(117111, -55927, -2380)); + ZONE_TELEPORTS.put(BARRIER8, new Location(109274, -41277, -2271)); + ZONE_TELEPORTS.put(BARRIER9, new Location(110023, -40263, -2001)); + } + // Skill + private static final SkillHolder LATANA_PRESENTATION_SKILL = new SkillHolder(5759, 1); + // Misc + private static final int TEMPLATE_ID = 45; + private int unlockZoneKillCount = 0; + + public PailakaInjuredDragon() + { + addInstanceEnterId(TEMPLATE_ID); + addStartNpc(KETRA_ORC_SHAMAN); + addKillId(GENERAL, GREAT_MAGUS, PROPHET, ELITE_GUARD, COMMANDER, OFFICER, RECRUIT, FOOTMAN, WARRIOR, PROPHET_GUARD, HEAD_GUARD, LATANA); + addSpawnId(LATANA); + addAggroRangeEnterId(LATANA); + addEnterZoneId(ZONE_TELEPORTS.keySet()); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + switch (event) + { + case "enter": + { + enterInstance(player, npc, TEMPLATE_ID); + break; + } + case "camera_start": + { + specialCamera(player, npc, 0, 0, 180, 800, 5000, 800, 0, 1, 0, 0); + break; // TODO: Need retail values + } + case "camera_end": + { + specialCamera(player, npc, 0, 0, 180, 600, 5000, 600, 0, 1, 0, 0); + break; // TODO: Need retail values + } + } + return super.onAdvEvent(event, npc, player); + } + + @Override + protected void onEnter(L2PcInstance player, Instance instance, boolean firstEnter) + { + super.onEnter(player, instance, firstEnter); + if (firstEnter) + { + final QuestState qs = player.getQuestState(Q00144_PailakaInjuredDragon.class.getSimpleName()); + if ((qs != null) && qs.isCond(1)) + { + qs.setCond(2, true); + showHtmlFile(player, "32499-09.html"); + } + } + } + + @Override + public String onAggroRangeEnter(L2Npc npc, L2PcInstance player, boolean isSummon) + { + if (npc.isScriptValue(0)) + { + npc.setScriptValue(1); + startQuestTimer("camera_start", 300, npc, player); + npc.doCast(LATANA_PRESENTATION_SKILL.getSkill()); + } + return super.onAggroRangeEnter(npc, player, isSummon); + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + if (npc.getId() == LATANA) + { + startQuestTimer("camera_end", 1000, npc, killer); + addSpawn(KETRA_ORC_SUPPORTER, new Location(105517, -41692, -1781, 65323), false, 0, false, npc.getInstanceWorld().getId()); + } + else + { + final Instance world = npc.getInstanceWorld(); + if (world.getStatus() < 3) + { + final int npcId = npc.getId(); + + switch (world.getStatus()) + { + case 0: + { + switch (npcId) + { + case RECRUIT: + case FOOTMAN: + case WARRIOR: + { + unlockZoneKillCount++; + } + } + break; + } + case 1: + { + switch (npcId) + { + case OFFICER: + case GREAT_MAGUS: + case GENERAL: + case ELITE_GUARD: + case COMMANDER: + { + unlockZoneKillCount++; + } + } + break; + } + case 2: + { + switch (npcId) + { + case HEAD_GUARD: + case PROPHET_GUARD: + { + unlockZoneKillCount++; + } + } + break; + } + } + + if (unlockZoneKillCount == 5) + { + world.setStatus(npc.getInstanceWorld().getStatus() + 1); + unlockZoneKillCount = 0; + } + } + } + return super.onKill(npc, killer, isSummon); + } + + @Override + public String onSpawn(L2Npc npc) + { + npc.setIsImmobilized(true); + return super.onSpawn(npc); + } + + @Override + public String onEnterZone(L2Character character, L2ZoneType zone) + { + if (!character.isPlayer()) + { + return super.onEnterZone(character, zone); + } + + final Instance world = character.getInstanceWorld(); + final int zoneId = zone.getId(); + switch (zoneId) + { + case BARRIER1: + case BARRIER2: + case BARRIER3: + case BARRIER4: + { + if (world.getStatus() < 1) + { + character.teleToLocation(ZONE_TELEPORTS.get(zoneId)); + } + break; + } + case BARRIER5: + case BARRIER6: + case BARRIER7: + { + if (world.getStatus() < 2) + { + character.teleToLocation(ZONE_TELEPORTS.get(zoneId)); + } + break; + } + case BARRIER8: + case BARRIER9: + { + if (world.getStatus() < 3) + { + character.teleToLocation(ZONE_TELEPORTS.get(zoneId)); + } + break; + } + } + return super.onEnterZone(character, zone); + } + + public static void main(String[] args) + { + new PailakaInjuredDragon(); + } +} diff --git a/trunk/dist/game/data/scripts/quests/MissingQuests.txt b/trunk/dist/game/data/scripts/quests/MissingQuests.txt index bfa43fef5c..ca457b68d6 100644 --- a/trunk/dist/game/data/scripts/quests/MissingQuests.txt +++ b/trunk/dist/game/data/scripts/quests/MissingQuests.txt @@ -1,4 +1,3 @@ -144 Pailaka - Injured Dragon 149 Primal Mother, Istina 150 Extreme Challenge: Primal Mother Resurrected 180 Infernal Flames Burning in Crystal Prison diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.htm b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.htm new file mode 100644 index 0000000000..1fa6115799 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.htm @@ -0,0 +1,5 @@ +Ketra Orc Shaman:
+I perceive darkness...and chaos... The protector of our race, the great Red Dragon, lies imprisoned and in torment there.
+He summons us to return him to his rightful place of glory, but...
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-02.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-02.html new file mode 100644 index 0000000000..67070cb603 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-02.html @@ -0,0 +1,4 @@ +Ketra Orc Shaman:
+I no longer sense the dark energy! The balance has been restored!
+(This quest has already been completed.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-03.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-03.html new file mode 100644 index 0000000000..e4f7ee2172 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-03.html @@ -0,0 +1,4 @@ +Ketra Orc Shaman:
+You do not deserve to learn about the great Ketra and the race of the Red Dragon!
+(You must be level 73 or above to start this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.htm b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.htm new file mode 100644 index 0000000000..00e064a0c6 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.htm @@ -0,0 +1,5 @@ +Ketra Orc Shaman:
+The Ketra believe we are children of the Fire Spirit.
We worship the Red Dragon, who wields the strongest fire in all Goddard.
+Lately, however, we have felt a darkness flickering within the pure flame. It seem to be growing -- and the fire's power seems to be weakening!
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04z.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04z.html new file mode 100644 index 0000000000..0727547043 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04z.html @@ -0,0 +1,4 @@ +Ketra Orc Shaman:
+You are already a legend to our people! As much as I would crave your help, you have even more important tasks to attend to...
+(Only characters level 77 or below may undertake this quest.) + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.htm b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.htm new file mode 100644 index 0000000000..d560b5923f --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.htm @@ -0,0 +1,7 @@ +Ketra Orc Shaman:
+It is a darkness without shape or substance.
+It came from across the sea, and now spreads its black shadow over our land as well.
+The Humans call the source of the darkness "Kamaloka" and shadow it casts "Pailaka." Now even our great protector is helpless before it!
+We must summon all our strength to defeat the darkness!
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.htm b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.htm new file mode 100644 index 0000000000..9c381eab2d --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.htm @@ -0,0 +1,8 @@ +Ketra Orc Shaman:
+Warrior, I ask for your aid!
+We are of Ketra descent, so we cannot enter the Shadow of Darkness.
+But I believe that an adventurer like you can enter and remove this foul curse from us.
+Will you do it?
+(This quest takes place in Pailaka. It does not affect the Varka Silenos alliance quest or the Ketra Orc alliance quest.)
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.htm b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.htm new file mode 100644 index 0000000000..f5bd1ad207 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.htm @@ -0,0 +1,7 @@ +Ketra Orc Shaman:
+Our thanks, warrior! One of the last visions the flames gave me before becoming too weak was that there are others like us in the Shadow World.
+They will help you.
+When you are prepared, I will send you to the Shadow World, Pailaka!
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.htm b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.htm new file mode 100644 index 0000000000..90fa56e12c --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.htm @@ -0,0 +1,4 @@ +Ketra Orc Shaman:
+Warrior, do you wish to enter the Shadow World, Pailaka?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08a.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08a.html new file mode 100644 index 0000000000..06e78f427f --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08a.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+Very well, I shall wait here until you are ready. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html new file mode 100644 index 0000000000..8b6e98c940 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html @@ -0,0 +1,4 @@ +Ketra Orc Shaman:
+The darkness still exists! Will you enter Pailaka again?
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html new file mode 100644 index 0000000000..96342171ff --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-11.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+I have faith that you will remove the dark shadow which hides our Great Flame! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-12.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-12.html new file mode 100644 index 0000000000..5de20ed6a9 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-12.html @@ -0,0 +1,3 @@ +Ketra Orc Shaman:
+Ah! I can feel the Shadow of Darkness weakening! You must finish it! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-01.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-01.html new file mode 100644 index 0000000000..d986e98e44 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-01.html @@ -0,0 +1,5 @@ +Ketra Orc Supporter:
+The Dragon of Fire, a descendant of the Great Valakas, appeared just as we Ketra Orcs were fighting those vile Varka Silenos.
+He took our side and drove our enemies from the field of battle!
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-02.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-02.html new file mode 100644 index 0000000000..3213ac53cb --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-02.html @@ -0,0 +1,5 @@ +Ketra Orc Supporter:
+However, we were exhausted from the long conflict. Since the Silenos could not match Latana's strength, they resorted to trickery: they summoned magical water to engulf him!
+We tried to rescue him, but his wing was injured and he was captured...
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-03.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-03.html new file mode 100644 index 0000000000..df17c9c75b --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-03.html @@ -0,0 +1,6 @@ +Ketra Orc Supporter:
+Of course! That is the dream of every loyal Ketra Orc! But our shaman senses that time is running out!
+The evil Silenos shamans are trying to brainwash Latana into helping them.
+Thanks to his in-born energy of fire, he has resisted their attempts so far. But injured as he is, he cannot hold out much longer...
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-04.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-04.html new file mode 100644 index 0000000000..05977c8332 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-04.html @@ -0,0 +1,6 @@ +Ketra Orc Supporter:
+Truthfully, I do not know.
+There is a small chance that if you can pierce the wall surrounding him, Latana will come to his senses.
+If so, we could at least free his spirit, if not his body, to return to the Great Fire...
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-05.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-05.html new file mode 100644 index 0000000000..0e662d9920 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-05.html @@ -0,0 +1,4 @@ +Ketra Orc Supporter:
+Know that, even wounded, the Dragon of Fire is very powerful. To help you slay him and set his spirit free, use this Spear of Silenos, which we captured from our enemy. It can use a power called Obliteration Storm to increase the effectiveness of critical hits! Its power has not reached its full potential, but by defeating the Varka Silenos you can obtain items necessary to enhance its power. Use it to destroy our enemy and send Latana's spirit to the World of Fire!
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html new file mode 100644 index 0000000000..1e0c4b8563 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html @@ -0,0 +1,6 @@ +Ketra Orc Supporter:
+Dejakar Oroka!
+Latana used the last flicker of energy to summon me here! My friend, you have earned the gratitude of all the Ketra Orcs.
+Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will naturally reward you for it.
+ + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-07.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-07.html new file mode 100644 index 0000000000..6ce29b6d6f --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-07.html @@ -0,0 +1,6 @@ +Ketra Orc Supporter:
+The enemy are Varka Silenos soldiers.
+Their camps are positioned to prevent access to the dragon. It will be impossible to sneak past them.
+By facing and defeating them, however, you can obtain a scroll needed to enhance the Spear of Silenos.
+Then and only then will you be ready to face Latana, the Dragon of Fire! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-08.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-08.html new file mode 100644 index 0000000000..4046d77b7f --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-08.html @@ -0,0 +1,5 @@ +Ketra Orc Supporter:
+What happened here has not affected your world, but it may help you in the future...
+Now you must return to where you belong.
+Use the Scroll of Escape to leave Pailaka and return to your world! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html new file mode 100644 index 0000000000..bd64070189 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html @@ -0,0 +1,9 @@ +Ketra Orc Intelligence Officer:
+Dejakar Oroka!
+You hold the Spear of Silenos! Your coming was foretold.
+But Latana's power is very strong, and the Spear of Silenos is not yet strong enough.
+If you have the Scroll of Enchant Weapon made with the blood of Silenos, I will perform a sacred ceremony to enhance the spear!
+If you wish, I can also bestow on you some of our tribe's powerful enhancement magic!
+ + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01a.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01a.html new file mode 100644 index 0000000000..5f29aa87af --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01a.html @@ -0,0 +1,5 @@ +Ketra Orc Intelligence Officer:
+Umarak Oroka!
+To defeat the enemy of this place, you will need the Spear of Silenos.
+The Ketra Orc Supporter is somewhere around here; find him and obtain the spear! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-02.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-02.html new file mode 100644 index 0000000000..455d051212 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-02.html @@ -0,0 +1,3 @@ +Ketra Orc Intelligence Officer:
+Your weapon has been enhanced! The Spear of Silenos has regained its original power! You now possess the power of Obliteration Storm. Sadly, it is still not yet powerful enough to defeat Latana... + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-03.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-03.html new file mode 100644 index 0000000000..d1a962cb1e --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-03.html @@ -0,0 +1,4 @@ +Ketra Orc Intelligence Officer:
+The Spear of Silenos has regained its power! And now the power of Obliteration Storm has also reached its peak.
+With this I hope you can send Latana back to the Fire World, warrior! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-04.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-04.html new file mode 100644 index 0000000000..bde2867c90 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-04.html @@ -0,0 +1,3 @@ +Ketra Orc Intelligence Officer:
+You still need an Enchant Scroll. Acquire one by slaying more Silenos! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html new file mode 100644 index 0000000000..bde2867c90 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html @@ -0,0 +1,3 @@ +Ketra Orc Intelligence Officer:
+You still need an Enchant Scroll. Acquire one by slaying more Silenos! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html new file mode 100644 index 0000000000..0a8f57be50 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html @@ -0,0 +1,3 @@ +Ketra Orc Intelligence Officer:
+This spear has already been enhanced to its full potential. It is stronger than any other power in this place! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-07.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-07.html new file mode 100644 index 0000000000..ee6c08ebf2 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-07.html @@ -0,0 +1,3 @@ +Ketra Orc Intelligence Officer:
+You cannot receive any more enhancements! All 5 spells have been used. + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html new file mode 100644 index 0000000000..9a10cf5470 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-08.html @@ -0,0 +1,3 @@ +Ketra Orc Intelligence Officer:
+The fifth and final enhancement is complete! + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html new file mode 100644 index 0000000000..ebfcb44c6d --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-09.html @@ -0,0 +1,15 @@ +Ketra Orc Intelligence Officer:
+Please select the next spell you wish to receive.
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html new file mode 100644 index 0000000000..a63f31ad32 --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-10.html @@ -0,0 +1,16 @@ +Ketra Orc Intelligence Officer:
+We possess several types of enhancement magic. I can grant you at most 5 spells.
+Select them from the list below:
+ + + + + + + + + + + + + \ No newline at end of file diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java new file mode 100644 index 0000000000..2c232ed83a --- /dev/null +++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java @@ -0,0 +1,355 @@ +/* + * This file is part of the L2J Mobius project. + * + * This program 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. + * + * This program 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.Q00144_PailakaInjuredDragon; + +import com.l2jmobius.gameserver.instancemanager.InstanceManager; +import com.l2jmobius.gameserver.model.actor.L2Npc; +import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance; +import com.l2jmobius.gameserver.model.holders.SkillHolder; +import com.l2jmobius.gameserver.model.instancezone.Instance; +import com.l2jmobius.gameserver.model.quest.Quest; +import com.l2jmobius.gameserver.model.quest.QuestState; +import com.l2jmobius.gameserver.model.quest.State; + +/** + * @author Mathael + */ +public class Q00144_PailakaInjuredDragon extends Quest +{ + // NPCs + private static final int KETRA_ORC_SHAMAN = 32499; + private static final int KETRA_ORC_SUPPORTER = 32502; + private static final int KETRA_ORC_INTELLIGENCE_OFFICIER = 32509; + // Monster + private static final int LATANA = 18660; + // Area Monsters + private static final int[] MONSTERS = + { + 18650, + 18649, + 18659, + 18653, + 18654, + 18646, + 18635, + 18636, + 18642, + 18657, + 18655 + }; + // Buffs + private static final SkillHolder[] BUFFS = + { + new SkillHolder(1086, 2), + new SkillHolder(1204, 2), + new SkillHolder(1059, 3), + new SkillHolder(1085, 3), + new SkillHolder(1078, 6), + new SkillHolder(1068, 3), + new SkillHolder(1240, 3), + new SkillHolder(1077, 3), + new SkillHolder(1242, 3), + new SkillHolder(1062, 2), + new SkillHolder(1268, 4), + new SkillHolder(1045, 6), + }; + // Quest Items + private static final int SPEAR_OF_SILENOS = 13052; + private static final int SPEAR_OF_SILENOS_REINFORCED = 13053; + private static final int SPEAR_OF_SILENOS_COMPLETED = 13054; + private static final int WEAPON_UPGRADE_STAGE_1 = 13056; + private static final int WEAPON_UPGRADE_STAGE_2 = 13057; + // Usable Quest Items + private static final int SHIELD_POTION = 13032; + private static final int HEAL_POTION = 13033; + // Conditions + private static final int MIN_LEVEL = 73; + private static final int MAX_LEVEL = 77; + // Rewards + private static final long REWARD_EXP = 24570000; + private static final int REWARD_SP = 5896; + private static final int REWARD_PAILAKA_SHIRT = 13296; + private static final int REWARD_ADENA = 798840; + private static final int SCROLL_OF_ESCAPE = 736; + // Misc + private boolean WEAPON_UPGRADE_STAGE_1_DROPED = false; + private boolean WEAPON_UPGRADE_STAGE_2_DROPED = false; + private int BUFF_COUNT = 0; // TODO: need retail info about how buff works + + public Q00144_PailakaInjuredDragon() + { + super(144); + addStartNpc(KETRA_ORC_SHAMAN); + addTalkId(KETRA_ORC_SHAMAN, KETRA_ORC_SUPPORTER, KETRA_ORC_INTELLIGENCE_OFFICIER); + addKillId(LATANA); + addKillId(MONSTERS); + addCondMinLevel(MIN_LEVEL, "32499-03.html"); + addCondMaxLevel(MAX_LEVEL, "32499-04z.html"); + registerQuestItems(SPEAR_OF_SILENOS, SPEAR_OF_SILENOS_REINFORCED, SPEAR_OF_SILENOS_COMPLETED, WEAPON_UPGRADE_STAGE_1, WEAPON_UPGRADE_STAGE_2, HEAL_POTION, SHIELD_POTION); + } + + @Override + public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) + { + String htmltext = getNoQuestMsg(player); + final QuestState qs = getQuestState(player, true); + if (qs == null) + { + return htmltext; + } + + final String request = event.contains(" ") ? event.substring(0, event.indexOf(" ")) : event; + switch (request) + { + case "32499-04.htm": + case "32499-05.htm": + case "32499-06.htm": + case "32499-08a.html": + case "32499-08.htm": + case "32499-09.htm": + case "32502-01.html": + case "32502-02.html": + case "32502-03.html": + case "32502-04.html": + case "32502-07.html": + { + htmltext = event; + break; + } + case "32499-07.htm": + { + qs.startQuest(); + htmltext = event; + break; + } + case "32502-05.html": + { + if (qs.isCond(2)) + { + qs.setCond(3, true); + giveItems(player, SPEAR_OF_SILENOS, 1, true); + htmltext = event; + } + break; + } + case "32502-08.html": + { + final Instance inst = InstanceManager.getInstance().getPlayerInstance(player, true); + if ((inst != null) && qs.isCond(4) && hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED)) + { + takeItems(player, SPEAR_OF_SILENOS_COMPLETED, -1); + rewardItems(player, 57, REWARD_ADENA); + rewardItems(player, REWARD_PAILAKA_SHIRT, 1); + addExpAndSp(player, REWARD_EXP, REWARD_SP); + giveItems(player, SCROLL_OF_ESCAPE, 1); // Not a reward. + qs.exitQuest(false, true); + inst.finishInstance(); + htmltext = event; + } + else + { + htmltext = "32509-04.html"; + } + break; + } + case "upgrade_weapon": + { + if (qs.isCond(3) || qs.isCond(4)) + { + if (hasQuestItems(player, SPEAR_OF_SILENOS_COMPLETED)) + { + htmltext = "32509-06.html"; + } + else if (hasQuestItems(player, SPEAR_OF_SILENOS)) + { + if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_1)) + { + takeItems(player, SPEAR_OF_SILENOS, -1); + takeItems(player, WEAPON_UPGRADE_STAGE_1, -1); + giveItems(player, SPEAR_OF_SILENOS_REINFORCED, 1, true); + htmltext = "32509-02.html"; + } + else + { + htmltext = "32509-04.html"; + } + } + else if (hasQuestItems(player, SPEAR_OF_SILENOS_REINFORCED)) + { + if (hasQuestItems(player, WEAPON_UPGRADE_STAGE_2)) + { + takeItems(player, SPEAR_OF_SILENOS_REINFORCED, -1); + takeItems(player, WEAPON_UPGRADE_STAGE_2, -1); + giveItems(player, SPEAR_OF_SILENOS_COMPLETED, 1, true); + htmltext = "32509-08.html"; + } + else + { + htmltext = "32509-04.html"; + } + } + } + else + { + htmltext = "32509-01a.html"; + } + break; + } + case "enhancement_page": + { + htmltext = BUFF_COUNT < 5 ? "32509-10.html" : "32509-07.html"; + break; + } + case "enhancement": + { + if (BUFF_COUNT < 5) + { + final int key = Integer.parseInt(event.substring(request.length() + 1)) - 1; + BUFFS[key].getSkill().applyEffects(npc, player); + BUFF_COUNT++; + if (BUFF_COUNT < 5) + { + htmltext = "32509-09.html"; + } + else + { + htmltext = "32509-08.html"; + } + } + else + { + htmltext = "32509-07.html"; + } + break; + } + } + + return htmltext; + } + + @Override + public String onTalk(L2Npc npc, L2PcInstance talker) + { + String htmltext = getNoQuestMsg(talker); + final QuestState qs = getQuestState(talker, true); + if (qs == null) + { + return htmltext; + } + + switch (npc.getId()) + { + case KETRA_ORC_SHAMAN: + { + switch (qs.getState()) + { + case State.CREATED: + { + htmltext = "32499-01.htm"; + break; + } + case State.COMPLETED: + { + htmltext = "32499-02.html"; + break; + } + case State.STARTED: + { + htmltext = "32499-10.html"; + break; + } + } + break; + } + case KETRA_ORC_SUPPORTER: + { + switch (qs.getCond()) + { + case 3: + { + htmltext = "32502-07.html"; + break; + } + case 4: + { + htmltext = "32502-06.html"; + break; + } + default: + { + htmltext = "32502-01.html"; + break; + } + } + break; + } + case KETRA_ORC_INTELLIGENCE_OFFICIER: + { + htmltext = !qs.isCond(3) && !qs.isCond(4) ? "32509-01a.html" : "32509-01.html"; + break; + } + } + return htmltext; + } + + @Override + public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon) + { + if (npc.getId() != LATANA) + { + if (!WEAPON_UPGRADE_STAGE_1_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_1) && hasQuestItems(killer, SPEAR_OF_SILENOS)) + { + if (getRandom(1, 6) > 2) + { + giveItems(killer, WEAPON_UPGRADE_STAGE_1, 1, true); + WEAPON_UPGRADE_STAGE_1_DROPED = true; + } + } + if (!WEAPON_UPGRADE_STAGE_2_DROPED && !hasQuestItems(killer, WEAPON_UPGRADE_STAGE_2) && hasQuestItems(killer, SPEAR_OF_SILENOS_REINFORCED)) + { + if (getRandom(1, 6) > 4) + { + giveItems(killer, WEAPON_UPGRADE_STAGE_2, 1, true); + WEAPON_UPGRADE_STAGE_2_DROPED = true; + } + } + + switch (getRandom(1, 3)) + { + case 1: + { + npc.dropItem(killer, SHIELD_POTION, getRandom(1, 8)); + break; + } + case 2: + { + npc.dropItem(killer, HEAL_POTION, getRandom(1, 4)); + break; + } + } + } + else + { + final QuestState qs = getQuestState(killer, false); + if (qs != null) + { + qs.setCond(4, true); + } + } + return super.onKill(npc, killer, isSummon); + } +} diff --git a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java index 8af5bd32ff..8bd3efd348 100644 --- a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java +++ b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java @@ -66,6 +66,7 @@ import quests.Q00140_ShadowFoxPart2.Q00140_ShadowFoxPart2; import quests.Q00141_ShadowFoxPart3.Q00141_ShadowFoxPart3; import quests.Q00142_FallenAngelRequestOfDawn.Q00142_FallenAngelRequestOfDawn; import quests.Q00143_FallenAngelRequestOfDusk.Q00143_FallenAngelRequestOfDusk; +import quests.Q00144_PailakaInjuredDragon.Q00144_PailakaInjuredDragon; import quests.Q00146_TheZeroHour.Q00146_TheZeroHour; import quests.Q00177_SplitDestiny.Q00177_SplitDestiny; import quests.Q00183_RelicExploration.Q00183_RelicExploration; @@ -430,6 +431,7 @@ public class QuestMasterHandler Q00141_ShadowFoxPart3.class, Q00142_FallenAngelRequestOfDawn.class, Q00143_FallenAngelRequestOfDusk.class, + Q00144_PailakaInjuredDragon.class, Q00146_TheZeroHour.class, Q00177_SplitDestiny.class, Q00183_RelicExploration.class, @@ -459,7 +461,6 @@ public class QuestMasterHandler Q00298_LizardmensConspiracy.class, Q00307_ControlDeviceOfTheGiants.class, Q00310_OnlyWhatRemains.class, - Q00359_ForASleeplessDeadman.class, Q00336_CoinsOfMagic.class, Q00337_AudienceWithTheLandDragon.class, Q00344_1000YearsTheEndOfLamentation.class, diff --git a/trunk/dist/game/data/stats/npcs/18600-18699.xml b/trunk/dist/game/data/stats/npcs/18600-18699.xml index 8ce2ba80e5..8c548d4510 100644 --- a/trunk/dist/game/data/stats/npcs/18600-18699.xml +++ b/trunk/dist/game/data/stats/npcs/18600-18699.xml @@ -3948,6 +3948,8 @@ + + true