Signs of Revolt
- ID
- 646
- Название
- Signs of Revolt
- start_npcs_json
- [32016]
- npc_ids_json
- [32016]
- constants_json
- {"TORRANT":32016,"CURSED_DOLL":8087}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00646_SignsOfRevolt/Q00646_SignsOfRevolt.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 32016 | Torrant | Да | 70 |
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 40) ? "32016-02.htm" : "32016-01.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, reward[0], reward[1]); giveItems(partyMember, CURSED_DOLL, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[32016-01.htm] Beacon Tower Manager Torrant: If you have some time, would you help me out? You'll be well-rewarded! You see, the Ragna Orcs around here are trying to revolt. I've called for reinforcements, but that takes time, so I'm trying to stall them somehow... Are you interested? "How are you going to stall them?"
[32016-02.htm] Beacon Tower Manager Torrant: Hello Stranger. What has brought you to such a dangerous place? (This quest may only be undertaken by a character of level 40 and above.)
[32016-03.htm] Beacon Tower Manager Torrant: The Ragna Orcs are gathering their power, being careful not to expose themselves. This is a good time to use guerrilla tactics. If you can, please bring back the Cursed Dolls that the Ragna Orcs use to control their evil creatures. About 180 of them should be enough. Ragna Orcs have the most Cursed Dolls, but among the summoned evil creatures, the Dark Corpse, Guardian of the Ghost Town and Varangka's Succubus also have them. Please help us!
[32016-04.htm] Beacon Tower Manager Torrant: I knew it wouldn't be easy to get the dolls from them. Please, keep trying! 180 of them shouldn't be too difficult. Cheer up!
[32016-05.htm] Beacon Tower Manager Torrant: I heard about what you did. Nice job! Now will you give me the Cursed Dolls? "Here are the Cursed Dolls."
[32016-06.htm] Beacon Tower Manager Torrant: Good job! I don't have much to give, but I can give you one of these. Which do you want? "Give me adena." "Give me Coarse Bone Powder." "Give me steel." "Give me leather."
[32016-07.htm] Beacon Tower Manager Torrant: Here's your reward! I sincerely wish it could be more! Good luck!
Исходник условий и наград (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.Q00646_SignsOfRevolt;
import org.l2jmobius.commons.util.StringUtil;
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;
public class Q00646_SignsOfRevolt extends Quest
{
// NPC
private static final int TORRANT = 32016;
// Item
private static final int CURSED_DOLL = 8087;
// Rewards
private static final int[][] REWARDS =
{
// @formatter:off
{1880, 9},
{1881, 12},
{1882, 20},
{57, 21600}
// @formatter:on
};
public Q00646_SignsOfRevolt()
{
super(646, "Signs of Revolt");
registerQuestItems(CURSED_DOLL);
addStartNpc(TORRANT);
addTalkId(TORRANT);
addKillId(22029, 22030, 22031, 22032, 22033, 22034, 22035, 22036, 22037, 22038, 22039, 22040, 22041, 22042, 22043, 22044, 22045, 22047, 22049);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
if (event.equals("32016-03.htm"))
{
st.startQuest();
}
else if (StringUtil.isNumeric(event))
{
htmltext = "32016-07.htm";
takeItems(player, CURSED_DOLL, -1);
final int[] reward = REWARDS[Integer.parseInt(event)];
giveItems(player, reward[0], reward[1]);
st.exitQuest(true, true);
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
switch (st.getState())
{
case State.CREATED:
{
htmltext = (player.getLevel() < 40) ? "32016-02.htm" : "32016-01.htm";
break;
}
case State.STARTED:
{
final int cond = st.getCond();
if (cond == 1)
{
htmltext = "32016-04.htm";
}
else if (cond == 2)
{
htmltext = "32016-05.htm";
}
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState qs = getRandomPartyMemberState(player, 1, 3, npc);
if (qs == null)
{
return;
}
final Player partyMember = qs.getPlayer();
final QuestState st = getQuestState(partyMember, false);
if (st == null)
{
return;
}
if (getRandom(100) < 75)
{
giveItems(partyMember, CURSED_DOLL, 1);
if (getQuestItemsCount(partyMember, CURSED_DOLL) < 180)
{
playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
else
{
st.setCond(2, true);
}
}
}
}