Quest Pailaka Injured Dragon (144).

Contributed by Mathael.
This commit is contained in:
MobiusDev 2016-08-07 19:55:18 +00:00
parent 15d637f3e5
commit 5b9a0d6ec1
40 changed files with 807 additions and 4 deletions

View File

@ -1,5 +1,5 @@
<html><body>Giant’s Minion Hansen:<br>
Shhh! Keep it dow. We shouldn’t irritate them for no reason.<br>
<html><body>Giant's Minion Hansen:<br>
Shhh! Keep it dow. We shouldn't irritate them for no reason.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_teleport 0 1">"I want to go inside the Varka Silenos Barracks."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_multisell 902">"Here, I have some Steel Door Guild Coins..."</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>

View File

@ -81,6 +81,7 @@
<npc id="32502" x="125524" y="-40946" z="-3718" heading="8279" />
<npc id="32509" x="110074" y="-41324" z="-2285" heading="33580" />
<npc id="32509" x="113745" y="-47565" z="-2593" heading="55710" />
<npc id="18660" x="105618" y="-41801" z="-1782" heading="34701" /> <!-- Latana -->
</group>
</spawnlist>
</instance>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
Remember to seek out a Ketra Orc in that world. There must be one there who will aid you in your quest!
</body></html>

View File

@ -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 <http://www.gnu.org/licenses/>.
*/
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<Integer, Location> 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();
}
}

View File

@ -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

View File

@ -0,0 +1,5 @@
<html><body>Ketra Orc Shaman:<br>
I perceive darkness...and chaos... The protector of our race, the great Red Dragon, lies imprisoned and in torment there.<br>
He summons us to return him to his rightful place of glory, but...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-04.htm">"But what?"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Ketra Orc Shaman:<br>
I no longer sense the dark energy! The balance has been restored!<br>
(This quest has already been completed.)
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Ketra Orc Shaman:<br>
You do not deserve to learn about the great Ketra and the race of the Red Dragon!<br>
(You must be level 73 or above to start this quest.)
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Ketra Orc Shaman:<br>
The Ketra believe we are children of the Fire Spirit.<br>We worship the Red Dragon, who wields the strongest fire in all Goddard.<br>
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!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-05.htm">"Tell me about the darkness."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Ketra Orc Shaman:<br>
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...<br>
(Only characters level 77 or below may undertake this quest.)
</body></html>

View File

@ -0,0 +1,7 @@
<html><body>Ketra Orc Shaman:<br>
It is a darkness without shape or substance.<br>
It came from across the sea, and now spreads its black shadow over our land as well.<br>
The Humans call the source of the darkness "Kamaloka" and shadow it casts "Pailaka." Now even our great protector is helpless before it!<br>
We must summon all our strength to defeat the darkness!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-06.htm">"Go on."</Button>
</body></html>

View File

@ -0,0 +1,8 @@
<html><body>Ketra Orc Shaman:<br>
Warrior, I ask for your aid!<br>
We are of Ketra descent, so we cannot enter the Shadow of Darkness.<br>
But I believe that an adventurer like you can enter and remove this foul curse from us.<br>
Will you do it?<br>
(This quest takes place in Pailaka. It does not affect the Varka Silenos alliance quest or the Ketra Orc alliance quest.)<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-07.htm">"Sure."</Button>
</body></html>

View File

@ -0,0 +1,7 @@
<html><body>Ketra Orc Shaman:<br>
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.<br>
They will help you.<br>
When you are prepared, I will send you to the Shadow World, Pailaka!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-08.htm">"No, I can go now."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32499-08a.html">"Okay. I will be back soon."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Ketra Orc Shaman:<br>
Warrior, do you wish to enter the Shadow World, Pailaka?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest PailakaInjuredDragon enter">"Yup!"</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
Very well, I shall wait here until you are ready.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Ketra Orc Shaman:<br>
The darkness still exists! Will you enter Pailaka again?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest PailakaInjuredDragon enter">"Yup!"</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
I have faith that you will remove the dark shadow which hides our Great Flame!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Shaman:<br>
Ah! I can feel the Shadow of Darkness weakening! You must finish it!
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Ketra Orc Supporter:<br>
The Dragon of Fire, a descendant of the Great Valakas, appeared just as we Ketra Orcs were fighting those vile Varka Silenos.<br>
He took our side and drove our enemies from the field of battle!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32502-02.html">"Oh..."</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Ketra Orc Supporter:<br>
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!<br>
We tried to rescue him, but his wing was injured and he was captured...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32502-03.html">"Rescuing the dragon... Is that what you want?"</Button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Ketra Orc Supporter:<br>
Of course! That is the dream of every loyal Ketra Orc! But our shaman senses that time is running out!<br>
The evil Silenos shamans are trying to brainwash Latana into helping them.<br>
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...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32502-04.html">"What should I do then?"</Button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Ketra Orc Supporter:<br>
Truthfully, I do not know.<br>
There is a small chance that if you can pierce the wall surrounding him, Latana will come to his senses.<br>
If so, we could at least free his spirit, if not his body, to return to the Great Fire...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32502-05.html">"I understand."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Ketra Orc Supporter:<br>
Know that, even wounded, the Dragon of Fire is very powerful. To help you slay him and set his spirit free, use this <font color="LEVEL">Spear of Silenos</font>, which we captured from our enemy. It can <font color="LEVEL">use a power called Obliteration Storm to increase the effectiveness of critical hits</font>! 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!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32502-07.html">"Give me some details about the enemy."</Button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Ketra Orc Supporter:<br>
Dejakar Oroka!<br>
Latana used the last flicker of energy to summon me here! My friend, you have earned the gratitude of all the Ketra Orcs.<br>
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.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon 32502-08.html">Return the Spear</Button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Ketra Orc Supporter:<br>
The enemy are Varka Silenos soldiers.<br>
Their camps are positioned to prevent access to the dragon. It will be impossible to sneak past them.<br>
By facing and defeating them, however, you can obtain a scroll needed to enhance the Spear of Silenos.<br>
Then and only then will you be ready to face Latana, the Dragon of Fire!
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Ketra Orc Supporter:<br>
What happened here has not affected your world, but it may help you in the future...<br>
Now you must return to where you belong.<br>
Use the Scroll of Escape to leave Pailaka and return to your world!
</body></html>

View File

@ -0,0 +1,9 @@
<html><head><body>Ketra Orc Intelligence Officer:<br>
Dejakar Oroka!<br>
You hold the Spear of Silenos! Your coming was foretold.<br>
But Latana's power is very strong, and the Spear of Silenos is not yet strong enough.<br>
If you have the Scroll of Enchant Weapon made with the blood of Silenos, I will perform a sacred ceremony to enhance the spear!<br>
If you wish, I can also bestow on you some of our tribe's powerful enhancement magic!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon upgrade_weapon">"I want to have my weapon enhanced."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement_page">"Can I get some enhancement magic?"</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Ketra Orc Intelligence Officer:<br>
Umarak Oroka!<br>
To defeat the enemy of this place, you will need the Spear of Silenos.<br>
The <font color="LEVEL">Ketra Orc Supporter</font> is somewhere around here; find him and obtain the spear!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Intelligence Officer:<br>
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...
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Ketra Orc Intelligence Officer:<br>
The Spear of Silenos has regained its power! And now the power of Obliteration Storm has also reached its peak.<br>
With this I hope you can send Latana back to the Fire World, warrior!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Intelligence Officer:<br>
You still need an Enchant Scroll. Acquire one by slaying more Silenos!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Intelligence Officer:<br>
You still need an Enchant Scroll. Acquire one by slaying more Silenos!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Intelligence Officer:<br>
This spear has already been enhanced to its full potential. It is stronger than any other power in this place!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Intelligence Officer:<br>
You cannot receive any more enhancements! All 5 spells have been used.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Ketra Orc Intelligence Officer:<br>
The fifth and final enhancement is complete!
</body></html>

View File

@ -0,0 +1,15 @@
<html><body>Ketra Orc Intelligence Officer:<br>
Please select the next spell you wish to receive.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 1">Haste Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 2">Wind Walk Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 3">Empower Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 4">Acumen Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 5">Concentration Lv6</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 6">Might Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 7">Guidance Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 8">Focus Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 9">Death Whisper Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 10">Berserker Spirit Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 11">Vampiric Rage Lv4</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 12">Blessed Body Lv6</Button>
</body></html>

View File

@ -0,0 +1,16 @@
<html><body>Ketra Orc Intelligence Officer:<br>
We possess several types of enhancement magic. I can grant you <font color="LEVEL">at most 5 spells</font>.<br>
Select them from the list below:<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 1">Haste Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 2">Wind Walk Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 3">Empower Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 4">Acumen Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 5">Concentration Lv6</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 6">Might Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 7">Guidance Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 8">Focus Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 9">Death Whisper Lv3</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 10">Berserker Spirit Lv2</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 11">Vampiric Rage Lv4</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00144_PailakaInjuredDragon enhancement 12">Blessed Body Lv6</Button>
</body></html>

View File

@ -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 <http://www.gnu.org/licenses/>.
*/
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);
}
}

View File

@ -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,

View File

@ -3948,6 +3948,8 @@
<skill id="4415" level="3" /> <!-- One-handed Sword -->
<skill id="4416" level="10" /> <!-- Dragons -->
<skill id="5715" level="1" /> <!-- Electric Flame -->
<skill id="5716" level="1" /> <!-- Stun -->
<skill id="5717" level="1" /> <!-- Fire Breath -->
</skill_list>
<ex_crt_effect>true</ex_crt_effect>
<ai aggroRange="300" clanHelpRange="300" isAggressive="true" />