From a1dd8a254e619c2ee5ed0f2d3769df837d43cde5 Mon Sep 17 00:00:00 2001
From: mobius <8391001+MobiusDevelopment@users.noreply.github.com>
Date: Fri, 2 Jan 2015 13:05:41 +0000
Subject: [PATCH] Pailaka Injured Dragon.
---
trunk/dist/game/data/html/default/32502.htm | 5 +
trunk/dist/game/data/html/default/32509.htm | 5 +
trunk/dist/game/data/html/default/32512.htm | 5 +
.../data/instances/PailakaInjuredDragon.xml | 83 ++
.../Q00144_PailakaInjuredDragon/32499-00.htm | 5 +
.../Q00144_PailakaInjuredDragon/32499-01.htm | 6 +
.../Q00144_PailakaInjuredDragon/32499-02.htm | 7 +
.../Q00144_PailakaInjuredDragon/32499-03.htm | 9 +
.../Q00144_PailakaInjuredDragon/32499-04.html | 7 +
.../Q00144_PailakaInjuredDragon/32499-05.html | 4 +
.../Q00144_PailakaInjuredDragon/32499-06.html | 4 +
.../Q00144_PailakaInjuredDragon/32499-07.html | 3 +
.../Q00144_PailakaInjuredDragon/32499-08.html | 3 +
.../Q00144_PailakaInjuredDragon/32499-09.html | 4 +
.../Q00144_PailakaInjuredDragon/32499-10.html | 3 +
.../32499-completed.html | 4 +
.../Q00144_PailakaInjuredDragon/32499-no.html | 3 +
.../32499-over.html | 3 +
.../Q00144_PailakaInjuredDragon/32502-00.html | 5 +
.../Q00144_PailakaInjuredDragon/32502-01.html | 5 +
.../Q00144_PailakaInjuredDragon/32502-02.html | 6 +
.../Q00144_PailakaInjuredDragon/32502-03.html | 6 +
.../Q00144_PailakaInjuredDragon/32502-04.html | 4 +
.../Q00144_PailakaInjuredDragon/32502-05.html | 5 +
.../Q00144_PailakaInjuredDragon/32502-06.html | 5 +
.../Q00144_PailakaInjuredDragon/32509-00.html | 6 +
.../Q00144_PailakaInjuredDragon/32509-01.html | 3 +
.../Q00144_PailakaInjuredDragon/32509-02.html | 3 +
.../Q00144_PailakaInjuredDragon/32509-03.html | 4 +
.../32509-03a.html | 3 +
.../Q00144_PailakaInjuredDragon/32509-04.html | 3 +
.../Q00144_PailakaInjuredDragon/32509-05.html | 3 +
.../Q00144_PailakaInjuredDragon/32509-06.html | 16 +
.../32509-06a.html | 16 +
.../Q00144_PailakaInjuredDragon/32509-07.html | 3 +
.../Q00144_PailakaInjuredDragon/32512-01.html | 4 +
.../Q00144_PailakaInjuredDragon/32512-02.html | 6 +
.../Q00144_PailakaInjuredDragon/32512-03.html | 3 +
.../Q00144_PailakaInjuredDragon.java | 975 ++++++++++++++++++
.../scripts/quests/QuestMasterHandler.java | 2 +
.../dist/game/data/stats/npcs/18600-18700.xml | 4 +-
trunk/dist/game/data/zones/custom_script.xml | 57 +
42 files changed, 1308 insertions(+), 2 deletions(-)
create mode 100644 trunk/dist/game/data/html/default/32502.htm
create mode 100644 trunk/dist/game/data/html/default/32509.htm
create mode 100644 trunk/dist/game/data/html/default/32512.htm
create mode 100644 trunk/dist/game/data/instances/PailakaInjuredDragon.xml
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-00.htm
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.htm
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-02.htm
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-03.htm
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-completed.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-no.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-over.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-00.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-01.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-02.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-03.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-04.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-05.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-00.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-02.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-03.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-03a.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-04.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06a.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-07.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html
create mode 100644 trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java
diff --git a/trunk/dist/game/data/html/default/32502.htm b/trunk/dist/game/data/html/default/32502.htm
new file mode 100644
index 0000000000..d07ff6875b
--- /dev/null
+++ b/trunk/dist/game/data/html/default/32502.htm
@@ -0,0 +1,5 @@
+
Ketra Orc Supporter:
+The Great Dragon's descendant has fallen to our enemy!
+Those goat-headed ruffians have captured the protector of the Ketra Orcs: the Dragon of Fire!
+Quest
+
diff --git a/trunk/dist/game/data/html/default/32509.htm b/trunk/dist/game/data/html/default/32509.htm
new file mode 100644
index 0000000000..37eaf84c95
--- /dev/null
+++ b/trunk/dist/game/data/html/default/32509.htm
@@ -0,0 +1,5 @@
+Ketra Orc Intelligence Officer:
+Dejakar Oroka!
+You hold the Spear of Silenos! Your coming was foretold.
+Quest
+
diff --git a/trunk/dist/game/data/html/default/32512.htm b/trunk/dist/game/data/html/default/32512.htm
new file mode 100644
index 0000000000..7318a61cf8
--- /dev/null
+++ b/trunk/dist/game/data/html/default/32512.htm
@@ -0,0 +1,5 @@
+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.
+Quest
+
diff --git a/trunk/dist/game/data/instances/PailakaInjuredDragon.xml b/trunk/dist/game/data/instances/PailakaInjuredDragon.xml
new file mode 100644
index 0000000000..f42c0d3931
--- /dev/null
+++ b/trunk/dist/game/data/instances/PailakaInjuredDragon.xml
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-00.htm b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-00.htm
new file mode 100644
index 0000000000..7590fb411a
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-00.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...
+Ask to hear more.
+
\ No newline at end of file
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..a7bece2a23
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-01.htm
@@ -0,0 +1,6 @@
+Ktra Orc Shaman:
+The Ketra believe we are children of the Spirit of Fire.
+We worship the Red Dragon, who wields the stongest fire in all Goddard.
+Lately. however, we have felt a darkness flickering within the pure flame. It seems to be growing -- and the fire's power seems to be weaking!
+Ask about this strange darkness.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-02.htm b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-02.htm
new file mode 100644
index 0000000000..677b4dbf90
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-02.htm
@@ -0,0 +1,7 @@
+Ketra Orc Shaman:
+It is a darkness wothout 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 helpess before it!
+We must summon all our strength to defeat the darkness!
+Keep listening.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-03.htm b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-03.htm
new file mode 100644
index 0000000000..0a4c49a467
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-03.htm
@@ -0,0 +1,9 @@
+Ketra Orc Shaman:
+Warrior, I ask you to aid us!
+Because of our Ketra heritage, we cannot enter the Shadow of Darkness ourselves.
+But I believe an adventurer like you can do so and remove this 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.)
+Vitality points are awarded for completing this quest. You will acquired them immediately upon complettion of the quest. If you recieve the reward while your Vitality Level is high, you may notice a slight reduction.)
+Say yes.
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html
new file mode 100644
index 0000000000..004d1a1d3b
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-04.html
@@ -0,0 +1,7 @@
+Ketra Orc Shaman:
+Our thanks, warrior! One of the last vision 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!
+Go now
+Come back later
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html
new file mode 100644
index 0000000000..8fa3467f0c
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-05.html
@@ -0,0 +1,4 @@
+Ketra Orc Shaman:
+Oh! The Spirit of Fire! I can feel it Imprisoned within darkness!
+Quest
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html
new file mode 100644
index 0000000000..c753a82d9d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-06.html
@@ -0,0 +1,4 @@
+Ketra Orc Shaman:
+Warrior, do you wish to enter the Shadow World, Pailaka?
+Enter Pailaka
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html
new file mode 100644
index 0000000000..d0a91d035e
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-07.html
@@ -0,0 +1,3 @@
+Ketra Orc Shaman:
+Very well, I shall wait here until you are ready.
+
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html
new file mode 100644
index 0000000000..ab71fdb66e
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-08.html
@@ -0,0 +1,3 @@
+Ketra Orc Shaman:
+Now looking for Ketra Orc in that world! He can help you in that place!
+
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html
new file mode 100644
index 0000000000..4567c30eae
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-09.html
@@ -0,0 +1,4 @@
+Ketra Orc Shaman:
+You have to enter the shadow world.Are you ready?
+Enter
+
\ 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..e8c7d2a307
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-10.html
@@ -0,0 +1,3 @@
+Ketra Orc Shaman:
+I believe his power will removed wrapped in the shadows surrounding sparkles!
+
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-completed.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-completed.html
new file mode 100644
index 0000000000..8e6e81eb11
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-completed.html
@@ -0,0 +1,4 @@
+Ketra Orc Shaman:
+Now I feel the dark atmosphere of it! Boring Silenus breath is gone!
+Quest is complete!
+
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-no.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-no.html
new file mode 100644
index 0000000000..c61be87163
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-no.html
@@ -0,0 +1,3 @@
+Ketra Orc Shaman:
+Only players of more than 73 level can perform this task.
+
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-over.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-over.html
new file mode 100644
index 0000000000..52d54fc0af
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32499-over.html
@@ -0,0 +1,3 @@
+Ketra Orc Shaman:
+Only heroes up to 77 level, can perform this task.
+
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-00.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-00.html
new file mode 100644
index 0000000000..eff3546944
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-00.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!
+Keep listening.
+
\ 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..7dd3f87abd
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-01.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 injurd and he was captured...
+Ask if he wants to rescue the dragon.
+
\ 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..434c4c6abb
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-02.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...
+Ask what can be done.
+
\ 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..080ee34eb3
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-03.html
@@ -0,0 +1,6 @@
+Katra Orc Shaman:
+Truthfully, I do not know.
+There is a small chance that if you can pierce the wall surronding him, Latana will come to his senses.
+If so, we could at least free his spirit, if now his body, to return to the Great Fire...
+"I understand."
+
\ 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..454330f021
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-04.html
@@ -0,0 +1,4 @@
+Katra Orc Supporter:
+Know that, even wounded, the Dragon of Fire is very powerful. To help you slay him amd 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 enchance its power. Use it to destroy our enemy and send Latana's spirit to the World of Fire!
+Ask about the enemy.
+
\ 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..1e16d3e046
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-05.html
@@ -0,0 +1,5 @@
+Katra 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 enchance the Spear of Silenos.
+They and only then will you ready to face Latana, the Dragon of Fire!
+
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..7915c75a34
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32502-06.html
@@ -0,0 +1,5 @@
+Ketra Orc Supporter:
+The Great Dragon's descendant has fallen to our enemy!
+Those goat-headed ruffians have captured the protector of the Ketra Orcs: the Dragon of Fire!
+Quest
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-00.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-00.html
new file mode 100644
index 0000000000..f7c70d8745
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-00.html
@@ -0,0 +1,6 @@
+Ketra Orc Intelligence Officer:
+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!
+Enhance the weapon.
+Receive enhancement magic.
+
\ 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..6b84633637
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-01.html
@@ -0,0 +1,3 @@
+Ketra Orc Intelligence Officer:
+You still need an Enchant Scroll, Acquire one by slaying more Silenos!
+
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..87234ebca0
--- /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 enchanced! 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...
+
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..7bac262ea4
--- /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 Fore World, warrior!
+
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-03a.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-03a.html
new file mode 100644
index 0000000000..5535a24236
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-03a.html
@@ -0,0 +1,3 @@
+Ketra Orc Intelligence Officer:
+This weapon cant be upgraded! Here is more power than ever!
+
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..316e3d6c8c
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-04.html
@@ -0,0 +1,3 @@
+Ketra Orc Intelligence Officer:
+You cannot receive any more enchancements! All 5 spells have been used.
+
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..4299222a2c
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-05.html
@@ -0,0 +1,3 @@
+Ketra Orc Intelligence Officer:
+The fifth and final enchancement is complete!
+
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..2f65ff3b31
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06.html
@@ -0,0 +1,16 @@
+Ketra Orc Intelligence Officer:
+We possesss several types of enchanement magic. Unfortunately, I can only grant you a total of 5 spells!
+Please select them from the list below:
+Haste Lv2
+Wind Walk Lv2
+Empower Lv3
+Acumen Lv3
+Concentration Lv6
+Might Lv3
+Guidance Lv3
+Focus Lv3
+Death Wisper Lv3
+Berserker Spirit Lv2
+Vampiric Rage Lv4
+Blessed Body Lv6
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06a.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06a.html
new file mode 100644
index 0000000000..2f65ff3b31
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-06a.html
@@ -0,0 +1,16 @@
+Ketra Orc Intelligence Officer:
+We possesss several types of enchanement magic. Unfortunately, I can only grant you a total of 5 spells!
+Please select them from the list below:
+Haste Lv2
+Wind Walk Lv2
+Empower Lv3
+Acumen Lv3
+Concentration Lv6
+Might Lv3
+Guidance Lv3
+Focus Lv3
+Death Wisper Lv3
+Berserker Spirit Lv2
+Vampiric Rage Lv4
+Blessed Body Lv6
+
\ 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..3ffbec48dd
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32509-07.html
@@ -0,0 +1,3 @@
+Ketra Orc Intelligence Officer:
+I can't find your Spear!
+
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html
new file mode 100644
index 0000000000..c69c860f8d
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-01.html
@@ -0,0 +1,4 @@
+Ketra Orc Supporter:
+Would you return the Spear of Silenos to us, since it is a sacred relic of our people! We will neturally reward you for it.
+"Return the Spear."
+
\ No newline at end of file
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html
new file mode 100644
index 0000000000..af9607b574
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-02.html
@@ -0,0 +1,6 @@
+Ketra Orc Supporter:
+You have done it!
+You have lifted the curse! I no longer feel the taint of darkness upon our Atlar of Fire!
+Warrior, I wish you could stay heer with us, but our shaman decrees that you must leave...
+Here is a Scroll of Escape that he has prepared for you. Use it to return safely to your world.
+
diff --git a/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html
new file mode 100644
index 0000000000..1ee6d7027f
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/32512-03.html
@@ -0,0 +1,3 @@
+Ketra Orc Supporter:
+Use the Scroll of Escape that I gave you to return to your world.
+
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..31451ac1de
--- /dev/null
+++ b/trunk/dist/game/data/scripts/quests/Q00144_PailakaInjuredDragon/Q00144_PailakaInjuredDragon.java
@@ -0,0 +1,975 @@
+/*
+ * Copyright (C) 2004-2014 L2J DataPack
+ *
+ * This file is part of L2J DataPack.
+ *
+ * L2J DataPack is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * L2J DataPack is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+package quests.Q00144_PailakaInjuredDragon;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+
+import javolution.util.FastList;
+import javolution.util.FastMap;
+
+import com.l2jserver.gameserver.ai.CtrlEvent;
+import com.l2jserver.gameserver.ai.CtrlIntention;
+import com.l2jserver.gameserver.datatables.SkillData;
+import com.l2jserver.gameserver.enums.QuestSound;
+import com.l2jserver.gameserver.instancemanager.InstanceManager;
+import com.l2jserver.gameserver.model.actor.L2Character;
+import com.l2jserver.gameserver.model.actor.L2Npc;
+import com.l2jserver.gameserver.model.actor.L2Summon;
+import com.l2jserver.gameserver.model.actor.instance.L2MonsterInstance;
+import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
+import com.l2jserver.gameserver.model.actor.instance.L2PetInstance;
+import com.l2jserver.gameserver.model.entity.Instance;
+import com.l2jserver.gameserver.model.instancezone.InstanceWorld;
+import com.l2jserver.gameserver.model.quest.Quest;
+import com.l2jserver.gameserver.model.quest.QuestState;
+import com.l2jserver.gameserver.model.quest.State;
+import com.l2jserver.gameserver.model.zone.L2ZoneType;
+import com.l2jserver.gameserver.network.SystemMessageId;
+import com.l2jserver.gameserver.util.Util;
+import com.l2jserver.util.Rnd;
+
+/**
+ * Pailaka Injured Dragon (based on same quest by Synerge?)
+ * @author Pandragon
+ */
+public class Q00144_PailakaInjuredDragon extends Quest
+{
+ private static final int MIN_LEVEL = 73;
+ private static final int MAX_LEVEL = 77;
+ private static final int MAX_SUMMON_LEVEL = 80;
+ private static final int EXIT_TIME = 5;
+ private static final int INSTANCE_ID = 45;
+ protected static final int[] TELEPORT =
+ {
+ 125757,
+ -40928,
+ -3736
+ };
+
+ // @formatter:off
+ // NO EXIT ZONES
+ private static final Map NOEXIT_ZONES = new FastMap<>();
+ static
+ {
+ NOEXIT_ZONES.put(200001, new int[]{123167, -45743, -3023});
+ NOEXIT_ZONES.put(200002, new int[]{117783, -46398, -2560});
+ NOEXIT_ZONES.put(200003, new int[]{116791, -51556, -2584});
+ NOEXIT_ZONES.put(200004, new int[]{117993, -52505, -2480});
+ NOEXIT_ZONES.put(200005, new int[]{113226, -44080, -2776});
+ NOEXIT_ZONES.put(200006, new int[]{110326, -45016, -2444});
+ NOEXIT_ZONES.put(200007, new int[]{118341, -55951, -2280});
+ NOEXIT_ZONES.put(200008, new int[]{110127, -41562, -2332});
+ }
+
+ // Npcs
+ private static final int KETRA_ORC_SHAMAN = 32499;
+ private static final int KETRA_ORC_SUPPORTER = 32502;
+ private static final int KETRA_ORC_SUPPORTER2 = 32512;
+ private static final int KETRA_ORC_INTELIGENCE_OFFICER = 32509;
+
+ // Wall Mobs
+ private static final int VARKA_SILENOS_RECRUIT = 18635;
+ private static final int VARKA_SILENOS_FOOTMAN = 18636;
+ private static final int VARKA_SILENOS_WARRIOR = 18642;
+ private static final int VARKA_SILENOS_OFFICER = 18646;
+ private static final int VARKAS_COMMANDER = 18654;
+ private static final int VARKA_ELITE_GUARD = 18653;
+ private static final int VARKA_SILENOS_GREAT_MAGUS = 18649;
+ private static final int VARKA_SILENOS_GENERAL = 18650;
+ private static final int VARKA_SILENOS_HEAD_GUARD = 18655;
+ private static final int PROPHET_GUARD = 18657;
+ private static final int VARKAS_PROPHET = 18659;
+
+ // Extra Wall Silenos
+ private static final int VARKA_SILENOS_MEDIUM = 18644;
+ private static final int VARKA_SILENOS_PRIEST = 18641;
+ private static final int VARKA_SILENOS_SHAMAN = 18640;
+ private static final int VARKA_SILENOS_SEER = 18648;
+ private static final int VARKA_SILENOS_MAGNUS = 18645;
+ private static final int DISCIPLE_OF_PROPHET = 18658;
+ private static final int VARKA_HEAD_MAGUS = 18656;
+ private static final int VARKA_SILENOS_GREAT_SEER = 18652;
+
+ // Normal Mobs
+ private static final int ANTYLOPE_1 = 18637;
+ private static final int ANTYLOPE_2 = 18643;
+ private static final int ANTYLOPE_3 = 18651;
+ private static final int FLAVA = 18647;
+
+ // Boss
+ private static final int LATANA = 18660;
+
+ // Items
+ private static final int SPEAR = 13052;
+ private static final int ENCHSPEAR = 13053;
+ private static final int LASTSPEAR = 13054;
+ private static final int STAGE1 = 13056;
+ private static final int STAGE2 = 13057;
+
+ private static final int SHIELD_POTION = 13032;
+ private static final int HEAL_POTION = 13033;
+
+ // Rewards
+ private static final int PSHIRT = 13296;
+ private static final int SCROLL_OF_ESCAPE = 736;
+
+ private static int buff_counter = 5;
+
+ // Arrays
+ private static final int[] NPCS =
+ {
+ KETRA_ORC_SHAMAN,
+ KETRA_ORC_SUPPORTER,
+ KETRA_ORC_INTELIGENCE_OFFICER,
+ KETRA_ORC_SUPPORTER2
+ };
+
+ private static final int[] WALL_MONSTERS =
+ {
+ // 1st Row Mobs
+ VARKA_SILENOS_FOOTMAN,
+ VARKA_SILENOS_WARRIOR,
+ VARKA_SILENOS_OFFICER,
+ VARKAS_COMMANDER,
+ VARKA_SILENOS_RECRUIT,
+ PROPHET_GUARD,
+ VARKA_ELITE_GUARD,
+ VARKA_SILENOS_GREAT_MAGUS,
+ VARKA_SILENOS_GENERAL,
+ VARKA_SILENOS_HEAD_GUARD,
+ PROPHET_GUARD,
+ VARKAS_PROPHET,
+
+ // 2nd Row Mobs
+ DISCIPLE_OF_PROPHET,
+ VARKA_HEAD_MAGUS,
+ VARKA_SILENOS_GREAT_SEER,
+ VARKA_SILENOS_SHAMAN,
+ VARKA_SILENOS_MAGNUS,
+ VARKA_SILENOS_SEER,
+ VARKA_SILENOS_MEDIUM,
+ VARKA_SILENOS_PRIEST
+ };
+
+ private static final int[] OTHER_MONSTERS =
+ {
+ ANTYLOPE_1,
+ ANTYLOPE_2,
+ ANTYLOPE_3,
+ FLAVA
+ };
+
+ private static final int[] ITEMS =
+ {
+ SPEAR,
+ ENCHSPEAR,
+ LASTSPEAR,
+ STAGE1,
+ STAGE2,
+ SHIELD_POTION,
+ HEAL_POTION
+ };
+
+ private static final int[][] BUFFS =
+ {
+ {4357,2}, // Haste Lv2
+ {4342,2}, // Wind Walk Lv2
+ {4356,3}, // Empower Lv3
+ {4355,3}, // Acumen Lv3
+ {4351,6}, // Concentration Lv6
+ {4345,3}, // Might Lv3
+ {4358,3}, // Guidance Lv3
+ {4359,3}, // Focus Lv3
+ {4360,3}, // Death Wisper Lv3
+ {4352,2}, // Berserker Spirit Lv2
+ {4354,4}, // Vampiric Rage Lv4
+ {4347,6} // Blessed Body Lv6
+ };
+
+ private static final FastList DROPLIST = new FastList<>();
+ static
+ {
+ DROPLIST.add(new PailakaDrop(HEAL_POTION, 80));
+ DROPLIST.add(new PailakaDrop(SHIELD_POTION, 30));
+ }
+
+ private static final int[][] HP_HERBS_DROPLIST =
+ {
+ // itemId, count, chance
+ { 8601, 1, 40 }, { 8600, 1, 70 }
+ };
+
+ private static final int[][] MP_HERBS_DROPLIST =
+ {
+ // itemId, count, chance
+ { 8604, 1, 40 }, { 8603, 1, 70 }
+ };
+ // @formatter:on
+
+ public Q00144_PailakaInjuredDragon()
+ {
+ super(144, Q00144_PailakaInjuredDragon.class.getSimpleName(), "Pailaka - Injured Dragon");
+ addStartNpc(KETRA_ORC_SHAMAN);
+ addKillId(LATANA);
+
+ questItemIds = ITEMS;
+
+ for (int npcId : NPCS)
+ {
+ addTalkId(npcId);
+ }
+
+ for (int mobId : OTHER_MONSTERS)
+ {
+ addKillId(mobId);
+ }
+
+ for (int mobId : WALL_MONSTERS)
+ {
+ addSpawnId(mobId);
+ addKillId(mobId);
+ }
+
+ for (int zoneid : NOEXIT_ZONES.keySet())
+ {
+ addEnterZoneId(zoneid);
+ }
+ }
+
+ @Override
+ public final String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = player.getQuestState(getName());
+ if (qs == null)
+ {
+ return getNoQuestMsg(player);
+ }
+
+ final int cond = qs.getCond();
+ if (event.equals("enter"))
+ {
+ enterInstance(player);
+ return "32499-08.html";
+ }
+ else if (event.equals("enters"))
+ {
+ enterInstance(player);
+ return "32499-10.html";
+ }
+ else if (event.equals("32499-02.htm"))
+ {
+ if (cond == 0)
+ {
+ qs.set("cond", "1");
+ qs.setState(State.STARTED);
+ qs.playSound(QuestSound.ITEMSOUND_QUEST_ACCEPT);
+ }
+ }
+ else if (event.equals("32499-04.html"))
+ {
+ if (cond == 1)
+ {
+ qs.set("cond", "2");
+ qs.playSound(QuestSound.ITEMSOUND_QUEST_ACCEPT);
+ }
+ }
+ else if (event.equals("32502-04.html"))
+ {
+ if ((cond == 2) && !qs.hasQuestItems(SPEAR))
+ {
+ qs.set("cond", "3");
+ qs.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ qs.giveItems(SPEAR, 1);
+ }
+ }
+ else if (event.equals("32509-02.html"))
+ {
+ if ((cond == 3) && qs.hasQuestItems(SPEAR))
+ {
+ if (!qs.hasQuestItems(SPEAR) && !qs.hasQuestItems(STAGE1))
+ {
+ return "32509-07.html";
+ }
+ if (qs.hasQuestItems(SPEAR) && !qs.hasQuestItems(STAGE1))
+ {
+ return "32509-01.html";
+ }
+ if (qs.hasQuestItems(SPEAR) && qs.hasQuestItems(STAGE1))
+ {
+ qs.takeItems(SPEAR, -1);
+ qs.takeItems(STAGE1, -1);
+ qs.giveItems(ENCHSPEAR, 1);
+ qs.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ return "32509-02.html";
+ }
+ }
+ if ((cond == 3) && qs.hasQuestItems(ENCHSPEAR))
+ {
+ if (!qs.hasQuestItems(ENCHSPEAR) && !qs.hasQuestItems(STAGE2))
+ {
+ return "32509-07.html";
+ }
+ if (qs.hasQuestItems(ENCHSPEAR) && !qs.hasQuestItems(STAGE2))
+ {
+ return "32509-01.html";
+ }
+ if (qs.hasQuestItems(ENCHSPEAR) && qs.hasQuestItems(STAGE2))
+ {
+ qs.takeItems(ENCHSPEAR, -1);
+ qs.takeItems(STAGE2, -1);
+ qs.giveItems(LASTSPEAR, 1);
+ qs.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+
+ // Spawns Latana.
+ addSpawn(LATANA, 105732, -41787, -1782, 35742, false, 0, false, npc.getInstanceId());
+
+ return "32509-03.html";
+ }
+ }
+ if ((cond == 3) && qs.hasQuestItems(LASTSPEAR))
+ {
+ if (qs.hasQuestItems(LASTSPEAR))
+ {
+ return "32509-03a.html";
+ }
+ if (!qs.hasQuestItems(LASTSPEAR))
+ {
+ return "32509-07.html";
+ }
+ }
+ return "32509-07.html";
+ }
+ else if (event.equals("32509-06.html"))
+ {
+ if (buff_counter < 1)
+ {
+ return "32509-04.html";
+ }
+ }
+ else if (event.equals("32512-02.html"))
+ {
+ qs.unset("cond");
+ qs.playSound(QuestSound.ITEMSOUND_QUEST_FINISH);
+ qs.exitQuest(false);
+
+ Instance inst = InstanceManager.getInstance().getInstance(npc.getInstanceId());
+ inst.setDuration(EXIT_TIME * 60000);
+ inst.setEmptyDestroyTime(0);
+
+ if (inst.containsPlayer(player.getObjectId()))
+ {
+ player.setVitalityPoints(20000, true);
+ qs.addExpAndSp(28000000, 2850000);
+ qs.giveItems(SCROLL_OF_ESCAPE, 1);
+ qs.giveItems(PSHIRT, 1);
+ }
+ }
+ else if (event.startsWith("buff"))
+ {
+ if (buff_counter > 0)
+ {
+ final int nr = Integer.parseInt(event.split("buff")[1]);
+ giveBuff(npc, player, BUFFS[nr - 1][0], BUFFS[nr - 1][1]);
+ return "32509-06a.html";
+ }
+ return "32509-05.html";
+ }
+ else if (event.equals("latana_animation"))
+ {
+ npc.abortAttack();
+ npc.abortCast();
+ npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
+ player.abortAttack();
+ player.abortCast();
+ player.stopMove(null);
+ if (player.hasSummon())
+ {
+ player.getSummon().abortAttack();
+ player.getSummon().abortCast();
+ player.getSummon().stopMove(null);
+ }
+ return null;
+ }
+ else if (event.equals("latana_animation2"))
+ {
+ npc.doCast(SkillData.getInstance().getSkill(5759, 1));
+ npc.getAI().notifyEvent(CtrlEvent.EVT_ATTACKED, player);
+ return null;
+ }
+ return event;
+ }
+
+ @Override
+ public final String onTalk(L2Npc npc, L2PcInstance player)
+ {
+ final QuestState qs = player.getQuestState(getName());
+ if (qs == null)
+ {
+ return getNoQuestMsg(player);
+ }
+
+ final int cond = qs.getCond();
+ switch (npc.getId())
+ {
+ case KETRA_ORC_SHAMAN:
+ switch (qs.getState())
+ {
+ case State.CREATED:
+ if (player.getLevel() < MIN_LEVEL)
+ {
+ return "32499-no.html";
+ }
+ if (player.getLevel() > MAX_LEVEL)
+ {
+ return "32499-over.html";
+ }
+ return "32499-00.htm";
+ case State.STARTED:
+ if (player.getLevel() < MIN_LEVEL)
+ {
+ return "32499-no.html";
+ }
+ if (player.getLevel() > MAX_LEVEL)
+ {
+ return "32499-over.html";
+ }
+ if (cond == 1)
+ {
+ return "32499-06.html";
+ }
+ else if (cond >= 2)
+ {
+ return "32499-09.html";
+ }
+ case State.COMPLETED:
+ return "32499-completed.html";
+ default:
+ return "32499-no.html";
+ }
+ case KETRA_ORC_SUPPORTER:
+ if (cond > 2)
+ {
+ return "32502-04.html";
+ }
+ return "32502-00.html";
+ case KETRA_ORC_INTELIGENCE_OFFICER:
+ return "32509-00.html";
+ case KETRA_ORC_SUPPORTER2:
+ if (qs.getState() == State.COMPLETED)
+ {
+ return "32512-03.html";
+ }
+ else if (cond == 4)
+ {
+ return "32512-01.html";
+ }
+ }
+
+ return getNoQuestMsg(player);
+ }
+
+ @Override
+ public final String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
+ {
+ QuestState qs = player.getQuestState(getName());
+ if ((qs == null) || (qs.getState() != State.STARTED))
+ {
+ return null;
+ }
+
+ // There are lots of mobs walls, and item get is random, it could happen that you dont get the item until the last wall, and there's 4 different silenos groups. 1 enchant comes only from group 2 and the 2nd comes from group 4. Chances, lets say 20% of getting the enchant when killing the
+ // right mob When you kill a mob wall, another mage type appears behind. If all mobs from the front are killed then the ones that are behind are despawned. Also this mobs should be damaged, like with 30% of max HP, because they should be easy to kill.
+ final int cond = qs.getCond();
+ switch (npc.getId())
+ {
+ case VARKA_SILENOS_FOOTMAN:
+ case VARKA_SILENOS_RECRUIT:
+ dropHerb(npc, player, HP_HERBS_DROPLIST);
+ if ((cond == 3) && qs.hasQuestItems(SPEAR) && !qs.hasQuestItems(STAGE1) && (Rnd.get(100) < 5))
+ {
+ qs.giveItems(STAGE1, 1);
+ qs.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ }
+
+ // Spawns Mage Type silenos behind the one that was killed.
+ spawnMageBehind(npc, player, VARKA_SILENOS_MEDIUM);
+
+ // Check if all the first row have been killed. Despawn mages.
+ checkIfLastInWall(npc);
+ break;
+ case VARKA_SILENOS_WARRIOR:
+ dropHerb(npc, player, HP_HERBS_DROPLIST);
+ if ((cond == 3) && qs.hasQuestItems(SPEAR) && !qs.hasQuestItems(STAGE1) && (Rnd.get(100) < 10))
+ {
+ qs.giveItems(STAGE1, 1);
+ qs.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ }
+
+ // Spawns Mage Type silenos behind the one that was killed.
+ spawnMageBehind(npc, player, VARKA_SILENOS_PRIEST);
+
+ // Check if all the first row have been killed. Despawn mages.
+ checkIfLastInWall(npc);
+ break;
+ case VARKA_ELITE_GUARD:
+ dropHerb(npc, player, HP_HERBS_DROPLIST);
+ if ((cond == 3) && qs.hasQuestItems(SPEAR) && !qs.hasQuestItems(STAGE1) && (Rnd.get(100) < 15))
+ {
+ qs.giveItems(STAGE1, 1);
+ qs.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ }
+
+ // Spawns Mage Type silenos behind the one that was killed.
+ spawnMageBehind(npc, player, VARKA_SILENOS_SHAMAN);
+
+ // Check if all the first row have been killed. Despawn mages.
+ checkIfLastInWall(npc);
+ break;
+ case VARKAS_COMMANDER:
+ case VARKA_SILENOS_OFFICER:
+ dropHerb(npc, player, HP_HERBS_DROPLIST);
+ if ((cond == 3) && qs.hasQuestItems(SPEAR) && !qs.hasQuestItems(STAGE1) && (Rnd.get(100) < 25))
+ {
+ qs.giveItems(STAGE1, 1);
+ qs.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ }
+
+ // Spawns Mage Type silenos behind the one that was killed.
+ spawnMageBehind(npc, player, VARKA_SILENOS_SEER);
+
+ // Check if all the first row have been killed. Despawn mages.
+ checkIfLastInWall(npc);
+ break;
+ case VARKA_SILENOS_GREAT_MAGUS:
+ case VARKA_SILENOS_GENERAL:
+ dropHerb(npc, player, HP_HERBS_DROPLIST);
+ if ((cond == 3) && qs.hasQuestItems(ENCHSPEAR) && !qs.hasQuestItems(STAGE2) && (Rnd.get(100) < 5))
+ {
+ qs.giveItems(STAGE2, 1);
+ qs.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ }
+
+ // Spawns Mage Type silenos behind the one that was killed.
+ spawnMageBehind(npc, player, VARKA_SILENOS_MAGNUS);
+
+ // Check if all the first row have been killed. Despawn mages.
+ checkIfLastInWall(npc);
+ break;
+ case VARKAS_PROPHET:
+ dropHerb(npc, player, HP_HERBS_DROPLIST);
+ if ((cond == 3) && qs.hasQuestItems(ENCHSPEAR) && !qs.hasQuestItems(STAGE2) && (Rnd.get(100) < 10))
+ {
+ qs.giveItems(STAGE2, 1);
+ qs.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ }
+
+ // Spawns Mage Type silenos behind the one that was killed.
+ spawnMageBehind(npc, player, DISCIPLE_OF_PROPHET);
+
+ // Check if all the first row have been killed. Despawn mages.
+ checkIfLastInWall(npc);
+ break;
+ case VARKA_SILENOS_HEAD_GUARD:
+ dropHerb(npc, player, HP_HERBS_DROPLIST);
+ if ((cond == 3) && qs.hasQuestItems(ENCHSPEAR) && !qs.hasQuestItems(STAGE2) && (Rnd.get(100) < 20))
+ {
+ qs.giveItems(STAGE2, 1);
+ qs.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ }
+
+ // Spawns Mage Type silenos behind the one that was killed.
+ spawnMageBehind(npc, player, VARKA_HEAD_MAGUS);
+
+ // Check if all the first row have been killed. Despawn mages.
+ checkIfLastInWall(npc);
+ break;
+ case PROPHET_GUARD:
+ dropHerb(npc, player, HP_HERBS_DROPLIST);
+ if ((cond == 3) && qs.hasQuestItems(ENCHSPEAR) && !qs.hasQuestItems(STAGE2) && (Rnd.get(100) < 25))
+ {
+ qs.giveItems(STAGE2, 1);
+ qs.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
+ }
+
+ // Spawns Mage Type silenos behind the one that was killed.
+ spawnMageBehind(npc, player, VARKA_SILENOS_GREAT_SEER);
+
+ // Check if all the first row have been killed. Despawn mages.
+ checkIfLastInWall(npc);
+ break;
+ case LATANA:
+ qs.set("cond", "4");
+ qs.playSound(QuestSound.ITEMSOUND_QUEST_MIDDLE);
+
+ // Spawns Ketra Orc Supporter.
+ addSpawn(KETRA_ORC_SUPPORTER2, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, false, npc.getInstanceId());
+ break;
+ case ANTYLOPE_1:
+ case ANTYLOPE_2:
+ case ANTYLOPE_3:
+ case FLAVA:
+ dropItem(npc, player);
+ break;
+ default:
+ // hardcoded herb drops.
+ dropHerb(npc, player, HP_HERBS_DROPLIST);
+ dropHerb(npc, player, MP_HERBS_DROPLIST);
+ break;
+ }
+ return super.onKill(npc, player, isSummon);
+ }
+
+ @Override
+ public String onSpawn(L2Npc npc)
+ {
+ if (npc instanceof L2MonsterInstance)
+ {
+ for (int mobId : WALL_MONSTERS)
+ {
+ // Every monster on pailaka should be Aggresive and Active, with the same clan, also wall mobs cannot move, they all use magic from far, and if you get in combat range they hit.
+ if (mobId == npc.getId())
+ {
+ final L2MonsterInstance monster = (L2MonsterInstance) npc;
+ monster.setIsImmobilized(true);
+ break;
+ }
+ }
+ }
+ return super.onSpawn(npc);
+ }
+
+ @Override
+ public String onEnterZone(L2Character character, L2ZoneType zone)
+ {
+ if ((character instanceof L2PcInstance) && !character.isDead() && !character.isTeleporting() && ((L2PcInstance) character).isOnline())
+ {
+ InstanceWorld world = InstanceManager.getInstance().getWorld(character.getInstanceId());
+ if ((world != null) && (world.getTemplateId() == INSTANCE_ID))
+ {
+ // If a player wants to go by a mob wall without kill it, he will be returned back to a spawn point.
+ final int[] zoneTeleport = NOEXIT_ZONES.get(zone.getId());
+ if (zoneTeleport != null)
+ {
+ final Collection knowns = character.getKnownList().getKnownCharactersInRadius(700);
+ for (L2Character npcs : knowns)
+ {
+ if (!(npcs instanceof L2Npc))
+ {
+ continue;
+ }
+
+ if (npcs.isDead())
+ {
+ continue;
+ }
+
+ teleportPlayer(character.getActingPlayer(), zoneTeleport, world.getInstanceId());
+ break;
+ }
+ }
+ }
+ }
+ return super.onEnterZone(character, zone);
+ }
+
+ // Spawns Mage Type silenos behind the one that was killed. Aggro against the player that kill the mob.
+ private final void spawnMageBehind(L2Npc npc, L2PcInstance player, int mageId)
+ {
+ final double rads = Math.toRadians(Util.convertHeadingToDegree(npc.getSpawn().getHeading()) + 180);
+ final int mageX = (int) (npc.getX() + (150 * Math.cos(rads)));
+ final int mageY = (int) (npc.getY() + (150 * Math.sin(rads)));
+ final L2Npc mageBack = addSpawn(mageId, mageX, mageY, npc.getZ(), npc.getSpawn().getHeading(), false, 0, true, npc.getInstanceId());
+ mageBack.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, player, 1000);
+ }
+
+ // This function will check if there is other mob alive in this wall of mobs. If all mobs in the first row are dead then despawn the second row mobs, the mages.
+ private final void checkIfLastInWall(L2Npc npc)
+ {
+ final Collection knowns = npc.getKnownList().getKnownCharactersInRadius(700);
+ for (L2Character npcs : knowns)
+ {
+ if (!(npcs instanceof L2Npc))
+ {
+ continue;
+ }
+
+ if (npcs.isDead())
+ {
+ continue;
+ }
+
+ final L2Npc knownNpc = (L2Npc) npcs;
+
+ switch (npc.getId())
+ {
+ case VARKA_SILENOS_FOOTMAN:
+ case VARKA_SILENOS_RECRUIT:
+ case VARKA_SILENOS_WARRIOR:
+ switch (knownNpc.getId())
+ {
+ case VARKA_SILENOS_FOOTMAN:
+ case VARKA_SILENOS_RECRUIT:
+ case VARKA_SILENOS_WARRIOR:
+ return;
+ }
+ break;
+ case VARKA_ELITE_GUARD:
+ case VARKAS_COMMANDER:
+ case VARKA_SILENOS_OFFICER:
+ switch (knownNpc.getId())
+ {
+ case VARKA_ELITE_GUARD:
+ case VARKAS_COMMANDER:
+ case VARKA_SILENOS_OFFICER:
+ return;
+ }
+ break;
+ case VARKA_SILENOS_GREAT_MAGUS:
+ case VARKA_SILENOS_GENERAL:
+ case VARKAS_PROPHET:
+ switch (knownNpc.getId())
+ {
+ case VARKA_SILENOS_GREAT_MAGUS:
+ case VARKA_SILENOS_GENERAL:
+ case VARKAS_PROPHET:
+ return;
+ }
+ break;
+ case VARKA_SILENOS_HEAD_GUARD:
+ case PROPHET_GUARD:
+ switch (knownNpc.getId())
+ {
+ case VARKA_SILENOS_HEAD_GUARD:
+ case PROPHET_GUARD:
+ return;
+ }
+ break;
+ }
+ }
+
+ // We didnt find any mob on the first row alive, so despawn the second row mobs.
+ for (L2Character npcs : knowns)
+ {
+ if (!(npcs instanceof L2Npc))
+ {
+ continue;
+ }
+
+ if (npcs.isDead())
+ {
+ continue;
+ }
+
+ final L2Npc knownNpc = (L2Npc) npcs;
+
+ switch (npc.getId())
+ {
+ case VARKA_SILENOS_FOOTMAN:
+ case VARKA_SILENOS_RECRUIT:
+ case VARKA_SILENOS_WARRIOR:
+ switch (knownNpc.getId())
+ {
+ case VARKA_SILENOS_MEDIUM:
+ case VARKA_SILENOS_PRIEST:
+ knownNpc.abortCast();
+ knownNpc.deleteMe();
+ break;
+ }
+ break;
+ case VARKA_ELITE_GUARD:
+ case VARKAS_COMMANDER:
+ case VARKA_SILENOS_OFFICER:
+ switch (knownNpc.getId())
+ {
+ case VARKA_SILENOS_SHAMAN:
+ case VARKA_SILENOS_SEER:
+ knownNpc.abortCast();
+ knownNpc.deleteMe();
+ break;
+ }
+ break;
+ case VARKA_SILENOS_GREAT_MAGUS:
+ case VARKA_SILENOS_GENERAL:
+ case VARKAS_PROPHET:
+ switch (knownNpc.getId())
+ {
+ case VARKA_SILENOS_MAGNUS:
+ case DISCIPLE_OF_PROPHET:
+ knownNpc.abortCast();
+ knownNpc.deleteMe();
+ break;
+ }
+ break;
+ case VARKA_SILENOS_HEAD_GUARD:
+ case PROPHET_GUARD:
+ switch (knownNpc.getId())
+ {
+ case VARKA_HEAD_MAGUS:
+ case VARKA_SILENOS_GREAT_SEER:
+ knownNpc.abortCast();
+ knownNpc.deleteMe();
+ break;
+ }
+ break;
+ }
+ }
+ }
+
+ static final class Teleport implements Runnable
+ {
+ private final L2Character _char;
+ private final int _instanceId;
+
+ public Teleport(L2Character c, int id)
+ {
+ _char = c;
+ _instanceId = id;
+ }
+
+ @Override
+ public void run()
+ {
+ try
+ {
+ teleportPlayer((L2PcInstance) _char, TELEPORT, _instanceId);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ private static class PailakaDrop
+ {
+ private final int _itemId;
+ private final int _chance;
+
+ public PailakaDrop(int itemId, int chance)
+ {
+ _itemId = itemId;
+ _chance = chance;
+ }
+
+ public int getItemID()
+ {
+ return _itemId;
+ }
+
+ public int getChance()
+ {
+ return _chance;
+ }
+ }
+
+ private static final void dropHerb(L2Npc mob, L2PcInstance player, int[][] drop)
+ {
+ final int chance = Rnd.get(100);
+ for (int[] element : drop)
+ {
+ if (chance < element[2])
+ {
+ ((L2MonsterInstance) mob).dropItem(player, element[0], element[1]);
+ return;
+ }
+ }
+ }
+
+ private static final void dropItem(L2Npc mob, L2PcInstance player)
+ {
+ // To make random drops, we shuffle the droplist every time its used.
+ Collections.shuffle(DROPLIST);
+ for (PailakaDrop pd : DROPLIST)
+ {
+ if (Rnd.get(100) < pd.getChance())
+ {
+ ((L2MonsterInstance) mob).dropItem(player, pd.getItemID(), Rnd.get(1, 6));
+ return;
+ }
+ }
+ }
+
+ private static void giveBuff(L2Npc npc, L2PcInstance player, int skillId, int level)
+ {
+ npc.setTarget(player);
+ npc.doCast(SkillData.getInstance().getSkill(skillId, level));
+ buff_counter--;
+ return;
+ }
+
+ protected static final void teleportPlayer(L2PcInstance player, int[] coords, int instanceId)
+ {
+ player.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
+ player.setInstanceId(instanceId);
+ player.teleToLocation(coords[0], coords[1], coords[2], true);
+ }
+
+ private final synchronized void enterInstance(L2PcInstance player)
+ {
+ // Check for existing instances for this player.
+ InstanceWorld world = InstanceManager.getInstance().getPlayerWorld(player);
+ if (world != null)
+ {
+ if (world.getTemplateId() != INSTANCE_ID)
+ {
+ player.sendPacket(SystemMessageId.YOU_HAVE_ENTERED_ANOTHER_INSTANT_ZONE_THEREFORE_YOU_CANNOT_ENTER_CORRESPONDING_DUNGEON);
+ return;
+ }
+ Instance inst = InstanceManager.getInstance().getInstance(world.getInstanceId());
+ if (inst != null)
+ {
+ // Check max summon levels.
+ checkMaxSummonLevel(player);
+
+ teleportPlayer(player, TELEPORT, world.getInstanceId());
+ }
+ }
+ // New instance.
+ else
+ {
+ final int instanceId = InstanceManager.getInstance().createDynamicInstance("PailakaInjuredDragon.xml");
+
+ world = new InstanceWorld();
+ world.setInstanceId(instanceId);
+ world.setTemplateId(INSTANCE_ID);
+ InstanceManager.getInstance().addWorld(world);
+
+ // Check max summon levels.
+ checkMaxSummonLevel(player);
+
+ world.addAllowed(player.getObjectId());
+ teleportPlayer(player, TELEPORT, instanceId);
+ }
+ }
+
+ // Checks if the summon or pet that the player has can be used.
+ private final void checkMaxSummonLevel(L2PcInstance player)
+ {
+ final L2Summon pet = player.getSummon();
+ if (pet instanceof L2PetInstance)
+ {
+ if (pet.getLevel() > MAX_SUMMON_LEVEL)
+ {
+ pet.unSummon(player);
+ }
+ }
+ }
+}
diff --git a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java
index c8e2379f6e..b4b1fd562c 100644
--- a/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java
+++ b/trunk/dist/game/data/scripts/quests/QuestMasterHandler.java
@@ -82,6 +82,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.Q00147_PathtoBecominganEliteMercenary.Q00147_PathtoBecominganEliteMercenary;
import quests.Q00148_PathtoBecominganExaltedMercenary.Q00148_PathtoBecominganExaltedMercenary;
@@ -370,6 +371,7 @@ public class QuestMasterHandler
Q00141_ShadowFoxPart3.class,
Q00142_FallenAngelRequestOfDawn.class,
Q00143_FallenAngelRequestOfDusk.class,
+ Q00144_PailakaInjuredDragon.class,
Q00146_TheZeroHour.class,
Q00147_PathtoBecominganEliteMercenary.class,
Q00148_PathtoBecominganExaltedMercenary.class,
diff --git a/trunk/dist/game/data/stats/npcs/18600-18700.xml b/trunk/dist/game/data/stats/npcs/18600-18700.xml
index 958addc560..10c3065e69 100644
--- a/trunk/dist/game/data/stats/npcs/18600-18700.xml
+++ b/trunk/dist/game/data/stats/npcs/18600-18700.xml
@@ -3631,8 +3631,8 @@
-
-
+
+
diff --git a/trunk/dist/game/data/zones/custom_script.xml b/trunk/dist/game/data/zones/custom_script.xml
index 3ed0edaa02..a85fab10a3 100644
--- a/trunk/dist/game/data/zones/custom_script.xml
+++ b/trunk/dist/game/data/zones/custom_script.xml
@@ -240,4 +240,61 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file