Alliance with Varka Silenos
- ID
- 611
- Название
- Alliance with Varka Silenos
- start_npcs_json
- [31378]
- npc_ids_json
- [31378]
- constants_json
- {"NARAN_ASHANUK":31378,"KETRA_BADGE_SOLDIER":7226,"KETRA_BADGE_OFFICER":7227,"KETRA_BADGE_CAPTAIN":7228,"VALOR_FEATHER":7229,"WISDOM_FEATHER":7230,"MIN_LEVEL":74}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00611_AllianceWithVarkaSilenos/Q00611_AllianceWithVarkaSilenos.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 31378 | Naran Ashanuk | Да | 70 |
Условия уровней: выражения из Java
private static final int MIN_LEVEL = 74; htmltext = (player.getLevel() >= MIN_LEVEL) ? "31378-01.htm" : "31378-02.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, VARKA_MARKS[0], 1); giveItems(player, VARKA_MARKS[1], 1); giveItems(player, VARKA_MARKS[2], 1); giveItems(player, VARKA_MARKS[3], 1); giveItems(member, info.getItemId(), 1); giveItems(player, VARKA_MARKS[4], 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[31378-01.htm] Varka's Messenger Naran Ashanuk: 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? "I'll do it!"
[31378-02.htm] Varka's Messenger Naran Ashanuk: We're looking for an exceptionally strong fighter! Why don't you come back when you've developed your skills a bit more? (This quest may only be undertaken by a character of level 74 or above.)
[31378-03.htm] Varka's Messenger Naran Ashanuk: You've got some nerve, coming around here after helping our enemy! Have you no shame?
[31378-04.htm] Varka's Messenger Naran Ashanuk: You seem pretty sure of yourself, but we can't afford to take in just anybody... If you wish to fight alongside the Varka Silenos, you must drive the Ketra Orcs from their advance base! Destroy the Ketra Orc footmen, raiders, scouts, shamans and war hounds and bring back 100 badges of Ketra grunts, then you will have proven your ability. Show us what you can do!
[31378-05.htm] Varka's Messenger Naran Ashanuk: 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 200 badges of Ketra grunts and 100 badges of Ketra officers. Fighters like you have become essential to our victory! You can get the captain's badge by killing Ketra Orc Warriors, Lieutenants, Mediums, Elite Soldiers, Commanders, Elite Guards, White Captains, and Seers. 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.
[31378-06.htm] Varka's Messenger Naran Ashanuk: 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 300 badges of Ketra grunts, 200 badges of Ketra officers and 100 badges of Ketra captains. The badges of Ketra captains can be obtained from Ketra Orc captains, battalion commanders, grand seers, chief shamans, chief royal guards, prophets, Prophet's Guards, and Prophet's Aides. 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.
[31378-07.htm] Varka's Messenger Naran Ashanuk: 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 Ketra 300 badges of grunts, 300 badges of officers, 200 badges of captains and a Feather of Valor. The feather can be obtained by undertaking the Prove Your Courage quest, a mission assigned by Ashas Varka Durai, the elder of our tribe. 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.
[31378-08.htm] Varka's Messenger Naran Ashanuk: 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, obtain400 badges of Ketra grunts, 400 badges of Ketra officers, 200 badges of Ketra captains and a Feather of Wisdom. The feather can be obtained by undertaking the Slay the Enemy Commander quest, a mission assigned by Ashas Varka Durai, the elder of our tribe. 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.
[31378-09.htm] Varka's Messenger Naran Ashanuk: 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. But if their treatment does not satisfy you, you may give up the alliance. Give up the alliance with the Varka Silenos.
[31378-10.html] Varka's Messenger Naran Ashanuk: 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 footmen, raiders, scouts, shamans and war hounds. Bring back 100 badges of Ketra grunts, then you will have proven your friendship to the Varka.
[31378-11.html] Varka's Messenger Naran Ashanuk: I bet you left a bitter taste in the Ketra Orcs' mouths. What have you brought me? Hand over the Ketra badges.
[31378-12.html] Varka's Messenger Naran Ashanuk: 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.
[31378-12a.html] Varka's Messenger Naran Ashanuk: Friend of the Varka, go destroy our enemies!
[31378-12b.html] Varka's Messenger Naran Ashanuk: We value your trust, friend.
[31378-13.html] Varka's Messenger Naran Ashanuk: What are you still doing here? Get to the battlefield immediately! You've committed to bring 200 badges of Ketra grunts and 100 badges of Ketra officers. Get the officers' badges from Ketra Orc Warriors, lieutenants, mediums, elite soldiers, centurions, seers, legionnaire captains, and elite royal guards. If you don't like this job, you're always welcome to quit! "I'll destroy my enemy!" "I want to quit."
[31378-14.html] Varka's Messenger Naran Ashanuk: Did those gutless Ketras cry when you beat them? How many did you kill? Where are the proofs? "Here are the badges."
[31378-15.html] Varka's Messenger Naran Ashanuk: 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.
[31378-16.html] Varka's Messenger Naran Ashanuk: What are you still doing here? Get to the battlefield immediately! Remember, you've agreed to bring 300 badges of Ketra grunts, 200 badges of Ketra officers and 100 badges of Ketra captains. You can get the General's Badge by slaying the Ketra Orc Generals, Battalion Commanders, Grand Seers, Head Shamans, Head Guards, Prophets, Prophet's Guard, and Prophet's Aide. If you don't like your job, you're always welcome to quit! "I'll destroy my enemy!" "Fine, I quit!"
[31378-17.html] Varka's Messenger Naran Ashanuk: Ah, back from your visit with the Ketra Orcs, are you? What was your trophy? Hand over the Ketra badges.
[31378-18.html] Varka's Messenger Naran Ashanuk: 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.
[31378-19.html] Varka's Messenger Naran Ashanuk: What are you still doing here? Get to the battlefield immediately! You've promised us you'd bring from the Ketra Orcs 300 badges of grunts, 300 badges of officers, 200 badges of captains and a Feather of Valor. This feather can be obtained by undertaking the Prove Your Courage quest, a mission assigned by Ashas Varka Durai, the elder of our tribe. "I will go destroy my enemy!" If you don't like your job, you're always welcome to quit! "I want to quit."
[31378-20.html] Varka's Messenger Naran Ashanuk: Well, look who's back. from meeting with the Ketra Orcs. What did you find? Hand over the Ketra badges.
[31378-21.html] Varka's Messenger Naran Ashanuk: 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. Now all that remains is for you to become our closest friend, one with the highest trust we bestow! Will you do it?
[31378-22.html] Varka's Messenger Naran Ashanuk: What are you still doing here? Get to the battlefield immediately! You've promised to bring 400 badges of Ketra grunts, 400 badges of Ketra officers, 200 badges of Ketra captains and a Feather of Wisdom. This feather can be obtained by undertaking the Slay the Enemy Commander quest, a mission assigned by Ashas Varka Durai, the elder of our tribe. Remember, you can always quit! "I'll destroy my enemy!" "I want to quit."
[31378-23.html] Varka's Messenger Naran Ashanuk: 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!
[31378-24.html] Varka's Messenger Naran Ashanuk: 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! But don't feel like you need to stay if you're unhappy... "I'll keep the promise with the Varka!" "I want to quit."
[31378-25.html] Varka's Messenger Naran Ashanuk: 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? "I want to quit."
[31378-26.html] Varka's Messenger Naran Ashanuk: Oh well, I suppose I was wrong about you! Good-bye, stranger!
Исходник условий и наград (Java)
/*
* 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.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.mechanics.script.Quest;
import org.l2jmobius.gameserver.mechanics.script.QuestSound;
import org.l2jmobius.gameserver.mechanics.script.QuestState;
import org.l2jmobius.gameserver.mechanics.script.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, "Alliance with Varka Silenos");
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 onEvent(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 void 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);
playSound(member, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
}
@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;
}
}