Red-Eyed Invaders
- ID
- 39
- Название
- Red-Eyed Invaders
- start_npcs_json
- [30334]
- npc_ids_json
- [20919,20920,20921,20925,30332,30334]
- constants_json
- {"BABENCO":30334,"BATHIS":30332,"MAILLE_LIZARDMAN":20919,"MAILLE_LIZARDMAN_SCOUT":20920,"MAILLE_LIZARDMAN_GUARD":20921,"ARANEID":20925,"BLACK_BONE_NECKLACE":7178,"RED_BONE_NECKLACE":7179,"INCENSE_POUCH":7180,"GEM_OF_MAILLE":7181,"GREEN_COLORED_LURE_HG":6521,"BABY_DUCK_RODE":6529,"FISHING_SHOT_NG":6535}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00039_RedEyedInvaders/Q00039_RedEyedInvaders.java
NPC квеста
| ID | Название | Старт квеста | Уровень |
|---|---|---|---|
| 20919 | Maille Lizardman | Нет | 20 |
| 20920 | Maille Lizardman Scout | Нет | 22 |
| 20921 | Maille Lizardman Guard | Нет | 24 |
| 20925 | Giant Araneid | Нет | 24 |
| 30332 | Bathis | Нет | 80 |
| 30334 | Babenco | Да | 80 |
Условия уровней: выражения из Java
htmltext = (player.getLevel() < 20) ? "30334-2.htm" : "30334-0.htm";
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, GREEN_COLORED_LURE_HG, 60); giveItems(player, BABY_DUCK_RODE, 1); giveItems(player, FISHING_SHOT_NG, 500);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[30332-0.htm] Captain Bathis: Did Guard Babenco send you? Hmm... You don't have very good armor, do you? Oh well, I do have to commend you for your bravery! This is a critical and potentially very dangerous mission! You must listen carefully! "I'm listening."
[30332-1.htm] Captain Bathis: The mission is simple: Find the Maille Lizardmen on the plains west of the village and kill them! Their advance unit consists of Maille Lizardmen, Maille Lizardmen Scouts and Maille Lizardmen Guards. You must destroy them and stop their advance. All Maille Lizardmen wear a Bone Totem Necklace into battle. Bring me these Necklaces and I'll reward you based how many you bring back. You'll find Black Bone Totem Necklaces and Red Bone Totem Necklaces. Bring me One-hundred of each. Compared with other tribes, the Maille Lizardmen are physicaly weak. But this is more than made up for by their superior intelligence. When attacking them, you mustn't let them surround you! I've heard they have giant spiders fighting alongside them, so watch out for them! As I said, you'll find them on the plains west of the village. Good hunting!
[30332-2.htm] Captain Bathis: Good job! We won't have to worry about them for a while! We were sucessful that time, but reports from the battlefield of giant, deadly arachnids are reason for concern... Would you help us get rid of these horrible spiders? "Well, I suppose I'll do it."
[30332-2a.htm] Captain Bathis: The battle continues! The lizardmen may attack at any moment! Drop off your delivery and return to the battlefield immediately! Don't forget to bring back some war trophies! I need 100 Red Totem Necklaces and 100 black Totem Necklaces. The Maille Lizardmen can be found on the plains west of the village.
[30332-3.htm] Captain Bathis: I realize you just completed a difficult task, but we still need your help! We must discover the connection between Maille Lizardmen and the Araneids. They've been fighting alongside the lizardmen! This is unheard of! Return to the Maille Lizardmen Barracks and investigate this unholy alliance! You should be able to find out more if you kill Maille Lizardmen Scouts and Guards and the Giant Araneids.
[30332-3a.htm] Captain Bathis: Thank you for your hard work, but we still need some more items to fully investigate this matter. Bring me 30 mysterious Incense Pouches and 30 five-colored beads. I'm counting on you!
[30332-4.htm] Captain Bathis: You've proven the conspiracy between the Maille Lizardmen and the giant spiders! Magister Rohmer attributes it to the lizardmen's magic. This matter must be investigated further! We'll get to the bottom of this eventually! "Is my mission over?"
[30332-5.htm] Captain Bathis: Thank you very much! Now we have enough ingredients for Magister Rohmer to determine the roots of this conspiracy! We couldn't have done it without you! The future of Gludio is secure in the hands of noble warriors like you. Please accept this humble reward as a token of our appreciation!
[30334-0.htm] Guard Babenco: I just received a report that a large army of savage Maille Lizardmen is gathering in the western section of Gludio Castle Town. They're not satisfied staying on the plains. Captain Bathis is recruting militiamen in Gludio, and we need all the help we can get. You seem worthly. Would you join us? "I'll help!"
[30334-1.htm] Guard Babenco: Thanks for your help. I'm honored. Report to Captain Bathis for your orders. He's at the northern entrance of Gludio Castle Town.
[30334-2.htm] Guard Babenco: I just received a report that a large army of savage Maille Lizardmen is gathering in the western section of Gludio Castle Town. They're not satisfied staying on the plains. Captain Bathis is recruiting militiamen in Gludio, and we need help, but this is too dangerous for beginners. (This quest may only be undertaken by a character of level 20 and above.)
[30334-3.htm] Guard Babenco: Report to Captain Bathis for your orders. He's at the northern entrance of Gludio Castle Town.
Исходник условий и наград (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.Q00039_RedEyedInvaders;
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.QuestState;
import org.l2jmobius.gameserver.mechanics.script.State;
public class Q00039_RedEyedInvaders extends Quest
{
// NPCs
private static final int BABENCO = 30334;
private static final int BATHIS = 30332;
// Monsters
private static final int MAILLE_LIZARDMAN = 20919;
private static final int MAILLE_LIZARDMAN_SCOUT = 20920;
private static final int MAILLE_LIZARDMAN_GUARD = 20921;
private static final int ARANEID = 20925;
// Items
private static final int BLACK_BONE_NECKLACE = 7178;
private static final int RED_BONE_NECKLACE = 7179;
private static final int INCENSE_POUCH = 7180;
private static final int GEM_OF_MAILLE = 7181;
// @formatter:off
// First droplist
private static final Map<Integer, int[]> FIRST_DP = new HashMap<>();
static
{
FIRST_DP.put(MAILLE_LIZARDMAN_GUARD, new int[]{RED_BONE_NECKLACE, BLACK_BONE_NECKLACE, 1000000});
FIRST_DP.put(MAILLE_LIZARDMAN, new int[]{BLACK_BONE_NECKLACE, RED_BONE_NECKLACE, 1000000});
FIRST_DP.put(MAILLE_LIZARDMAN_SCOUT, new int[]{BLACK_BONE_NECKLACE, RED_BONE_NECKLACE, 1000000});
}
// Second droplist
private static final Map<Integer, int[]> SECOND_DP = new HashMap<>();
static
{
SECOND_DP.put(ARANEID, new int[]{GEM_OF_MAILLE, INCENSE_POUCH, 500000});
SECOND_DP.put(MAILLE_LIZARDMAN_GUARD, new int[]{INCENSE_POUCH, GEM_OF_MAILLE, 300000});
SECOND_DP.put(MAILLE_LIZARDMAN_SCOUT, new int[]{INCENSE_POUCH, GEM_OF_MAILLE, 250000});
}
// @formatter:on
// Rewards
private static final int GREEN_COLORED_LURE_HG = 6521;
private static final int BABY_DUCK_RODE = 6529;
private static final int FISHING_SHOT_NG = 6535;
public Q00039_RedEyedInvaders()
{
super(39, "Red-Eyed Invaders");
registerQuestItems(BLACK_BONE_NECKLACE, RED_BONE_NECKLACE, INCENSE_POUCH, GEM_OF_MAILLE);
addStartNpc(BABENCO);
addTalkId(BABENCO, BATHIS);
addKillId(MAILLE_LIZARDMAN, MAILLE_LIZARDMAN_SCOUT, MAILLE_LIZARDMAN_GUARD, ARANEID);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
String htmltext = event;
final QuestState st = getQuestState(player, false);
if (st == null)
{
return htmltext;
}
switch (event)
{
case "30334-1.htm":
{
st.startQuest();
break;
}
case "30332-1.htm":
{
st.setCond(2, true);
break;
}
case "30332-3.htm":
{
st.setCond(4, true);
takeItems(player, BLACK_BONE_NECKLACE, -1);
takeItems(player, RED_BONE_NECKLACE, -1);
break;
}
case "30332-5.htm":
{
takeItems(player, INCENSE_POUCH, -1);
takeItems(player, GEM_OF_MAILLE, -1);
giveItems(player, GREEN_COLORED_LURE_HG, 60);
giveItems(player, BABY_DUCK_RODE, 1);
giveItems(player, FISHING_SHOT_NG, 500);
st.exitQuest(false, true);
break;
}
}
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() < 20) ? "30334-2.htm" : "30334-0.htm";
break;
}
case State.STARTED:
{
final int cond = st.getCond();
switch (npc.getId())
{
case BABENCO:
{
htmltext = "30334-3.htm";
break;
}
case BATHIS:
{
if (cond == 1)
{
htmltext = "30332-0.htm";
}
else if (cond == 2)
{
htmltext = "30332-2a.htm";
}
else if (cond == 3)
{
htmltext = "30332-2.htm";
}
else if (cond == 4)
{
htmltext = "30332-3a.htm";
}
else if (cond == 5)
{
htmltext = "30332-4.htm";
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player player, boolean isPet)
{
final int npcId = npc.getId();
QuestState qs = getRandomPartyMemberState(player, 2, 3, npc);
if ((qs != null) && (npcId != ARANEID))
{
final int[] list = FIRST_DP.get(npcId);
if (giveItemRandomly(qs.getPlayer(), npc, list[0], 1, 100, list[2] / 1000000d, true) && (getQuestItemsCount(qs.getPlayer(), list[1]) == 100))
{
qs.setCond(3, true);
}
}
else
{
qs = getRandomPartyMemberState(player, 4, 3, npc);
if ((qs != null) && (npcId != MAILLE_LIZARDMAN))
{
final int[] list = SECOND_DP.get(npcId);
if (giveItemRandomly(qs.getPlayer(), npc, list[0], 1, 30, list[2] / 1000000d, true) && (getQuestItemsCount(qs.getPlayer(), list[1]) == 30))
{
qs.setCond(5, true);
}
}
}
}
}