Addition of Ketra and Varka quests.
Thanks to veriongt.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Greetings, stranger! Are you a mercenary? Excellent! Will you fight for the Ketra Orcs?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-04.htm">"I'll do it!"</Button>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Do you actually think a weakling like you can stand up to the mighty Ketra Orcs? Ha! I can't believe you've lasted this long! Scram, pencilneck!<br>
|
||||
(Only a character of level 74 or above may undertake this quest.)
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
You're nothing but a filthy maggot! A dog of the Varka Silenos! Did you enjoy licking their vile boots?! Get out of my sight! You sicken me!
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Well, I suppose I'll give you a chance... If you can gain my trust, the Ketras will trust you as well. Your test is simple. Annihilate those filthy Varka Silenos! Kill as many as you can! As proof, bring back <font color="LEVEL">100 badges of Varka Soldiers</font>.<br>
|
||||
Get the badges by slaying Varka Silenos <font color="LEVEL">Recruits, Footmen, Scouts, Hunters and Shamans</font>. This will build trust with our tribe.<br>
|
||||
Now get going!
|
||||
</body></html>
|
@@ -0,0 +1,7 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
There are several phases of friendship:<br>
|
||||
Fight bravely for the Ketra, and the Ketra will take care of you.<br>
|
||||
You must kill not only the henchmen but also the commander to win the war against the Varka Silenos Village. Kill every goatee you can find! Keep killing them! The war isn't over until all the filthy Varka are wiped off the earth!<br>
|
||||
I will give more confidence and trust to those who bring the insignia of the Wahkan Varka Rank - 200 soldiers with the insignia of the Varka Rank - 100 Non-Commissioned Officers. The insignia of the Varka Rank - Non-Commissioned Officer can be obtained when you kill <font color="LEVEL">the Priest of Varka Silenos, a Warrior, a Spiritual Medium, a Non-Commissioned Officer, a Chief Officiating Priest, a Commander of an Army Corps and an Elite Military Escort</font>. Go forward, friends of Ketra!<br>
|
||||
<font color="LEVEL">Remember not to lay a finger on our Ketra Orc tribe! This would destroy our alliance!</font>
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
You're the best friend the Ketra ever had! The more you fight for the Ketra, the more we will trust you.<br>
|
||||
Our war against the Varka Orcs continues. We must drive those revolting goat beards from the face of the earth! Kill <font color="LEVEL">Varka Silenos great mystics, captains, grand seers, prophets, prophet's disciples, prophet's royal guards, chief magi and chief escorts</font>. Kill them all and take their badges as proof.<br>
|
||||
Bring back <font color="LEVEL">300 badges of grunts, 200 badges of officers and 100 badges of captains</font>. Good luck, my friend!<br>
|
||||
<font color="LEVEL">However, if you laid a hand on our Ketra Orcs in the middle, our confidence in you will fade away and our alliance with you will be destroyed!!</font>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Ha ha ha! I'll bet those filthy goat beards peed all over themselves! Such is the pleasure of an overwhelming victory! Our job isn't finished yet, however. This war won't be over until every single Varka lies dead!<br>
|
||||
Your excellent reputation is spreading like wildfire among the Ketras! However, it is said that there are several steps in friendship. You're now in the middle. If you want to raise our esteem for you even further, attack the Varka Silenos again and bring us <font color="LEVEL">300 badges of grunts, 300 badges of officers, 200 badges of captains and a Totem of Valor</font>. You are fully qualified. Show your real power. The stronger someone is, the more he will be loved by Ketras! You can get the totem by successfully finishing the <font color="LEVEL">Prove Your Courage!</font> quest assigned by Hierarch Kadun Zu Ketra.<br>
|
||||
<font color="LEVEL">However, if you laid a hand on our Ketra Orcs in the middle, our confidence in you will fade away and our alliance with you will be destroyed!!</font>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
This mission will earn you the Ketra's highest level of trust. This task will not be very difficult for the strong one like you. You must kill the Varka Silenos and bring us <font color="LEVEL">400 badges of grunts, 400 badges of officers and 200 badges of captains</font> as well as the <font color="LEVEL">Totem of Wisdom</font>. The Totem of Wisdom can be obtained by killing Mos, the commander of the Varkas, longtime scourge of the Ketras. However, you must speak with <font color="LEVEL">Hierarch Kadun Zu Ketra</font> for more details on the quest, known as <font color="LEVEL">Slay the Enemy Commander</font> before killing Mos! Go ahead! I have no doubt that you will prevail!<br>
|
||||
<font color="LEVEL">However, if you laid a hand on our Ketra Orcs in the middle, our confidence in you will fade away and our alliance with you will be destroyed!!</font>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Ha! Hello, friend! What can the Ketras do for you today? You are truly our dearest friend!<br>
|
||||
But don't forget, Ketras live in the moment, and our memories are short... Once a friend leaves us, it is as if they were never here. What's past is past.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-25.html">"I want to quit."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Yo, stranger! Will you join our struggle against the filthy Varka Silenos? I, for one, can't wait to taste their blood! Quickly, go to the battlefield and kill Varka Silenos! As proof, bring back <font color="LEVEL">100 badges of grunts</font>! Then you shall surely become a friend of the Ketra Orcs.
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Have you brought the badges of the goat beards? How many did you kill?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-12.html">"Here are the badges."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
You've formed a friendship with the Ketra forged in blood and fire! Take this <font color="LEVEL">Mark of Ketra's Alliance - Level 1</font>. We only award them to those we consider our true friends. Congratulations!
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
We'll reward our true friends. Help us in battle!
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Fellow Ketra soldier, we value your friendship!
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Have you massacred the Varka Silenos yet? Remember, you promised to bring back <font color="LEVEL">200 badges of grunts and 100 badges of officers</font> as proof!<br>
|
||||
We treat our friends very well, you're not thinking about changing your mind, are you?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-12a.html">"I'll vanquish the enemy!"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-25.html">"I want to quit."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Friend, how did you repay us for the trust we've shown you? Where's the proof?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-15.html">"Here are the badges."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Good job, friend! We thank you for your strong friendship. Please accept this <font color="LEVEL">Mark of Ketra's Alliance - Level 2</font>. Warehouse Keeper Jaff will let you use the warehouse now! Congratulations!
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Where are the <font color="LEVEL">300 badges of grunts, 200 badges of officers and 100 badges of captains</font> you promised to bring back from the Varka Silenos? Surely this isn't too hard for you?! Do you want to back out of our agreement?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-12a.html">"I'll destroy the enemy!"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-25.html">"I want to quit."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Friend, show those goat beards the power of Pa'agrio's fire! This fight isn't over until every single Varka Silenos is dead! How many have you killed?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-18.html">"Here are the badges."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Excellent, brave comrade! I won't be satisfied until I've ground the bones of every one of those filthy goat beards into dust! Please accept this <font color="LEVEL">Mark of Ketra's Alliance - Level 3</font>. You're now permitted to obtain specialty items from Trader Jumara and to receive the blessing of Asefa, guide of dead souls! Good job!
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
What are you doing, dear comrade? Please, attack the Varka Silenos and bring us <font color="LEVEL">300 badges of grunts, 300 badges of officers, 200 badges of captains and the Totem of Valor</font>! This totem can be obtained by fulfilling the <font color="LEVEL">Prove your Courage</font> quest, a mission assigned by Hierarch Kadun Zu Ketra. You don't want to quit, do you?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-12a.html">"I'll destroy the enemy!"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-25.html">"I want to quit."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Ha! That's wonderful! Those arrogant Varka Silenos have tasted Orcish Steel! Ha! Keep up the good work!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-21.html">"Here are the badges."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
You're a most noble Warrior, friend of the Ketra! A true hero to our people! Please accept this <font color="LEVEL">Mark of Ketra's Alliance - Level 4</font>! Now Gatekeeper Kurfa will teleport you to nearby villages!<br>
|
||||
There is but one level of trust left for you to attain!
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
The Varka Silenos are doomed, just fight a little longer! You must try harder! Attack them and bring back <font color="LEVEL">400 badges of grunts, 400 badges of officers and 200 badges of captains</font>, as well as a <font color="LEVEL">Totem of Wisdom</font>. The Totem of Wisdom can be obtained by fulfilling the <font color="LEVEL">Slay the Enemy Commander</font> quest, a mission assigned by <font color="LEVEL">Hierarch Kadun Zu Ketra</font>. We have faith in you!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-12a.html">"I'll destroy the enemy!"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-25.html">"I want to quit."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
Excellent work! Please accept this <font color="LEVEL">Mark of Ketra's Alliance - Level 5</font>! This is the highest honor of trust that we Ketra bestow! You are now allowed to purchase specialty items and teleport directly to the nearest battlefield with the assistance of Gatekeeper Kurfa. Congratulations!
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
You're the best friend the Ketra ever had! There is no higher honor we can bestow upon you! What are you thinking, my friend?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-12b.html">"I'll keep my friendship with the Ketra!"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-25.html">"I quit."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
How can you leave us like this?! Don't be a fool! You would sever our relationship, after all we've been through?! Are you a fool? Think carefully, my friend! Such decisions are irreversible!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00605_AllianceWithKetraOrcs 31371-26.html">"I truly quit."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Ketra's Messenger Wahkan:<br>
|
||||
You are no longer our friend! Get out of my sight!
|
||||
</body></html>
|
@@ -0,0 +1,366 @@
|
||||
/*
|
||||
* 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.Q00605_AllianceWithKetraOrcs;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* Alliance with Ketra Orcs (605)
|
||||
* @author malyelfik
|
||||
*/
|
||||
public class Q00605_AllianceWithKetraOrcs extends Quest
|
||||
{
|
||||
private static class DropInfo
|
||||
{
|
||||
private final int _chance;
|
||||
private final int _minCond;
|
||||
private final int _itemId;
|
||||
|
||||
public DropInfo(int chance, int minCond)
|
||||
{
|
||||
_chance = chance;
|
||||
_minCond = minCond;
|
||||
switch (_minCond)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
_itemId = VARKA_BADGE_SOLDIER;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
_itemId = VARKA_BADGE_OFFICER;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
_itemId = VARKA_BADGE_CAPTAIN;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int getMinCond()
|
||||
{
|
||||
return _minCond;
|
||||
}
|
||||
|
||||
public int getChance()
|
||||
{
|
||||
return _chance;
|
||||
}
|
||||
|
||||
public int getItemId()
|
||||
{
|
||||
return _itemId;
|
||||
}
|
||||
}
|
||||
|
||||
// NPC
|
||||
private static final int WAHKAN = 31371;
|
||||
// Monsters
|
||||
private static final Map<Integer, DropInfo> MOBS = new HashMap<>();
|
||||
static
|
||||
{
|
||||
MOBS.put(21350, new DropInfo(500, 1)); // Varka Silenos Recruit
|
||||
MOBS.put(21351, new DropInfo(500, 1)); // Varka Silenos Footman
|
||||
MOBS.put(21353, new DropInfo(509, 1)); // Varka Silenos Scout
|
||||
MOBS.put(21354, new DropInfo(521, 1)); // Varka Silenos Hunter
|
||||
MOBS.put(21355, new DropInfo(519, 1)); // Varka Silenos Shaman
|
||||
MOBS.put(21357, new DropInfo(500, 2)); // Varka Silenos Priest
|
||||
MOBS.put(21358, new DropInfo(500, 2)); // Varka Silenos Warrior
|
||||
MOBS.put(21360, new DropInfo(509, 2)); // Varka Silenos Medium
|
||||
MOBS.put(21361, new DropInfo(518, 2)); // Varka Silenos Magus
|
||||
MOBS.put(21362, new DropInfo(518, 2)); // Varka Silenos Officer
|
||||
MOBS.put(21364, new DropInfo(527, 2)); // Varka Silenos Seer
|
||||
MOBS.put(21365, new DropInfo(500, 3)); // Varka Silenos Great Magus
|
||||
MOBS.put(21366, new DropInfo(500, 3)); // Varka Silenos General
|
||||
MOBS.put(21368, new DropInfo(508, 3)); // Varka Silenos Great Seer
|
||||
MOBS.put(21369, new DropInfo(628, 2)); // Varka's Commander
|
||||
MOBS.put(21370, new DropInfo(604, 2)); // Varka's Elite Guard
|
||||
MOBS.put(21371, new DropInfo(627, 3)); // Varka's Head Magus
|
||||
MOBS.put(21372, new DropInfo(604, 3)); // Varka's Head Guard
|
||||
MOBS.put(21373, new DropInfo(649, 3)); // Varka's Prophet
|
||||
MOBS.put(21374, new DropInfo(626, 3)); // Prophet's Guard
|
||||
MOBS.put(21375, new DropInfo(626, 3)); // Disciple of Prophet
|
||||
}
|
||||
// Items
|
||||
private static final int VARKA_BADGE_SOLDIER = 7216;
|
||||
private static final int VARKA_BADGE_OFFICER = 7217;
|
||||
private static final int VARKA_BADGE_CAPTAIN = 7218;
|
||||
private static final int VALOR_TOTEM = 7219;
|
||||
private static final int WISDOM_TOTEM = 7220;
|
||||
private static final int[] KETRA_MARKS =
|
||||
{
|
||||
7211, // Mark of Ketra's Alliance - Level 1
|
||||
7212, // Mark of Ketra's Alliance - Level 2
|
||||
7213, // Mark of Ketra's Alliance - Level 3
|
||||
7214, // Mark of Ketra's Alliance - Level 4
|
||||
7215, // Mark of Ketra's Alliance - Level 5
|
||||
};
|
||||
private static final int[] VARKA_MARKS =
|
||||
{
|
||||
7221, // Mark of Varka's Alliance - Level 1
|
||||
7222, // Mark of Varka's Alliance - Level 2
|
||||
7223, // Mark of Varka's Alliance - Level 3
|
||||
7224, // Mark of Varka's Alliance - Level 4
|
||||
7225, // Mark of Varka's Alliance - Level 5
|
||||
};
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 74;
|
||||
private static final int[] SOLDIER_BADGE_COUNT =
|
||||
{
|
||||
100, // cond 1
|
||||
200, // cond 2
|
||||
300, // cond 3
|
||||
300, // cond 4
|
||||
400, // cond 5
|
||||
};
|
||||
private static final int[] OFFICER_BADGE_COUNT =
|
||||
{
|
||||
0, // cond 1
|
||||
100, // cond 2
|
||||
200, // cond 3
|
||||
300, // cond 4
|
||||
400, // cond 5
|
||||
};
|
||||
private static final int[] CAPTAIN_BADGE_COUNT =
|
||||
{
|
||||
0, // cond 1
|
||||
0, // cond 2
|
||||
100, // cond 3
|
||||
200, // cond 4
|
||||
200, // cond 5
|
||||
};
|
||||
|
||||
public Q00605_AllianceWithKetraOrcs()
|
||||
{
|
||||
super(605);
|
||||
addStartNpc(WAHKAN);
|
||||
addTalkId(WAHKAN);
|
||||
addKillId(MOBS.keySet());
|
||||
registerQuestItems(VARKA_BADGE_SOLDIER, VARKA_BADGE_OFFICER, VARKA_BADGE_CAPTAIN);
|
||||
}
|
||||
|
||||
private boolean canGetItem(QuestState qs, int itemId)
|
||||
{
|
||||
int count = 0;
|
||||
switch (itemId)
|
||||
{
|
||||
case VARKA_BADGE_SOLDIER:
|
||||
{
|
||||
count = SOLDIER_BADGE_COUNT[qs.getCond() - 1];
|
||||
break;
|
||||
}
|
||||
case VARKA_BADGE_OFFICER:
|
||||
{
|
||||
count = OFFICER_BADGE_COUNT[qs.getCond() - 1];
|
||||
break;
|
||||
}
|
||||
case VARKA_BADGE_CAPTAIN:
|
||||
{
|
||||
count = CAPTAIN_BADGE_COUNT[qs.getCond() - 1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return getQuestItemsCount(qs.getPlayer(), itemId) < count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = event;
|
||||
switch (event)
|
||||
{
|
||||
case "31371-12a.html":
|
||||
case "31371-12b.html":
|
||||
case "31371-25.html":
|
||||
{
|
||||
break;
|
||||
}
|
||||
case "31371-04.htm":
|
||||
{
|
||||
if (hasAtLeastOneQuestItem(player, VARKA_MARKS))
|
||||
{
|
||||
return "31371-03.htm";
|
||||
}
|
||||
qs.setState(State.STARTED);
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ACCEPT);
|
||||
for (int i = 0; i < KETRA_MARKS.length; i++)
|
||||
{
|
||||
if (hasQuestItems(player, KETRA_MARKS[i]))
|
||||
{
|
||||
qs.setCond(i + 2);
|
||||
return "31371-0" + (i + 5) + ".htm";
|
||||
}
|
||||
}
|
||||
qs.setCond(1);
|
||||
break;
|
||||
}
|
||||
case "31371-12.html":
|
||||
{
|
||||
if (getQuestItemsCount(player, VARKA_BADGE_SOLDIER) < SOLDIER_BADGE_COUNT[0])
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
takeItems(player, VARKA_BADGE_SOLDIER, -1);
|
||||
giveItems(player, KETRA_MARKS[0], 1);
|
||||
qs.setCond(2, true);
|
||||
break;
|
||||
}
|
||||
case "31371-15.html":
|
||||
{
|
||||
if ((getQuestItemsCount(player, VARKA_BADGE_SOLDIER) < SOLDIER_BADGE_COUNT[1]) || (getQuestItemsCount(player, VARKA_BADGE_OFFICER) < OFFICER_BADGE_COUNT[1]))
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
takeItems(player, -1, VARKA_BADGE_SOLDIER, VARKA_BADGE_OFFICER, KETRA_MARKS[0]);
|
||||
giveItems(player, KETRA_MARKS[1], 1);
|
||||
qs.setCond(3, true);
|
||||
break;
|
||||
}
|
||||
case "31371-18.html":
|
||||
{
|
||||
if ((getQuestItemsCount(player, VARKA_BADGE_SOLDIER) < SOLDIER_BADGE_COUNT[2]) || (getQuestItemsCount(player, VARKA_BADGE_OFFICER) < OFFICER_BADGE_COUNT[2]) || (getQuestItemsCount(player, VARKA_BADGE_CAPTAIN) < CAPTAIN_BADGE_COUNT[2]))
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
takeItems(player, -1, VARKA_BADGE_SOLDIER, VARKA_BADGE_OFFICER, VARKA_BADGE_CAPTAIN, KETRA_MARKS[1]);
|
||||
giveItems(player, KETRA_MARKS[2], 1);
|
||||
qs.setCond(4, true);
|
||||
break;
|
||||
}
|
||||
case "31371-21.html":
|
||||
{
|
||||
if (!hasQuestItems(player, VALOR_TOTEM) || (getQuestItemsCount(player, VARKA_BADGE_SOLDIER) < SOLDIER_BADGE_COUNT[3]) || (getQuestItemsCount(player, VARKA_BADGE_OFFICER) < OFFICER_BADGE_COUNT[3]) || (getQuestItemsCount(player, VARKA_BADGE_CAPTAIN) < CAPTAIN_BADGE_COUNT[3]))
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
takeItems(player, -1, VARKA_BADGE_SOLDIER, VARKA_BADGE_OFFICER, VARKA_BADGE_CAPTAIN, VALOR_TOTEM, KETRA_MARKS[2]);
|
||||
giveItems(player, KETRA_MARKS[3], 1);
|
||||
qs.setCond(5, true);
|
||||
break;
|
||||
}
|
||||
case "31371-26.html":
|
||||
{
|
||||
takeItems(player, -1, KETRA_MARKS);
|
||||
takeItems(player, -1, VALOR_TOTEM, WISDOM_TOTEM);
|
||||
qs.exitQuest(true, true);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
htmltext = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(Npc npc, Player killer, boolean isSummon)
|
||||
{
|
||||
final Player member = getRandomPartyMemberState(killer, State.STARTED);
|
||||
if (member != null)
|
||||
{
|
||||
final QuestState qs = getQuestState(member, false);
|
||||
final DropInfo info = MOBS.get(npc.getId());
|
||||
if ((qs.getCond() >= info.getMinCond()) && (qs.getCond() < 6) && canGetItem(qs, info.getItemId()) && (getRandom(1000) < info.getChance()))
|
||||
{
|
||||
giveItems(member, info.getItemId(), 1);
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(Npc npc, Player player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() >= MIN_LEVEL) ? "31371-01.htm" : "31371-02.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (qs.getCond())
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
htmltext = (getQuestItemsCount(player, VARKA_BADGE_SOLDIER) >= SOLDIER_BADGE_COUNT[0]) ? "31371-11.html" : "31371-10.html";
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
htmltext = (hasQuestItems(player, KETRA_MARKS[0]) && (getQuestItemsCount(player, VARKA_BADGE_SOLDIER) >= SOLDIER_BADGE_COUNT[1]) && (getQuestItemsCount(player, VARKA_BADGE_OFFICER) >= OFFICER_BADGE_COUNT[1])) ? "31371-14.html" : "31371-13.html";
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
htmltext = (hasQuestItems(player, KETRA_MARKS[1]) && (getQuestItemsCount(player, VARKA_BADGE_SOLDIER) >= SOLDIER_BADGE_COUNT[2]) && (getQuestItemsCount(player, VARKA_BADGE_OFFICER) >= OFFICER_BADGE_COUNT[2]) && (getQuestItemsCount(player, VARKA_BADGE_CAPTAIN) >= CAPTAIN_BADGE_COUNT[2])) ? "31371-17.html" : "31371-16.html";
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
htmltext = (hasQuestItems(player, KETRA_MARKS[2], VALOR_TOTEM) && (getQuestItemsCount(player, VARKA_BADGE_SOLDIER) >= SOLDIER_BADGE_COUNT[3]) && (getQuestItemsCount(player, VARKA_BADGE_OFFICER) >= OFFICER_BADGE_COUNT[3]) && (getQuestItemsCount(player, VARKA_BADGE_CAPTAIN) >= CAPTAIN_BADGE_COUNT[3])) ? "31371-20.html" : "31371-19.html";
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
if (!hasQuestItems(player, KETRA_MARKS[3]) || !hasQuestItems(player, WISDOM_TOTEM) || (getQuestItemsCount(player, VARKA_BADGE_SOLDIER) < SOLDIER_BADGE_COUNT[4]) || (getQuestItemsCount(player, VARKA_BADGE_OFFICER) < OFFICER_BADGE_COUNT[4]) || (getQuestItemsCount(player, VARKA_BADGE_CAPTAIN) < CAPTAIN_BADGE_COUNT[4]))
|
||||
{
|
||||
return "31371-22.html";
|
||||
}
|
||||
qs.setCond(6, true);
|
||||
takeItems(player, -1, VARKA_BADGE_SOLDIER, VARKA_BADGE_OFFICER, VARKA_BADGE_CAPTAIN, WISDOM_TOTEM, KETRA_MARKS[3]);
|
||||
giveItems(player, KETRA_MARKS[4], 1);
|
||||
htmltext = "31371-23.html";
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
if (hasQuestItems(player, KETRA_MARKS[4]))
|
||||
{
|
||||
htmltext = "31371-24.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Kadun Zu Ketra:<br>
|
||||
We must destroy the Varka Silenos, our ancient rivals! Who will join our cause?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00606_BattleAgainstVarkaSilenos 31370-03.htm">"I'll fight the Varka Silenos."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Kadun Zu Ketra:<br>
|
||||
Your courage is admirable, but your abilities are lacking! Come back when you've developed your skills a bit more.<br>
|
||||
(This quest may only be undertaken by a character of level 74 or above.)
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Kadun Zu Ketra:<br>
|
||||
Attack the garrison of the Varka Silenos and kill as many of them as possible! Cut off their Shillien Manes and bring them back as proof of your valor! Bring back 100 of them and I'll give you a reward! Tejakar Ketra!
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Kadun Zu Ketra:<br>
|
||||
My colleague, have you slaughtered our enemies, the warriors of Varka Silenos? Did you hear their pitiful cries of defeat?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00606_BattleAgainstVarkaSilenos 31370-06.html">"I will come back after killing more enemies."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00606_BattleAgainstVarkaSilenos 31370-07.html">"I brought 100 manes for a start."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00606_BattleAgainstVarkaSilenos 31370-09.html">"I want to quit."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Kadun Zu Ketra:<br>
|
||||
Wipe out the enemy! Don't let any Varka Silenos survive! Kill them all!
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Kadun Zu Ketra:<br>
|
||||
The fight must go on! Victory is ours!
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Kadun Zu Ketra:<br>
|
||||
Excellent! Today's victory will always be remembered! Oh, brave warrior! You'll be well-rewarded for your valor! At one time, this Buffalo horn was only given to the bravest soldiers of our tribe. It's quite valuable! You could trade it for something you really need!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00606_BattleAgainstVarkaSilenos 31370-06.html">"I want to go back to the battlefield."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00606_BattleAgainstVarkaSilenos 31370-07.html">"I have more manes."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00606_BattleAgainstVarkaSilenos 31370-09.html">"I want to quit."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Kadun Zu Ketra:<br>
|
||||
Didn't I ask for at least 100 Shillien Manes? Return to the battlefield now!
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Kadun Zu Ketra:<br>
|
||||
Even the most invincible warrior should take a break once in a while! You've done well! Come back when you're rested!
|
||||
</body></html>
|
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* 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.Q00606_BattleAgainstVarkaSilenos;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* Battle against Varka Silenos (606)
|
||||
* @author malyelfik
|
||||
*/
|
||||
public class Q00606_BattleAgainstVarkaSilenos extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int KADUN = 31370;
|
||||
// Monsters
|
||||
private static final Map<Integer, Integer> MOBS = new HashMap<>();
|
||||
static
|
||||
{
|
||||
MOBS.put(21350, 500); // Varka Silenos Recruit
|
||||
MOBS.put(21353, 510); // Varka Silenos Scout
|
||||
MOBS.put(21354, 522); // Varka Silenos Hunter
|
||||
MOBS.put(21355, 519); // Varka Silenos Shaman
|
||||
MOBS.put(21357, 529); // Varka Silenos Priest
|
||||
MOBS.put(21358, 529); // Varka Silenos Warrior
|
||||
MOBS.put(21360, 539); // Varka Silenos Medium
|
||||
MOBS.put(21362, 539); // Varka Silenos Officer
|
||||
MOBS.put(21364, 558); // Varka Silenos Seer
|
||||
MOBS.put(21365, 568); // Varka Silenos Great Magus
|
||||
MOBS.put(21366, 568); // Varka Silenos General
|
||||
MOBS.put(21368, 568); // Varka Silenos Great Seer
|
||||
MOBS.put(21369, 664); // Varka's Commander
|
||||
MOBS.put(21371, 713); // Varka's Head Magus
|
||||
MOBS.put(21373, 738); // Varka's Prophet
|
||||
}
|
||||
// Items
|
||||
private static final int HORN = 7186;
|
||||
private static final int MANE = 7233;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 74;
|
||||
private static final int MANE_COUNT = 100;
|
||||
|
||||
public Q00606_BattleAgainstVarkaSilenos()
|
||||
{
|
||||
super(606);
|
||||
addStartNpc(KADUN);
|
||||
addTalkId(KADUN);
|
||||
addKillId(MOBS.keySet());
|
||||
registerQuestItems(MANE);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = event;
|
||||
switch (event)
|
||||
{
|
||||
case "31370-03.htm":
|
||||
{
|
||||
qs.startQuest();
|
||||
break;
|
||||
}
|
||||
case "31370-06.html":
|
||||
{
|
||||
break;
|
||||
}
|
||||
case "31370-07.html":
|
||||
{
|
||||
if (getQuestItemsCount(player, MANE) < MANE_COUNT)
|
||||
{
|
||||
return "31370-08.html";
|
||||
}
|
||||
takeItems(player, MANE, MANE_COUNT);
|
||||
giveItems(player, HORN, 20);
|
||||
break;
|
||||
}
|
||||
case "31370-09.html":
|
||||
{
|
||||
qs.exitQuest(true, true);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
htmltext = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(Npc npc, Player killer, boolean isSummon)
|
||||
{
|
||||
final Player member = getRandomPartyMember(killer, 1);
|
||||
if ((member != null) && (getRandom(1000) < MOBS.get(npc.getId())))
|
||||
{
|
||||
giveItems(member, MANE, 1);
|
||||
playSound(member, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(Npc npc, Player player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() >= MIN_LEVEL) ? "31370-01.htm" : "31370-02.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
htmltext = (hasQuestItems(player, MANE)) ? "31370-04.html" : "31370-05.html";
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
We Varka have shown our strength and tenacity in countless battles and wars, but know that we can't survive alone. Everyone needs friends. We're looking for friends to help us fight! Will you fight alongside the mighty Varka Silenos?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-04.htm">"I'll do it!"</Button>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
We're looking for an exceptionally strong fighter! Why don't you come back when you've developed your skills a bit more?<br>
|
||||
(This quest may only be undertaken by a character of level 74 or above.)
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
You've got some nerve, coming around here after helping our enemy! Have you no shame?
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
You seem pretty sure of yourself, but we can't afford to take in just anybody...<br>
|
||||
If you wish to fight alongside the Varka Silenos, you must drive the Ketra Orcs from their advance base! Destroy the <font color="LEVEL">Ketra Orc footmen, raiders, scouts, shamans and war hounds</font> and bring back <font color="LEVEL">100</font> badges of Ketra grunts, then you will have proven your ability. Show us what you can do!
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Friend of Varka. You've done well, and the trust of Varka will be growing as much as you've showed us. But, if you truly want to take our trust to a higher level, bring us <font color="LEVEL">200 badges of Ketra grunts and 100 badges of Ketra officers</font>. Fighters like you have become essential to our victory!<br>
|
||||
You can get the captain's badge by killing <font color="LEVEL">Ketra Orc Warriors, Lieutenants, Mediums, Elite Soldiers, Commanders, Elite Guards, White Captains, and Seers</font>.<br>
|
||||
<font color="LEVEL">However, if I hear that you've laid a hand on our Varka Silenos in the middle, I will not be able to trust you.</font>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Friend of Varka. You've shown great loyalty to the Varka twice before, dear friend! However, the trust of Varka will be growing as much as you've showed us. If you want to strengthen our alliance even further by becoming a 3rd level ally, bring us <font color="LEVEL">300 badges of Ketra grunts, 200 badges of Ketra officers and 100 badges of Ketra captains</font>.<br>
|
||||
The badges of Ketra captains can be obtained from <font color="LEVEL">Ketra Orc captains, battalion commanders, grand seers, chief shamans, chief royal guards, prophets, Prophet's Guards, and Prophet's Aides</font>.<br>
|
||||
<font color="LEVEL">However, if I hear that you've laid a hand on our Varka Silenos in the middle, I will not be able to trust you.</font>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Dear and faithful friend, your countless victories for the Varka have proven your loyalty to us. However, the trust of Varka will be growing as much as you've showed us. If you wish to strengthen our alliance and become our 4th level ally, bring from the <font color="LEVEL">Ketra 300 badges of grunts, 300 badges of officers, 200 badges of captains and a Feather of Valor</font>.<br>
|
||||
The feather can be obtained by undertaking the <font color="LEVEL">Prove Your Courage</font> quest, a mission assigned by Ashas Varka Durai, the elder of our tribe.<br>
|
||||
<font color="LEVEL">However, if I hear that you've laid a hand on our Varka Silenos in the middle, I will not be able to trust you.</font>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Dear and faithful friend, your countless victories for the Varka have proven your loyalty to us. There is one more mission that remains... If you wish to be our level 5 ally -- our highest honor of trust, obtain<font color="LEVEL">400 badges of Ketra grunts, 400 badges of Ketra officers, 200 badges of Ketra captains and a Feather of Wisdom</font>.<br>
|
||||
The feather can be obtained by undertaking the <font color="LEVEL">Slay the Enemy Commander</font> quest, a mission assigned by Ashas Varka Durai, the elder of our tribe.<br>
|
||||
<font color="LEVEL">However, if I hear that you've laid a hand on our Varka Silenos in the middle, I will not be able to trust you.</font>
|
||||
</body></html>
|
@@ -0,0 +1,5 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Respected friend of the Varka. I no longer have any duties to give you. There is no one among us who is as courageous and faithful as you. The Varka Silenos of the village will give you their greatest service and benefit. Come to the Varka's village without hesitation.<br>
|
||||
But if their treatment does not satisfy you, you may give up the alliance.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-25.html">Give up the alliance with the Varka Silenos. </Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Are you still here? If you want to be a friend of the Varka Silenos, you must go to the advance base of the Ketra Orcs and kill them all! Kill their <font color="LEVEL">footmen, raiders, scouts, shamans and war hounds</font>. Bring back <font color="LEVEL">100 badges of Ketra grunts</font>, then you will have proven your friendship to the Varka.
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
I bet you left a bitter taste in the Ketra Orcs' mouths. What have you brought me?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-12.html">Hand over the Ketra badges.</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
We Varka appreciate your help and friendship. Henceforth, you shall be known as a friend of the Varka! Congratulations! Please accept this Mark of Varka's Alliance - 1st level. It will guarantee you proper treatment in the village shops.
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Friend of the Varka, go destroy our enemies!
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
We value your trust, friend.
|
||||
</body></html>
|
@@ -0,0 +1,8 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
What are you still doing here? Get to the battlefield immediately!<br>
|
||||
You've committed to bring <font color="LEVEL">200 badges of Ketra grunts and 100 badges of Ketra officers</font>.<br>
|
||||
Get the officers' badges from <font color="LEVEL">Ketra Orc Warriors, lieutenants, mediums, elite soldiers, centurions, seers, legionnaire captains, and elite royal guards</font>.<br>
|
||||
If you don't like this job, you're always welcome to quit!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-12a.html">"I'll destroy my enemy!"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-25.html">"I want to quit."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Did those gutless Ketras cry when you beat them? How many did you kill? Where are the proofs?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-15.html">"Here are the badges."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Good job! You've earned this Mark of Varka's Alliance - Level 2. It gives you even more benefits and privileges from the village. If you want to use the warehouse, speak with Warehouse Keeper Hagos.
|
||||
</body></html>
|
@@ -0,0 +1,8 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
What are you still doing here? Get to the battlefield immediately!<br>
|
||||
Remember, you've agreed to bring <font color="LEVEL">300 badges of Ketra grunts, 200 badges of Ketra officers and 100 badges of Ketra captains</font>.<br>
|
||||
You can get the General's Badge by slaying the <font color="LEVEL">Ketra Orc Generals, Battalion Commanders, Grand Seers, Head Shamans, Head Guards, Prophets, Prophet's Guard, and Prophet's Aide</font>.<br>
|
||||
If you don't like your job, you're always welcome to quit!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-12a.html">"I'll destroy my enemy!"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-25.html">"Fine, I quit!"</Button>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Ah, back from your visit with the Ketra Orcs, are you? What was your trophy?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-18.html">Hand over the Ketra badges.</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Were you successful? Congratulations! Take this Mark of Varka's Alliance - Level 3. This will give you even more benefits and privileges in the village. New specialty items are available to you, and you may now receive the blessing of Udan Mardui, guide of dead souls.
|
||||
</body></html>
|
@@ -0,0 +1,7 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
What are you still doing here? Get to the battlefield immediately!<br>
|
||||
You've promised us you'd bring from the <font color="LEVEL">Ketra Orcs 300 badges of grunts, 300 badges of officers, 200 badges of captains and a Feather of Valor</font>. This feather can be obtained by undertaking the <font color="LEVEL">Prove Your Courage</font> quest, a mission assigned by Ashas Varka Durai, the elder of our tribe.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-12a.html">"I will go destroy my enemy!"</Button>
|
||||
If you don't like your job, you're always welcome to quit!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-25.html">"I want to quit."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Well, look who's back. from meeting with the Ketra Orcs. What did you find?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-21.html">Hand over the Ketra badges.</Button>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Congratulations! Please accept this Mark of Varka's Alliance - Level 4. It will give you even more benefits and privileges in the village. Now you can travel to other villages through Gate Keeper Teranu Mardui.<br>
|
||||
Now all that remains is for you to become our closest friend, one with the highest trust we bestow! Will you do it?
|
||||
</body></html>
|
@@ -0,0 +1,7 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
What are you still doing here? Get to the battlefield immediately!<br>
|
||||
You've promised to bring <font color="LEVEL">400 badges of Ketra grunts, 400 badges of Ketra officers, 200 badges of Ketra captains and a Feather of Wisdom</font>. This feather can be obtained by undertaking the <font color="LEVEL">Slay the Enemy Commander</font> quest, a mission assigned by Ashas Varka Durai, the elder of our tribe.<br>
|
||||
Remember, you can always quit!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-12a.html">"I'll destroy my enemy!"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-25.html">"I want to quit."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Congratulations, friend of Varka! Please accept this Mark of Varka's Alliance - Level 5. This entitles you to all the privileges the village can offer! From now on, you can purchase new specialty items and travel to distant hunting grounds through our gatekeeper. We're truly honored to have such a powerful and trustworthy friend as you!
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
You're braver than anyone I've ever seen! All the Varka will do their best to help you. You must visit our village and allow us to demonstrate our gratitude!<br>
|
||||
But don't feel like you need to stay if you're unhappy...<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-12b.html">"I'll keep the promise with the Varka!"</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-25.html">"I want to quit."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Friend of Varka. I, Varka's Messenger Naran Ashanuk, must warn you, friend of Varka! Once you end our alliance, we will become as strangers... as if we never met! Earning our friendship again will mean starting over at the beginning. Are you sure you want to quit?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00611_AllianceWithVarkaSilenos 31378-26.html">"I want to quit."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Varka's Messenger Naran Ashanuk:<br>
|
||||
Oh well, I suppose I was wrong about you! Good-bye, stranger!
|
||||
</body></html>
|
@@ -0,0 +1,366 @@
|
||||
/*
|
||||
* 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.Q00611_AllianceWithVarkaSilenos;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* Alliance with Varka Silenos (611)
|
||||
* @author malyelfik
|
||||
*/
|
||||
public class Q00611_AllianceWithVarkaSilenos extends Quest
|
||||
{
|
||||
private static class DropInfo
|
||||
{
|
||||
private final int _chance;
|
||||
private final int _minCond;
|
||||
private final int _itemId;
|
||||
|
||||
public DropInfo(int chance, int minCond)
|
||||
{
|
||||
_chance = chance;
|
||||
_minCond = minCond;
|
||||
switch (_minCond)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
_itemId = KETRA_BADGE_SOLDIER;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
_itemId = KETRA_BADGE_OFFICER;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
_itemId = KETRA_BADGE_CAPTAIN;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int getMinCond()
|
||||
{
|
||||
return _minCond;
|
||||
}
|
||||
|
||||
public int getChance()
|
||||
{
|
||||
return _chance;
|
||||
}
|
||||
|
||||
public int getItemId()
|
||||
{
|
||||
return _itemId;
|
||||
}
|
||||
}
|
||||
|
||||
// NPC
|
||||
private static final int NARAN_ASHANUK = 31378;
|
||||
// Monsters
|
||||
private static final Map<Integer, DropInfo> MOBS = new HashMap<>();
|
||||
static
|
||||
{
|
||||
MOBS.put(21324, new DropInfo(500, 1)); // Ketra Orc Footman
|
||||
MOBS.put(21325, new DropInfo(500, 1)); // Ketra's War Hound
|
||||
MOBS.put(21327, new DropInfo(509, 1)); // Ketra Orc Raider
|
||||
MOBS.put(21328, new DropInfo(521, 1)); // Ketra Orc Scout
|
||||
MOBS.put(21329, new DropInfo(519, 1)); // Ketra Orc Shaman
|
||||
MOBS.put(21331, new DropInfo(500, 2)); // Ketra Orc Warrior
|
||||
MOBS.put(21332, new DropInfo(500, 2)); // Ketra Orc Lieutenant
|
||||
MOBS.put(21334, new DropInfo(509, 2)); // Ketra Orc Medium
|
||||
MOBS.put(21335, new DropInfo(518, 2)); // Ketra Orc Elite Soldier
|
||||
MOBS.put(21336, new DropInfo(518, 2)); // Ketra Orc White Captain
|
||||
MOBS.put(21338, new DropInfo(527, 2)); // Ketra Orc Seer
|
||||
MOBS.put(21339, new DropInfo(500, 3)); // Ketra Orc General
|
||||
MOBS.put(21340, new DropInfo(500, 3)); // Ketra Orc Battalion Commander
|
||||
MOBS.put(21342, new DropInfo(508, 3)); // Ketra Orc Grand Seer
|
||||
MOBS.put(21343, new DropInfo(628, 2)); // Ketra Commander
|
||||
MOBS.put(21344, new DropInfo(604, 2)); // Ketra Elite Guard
|
||||
MOBS.put(21345, new DropInfo(627, 3)); // Ketra's Head Shaman
|
||||
MOBS.put(21346, new DropInfo(604, 3)); // Ketra's Head Guard
|
||||
MOBS.put(21347, new DropInfo(649, 3)); // Ketra Prophet
|
||||
MOBS.put(21348, new DropInfo(626, 3)); // Prophet's Guard
|
||||
MOBS.put(21349, new DropInfo(626, 3)); // Prophet's Aide
|
||||
}
|
||||
// Items
|
||||
private static final int KETRA_BADGE_SOLDIER = 7226;
|
||||
private static final int KETRA_BADGE_OFFICER = 7227;
|
||||
private static final int KETRA_BADGE_CAPTAIN = 7228;
|
||||
private static final int VALOR_FEATHER = 7229;
|
||||
private static final int WISDOM_FEATHER = 7230;
|
||||
private static final int[] KETRA_MARKS =
|
||||
{
|
||||
7211, // Mark of Ketra's Alliance - Level 1
|
||||
7212, // Mark of Ketra's Alliance - Level 2
|
||||
7213, // Mark of Ketra's Alliance - Level 3
|
||||
7214, // Mark of Ketra's Alliance - Level 4
|
||||
7215, // Mark of Ketra's Alliance - Level 5
|
||||
};
|
||||
private static final int[] VARKA_MARKS =
|
||||
{
|
||||
7221, // Mark of Varka's Alliance - Level 1
|
||||
7222, // Mark of Varka's Alliance - Level 2
|
||||
7223, // Mark of Varka's Alliance - Level 3
|
||||
7224, // Mark of Varka's Alliance - Level 4
|
||||
7225, // Mark of Varka's Alliance - Level 5
|
||||
};
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 74;
|
||||
private static final int[] SOLDIER_BADGE_COUNT =
|
||||
{
|
||||
100, // cond 1
|
||||
200, // cond 2
|
||||
300, // cond 3
|
||||
300, // cond 4
|
||||
400, // cond 5
|
||||
};
|
||||
private static final int[] OFFICER_BADGE_COUNT =
|
||||
{
|
||||
0, // cond 1
|
||||
100, // cond 2
|
||||
200, // cond 3
|
||||
300, // cond 4
|
||||
400, // cond 5
|
||||
};
|
||||
private static final int[] CAPTAIN_BADGE_COUNT =
|
||||
{
|
||||
0, // cond 1
|
||||
0, // cond 2
|
||||
100, // cond 3
|
||||
200, // cond 4
|
||||
200, // cond 5
|
||||
};
|
||||
|
||||
public Q00611_AllianceWithVarkaSilenos()
|
||||
{
|
||||
super(611);
|
||||
addStartNpc(NARAN_ASHANUK);
|
||||
addTalkId(NARAN_ASHANUK);
|
||||
addKillId(MOBS.keySet());
|
||||
registerQuestItems(KETRA_BADGE_CAPTAIN, KETRA_BADGE_OFFICER, KETRA_BADGE_SOLDIER);
|
||||
}
|
||||
|
||||
private boolean canGetItem(QuestState qs, int itemId)
|
||||
{
|
||||
int count = 0;
|
||||
switch (itemId)
|
||||
{
|
||||
case KETRA_BADGE_SOLDIER:
|
||||
{
|
||||
count = SOLDIER_BADGE_COUNT[qs.getCond() - 1];
|
||||
break;
|
||||
}
|
||||
case KETRA_BADGE_OFFICER:
|
||||
{
|
||||
count = OFFICER_BADGE_COUNT[qs.getCond() - 1];
|
||||
break;
|
||||
}
|
||||
case KETRA_BADGE_CAPTAIN:
|
||||
{
|
||||
count = CAPTAIN_BADGE_COUNT[qs.getCond() - 1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return getQuestItemsCount(qs.getPlayer(), itemId) < count;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = event;
|
||||
switch (event)
|
||||
{
|
||||
case "31378-12a.html":
|
||||
case "31378-12b.html":
|
||||
case "31378-25.html":
|
||||
{
|
||||
break;
|
||||
}
|
||||
case "31378-04.htm":
|
||||
{
|
||||
if (hasAtLeastOneQuestItem(player, KETRA_MARKS))
|
||||
{
|
||||
return "31378-03.htm";
|
||||
}
|
||||
qs.setState(State.STARTED);
|
||||
playSound(player, QuestSound.ITEMSOUND_QUEST_ACCEPT);
|
||||
for (int i = 0; i < VARKA_MARKS.length; i++)
|
||||
{
|
||||
if (hasQuestItems(player, VARKA_MARKS[i]))
|
||||
{
|
||||
qs.setCond(i + 2);
|
||||
return "31378-0" + (i + 5) + ".htm";
|
||||
}
|
||||
}
|
||||
qs.setCond(1);
|
||||
break;
|
||||
}
|
||||
case "31378-12.html":
|
||||
{
|
||||
if (getQuestItemsCount(player, KETRA_BADGE_SOLDIER) < SOLDIER_BADGE_COUNT[0])
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
takeItems(player, KETRA_BADGE_SOLDIER, -1);
|
||||
giveItems(player, VARKA_MARKS[0], 1);
|
||||
qs.setCond(2, true);
|
||||
break;
|
||||
}
|
||||
case "31378-15.html":
|
||||
{
|
||||
if ((getQuestItemsCount(player, KETRA_BADGE_SOLDIER) < SOLDIER_BADGE_COUNT[1]) || (getQuestItemsCount(player, KETRA_BADGE_OFFICER) < OFFICER_BADGE_COUNT[1]))
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
takeItems(player, -1, KETRA_BADGE_SOLDIER, KETRA_BADGE_OFFICER, VARKA_MARKS[0]);
|
||||
giveItems(player, VARKA_MARKS[1], 1);
|
||||
qs.setCond(3, true);
|
||||
break;
|
||||
}
|
||||
case "31378-18.html":
|
||||
{
|
||||
if ((getQuestItemsCount(player, KETRA_BADGE_SOLDIER) < SOLDIER_BADGE_COUNT[2]) || (getQuestItemsCount(player, KETRA_BADGE_OFFICER) < OFFICER_BADGE_COUNT[2]) || (getQuestItemsCount(player, KETRA_BADGE_CAPTAIN) < CAPTAIN_BADGE_COUNT[2]))
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
takeItems(player, -1, KETRA_BADGE_SOLDIER, KETRA_BADGE_OFFICER, KETRA_BADGE_CAPTAIN, VARKA_MARKS[1]);
|
||||
giveItems(player, VARKA_MARKS[2], 1);
|
||||
qs.setCond(4, true);
|
||||
break;
|
||||
}
|
||||
case "31378-21.html":
|
||||
{
|
||||
if (!hasQuestItems(player, VALOR_FEATHER) || (getQuestItemsCount(player, KETRA_BADGE_SOLDIER) < SOLDIER_BADGE_COUNT[3]) || (getQuestItemsCount(player, KETRA_BADGE_OFFICER) < OFFICER_BADGE_COUNT[3]) || (getQuestItemsCount(player, KETRA_BADGE_CAPTAIN) < CAPTAIN_BADGE_COUNT[3]))
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
takeItems(player, -1, KETRA_BADGE_SOLDIER, KETRA_BADGE_OFFICER, KETRA_BADGE_CAPTAIN, VALOR_FEATHER, VARKA_MARKS[2]);
|
||||
giveItems(player, VARKA_MARKS[3], 1);
|
||||
qs.setCond(5, true);
|
||||
break;
|
||||
}
|
||||
case "31378-26.html":
|
||||
{
|
||||
takeItems(player, -1, VARKA_MARKS);
|
||||
takeItems(player, -1, VALOR_FEATHER, WISDOM_FEATHER);
|
||||
qs.exitQuest(true, true);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
htmltext = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(Npc npc, Player killer, boolean isSummon)
|
||||
{
|
||||
final Player member = getRandomPartyMemberState(killer, State.STARTED);
|
||||
if (member != null)
|
||||
{
|
||||
final QuestState qs = getQuestState(member, false);
|
||||
final DropInfo info = MOBS.get(npc.getId());
|
||||
if ((qs.getCond() >= info.getMinCond()) && (qs.getCond() < 6) && canGetItem(qs, info.getItemId()) && (getRandom(1000) < info.getChance()))
|
||||
{
|
||||
giveItems(member, info.getItemId(), 1);
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(Npc npc, Player player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() >= MIN_LEVEL) ? "31378-01.htm" : "31378-02.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (qs.getCond())
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
htmltext = (getQuestItemsCount(player, KETRA_BADGE_SOLDIER) >= SOLDIER_BADGE_COUNT[0]) ? "31378-11.html" : "31378-10.html";
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
htmltext = (hasQuestItems(player, VARKA_MARKS[0]) && (getQuestItemsCount(player, KETRA_BADGE_SOLDIER) >= SOLDIER_BADGE_COUNT[1]) && (getQuestItemsCount(player, KETRA_BADGE_OFFICER) >= OFFICER_BADGE_COUNT[1])) ? "31378-14.html" : "31378-13.html";
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
htmltext = (hasQuestItems(player, VARKA_MARKS[1]) && (getQuestItemsCount(player, KETRA_BADGE_SOLDIER) >= SOLDIER_BADGE_COUNT[2]) && (getQuestItemsCount(player, KETRA_BADGE_OFFICER) >= OFFICER_BADGE_COUNT[2]) && (getQuestItemsCount(player, KETRA_BADGE_CAPTAIN) >= CAPTAIN_BADGE_COUNT[2])) ? "31378-17.html" : "31378-16.html";
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
htmltext = (hasQuestItems(player, VARKA_MARKS[2], VALOR_FEATHER) && (getQuestItemsCount(player, KETRA_BADGE_SOLDIER) >= SOLDIER_BADGE_COUNT[3]) && (getQuestItemsCount(player, KETRA_BADGE_OFFICER) >= OFFICER_BADGE_COUNT[3]) && (getQuestItemsCount(player, KETRA_BADGE_CAPTAIN) >= CAPTAIN_BADGE_COUNT[3])) ? "31378-20.html" : "31378-19.html";
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
if (!hasQuestItems(player, VARKA_MARKS[3]) || !hasQuestItems(player, WISDOM_FEATHER) || (getQuestItemsCount(player, KETRA_BADGE_SOLDIER) < SOLDIER_BADGE_COUNT[4]) || (getQuestItemsCount(player, KETRA_BADGE_OFFICER) < OFFICER_BADGE_COUNT[4]) || (getQuestItemsCount(player, KETRA_BADGE_CAPTAIN) < CAPTAIN_BADGE_COUNT[4]))
|
||||
{
|
||||
return "31378-22.html";
|
||||
}
|
||||
qs.setCond(6, true);
|
||||
takeItems(player, -1, KETRA_BADGE_SOLDIER, KETRA_BADGE_OFFICER, KETRA_BADGE_CAPTAIN, WISDOM_FEATHER, VARKA_MARKS[3]);
|
||||
giveItems(player, VARKA_MARKS[4], 1);
|
||||
htmltext = "31378-23.html";
|
||||
break;
|
||||
}
|
||||
case 6:
|
||||
{
|
||||
if (hasQuestItems(player, VARKA_MARKS[4]))
|
||||
{
|
||||
htmltext = "31378-24.html";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Chief Ashas Varka Durai:<br>
|
||||
Our ancient battle against the Ketra Orcs continues to this very day. We must defeat them once and for all and reclaim our promised land! Who will join our fight?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00612_BattleAgainstKetraOrcs 31377-03.htm">"I will fight the Ketra Orcs."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,4 @@
|
||||
<html><body>Chief Ashas Varka Durai:<br>
|
||||
Your courage is admirable, but you're not quite ready for the fight. Improve your skills and come back.<br>
|
||||
(This quest may only be undertaken by characters of level 74 or above.)
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Chief Ashas Varka Durai:<br>
|
||||
Excellent! Raid the advance base of Ketra Orcs and kill as many as you can! Bring back their molars as proof of victory. Bring back 100 of them and I'll give you a prize of valor!
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Chief Ashas Varka Durai<br>
|
||||
My colleague, have you slaughtered many enemies, those barbarian Orcs of Ketra? Did you place the shadow of humiliation and disgrace upon them?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00612_BattleAgainstKetraOrcs 31377-06.html">"I will come back after killing more enemies."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00612_BattleAgainstKetraOrcs 31377-07.html">"I brought 100 molars for a start."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00612_BattleAgainstKetraOrcs 31377-09.html">"I'm going to quit fighting."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Chief Ashas Varka Durai:<br>
|
||||
Drive the Ketra Orcs from the promised land of the Varka! Don't let a single invader escape! Kill them all!
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Chief Ashas Varka Durai:<br>
|
||||
The fight continues! Onward to victory!
|
||||
</body></html>
|
@@ -0,0 +1,6 @@
|
||||
<html><body>Chief Ashas Varka Durai:<br>
|
||||
Excellent job, my friend! Today's was a stellar victory! You're our hero! You shall be well rewarded! At one time, this Buffalo horn was given only to soldiers of our tribe. It's quite valuable! You could trade it for something you really need!<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00612_BattleAgainstKetraOrcs 31377-06.html">"I want to go back to the battlefield."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00612_BattleAgainstKetraOrcs 31377-07.html">"I have more molars."</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00612_BattleAgainstKetraOrcs 31377-09.html">"I want to quit."</Button>
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Chief Ashas Varka Durai:<br>
|
||||
Didn't I ask for at least 100 molars of Ketra Orcs! Return to the battlefield now!
|
||||
</body></html>
|
@@ -0,0 +1,3 @@
|
||||
<html><body>Chief Ashas Varka Durai:<br>
|
||||
Even an invincible warrior must rest occasionally! You've done a noble service! Come back when you're rested!
|
||||
</body></html>
|
@@ -0,0 +1,150 @@
|
||||
/*
|
||||
* 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.Q00612_BattleAgainstKetraOrcs;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.l2jmobius.gameserver.enums.QuestSound;
|
||||
import org.l2jmobius.gameserver.model.actor.Npc;
|
||||
import org.l2jmobius.gameserver.model.actor.Player;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* Battle against Ketra Orcs (612)
|
||||
* @author malyelfik
|
||||
*/
|
||||
public class Q00612_BattleAgainstKetraOrcs extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int ASHAS = 31377;
|
||||
// Monsters
|
||||
private static final Map<Integer, Integer> MOBS = new HashMap<>();
|
||||
static
|
||||
{
|
||||
MOBS.put(21324, 500); // Ketra Orc Footman
|
||||
MOBS.put(21327, 510); // Ketra Orc Raider
|
||||
MOBS.put(21328, 522); // Ketra Orc Scout
|
||||
MOBS.put(21329, 519); // Ketra Orc Shaman
|
||||
MOBS.put(21331, 529); // Ketra Orc Warrior
|
||||
MOBS.put(21332, 529); // Ketra Orc Lieutenant
|
||||
MOBS.put(21334, 539); // Ketra Orc Medium
|
||||
MOBS.put(21336, 548); // Ketra Orc White Captain
|
||||
MOBS.put(21338, 558); // Ketra Orc Seer
|
||||
MOBS.put(21339, 568); // Ketra Orc General
|
||||
MOBS.put(21340, 568); // Ketra Orc Battalion Commander
|
||||
MOBS.put(21342, 578); // Ketra Orc Grand Seer
|
||||
MOBS.put(21343, 664); // Ketra Commander
|
||||
MOBS.put(21345, 713); // Ketra's Head Shaman
|
||||
MOBS.put(21347, 738); // Ketra Prophet
|
||||
}
|
||||
// Items
|
||||
private static final int SEED = 7187;
|
||||
private static final int MOLAR = 7234;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 74;
|
||||
private static final int MOLAR_COUNT = 100;
|
||||
|
||||
public Q00612_BattleAgainstKetraOrcs()
|
||||
{
|
||||
super(612);
|
||||
addStartNpc(ASHAS);
|
||||
addTalkId(ASHAS);
|
||||
addKillId(MOBS.keySet());
|
||||
registerQuestItems(MOLAR);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, Npc npc, Player player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = event;
|
||||
switch (event)
|
||||
{
|
||||
case "31377-03.htm":
|
||||
{
|
||||
qs.startQuest();
|
||||
break;
|
||||
}
|
||||
case "31377-06.html":
|
||||
{
|
||||
break;
|
||||
}
|
||||
case "31377-07.html":
|
||||
{
|
||||
if (getQuestItemsCount(player, MOLAR) < MOLAR_COUNT)
|
||||
{
|
||||
return "31377-08.html";
|
||||
}
|
||||
takeItems(player, MOLAR, MOLAR_COUNT);
|
||||
giveItems(player, SEED, 20);
|
||||
break;
|
||||
}
|
||||
case "31377-09.html":
|
||||
{
|
||||
qs.exitQuest(true, true);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
htmltext = null;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(Npc npc, Player killer, boolean isSummon)
|
||||
{
|
||||
final Player member = getRandomPartyMember(killer, 1);
|
||||
if ((member != null) && (getRandom(1000) < MOBS.get(npc.getId())))
|
||||
{
|
||||
giveItems(member, MOLAR, 1);
|
||||
playSound(member, QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
return super.onKill(npc, killer, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(Npc npc, Player player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
switch (qs.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() >= MIN_LEVEL) ? "31377-01.htm" : "31377-02.htm";
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
htmltext = (hasQuestItems(player, MOLAR)) ? "31377-04.html" : "31377-05.html";
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
@@ -163,6 +163,10 @@ import quests.Q00418_PathOfTheArtisan.Q00418_PathOfTheArtisan;
|
||||
import quests.Q00420_LittleWing.Q00420_LittleWing;
|
||||
import quests.Q00421_LittleWingsBigAdventure.Q00421_LittleWingsBigAdventure;
|
||||
import quests.Q00500_BrothersBoundInChains.Q00500_BrothersBoundInChains;
|
||||
import quests.Q00605_AllianceWithKetraOrcs.Q00605_AllianceWithKetraOrcs;
|
||||
import quests.Q00606_BattleAgainstVarkaSilenos.Q00606_BattleAgainstVarkaSilenos;
|
||||
import quests.Q00611_AllianceWithVarkaSilenos.Q00611_AllianceWithVarkaSilenos;
|
||||
import quests.Q00612_BattleAgainstKetraOrcs.Q00612_BattleAgainstKetraOrcs;
|
||||
import quests.Q00620_FourGoblets.Q00620_FourGoblets;
|
||||
import quests.Q00641_AttackSailren.Q00641_AttackSailren;
|
||||
import quests.Q00642_APowerfulPrimevalCreature.Q00642_APowerfulPrimevalCreature;
|
||||
@@ -374,6 +378,10 @@ public class QuestMasterHandler
|
||||
Q00420_LittleWing.class, // FIXME: Underground
|
||||
Q00421_LittleWingsBigAdventure.class, // FIXME: Underground
|
||||
Q00500_BrothersBoundInChains.class,
|
||||
Q00605_AllianceWithKetraOrcs.class,
|
||||
Q00606_BattleAgainstVarkaSilenos.class,
|
||||
Q00611_AllianceWithVarkaSilenos.class,
|
||||
Q00612_BattleAgainstKetraOrcs.class,
|
||||
Q00620_FourGoblets.class, // FIXME: Grand Crusade
|
||||
Q00630_PirateTreasureHunt.class, // TODO: Not done.
|
||||
Q00641_AttackSailren.class, // FIXME: Grand Crusade
|
||||
|
Reference in New Issue
Block a user