Competition for the Bandit Stronghold
- ID
- 504
- Название
- Competition for the Bandit Stronghold
- start_npcs_json
- [35437]
- npc_ids_json
- [35437]
- constants_json
- {"MESSENGER":35437,"TARLK_AMULET":4332,"TROPHY_OF_ALLIANCE":5009}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00504_CompetitionForTheBanditStronghold/Q00504_CompetitionForTheBanditStronghold.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 35437 | Messenger | Да | 56 |
Условия уровней: выражения из Java
Явные выражения не найдены; проверьте исходник и диалоги.
Выдача предметов, адены и опыта: выражения из Java
rewardItems(player, TROPHY_OF_ALLIANCE, 1); giveItems(killer, TARLK_AMULET, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[35437-00.htm] Messenger: I am sorry, but 5 clans already submitted the applications for participation in fight for the Clan Hall. Perhaps to you will carry next time.
[35437-01.htm] Messenger: I have no choice but to follow the orders of the Tetrarchs. This will not be easy for you. None of the five factions involved in this conflict have any use for weaklings! Ha! Listen carefully. You must go and exterminate Tarlk bugbears and basilisks they are raising. They have been a nuisance to the Ol Mahums for too long. Bring back 30 proofs of their demise. The fatal blows must be delivered by your clan leader. Now, what are you waiting for? Be gone!
[35437-02.htm] Messenger: Did you think that we would allow you to use our land for nothing? Tell you what, there are some Tarlk bugbears raising basilisks that have been bothering us. I'll let you participate in the tryouts if you go and kill some.
[35437-03.htm] Messenger: I see that you have brought 30 Tarlk Amulets. Good job! But don't get your hopes up, the competition is fierce now. This clan hall siege will be a close match and should prove to be quite interesting... The final round will begin soon. Hurry and register. Remember, only five clans are allowed to participate. Ha! Test to qualify for participation in the clan hall siege
Исходник условий и наград (Java)
/*
* Copyright (c) 2013 L2jMobius
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
* IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package quests.Q00504_CompetitionForTheBanditStronghold;
import org.l2jmobius.gameserver.entity.actor.Npc;
import org.l2jmobius.gameserver.entity.actor.Player;
import org.l2jmobius.gameserver.managers.CHSiegeManager;
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;
import org.l2jmobius.gameserver.mechanics.siege.clanhalls.SiegableHall;
/**
* @author LordWinter
*/
public final class Q00504_CompetitionForTheBanditStronghold extends Quest
{
private static final int MESSENGER = 35437;
private static final int TARLK_AMULET = 4332;
private static final int TROPHY_OF_ALLIANCE = 5009;
private static final int[] MOBS =
{
20570,
20571,
20572,
20573,
20574
};
private static final SiegableHall BANDIT_STRONGHOLD = CHSiegeManager.getInstance().getSiegableHall(35);
public Q00504_CompetitionForTheBanditStronghold()
{
super(504, "Competition for the Bandit Stronghold");
addStartNpc(MESSENGER);
addTalkId(MESSENGER);
for (int mob : MOBS)
{
addKillId(mob);
}
}
@Override
public String onTalk(Npc npc, Player player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
if (st == null)
{
return htmltext;
}
switch (st.getState())
{
case State.CREATED:
{
if (BANDIT_STRONGHOLD.getSiege().getAttackers().size() >= 5)
{
htmltext = "35437-00.htm";
}
else
{
htmltext = "35437-01.htm";
st.startQuest();
}
break;
}
case State.STARTED:
{
if (getQuestItemsCount(player, TARLK_AMULET) < 30)
{
htmltext = "35437-02.htm";
}
else
{
takeItems(player, TARLK_AMULET, 30);
rewardItems(player, TROPHY_OF_ALLIANCE, 1);
st.exitQuest(true);
htmltext = "35437-03.htm";
}
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player killer, boolean isSummon)
{
final QuestState st = getQuestState(killer, false);
if (st == null)
{
return;
}
if (st.isStarted() && st.isCond(1))
{
giveItems(killer, TARLK_AMULET, 1);
if (getQuestItemsCount(killer, TARLK_AMULET) < 30)
{
playSound(killer, QuestSound.ITEMSOUND_QUEST_MIDDLE);
}
else
{
st.setCond(2, true);
}
}
}
}