Hunting Leto Lizardman
- ID
- 300
- Название
- Hunting Leto Lizardman
- start_npcs_json
- [30126]
- npc_ids_json
- [20577,20578,20579,20580,20582]
- constants_json
- {"LETO_LIZARDMAN":20577,"LETO_LIZARDMAN_ARCHER":20578,"LETO_LIZARDMAN_SOLDIER":20579,"LETO_LIZARDMAN_WARRIOR":20580,"LETO_LIZARDMAN_OVERLORD":20582,"BRACELET":7139}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00300_HuntingLetoLizardman/Q00300_HuntingLetoLizardman.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 20577 | Leto Lizardman | Нет | 35 |
| 20578 | Leto Lizardman Archer | Нет | 36 |
| 20579 | Leto Lizardman Soldier | Нет | 37 |
| 20580 | Leto Lizardman Warrior | Нет | 38 |
| 20582 | Leto Lizardman Overlord | Нет | 40 |
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 34) ? "30126-01.htm" : "30126-02.htm";
Выдача предметов, адены и опыта: выражения из Java
giveAdena(player, 30000, true); rewardItems(player, 1867, 50); rewardItems(player, 1872, 50); giveItems(partyMember, BRACELET, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30126-01.htm] Guard Rath: The population of lizardmen north of Oren is mysteriously growing. This must be related to the increase in the power of evil since the release of Antharas. There have been wild rumors of ghastly ceremonies held in the forest at night! The lizardmen are most likely under the direct control of Shilen, and these rituals no doubt strengthen the power of Antharas... In the midst of all this turmoil, the guild has asked me to make the roads safe for trade! No doubt they feel that their village is threatened. But this is Oren Territory, and there will be problems if we send regular troops in... The captain has ordered me to mobilize mercenaries to stabilize the area, but you're not ready for this job yet. (This quest may only be undertaken by a character of level 34 and above.)
[30126-02.htm] Guard Rath: The population of lizardmen on the north side of Oren is mysteriously growing. This must be related to the increase in the power of evil since the release of Antharas. There have been wild rumors of ghastly ceremonies held in the forest at night! The lizardmen are most likely under the direct control of Shilen, and these rituals no doubt strengthen the power of Antharas... In the midst of all this turmoil, the guild has asked me to make the roads safe for trade! No doubt they feel that their village is threatened. But this is Oren Territory, and there will be problems if we send regular troops in... The captain has ordered me to mobilize mercenaries to stabilize the area. Will you join us? "I'll do it."
[30126-03.htm] Guard Rath: Destroy the lizardmen and take their bracelets as proof of your victory. Kill the Leto Lizardmen, Leto Lizardman Archers, Leto Lizardman Soldiers, Leto Lizardman Overlords', Leto Lizardman Warriors and so on. Don't attack their shaman! It might cause them to stop the ritual before our investigation is complete. The ritual must not end until our investigation is complete! The guild had already sent me a reward for 60 bracelets. I'll give it to you as soon as you earn it.
[30126-04.htm] Guard Rath: You're finished? Good work, but we're not done with those vile creatures yet! I'm sure the plains will be swarming with lizardmen again in a few short weeks. Now, let me count those bracelets. "They're all there!"
[30126-04a.htm] Guard Rath: Please try harder! You must get rid of those filthy lizardmen who threaten trade between Aden and Oren.
[30126-05.htm] Guard Rath: I don't think so! You haven't brought enough! Bring 60 if you want a reward!
[30126-06.htm] Guard Rath: Feel free to come back and help us anytime! The life of a mercenary may not pay well, but it has its rewards! Please accept this token of our appreciation.
Исходник условий и наград (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.Q00300_HuntingLetoLizardman;
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;
public class Q00300_HuntingLetoLizardman extends Quest
{
// Monsters
private static final int LETO_LIZARDMAN = 20577;
private static final int LETO_LIZARDMAN_ARCHER = 20578;
private static final int LETO_LIZARDMAN_SOLDIER = 20579;
private static final int LETO_LIZARDMAN_WARRIOR = 20580;
private static final int LETO_LIZARDMAN_OVERLORD = 20582;
// Item
private static final int BRACELET = 7139;
// Drop chances
private static final Map<Integer, Integer> CHANCES = new HashMap<>();
static
{
CHANCES.put(LETO_LIZARDMAN, 300000);
CHANCES.put(LETO_LIZARDMAN_ARCHER, 320000);
CHANCES.put(LETO_LIZARDMAN_SOLDIER, 350000);
CHANCES.put(LETO_LIZARDMAN_WARRIOR, 650000);
CHANCES.put(LETO_LIZARDMAN_OVERLORD, 700000);
}
public Q00300_HuntingLetoLizardman()
{
super(300, "Hunting Leto Lizardman");
registerQuestItems(BRACELET);
addStartNpc(30126); // Rath
addTalkId(30126);
addKillId(LETO_LIZARDMAN, LETO_LIZARDMAN_ARCHER, LETO_LIZARDMAN_SOLDIER, LETO_LIZARDMAN_WARRIOR, LETO_LIZARDMAN_OVERLORD);
}
@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("30126-03.htm"))
{
st.startQuest();
}
else if (event.equals("30126-05.htm") && (getQuestItemsCount(player, BRACELET) >= 60))
{
htmltext = "30126-06.htm";
takeItems(player, BRACELET, -1);
final int luck = getRandom(3);
if (luck == 0)
{
giveAdena(player, 30000, true);
}
else if (luck == 1)
{
rewardItems(player, 1867, 50);
}
else if (luck == 2)
{
rewardItems(player, 1872, 50);
}
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() < 34) ? "30126-01.htm" : "30126-02.htm";
break;
}
case State.STARTED:
{
htmltext = st.isCond(1) ? "30126-04a.htm" : "30126-04.htm";
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final QuestState st = getRandomPartyMemberState(player, 1, 3, npc);
if (st == null)
{
return;
}
if (getRandom(1000000) < CHANCES.get(npc.getId()))
{
final Player partyMember = st.getPlayer();
giveItems(partyMember, BRACELET, 1);
if (getQuestItemsCount(partyMember, BRACELET) < 60)
{
playSound(partyMember, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
else
{
st.setCond(2, true);
}
}
}
}