The Leader and the Follower
- ID
- 123
- Название
- The Leader and the Follower
- start_npcs_json
- [31961]
- npc_ids_json
- [27321,27322,31961]
- constants_json
- {"HEAD_BLACKSMITH_NEWYEAR":31961,"CRYSTAL_D":1458,"BRUIN_LIZARDMAN_BLOOD":8549,"PICOT_ARANEIDS_LEG":8550,"CLAN_OATH_HELM":7850,"CLAN_OATH_ARMOR":7851,"CLAN_OATH_GAUNTLETS_HEAVY_ARMOR":7852,"CLAN_OATH_SABATON_HEAVY_ARMOR":7853,"CLAN_OATH_BRIGANDINE":7854,"CLAN_OATH_LEATHER_GLOVES_LIGHT_ARMOR":7855,"CLAN_OATH_BOOTS_LIGHT_ARMOR":7856,"CLAN_OATH_AKETON":7857,"CLAN_OATH_PADDED_GLOVES_ROBE":7858,"CLAN_OATH_SANDALS_ROBE":7859,"BRUIN_LIZARDMAN":27321,"PICOT_ARANEID":27322,"MIN_LEVEL":19,"CRYSTAL_COUNT_1":922,"CRYSTAL_COUNT_2":771}
- Статус разбора
- metadata_only; dynamic Java conditions/rewards retained in source; unresolved starts: []
- Источник
- game/data/scripts/quests/Q00123_TheLeaderAndTheFollower/Q00123_TheLeaderAndTheFollower.java
NPC квеста
Условия уровней: выражения из Java
private static final int MIN_LEVEL = 19; else if ((player.getLevel() >= MIN_LEVEL) && (player.getPledgeType() == -1) && (player.getSponsor() > 0))
Выдача предметов, адены и опыта: выражения из Java
giveItems(player, CLAN_OATH_HELM, 1); giveItems(player, CLAN_OATH_ARMOR, 1); giveItems(player, CLAN_OATH_GAUNTLETS_HEAVY_ARMOR, 1); giveItems(player, CLAN_OATH_SABATON_HEAVY_ARMOR, 1); giveItems(player, CLAN_OATH_HELM, 1); giveItems(player, CLAN_OATH_BRIGANDINE, 1); giveItems(player, CLAN_OATH_LEATHER_GLOVES_LIGHT_ARMOR, 1); giveItems(player, CLAN_OATH_BOOTS_LIGHT_ARMOR, 1); giveItems(player, CLAN_OATH_HELM, 1); giveItems(player, CLAN_OATH_AKETON, 1); giveItems(player, CLAN_OATH_PADDED_GLOVES_ROBE, 1); giveItems(player, CLAN_OATH_SANDALS_ROBE, 1);
Квесты содержат динамические условия Java. Выражения выдачи включают промежуточные предметы, варианты и случайные награды; это не гарантированная награда. Константы приведены выше. Полные условия — в исходнике.
Тексты квеста
[31961-01.htm] Head Blacksmith Newyear: Say, you may not have heard, but there is a new type of armor available that's only for members of a clan academy. Would you like to have a suit of it? I can make one for you... Tell him you want it.
[31961-02.htm] Head Blacksmith Newyear: Say, you may not have heard, but there is a new type of armor available - but only for members of the clan academy. Would you like to have a suit of it? I can make one for you... Oh, wait, I fear you don't meet the prerequisites. I'm sorry. (Only level 19 and higher characters who are clan academy members, and who have a sponsor, are permitted to take on the quest.)
[31961-02a.html] Head Blacksmith Newyear: Oh, don't be greedy, now. You've already received a set of Clan Academy armor from Blacksmith Pinter of Gludio... (This quest is not available to characters who are engaged in the quest To Lead and Be Led.)
[31961-02b.htm] Head Blacksmith Newyear: Oh, come now. You've already gotten a fine set of Clan Academy armor from Blacksmith Pinter of Gludio. (This quest is not available to characters who are engaged in the quest To Lead and Be Led.)
[31961-03.htm] Head Blacksmith Newyear: Oh, don't you worry about getting this for free. Nothing's for nothing, you know. In fact, you will need to fetch me every single piece of material required to make it! But it'll be worth the effort, I promise you. You can't buy this kind of armor in a store. First, you must defeat the Brun Lizardmen to the south of the village, and then bring me 10 bottles of their blood. Their blood is the activator in the epoxy I use for the armor. Go, make haste!
[31961-04.html] Head Blacksmith Newyear: First, you must defeat the Brun Lizardmen to the south of the village, and then bring me 10 bottles of their blood. Their blood is the activator in the epoxy I use for the armor. Go, make haste!
[31961-05.html] Head Blacksmith Newyear: Great! Fine work! Now, I need some D-Grade Crystals... but before we get into that, I need to know what kind of armor you want. That will dictate the terms of our agreement, including, of course, the number of crystals you will need to gather. Heavy Light Robe
[31961-05a.html] Head Blacksmith Newyear: Okay, heavy armor it is. But I'm going to give you one chance to reconsider, for once I start making this suit, there's no way to reverse the choice. Tell him you want heavy armor. Tell him you will think about it again.
[31961-05b.html] Head Blacksmith Newyear: Very well, one suit of light armor. But I'm going to give you one chance to reconsider, for once I start making this suit, there's no way to reverse the choice. Tell him you want light armor. Tell him you will think about it again.
[31961-05c.html] Head Blacksmith Newyear: A robe it shall be, then. But I'm going to give you one chance to reconsider, for once I start making this item, there's no way to reverse the choice. Tell him you want robe armor. Tell him you will think about it again.
[31961-05d.html] Head Blacksmith Newyear: Very well, heavy armor then. But I don't think you have the number of D-Grade Crystals I'll need for this; you're far too inexperienced. Perhaps you could ask your sponsor to bring 922 D-Grade Crystals. Come now, don't make a long face. These crystals are integral to the process of making the armor. I can't afford to supply them for free - this isn't a charity, you know. Oh, yes, one other requirement: you will have to accompany your sponsor here. Otherwise, if he comes here alone, how in the world will I know he's your sponsor?
[31961-05e.html] Head Blacksmith Newyear: Light armor it is, then. But I don't think you have the number of D-Grade Crystals I'll need for this; you're far too inexperienced. Perhaps you could ask your sponsor to bring 771 D-Grade Crystals. Come now, don't make a long face. These crystals are integral to the process of making the armor. I can't afford to supply them for free - this isn't a charity, you know. Oh, yes, one other requirement: you will have to accompany your sponsor here. Otherwise, if he comes here alone, how in the world will I know he's your sponsor?
[31961-05f.html] Head Blacksmith Newyear: I will make you a robe, then. Unfortunately, I suspect that you won't have the number of D-Grade Crystals I'll need for this; you're far too inexperienced. Perhaps you could ask your sponsor to bring 771 D-Grade Crystals. Come, now, don't make a long face. These crystals are integral to the process of making the armor. I can't afford to supply them for free - this isn't a charity, you know. Oh, yes, one other requirement: you will have to accompany your sponsor here. Otherwise, if he comes here alone, how in the world will I know he's your sponsor?
[31961-05g.html] Head Blacksmith Newyear: Very well. Think it over and let me know.
[31961-06.html] Head Blacksmith Newyear: Ask your sponsor to bring 922 D-Grade Crystals. Come, now, don't make a long face. These crystals are integral to the process of making the armor. I can't afford to supply them for free - this isn't a charity, you know. Oh, yes, one other requirement: you will have to accompany your sponsor here. Otherwise, if he comes here alone, how in the world will I know he's your sponsor?
[31961-06a.html] Head Blacksmith Newyear: Go ask your sponsor to bring 922 D-Grade Crystals. Come, now, don't make a long face. These crystals are integral to the process of making the armor. I can't afford to supply them for free - this isn't a charity, you know. What's that you say? You don't have a sponsor? Oh, for crying out loud! Why didn't you tell me that before wasting my time? Come back and see me again after you find a sponsor.
[31961-06b.html] Head Blacksmith Newyear: Go ask your sponsor to bring 771 D-Grade Crystals. Come, now, don't make a long face. These crystals are integral to the process of making the armor. I can't afford to supply them for free - this isn't a charity, you know. What's that you say? You don't have a sponsor? Oh, for crying out loud! Why didn't you tell me that before wasting my time? Come back and see me again after you find a sponsor.
[31961-06c.html] Head Blacksmith Newyear: Go ask your sponsor to bring 771 D-Grade Crystals. Come, now, don't make a long face. These crystals are integral to the process of making the armor. I can't afford to supply them for free - this isn't a charity, you know. What's that you say? You don't have a sponsor? Oh, for crying out loud! Why didn't you tell me that before wasting my time? Come back and see me again after you find a sponsor.
[31961-06d.html] Head Blacksmith Newyear: Ask your sponsor to bring 771 D-Grade Crystals. Come, now, don't make a long face. These crystals are integral to the process of making the armor. I can't afford to supply them for free - this isn't a charity, you know. Oh, yes, one other requirement: you will have to accompany your sponsor here. Otherwise, if he comes here alone, how in the world will I know he's your sponsor?
[31961-06e.html] Head Blacksmith Newyear: Ask your sponsor to bring 771 D-Grade Crystals. Come, now, don't make a long face. These crystals are integral to the process of making the armor. I can't afford to supply them for free - this isn't a charity, you know. Oh, yes, one other requirement: you will have to accompany your sponsor here. Otherwise, if he comes here alone, how in the world will I know that he's your sponsor?
[31961-07.html] Head Blacksmith Newyear: Well, where is your sponsor, then? Go bring him here.
[31961-08.html] Head Blacksmith Newyear: Ah, here you are again. Did you bring the D-Grade Crystals as we arranged? Hand him the D-Grade Crystals.
[31961-09.html] Head Blacksmith Newyear: Who are you? A sponsor, you say, but whose? Go get your apprentice. I can't be expected to remember every apprentice and every sponsor, can I?
[31961-10.html] Head Blacksmith Newyear: Thank you for supplying these crystals. Now I have something to tell your apprentice, so please ask him to come talk to me.
[31961-11.html] Head Blacksmith Newyear: Well, what is this? I need more crystals. Please bring me 922 D-Grade Crystals if you want this job done.
[31961-11a.html] Head Blacksmith Newyear: These aren't enough crystals. Please bring me 771 D-Grade Crystals so that I can make your armor.
[31961-12.html] Head Blacksmith Newyear: I have something to tell your apprentice, so please ask him to come talk to me.
[31961-14.html] Head Blacksmith Newyear: I don't think you have any business here - this is my place, and I have nothing to discuss with you.
[31961-15.html] Head Blacksmith Newyear: Well, these are all the materials I need for the armor, but... I have one last whim. I want to see just how close you and your sponsor really are. Go to the southwest of the village and defeat the Piccat Arachnids. Bring me 8 Arachnid legs as proof. But here's the catch: you must defeat the Piccat Arachnid while your Sponsor is watching. I think this is the perfect chance for you to show your sponsor how much you've grown. And, just in case you get into some trouble, your sponsor's presence may be very beneficial. Whatever happens, I believe this will be beneficial to your mutual relationship. I will work on the armor while you go to confront the Piccat Arachnid.
[31961-16.html] Head Blacksmith Newyear: Go to the southwest of the village and defeat the Piccat Arachnids. Bring me 8 Arachnid legs as proof. But here's the catch: you must defeat the Piccat Arachnid while your sponsor is watching. I think this is the perfect chance for you to show your sponsor how much you've grown. And, just in case you get into some trouble, your sponsor's presence may be very beneficial. Whatever happens, I believe this will be beneficial to your mutual relationship. I will work on the armor while you go to confront the Piccat Arachnid.
[31961-17.html] Head Blacksmith Newyear: And here you are, with your Arachnid trophy! I trust your sponsor was suitably impressed. He should be. Here's the armor. I hope it serves you well.
Исходник условий и наград (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.Q00123_TheLeaderAndTheFollower;
import org.l2jmobius.gameserver.config.PlayerConfig;
import org.l2jmobius.gameserver.entity.World;
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;
import org.l2jmobius.gameserver.util.LocationUtil;
import quests.Q00118_ToLeadAndBeLed.Q00118_ToLeadAndBeLed;
/**
* The Leader And The Follower (123)
* @author ivantotov
*/
public class Q00123_TheLeaderAndTheFollower extends Quest
{
// NPC
private static final int HEAD_BLACKSMITH_NEWYEAR = 31961;
// Items
private static final int CRYSTAL_D = 1458;
private static final int BRUIN_LIZARDMAN_BLOOD = 8549;
private static final int PICOT_ARANEIDS_LEG = 8550;
// Reward
private static final int CLAN_OATH_HELM = 7850;
private static final int CLAN_OATH_ARMOR = 7851;
private static final int CLAN_OATH_GAUNTLETS_HEAVY_ARMOR = 7852;
private static final int CLAN_OATH_SABATON_HEAVY_ARMOR = 7853;
private static final int CLAN_OATH_BRIGANDINE = 7854;
private static final int CLAN_OATH_LEATHER_GLOVES_LIGHT_ARMOR = 7855;
private static final int CLAN_OATH_BOOTS_LIGHT_ARMOR = 7856;
private static final int CLAN_OATH_AKETON = 7857;
private static final int CLAN_OATH_PADDED_GLOVES_ROBE = 7858;
private static final int CLAN_OATH_SANDALS_ROBE = 7859;
// Quest Monster
private static final int BRUIN_LIZARDMAN = 27321;
private static final int PICOT_ARANEID = 27322;
// Misc
private static final int MIN_LEVEL = 19;
private static final int CRYSTAL_COUNT_1 = 922;
private static final int CRYSTAL_COUNT_2 = 771;
public Q00123_TheLeaderAndTheFollower()
{
super(123, "The Leader and the Follower");
addStartNpc(HEAD_BLACKSMITH_NEWYEAR);
addTalkId(HEAD_BLACKSMITH_NEWYEAR);
addKillId(BRUIN_LIZARDMAN, PICOT_ARANEID);
registerQuestItems(BRUIN_LIZARDMAN_BLOOD, PICOT_ARANEIDS_LEG);
}
@Override
public String onEvent(String event, Npc npc, Player player)
{
String htmltext = null;
// Manage Sponsor's quest events.
if (player.getApprentice() > 0)
{
final Player apprentice = World.getPlayer(player.getApprentice());
if (apprentice == null)
{
return htmltext;
}
final QuestState q123 = apprentice.getQuestState(Q00123_TheLeaderAndTheFollower.class.getSimpleName());
switch (event)
{
case "sponsor":
{
if (!LocationUtil.checkIfInRange(PlayerConfig.ALT_PARTY_RANGE, npc, apprentice, true))
{
htmltext = "31961-09.html";
}
else
{
if ((q123 == null) || (!q123.isMemoState(2) && !q123.isMemoState(3)))
{
htmltext = "31961-14.html";
}
else if (q123.isMemoState(2))
{
htmltext = "31961-08.html";
}
else if (q123.isMemoState(3))
{
htmltext = "31961-12.html";
}
}
break;
}
case "31961-10.html":
{
if (LocationUtil.checkIfInRange(PlayerConfig.ALT_PARTY_RANGE, npc, apprentice, true) && (q123 != null) && q123.isMemoState(2))
{
switch (q123.getMemoStateEx(1))
{
case 1:
{
if (getQuestItemsCount(player, CRYSTAL_D) >= CRYSTAL_COUNT_1)
{
takeItems(player, CRYSTAL_D, CRYSTAL_COUNT_1);
q123.setMemoState(3);
q123.setCond(6, true);
htmltext = event;
}
else
{
htmltext = "31961-11.html";
}
break;
}
case 2:
case 3:
{
if (getQuestItemsCount(player, CRYSTAL_D) >= CRYSTAL_COUNT_2)
{
takeItems(player, CRYSTAL_D, CRYSTAL_COUNT_2);
q123.setMemoState(3);
q123.setCond(6, true);
htmltext = event;
}
else
{
htmltext = "31961-11a.html";
}
break;
}
}
}
}
break;
}
return htmltext;
}
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
switch (event)
{
case "31961-03.htm":
{
if (qs.isCreated())
{
qs.startQuest();
qs.setMemoState(1);
htmltext = event;
}
break;
}
case "31961-05a.html":
case "31961-05b.html":
case "31961-05c.html":
case "31961-05g.html":
{
htmltext = event;
break;
}
case "31961-05d.html":
{
if (qs.isMemoState(1) && (getQuestItemsCount(player, BRUIN_LIZARDMAN_BLOOD) >= 10))
{
takeItems(player, BRUIN_LIZARDMAN_BLOOD, -1);
qs.setMemoState(2);
qs.setMemoStateEx(1, 1);
qs.setCond(3, true);
htmltext = event;
}
break;
}
case "31961-05e.html":
{
if (qs.isMemoState(1) && (getQuestItemsCount(player, BRUIN_LIZARDMAN_BLOOD) >= 10))
{
takeItems(player, BRUIN_LIZARDMAN_BLOOD, -1);
qs.setMemoState(2);
qs.setMemoStateEx(1, 2);
qs.setCond(4, true);
htmltext = event;
}
break;
}
case "31961-05f.html":
{
if (qs.isMemoState(1) && (getQuestItemsCount(player, BRUIN_LIZARDMAN_BLOOD) >= 10))
{
takeItems(player, BRUIN_LIZARDMAN_BLOOD, -1);
qs.setMemoState(2);
qs.setMemoStateEx(1, 3);
qs.setCond(5, true);
htmltext = event;
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
final QuestState qs = getQuestState(player, true);
final QuestState q118 = player.getQuestState(Q00118_ToLeadAndBeLed.class.getSimpleName());
String htmltext = getNoQuestMsg(player);
switch (qs.getState())
{
case State.CREATED:
{
if ((q118 != null) && q118.isStarted())
{
htmltext = "31961-02b.htm";
}
else if ((q118 != null) && q118.isCompleted())
{
htmltext = "31961-02a.html";
}
else if ((player.getLevel() >= MIN_LEVEL) && (player.getPledgeType() == -1) && (player.getSponsor() > 0))
{
htmltext = "31961-01.htm";
}
else
{
htmltext = "31961-02.htm";
}
break;
}
case State.STARTED:
{
if (qs.isMemoState(1))
{
if (getQuestItemsCount(player, BRUIN_LIZARDMAN_BLOOD) < 10)
{
htmltext = "31961-04.html";
}
else
{
htmltext = "31961-05.html";
}
}
else if (qs.isMemoState(2))
{
if (player.getSponsor() == 0)
{
if (qs.getMemoStateEx(1) == 1)
{
htmltext = "31961-06a.html";
}
else if (qs.getMemoStateEx(1) == 2)
{
htmltext = "31961-06b.html";
}
else if (qs.getMemoStateEx(1) == 3)
{
htmltext = "31961-06c.html";
}
}
else
{
final Player c0 = World.getPlayer(player.getSponsor());
if ((c0 != null) && LocationUtil.checkIfInRange(PlayerConfig.ALT_PARTY_RANGE, npc, c0, true))
{
htmltext = "31961-07.html";
}
else
{
if (qs.getMemoStateEx(1) == 1)
{
htmltext = "31961-06.html";
}
else if (qs.getMemoStateEx(1) == 2)
{
htmltext = "31961-06d.html";
}
else if (qs.getMemoStateEx(1) == 3)
{
htmltext = "31961-06e.html";
}
}
}
}
else if (qs.isMemoState(3))
{
qs.setMemoState(4);
qs.setCond(7, true);
htmltext = "31961-15.html";
}
else if (qs.isMemoState(4))
{
if (getQuestItemsCount(player, PICOT_ARANEIDS_LEG) < 8)
{
htmltext = "31961-16.html";
}
else
{
if (qs.getMemoStateEx(1) == 1)
{
giveItems(player, CLAN_OATH_HELM, 1);
giveItems(player, CLAN_OATH_ARMOR, 1);
giveItems(player, CLAN_OATH_GAUNTLETS_HEAVY_ARMOR, 1);
giveItems(player, CLAN_OATH_SABATON_HEAVY_ARMOR, 1);
takeItems(player, PICOT_ARANEIDS_LEG, -1);
}
else if (qs.getMemoStateEx(1) == 2)
{
giveItems(player, CLAN_OATH_HELM, 1);
giveItems(player, CLAN_OATH_BRIGANDINE, 1);
giveItems(player, CLAN_OATH_LEATHER_GLOVES_LIGHT_ARMOR, 1);
giveItems(player, CLAN_OATH_BOOTS_LIGHT_ARMOR, 1);
takeItems(player, PICOT_ARANEIDS_LEG, -1);
}
else if (qs.getMemoStateEx(1) == 3)
{
giveItems(player, CLAN_OATH_HELM, 1);
giveItems(player, CLAN_OATH_AKETON, 1);
giveItems(player, CLAN_OATH_PADDED_GLOVES_ROBE, 1);
giveItems(player, CLAN_OATH_SANDALS_ROBE, 1);
takeItems(player, PICOT_ARANEIDS_LEG, -1);
}
qs.exitQuest(false, true);
htmltext = "31961-17.html";
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
@Override
public void onKill(Npc npc, Player killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isStarted())
{
switch (npc.getId())
{
case BRUIN_LIZARDMAN:
{
if (qs.isMemoState(1) && giveItemRandomly(killer, npc, BRUIN_LIZARDMAN_BLOOD, 1, 10, 7, true))
{
qs.setCond(2);
}
break;
}
case PICOT_ARANEID:
{
if (qs.isMemoState(4) && (killer.getSponsor() > 0))
{
final Player c0 = World.getPlayer(killer.getSponsor());
if ((c0 != null) && LocationUtil.checkIfInRange(PlayerConfig.ALT_PARTY_RANGE, npc, c0, true) && giveItemRandomly(killer, npc, PICOT_ARANEIDS_LEG, 1, 8, 7, true))
{
qs.setCond(8);
}
}
break;
}
}
}
}
}