Quest condition is now cached in a separate QuestState variable.
This commit is contained in:
@@ -174,7 +174,7 @@ public class FeedableBeasts extends Quest
|
||||
// TODO: no grendels?
|
||||
GrowthCapableMob temp;
|
||||
|
||||
//@formatter:off
|
||||
// @formatter:off
|
||||
final int[][] Kookabura_0_Gold = {{ 21452, 21453, 21454, 21455 }};
|
||||
final int[][] Kookabura_0_Crystal = {{ 21456, 21457, 21458, 21459 }};
|
||||
final int[][] Kookabura_1_Gold_1= {{ 21460, 21462 }};
|
||||
@@ -199,7 +199,7 @@ public class FeedableBeasts extends Quest
|
||||
final int[][] Cougar_1_Crystal_2 = {{ 21503,21505 }};
|
||||
final int[][] Cougar_2_1 = {{ 21506, 21828 }, { 16015,16016 }};
|
||||
final int[][] Cougar_2_2 = {{ 21507, 21829 }, { 16015,16016 }};
|
||||
//@formatter:on
|
||||
// @formatter:on
|
||||
|
||||
// Alpen Kookabura
|
||||
temp = new GrowthCapableMob(0, 100);
|
||||
@@ -412,7 +412,7 @@ public class FeedableBeasts extends Quest
|
||||
if ((st != null) && (Rnd.get(100) < 5) && !st.hasQuestItems(7185))
|
||||
{
|
||||
st.giveItems(7185, 1);
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
|
||||
// Also, perform a rare random chat
|
||||
|
||||
@@ -44,12 +44,10 @@ public class NewbieHelper extends Quest
|
||||
private static final int LICENSE_OF_MINER = 1498;
|
||||
// Orc
|
||||
private static final int VOUCHER_OF_FLAME = 1496;
|
||||
|
||||
// Items Reward
|
||||
private static final int SOULSHOT_NOVICE = 5789;
|
||||
private static final int SPIRITSHOT_NOVICE = 5790;
|
||||
private static final int BLUE_GEM = 6353;
|
||||
|
||||
private static final Map<String, Event> _events = new HashMap<>();
|
||||
static
|
||||
{
|
||||
@@ -60,7 +58,6 @@ public class NewbieHelper extends Quest
|
||||
_events.put("30528_02", new Event("30528-03.htm", 115642, -178046, -941, LICENSE_OF_MINER, 0x35, SOULSHOT_NOVICE, 200, 0x00, 0, 0));
|
||||
_events.put("30573_02", new Event("30573-03.htm", -45067, -113549, -235, VOUCHER_OF_FLAME, 0x31, SOULSHOT_NOVICE, 200, 0x2c, SOULSHOT_NOVICE, 200));
|
||||
}
|
||||
|
||||
// @formatter:off
|
||||
private static final Map<Integer, Talk> _talks = new HashMap<>();
|
||||
static
|
||||
@@ -89,11 +86,8 @@ public class NewbieHelper extends Quest
|
||||
public NewbieHelper()
|
||||
{
|
||||
super(-1, "ai/others");
|
||||
|
||||
addStartNpc(30009, 30019, 30131, 30400, 30530, 30575);
|
||||
|
||||
addTalkId(30009, 30019, 30131, 30400, 30530, 30575, 30008, 30017, 30129, 30370, 30528, 30573);
|
||||
|
||||
addFirstTalkId(new int[]
|
||||
{
|
||||
30009, // Newbie Helper - Human
|
||||
@@ -116,7 +110,6 @@ public class NewbieHelper extends Quest
|
||||
30528, // Foreman - Dwarf
|
||||
30573 // Flame Guardian - Orc
|
||||
});
|
||||
|
||||
addKillId(18342);
|
||||
}
|
||||
|
||||
@@ -248,12 +241,12 @@ public class NewbieHelper extends Quest
|
||||
{
|
||||
String htmltext = "";
|
||||
QuestState qs1 = player.getQuestState(getName());
|
||||
final QuestState qs2 = player.getQuestState(Tutorial.class.getSimpleName());
|
||||
if (qs1 == null)
|
||||
{
|
||||
qs1 = newQuestState(player);
|
||||
}
|
||||
|
||||
final QuestState qs2 = player.getQuestState(Tutorial.class.getSimpleName());
|
||||
if ((qs2 == null) || Config.DISABLE_TUTORIAL)
|
||||
{
|
||||
npc.showChatWindow(player);
|
||||
|
||||
@@ -50,9 +50,7 @@ public class KetraOrcSupport extends Quest
|
||||
private static final int JAFF = 31374; // Warehouse Keeper
|
||||
private static final int JUMARA = 31375; // Trader
|
||||
private static final int KURFA = 31376; // Gate Keeper
|
||||
|
||||
private static final int HORN = 7186;
|
||||
|
||||
private static final int[] KETRAS =
|
||||
{
|
||||
21324,
|
||||
@@ -77,44 +75,19 @@ public class KetraOrcSupport extends Quest
|
||||
21348,
|
||||
21349
|
||||
};
|
||||
|
||||
private static final int[][] BUFF =
|
||||
{
|
||||
{
|
||||
4359,
|
||||
2
|
||||
}, // Focus: Requires 2 Buffalo Horns
|
||||
{
|
||||
4360,
|
||||
2
|
||||
}, // Death Whisper: Requires 2 Buffalo Horns
|
||||
{
|
||||
4345,
|
||||
3
|
||||
}, // Might: Requires 3 Buffalo Horns
|
||||
{
|
||||
4355,
|
||||
3
|
||||
}, // Acumen: Requires 3 Buffalo Horns
|
||||
{
|
||||
4352,
|
||||
3
|
||||
}, // Berserker: Requires 3 Buffalo Horns
|
||||
{
|
||||
4354,
|
||||
3
|
||||
}, // Vampiric Rage: Requires 3 Buffalo Horns
|
||||
{
|
||||
4356,
|
||||
6
|
||||
}, // Empower: Requires 6 Buffalo Horns
|
||||
{
|
||||
4357,
|
||||
6
|
||||
}
|
||||
// Haste: Requires 6 Buffalo Horns
|
||||
// @formatter:off
|
||||
{4359, 2}, // Focus: Requires 2 Buffalo Horns
|
||||
{4360, 2}, // Death Whisper: Requires 2 Buffalo Horns
|
||||
{4345, 3}, // Might: Requires 3 Buffalo Horns
|
||||
{4355, 3}, // Acumen: Requires 3 Buffalo Horns
|
||||
{4352, 3}, // Berserker: Requires 3 Buffalo Horns
|
||||
{4354, 3}, // Vampiric Rage: Requires 3 Buffalo Horns
|
||||
{4356, 6}, // Empower: Requires 6 Buffalo Horns
|
||||
{4357, 6}, // Haste: Requires 6 Buffalo Horns
|
||||
// @formatter:on
|
||||
};
|
||||
|
||||
private static final Skill VARKA_KETRA_PETRIFICATION = SkillTable.getInstance().getSkill(4578, 1);
|
||||
|
||||
/**
|
||||
@@ -185,11 +158,15 @@ public class KetraOrcSupport extends Quest
|
||||
switch (player.getAllianceWithVarkaKetra())
|
||||
{
|
||||
case 4:
|
||||
{
|
||||
htmltext = "31376-4.htm";
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
htmltext = "31376-5.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -211,6 +188,7 @@ public class KetraOrcSupport extends Quest
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case KADUN:
|
||||
{
|
||||
if (allianceLevel > 0)
|
||||
{
|
||||
htmltext = "31370-friend.htm";
|
||||
@@ -220,8 +198,9 @@ public class KetraOrcSupport extends Quest
|
||||
htmltext = "31370-no.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case WAHKAN:
|
||||
{
|
||||
if (allianceLevel > 0)
|
||||
{
|
||||
htmltext = "31371-friend.htm";
|
||||
@@ -231,8 +210,9 @@ public class KetraOrcSupport extends Quest
|
||||
htmltext = "31371-no.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ASEFA:
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
if (allianceLevel < 1)
|
||||
{
|
||||
@@ -254,8 +234,9 @@ public class KetraOrcSupport extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ATAN:
|
||||
{
|
||||
if (player.getKarma() >= 1)
|
||||
{
|
||||
htmltext = "31373-pk.htm";
|
||||
@@ -273,18 +254,24 @@ public class KetraOrcSupport extends Quest
|
||||
htmltext = "31373-2.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case JAFF:
|
||||
{
|
||||
switch (allianceLevel)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
htmltext = "31374-1.htm";
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
case 3:
|
||||
{
|
||||
htmltext = "31374-2.htm";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
if (allianceLevel <= 0)
|
||||
{
|
||||
htmltext = "31374-no.htm";
|
||||
@@ -298,29 +285,40 @@ public class KetraOrcSupport extends Quest
|
||||
htmltext = "31374-4.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case JUMARA:
|
||||
{
|
||||
switch (allianceLevel)
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
htmltext = "31375-1.htm";
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
case 4:
|
||||
{
|
||||
htmltext = "31375-2.htm";
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
htmltext = "31375-3.htm";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
htmltext = "31375-no.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KURFA:
|
||||
{
|
||||
if (allianceLevel <= 0)
|
||||
{
|
||||
htmltext = "31376-no.htm";
|
||||
@@ -338,6 +336,7 @@ public class KetraOrcSupport extends Quest
|
||||
htmltext = "31376-3.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -376,6 +375,7 @@ public class KetraOrcSupport extends Quest
|
||||
case HEAL_STATIC:
|
||||
case BALANCE_LIFE:
|
||||
case HOT:
|
||||
{
|
||||
for (WorldObject target : skill.getTargetList(caster))
|
||||
{
|
||||
// Character isn't existing, or is current caster, we drop check.
|
||||
@@ -419,6 +419,7 @@ public class KetraOrcSupport extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -49,9 +49,7 @@ public class VarkaSilenosSupport extends Quest
|
||||
private static final int HAGOS = 31381; // Warehouse Keeper
|
||||
private static final int SHIKON = 31382; // Trader
|
||||
private static final int TERANU = 31383; // Teleporter
|
||||
|
||||
private static final int SEED = 7187;
|
||||
|
||||
private static final int[] VARKAS =
|
||||
{
|
||||
21350,
|
||||
@@ -76,44 +74,19 @@ public class VarkaSilenosSupport extends Quest
|
||||
21374,
|
||||
21375
|
||||
};
|
||||
|
||||
private static final int[][] BUFF =
|
||||
{
|
||||
{
|
||||
4359,
|
||||
2
|
||||
}, // Focus: Requires 2 Nepenthese Seeds
|
||||
{
|
||||
4360,
|
||||
2
|
||||
}, // Death Whisper: Requires 2 Nepenthese Seeds
|
||||
{
|
||||
4345,
|
||||
3
|
||||
}, // Might: Requires 3 Nepenthese Seeds
|
||||
{
|
||||
4355,
|
||||
3
|
||||
}, // Acumen: Requires 3 Nepenthese Seeds
|
||||
{
|
||||
4352,
|
||||
3
|
||||
}, // Berserker: Requires 3 Nepenthese Seeds
|
||||
{
|
||||
4354,
|
||||
3
|
||||
}, // Vampiric Rage: Requires 3 Nepenthese Seeds
|
||||
{
|
||||
4356,
|
||||
6
|
||||
}, // Empower: Requires 6 Nepenthese Seeds
|
||||
{
|
||||
4357,
|
||||
6
|
||||
}
|
||||
// Haste: Requires 6 Nepenthese Seeds
|
||||
// @formatter:off
|
||||
{4359, 2}, // Focus: Requires 2 Nepenthese Seeds
|
||||
{4360, 2}, // Death Whisper: Requires 2 Nepenthese Seeds
|
||||
{4345, 3}, // Might: Requires 3 Nepenthese Seeds
|
||||
{4355, 3}, // Acumen: Requires 3 Nepenthese Seeds
|
||||
{4352, 3}, // Berserker: Requires 3 Nepenthese Seeds
|
||||
{4354, 3}, // Vampiric Rage: Requires 3 Nepenthese Seeds
|
||||
{4356, 6}, // Empower: Requires 6 Nepenthese Seeds
|
||||
{4357, 6}, // Haste: Requires 6 Nepenthese Seeds
|
||||
// @formatter:on
|
||||
};
|
||||
|
||||
private static final Skill VARKA_KETRA_PETRIFICATION = SkillTable.getInstance().getSkill(4578, 1);
|
||||
|
||||
/**
|
||||
@@ -184,11 +157,15 @@ public class VarkaSilenosSupport extends Quest
|
||||
switch (player.getAllianceWithVarkaKetra())
|
||||
{
|
||||
case -4:
|
||||
{
|
||||
htmltext = "31383-4.htm";
|
||||
break;
|
||||
}
|
||||
case -5:
|
||||
{
|
||||
htmltext = "31383-5.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,6 +187,7 @@ public class VarkaSilenosSupport extends Quest
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ASHAS:
|
||||
{
|
||||
if (allianceLevel < 0)
|
||||
{
|
||||
htmltext = "31377-friend.htm";
|
||||
@@ -219,8 +197,9 @@ public class VarkaSilenosSupport extends Quest
|
||||
htmltext = "31377-no.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case NARAN:
|
||||
{
|
||||
if (allianceLevel < 0)
|
||||
{
|
||||
htmltext = "31378-friend.htm";
|
||||
@@ -230,8 +209,9 @@ public class VarkaSilenosSupport extends Quest
|
||||
htmltext = "31378-no.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case UDAN:
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
if (allianceLevel > -1)
|
||||
{
|
||||
@@ -253,8 +233,9 @@ public class VarkaSilenosSupport extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DIYABU:
|
||||
{
|
||||
if (player.getKarma() >= 1)
|
||||
{
|
||||
htmltext = "31380-pk.htm";
|
||||
@@ -272,18 +253,24 @@ public class VarkaSilenosSupport extends Quest
|
||||
htmltext = "31380-2.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case HAGOS:
|
||||
{
|
||||
switch (allianceLevel)
|
||||
{
|
||||
case -1:
|
||||
{
|
||||
htmltext = "31381-1.htm";
|
||||
break;
|
||||
}
|
||||
case -2:
|
||||
case -3:
|
||||
{
|
||||
htmltext = "31381-2.htm";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
if (allianceLevel >= 0)
|
||||
{
|
||||
htmltext = "31381-no.htm";
|
||||
@@ -297,29 +284,40 @@ public class VarkaSilenosSupport extends Quest
|
||||
htmltext = "31381-4.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SHIKON:
|
||||
{
|
||||
switch (allianceLevel)
|
||||
{
|
||||
case -2:
|
||||
{
|
||||
htmltext = "31382-1.htm";
|
||||
break;
|
||||
}
|
||||
case -3:
|
||||
case -4:
|
||||
{
|
||||
htmltext = "31382-2.htm";
|
||||
break;
|
||||
}
|
||||
case -5:
|
||||
{
|
||||
htmltext = "31382-3.htm";
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
htmltext = "31382-no.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TERANU:
|
||||
{
|
||||
if (allianceLevel >= 0)
|
||||
{
|
||||
htmltext = "31383-no.htm";
|
||||
@@ -337,6 +335,7 @@ public class VarkaSilenosSupport extends Quest
|
||||
htmltext = "31383-3.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -375,6 +374,7 @@ public class VarkaSilenosSupport extends Quest
|
||||
case HEAL_STATIC:
|
||||
case BALANCE_LIFE:
|
||||
case HOT:
|
||||
{
|
||||
for (WorldObject target : skill.getTargetList(caster))
|
||||
{
|
||||
// Character isn't existing, or is current caster, we drop check.
|
||||
@@ -418,6 +418,7 @@ public class VarkaSilenosSupport extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,26 +24,22 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q001_LettersOfLove extends Quest
|
||||
{
|
||||
// Npcs
|
||||
// NPCs
|
||||
private static final int DARIN = 30048;
|
||||
private static final int ROXXY = 30006;
|
||||
private static final int BAULRO = 30033;
|
||||
|
||||
// Items
|
||||
private static final int DARIN_LETTER = 687;
|
||||
private static final int ROXXY_KERCHIEF = 688;
|
||||
private static final int DARIN_RECEIPT = 1079;
|
||||
private static final int BAULRO_POTION = 1080;
|
||||
|
||||
// Reward
|
||||
private static final int NECKLACE = 906;
|
||||
|
||||
public Q001_LettersOfLove()
|
||||
{
|
||||
super(1, "Letters of Love");
|
||||
|
||||
registerQuestItems(DARIN_LETTER, ROXXY_KERCHIEF, DARIN_RECEIPT, BAULRO_POTION);
|
||||
|
||||
addStartNpc(DARIN);
|
||||
addTalkId(DARIN, ROXXY, BAULRO);
|
||||
}
|
||||
@@ -60,9 +56,7 @@ public class Q001_LettersOfLove extends Quest
|
||||
|
||||
if (event.equals("30048-06.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(DARIN_LETTER, 1);
|
||||
}
|
||||
|
||||
@@ -82,14 +76,17 @@ public class Q001_LettersOfLove extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 2) ? "30048-01.htm" : "30048-02.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case DARIN:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30048-07.htm";
|
||||
@@ -97,7 +94,7 @@ public class Q001_LettersOfLove extends Quest
|
||||
else if (cond == 2)
|
||||
{
|
||||
htmltext = "30048-08.htm";
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ROXXY_KERCHIEF, 1);
|
||||
st.giveItems(DARIN_RECEIPT, 1);
|
||||
@@ -115,12 +112,13 @@ public class Q001_LettersOfLove extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ROXXY:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30006-01.htm";
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(DARIN_LETTER, 1);
|
||||
st.giveItems(ROXXY_KERCHIEF, 1);
|
||||
@@ -134,12 +132,13 @@ public class Q001_LettersOfLove extends Quest
|
||||
htmltext = "30006-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BAULRO:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "30033-01.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(DARIN_RECEIPT, 1);
|
||||
st.giveItems(BAULRO_POTION, 1);
|
||||
@@ -149,12 +148,15 @@ public class Q001_LettersOfLove extends Quest
|
||||
htmltext = "30033-02.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -30,23 +30,19 @@ public class Q002_WhatWomenWant extends Quest
|
||||
private static final int MIRABEL = 30146;
|
||||
private static final int HERBIEL = 30150;
|
||||
private static final int GREENIS = 30157;
|
||||
|
||||
// Items
|
||||
private static final int ARUJIEN_LETTER_1 = 1092;
|
||||
private static final int ARUJIEN_LETTER_2 = 1093;
|
||||
private static final int ARUJIEN_LETTER_3 = 1094;
|
||||
private static final int POETRY_BOOK = 689;
|
||||
private static final int GREENIS_LETTER = 693;
|
||||
|
||||
// Rewards
|
||||
private static final int MYSTICS_EARRING = 113;
|
||||
|
||||
public Q002_WhatWomenWant()
|
||||
{
|
||||
super(2, "What Women Want");
|
||||
|
||||
registerQuestItems(ARUJIEN_LETTER_1, ARUJIEN_LETTER_2, ARUJIEN_LETTER_3, POETRY_BOOK, GREENIS_LETTER);
|
||||
|
||||
addStartNpc(ARUJIEN);
|
||||
addTalkId(ARUJIEN, MIRABEL, HERBIEL, GREENIS);
|
||||
}
|
||||
@@ -61,26 +57,30 @@ public class Q002_WhatWomenWant extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30223-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(ARUJIEN_LETTER_1, 1);
|
||||
}
|
||||
else if (event.equals("30223-08.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ARUJIEN_LETTER_3, 1);
|
||||
st.giveItems(POETRY_BOOK, 1);
|
||||
}
|
||||
else if (event.equals("30223-09.htm"))
|
||||
{
|
||||
st.takeItems(ARUJIEN_LETTER_3, 1);
|
||||
st.rewardItems(57, 450);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30223-04.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
st.giveItems(ARUJIEN_LETTER_1, 1);
|
||||
break;
|
||||
}
|
||||
case "30223-08.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ARUJIEN_LETTER_3, 1);
|
||||
st.giveItems(POETRY_BOOK, 1);
|
||||
break;
|
||||
}
|
||||
case "30223-09.htm":
|
||||
{
|
||||
st.takeItems(ARUJIEN_LETTER_3, 1);
|
||||
st.rewardItems(57, 450);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -99,6 +99,7 @@ public class Q002_WhatWomenWant extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getRace() != Race.ELF) && (player.getRace() != Race.HUMAN))
|
||||
{
|
||||
htmltext = "30223-00.htm";
|
||||
@@ -112,12 +113,14 @@ public class Q002_WhatWomenWant extends Quest
|
||||
htmltext = "30223-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ARUJIEN:
|
||||
{
|
||||
if (st.hasQuestItems(ARUJIEN_LETTER_1))
|
||||
{
|
||||
htmltext = "30223-05.htm";
|
||||
@@ -143,12 +146,13 @@ public class Q002_WhatWomenWant extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MIRABEL:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30146-01.htm";
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ARUJIEN_LETTER_1, 1);
|
||||
st.giveItems(ARUJIEN_LETTER_2, 1);
|
||||
@@ -158,12 +162,13 @@ public class Q002_WhatWomenWant extends Quest
|
||||
htmltext = "30146-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case HERBIEL:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30150-01.htm";
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ARUJIEN_LETTER_2, 1);
|
||||
st.giveItems(ARUJIEN_LETTER_3, 1);
|
||||
@@ -173,8 +178,9 @@ public class Q002_WhatWomenWant extends Quest
|
||||
htmltext = "30150-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GREENIS:
|
||||
{
|
||||
if (cond < 4)
|
||||
{
|
||||
htmltext = "30157-01.htm";
|
||||
@@ -182,7 +188,7 @@ public class Q002_WhatWomenWant extends Quest
|
||||
else if (cond == 4)
|
||||
{
|
||||
htmltext = "30157-02.htm";
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(POETRY_BOOK, 1);
|
||||
st.giveItems(GREENIS_LETTER, 1);
|
||||
@@ -192,12 +198,15 @@ public class Q002_WhatWomenWant extends Quest
|
||||
htmltext = "30157-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -29,19 +29,15 @@ public class Q003_WillTheSealBeBroken extends Quest
|
||||
private static final int ONYX_BEAST_EYE = 1081;
|
||||
private static final int TAINT_STONE = 1082;
|
||||
private static final int SUCCUBUS_BLOOD = 1083;
|
||||
|
||||
// Reward
|
||||
private static final int SCROLL_ENCHANT_ARMOR_D = 956;
|
||||
|
||||
public Q003_WillTheSealBeBroken()
|
||||
{
|
||||
super(3, "Will the Seal be Broken?");
|
||||
|
||||
registerQuestItems(ONYX_BEAST_EYE, TAINT_STONE, SUCCUBUS_BLOOD);
|
||||
|
||||
addStartNpc(30141); // Talloth
|
||||
addTalkId(30141);
|
||||
|
||||
addKillId(20031, 20041, 20046, 20048, 20052, 20057);
|
||||
}
|
||||
|
||||
@@ -57,9 +53,7 @@ public class Q003_WillTheSealBeBroken extends Quest
|
||||
|
||||
if (event.equals("30141-03.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -78,6 +72,7 @@ public class Q003_WillTheSealBeBroken extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.DARK_ELF)
|
||||
{
|
||||
htmltext = "30141-00.htm";
|
||||
@@ -91,9 +86,10 @@ public class Q003_WillTheSealBeBroken extends Quest
|
||||
htmltext = "30141-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30141-04.htm";
|
||||
@@ -109,10 +105,12 @@ public class Q003_WillTheSealBeBroken extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -121,7 +119,7 @@ public class Q003_WillTheSealBeBroken extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "1");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 1);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -130,28 +128,32 @@ public class Q003_WillTheSealBeBroken extends Quest
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case 20031:
|
||||
{
|
||||
if (st.dropItemsAlways(ONYX_BEAST_EYE, 1, 1) && st.hasQuestItems(TAINT_STONE, SUCCUBUS_BLOOD))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 20041:
|
||||
case 20046:
|
||||
{
|
||||
if (st.dropItemsAlways(TAINT_STONE, 1, 1) && st.hasQuestItems(ONYX_BEAST_EYE, SUCCUBUS_BLOOD))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 20048:
|
||||
case 20052:
|
||||
case 20057:
|
||||
{
|
||||
if (st.dropItemsAlways(SUCCUBUS_BLOOD, 1, 1) && st.hasQuestItems(ONYX_BEAST_EYE, TAINT_STONE))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -43,9 +43,7 @@ public class Q004_LongliveThePaagrioLord extends Quest
|
||||
public Q004_LongliveThePaagrioLord()
|
||||
{
|
||||
super(4, "Long live the Pa'agrio Lord!");
|
||||
|
||||
registerQuestItems(1541, 1542, 1543, 1544, 1545, 1546);
|
||||
|
||||
addStartNpc(30578); // Nakusin
|
||||
addTalkId(30578, 30585, 30566, 30562, 30560, 30559, 30587);
|
||||
}
|
||||
@@ -62,9 +60,7 @@ public class Q004_LongliveThePaagrioLord extends Quest
|
||||
|
||||
if (event.equals("30578-03.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -83,6 +79,7 @@ public class Q004_LongliveThePaagrioLord extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.ORC)
|
||||
{
|
||||
htmltext = "30578-00.htm";
|
||||
@@ -96,11 +93,11 @@ public class Q004_LongliveThePaagrioLord extends Quest
|
||||
htmltext = "30578-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
final int npcId = npc.getNpcId();
|
||||
|
||||
if (npcId == NAKUSIN)
|
||||
{
|
||||
if (cond == 1)
|
||||
@@ -140,7 +137,7 @@ public class Q004_LongliveThePaagrioLord extends Quest
|
||||
|
||||
if (count == 6)
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -150,10 +147,12 @@ public class Q004_LongliveThePaagrioLord extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -30,7 +30,6 @@ public class Q005_MinersFavor extends Quest
|
||||
private static final int GARITA = 30518;
|
||||
private static final int REED = 30520;
|
||||
private static final int BRUNON = 30526;
|
||||
|
||||
// Items
|
||||
private static final int BOLTERS_LIST = 1547;
|
||||
private static final int MINING_BOOTS = 1548;
|
||||
@@ -38,16 +37,13 @@ public class Q005_MinersFavor extends Quest
|
||||
private static final int BOOMBOOM_POWDER = 1550;
|
||||
private static final int REDSTONE_BEER = 1551;
|
||||
private static final int BOLTERS_SMELLY_SOCKS = 1552;
|
||||
|
||||
// Reward
|
||||
private static final int NECKLACE = 906;
|
||||
|
||||
public Q005_MinersFavor()
|
||||
{
|
||||
super(5, "Miner's Favor");
|
||||
|
||||
registerQuestItems(BOLTERS_LIST, MINING_BOOTS, MINERS_PICK, BOOMBOOM_POWDER, REDSTONE_BEER, BOLTERS_SMELLY_SOCKS);
|
||||
|
||||
addStartNpc(BOLTER);
|
||||
addTalkId(BOLTER, SHARI, GARITA, REED, BRUNON);
|
||||
}
|
||||
@@ -64,9 +60,7 @@ public class Q005_MinersFavor extends Quest
|
||||
|
||||
if (event.equals("30554-03.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(BOLTERS_LIST, 1);
|
||||
st.giveItems(BOLTERS_SMELLY_SOCKS, 1);
|
||||
}
|
||||
@@ -76,7 +70,7 @@ public class Q005_MinersFavor extends Quest
|
||||
st.giveItems(MINERS_PICK, 1);
|
||||
if (st.hasQuestItems(MINING_BOOTS, BOOMBOOM_POWDER, REDSTONE_BEER))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -101,14 +95,17 @@ public class Q005_MinersFavor extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 2) ? "30554-01.htm" : "30554-02.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case BOLTER:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30554-04.htm";
|
||||
@@ -126,15 +123,16 @@ public class Q005_MinersFavor extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SHARI:
|
||||
{
|
||||
if ((cond == 1) && !st.hasQuestItems(BOOMBOOM_POWDER))
|
||||
{
|
||||
htmltext = "30517-01.htm";
|
||||
st.giveItems(BOOMBOOM_POWDER, 1);
|
||||
if (st.hasQuestItems(MINING_BOOTS, MINERS_PICK, REDSTONE_BEER))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -147,15 +145,16 @@ public class Q005_MinersFavor extends Quest
|
||||
htmltext = "30517-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GARITA:
|
||||
{
|
||||
if ((cond == 1) && !st.hasQuestItems(MINING_BOOTS))
|
||||
{
|
||||
htmltext = "30518-01.htm";
|
||||
st.giveItems(MINING_BOOTS, 1);
|
||||
if (st.hasQuestItems(MINERS_PICK, BOOMBOOM_POWDER, REDSTONE_BEER))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -168,15 +167,16 @@ public class Q005_MinersFavor extends Quest
|
||||
htmltext = "30518-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case REED:
|
||||
{
|
||||
if ((cond == 1) && !st.hasQuestItems(REDSTONE_BEER))
|
||||
{
|
||||
htmltext = "30520-01.htm";
|
||||
st.giveItems(REDSTONE_BEER, 1);
|
||||
if (st.hasQuestItems(MINING_BOOTS, MINERS_PICK, BOOMBOOM_POWDER))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -189,8 +189,9 @@ public class Q005_MinersFavor extends Quest
|
||||
htmltext = "30520-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BRUNON:
|
||||
{
|
||||
if ((cond == 1) && !st.hasQuestItems(MINERS_PICK))
|
||||
{
|
||||
htmltext = "30526-01.htm";
|
||||
@@ -200,12 +201,15 @@ public class Q005_MinersFavor extends Quest
|
||||
htmltext = "30526-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -29,10 +29,8 @@ public class Q006_StepIntoTheFuture extends Quest
|
||||
private static final int ROXXY = 30006;
|
||||
private static final int BAULRO = 30033;
|
||||
private static final int SIR_COLLIN = 30311;
|
||||
|
||||
// Items
|
||||
private static final int BAULRO_LETTER = 7571;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_TRAVELER = 7570;
|
||||
private static final int SOE_GIRAN = 7559;
|
||||
@@ -40,9 +38,7 @@ public class Q006_StepIntoTheFuture extends Quest
|
||||
public Q006_StepIntoTheFuture()
|
||||
{
|
||||
super(6, "Step into the Future");
|
||||
|
||||
registerQuestItems(BAULRO_LETTER);
|
||||
|
||||
addStartNpc(ROXXY);
|
||||
addTalkId(ROXXY, BAULRO, SIR_COLLIN);
|
||||
}
|
||||
@@ -57,37 +53,42 @@ public class Q006_StepIntoTheFuture extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30006-03.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("30033-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(BAULRO_LETTER, 1);
|
||||
}
|
||||
else if (event.equals("30311-02.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(BAULRO_LETTER))
|
||||
case "30006-03.htm":
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "30033-02.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BAULRO_LETTER, 1);
|
||||
st.giveItems(BAULRO_LETTER, 1);
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30311-02.htm":
|
||||
{
|
||||
htmltext = "30311-03.htm";
|
||||
if (st.hasQuestItems(BAULRO_LETTER))
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BAULRO_LETTER, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30311-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30006-06.htm":
|
||||
{
|
||||
st.giveItems(MARK_TRAVELER, 1);
|
||||
st.rewardItems(SOE_GIRAN, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30006-06.htm"))
|
||||
{
|
||||
st.giveItems(MARK_TRAVELER, 1);
|
||||
st.rewardItems(SOE_GIRAN, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -106,6 +107,7 @@ public class Q006_StepIntoTheFuture extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getRace() != Race.HUMAN) || (player.getLevel() < 3))
|
||||
{
|
||||
htmltext = "30006-01.htm";
|
||||
@@ -115,12 +117,14 @@ public class Q006_StepIntoTheFuture extends Quest
|
||||
htmltext = "30006-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ROXXY:
|
||||
{
|
||||
if ((cond == 1) || (cond == 2))
|
||||
{
|
||||
htmltext = "30006-04.htm";
|
||||
@@ -130,8 +134,9 @@ public class Q006_StepIntoTheFuture extends Quest
|
||||
htmltext = "30006-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BAULRO:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30033-01.htm";
|
||||
@@ -145,8 +150,9 @@ public class Q006_StepIntoTheFuture extends Quest
|
||||
htmltext = "30033-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SIR_COLLIN:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30311-01.htm";
|
||||
@@ -156,12 +162,15 @@ public class Q006_StepIntoTheFuture extends Quest
|
||||
htmltext = "30311-03a.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -29,10 +29,8 @@ public class Q007_ATripBegins extends Quest
|
||||
private static final int MIRABEL = 30146;
|
||||
private static final int ARIEL = 30148;
|
||||
private static final int ASTERIOS = 30154;
|
||||
|
||||
// Items
|
||||
private static final int ARIEL_RECO = 7572;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_TRAVELER = 7570;
|
||||
private static final int SOE_GIRAN = 7559;
|
||||
@@ -40,9 +38,7 @@ public class Q007_ATripBegins extends Quest
|
||||
public Q007_ATripBegins()
|
||||
{
|
||||
super(7, "A Trip Begins");
|
||||
|
||||
registerQuestItems(ARIEL_RECO);
|
||||
|
||||
addStartNpc(MIRABEL);
|
||||
addTalkId(MIRABEL, ARIEL, ASTERIOS);
|
||||
}
|
||||
@@ -57,30 +53,35 @@ public class Q007_ATripBegins extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30146-03.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("30148-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(ARIEL_RECO, 1);
|
||||
}
|
||||
else if (event.equals("30154-02.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ARIEL_RECO, 1);
|
||||
}
|
||||
else if (event.equals("30146-06.htm"))
|
||||
{
|
||||
st.giveItems(MARK_TRAVELER, 1);
|
||||
st.rewardItems(SOE_GIRAN, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30146-03.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "30148-02.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(ARIEL_RECO, 1);
|
||||
break;
|
||||
}
|
||||
case "30154-02.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ARIEL_RECO, 1);
|
||||
break;
|
||||
}
|
||||
case "30146-06.htm":
|
||||
{
|
||||
st.giveItems(MARK_TRAVELER, 1);
|
||||
st.rewardItems(SOE_GIRAN, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -99,6 +100,7 @@ public class Q007_ATripBegins extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.ELF)
|
||||
{
|
||||
htmltext = "30146-01.htm";
|
||||
@@ -112,12 +114,14 @@ public class Q007_ATripBegins extends Quest
|
||||
htmltext = "30146-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case MIRABEL:
|
||||
{
|
||||
if ((cond == 1) || (cond == 2))
|
||||
{
|
||||
htmltext = "30146-04.htm";
|
||||
@@ -127,8 +131,9 @@ public class Q007_ATripBegins extends Quest
|
||||
htmltext = "30146-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ARIEL:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30148-01.htm";
|
||||
@@ -138,8 +143,9 @@ public class Q007_ATripBegins extends Quest
|
||||
htmltext = "30148-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ASTERIOS:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30154-01.htm";
|
||||
@@ -149,12 +155,15 @@ public class Q007_ATripBegins extends Quest
|
||||
htmltext = "30154-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -29,10 +29,8 @@ public class Q008_AnAdventureBegins extends Quest
|
||||
private static final int JASMINE = 30134;
|
||||
private static final int ROSELYN = 30355;
|
||||
private static final int HARNE = 30144;
|
||||
|
||||
// Items
|
||||
private static final int ROSELYN_NOTE = 7573;
|
||||
|
||||
// Rewards
|
||||
private static final int SOE_GIRAN = 7559;
|
||||
private static final int MARK_TRAVELER = 7570;
|
||||
@@ -40,9 +38,7 @@ public class Q008_AnAdventureBegins extends Quest
|
||||
public Q008_AnAdventureBegins()
|
||||
{
|
||||
super(8, "An Adventure Begins");
|
||||
|
||||
registerQuestItems(ROSELYN_NOTE);
|
||||
|
||||
addStartNpc(JASMINE);
|
||||
addTalkId(JASMINE, ROSELYN, HARNE);
|
||||
}
|
||||
@@ -57,30 +53,35 @@ public class Q008_AnAdventureBegins extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30134-03.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("30355-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(ROSELYN_NOTE, 1);
|
||||
}
|
||||
else if (event.equals("30144-02.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ROSELYN_NOTE, 1);
|
||||
}
|
||||
else if (event.equals("30134-06.htm"))
|
||||
{
|
||||
st.giveItems(MARK_TRAVELER, 1);
|
||||
st.rewardItems(SOE_GIRAN, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30134-03.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "30355-02.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(ROSELYN_NOTE, 1);
|
||||
break;
|
||||
}
|
||||
case "30144-02.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ROSELYN_NOTE, 1);
|
||||
break;
|
||||
}
|
||||
case "30134-06.htm":
|
||||
{
|
||||
st.giveItems(MARK_TRAVELER, 1);
|
||||
st.rewardItems(SOE_GIRAN, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -99,6 +100,7 @@ public class Q008_AnAdventureBegins extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getLevel() >= 3) && (player.getRace() == Race.DARK_ELF))
|
||||
{
|
||||
htmltext = "30134-02.htm";
|
||||
@@ -108,12 +110,14 @@ public class Q008_AnAdventureBegins extends Quest
|
||||
htmltext = "30134-01.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case JASMINE:
|
||||
{
|
||||
if ((cond == 1) || (cond == 2))
|
||||
{
|
||||
htmltext = "30134-04.htm";
|
||||
@@ -123,8 +127,9 @@ public class Q008_AnAdventureBegins extends Quest
|
||||
htmltext = "30134-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ROSELYN:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30355-01.htm";
|
||||
@@ -134,8 +139,9 @@ public class Q008_AnAdventureBegins extends Quest
|
||||
htmltext = "30355-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case HARNE:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30144-01.htm";
|
||||
@@ -145,12 +151,15 @@ public class Q008_AnAdventureBegins extends Quest
|
||||
htmltext = "30144-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -29,7 +29,6 @@ public class Q009_IntoTheCityOfHumans extends Quest
|
||||
private static final int PETUKAI = 30583;
|
||||
private static final int TANAPI = 30571;
|
||||
private static final int TAMIL = 30576;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_TRAVELER = 7570;
|
||||
private static final int SOE_GIRAN = 7126;
|
||||
@@ -37,7 +36,6 @@ public class Q009_IntoTheCityOfHumans extends Quest
|
||||
public Q009_IntoTheCityOfHumans()
|
||||
{
|
||||
super(9, "Into the City of Humans");
|
||||
|
||||
addStartNpc(PETUKAI);
|
||||
addTalkId(PETUKAI, TANAPI, TAMIL);
|
||||
}
|
||||
@@ -52,23 +50,27 @@ public class Q009_IntoTheCityOfHumans extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30583-01.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("30571-01.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("30576-01.htm"))
|
||||
{
|
||||
st.giveItems(MARK_OF_TRAVELER, 1);
|
||||
st.rewardItems(SOE_GIRAN, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30583-01.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "30571-01.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "30576-01.htm":
|
||||
{
|
||||
st.giveItems(MARK_OF_TRAVELER, 1);
|
||||
st.rewardItems(SOE_GIRAN, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -87,6 +89,7 @@ public class Q009_IntoTheCityOfHumans extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getLevel() >= 3) && (player.getRace() == Race.ORC))
|
||||
{
|
||||
htmltext = "30583-00.htm";
|
||||
@@ -96,19 +99,22 @@ public class Q009_IntoTheCityOfHumans extends Quest
|
||||
htmltext = "30583-00a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case PETUKAI:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30583-01a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TANAPI:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30571-00.htm";
|
||||
@@ -118,19 +124,23 @@ public class Q009_IntoTheCityOfHumans extends Quest
|
||||
htmltext = "30571-01a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TAMIL:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30576-00.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -27,11 +27,9 @@ public class Q010_IntoTheWorld extends Quest
|
||||
{
|
||||
// Items
|
||||
private static final int VERY_EXPENSIVE_NECKLACE = 7574;
|
||||
|
||||
// Rewards
|
||||
private static final int SOE_GIRAN = 7559;
|
||||
private static final int MARK_OF_TRAVELER = 7570;
|
||||
|
||||
// NPCs
|
||||
private static final int REED = 30520;
|
||||
private static final int BALANKI = 30533;
|
||||
@@ -40,9 +38,7 @@ public class Q010_IntoTheWorld extends Quest
|
||||
public Q010_IntoTheWorld()
|
||||
{
|
||||
super(10, "Into the World");
|
||||
|
||||
registerQuestItems(VERY_EXPENSIVE_NECKLACE);
|
||||
|
||||
addStartNpc(BALANKI);
|
||||
addTalkId(BALANKI, REED, GERALD);
|
||||
}
|
||||
@@ -57,35 +53,41 @@ public class Q010_IntoTheWorld extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30533-02.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("30520-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(VERY_EXPENSIVE_NECKLACE, 1);
|
||||
}
|
||||
else if (event.equals("30650-02.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(VERY_EXPENSIVE_NECKLACE, 1);
|
||||
}
|
||||
else if (event.equals("30520-04.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("30533-05.htm"))
|
||||
{
|
||||
st.giveItems(SOE_GIRAN, 1);
|
||||
st.rewardItems(MARK_OF_TRAVELER, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30533-02.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "30520-02.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(VERY_EXPENSIVE_NECKLACE, 1);
|
||||
break;
|
||||
}
|
||||
case "30650-02.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(VERY_EXPENSIVE_NECKLACE, 1);
|
||||
break;
|
||||
}
|
||||
case "30520-04.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "30533-05.htm":
|
||||
{
|
||||
st.giveItems(SOE_GIRAN, 1);
|
||||
st.rewardItems(MARK_OF_TRAVELER, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -104,6 +106,7 @@ public class Q010_IntoTheWorld extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getLevel() >= 3) && (player.getRace() == Race.DWARF))
|
||||
{
|
||||
htmltext = "30533-01.htm";
|
||||
@@ -113,12 +116,14 @@ public class Q010_IntoTheWorld extends Quest
|
||||
htmltext = "30533-01a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case BALANKI:
|
||||
{
|
||||
if (cond < 4)
|
||||
{
|
||||
htmltext = "30533-03.htm";
|
||||
@@ -128,8 +133,9 @@ public class Q010_IntoTheWorld extends Quest
|
||||
htmltext = "30533-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case REED:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30520-01.htm";
|
||||
@@ -147,8 +153,9 @@ public class Q010_IntoTheWorld extends Quest
|
||||
htmltext = "30520-04a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GERALD:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30650-01.htm";
|
||||
@@ -158,12 +165,15 @@ public class Q010_IntoTheWorld extends Quest
|
||||
htmltext = "30650-04.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -24,20 +24,17 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q011_SecretMeetingWithKetraOrcs extends Quest
|
||||
{
|
||||
// Npcs
|
||||
// NPCs
|
||||
private static final int CADMON = 31296;
|
||||
private static final int LEON = 31256;
|
||||
private static final int WAHKAN = 31371;
|
||||
|
||||
// Items
|
||||
private static final int MUNITIONS_BOX = 7231;
|
||||
|
||||
public Q011_SecretMeetingWithKetraOrcs()
|
||||
{
|
||||
super(11, "Secret Meeting With Ketra Orcs");
|
||||
|
||||
registerQuestItems(MUNITIONS_BOX);
|
||||
|
||||
addStartNpc(CADMON);
|
||||
addTalkId(CADMON, LEON, WAHKAN);
|
||||
}
|
||||
@@ -52,24 +49,28 @@ public class Q011_SecretMeetingWithKetraOrcs extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("31296-03.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("31256-02.htm"))
|
||||
{
|
||||
st.giveItems(MUNITIONS_BOX, 1);
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("31371-02.htm"))
|
||||
{
|
||||
st.takeItems(MUNITIONS_BOX, 1);
|
||||
st.rewardExpAndSp(79787, 0);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "31296-03.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "31256-02.htm":
|
||||
{
|
||||
st.giveItems(MUNITIONS_BOX, 1);
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "31371-02.htm":
|
||||
{
|
||||
st.takeItems(MUNITIONS_BOX, 1);
|
||||
st.rewardExpAndSp(79787, 0);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -88,21 +89,25 @@ public class Q011_SecretMeetingWithKetraOrcs extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 74) ? "31296-02.htm" : "31296-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case CADMON:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "31296-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LEON:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "31256-01.htm";
|
||||
@@ -112,19 +117,23 @@ public class Q011_SecretMeetingWithKetraOrcs extends Quest
|
||||
htmltext = "31256-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case WAHKAN:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "31371-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -28,16 +28,13 @@ public class Q012_SecretMeetingWithVarkaSilenos extends Quest
|
||||
private static final int CADMON = 31296;
|
||||
private static final int HELMUT = 31258;
|
||||
private static final int NARAN_ASHANUK = 31378;
|
||||
|
||||
// Items
|
||||
private static final int MUNITIONS_BOX = 7232;
|
||||
|
||||
public Q012_SecretMeetingWithVarkaSilenos()
|
||||
{
|
||||
super(12, "Secret Meeting With Varka Silenos");
|
||||
|
||||
registerQuestItems(MUNITIONS_BOX);
|
||||
|
||||
addStartNpc(CADMON);
|
||||
addTalkId(CADMON, HELMUT, NARAN_ASHANUK);
|
||||
}
|
||||
@@ -52,24 +49,28 @@ public class Q012_SecretMeetingWithVarkaSilenos extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("31296-03.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("31258-02.htm"))
|
||||
{
|
||||
st.giveItems(MUNITIONS_BOX, 1);
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("31378-02.htm"))
|
||||
{
|
||||
st.takeItems(MUNITIONS_BOX, 1);
|
||||
st.rewardExpAndSp(79761, 0);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "31296-03.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "31258-02.htm":
|
||||
{
|
||||
st.giveItems(MUNITIONS_BOX, 1);
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "31378-02.htm":
|
||||
{
|
||||
st.takeItems(MUNITIONS_BOX, 1);
|
||||
st.rewardExpAndSp(79761, 0);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -88,21 +89,25 @@ public class Q012_SecretMeetingWithVarkaSilenos extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 74) ? "31296-02.htm" : "31296-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case CADMON:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "31296-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case HELMUT:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "31258-01.htm";
|
||||
@@ -112,19 +117,23 @@ public class Q012_SecretMeetingWithVarkaSilenos extends Quest
|
||||
htmltext = "31258-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case NARAN_ASHANUK:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "31378-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -27,16 +27,13 @@ public class Q013_ParcelDelivery extends Quest
|
||||
// NPCs
|
||||
private static final int FUNDIN = 31274;
|
||||
private static final int VULCAN = 31539;
|
||||
|
||||
// Item
|
||||
private static final int PACKAGE = 7263;
|
||||
|
||||
public Q013_ParcelDelivery()
|
||||
{
|
||||
super(13, "Parcel Delivery");
|
||||
|
||||
registerQuestItems(PACKAGE);
|
||||
|
||||
addStartNpc(FUNDIN);
|
||||
addTalkId(FUNDIN, VULCAN);
|
||||
}
|
||||
@@ -53,9 +50,7 @@ public class Q013_ParcelDelivery extends Quest
|
||||
|
||||
if (event.equals("31274-2.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(PACKAGE, 1);
|
||||
}
|
||||
else if (event.equals("31539-1.htm"))
|
||||
@@ -82,25 +77,32 @@ public class Q013_ParcelDelivery extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 74) ? "31274-1.htm" : "31274-0.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case FUNDIN:
|
||||
{
|
||||
htmltext = "31274-2.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case VULCAN:
|
||||
{
|
||||
htmltext = "31539-0.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -27,16 +27,13 @@ public class Q014_WhereaboutsOfTheArchaeologist extends Quest
|
||||
// NPCs
|
||||
private static final int LIESEL = 31263;
|
||||
private static final int GHOST_OF_ADVENTURER = 31538;
|
||||
|
||||
// Items
|
||||
private static final int LETTER = 7253;
|
||||
|
||||
public Q014_WhereaboutsOfTheArchaeologist()
|
||||
{
|
||||
super(14, "Whereabouts of the Archaeologist");
|
||||
|
||||
registerQuestItems(LETTER);
|
||||
|
||||
addStartNpc(LIESEL);
|
||||
addTalkId(LIESEL, GHOST_OF_ADVENTURER);
|
||||
}
|
||||
@@ -53,9 +50,7 @@ public class Q014_WhereaboutsOfTheArchaeologist extends Quest
|
||||
|
||||
if (event.equals("31263-2.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(LETTER, 1);
|
||||
}
|
||||
else if (event.equals("31538-1.htm"))
|
||||
@@ -82,25 +77,32 @@ public class Q014_WhereaboutsOfTheArchaeologist extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 74) ? "31263-1.htm" : "31263-0.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case LIESEL:
|
||||
{
|
||||
htmltext = "31263-2.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case GHOST_OF_ADVENTURER:
|
||||
{
|
||||
htmltext = "31538-0.htm";
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -32,7 +32,6 @@ public class Q015_SweetWhispers extends Quest
|
||||
public Q015_SweetWhispers()
|
||||
{
|
||||
super(15, "Sweet Whispers");
|
||||
|
||||
addStartNpc(VLADIMIR);
|
||||
addTalkId(VLADIMIR, HIERARCH, MYSTERIOUS_NECRO);
|
||||
}
|
||||
@@ -47,22 +46,26 @@ public class Q015_SweetWhispers extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("31302-01.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("31518-01.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("31517-01.htm"))
|
||||
{
|
||||
st.rewardExpAndSp(60217, 0);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "31302-01.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "31518-01.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "31517-01.htm":
|
||||
{
|
||||
st.rewardExpAndSp(60217, 0);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -81,18 +84,22 @@ public class Q015_SweetWhispers extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 60) ? "31302-00a.htm" : "31302-00.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case VLADIMIR:
|
||||
{
|
||||
htmltext = "31302-01a.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case MYSTERIOUS_NECRO:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "31518-00.htm";
|
||||
@@ -102,19 +109,23 @@ public class Q015_SweetWhispers extends Quest
|
||||
htmltext = "31518-01a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case HIERARCH:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "31517-00.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -38,9 +38,7 @@ public class Q016_TheComingDarkness extends Quest
|
||||
public Q016_TheComingDarkness()
|
||||
{
|
||||
super(16, "The Coming Darkness");
|
||||
|
||||
registerQuestItems(CRYSTAL_OF_SEAL);
|
||||
|
||||
addStartNpc(HIERARCH);
|
||||
addTalkId(HIERARCH, EVIL_ALTAR_1, EVIL_ALTAR_2, EVIL_ALTAR_3, EVIL_ALTAR_4, EVIL_ALTAR_5);
|
||||
}
|
||||
@@ -55,42 +53,49 @@ public class Q016_TheComingDarkness extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("31517-2.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(CRYSTAL_OF_SEAL, 5);
|
||||
}
|
||||
else if (event.equals("31512-1.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRYSTAL_OF_SEAL, 1);
|
||||
}
|
||||
else if (event.equals("31513-1.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRYSTAL_OF_SEAL, 1);
|
||||
}
|
||||
else if (event.equals("31514-1.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRYSTAL_OF_SEAL, 1);
|
||||
}
|
||||
else if (event.equals("31515-1.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRYSTAL_OF_SEAL, 1);
|
||||
}
|
||||
else if (event.equals("31516-1.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRYSTAL_OF_SEAL, 1);
|
||||
case "31517-2.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
st.giveItems(CRYSTAL_OF_SEAL, 5);
|
||||
break;
|
||||
}
|
||||
case "31512-1.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRYSTAL_OF_SEAL, 1);
|
||||
break;
|
||||
}
|
||||
case "31513-1.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRYSTAL_OF_SEAL, 1);
|
||||
break;
|
||||
}
|
||||
case "31514-1.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRYSTAL_OF_SEAL, 1);
|
||||
break;
|
||||
}
|
||||
case "31515-1.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRYSTAL_OF_SEAL, 1);
|
||||
break;
|
||||
}
|
||||
case "31516-1.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRYSTAL_OF_SEAL, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -109,16 +114,19 @@ public class Q016_TheComingDarkness extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 62) ? "31517-0a.htm" : "31517-0.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
final int npcId = npc.getNpcId();
|
||||
|
||||
switch (npcId)
|
||||
{
|
||||
case HIERARCH:
|
||||
{
|
||||
if (cond == 6)
|
||||
{
|
||||
htmltext = "31517-4.htm";
|
||||
@@ -139,12 +147,13 @@ public class Q016_TheComingDarkness extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case EVIL_ALTAR_1:
|
||||
case EVIL_ALTAR_2:
|
||||
case EVIL_ALTAR_3:
|
||||
case EVIL_ALTAR_4:
|
||||
case EVIL_ALTAR_5:
|
||||
{
|
||||
final int condAltar = npcId - 31511;
|
||||
if (cond == condAltar)
|
||||
{
|
||||
@@ -162,12 +171,15 @@ public class Q016_TheComingDarkness extends Quest
|
||||
htmltext = npcId + "-2.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -24,22 +24,19 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q017_LightAndDarkness extends Quest
|
||||
{
|
||||
// Items
|
||||
private static final int BLOOD_OF_SAINT = 7168;
|
||||
|
||||
// NPCs
|
||||
private static final int HIERARCH = 31517;
|
||||
private static final int SAINT_ALTAR_1 = 31508;
|
||||
private static final int SAINT_ALTAR_2 = 31509;
|
||||
private static final int SAINT_ALTAR_3 = 31510;
|
||||
private static final int SAINT_ALTAR_4 = 31511;
|
||||
// Items
|
||||
private static final int BLOOD_OF_SAINT = 7168;
|
||||
|
||||
public Q017_LightAndDarkness()
|
||||
{
|
||||
super(17, "Light and Darkness");
|
||||
|
||||
registerQuestItems(BLOOD_OF_SAINT);
|
||||
|
||||
addStartNpc(HIERARCH);
|
||||
addTalkId(HIERARCH, SAINT_ALTAR_1, SAINT_ALTAR_2, SAINT_ALTAR_3, SAINT_ALTAR_4);
|
||||
}
|
||||
@@ -54,63 +51,69 @@ public class Q017_LightAndDarkness extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("31517-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(BLOOD_OF_SAINT, 4);
|
||||
}
|
||||
else if (event.equals("31508-02.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(BLOOD_OF_SAINT))
|
||||
case "31517-04.htm":
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BLOOD_OF_SAINT, 1);
|
||||
st.startQuest();
|
||||
st.giveItems(BLOOD_OF_SAINT, 4);
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "31508-02.htm":
|
||||
{
|
||||
htmltext = "31508-03.htm";
|
||||
if (st.hasQuestItems(BLOOD_OF_SAINT))
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BLOOD_OF_SAINT, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31508-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("31509-02.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(BLOOD_OF_SAINT))
|
||||
case "31509-02.htm":
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BLOOD_OF_SAINT, 1);
|
||||
if (st.hasQuestItems(BLOOD_OF_SAINT))
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BLOOD_OF_SAINT, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31509-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "31510-02.htm":
|
||||
{
|
||||
htmltext = "31509-03.htm";
|
||||
if (st.hasQuestItems(BLOOD_OF_SAINT))
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BLOOD_OF_SAINT, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31510-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("31510-02.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(BLOOD_OF_SAINT))
|
||||
case "31511-02.htm":
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BLOOD_OF_SAINT, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31510-03.htm";
|
||||
}
|
||||
}
|
||||
else if (event.equals("31511-02.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(BLOOD_OF_SAINT))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BLOOD_OF_SAINT, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31511-03.htm";
|
||||
if (st.hasQuestItems(BLOOD_OF_SAINT))
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BLOOD_OF_SAINT, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31511-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -130,14 +133,17 @@ public class Q017_LightAndDarkness extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 61) ? "31517-03.htm" : "31517-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case HIERARCH:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "31517-07.htm";
|
||||
@@ -158,8 +164,9 @@ public class Q017_LightAndDarkness extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SAINT_ALTAR_1:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "31508-01.htm";
|
||||
@@ -169,8 +176,9 @@ public class Q017_LightAndDarkness extends Quest
|
||||
htmltext = "31508-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SAINT_ALTAR_2:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "31509-01.htm";
|
||||
@@ -180,8 +188,9 @@ public class Q017_LightAndDarkness extends Quest
|
||||
htmltext = "31509-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SAINT_ALTAR_3:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "31510-01.htm";
|
||||
@@ -191,8 +200,9 @@ public class Q017_LightAndDarkness extends Quest
|
||||
htmltext = "31510-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SAINT_ALTAR_4:
|
||||
{
|
||||
if (cond == 4)
|
||||
{
|
||||
htmltext = "31511-01.htm";
|
||||
@@ -202,12 +212,15 @@ public class Q017_LightAndDarkness extends Quest
|
||||
htmltext = "31511-04.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -24,20 +24,18 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q018_MeetingWithTheGoldenRam extends Quest
|
||||
{
|
||||
// Items
|
||||
private static final int SUPPLY_BOX = 7245;
|
||||
|
||||
// NPCs
|
||||
private static final int DONAL = 31314;
|
||||
private static final int DAISY = 31315;
|
||||
private static final int ABERCROMBIE = 31555;
|
||||
// Items
|
||||
private static final int SUPPLY_BOX = 7245;
|
||||
|
||||
public Q018_MeetingWithTheGoldenRam()
|
||||
{
|
||||
super(18, "Meeting with the Golden Ram");
|
||||
|
||||
registerQuestItems(SUPPLY_BOX);
|
||||
|
||||
addStartNpc(DONAL);
|
||||
addTalkId(DONAL, DAISY, ABERCROMBIE);
|
||||
}
|
||||
@@ -52,25 +50,29 @@ public class Q018_MeetingWithTheGoldenRam extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("31314-03.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("31315-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(SUPPLY_BOX, 1);
|
||||
}
|
||||
else if (event.equals("31555-02.htm"))
|
||||
{
|
||||
st.takeItems(SUPPLY_BOX, 1);
|
||||
st.rewardItems(57, 15000);
|
||||
st.rewardExpAndSp(50000, 0);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "31314-03.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "31315-02.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(SUPPLY_BOX, 1);
|
||||
break;
|
||||
}
|
||||
case "31555-02.htm":
|
||||
{
|
||||
st.takeItems(SUPPLY_BOX, 1);
|
||||
st.rewardItems(57, 15000);
|
||||
st.rewardExpAndSp(50000, 0);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -89,18 +91,22 @@ public class Q018_MeetingWithTheGoldenRam extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 66) ? "31314-02.htm" : "31314-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case DONAL:
|
||||
{
|
||||
htmltext = "31314-04.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case DAISY:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "31315-01.htm";
|
||||
@@ -110,19 +116,23 @@ public class Q018_MeetingWithTheGoldenRam extends Quest
|
||||
htmltext = "31315-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ABERCROMBIE:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "31555-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -24,19 +24,16 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q019_GoToThePastureland extends Quest
|
||||
{
|
||||
// Items
|
||||
private static final int YOUNG_WILD_BEAST_MEAT = 7547;
|
||||
|
||||
// NPCs
|
||||
private static final int VLADIMIR = 31302;
|
||||
private static final int TUNATUN = 31537;
|
||||
// Items
|
||||
private static final int YOUNG_WILD_BEAST_MEAT = 7547;
|
||||
|
||||
public Q019_GoToThePastureland()
|
||||
{
|
||||
super(19, "Go to the Pastureland!");
|
||||
|
||||
registerQuestItems(YOUNG_WILD_BEAST_MEAT);
|
||||
|
||||
addStartNpc(VLADIMIR);
|
||||
addTalkId(VLADIMIR, TUNATUN);
|
||||
}
|
||||
@@ -53,9 +50,7 @@ public class Q019_GoToThePastureland extends Quest
|
||||
|
||||
if (event.equals("31302-01.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(YOUNG_WILD_BEAST_MEAT, 1);
|
||||
}
|
||||
else if (event.equals("019_finish"))
|
||||
@@ -89,10 +84,12 @@ public class Q019_GoToThePastureland extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 63) ? "31302-03.htm" : "31302-00.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case VLADIMIR:
|
||||
@@ -104,10 +101,12 @@ public class Q019_GoToThePastureland extends Quest
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -30,9 +30,7 @@ public class Q020_BringUpWithLove extends Quest
|
||||
public Q020_BringUpWithLove()
|
||||
{
|
||||
super(20, "Bring Up With Love");
|
||||
|
||||
registerQuestItems(JEWEL_OF_INNOCENCE);
|
||||
|
||||
addStartNpc(31537); // Tunatun
|
||||
addTalkId(31537);
|
||||
}
|
||||
@@ -49,9 +47,7 @@ public class Q020_BringUpWithLove extends Quest
|
||||
|
||||
if (event.equals("31537-09.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
else if (event.equals("31537-12.htm"))
|
||||
{
|
||||
@@ -77,11 +73,13 @@ public class Q020_BringUpWithLove extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 65) ? "31537-02.htm" : "31537-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
if (st.getInt("cond") == 2)
|
||||
{
|
||||
if (st.isCond(2))
|
||||
{
|
||||
htmltext = "31537-11.htm";
|
||||
}
|
||||
@@ -90,10 +88,12 @@ public class Q020_BringUpWithLove extends Quest
|
||||
htmltext = "31537-10.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -36,7 +36,6 @@ public class Q021_HiddenTruth extends Quest
|
||||
private static final int DOMINIC = 31350;
|
||||
private static final int BENEDICT = 31349;
|
||||
private static final int INNOCENTIN = 31328;
|
||||
|
||||
// Items
|
||||
private static final int CROSS_OF_EINHASAD = 7140;
|
||||
private static final int CROSS_OF_EINHASAD_NEXT_QUEST = 7141;
|
||||
@@ -54,9 +53,7 @@ public class Q021_HiddenTruth extends Quest
|
||||
public Q021_HiddenTruth()
|
||||
{
|
||||
super(21, "Hidden Truth");
|
||||
|
||||
registerQuestItems(CROSS_OF_EINHASAD);
|
||||
|
||||
addStartNpc(MYSTERIOUS_WIZARD);
|
||||
addTalkId(MYSTERIOUS_WIZARD, TOMBSTONE, VON_HELLMAN_DUKE, VON_HELLMAN_PAGE, BROKEN_BOOKSHELF, AGRIPEL, DOMINIC, BENEDICT, INNOCENTIN);
|
||||
}
|
||||
@@ -71,87 +68,94 @@ public class Q021_HiddenTruth extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("31522-02.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("31523-03.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
spawnTheDuke(player);
|
||||
}
|
||||
else if (event.equals("31524-06.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
spawnThePage(player);
|
||||
}
|
||||
else if (event.equals("31526-08.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("31526-14.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(CROSS_OF_EINHASAD, 1);
|
||||
}
|
||||
else if (event.equals("1"))
|
||||
{
|
||||
_page.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, PAGE_LOCS[0]);
|
||||
_page.broadcastNpcSay("Follow me...");
|
||||
startQuestTimer("2", 5000, _page, player, false);
|
||||
return null;
|
||||
}
|
||||
else if (event.equals("2"))
|
||||
{
|
||||
_page.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, PAGE_LOCS[1]);
|
||||
startQuestTimer("3", 12000, _page, player, false);
|
||||
return null;
|
||||
}
|
||||
else if (event.equals("3"))
|
||||
{
|
||||
_page.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, PAGE_LOCS[2]);
|
||||
startQuestTimer("4", 18000, _page, player, false);
|
||||
return null;
|
||||
}
|
||||
else if (event.equals("4"))
|
||||
{
|
||||
st.set("end_walk", "1");
|
||||
_page.broadcastNpcSay("Please check this bookcase, " + player.getName() + ".");
|
||||
startQuestTimer("5", 47000, _page, player, false);
|
||||
return null;
|
||||
}
|
||||
else if (event.equals("5"))
|
||||
{
|
||||
_page.broadcastNpcSay("I'm confused! Maybe it's time to go back.");
|
||||
return null;
|
||||
}
|
||||
else if (event.equals("31328-05.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
case "31522-02.htm":
|
||||
{
|
||||
st.takeItems(CROSS_OF_EINHASAD, 1);
|
||||
st.giveItems(CROSS_OF_EINHASAD_NEXT_QUEST, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "31523-03.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
spawnTheDuke(player);
|
||||
break;
|
||||
}
|
||||
case "31524-06.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
spawnThePage(player);
|
||||
break;
|
||||
}
|
||||
case "31526-08.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "31526-14.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(CROSS_OF_EINHASAD, 1);
|
||||
break;
|
||||
}
|
||||
case "1":
|
||||
{
|
||||
_page.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, PAGE_LOCS[0]);
|
||||
_page.broadcastNpcSay("Follow me...");
|
||||
startQuestTimer("2", 5000, _page, player, false);
|
||||
return null;
|
||||
}
|
||||
case "2":
|
||||
{
|
||||
_page.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, PAGE_LOCS[1]);
|
||||
startQuestTimer("3", 12000, _page, player, false);
|
||||
return null;
|
||||
}
|
||||
case "3":
|
||||
{
|
||||
_page.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, PAGE_LOCS[2]);
|
||||
startQuestTimer("4", 18000, _page, player, false);
|
||||
return null;
|
||||
}
|
||||
case "4":
|
||||
{
|
||||
st.set("end_walk", "1");
|
||||
_page.broadcastNpcSay("Please check this bookcase, " + player.getName() + ".");
|
||||
startQuestTimer("5", 47000, _page, player, false);
|
||||
return null;
|
||||
}
|
||||
case "5":
|
||||
{
|
||||
_page.broadcastNpcSay("I'm confused! Maybe it's time to go back.");
|
||||
return null;
|
||||
}
|
||||
case "31328-05.htm":
|
||||
{
|
||||
if (st.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
st.takeItems(CROSS_OF_EINHASAD, 1);
|
||||
st.giveItems(CROSS_OF_EINHASAD_NEXT_QUEST, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "dukeDespawn":
|
||||
{
|
||||
_duke.deleteMe();
|
||||
_duke = null;
|
||||
return null;
|
||||
}
|
||||
case "pageDespawn":
|
||||
{
|
||||
_page.deleteMe();
|
||||
_page = null;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (event.equals("dukeDespawn"))
|
||||
{
|
||||
_duke.deleteMe();
|
||||
_duke = null;
|
||||
return null;
|
||||
}
|
||||
else if (event.equals("pageDespawn"))
|
||||
{
|
||||
_page.deleteMe();
|
||||
_page = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -170,18 +174,22 @@ public class Q021_HiddenTruth extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 63) ? "31522-03.htm" : "31522-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case MYSTERIOUS_WIZARD:
|
||||
{
|
||||
htmltext = "31522-05.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case TOMBSTONE:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "31523-01.htm";
|
||||
@@ -196,8 +204,9 @@ public class Q021_HiddenTruth extends Quest
|
||||
htmltext = "31523-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case VON_HELLMAN_DUKE:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "31524-01.htm";
|
||||
@@ -212,14 +221,15 @@ public class Q021_HiddenTruth extends Quest
|
||||
htmltext = "31524-07a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case VON_HELLMAN_PAGE:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
if (st.getInt("end_walk") == 1)
|
||||
{
|
||||
htmltext = "31525-02.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -232,12 +242,13 @@ public class Q021_HiddenTruth extends Quest
|
||||
htmltext = "31525-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BROKEN_BOOKSHELF:
|
||||
{
|
||||
if (((cond == 3) && (st.getInt("end_walk") == 1)) || (cond == 4))
|
||||
{
|
||||
htmltext = "31526-01.htm";
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
|
||||
if (_page != null)
|
||||
@@ -264,10 +275,11 @@ public class Q021_HiddenTruth extends Quest
|
||||
htmltext = "31526-15.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case AGRIPEL:
|
||||
case BENEDICT:
|
||||
case DOMINIC:
|
||||
{
|
||||
if (((cond == 6) || (cond == 7)) && st.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
final int npcId = npc.getNpcId();
|
||||
@@ -295,7 +307,7 @@ public class Q021_HiddenTruth extends Quest
|
||||
|
||||
if ((st.getInt(String.valueOf(npcId1)) == 1) && (st.getInt(String.valueOf(npcId2)) == 1))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -307,17 +319,20 @@ public class Q021_HiddenTruth extends Quest
|
||||
htmltext = npcId + "-01.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case INNOCENTIN:
|
||||
{
|
||||
if ((cond == 7) && st.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
htmltext = "31328-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
if (npc.getNpcId() == INNOCENTIN)
|
||||
{
|
||||
htmltext = "31328-06.htm";
|
||||
@@ -327,6 +342,7 @@ public class Q021_HiddenTruth extends Quest
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -25,7 +25,6 @@ import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import org.l2jmobius.gameserver.model.quest.QuestTimer;
|
||||
import org.l2jmobius.gameserver.model.quest.State;
|
||||
import org.l2jmobius.gameserver.util.Util;
|
||||
|
||||
import quests.Q021_HiddenTruth.Q021_HiddenTruth;
|
||||
@@ -38,7 +37,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
private static final int WELL = 31527;
|
||||
private static final int GHOST_OF_PRIEST = 31528;
|
||||
private static final int GHOST_OF_ADVENTURER = 31529;
|
||||
// Mobs
|
||||
// Monsters
|
||||
private static final int[] MOBS =
|
||||
{
|
||||
21553, // Trampled Man
|
||||
@@ -66,7 +65,6 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
public Q022_TragedyInVonHellmannForest()
|
||||
{
|
||||
super(22, "Tragedy in von Hellmann Forest");
|
||||
|
||||
addKillId(MOBS);
|
||||
addKillId(SOUL_OF_WELL);
|
||||
addAttackId(SOUL_OF_WELL);
|
||||
@@ -135,9 +133,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
{
|
||||
if (qs.isCreated())
|
||||
{
|
||||
qs.setState(State.STARTED);
|
||||
qs.set("cond", "1");
|
||||
qs.playSound(QuestState.SOUND_ACCEPT);
|
||||
qs.startQuest();
|
||||
htmltext = event;
|
||||
}
|
||||
break;
|
||||
@@ -146,21 +142,21 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
{
|
||||
if (!qs.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
qs.set("cond", "2");
|
||||
qs.setCond(2);
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31334-06.htm";
|
||||
qs.set("cond", "3");
|
||||
qs.setCond(3);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31334-08.htm":
|
||||
{
|
||||
if (qs.getInt("cond") == 3)
|
||||
if (qs.isCond(3))
|
||||
{
|
||||
qs.set("cond", "4");
|
||||
qs.setCond(4);
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
htmltext = event;
|
||||
}
|
||||
@@ -168,7 +164,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
}
|
||||
case "31334-13.htm":
|
||||
{
|
||||
final int cond = qs.getInt("cond");
|
||||
final int cond = qs.getCond();
|
||||
if (((5 <= cond) && (cond <= 7)) && qs.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
if (_tifarenOwner == 0)
|
||||
@@ -181,14 +177,14 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
if (((cond == 5) || (cond == 6)) && qs.hasQuestItems(LOST_SKULL_OF_ELF))
|
||||
{
|
||||
qs.takeItems(LOST_SKULL_OF_ELF, -1);
|
||||
qs.set("cond", "7");
|
||||
qs.setCond(7);
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
htmltext = event;
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.set("cond", "6");
|
||||
qs.setCond(6);
|
||||
htmltext = "31334-14.htm";
|
||||
}
|
||||
}
|
||||
@@ -211,7 +207,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
qt.cancel();
|
||||
npc.setScriptValue(0);
|
||||
startQuestTimer("DESPAWN_GHOST2", 1000 * 3, npc, player);
|
||||
qs.set("cond", "8");
|
||||
qs.setCond(8);
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
htmltext = event;
|
||||
}
|
||||
@@ -229,7 +225,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
}
|
||||
case "31328-03.htm":
|
||||
{
|
||||
if (qs.getInt("cond") == 8)
|
||||
if (qs.isCond(8))
|
||||
{
|
||||
|
||||
qs.takeItems(CROSS_OF_EINHASAD, -1);
|
||||
@@ -239,10 +235,10 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
}
|
||||
case "31328-09.htm":
|
||||
{
|
||||
if (qs.getInt("cond") == 8)
|
||||
if (qs.isCond(8))
|
||||
{
|
||||
qs.giveItems(LETTER_OF_INNOCENTIN, 1);
|
||||
qs.set("cond", "9");
|
||||
qs.setCond(9);
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
htmltext = event;
|
||||
}
|
||||
@@ -250,10 +246,10 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
}
|
||||
case "31328-11.htm":
|
||||
{
|
||||
if ((qs.getInt("cond") == 14) && qs.hasQuestItems(REPORT_BOX))
|
||||
if (qs.isCond(14) && qs.hasQuestItems(REPORT_BOX))
|
||||
{
|
||||
qs.takeItems(REPORT_BOX, -1);
|
||||
qs.set("cond", "15");
|
||||
qs.setCond(15);
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
htmltext = event;
|
||||
}
|
||||
@@ -261,9 +257,9 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
}
|
||||
case "31328-19.htm":
|
||||
{
|
||||
if (qs.getInt("cond") == 15)
|
||||
if (qs.isCond(15))
|
||||
{
|
||||
qs.set("cond", "16");
|
||||
qs.setCond(16);
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
htmltext = event;
|
||||
}
|
||||
@@ -271,7 +267,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
}
|
||||
case "31527-02.htm":
|
||||
{
|
||||
if ((qs.getInt("cond") == 10) && (_soulWellNpc == null))
|
||||
if (qs.isCond(10) && (_soulWellNpc == null))
|
||||
{
|
||||
_soulWellNpc = addSpawn(SOUL_OF_WELL, SOUL_WELL_LOC, true, 0);
|
||||
startQuestTimer("activateSoulOfWell", 90000, _soulWellNpc, player);
|
||||
@@ -304,7 +300,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
}
|
||||
case "31529-03.htm":
|
||||
{
|
||||
if ((qs.getInt("cond") == 9) && qs.hasQuestItems(LETTER_OF_INNOCENTIN))
|
||||
if (qs.isCond(9) && qs.hasQuestItems(LETTER_OF_INNOCENTIN))
|
||||
{
|
||||
qs.set("memoState", "8");
|
||||
htmltext = event;
|
||||
@@ -325,7 +321,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
if (qs.getInt("memoState") == 9)
|
||||
{
|
||||
qs.giveItems(JEWEL_OF_ADVENTURER_1, 1);
|
||||
qs.set("cond", "10");
|
||||
qs.setCond(10);
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.set("memoState", "10");
|
||||
htmltext = event;
|
||||
@@ -345,7 +341,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
{
|
||||
case TIFAREN:
|
||||
{
|
||||
switch (qs.getInt("cond"))
|
||||
switch (qs.getCond())
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
@@ -401,7 +397,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
else
|
||||
{
|
||||
htmltext = "31334-16.htm";
|
||||
qs.set("cond", "6");
|
||||
qs.setCond(6);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -431,14 +427,14 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
}
|
||||
case INNOCENTIN:
|
||||
{
|
||||
switch (qs.getInt("cond"))
|
||||
switch (qs.getCond())
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
if (!qs.hasQuestItems(CROSS_OF_EINHASAD))
|
||||
{
|
||||
qs.giveItems(CROSS_OF_EINHASAD, 1);
|
||||
qs.set("cond", "3");
|
||||
qs.setCond(3);
|
||||
htmltext = "31328-01.htm";
|
||||
}
|
||||
break;
|
||||
@@ -500,7 +496,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
}
|
||||
case WELL:
|
||||
{
|
||||
switch (qs.getInt("cond"))
|
||||
switch (qs.getCond())
|
||||
{
|
||||
case 10:
|
||||
{
|
||||
@@ -516,7 +512,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
if (qs.hasQuestItems(JEWEL_OF_ADVENTURER_2) && !qs.hasQuestItems(SEALED_REPORT_BOX))
|
||||
{
|
||||
qs.giveItems(SEALED_REPORT_BOX, 1);
|
||||
qs.set("cond", "13");
|
||||
qs.setCond(13);
|
||||
htmltext = "31527-04.htm";
|
||||
}
|
||||
break;
|
||||
@@ -534,7 +530,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
}
|
||||
case GHOST_OF_ADVENTURER:
|
||||
{
|
||||
switch (qs.getInt("cond"))
|
||||
switch (qs.getCond())
|
||||
{
|
||||
case 9:
|
||||
{
|
||||
@@ -586,7 +582,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
if (qs.hasQuestItems(JEWEL_OF_ADVENTURER_2) && !qs.hasQuestItems(SEALED_REPORT_BOX))
|
||||
{
|
||||
htmltext = "31529-15.htm";
|
||||
qs.set("cond", "12");
|
||||
qs.setCond(12);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -597,7 +593,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
qs.giveItems(REPORT_BOX, 1);
|
||||
qs.takeItems(SEALED_REPORT_BOX, -1);
|
||||
qs.takeItems(JEWEL_OF_ADVENTURER_2, -1);
|
||||
qs.set("cond", "14");
|
||||
qs.setCond(14);
|
||||
htmltext = "31529-16.htm";
|
||||
}
|
||||
break;
|
||||
@@ -621,7 +617,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
public String onAttack(NpcInstance npc, PlayerInstance attacker, int damage, boolean isSummon)
|
||||
{
|
||||
final QuestState qs = attacker.getQuestState(getName());
|
||||
if ((qs != null) && (qs.getInt("cond") == 10) && qs.hasQuestItems(JEWEL_OF_ADVENTURER_1))
|
||||
if ((qs != null) && qs.isCond(10) && qs.hasQuestItems(JEWEL_OF_ADVENTURER_1))
|
||||
{
|
||||
if (qs.getInt("memoState") == 10)
|
||||
{
|
||||
@@ -631,7 +627,7 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
{
|
||||
qs.takeItems(JEWEL_OF_ADVENTURER_1, -1);
|
||||
qs.giveItems(JEWEL_OF_ADVENTURER_2, 1);
|
||||
qs.set("cond", "11");
|
||||
qs.setCond(11);
|
||||
}
|
||||
}
|
||||
return super.onAttack(npc, attacker, damage, isSummon);
|
||||
@@ -649,10 +645,10 @@ public class Q022_TragedyInVonHellmannForest extends Quest
|
||||
else
|
||||
{
|
||||
final QuestState qs = killer.getQuestState(getName());
|
||||
if ((qs != null) && (qs.getInt("cond") == 4) && qs.hasQuestItems(CROSS_OF_EINHASAD) && !qs.hasQuestItems(LOST_SKULL_OF_ELF) && (Rnd.get(100) < 10))
|
||||
if ((qs != null) && qs.isCond(4) && qs.hasQuestItems(CROSS_OF_EINHASAD) && !qs.hasQuestItems(LOST_SKULL_OF_ELF) && (Rnd.get(100) < 10))
|
||||
{
|
||||
qs.giveItems(LOST_SKULL_OF_ELF, 1);
|
||||
qs.set("cond", "5");
|
||||
qs.setCond(5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,105 +64,117 @@ public class Q023_LidiasHeart extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("31328-02.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(FOREST_OF_DEADMAN_MAP, 1);
|
||||
st.giveItems(SILVER_KEY, 1);
|
||||
}
|
||||
else if (event.equals("31328-06.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("31526-05.htm"))
|
||||
{
|
||||
if (!st.hasQuestItems(LIDIA_HAIRPIN))
|
||||
case "31328-02.htm":
|
||||
{
|
||||
st.giveItems(LIDIA_HAIRPIN, 1);
|
||||
if (st.hasQuestItems(LIDIA_DIARY))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
}
|
||||
st.startQuest();
|
||||
st.giveItems(FOREST_OF_DEADMAN_MAP, 1);
|
||||
st.giveItems(SILVER_KEY, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("31526-11.htm"))
|
||||
{
|
||||
if (!st.hasQuestItems(LIDIA_DIARY))
|
||||
case "31328-06.htm":
|
||||
{
|
||||
st.giveItems(LIDIA_DIARY, 1);
|
||||
if (st.hasQuestItems(LIDIA_HAIRPIN))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (event.equals("31328-11.htm"))
|
||||
{
|
||||
if (st.getInt("cond") < 5)
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("31328-19.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("31524-04.htm"))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LIDIA_DIARY, 1);
|
||||
}
|
||||
else if (event.equals("31523-02.htm"))
|
||||
{
|
||||
if (_ghost == null)
|
||||
case "31526-05.htm":
|
||||
{
|
||||
_ghost = addSpawn(31524, 51432, -54570, -3136, 0, false, 60000);
|
||||
_ghost.broadcastNpcSay("Who awoke me?");
|
||||
startQuestTimer("ghost_cleanup", 58000, null, player, false);
|
||||
if (!st.hasQuestItems(LIDIA_HAIRPIN))
|
||||
{
|
||||
st.giveItems(LIDIA_HAIRPIN, 1);
|
||||
if (st.hasQuestItems(LIDIA_DIARY))
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("31523-05.htm"))
|
||||
{
|
||||
// Don't launch twice the same task...
|
||||
if (getQuestTimer("tomb_digger", null, player) == null)
|
||||
case "31526-11.htm":
|
||||
{
|
||||
startQuestTimer("tomb_digger", 10000, null, player, false);
|
||||
if (!st.hasQuestItems(LIDIA_DIARY))
|
||||
{
|
||||
st.giveItems(LIDIA_DIARY, 1);
|
||||
if (st.hasQuestItems(LIDIA_HAIRPIN))
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31328-11.htm":
|
||||
{
|
||||
if (st.getCond() < 5)
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31328-19.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "31524-04.htm":
|
||||
{
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LIDIA_DIARY, 1);
|
||||
break;
|
||||
}
|
||||
case "31523-02.htm":
|
||||
{
|
||||
if (_ghost == null)
|
||||
{
|
||||
_ghost = addSpawn(31524, 51432, -54570, -3136, 0, false, 60000);
|
||||
_ghost.broadcastNpcSay("Who awoke me?");
|
||||
startQuestTimer("ghost_cleanup", 58000, null, player, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31523-05.htm":
|
||||
{
|
||||
// Don't launch twice the same task...
|
||||
if (getQuestTimer("tomb_digger", null, player) == null)
|
||||
{
|
||||
startQuestTimer("tomb_digger", 10000, null, player, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "tomb_digger":
|
||||
{
|
||||
htmltext = "31523-06.htm";
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(SILVER_KEY, 1);
|
||||
break;
|
||||
}
|
||||
case "31530-02.htm":
|
||||
{
|
||||
st.setCond(10);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SILVER_KEY, 1);
|
||||
st.giveItems(SILVER_SPEAR, 1);
|
||||
break;
|
||||
}
|
||||
case "ghost_cleanup":
|
||||
{
|
||||
_ghost = null;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
else if (event.equals("tomb_digger"))
|
||||
{
|
||||
htmltext = "31523-06.htm";
|
||||
st.set("cond", "8");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(SILVER_KEY, 1);
|
||||
}
|
||||
else if (event.equals("31530-02.htm"))
|
||||
{
|
||||
st.set("cond", "10");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SILVER_KEY, 1);
|
||||
st.giveItems(SILVER_SPEAR, 1);
|
||||
}
|
||||
else if (event.equals("ghost_cleanup"))
|
||||
{
|
||||
_ghost = null;
|
||||
return null;
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
@@ -180,6 +192,7 @@ public class Q023_LidiasHeart extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
final QuestState st2 = player.getQuestState(Q022_TragedyInVonHellmannForest.class.getSimpleName());
|
||||
if ((st2 != null) && st2.isCompleted())
|
||||
{
|
||||
@@ -197,12 +210,14 @@ public class Q023_LidiasHeart extends Quest
|
||||
htmltext = "31328-00.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case INNOCENTIN:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "31328-03.htm";
|
||||
@@ -224,12 +239,13 @@ public class Q023_LidiasHeart extends Quest
|
||||
htmltext = "31328-21.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BROKEN_BOOKSHELF:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "31526-00.htm";
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (cond == 3)
|
||||
@@ -248,8 +264,9 @@ public class Q023_LidiasHeart extends Quest
|
||||
htmltext = "31526-13.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GHOST_OF_VON_HELLMANN:
|
||||
{
|
||||
if (cond == 6)
|
||||
{
|
||||
htmltext = "31524-01.htm";
|
||||
@@ -259,8 +276,9 @@ public class Q023_LidiasHeart extends Quest
|
||||
htmltext = "31524-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TOMBSTONE:
|
||||
{
|
||||
if (cond == 6)
|
||||
{
|
||||
htmltext = (_ghost == null) ? "31523-01.htm" : "31523-03.htm";
|
||||
@@ -274,12 +292,13 @@ public class Q023_LidiasHeart extends Quest
|
||||
htmltext = "31523-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case VIOLET:
|
||||
{
|
||||
if (cond == 8)
|
||||
{
|
||||
htmltext = "31386-01.htm";
|
||||
st.set("cond", "9");
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (cond == 9)
|
||||
@@ -299,12 +318,13 @@ public class Q023_LidiasHeart extends Quest
|
||||
else
|
||||
{
|
||||
htmltext = "31386-02.htm";
|
||||
st.set("cond", "9");
|
||||
st.setCond(9);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BOX:
|
||||
{
|
||||
if (cond == 9)
|
||||
{
|
||||
htmltext = "31530-01.htm";
|
||||
@@ -314,10 +334,12 @@ public class Q023_LidiasHeart extends Quest
|
||||
htmltext = "31530-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
if (npc.getNpcId() == VIOLET)
|
||||
{
|
||||
htmltext = "31386-04.htm";
|
||||
@@ -327,6 +349,7 @@ public class Q023_LidiasHeart extends Quest
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -67,105 +67,122 @@ public class Q024_InhabitantsOfTheForestOfTheDead extends Quest
|
||||
@Override
|
||||
public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
|
||||
{
|
||||
String htmltext = event;
|
||||
QuestState st = player.getQuestState(getName());
|
||||
if (st == null)
|
||||
{
|
||||
return event;
|
||||
}
|
||||
if (event.equals("31389-03.htm"))
|
||||
|
||||
String htmltext = event;
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.set("state", "1");
|
||||
st.playSound("ItemSound.quest_accept");
|
||||
st.giveItems(FLOWER, 1);
|
||||
}
|
||||
else if (event.equals("31389-08.htm"))
|
||||
{
|
||||
st.set("state", "3");
|
||||
}
|
||||
else if (event.equals("31389-13.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.set("state", "4");
|
||||
st.playSound("ItemSound.quest_middle");
|
||||
st.giveItems(SILVER_CROSS, 1);
|
||||
}
|
||||
else if (event.equals("31389-18.htm"))
|
||||
{
|
||||
st.playSound("InterfaceSound.charstat_open_01");
|
||||
}
|
||||
else if (event.equals("31389-19.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.set("state", "5");
|
||||
st.takeItems(BROKEN_SILVER_CROSS, -1);
|
||||
st.playSound("ItemSound.quest_middle");
|
||||
}
|
||||
else if (event.equals("31522-03.htm"))
|
||||
{
|
||||
st.set("state", "12");
|
||||
st.takeItems(TOTEM, -1);
|
||||
}
|
||||
else if (event.equals("31522-08.htm"))
|
||||
{
|
||||
st.set("cond", "11");
|
||||
st.set("state", "13");
|
||||
st.playSound("ItemSound.quest_middle");
|
||||
}
|
||||
else if (event.equals("31522-17.htm"))
|
||||
{
|
||||
st.set("state", "14");
|
||||
}
|
||||
else if (event.equals("31522-21.htm"))
|
||||
{
|
||||
st.giveItems(SUSPICIOUS_TOTEM, 1);
|
||||
st.playSound("ItemSound.quest_finish");
|
||||
st.exitQuest(false);
|
||||
}
|
||||
else if (event.equals("31532-04.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.set("state", "6");
|
||||
st.giveItems(LETTER, 1);
|
||||
st.playSound("ItemSound.quest_middle");
|
||||
}
|
||||
else if (event.equals("31532-06.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(HAIRPIN))
|
||||
case "31389-03.htm":
|
||||
{
|
||||
st.set("state", "8");
|
||||
st.takeItems(LETTER, -1);
|
||||
st.takeItems(HAIRPIN, -1);
|
||||
st.startQuest();
|
||||
st.set("state", "1");
|
||||
st.giveItems(FLOWER, 1);
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "31389-08.htm":
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.set("state", "7");
|
||||
htmltext = "31532-07.htm";
|
||||
st.set("state", "3");
|
||||
break;
|
||||
}
|
||||
case "31389-13.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.set("state", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(SILVER_CROSS, 1);
|
||||
break;
|
||||
}
|
||||
case "31389-18.htm":
|
||||
{
|
||||
st.playSound("InterfaceSound.charstat_open_01");
|
||||
break;
|
||||
}
|
||||
case "31389-19.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.set("state", "5");
|
||||
st.takeItems(BROKEN_SILVER_CROSS, -1);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "31522-03.htm":
|
||||
{
|
||||
st.set("state", "12");
|
||||
st.takeItems(TOTEM, -1);
|
||||
break;
|
||||
}
|
||||
case "31522-08.htm":
|
||||
{
|
||||
st.setCond(11);
|
||||
st.set("state", "13");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "31522-17.htm":
|
||||
{
|
||||
st.set("state", "14");
|
||||
break;
|
||||
}
|
||||
case "31522-21.htm":
|
||||
{
|
||||
st.giveItems(SUSPICIOUS_TOTEM, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
case "31532-04.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.set("state", "6");
|
||||
st.giveItems(LETTER, 1);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "31532-06.htm":
|
||||
{
|
||||
if (st.hasQuestItems(HAIRPIN))
|
||||
{
|
||||
st.set("state", "8");
|
||||
st.takeItems(LETTER, -1);
|
||||
st.takeItems(HAIRPIN, -1);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.setCond(7);
|
||||
st.set("state", "7");
|
||||
htmltext = "31532-07.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31532-10.htm":
|
||||
{
|
||||
st.set("state", "9");
|
||||
break;
|
||||
}
|
||||
case "31532-14.htm":
|
||||
{
|
||||
st.set("state", "10");
|
||||
break;
|
||||
}
|
||||
case "31532-19.htm":
|
||||
{
|
||||
st.setCond(9);
|
||||
st.set("state", "11");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "31531-02.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.set("state", "2");
|
||||
st.takeItems(FLOWER, -1);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("31532-10.htm"))
|
||||
{
|
||||
st.set("state", "9");
|
||||
}
|
||||
else if (event.equals("31532-14.htm"))
|
||||
{
|
||||
st.set("state", "10");
|
||||
}
|
||||
else if (event.equals("31532-19.htm"))
|
||||
{
|
||||
st.set("cond", "9");
|
||||
st.set("state", "11");
|
||||
st.playSound("ItemSound.quest_middle");
|
||||
}
|
||||
else if (event.equals("31531-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.set("state", "2");
|
||||
st.takeItems(FLOWER, -1);
|
||||
st.playSound("ItemSound.quest_middle");
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -175,15 +192,17 @@ public class Q024_InhabitantsOfTheForestOfTheDead extends Quest
|
||||
public String onTalk(NpcInstance npc, PlayerInstance player)
|
||||
{
|
||||
String htmltext = getNoQuestMsg();
|
||||
QuestState st = player.getQuestState(getName());
|
||||
final QuestState st = player.getQuestState(getName());
|
||||
if (st == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
QuestState st2 = player.getQuestState(Q023_LidiasHeart.class.getSimpleName());
|
||||
{
|
||||
final QuestState st2 = player.getQuestState(Q023_LidiasHeart.class.getSimpleName());
|
||||
if ((st2 != null) && st2.isCompleted() && (player.getLevel() >= 65))
|
||||
{
|
||||
htmltext = "31389-01.htm";
|
||||
@@ -193,11 +212,14 @@ public class Q024_InhabitantsOfTheForestOfTheDead extends Quest
|
||||
htmltext = "31389-02.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
int state = st.getInt("state");
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case 31389:
|
||||
{
|
||||
if (state == 1)
|
||||
{
|
||||
htmltext = "31389-04.htm";
|
||||
@@ -237,9 +259,9 @@ public class Q024_InhabitantsOfTheForestOfTheDead extends Quest
|
||||
if ((state == 7) && !st.hasQuestItems(HAIRPIN))
|
||||
{
|
||||
htmltext = "31389-21.htm";
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
st.giveItems(HAIRPIN, 1);
|
||||
st.playSound("ItemSound.quest_middle");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (((state == 7) && st.hasQuestItems(HAIRPIN)) || (state == 6))
|
||||
{
|
||||
@@ -249,7 +271,9 @@ public class Q024_InhabitantsOfTheForestOfTheDead extends Quest
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
}
|
||||
case 31522:
|
||||
{
|
||||
if ((state == 11) && st.hasQuestItems(TOTEM))
|
||||
{
|
||||
htmltext = "31522-01.htm";
|
||||
@@ -274,7 +298,9 @@ public class Q024_InhabitantsOfTheForestOfTheDead extends Quest
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
}
|
||||
case 31531:
|
||||
{
|
||||
if ((state == 1) && st.hasQuestItems(FLOWER))
|
||||
{
|
||||
htmltext = "31531-01.htm";
|
||||
@@ -287,7 +313,9 @@ public class Q024_InhabitantsOfTheForestOfTheDead extends Quest
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
case 31532:
|
||||
{
|
||||
if (state == 5)
|
||||
{
|
||||
htmltext = "31532-01.htm";
|
||||
@@ -327,10 +355,15 @@ public class Q024_InhabitantsOfTheForestOfTheDead extends Quest
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
}
|
||||
default:
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
}
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
if (npc.getNpcId() == 31522)
|
||||
{
|
||||
htmltext = "31522-22.htm";
|
||||
@@ -339,6 +372,7 @@ public class Q024_InhabitantsOfTheForestOfTheDead extends Quest
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -359,7 +393,7 @@ public class Q024_InhabitantsOfTheForestOfTheDead extends Quest
|
||||
{
|
||||
qs.takeItems(SILVER_CROSS, -1);
|
||||
qs.giveItems(BROKEN_SILVER_CROSS, 1);
|
||||
qs.set("cond", "4");
|
||||
qs.setCond(4);
|
||||
for (PlayerInstance nearby : npc.getKnownList().getKnownPlayers().values())
|
||||
{
|
||||
nearby.sendPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "That sign!"));
|
||||
@@ -372,7 +406,7 @@ public class Q024_InhabitantsOfTheForestOfTheDead extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isSummon)
|
||||
{
|
||||
final PlayerInstance partyMember = getRandomPartyMember(player, npc, "9");
|
||||
final PlayerInstance partyMember = getRandomPartyMember(player, npc, 9);
|
||||
if (partyMember == null)
|
||||
{
|
||||
return null;
|
||||
@@ -385,7 +419,7 @@ public class Q024_InhabitantsOfTheForestOfTheDead extends Quest
|
||||
}
|
||||
if (st.dropItems(TOTEM, 1, 1, 100000))
|
||||
{
|
||||
st.set("cond", "10");
|
||||
st.setCond(10);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -55,7 +55,6 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
public Q025_HidingBehindTheTruth()
|
||||
{
|
||||
super(25, "Hiding Behind the Truth");
|
||||
|
||||
addStartNpc(BENEDICT);
|
||||
addTalkId(AGRIPEL, BENEDICT, BOOKSHELF, BOOKSHELF2, BOOKSHELF3, WIZARD, LIDIA, TOMBSTONE, COFFIN);
|
||||
addKillId(TRIOL);
|
||||
@@ -76,9 +75,7 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
{
|
||||
case "31349-02.htm":
|
||||
{
|
||||
qs.playSound("ItemSound.quest_accept");
|
||||
qs.set("cond", "1");
|
||||
qs.setState(State.STARTED);
|
||||
qs.startQuest();
|
||||
break;
|
||||
}
|
||||
case "31349-03.htm":
|
||||
@@ -89,15 +86,15 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
}
|
||||
else
|
||||
{
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "2");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.setCond(2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "31349-10.htm":
|
||||
{
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "4");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.setCond(4);
|
||||
break;
|
||||
}
|
||||
case "31348-02.htm":
|
||||
@@ -107,15 +104,15 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
}
|
||||
case "31348-07.htm":
|
||||
{
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "5");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.setCond(5);
|
||||
qs.giveItems(GEMSTONE_KEY, 1);
|
||||
break;
|
||||
}
|
||||
case "31522-04.htm":
|
||||
{
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "6");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.setCond(6);
|
||||
break;
|
||||
}
|
||||
case "31535-03.htm":
|
||||
@@ -128,8 +125,8 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
triol.setRunning();
|
||||
((Attackable) triol).addDamageHate(player, 0, 999);
|
||||
triol.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "7");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.setCond(7);
|
||||
}
|
||||
else if (qs.getInt("step") == 2)
|
||||
{
|
||||
@@ -141,8 +138,8 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
{
|
||||
qs.giveItems(CONTRACT, 1);
|
||||
qs.takeItems(GEMSTONE_KEY, -1);
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "9");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.setCond(9);
|
||||
break;
|
||||
}
|
||||
case "31532-02.htm":
|
||||
@@ -152,27 +149,27 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
}
|
||||
case "31532-06.htm":
|
||||
{
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "11");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.setCond(11);
|
||||
break;
|
||||
}
|
||||
case "31531-02.htm":
|
||||
{
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "12");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.setCond(12);
|
||||
qs.addSpawn(COFFIN, 60104, -35820, -664, 20000);
|
||||
break;
|
||||
}
|
||||
case "31532-18.htm":
|
||||
{
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "15");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.setCond(15);
|
||||
break;
|
||||
}
|
||||
case "31522-12.htm":
|
||||
{
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "16");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.setCond(16);
|
||||
}
|
||||
break;
|
||||
case "31348-10.htm":
|
||||
@@ -182,14 +179,14 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
}
|
||||
case "31348-15.htm":
|
||||
{
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "17");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.setCond(17);
|
||||
break;
|
||||
}
|
||||
case "31348-16.htm":
|
||||
{
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "18");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.setCond(18);
|
||||
break;
|
||||
}
|
||||
case "31532-20.htm":
|
||||
@@ -200,7 +197,7 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
qs.rewardExpAndSp(572277, 53750);
|
||||
qs.unset("cond");
|
||||
qs.exitQuest(true);
|
||||
qs.playSound("ItemSound.quest_finish");
|
||||
qs.playSound(QuestState.SOUND_FINISH);
|
||||
break;
|
||||
}
|
||||
case "31522-15.htm":
|
||||
@@ -211,7 +208,7 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
qs.rewardExpAndSp(572277, 53750);
|
||||
qs.unset("cond");
|
||||
qs.exitQuest(true);
|
||||
qs.playSound("ItemSound.quest_finish");
|
||||
qs.playSound(QuestState.SOUND_FINISH);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -231,7 +228,7 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
|
||||
final int npcId = npc.getNpcId();
|
||||
final int id = qs.getState();
|
||||
final int cond = qs.getInt("cond");
|
||||
final int cond = qs.getCond();
|
||||
if (id == State.COMPLETED)
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
@@ -276,8 +273,8 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "31522-01.htm";
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "3");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.setCond(3);
|
||||
qs.giveItems(SUSPICIOUS_TOTEM, 1);
|
||||
}
|
||||
else if (cond == 3)
|
||||
@@ -295,8 +292,8 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
else if (cond == 9)
|
||||
{
|
||||
htmltext = "31522-05.htm";
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "10");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.setCond(10);
|
||||
}
|
||||
else if (cond == 10)
|
||||
{
|
||||
@@ -380,7 +377,7 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
else if (cond == 13)
|
||||
{
|
||||
htmltext = "31532-07.htm";
|
||||
qs.set("cond", "14");
|
||||
qs.setCond(14);
|
||||
qs.takeItems(DRESS, -1);
|
||||
}
|
||||
else if (cond == 14)
|
||||
@@ -417,8 +414,8 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
{
|
||||
htmltext = "31536-01.htm";
|
||||
qs.giveItems(DRESS, 1);
|
||||
qs.playSound("ItemSound.quest_middle");
|
||||
qs.set("cond", "13");
|
||||
qs.playSound(QuestState.SOUND_MIDDLE);
|
||||
qs.setCond(13);
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
@@ -435,10 +432,10 @@ public class Q025_HidingBehindTheTruth extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
if ((qs.getState() == State.STARTED) && (qs.getInt("cond") == 7))
|
||||
if ((qs.getState() == State.STARTED) && qs.isCond(7))
|
||||
{
|
||||
qs.playSound("ItemSound.quest_itemget");
|
||||
qs.set("cond", "8");
|
||||
qs.playSound(QuestState.SOUND_ITEMGET);
|
||||
qs.setCond(8);
|
||||
npc.broadcastPacket(new CreatureSay(npc.getObjectId(), ChatType.GENERAL, npc.getName(), "You've ended my immortal life! You've protected by the feudal lord, aren't you?"));
|
||||
qs.giveItems(TOTEM_DOLL, 1);
|
||||
qs.set("step", "2");
|
||||
|
||||
@@ -55,38 +55,42 @@ public class Q027_ChestCaughtWithABaitOfWind extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("31570-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("31570-07.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(LARGE_BLUE_TREASURE_CHEST))
|
||||
case "31570-04.htm":
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.takeItems(LARGE_BLUE_TREASURE_CHEST, 1);
|
||||
st.giveItems(STRANGE_BLUEPRINT, 1);
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "31570-07.htm":
|
||||
{
|
||||
htmltext = "31570-08.htm";
|
||||
if (st.hasQuestItems(LARGE_BLUE_TREASURE_CHEST))
|
||||
{
|
||||
st.setCond(2);
|
||||
st.takeItems(LARGE_BLUE_TREASURE_CHEST, 1);
|
||||
st.giveItems(STRANGE_BLUEPRINT, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31570-08.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("31434-02.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(STRANGE_BLUEPRINT))
|
||||
case "31434-02.htm":
|
||||
{
|
||||
htmltext = "31434-02.htm";
|
||||
st.takeItems(STRANGE_BLUEPRINT, 1);
|
||||
st.giveItems(BLACK_PEARL_RING, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31434-03.htm";
|
||||
if (st.hasQuestItems(STRANGE_BLUEPRINT))
|
||||
{
|
||||
htmltext = "31434-02.htm";
|
||||
st.takeItems(STRANGE_BLUEPRINT, 1);
|
||||
st.giveItems(BLACK_PEARL_RING, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31434-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,6 +110,7 @@ public class Q027_ChestCaughtWithABaitOfWind extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getLevel() < 27)
|
||||
{
|
||||
htmltext = "31570-02.htm";
|
||||
@@ -123,12 +128,14 @@ public class Q027_ChestCaughtWithABaitOfWind extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case LANOSCO:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = (!st.hasQuestItems(LARGE_BLUE_TREASURE_CHEST)) ? "31570-06.htm" : "31570-05.htm";
|
||||
@@ -138,19 +145,23 @@ public class Q027_ChestCaughtWithABaitOfWind extends Quest
|
||||
htmltext = "31570-09.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SHALING:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "31434-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -29,7 +29,6 @@ public class Q028_ChestCaughtWithABaitOfIcyAir extends Quest
|
||||
// NPCs
|
||||
private static final int OFULLE = 31572;
|
||||
private static final int KIKI = 31442;
|
||||
|
||||
// Items
|
||||
private static final int BIG_YELLOW_TREASURE_CHEST = 6503;
|
||||
private static final int KIKI_LETTER = 7626;
|
||||
@@ -38,9 +37,7 @@ public class Q028_ChestCaughtWithABaitOfIcyAir extends Quest
|
||||
public Q028_ChestCaughtWithABaitOfIcyAir()
|
||||
{
|
||||
super(28, "Chest caught with a bait of icy air");
|
||||
|
||||
registerQuestItems(KIKI_LETTER);
|
||||
|
||||
addStartNpc(OFULLE);
|
||||
addTalkId(OFULLE, KIKI);
|
||||
}
|
||||
@@ -55,38 +52,42 @@ public class Q028_ChestCaughtWithABaitOfIcyAir extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("31572-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("31572-07.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(BIG_YELLOW_TREASURE_CHEST))
|
||||
case "31572-04.htm":
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.takeItems(BIG_YELLOW_TREASURE_CHEST, 1);
|
||||
st.giveItems(KIKI_LETTER, 1);
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "31572-07.htm":
|
||||
{
|
||||
htmltext = "31572-08.htm";
|
||||
if (st.hasQuestItems(BIG_YELLOW_TREASURE_CHEST))
|
||||
{
|
||||
st.setCond(2);
|
||||
st.takeItems(BIG_YELLOW_TREASURE_CHEST, 1);
|
||||
st.giveItems(KIKI_LETTER, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31572-08.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("31442-02.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(KIKI_LETTER))
|
||||
case "31442-02.htm":
|
||||
{
|
||||
htmltext = "31442-02.htm";
|
||||
st.takeItems(KIKI_LETTER, 1);
|
||||
st.giveItems(ELVEN_RING, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31442-03.htm";
|
||||
if (st.hasQuestItems(KIKI_LETTER))
|
||||
{
|
||||
htmltext = "31442-02.htm";
|
||||
st.takeItems(KIKI_LETTER, 1);
|
||||
st.giveItems(ELVEN_RING, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31442-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,6 +107,7 @@ public class Q028_ChestCaughtWithABaitOfIcyAir extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getLevel() < 36)
|
||||
{
|
||||
htmltext = "31572-02.htm";
|
||||
@@ -123,12 +125,14 @@ public class Q028_ChestCaughtWithABaitOfIcyAir extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case OFULLE:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = (!st.hasQuestItems(BIG_YELLOW_TREASURE_CHEST)) ? "31572-06.htm" : "31572-05.htm";
|
||||
@@ -138,19 +142,23 @@ public class Q028_ChestCaughtWithABaitOfIcyAir extends Quest
|
||||
htmltext = "31572-09.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KIKI:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "31442-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -29,7 +29,6 @@ public class Q029_ChestCaughtWithABaitOfEarth extends Quest
|
||||
// NPCs
|
||||
private static final int WILLIE = 31574;
|
||||
private static final int ANABEL = 30909;
|
||||
|
||||
// Items
|
||||
private static final int SMALL_PURPLE_TREASURE_CHEST = 6507;
|
||||
private static final int SMALL_GLASS_BOX = 7627;
|
||||
@@ -38,9 +37,7 @@ public class Q029_ChestCaughtWithABaitOfEarth extends Quest
|
||||
public Q029_ChestCaughtWithABaitOfEarth()
|
||||
{
|
||||
super(29, "Chest caught with a bait of earth");
|
||||
|
||||
registerQuestItems(SMALL_GLASS_BOX);
|
||||
|
||||
addStartNpc(WILLIE);
|
||||
addTalkId(WILLIE, ANABEL);
|
||||
}
|
||||
@@ -55,38 +52,42 @@ public class Q029_ChestCaughtWithABaitOfEarth extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("31574-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("31574-07.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(SMALL_PURPLE_TREASURE_CHEST))
|
||||
case "31574-04.htm":
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.takeItems(SMALL_PURPLE_TREASURE_CHEST, 1);
|
||||
st.giveItems(SMALL_GLASS_BOX, 1);
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "31574-07.htm":
|
||||
{
|
||||
htmltext = "31574-08.htm";
|
||||
if (st.hasQuestItems(SMALL_PURPLE_TREASURE_CHEST))
|
||||
{
|
||||
st.setCond(2);
|
||||
st.takeItems(SMALL_PURPLE_TREASURE_CHEST, 1);
|
||||
st.giveItems(SMALL_GLASS_BOX, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31574-08.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30909-02.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(SMALL_GLASS_BOX))
|
||||
case "30909-02.htm":
|
||||
{
|
||||
htmltext = "30909-02.htm";
|
||||
st.takeItems(SMALL_GLASS_BOX, 1);
|
||||
st.giveItems(PLATED_LEATHER_GLOVES, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30909-03.htm";
|
||||
if (st.hasQuestItems(SMALL_GLASS_BOX))
|
||||
{
|
||||
htmltext = "30909-02.htm";
|
||||
st.takeItems(SMALL_GLASS_BOX, 1);
|
||||
st.giveItems(PLATED_LEATHER_GLOVES, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30909-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,6 +107,7 @@ public class Q029_ChestCaughtWithABaitOfEarth extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getLevel() < 48)
|
||||
{
|
||||
htmltext = "31574-02.htm";
|
||||
@@ -123,12 +125,14 @@ public class Q029_ChestCaughtWithABaitOfEarth extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case WILLIE:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = (!st.hasQuestItems(SMALL_PURPLE_TREASURE_CHEST)) ? "31574-06.htm" : "31574-05.htm";
|
||||
@@ -138,19 +142,23 @@ public class Q029_ChestCaughtWithABaitOfEarth extends Quest
|
||||
htmltext = "31574-09.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ANABEL:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30909-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -29,7 +29,6 @@ public class Q030_ChestCaughtWithABaitOfFire extends Quest
|
||||
// NPCs
|
||||
private static final int LINNAEUS = 31577;
|
||||
private static final int RUKAL = 30629;
|
||||
|
||||
// Items
|
||||
private static final int RED_TREASURE_BOX = 6511;
|
||||
private static final int MUSICAL_SCORE = 7628;
|
||||
@@ -38,9 +37,7 @@ public class Q030_ChestCaughtWithABaitOfFire extends Quest
|
||||
public Q030_ChestCaughtWithABaitOfFire()
|
||||
{
|
||||
super(30, "Chest caught with a bait of fire");
|
||||
|
||||
registerQuestItems(MUSICAL_SCORE);
|
||||
|
||||
addStartNpc(LINNAEUS);
|
||||
addTalkId(LINNAEUS, RUKAL);
|
||||
}
|
||||
@@ -55,38 +52,42 @@ public class Q030_ChestCaughtWithABaitOfFire extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("31577-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("31577-07.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(RED_TREASURE_BOX))
|
||||
case "31577-04.htm":
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.takeItems(RED_TREASURE_BOX, 1);
|
||||
st.giveItems(MUSICAL_SCORE, 1);
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "31577-07.htm":
|
||||
{
|
||||
htmltext = "31577-08.htm";
|
||||
if (st.hasQuestItems(RED_TREASURE_BOX))
|
||||
{
|
||||
st.setCond(2);
|
||||
st.takeItems(RED_TREASURE_BOX, 1);
|
||||
st.giveItems(MUSICAL_SCORE, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31577-08.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30629-02.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(MUSICAL_SCORE))
|
||||
case "30629-02.htm":
|
||||
{
|
||||
htmltext = "30629-02.htm";
|
||||
st.takeItems(MUSICAL_SCORE, 1);
|
||||
st.giveItems(NECKLACE_OF_PROTECTION, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30629-03.htm";
|
||||
if (st.hasQuestItems(MUSICAL_SCORE))
|
||||
{
|
||||
htmltext = "30629-02.htm";
|
||||
st.takeItems(MUSICAL_SCORE, 1);
|
||||
st.giveItems(NECKLACE_OF_PROTECTION, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30629-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,6 +107,7 @@ public class Q030_ChestCaughtWithABaitOfFire extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getLevel() < 60)
|
||||
{
|
||||
htmltext = "31577-02.htm";
|
||||
@@ -123,12 +125,14 @@ public class Q030_ChestCaughtWithABaitOfFire extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case LINNAEUS:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = (!st.hasQuestItems(RED_TREASURE_BOX)) ? "31577-06.htm" : "31577-05.htm";
|
||||
@@ -138,19 +142,23 @@ public class Q030_ChestCaughtWithABaitOfFire extends Quest
|
||||
htmltext = "31577-09.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case RUKAL:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30629-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -24,9 +24,6 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q031_SecretBuriedInTheSwamp extends Quest
|
||||
{
|
||||
// Item
|
||||
private static final int KRORIN_JOURNAL = 7252;
|
||||
|
||||
// NPCs
|
||||
private static final int ABERCROMBIE = 31555;
|
||||
private static final int FORGOTTEN_MONUMENT_1 = 31661;
|
||||
@@ -34,13 +31,13 @@ public class Q031_SecretBuriedInTheSwamp extends Quest
|
||||
private static final int FORGOTTEN_MONUMENT_3 = 31663;
|
||||
private static final int FORGOTTEN_MONUMENT_4 = 31664;
|
||||
private static final int CORPSE_OF_DWARF = 31665;
|
||||
// Item
|
||||
private static final int KRORIN_JOURNAL = 7252;
|
||||
|
||||
public Q031_SecretBuriedInTheSwamp()
|
||||
{
|
||||
super(31, "Secret Buried in the Swamp");
|
||||
|
||||
registerQuestItems(KRORIN_JOURNAL);
|
||||
|
||||
addStartNpc(ABERCROMBIE);
|
||||
addTalkId(ABERCROMBIE, CORPSE_OF_DWARF, FORGOTTEN_MONUMENT_1, FORGOTTEN_MONUMENT_2, FORGOTTEN_MONUMENT_3, FORGOTTEN_MONUMENT_4);
|
||||
}
|
||||
@@ -55,50 +52,59 @@ public class Q031_SecretBuriedInTheSwamp extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("31555-01.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("31665-01.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(KRORIN_JOURNAL, 1);
|
||||
}
|
||||
else if (event.equals("31555-04.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("31661-01.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("31662-01.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("31663-01.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("31664-01.htm"))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("31555-07.htm"))
|
||||
{
|
||||
st.takeItems(KRORIN_JOURNAL, 1);
|
||||
st.rewardItems(57, 40000);
|
||||
st.rewardExpAndSp(130000, 0);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "31555-01.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "31665-01.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(KRORIN_JOURNAL, 1);
|
||||
break;
|
||||
}
|
||||
case "31555-04.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "31661-01.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "31662-01.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "31663-01.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "31664-01.htm":
|
||||
{
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "31555-07.htm":
|
||||
{
|
||||
st.takeItems(KRORIN_JOURNAL, 1);
|
||||
st.rewardItems(57, 40000);
|
||||
st.rewardExpAndSp(130000, 0);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -117,14 +123,17 @@ public class Q031_SecretBuriedInTheSwamp extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 66) ? "31555-00a.htm" : "31555-00.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ABERCROMBIE:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "31555-02.htm";
|
||||
@@ -142,8 +151,9 @@ public class Q031_SecretBuriedInTheSwamp extends Quest
|
||||
htmltext = "31555-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case CORPSE_OF_DWARF:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "31665-00.htm";
|
||||
@@ -153,8 +163,9 @@ public class Q031_SecretBuriedInTheSwamp extends Quest
|
||||
htmltext = "31665-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case FORGOTTEN_MONUMENT_1:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "31661-00.htm";
|
||||
@@ -164,8 +175,9 @@ public class Q031_SecretBuriedInTheSwamp extends Quest
|
||||
htmltext = "31661-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case FORGOTTEN_MONUMENT_2:
|
||||
{
|
||||
if (cond == 4)
|
||||
{
|
||||
htmltext = "31662-00.htm";
|
||||
@@ -175,8 +187,9 @@ public class Q031_SecretBuriedInTheSwamp extends Quest
|
||||
htmltext = "31662-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case FORGOTTEN_MONUMENT_3:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "31663-00.htm";
|
||||
@@ -186,8 +199,9 @@ public class Q031_SecretBuriedInTheSwamp extends Quest
|
||||
htmltext = "31663-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case FORGOTTEN_MONUMENT_4:
|
||||
{
|
||||
if (cond == 6)
|
||||
{
|
||||
htmltext = "31664-00.htm";
|
||||
@@ -197,12 +211,15 @@ public class Q031_SecretBuriedInTheSwamp extends Quest
|
||||
htmltext = "31664-02.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -24,32 +24,27 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q032_AnObviousLie extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int GENTLER = 30094;
|
||||
private static final int MAXIMILIAN = 30120;
|
||||
private static final int MIKI_THE_CAT = 31706;
|
||||
// Items
|
||||
private static final int SUEDE = 1866;
|
||||
private static final int THREAD = 1868;
|
||||
private static final int SPIRIT_ORE = 3031;
|
||||
private static final int MAP = 7165;
|
||||
private static final int MEDICINAL_HERB = 7166;
|
||||
|
||||
// Rewards
|
||||
private static final int CAT_EARS = 6843;
|
||||
private static final int RACOON_EARS = 7680;
|
||||
private static final int RABBIT_EARS = 7683;
|
||||
|
||||
// NPCs
|
||||
private static final int GENTLER = 30094;
|
||||
private static final int MAXIMILIAN = 30120;
|
||||
private static final int MIKI_THE_CAT = 31706;
|
||||
|
||||
public Q032_AnObviousLie()
|
||||
{
|
||||
super(32, "An Obvious Lie");
|
||||
|
||||
registerQuestItems(MAP, MEDICINAL_HERB);
|
||||
|
||||
addStartNpc(MAXIMILIAN);
|
||||
addTalkId(MAXIMILIAN, GENTLER, MIKI_THE_CAT);
|
||||
|
||||
addKillId(20135); // Alligator
|
||||
}
|
||||
|
||||
@@ -63,103 +58,115 @@ public class Q032_AnObviousLie extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30120-1.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("30094-1.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(MAP, 1);
|
||||
}
|
||||
else if (event.equals("31706-1.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAP, 1);
|
||||
}
|
||||
else if (event.equals("30094-4.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MEDICINAL_HERB, 20);
|
||||
}
|
||||
else if (event.equals("30094-7.htm"))
|
||||
{
|
||||
if (st.getQuestItemsCount(SPIRIT_ORE) < 500)
|
||||
case "30120-1.htm":
|
||||
{
|
||||
htmltext = "30094-5.htm";
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30094-1.htm":
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SPIRIT_ORE, 500);
|
||||
st.giveItems(MAP, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("31706-4.htm"))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("30094-10.htm"))
|
||||
{
|
||||
st.set("cond", "8");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("30094-13.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("cat"))
|
||||
{
|
||||
if ((st.getQuestItemsCount(THREAD) < 1000) || (st.getQuestItemsCount(SUEDE) < 500))
|
||||
case "31706-1.htm":
|
||||
{
|
||||
htmltext = "30094-11.htm";
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAP, 1);
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30094-4.htm":
|
||||
{
|
||||
htmltext = "30094-14.htm";
|
||||
st.takeItems(SUEDE, 500);
|
||||
st.takeItems(THREAD, 1000);
|
||||
st.giveItems(CAT_EARS, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MEDICINAL_HERB, 20);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("racoon"))
|
||||
{
|
||||
if ((st.getQuestItemsCount(THREAD) < 1000) || (st.getQuestItemsCount(SUEDE) < 500))
|
||||
case "30094-7.htm":
|
||||
{
|
||||
htmltext = "30094-11.htm";
|
||||
if (st.getQuestItemsCount(SPIRIT_ORE) < 500)
|
||||
{
|
||||
htmltext = "30094-5.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SPIRIT_ORE, 500);
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "31706-4.htm":
|
||||
{
|
||||
htmltext = "30094-14.htm";
|
||||
st.takeItems(SUEDE, 500);
|
||||
st.takeItems(THREAD, 1000);
|
||||
st.giveItems(RACOON_EARS, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("rabbit"))
|
||||
{
|
||||
if ((st.getQuestItemsCount(THREAD) < 1000) || (st.getQuestItemsCount(SUEDE) < 500))
|
||||
case "30094-10.htm":
|
||||
{
|
||||
htmltext = "30094-11.htm";
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30094-13.htm":
|
||||
{
|
||||
htmltext = "30094-14.htm";
|
||||
st.takeItems(SUEDE, 500);
|
||||
st.takeItems(THREAD, 1000);
|
||||
st.giveItems(RABBIT_EARS, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "cat":
|
||||
{
|
||||
if ((st.getQuestItemsCount(THREAD) < 1000) || (st.getQuestItemsCount(SUEDE) < 500))
|
||||
{
|
||||
htmltext = "30094-11.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30094-14.htm";
|
||||
st.takeItems(SUEDE, 500);
|
||||
st.takeItems(THREAD, 1000);
|
||||
st.giveItems(CAT_EARS, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "racoon":
|
||||
{
|
||||
if ((st.getQuestItemsCount(THREAD) < 1000) || (st.getQuestItemsCount(SUEDE) < 500))
|
||||
{
|
||||
htmltext = "30094-11.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30094-14.htm";
|
||||
st.takeItems(SUEDE, 500);
|
||||
st.takeItems(THREAD, 1000);
|
||||
st.giveItems(RACOON_EARS, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "rabbit":
|
||||
{
|
||||
if ((st.getQuestItemsCount(THREAD) < 1000) || (st.getQuestItemsCount(SUEDE) < 500))
|
||||
{
|
||||
htmltext = "30094-11.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30094-14.htm";
|
||||
st.takeItems(SUEDE, 500);
|
||||
st.takeItems(THREAD, 1000);
|
||||
st.giveItems(RABBIT_EARS, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -179,18 +186,22 @@ public class Q032_AnObviousLie extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 45) ? "30120-0a.htm" : "30120-0.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case MAXIMILIAN:
|
||||
{
|
||||
htmltext = "30120-2.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case GENTLER:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30094-0.htm";
|
||||
@@ -220,8 +231,9 @@ public class Q032_AnObviousLie extends Quest
|
||||
htmltext = ((st.getQuestItemsCount(THREAD) < 1000) || (st.getQuestItemsCount(SUEDE) < 500)) ? "30094-11.htm" : "30094-12.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MIKI_THE_CAT:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "31706-0.htm";
|
||||
@@ -239,12 +251,15 @@ public class Q032_AnObviousLie extends Quest
|
||||
htmltext = "31706-5.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -253,7 +268,7 @@ public class Q032_AnObviousLie extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "3");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 3);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -261,7 +276,7 @@ public class Q032_AnObviousLie extends Quest
|
||||
|
||||
if (st.dropItemsAlways(MEDICINAL_HERB, 1, 20))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -30,19 +30,16 @@ public class Q033_MakeAPairOfDressShoes extends Quest
|
||||
private static final int WOODLEY = 30838;
|
||||
private static final int IAN = 30164;
|
||||
private static final int LEIKAR = 31520;
|
||||
|
||||
// Items
|
||||
private static final int LEATHER = 1882;
|
||||
private static final int THREAD = 1868;
|
||||
private static final int ADENA = 57;
|
||||
|
||||
// Rewards
|
||||
public static final int DRESS_SHOES_BOX = 7113;
|
||||
|
||||
public Q033_MakeAPairOfDressShoes()
|
||||
{
|
||||
super(33, "Make a Pair of Dress Shoes");
|
||||
|
||||
addStartNpc(WOODLEY);
|
||||
addTalkId(WOODLEY, IAN, LEIKAR);
|
||||
}
|
||||
@@ -57,55 +54,62 @@ public class Q033_MakeAPairOfDressShoes extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30838-1.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("31520-1.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("30838-3.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("30838-5.htm"))
|
||||
{
|
||||
if ((st.getQuestItemsCount(LEATHER) >= 200) && (st.getQuestItemsCount(THREAD) >= 600) && (st.getQuestItemsCount(ADENA) >= 200000))
|
||||
case "30838-1.htm":
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "31520-1.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ADENA, 200000);
|
||||
st.takeItems(LEATHER, 200);
|
||||
st.takeItems(THREAD, 600);
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30838-3.htm":
|
||||
{
|
||||
htmltext = "30838-4a.htm";
|
||||
}
|
||||
}
|
||||
else if (event.equals("30164-1.htm"))
|
||||
{
|
||||
if (st.getQuestItemsCount(ADENA) >= 300000)
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ADENA, 300000);
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30838-5.htm":
|
||||
{
|
||||
htmltext = "30164-1a.htm";
|
||||
if ((st.getQuestItemsCount(LEATHER) >= 200) && (st.getQuestItemsCount(THREAD) >= 600) && (st.getQuestItemsCount(ADENA) >= 200000))
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ADENA, 200000);
|
||||
st.takeItems(LEATHER, 200);
|
||||
st.takeItems(THREAD, 600);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30838-4a.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30164-1.htm":
|
||||
{
|
||||
if (st.getQuestItemsCount(ADENA) >= 300000)
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ADENA, 300000);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30164-1a.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30838-7.htm":
|
||||
{
|
||||
st.giveItems(DRESS_SHOES_BOX, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30838-7.htm"))
|
||||
{
|
||||
st.giveItems(DRESS_SHOES_BOX, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -124,10 +128,11 @@ public class Q033_MakeAPairOfDressShoes extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getLevel() >= 60)
|
||||
{
|
||||
final QuestState fwear = player.getQuestState(Q037_MakeFormalWear.class.getSimpleName());
|
||||
if ((fwear != null) && (fwear.getInt("cond") == 7))
|
||||
if ((fwear != null) && fwear.isCond(7))
|
||||
{
|
||||
htmltext = "30838-0.htm";
|
||||
}
|
||||
@@ -141,12 +146,14 @@ public class Q033_MakeAPairOfDressShoes extends Quest
|
||||
htmltext = "30838-0b.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case WOODLEY:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30838-1.htm";
|
||||
@@ -175,8 +182,9 @@ public class Q033_MakeAPairOfDressShoes extends Quest
|
||||
htmltext = "30838-6.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LEIKAR:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "31520-0.htm";
|
||||
@@ -186,8 +194,9 @@ public class Q033_MakeAPairOfDressShoes extends Quest
|
||||
htmltext = "31520-1a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case IAN:
|
||||
{
|
||||
if (cond == 4)
|
||||
{
|
||||
htmltext = "30164-0.htm";
|
||||
@@ -197,12 +206,15 @@ public class Q033_MakeAPairOfDressShoes extends Quest
|
||||
htmltext = "30164-2.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -30,29 +30,23 @@ public class Q034_InSearchOfCloth extends Quest
|
||||
private static final int RADIA = 30088;
|
||||
private static final int RALFORD = 30165;
|
||||
private static final int VARAN = 30294;
|
||||
|
||||
// Monsters
|
||||
private static final int TRISALIM_SPIDER = 20560;
|
||||
private static final int TRISALIM_TARANTULA = 20561;
|
||||
|
||||
// Items
|
||||
private static final int SPINNERET = 7528;
|
||||
private static final int SUEDE = 1866;
|
||||
private static final int THREAD = 1868;
|
||||
private static final int SPIDERSILK = 7161;
|
||||
|
||||
// Rewards
|
||||
private static final int MYSTERIOUS_CLOTH = 7076;
|
||||
|
||||
public Q034_InSearchOfCloth()
|
||||
{
|
||||
super(34, "In Search of Cloth");
|
||||
|
||||
registerQuestItems(SPINNERET, SPIDERSILK);
|
||||
|
||||
addStartNpc(RADIA);
|
||||
addTalkId(RADIA, RALFORD, VARAN);
|
||||
|
||||
addKillId(TRISALIM_SPIDER, TRISALIM_TARANTULA);
|
||||
}
|
||||
|
||||
@@ -66,48 +60,55 @@ public class Q034_InSearchOfCloth extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30088-1.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("30294-1.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("30088-3.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("30165-1.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("30165-3.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SPINNERET, 10);
|
||||
st.giveItems(SPIDERSILK, 1);
|
||||
}
|
||||
else if (event.equals("30088-5.htm"))
|
||||
{
|
||||
if ((st.getQuestItemsCount(SUEDE) >= 3000) && (st.getQuestItemsCount(THREAD) >= 5000) && st.hasQuestItems(SPIDERSILK))
|
||||
case "30088-1.htm":
|
||||
{
|
||||
st.takeItems(SPIDERSILK, 1);
|
||||
st.takeItems(SUEDE, 3000);
|
||||
st.takeItems(THREAD, 5000);
|
||||
st.giveItems(MYSTERIOUS_CLOTH, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30294-1.htm":
|
||||
{
|
||||
htmltext = "30088-4a.htm";
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "30088-3.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "30165-1.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "30165-3.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SPINNERET, 10);
|
||||
st.giveItems(SPIDERSILK, 1);
|
||||
break;
|
||||
}
|
||||
case "30088-5.htm":
|
||||
{
|
||||
if ((st.getQuestItemsCount(SUEDE) >= 3000) && (st.getQuestItemsCount(THREAD) >= 5000) && st.hasQuestItems(SPIDERSILK))
|
||||
{
|
||||
st.takeItems(SPIDERSILK, 1);
|
||||
st.takeItems(SUEDE, 3000);
|
||||
st.takeItems(THREAD, 5000);
|
||||
st.giveItems(MYSTERIOUS_CLOTH, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30088-4a.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -127,10 +128,11 @@ public class Q034_InSearchOfCloth extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getLevel() >= 60)
|
||||
{
|
||||
final QuestState fwear = player.getQuestState(Q037_MakeFormalWear.class.getSimpleName());
|
||||
if ((fwear != null) && (fwear.getInt("cond") == 6))
|
||||
if ((fwear != null) && fwear.isCond(6))
|
||||
{
|
||||
htmltext = "30088-0.htm";
|
||||
}
|
||||
@@ -144,12 +146,14 @@ public class Q034_InSearchOfCloth extends Quest
|
||||
htmltext = "30088-0b.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case RADIA:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30088-1a.htm";
|
||||
@@ -174,8 +178,9 @@ public class Q034_InSearchOfCloth extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case VARAN:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30294-0.htm";
|
||||
@@ -185,8 +190,9 @@ public class Q034_InSearchOfCloth extends Quest
|
||||
htmltext = "30294-1a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case RALFORD:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "30165-0.htm";
|
||||
@@ -204,12 +210,15 @@ public class Q034_InSearchOfCloth extends Quest
|
||||
htmltext = "30165-3a.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -218,7 +227,7 @@ public class Q034_InSearchOfCloth extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "4");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 4);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -226,7 +235,7 @@ public class Q034_InSearchOfCloth extends Quest
|
||||
|
||||
if (st.dropItems(SPINNERET, 1, 10, 500000))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -29,25 +29,20 @@ public class Q035_FindGlitteringJewelry extends Quest
|
||||
// NPCs
|
||||
private static final int ELLIE = 30091;
|
||||
private static final int FELTON = 30879;
|
||||
|
||||
// Items
|
||||
private static final int ROUGH_JEWEL = 7162;
|
||||
private static final int ORIHARUKON = 1893;
|
||||
private static final int SILVER_NUGGET = 1873;
|
||||
private static final int THONS = 4044;
|
||||
|
||||
// Reward
|
||||
private static final int JEWEL_BOX = 7077;
|
||||
|
||||
public Q035_FindGlitteringJewelry()
|
||||
{
|
||||
super(35, "Find Glittering Jewelry");
|
||||
|
||||
registerQuestItems(ROUGH_JEWEL);
|
||||
|
||||
addStartNpc(ELLIE);
|
||||
addTalkId(ELLIE, FELTON);
|
||||
|
||||
addKillId(20135); // Alligator
|
||||
}
|
||||
|
||||
@@ -61,37 +56,42 @@ public class Q035_FindGlitteringJewelry extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30091-1.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("30879-1.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("30091-3.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ROUGH_JEWEL, 10);
|
||||
}
|
||||
else if (event.equals("30091-5.htm"))
|
||||
{
|
||||
if ((st.getQuestItemsCount(ORIHARUKON) >= 5) && (st.getQuestItemsCount(SILVER_NUGGET) >= 500) && (st.getQuestItemsCount(THONS) >= 150))
|
||||
case "30091-1.htm":
|
||||
{
|
||||
st.takeItems(ORIHARUKON, 5);
|
||||
st.takeItems(SILVER_NUGGET, 500);
|
||||
st.takeItems(THONS, 150);
|
||||
st.giveItems(JEWEL_BOX, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30879-1.htm":
|
||||
{
|
||||
htmltext = "30091-4a.htm";
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "30091-3.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ROUGH_JEWEL, 10);
|
||||
break;
|
||||
}
|
||||
case "30091-5.htm":
|
||||
{
|
||||
if ((st.getQuestItemsCount(ORIHARUKON) >= 5) && (st.getQuestItemsCount(SILVER_NUGGET) >= 500) && (st.getQuestItemsCount(THONS) >= 150))
|
||||
{
|
||||
st.takeItems(ORIHARUKON, 5);
|
||||
st.takeItems(SILVER_NUGGET, 500);
|
||||
st.takeItems(THONS, 150);
|
||||
st.giveItems(JEWEL_BOX, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30091-4a.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -111,10 +111,11 @@ public class Q035_FindGlitteringJewelry extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getLevel() >= 60)
|
||||
{
|
||||
final QuestState fwear = player.getQuestState(Q037_MakeFormalWear.class.getSimpleName());
|
||||
if ((fwear != null) && (fwear.getInt("cond") == 6))
|
||||
if ((fwear != null) && fwear.isCond(6))
|
||||
{
|
||||
htmltext = "30091-0.htm";
|
||||
}
|
||||
@@ -128,12 +129,14 @@ public class Q035_FindGlitteringJewelry extends Quest
|
||||
htmltext = "30091-0b.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ELLIE:
|
||||
{
|
||||
if ((cond == 1) || (cond == 2))
|
||||
{
|
||||
htmltext = "30091-1a.htm";
|
||||
@@ -147,8 +150,9 @@ public class Q035_FindGlitteringJewelry extends Quest
|
||||
htmltext = ((st.getQuestItemsCount(ORIHARUKON) >= 5) && (st.getQuestItemsCount(SILVER_NUGGET) >= 500) && (st.getQuestItemsCount(THONS) >= 150)) ? "30091-4.htm" : "30091-4a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case FELTON:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30879-0.htm";
|
||||
@@ -158,12 +162,15 @@ public class Q035_FindGlitteringJewelry extends Quest
|
||||
htmltext = "30879-1a.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -172,7 +179,7 @@ public class Q035_FindGlitteringJewelry extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "2");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 2);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -180,7 +187,7 @@ public class Q035_FindGlitteringJewelry extends Quest
|
||||
|
||||
if (st.dropItems(ROUGH_JEWEL, 1, 10, 500000))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -30,19 +30,15 @@ public class Q036_MakeASewingKit extends Quest
|
||||
private static final int REINFORCED_STEEL = 7163;
|
||||
private static final int ARTISANS_FRAME = 1891;
|
||||
private static final int ORIHARUKON = 1893;
|
||||
|
||||
// Reward
|
||||
private static final int SEWING_KIT = 7078;
|
||||
|
||||
public Q036_MakeASewingKit()
|
||||
{
|
||||
super(36, "Make a Sewing Kit");
|
||||
|
||||
registerQuestItems(REINFORCED_STEEL);
|
||||
|
||||
addStartNpc(30847); // Ferris
|
||||
addTalkId(30847);
|
||||
|
||||
addKillId(20566); // Iron Golem
|
||||
}
|
||||
|
||||
@@ -56,31 +52,35 @@ public class Q036_MakeASewingKit extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30847-1.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("30847-3.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(REINFORCED_STEEL, 5);
|
||||
}
|
||||
else if (event.equals("30847-5.htm"))
|
||||
{
|
||||
if ((st.getQuestItemsCount(ORIHARUKON) >= 10) && (st.getQuestItemsCount(ARTISANS_FRAME) >= 10))
|
||||
case "30847-1.htm":
|
||||
{
|
||||
st.takeItems(ARTISANS_FRAME, 10);
|
||||
st.takeItems(ORIHARUKON, 10);
|
||||
st.giveItems(SEWING_KIT, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30847-3.htm":
|
||||
{
|
||||
htmltext = "30847-4a.htm";
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(REINFORCED_STEEL, 5);
|
||||
break;
|
||||
}
|
||||
case "30847-5.htm":
|
||||
{
|
||||
if ((st.getQuestItemsCount(ORIHARUKON) >= 10) && (st.getQuestItemsCount(ARTISANS_FRAME) >= 10))
|
||||
{
|
||||
st.takeItems(ARTISANS_FRAME, 10);
|
||||
st.takeItems(ORIHARUKON, 10);
|
||||
st.giveItems(SEWING_KIT, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30847-4a.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,10 +100,11 @@ public class Q036_MakeASewingKit extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getLevel() >= 60)
|
||||
{
|
||||
final QuestState fwear = player.getQuestState(Q037_MakeFormalWear.class.getSimpleName());
|
||||
if ((fwear != null) && (fwear.getInt("cond") == 6))
|
||||
if ((fwear != null) && fwear.isCond(6))
|
||||
{
|
||||
htmltext = "30847-0.htm";
|
||||
}
|
||||
@@ -117,9 +118,10 @@ public class Q036_MakeASewingKit extends Quest
|
||||
htmltext = "30847-0b.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30847-1a.htm";
|
||||
@@ -133,10 +135,12 @@ public class Q036_MakeASewingKit extends Quest
|
||||
htmltext = ((st.getQuestItemsCount(ORIHARUKON) < 10) || (st.getQuestItemsCount(ARTISANS_FRAME) < 10)) ? "30847-4a.htm" : "30847-4.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -145,7 +149,7 @@ public class Q036_MakeASewingKit extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "1");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 1);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -153,7 +157,7 @@ public class Q036_MakeASewingKit extends Quest
|
||||
|
||||
if (st.dropItems(REINFORCED_STEEL, 1, 5, 500000))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -29,7 +29,6 @@ public class Q037_MakeFormalWear extends Quest
|
||||
private static final int LEIKAR = 31520;
|
||||
private static final int JEREMY = 31521;
|
||||
private static final int MIST = 31627;
|
||||
|
||||
// Items
|
||||
private static final int MYSTERIOUS_CLOTH = 7076;
|
||||
private static final int JEWEL_BOX = 7077;
|
||||
@@ -38,16 +37,13 @@ public class Q037_MakeFormalWear extends Quest
|
||||
private static final int SIGNET_RING = 7164;
|
||||
private static final int ICE_WINE = 7160;
|
||||
private static final int BOX_OF_COOKIES = 7159;
|
||||
|
||||
// Reward
|
||||
private static final int FORMAL_WEAR = 6408;
|
||||
|
||||
public Q037_MakeFormalWear()
|
||||
{
|
||||
super(37, "Make Formal Wear");
|
||||
|
||||
registerQuestItems(SIGNET_RING, ICE_WINE, BOX_OF_COOKIES);
|
||||
|
||||
addStartNpc(ALEXIS);
|
||||
addTalkId(ALEXIS, LEIKAR, JEREMY, MIST);
|
||||
}
|
||||
@@ -62,57 +58,66 @@ public class Q037_MakeFormalWear extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30842-1.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("31520-1.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(SIGNET_RING, 1);
|
||||
}
|
||||
else if (event.equals("31521-1.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SIGNET_RING, 1);
|
||||
st.giveItems(ICE_WINE, 1);
|
||||
}
|
||||
else if (event.equals("31627-1.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ICE_WINE, 1);
|
||||
}
|
||||
else if (event.equals("31521-3.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(BOX_OF_COOKIES, 1);
|
||||
}
|
||||
else if (event.equals("31520-3.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BOX_OF_COOKIES, 1);
|
||||
}
|
||||
else if (event.equals("31520-5.htm"))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(JEWEL_BOX, 1);
|
||||
st.takeItems(MYSTERIOUS_CLOTH, 1);
|
||||
st.takeItems(SEWING_KIT, 1);
|
||||
}
|
||||
else if (event.equals("31520-7.htm"))
|
||||
{
|
||||
st.takeItems(DRESS_SHOES_BOX, 1);
|
||||
st.giveItems(FORMAL_WEAR, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30842-1.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "31520-1.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(SIGNET_RING, 1);
|
||||
break;
|
||||
}
|
||||
case "31521-1.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SIGNET_RING, 1);
|
||||
st.giveItems(ICE_WINE, 1);
|
||||
break;
|
||||
}
|
||||
case "31627-1.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ICE_WINE, 1);
|
||||
break;
|
||||
}
|
||||
case "31521-3.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(BOX_OF_COOKIES, 1);
|
||||
break;
|
||||
}
|
||||
case "31520-3.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BOX_OF_COOKIES, 1);
|
||||
break;
|
||||
}
|
||||
case "31520-5.htm":
|
||||
{
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(JEWEL_BOX, 1);
|
||||
st.takeItems(MYSTERIOUS_CLOTH, 1);
|
||||
st.takeItems(SEWING_KIT, 1);
|
||||
break;
|
||||
}
|
||||
case "31520-7.htm":
|
||||
{
|
||||
st.takeItems(DRESS_SHOES_BOX, 1);
|
||||
st.giveItems(FORMAL_WEAR, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -131,21 +136,25 @@ public class Q037_MakeFormalWear extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 60) ? "30842-0a.htm" : "30842-0.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ALEXIS:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30842-2.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LEIKAR:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "31520-0.htm";
|
||||
@@ -174,8 +183,9 @@ public class Q037_MakeFormalWear extends Quest
|
||||
htmltext = (st.hasQuestItems(DRESS_SHOES_BOX)) ? "31520-6.htm" : "31520-5a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case JEREMY:
|
||||
{
|
||||
if (st.hasQuestItems(SIGNET_RING))
|
||||
{
|
||||
htmltext = "31521-0.htm";
|
||||
@@ -193,8 +203,9 @@ public class Q037_MakeFormalWear extends Quest
|
||||
htmltext = "31521-3a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MIST:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "31627-0.htm";
|
||||
@@ -204,12 +215,15 @@ public class Q037_MakeFormalWear extends Quest
|
||||
htmltext = "31627-2.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -28,86 +28,45 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q038_DragonFangs extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int LUIS = 30386;
|
||||
private static final int IRIS = 30034;
|
||||
private static final int ROHMER = 30344;
|
||||
// Items
|
||||
private static final int FEATHER_ORNAMENT = 7173;
|
||||
private static final int TOOTH_OF_TOTEM = 7174;
|
||||
private static final int TOOTH_OF_DRAGON = 7175;
|
||||
private static final int LETTER_OF_IRIS = 7176;
|
||||
private static final int LETTER_OF_ROHMER = 7177;
|
||||
|
||||
// NPCs
|
||||
private static final int LUIS = 30386;
|
||||
private static final int IRIS = 30034;
|
||||
private static final int ROHMER = 30344;
|
||||
|
||||
// Reward { item, adena }
|
||||
private static final int[][] REWARD =
|
||||
{
|
||||
{
|
||||
45,
|
||||
5200
|
||||
},
|
||||
{
|
||||
627,
|
||||
1500
|
||||
},
|
||||
{
|
||||
1123,
|
||||
3200
|
||||
},
|
||||
{
|
||||
605,
|
||||
3200
|
||||
}
|
||||
// @formatter:off
|
||||
{45, 5200},
|
||||
{627, 1500},
|
||||
{1123, 3200},
|
||||
{605, 3200}
|
||||
// @formatter:on
|
||||
};
|
||||
|
||||
// Droplist
|
||||
private static final Map<Integer, int[]> DROPLIST = new HashMap<>();
|
||||
static
|
||||
{
|
||||
DROPLIST.put(21100, new int[]
|
||||
{
|
||||
1,
|
||||
FEATHER_ORNAMENT,
|
||||
100,
|
||||
1000000
|
||||
});
|
||||
DROPLIST.put(20357, new int[]
|
||||
{
|
||||
1,
|
||||
FEATHER_ORNAMENT,
|
||||
100,
|
||||
1000000
|
||||
});
|
||||
DROPLIST.put(21101, new int[]
|
||||
{
|
||||
6,
|
||||
TOOTH_OF_DRAGON,
|
||||
50,
|
||||
500000
|
||||
});
|
||||
DROPLIST.put(20356, new int[]
|
||||
{
|
||||
6,
|
||||
TOOTH_OF_DRAGON,
|
||||
50,
|
||||
500000
|
||||
});
|
||||
// @formatter:off
|
||||
DROPLIST.put(21100, new int[]{1, FEATHER_ORNAMENT, 100, 1000000});
|
||||
DROPLIST.put(20357, new int[]{1, FEATHER_ORNAMENT, 100, 1000000});
|
||||
DROPLIST.put(21101, new int[]{6, TOOTH_OF_DRAGON, 50, 500000});
|
||||
DROPLIST.put(20356, new int[]{6, TOOTH_OF_DRAGON, 50, 500000});
|
||||
// @formatter:on
|
||||
}
|
||||
|
||||
public Q038_DragonFangs()
|
||||
{
|
||||
super(38, "Dragon Fangs");
|
||||
|
||||
registerQuestItems(FEATHER_ORNAMENT, TOOTH_OF_TOTEM, TOOTH_OF_DRAGON, LETTER_OF_IRIS, LETTER_OF_ROHMER);
|
||||
|
||||
addStartNpc(LUIS);
|
||||
addTalkId(LUIS, IRIS, ROHMER);
|
||||
|
||||
for (int mob : DROPLIST.keySet())
|
||||
{
|
||||
addKillId(mob);
|
||||
}
|
||||
addKillId(DROPLIST.keySet());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -120,62 +79,69 @@ public class Q038_DragonFangs extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30386-02.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("30386-04.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(FEATHER_ORNAMENT, 100);
|
||||
st.giveItems(TOOTH_OF_TOTEM, 1);
|
||||
}
|
||||
else if (event.equals("30034-02a.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(TOOTH_OF_TOTEM))
|
||||
case "30386-02.htm":
|
||||
{
|
||||
htmltext = "30034-02.htm";
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(TOOTH_OF_TOTEM, 1);
|
||||
st.giveItems(LETTER_OF_IRIS, 1);
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30344-02a.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(LETTER_OF_IRIS))
|
||||
case "30386-04.htm":
|
||||
{
|
||||
htmltext = "30344-02.htm";
|
||||
st.set("cond", "5");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_OF_IRIS, 1);
|
||||
st.giveItems(LETTER_OF_ROHMER, 1);
|
||||
st.takeItems(FEATHER_ORNAMENT, 100);
|
||||
st.giveItems(TOOTH_OF_TOTEM, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30034-04a.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(LETTER_OF_ROHMER))
|
||||
case "30034-02a.htm":
|
||||
{
|
||||
htmltext = "30034-04.htm";
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_OF_ROHMER, 1);
|
||||
if (st.hasQuestItems(TOOTH_OF_TOTEM))
|
||||
{
|
||||
htmltext = "30034-02.htm";
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(TOOTH_OF_TOTEM, 1);
|
||||
st.giveItems(LETTER_OF_IRIS, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30034-06a.htm"))
|
||||
{
|
||||
if (st.getQuestItemsCount(TOOTH_OF_DRAGON) >= 50)
|
||||
case "30344-02a.htm":
|
||||
{
|
||||
final int position = Rnd.get(REWARD.length);
|
||||
htmltext = "30034-06.htm";
|
||||
st.takeItems(TOOTH_OF_DRAGON, 50);
|
||||
st.giveItems(REWARD[position][0], 1);
|
||||
st.rewardItems(57, REWARD[position][1]);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
if (st.hasQuestItems(LETTER_OF_IRIS))
|
||||
{
|
||||
htmltext = "30344-02.htm";
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_OF_IRIS, 1);
|
||||
st.giveItems(LETTER_OF_ROHMER, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30034-04a.htm":
|
||||
{
|
||||
if (st.hasQuestItems(LETTER_OF_ROHMER))
|
||||
{
|
||||
htmltext = "30034-04.htm";
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_OF_ROHMER, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30034-06a.htm":
|
||||
{
|
||||
if (st.getQuestItemsCount(TOOTH_OF_DRAGON) >= 50)
|
||||
{
|
||||
final int position = Rnd.get(REWARD.length);
|
||||
htmltext = "30034-06.htm";
|
||||
st.takeItems(TOOTH_OF_DRAGON, 50);
|
||||
st.giveItems(REWARD[position][0], 1);
|
||||
st.rewardItems(57, REWARD[position][1]);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -199,7 +165,7 @@ public class Q038_DragonFangs extends Quest
|
||||
break;
|
||||
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case LUIS:
|
||||
@@ -271,9 +237,9 @@ public class Q038_DragonFangs extends Quest
|
||||
}
|
||||
|
||||
final int[] droplist = DROPLIST.get(npc.getNpcId());
|
||||
if ((st.getInt("cond") == droplist[0]) && st.dropItems(droplist[1], 1, droplist[2], droplist[3]))
|
||||
if (st.isCond(droplist[0]) && st.dropItems(droplist[1], 1, droplist[2], droplist[3]))
|
||||
{
|
||||
st.set("cond", String.valueOf(droplist[0] + 1));
|
||||
st.setCond(droplist[0] + 1);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -30,64 +30,34 @@ public class Q039_RedEyedInvaders extends Quest
|
||||
// NPCs
|
||||
private static final int BABENCO = 30334;
|
||||
private static final int BATHIS = 30332;
|
||||
|
||||
// Mobs
|
||||
// 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
|
||||
});
|
||||
FIRST_DP.put(MAILLE_LIZARDMAN, new int[]
|
||||
{
|
||||
BLACK_BONE_NECKLACE,
|
||||
RED_BONE_NECKLACE
|
||||
});
|
||||
FIRST_DP.put(MAILLE_LIZARDMAN_SCOUT, new int[]
|
||||
{
|
||||
BLACK_BONE_NECKLACE,
|
||||
RED_BONE_NECKLACE
|
||||
});
|
||||
FIRST_DP.put(MAILLE_LIZARDMAN_GUARD, new int[]{RED_BONE_NECKLACE, BLACK_BONE_NECKLACE});
|
||||
FIRST_DP.put(MAILLE_LIZARDMAN, new int[]{BLACK_BONE_NECKLACE, RED_BONE_NECKLACE});
|
||||
FIRST_DP.put(MAILLE_LIZARDMAN_SCOUT, new int[]{BLACK_BONE_NECKLACE, RED_BONE_NECKLACE});
|
||||
}
|
||||
|
||||
// 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
|
||||
});
|
||||
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;
|
||||
@@ -96,12 +66,9 @@ public class Q039_RedEyedInvaders extends Quest
|
||||
public Q039_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);
|
||||
}
|
||||
|
||||
@@ -115,33 +82,38 @@ public class Q039_RedEyedInvaders extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30334-1.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("30332-1.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("30332-3.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.takeItems(BLACK_BONE_NECKLACE, -1);
|
||||
st.takeItems(RED_BONE_NECKLACE, -1);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("30332-5.htm"))
|
||||
{
|
||||
st.takeItems(INCENSE_POUCH, -1);
|
||||
st.takeItems(GEM_OF_MAILLE, -1);
|
||||
st.giveItems(GREEN_COLORED_LURE_HG, 60);
|
||||
st.giveItems(BABY_DUCK_RODE, 1);
|
||||
st.giveItems(FISHING_SHOT_NG, 500);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30334-1.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "30332-1.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "30332-3.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.takeItems(BLACK_BONE_NECKLACE, -1);
|
||||
st.takeItems(RED_BONE_NECKLACE, -1);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "30332-5.htm":
|
||||
{
|
||||
st.takeItems(INCENSE_POUCH, -1);
|
||||
st.takeItems(GEM_OF_MAILLE, -1);
|
||||
st.giveItems(GREEN_COLORED_LURE_HG, 60);
|
||||
st.giveItems(BABY_DUCK_RODE, 1);
|
||||
st.giveItems(FISHING_SHOT_NG, 500);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -160,18 +132,22 @@ public class Q039_RedEyedInvaders extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 20) ? "30334-2.htm" : "30334-0.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case BABENCO:
|
||||
{
|
||||
htmltext = "30334-3.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case BATHIS:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30332-0.htm";
|
||||
@@ -193,12 +169,15 @@ public class Q039_RedEyedInvaders extends Quest
|
||||
htmltext = "30332-4.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -208,7 +187,7 @@ public class Q039_RedEyedInvaders extends Quest
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final int npcId = npc.getNpcId();
|
||||
PlayerInstance partyMember = getRandomPartyMember(player, npc, "2");
|
||||
PlayerInstance partyMember = getRandomPartyMember(player, npc, 2);
|
||||
if ((partyMember != null) && (npcId != ARANEID))
|
||||
{
|
||||
final QuestState st = partyMember.getQuestState(getName());
|
||||
@@ -220,12 +199,12 @@ public class Q039_RedEyedInvaders extends Quest
|
||||
final int[] list = FIRST_DP.get(npcId);
|
||||
if (st.dropItems(list[0], 1, 100, 500000) && (st.getQuestItemsCount(list[1]) == 100))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
partyMember = getRandomPartyMember(player, npc, "4");
|
||||
partyMember = getRandomPartyMember(player, npc, 4);
|
||||
if ((partyMember != null) && (npcId != MAILLE_LIZARDMAN))
|
||||
{
|
||||
final QuestState st = partyMember.getQuestState(getName());
|
||||
@@ -237,7 +216,7 @@ public class Q039_RedEyedInvaders extends Quest
|
||||
final int[] list = SECOND_DP.get(npcId);
|
||||
if (st.dropItems(list[0], 1, 30, list[2]) && (st.getQuestItemsCount(list[1]) == 30))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -27,26 +27,21 @@ public class Q042_HelpTheUncle extends Quest
|
||||
// NPCs
|
||||
private static final int WATERS = 30828;
|
||||
private static final int SOPHYA = 30735;
|
||||
|
||||
// Monsters
|
||||
private static final int MONSTER_EYE_DESTROYER = 20068;
|
||||
private static final int MONSTER_EYE_GAZER = 20266;
|
||||
// Items
|
||||
private static final int TRIDENT = 291;
|
||||
private static final int MAP_PIECE = 7548;
|
||||
private static final int MAP = 7549;
|
||||
private static final int PET_TICKET = 7583;
|
||||
|
||||
// Monsters
|
||||
private static final int MONSTER_EYE_DESTROYER = 20068;
|
||||
private static final int MONSTER_EYE_GAZER = 20266;
|
||||
|
||||
public Q042_HelpTheUncle()
|
||||
{
|
||||
super(42, "Help the Uncle!");
|
||||
|
||||
registerQuestItems(MAP_PIECE, MAP);
|
||||
|
||||
addStartNpc(WATERS);
|
||||
addTalkId(WATERS, SOPHYA);
|
||||
|
||||
addKillId(MONSTER_EYE_DESTROYER, MONSTER_EYE_GAZER);
|
||||
}
|
||||
|
||||
@@ -60,36 +55,45 @@ public class Q042_HelpTheUncle extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30828-01.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("30828-03.htm") && st.hasQuestItems(TRIDENT))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(TRIDENT, 1);
|
||||
}
|
||||
else if (event.equals("30828-05.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAP_PIECE, 30);
|
||||
st.giveItems(MAP, 1);
|
||||
}
|
||||
else if (event.equals("30735-06.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAP, 1);
|
||||
}
|
||||
else if (event.equals("30828-07.htm"))
|
||||
{
|
||||
st.giveItems(PET_TICKET, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30828-01.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "30828-03.htm":
|
||||
{
|
||||
if (st.hasQuestItems(TRIDENT))
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(TRIDENT, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30828-05.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAP_PIECE, 30);
|
||||
st.giveItems(MAP, 1);
|
||||
break;
|
||||
}
|
||||
case "30735-06.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAP, 1);
|
||||
break;
|
||||
}
|
||||
case "30828-07.htm":
|
||||
{
|
||||
st.giveItems(PET_TICKET, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -108,14 +112,17 @@ public class Q042_HelpTheUncle extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 25) ? "30828-00a.htm" : "30828-00.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case WATERS:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = (!st.hasQuestItems(TRIDENT)) ? "30828-01a.htm" : "30828-02.htm";
|
||||
@@ -137,8 +144,9 @@ public class Q042_HelpTheUncle extends Quest
|
||||
htmltext = "30828-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SOPHYA:
|
||||
{
|
||||
if (cond == 4)
|
||||
{
|
||||
htmltext = "30735-05.htm";
|
||||
@@ -148,12 +156,15 @@ public class Q042_HelpTheUncle extends Quest
|
||||
htmltext = "30735-06a.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -162,7 +173,7 @@ public class Q042_HelpTheUncle extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "2");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 2);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -170,7 +181,7 @@ public class Q042_HelpTheUncle extends Quest
|
||||
|
||||
if (st.dropItemsAlways(MAP_PIECE, 1, 30))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -27,26 +27,21 @@ public class Q043_HelpTheSister extends Quest
|
||||
// NPCs
|
||||
private static final int COOPER = 30829;
|
||||
private static final int GALLADUCCI = 30097;
|
||||
|
||||
// Monsters
|
||||
private static final int SPECTER = 20171;
|
||||
private static final int SORROW_MAIDEN = 20197;
|
||||
// Items
|
||||
private static final int CRAFTED_DAGGER = 220;
|
||||
private static final int MAP_PIECE = 7550;
|
||||
private static final int MAP = 7551;
|
||||
private static final int PET_TICKET = 7584;
|
||||
|
||||
// Monsters
|
||||
private static final int SPECTER = 20171;
|
||||
private static final int SORROW_MAIDEN = 20197;
|
||||
|
||||
public Q043_HelpTheSister()
|
||||
{
|
||||
super(43, "Help the Sister!");
|
||||
|
||||
registerQuestItems(MAP_PIECE, MAP);
|
||||
|
||||
addStartNpc(COOPER);
|
||||
addTalkId(COOPER, GALLADUCCI);
|
||||
|
||||
addKillId(SPECTER, SORROW_MAIDEN);
|
||||
}
|
||||
|
||||
@@ -60,36 +55,45 @@ public class Q043_HelpTheSister extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30829-01.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("30829-03.htm") && st.hasQuestItems(CRAFTED_DAGGER))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRAFTED_DAGGER, 1);
|
||||
}
|
||||
else if (event.equals("30829-05.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAP_PIECE, 30);
|
||||
st.giveItems(MAP, 1);
|
||||
}
|
||||
else if (event.equals("30097-06.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAP, 1);
|
||||
}
|
||||
else if (event.equals("30829-07.htm"))
|
||||
{
|
||||
st.giveItems(PET_TICKET, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30829-01.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "30829-03.htm":
|
||||
{
|
||||
if (st.hasQuestItems(CRAFTED_DAGGER))
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRAFTED_DAGGER, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30829-05.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAP_PIECE, 30);
|
||||
st.giveItems(MAP, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-06.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAP, 1);
|
||||
break;
|
||||
}
|
||||
case "30829-07.htm":
|
||||
{
|
||||
st.giveItems(PET_TICKET, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -108,14 +112,17 @@ public class Q043_HelpTheSister extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 26) ? "30829-00a.htm" : "30829-00.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case COOPER:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = (!st.hasQuestItems(CRAFTED_DAGGER)) ? "30829-01a.htm" : "30829-02.htm";
|
||||
@@ -137,8 +144,9 @@ public class Q043_HelpTheSister extends Quest
|
||||
htmltext = "30829-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GALLADUCCI:
|
||||
{
|
||||
if (cond == 4)
|
||||
{
|
||||
htmltext = "30097-05.htm";
|
||||
@@ -148,12 +156,15 @@ public class Q043_HelpTheSister extends Quest
|
||||
htmltext = "30097-06a.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -162,7 +173,7 @@ public class Q043_HelpTheSister extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "2");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 2);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -170,7 +181,7 @@ public class Q043_HelpTheSister extends Quest
|
||||
|
||||
if (st.dropItemsAlways(MAP_PIECE, 1, 30))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -24,30 +24,25 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q044_HelpTheSon extends Quest
|
||||
{
|
||||
// Npcs
|
||||
// NPCs
|
||||
private static final int LUNDY = 30827;
|
||||
private static final int DRIKUS = 30505;
|
||||
|
||||
// Monsters
|
||||
private static final int MAILLE = 20919;
|
||||
private static final int MAILLE_SCOUT = 20920;
|
||||
private static final int MAILLE_GUARD = 20921;
|
||||
// Items
|
||||
private static final int WORK_HAMMER = 168;
|
||||
private static final int GEMSTONE_FRAGMENT = 7552;
|
||||
private static final int GEMSTONE = 7553;
|
||||
private static final int PET_TICKET = 7585;
|
||||
|
||||
// Monsters
|
||||
private static final int MAILLE = 20919;
|
||||
private static final int MAILLE_SCOUT = 20920;
|
||||
private static final int MAILLE_GUARD = 20921;
|
||||
|
||||
public Q044_HelpTheSon()
|
||||
{
|
||||
super(44, "Help the Son!");
|
||||
|
||||
registerQuestItems(GEMSTONE_FRAGMENT, GEMSTONE);
|
||||
|
||||
addStartNpc(LUNDY);
|
||||
addTalkId(LUNDY, DRIKUS);
|
||||
|
||||
addKillId(MAILLE, MAILLE_SCOUT, MAILLE_GUARD);
|
||||
}
|
||||
|
||||
@@ -61,36 +56,45 @@ public class Q044_HelpTheSon extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30827-01.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("30827-03.htm") && st.hasQuestItems(WORK_HAMMER))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(WORK_HAMMER, 1);
|
||||
}
|
||||
else if (event.equals("30827-05.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GEMSTONE_FRAGMENT, 30);
|
||||
st.giveItems(GEMSTONE, 1);
|
||||
}
|
||||
else if (event.equals("30505-06.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GEMSTONE, 1);
|
||||
}
|
||||
else if (event.equals("30827-07.htm"))
|
||||
{
|
||||
st.giveItems(PET_TICKET, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30827-01.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "30827-03.htm":
|
||||
{
|
||||
if (st.hasQuestItems(WORK_HAMMER))
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(WORK_HAMMER, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30827-05.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GEMSTONE_FRAGMENT, 30);
|
||||
st.giveItems(GEMSTONE, 1);
|
||||
break;
|
||||
}
|
||||
case "30505-06.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GEMSTONE, 1);
|
||||
break;
|
||||
}
|
||||
case "30827-07.htm":
|
||||
{
|
||||
st.giveItems(PET_TICKET, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -109,14 +113,17 @@ public class Q044_HelpTheSon extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 24) ? "30827-00a.htm" : "30827-00.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case LUNDY:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = (!st.hasQuestItems(WORK_HAMMER)) ? "30827-01a.htm" : "30827-02.htm";
|
||||
@@ -138,8 +145,9 @@ public class Q044_HelpTheSon extends Quest
|
||||
htmltext = "30827-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DRIKUS:
|
||||
{
|
||||
if (cond == 4)
|
||||
{
|
||||
htmltext = "30505-05.htm";
|
||||
@@ -149,12 +157,15 @@ public class Q044_HelpTheSon extends Quest
|
||||
htmltext = "30505-06a.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -163,7 +174,7 @@ public class Q044_HelpTheSon extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "2");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 2);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -171,7 +182,7 @@ public class Q044_HelpTheSon extends Quest
|
||||
|
||||
if (st.dropItemsAlways(GEMSTONE_FRAGMENT, 1, 30))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -21,12 +21,11 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q045_ToTalkingIsland extends Quest
|
||||
{
|
||||
// Npcs
|
||||
// NPCs
|
||||
private static final int GALLADUCCI = 30097;
|
||||
private static final int GENTLER = 30094;
|
||||
private static final int SANDRA = 30090;
|
||||
private static final int DUSTIN = 30116;
|
||||
|
||||
// Items
|
||||
private static final int ORDER_DOCUMENT_1 = 7563;
|
||||
private static final int ORDER_DOCUMENT_2 = 7564;
|
||||
@@ -40,9 +39,7 @@ public class Q045_ToTalkingIsland extends Quest
|
||||
public Q045_ToTalkingIsland()
|
||||
{
|
||||
super(45, "To Talking Island");
|
||||
|
||||
registerQuestItems(ORDER_DOCUMENT_1, ORDER_DOCUMENT_2, ORDER_DOCUMENT_3, MAGIC_SWORD_HILT, GEMSTONE_POWDER, PURIFIED_MAGIC_NECKLACE);
|
||||
|
||||
addStartNpc(GALLADUCCI);
|
||||
addTalkId(GALLADUCCI, GENTLER, SANDRA, DUSTIN);
|
||||
}
|
||||
@@ -57,55 +54,63 @@ public class Q045_ToTalkingIsland extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30097-03.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(ORDER_DOCUMENT_1, 1);
|
||||
}
|
||||
else if (event.equals("30094-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_1, 1);
|
||||
st.giveItems(MAGIC_SWORD_HILT, 1);
|
||||
}
|
||||
else if (event.equals("30097-06.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAGIC_SWORD_HILT, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_2, 1);
|
||||
}
|
||||
else if (event.equals("30090-02.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_2, 1);
|
||||
st.giveItems(GEMSTONE_POWDER, 1);
|
||||
}
|
||||
else if (event.equals("30097-09.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GEMSTONE_POWDER, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_3, 1);
|
||||
}
|
||||
else if (event.equals("30116-02.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_3, 1);
|
||||
st.giveItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
}
|
||||
else if (event.equals("30097-12.htm"))
|
||||
{
|
||||
st.takeItems(MARK_OF_TRAVELER, -1);
|
||||
st.takeItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
st.rewardItems(SCROLL_OF_ESCAPE_SPECIAL, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30097-03.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
st.giveItems(ORDER_DOCUMENT_1, 1);
|
||||
break;
|
||||
}
|
||||
case "30094-02.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_1, 1);
|
||||
st.giveItems(MAGIC_SWORD_HILT, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-06.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAGIC_SWORD_HILT, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_2, 1);
|
||||
break;
|
||||
}
|
||||
case "30090-02.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_2, 1);
|
||||
st.giveItems(GEMSTONE_POWDER, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-09.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GEMSTONE_POWDER, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_3, 1);
|
||||
break;
|
||||
}
|
||||
case "30116-02.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_3, 1);
|
||||
st.giveItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-12.htm":
|
||||
{
|
||||
st.takeItems(MARK_OF_TRAVELER, -1);
|
||||
st.takeItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
st.rewardItems(SCROLL_OF_ESCAPE_SPECIAL, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -124,6 +129,7 @@ public class Q045_ToTalkingIsland extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getRace() == Race.HUMAN) && (player.getLevel() >= 3))
|
||||
{
|
||||
if (st.hasQuestItems(MARK_OF_TRAVELER))
|
||||
@@ -140,12 +146,14 @@ public class Q045_ToTalkingIsland extends Quest
|
||||
htmltext = "30097-01a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case GALLADUCCI:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30097-04.htm";
|
||||
@@ -171,8 +179,9 @@ public class Q045_ToTalkingIsland extends Quest
|
||||
htmltext = "30097-11.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GENTLER:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30094-01.htm";
|
||||
@@ -182,8 +191,9 @@ public class Q045_ToTalkingIsland extends Quest
|
||||
htmltext = "30094-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SANDRA:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "30090-01.htm";
|
||||
@@ -193,8 +203,9 @@ public class Q045_ToTalkingIsland extends Quest
|
||||
htmltext = "30090-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DUSTIN:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "30116-01.htm";
|
||||
@@ -204,12 +215,15 @@ public class Q045_ToTalkingIsland extends Quest
|
||||
htmltext = "30116-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -30,7 +30,6 @@ public class Q046_OnceMoreInTheArmsOfTheMotherTree extends Quest
|
||||
private static final int GENTLER = 30094;
|
||||
private static final int SANDRA = 30090;
|
||||
private static final int DUSTIN = 30116;
|
||||
|
||||
// Items
|
||||
private static final int ORDER_DOCUMENT_1 = 7563;
|
||||
private static final int ORDER_DOCUMENT_2 = 7564;
|
||||
@@ -44,9 +43,7 @@ public class Q046_OnceMoreInTheArmsOfTheMotherTree extends Quest
|
||||
public Q046_OnceMoreInTheArmsOfTheMotherTree()
|
||||
{
|
||||
super(46, "Once More In the Arms of the Mother Tree");
|
||||
|
||||
registerQuestItems(ORDER_DOCUMENT_1, ORDER_DOCUMENT_2, ORDER_DOCUMENT_3, MAGIC_SWORD_HILT, GEMSTONE_POWDER, PURIFIED_MAGIC_NECKLACE);
|
||||
|
||||
addStartNpc(GALLADUCCI);
|
||||
addTalkId(GALLADUCCI, GENTLER, SANDRA, DUSTIN);
|
||||
}
|
||||
@@ -61,55 +58,63 @@ public class Q046_OnceMoreInTheArmsOfTheMotherTree extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30097-03.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(ORDER_DOCUMENT_1, 1);
|
||||
}
|
||||
else if (event.equals("30094-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_1, 1);
|
||||
st.giveItems(MAGIC_SWORD_HILT, 1);
|
||||
}
|
||||
else if (event.equals("30097-06.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAGIC_SWORD_HILT, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_2, 1);
|
||||
}
|
||||
else if (event.equals("30090-02.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_2, 1);
|
||||
st.giveItems(GEMSTONE_POWDER, 1);
|
||||
}
|
||||
else if (event.equals("30097-09.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GEMSTONE_POWDER, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_3, 1);
|
||||
}
|
||||
else if (event.equals("30116-02.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_3, 1);
|
||||
st.giveItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
}
|
||||
else if (event.equals("30097-12.htm"))
|
||||
{
|
||||
st.takeItems(MARK_OF_TRAVELER, -1);
|
||||
st.takeItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
st.rewardItems(SCROLL_OF_ESCAPE_SPECIAL, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30097-03.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
st.giveItems(ORDER_DOCUMENT_1, 1);
|
||||
break;
|
||||
}
|
||||
case "30094-02.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_1, 1);
|
||||
st.giveItems(MAGIC_SWORD_HILT, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-06.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAGIC_SWORD_HILT, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_2, 1);
|
||||
break;
|
||||
}
|
||||
case "30090-02.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_2, 1);
|
||||
st.giveItems(GEMSTONE_POWDER, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-09.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GEMSTONE_POWDER, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_3, 1);
|
||||
break;
|
||||
}
|
||||
case "30116-02.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_3, 1);
|
||||
st.giveItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-12.htm":
|
||||
{
|
||||
st.takeItems(MARK_OF_TRAVELER, -1);
|
||||
st.takeItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
st.rewardItems(SCROLL_OF_ESCAPE_SPECIAL, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -128,6 +133,7 @@ public class Q046_OnceMoreInTheArmsOfTheMotherTree extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getRace() == Race.ELF) && (player.getLevel() >= 3))
|
||||
{
|
||||
if (st.hasQuestItems(MARK_OF_TRAVELER))
|
||||
@@ -144,12 +150,14 @@ public class Q046_OnceMoreInTheArmsOfTheMotherTree extends Quest
|
||||
htmltext = "30097-01a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case GALLADUCCI:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30097-04.htm";
|
||||
@@ -175,8 +183,9 @@ public class Q046_OnceMoreInTheArmsOfTheMotherTree extends Quest
|
||||
htmltext = "30097-11.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GENTLER:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30094-01.htm";
|
||||
@@ -186,8 +195,9 @@ public class Q046_OnceMoreInTheArmsOfTheMotherTree extends Quest
|
||||
htmltext = "30094-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SANDRA:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "30090-01.htm";
|
||||
@@ -197,8 +207,9 @@ public class Q046_OnceMoreInTheArmsOfTheMotherTree extends Quest
|
||||
htmltext = "30090-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DUSTIN:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "30116-01.htm";
|
||||
@@ -208,12 +219,15 @@ public class Q046_OnceMoreInTheArmsOfTheMotherTree extends Quest
|
||||
htmltext = "30116-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -30,7 +30,6 @@ public class Q047_IntoTheDarkForest extends Quest
|
||||
private static final int GENTLER = 30094;
|
||||
private static final int SANDRA = 30090;
|
||||
private static final int DUSTIN = 30116;
|
||||
|
||||
// Items
|
||||
private static final int ORDER_DOCUMENT_1 = 7563;
|
||||
private static final int ORDER_DOCUMENT_2 = 7564;
|
||||
@@ -44,9 +43,7 @@ public class Q047_IntoTheDarkForest extends Quest
|
||||
public Q047_IntoTheDarkForest()
|
||||
{
|
||||
super(47, "Into the Dark Forest");
|
||||
|
||||
registerQuestItems(ORDER_DOCUMENT_1, ORDER_DOCUMENT_2, ORDER_DOCUMENT_3, MAGIC_SWORD_HILT, GEMSTONE_POWDER, PURIFIED_MAGIC_NECKLACE);
|
||||
|
||||
addStartNpc(GALLADUCCI);
|
||||
addTalkId(GALLADUCCI, SANDRA, DUSTIN, GENTLER);
|
||||
}
|
||||
@@ -61,55 +58,63 @@ public class Q047_IntoTheDarkForest extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30097-03.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(ORDER_DOCUMENT_1, 1);
|
||||
}
|
||||
else if (event.equals("30094-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_1, 1);
|
||||
st.giveItems(MAGIC_SWORD_HILT, 1);
|
||||
}
|
||||
else if (event.equals("30097-06.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAGIC_SWORD_HILT, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_2, 1);
|
||||
}
|
||||
else if (event.equals("30090-02.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_2, 1);
|
||||
st.giveItems(GEMSTONE_POWDER, 1);
|
||||
}
|
||||
else if (event.equals("30097-09.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GEMSTONE_POWDER, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_3, 1);
|
||||
}
|
||||
else if (event.equals("30116-02.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_3, 1);
|
||||
st.giveItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
}
|
||||
else if (event.equals("30097-12.htm"))
|
||||
{
|
||||
st.takeItems(MARK_OF_TRAVELER, -1);
|
||||
st.takeItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
st.rewardItems(SCROLL_OF_ESCAPE_SPECIAL, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30097-03.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
st.giveItems(ORDER_DOCUMENT_1, 1);
|
||||
break;
|
||||
}
|
||||
case "30094-02.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_1, 1);
|
||||
st.giveItems(MAGIC_SWORD_HILT, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-06.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAGIC_SWORD_HILT, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_2, 1);
|
||||
break;
|
||||
}
|
||||
case "30090-02.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_2, 1);
|
||||
st.giveItems(GEMSTONE_POWDER, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-09.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GEMSTONE_POWDER, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_3, 1);
|
||||
break;
|
||||
}
|
||||
case "30116-02.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_3, 1);
|
||||
st.giveItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-12.htm":
|
||||
{
|
||||
st.takeItems(MARK_OF_TRAVELER, -1);
|
||||
st.takeItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
st.rewardItems(SCROLL_OF_ESCAPE_SPECIAL, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -128,6 +133,7 @@ public class Q047_IntoTheDarkForest extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getRace() == Race.DARK_ELF) && (player.getLevel() >= 3))
|
||||
{
|
||||
if (st.hasQuestItems(MARK_OF_TRAVELER))
|
||||
@@ -144,12 +150,14 @@ public class Q047_IntoTheDarkForest extends Quest
|
||||
htmltext = "30097-01a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case GALLADUCCI:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30097-04.htm";
|
||||
@@ -175,8 +183,9 @@ public class Q047_IntoTheDarkForest extends Quest
|
||||
htmltext = "30097-11.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GENTLER:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30094-01.htm";
|
||||
@@ -186,8 +195,9 @@ public class Q047_IntoTheDarkForest extends Quest
|
||||
htmltext = "30094-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SANDRA:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "30090-01.htm";
|
||||
@@ -197,8 +207,9 @@ public class Q047_IntoTheDarkForest extends Quest
|
||||
htmltext = "30090-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DUSTIN:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "30116-01.htm";
|
||||
@@ -208,12 +219,15 @@ public class Q047_IntoTheDarkForest extends Quest
|
||||
htmltext = "30116-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -30,7 +30,6 @@ public class Q048_ToTheImmortalPlateau extends Quest
|
||||
private static final int GENTLER = 30094;
|
||||
private static final int SANDRA = 30090;
|
||||
private static final int DUSTIN = 30116;
|
||||
|
||||
// Items
|
||||
private static final int ORDER_DOCUMENT_1 = 7563;
|
||||
private static final int ORDER_DOCUMENT_2 = 7564;
|
||||
@@ -44,9 +43,7 @@ public class Q048_ToTheImmortalPlateau extends Quest
|
||||
public Q048_ToTheImmortalPlateau()
|
||||
{
|
||||
super(48, "To the Immortal Plateau");
|
||||
|
||||
registerQuestItems(ORDER_DOCUMENT_1, ORDER_DOCUMENT_2, ORDER_DOCUMENT_3, MAGIC_SWORD_HILT, GEMSTONE_POWDER, PURIFIED_MAGIC_NECKLACE);
|
||||
|
||||
addStartNpc(GALLADUCCI);
|
||||
addTalkId(GALLADUCCI, SANDRA, DUSTIN, GENTLER);
|
||||
}
|
||||
@@ -61,55 +58,63 @@ public class Q048_ToTheImmortalPlateau extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30097-03.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(ORDER_DOCUMENT_1, 1);
|
||||
}
|
||||
else if (event.equals("30094-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_1, 1);
|
||||
st.giveItems(MAGIC_SWORD_HILT, 1);
|
||||
}
|
||||
else if (event.equals("30097-06.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAGIC_SWORD_HILT, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_2, 1);
|
||||
}
|
||||
else if (event.equals("30090-02.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_2, 1);
|
||||
st.giveItems(GEMSTONE_POWDER, 1);
|
||||
}
|
||||
else if (event.equals("30097-09.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GEMSTONE_POWDER, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_3, 1);
|
||||
}
|
||||
else if (event.equals("30116-02.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_3, 1);
|
||||
st.giveItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
}
|
||||
else if (event.equals("30097-12.htm"))
|
||||
{
|
||||
st.takeItems(MARK_OF_TRAVELER, -1);
|
||||
st.takeItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
st.rewardItems(SCROLL_OF_ESCAPE_SPECIAL, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30097-03.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
st.giveItems(ORDER_DOCUMENT_1, 1);
|
||||
break;
|
||||
}
|
||||
case "30094-02.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_1, 1);
|
||||
st.giveItems(MAGIC_SWORD_HILT, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-06.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAGIC_SWORD_HILT, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_2, 1);
|
||||
break;
|
||||
}
|
||||
case "30090-02.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_2, 1);
|
||||
st.giveItems(GEMSTONE_POWDER, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-09.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GEMSTONE_POWDER, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_3, 1);
|
||||
break;
|
||||
}
|
||||
case "30116-02.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_3, 1);
|
||||
st.giveItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-12.htm":
|
||||
{
|
||||
st.takeItems(MARK_OF_TRAVELER, -1);
|
||||
st.takeItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
st.rewardItems(SCROLL_OF_ESCAPE_SPECIAL, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -128,6 +133,7 @@ public class Q048_ToTheImmortalPlateau extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getRace() == Race.ORC) && (player.getLevel() >= 3))
|
||||
{
|
||||
if (st.hasQuestItems(MARK_OF_TRAVELER))
|
||||
@@ -144,12 +150,14 @@ public class Q048_ToTheImmortalPlateau extends Quest
|
||||
htmltext = "30097-01a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case GALLADUCCI:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30097-04.htm";
|
||||
@@ -175,8 +183,9 @@ public class Q048_ToTheImmortalPlateau extends Quest
|
||||
htmltext = "30097-11.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GENTLER:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30094-01.htm";
|
||||
@@ -186,8 +195,9 @@ public class Q048_ToTheImmortalPlateau extends Quest
|
||||
htmltext = "30094-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SANDRA:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "30090-01.htm";
|
||||
@@ -197,8 +207,9 @@ public class Q048_ToTheImmortalPlateau extends Quest
|
||||
htmltext = "30090-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DUSTIN:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "30116-01.htm";
|
||||
@@ -208,12 +219,15 @@ public class Q048_ToTheImmortalPlateau extends Quest
|
||||
htmltext = "30116-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -30,7 +30,6 @@ public class Q049_TheRoadHome extends Quest
|
||||
private static final int GENTLER = 30094;
|
||||
private static final int SANDRA = 30090;
|
||||
private static final int DUSTIN = 30116;
|
||||
|
||||
// Items
|
||||
private static final int ORDER_DOCUMENT_1 = 7563;
|
||||
private static final int ORDER_DOCUMENT_2 = 7564;
|
||||
@@ -44,9 +43,7 @@ public class Q049_TheRoadHome extends Quest
|
||||
public Q049_TheRoadHome()
|
||||
{
|
||||
super(49, "The Road Home");
|
||||
|
||||
registerQuestItems(ORDER_DOCUMENT_1, ORDER_DOCUMENT_2, ORDER_DOCUMENT_3, MAGIC_SWORD_HILT, GEMSTONE_POWDER, PURIFIED_MAGIC_NECKLACE);
|
||||
|
||||
addStartNpc(GALLADUCCI);
|
||||
addTalkId(GALLADUCCI, GENTLER, SANDRA, DUSTIN);
|
||||
}
|
||||
@@ -61,55 +58,63 @@ public class Q049_TheRoadHome extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30097-03.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(ORDER_DOCUMENT_1, 1);
|
||||
}
|
||||
else if (event.equals("30094-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_1, 1);
|
||||
st.giveItems(MAGIC_SWORD_HILT, 1);
|
||||
}
|
||||
else if (event.equals("30097-06.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAGIC_SWORD_HILT, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_2, 1);
|
||||
}
|
||||
else if (event.equals("30090-02.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_2, 1);
|
||||
st.giveItems(GEMSTONE_POWDER, 1);
|
||||
}
|
||||
else if (event.equals("30097-09.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GEMSTONE_POWDER, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_3, 1);
|
||||
}
|
||||
else if (event.equals("30116-02.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_3, 1);
|
||||
st.giveItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
}
|
||||
else if (event.equals("30097-12.htm"))
|
||||
{
|
||||
st.takeItems(MARK_OF_TRAVELER, -1);
|
||||
st.takeItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
st.rewardItems(SCROLL_OF_ESCAPE_SPECIAL, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30097-03.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
st.giveItems(ORDER_DOCUMENT_1, 1);
|
||||
break;
|
||||
}
|
||||
case "30094-02.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_1, 1);
|
||||
st.giveItems(MAGIC_SWORD_HILT, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-06.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MAGIC_SWORD_HILT, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_2, 1);
|
||||
break;
|
||||
}
|
||||
case "30090-02.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_2, 1);
|
||||
st.giveItems(GEMSTONE_POWDER, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-09.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GEMSTONE_POWDER, 1);
|
||||
st.giveItems(ORDER_DOCUMENT_3, 1);
|
||||
break;
|
||||
}
|
||||
case "30116-02.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_DOCUMENT_3, 1);
|
||||
st.giveItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
break;
|
||||
}
|
||||
case "30097-12.htm":
|
||||
{
|
||||
st.takeItems(MARK_OF_TRAVELER, -1);
|
||||
st.takeItems(PURIFIED_MAGIC_NECKLACE, 1);
|
||||
st.rewardItems(SCROLL_OF_ESCAPE_SPECIAL, 1);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -128,6 +133,7 @@ public class Q049_TheRoadHome extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getRace() == Race.DWARF) && (player.getLevel() >= 3))
|
||||
{
|
||||
if (st.hasQuestItems(MARK_OF_TRAVELER))
|
||||
@@ -144,12 +150,14 @@ public class Q049_TheRoadHome extends Quest
|
||||
htmltext = "30097-01a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case GALLADUCCI:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30097-04.htm";
|
||||
@@ -175,8 +183,9 @@ public class Q049_TheRoadHome extends Quest
|
||||
htmltext = "30097-11.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GENTLER:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30094-01.htm";
|
||||
@@ -186,8 +195,9 @@ public class Q049_TheRoadHome extends Quest
|
||||
htmltext = "30094-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SANDRA:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "30090-01.htm";
|
||||
@@ -197,8 +207,9 @@ public class Q049_TheRoadHome extends Quest
|
||||
htmltext = "30090-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DUSTIN:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "30116-01.htm";
|
||||
@@ -208,12 +219,15 @@ public class Q049_TheRoadHome extends Quest
|
||||
htmltext = "30116-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -26,19 +26,15 @@ public class Q050_LanoscosSpecialBait extends Quest
|
||||
{
|
||||
// Item
|
||||
private static final int ESSENCE_OF_WIND = 7621;
|
||||
|
||||
// Reward
|
||||
private static final int WIND_FISHING_LURE = 7610;
|
||||
|
||||
public Q050_LanoscosSpecialBait()
|
||||
{
|
||||
super(50, "Lanosco's Special Bait");
|
||||
|
||||
registerQuestItems(ESSENCE_OF_WIND);
|
||||
|
||||
addStartNpc(31570); // Lanosco
|
||||
addTalkId(31570);
|
||||
|
||||
addKillId(21026); // Singing wind
|
||||
}
|
||||
|
||||
@@ -54,9 +50,7 @@ public class Q050_LanoscosSpecialBait extends Quest
|
||||
|
||||
if (event.equals("31570-03.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
else if (event.equals("31570-07.htm"))
|
||||
{
|
||||
@@ -83,16 +77,20 @@ public class Q050_LanoscosSpecialBait extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 27) ? "31570-02.htm" : "31570-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
htmltext = (st.getQuestItemsCount(ESSENCE_OF_WIND) == 100) ? "31570-04.htm" : "31570-05.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -101,7 +99,7 @@ public class Q050_LanoscosSpecialBait extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "1");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 1);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -109,7 +107,7 @@ public class Q050_LanoscosSpecialBait extends Quest
|
||||
|
||||
if (st.dropItems(ESSENCE_OF_WIND, 1, 100, 500000))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -26,19 +26,15 @@ public class Q051_OFullesSpecialBait extends Quest
|
||||
{
|
||||
// Item
|
||||
private static final int LOST_BAIT = 7622;
|
||||
|
||||
// Reward
|
||||
private static final int ICY_AIR_LURE = 7611;
|
||||
|
||||
public Q051_OFullesSpecialBait()
|
||||
{
|
||||
super(51, "O'Fulle's Special Bait");
|
||||
|
||||
registerQuestItems(LOST_BAIT);
|
||||
|
||||
addStartNpc(31572); // O'Fulle
|
||||
addTalkId(31572);
|
||||
|
||||
addKillId(20552); // Fettered Soul
|
||||
}
|
||||
|
||||
@@ -54,9 +50,7 @@ public class Q051_OFullesSpecialBait extends Quest
|
||||
|
||||
if (event.equals("31572-03.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
else if (event.equals("31572-07.htm"))
|
||||
{
|
||||
@@ -83,16 +77,20 @@ public class Q051_OFullesSpecialBait extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 36) ? "31572-02.htm" : "31572-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
htmltext = (st.getQuestItemsCount(LOST_BAIT) == 100) ? "31572-04.htm" : "31572-05.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -101,7 +99,7 @@ public class Q051_OFullesSpecialBait extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "1");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 1);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -109,7 +107,7 @@ public class Q051_OFullesSpecialBait extends Quest
|
||||
|
||||
if (st.dropItemsAlways(LOST_BAIT, 1, 100))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -26,19 +26,15 @@ public class Q052_WilliesSpecialBait extends Quest
|
||||
{
|
||||
// Item
|
||||
private static final int TARLK_EYE = 7623;
|
||||
|
||||
// Reward
|
||||
private static final int EARTH_FISHING_LURE = 7612;
|
||||
|
||||
public Q052_WilliesSpecialBait()
|
||||
{
|
||||
super(52, "Willie's Special Bait");
|
||||
|
||||
registerQuestItems(TARLK_EYE);
|
||||
|
||||
addStartNpc(31574); // Willie
|
||||
addTalkId(31574);
|
||||
|
||||
addKillId(20573); // Tarlk Basilik
|
||||
}
|
||||
|
||||
@@ -54,9 +50,7 @@ public class Q052_WilliesSpecialBait extends Quest
|
||||
|
||||
if (event.equals("31574-03.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
else if (event.equals("31574-07.htm"))
|
||||
{
|
||||
@@ -83,16 +77,20 @@ public class Q052_WilliesSpecialBait extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 48) ? "31574-02.htm" : "31574-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
htmltext = (st.getQuestItemsCount(TARLK_EYE) == 100) ? "31574-04.htm" : "31574-05.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -101,7 +99,7 @@ public class Q052_WilliesSpecialBait extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "1");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 1);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -109,7 +107,7 @@ public class Q052_WilliesSpecialBait extends Quest
|
||||
|
||||
if (st.dropItems(TARLK_EYE, 1, 100, 500000))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -26,19 +26,15 @@ public class Q053_LinnaeusSpecialBait extends Quest
|
||||
{
|
||||
// Item
|
||||
private static final int CRIMSON_DRAKE_HEART = 7624;
|
||||
|
||||
// Reward
|
||||
private static final int FLAMING_FISHING_LURE = 7613;
|
||||
|
||||
public Q053_LinnaeusSpecialBait()
|
||||
{
|
||||
super(53, "Linnaeus' Special Bait");
|
||||
|
||||
registerQuestItems(CRIMSON_DRAKE_HEART);
|
||||
|
||||
addStartNpc(31577); // Linnaeus
|
||||
addTalkId(31577);
|
||||
|
||||
addKillId(20670); // Crimson Drake
|
||||
}
|
||||
|
||||
@@ -54,9 +50,7 @@ public class Q053_LinnaeusSpecialBait extends Quest
|
||||
|
||||
if (event.equals("31577-03.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
else if (event.equals("31577-07.htm"))
|
||||
{
|
||||
@@ -83,16 +77,20 @@ public class Q053_LinnaeusSpecialBait extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 60) ? "31577-02.htm" : "31577-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
htmltext = (st.getQuestItemsCount(CRIMSON_DRAKE_HEART) == 100) ? "31577-04.htm" : "31577-05.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -101,7 +99,7 @@ public class Q053_LinnaeusSpecialBait extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "1");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 1);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -109,7 +107,7 @@ public class Q053_LinnaeusSpecialBait extends Quest
|
||||
|
||||
if (st.dropItems(CRIMSON_DRAKE_HEART, 1, 100, 500000))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -29,7 +29,6 @@ public class Q101_SwordOfSolidarity extends Quest
|
||||
// NPCs
|
||||
private static final int ROIEN = 30008;
|
||||
private static final int ALTRAN = 30283;
|
||||
|
||||
// Items
|
||||
private static final int BROKEN_SWORD_HANDLE = 739;
|
||||
private static final int BROKEN_BLADE_BOTTOM = 740;
|
||||
@@ -37,7 +36,6 @@ public class Q101_SwordOfSolidarity extends Quest
|
||||
private static final int ROIENS_LETTER = 796;
|
||||
private static final int DIR_TO_RUINS = 937;
|
||||
private static final int ALTRANS_NOTE = 742;
|
||||
|
||||
private static final int SWORD_OF_SOLIDARITY = 738;
|
||||
private static final int SPIRITSHOT_FOR_BEGINNERS = 5790;
|
||||
private static final int SOULSHOT_FOR_BEGINNERS = 5789;
|
||||
@@ -51,12 +49,9 @@ public class Q101_SwordOfSolidarity extends Quest
|
||||
public Q101_SwordOfSolidarity()
|
||||
{
|
||||
super(101, "Sword of Solidarity");
|
||||
|
||||
registerQuestItems(BROKEN_SWORD_HANDLE, BROKEN_BLADE_BOTTOM, BROKEN_BLADE_TOP);
|
||||
|
||||
addStartNpc(ROIEN);
|
||||
addTalkId(ROIEN, ALTRAN);
|
||||
|
||||
addKillId(20361, 20362);
|
||||
}
|
||||
|
||||
@@ -70,49 +65,51 @@ public class Q101_SwordOfSolidarity extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30008-03.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(ROIENS_LETTER, 1);
|
||||
}
|
||||
else if (event.equals("30283-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ROIENS_LETTER, 1);
|
||||
st.giveItems(DIR_TO_RUINS, 1);
|
||||
}
|
||||
else if (event.equals("30283-06.htm"))
|
||||
{
|
||||
st.takeItems(BROKEN_SWORD_HANDLE, 1);
|
||||
st.giveItems(SWORD_OF_SOLIDARITY, 1);
|
||||
st.giveItems(LESSER_HEALING_POT, 100);
|
||||
|
||||
if (player.isNewbie())
|
||||
case "30008-03.htm":
|
||||
{
|
||||
st.showQuestionMark(26);
|
||||
if (player.isMageClass())
|
||||
{
|
||||
st.playTutorialVoice("tutorial_voice_027");
|
||||
st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.playTutorialVoice("tutorial_voice_026");
|
||||
st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000);
|
||||
}
|
||||
st.startQuest();
|
||||
st.giveItems(ROIENS_LETTER, 1);
|
||||
break;
|
||||
}
|
||||
case "30283-02.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ROIENS_LETTER, 1);
|
||||
st.giveItems(DIR_TO_RUINS, 1);
|
||||
break;
|
||||
}
|
||||
case "30283-06.htm":
|
||||
{
|
||||
st.takeItems(BROKEN_SWORD_HANDLE, 1);
|
||||
st.giveItems(SWORD_OF_SOLIDARITY, 1);
|
||||
st.giveItems(LESSER_HEALING_POT, 100);
|
||||
if (player.isNewbie())
|
||||
{
|
||||
st.showQuestionMark(26);
|
||||
if (player.isMageClass())
|
||||
{
|
||||
st.playTutorialVoice("tutorial_voice_027");
|
||||
st.giveItems(SPIRITSHOT_FOR_BEGINNERS, 3000);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.playTutorialVoice("tutorial_voice_026");
|
||||
st.giveItems(SOULSHOT_FOR_BEGINNERS, 7000);
|
||||
}
|
||||
}
|
||||
st.giveItems(ECHO_BATTLE, 10);
|
||||
st.giveItems(ECHO_LOVE, 10);
|
||||
st.giveItems(ECHO_SOLITUDE, 10);
|
||||
st.giveItems(ECHO_FEAST, 10);
|
||||
st.giveItems(ECHO_CELEBRATION, 10);
|
||||
player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
|
||||
st.giveItems(ECHO_BATTLE, 10);
|
||||
st.giveItems(ECHO_LOVE, 10);
|
||||
st.giveItems(ECHO_SOLITUDE, 10);
|
||||
st.giveItems(ECHO_FEAST, 10);
|
||||
st.giveItems(ECHO_CELEBRATION, 10);
|
||||
player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -131,6 +128,7 @@ public class Q101_SwordOfSolidarity extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.HUMAN)
|
||||
{
|
||||
htmltext = "30008-01a.htm";
|
||||
@@ -144,12 +142,14 @@ public class Q101_SwordOfSolidarity extends Quest
|
||||
htmltext = "30008-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = (st.getInt("cond"));
|
||||
{
|
||||
final int cond = (st.getCond());
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ROIEN:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30008-04.htm";
|
||||
@@ -165,7 +165,7 @@ public class Q101_SwordOfSolidarity extends Quest
|
||||
else if (cond == 4)
|
||||
{
|
||||
htmltext = "30008-05.htm";
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ALTRANS_NOTE, 1);
|
||||
st.giveItems(BROKEN_SWORD_HANDLE, 1);
|
||||
@@ -175,8 +175,9 @@ public class Q101_SwordOfSolidarity extends Quest
|
||||
htmltext = "30008-05a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ALTRAN:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30283-01.htm";
|
||||
@@ -188,7 +189,7 @@ public class Q101_SwordOfSolidarity extends Quest
|
||||
else if (cond == 3)
|
||||
{
|
||||
htmltext = "30283-04.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(DIR_TO_RUINS, 1);
|
||||
st.takeItems(BROKEN_BLADE_TOP, 1);
|
||||
@@ -204,12 +205,15 @@ public class Q101_SwordOfSolidarity extends Quest
|
||||
htmltext = "30283-05.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -218,7 +222,7 @@ public class Q101_SwordOfSolidarity extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "2");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 2);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -230,7 +234,7 @@ public class Q101_SwordOfSolidarity extends Quest
|
||||
}
|
||||
else if (st.dropItems(BROKEN_BLADE_BOTTOM, 1, 1, 200000))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -26,6 +26,13 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q102_SeaOfSporesFever extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int ALBERIUS = 30284;
|
||||
private static final int COBENDELL = 30156;
|
||||
private static final int BERROS = 30217;
|
||||
private static final int VELTRESS = 30219;
|
||||
private static final int RAYEN = 30221;
|
||||
private static final int GARTRANDELL = 30285;
|
||||
// Items
|
||||
private static final int ALBERIUS_LETTER = 964;
|
||||
private static final int EVERGREEN_AMULET = 965;
|
||||
@@ -36,7 +43,6 @@ public class Q102_SeaOfSporesFever extends Quest
|
||||
private static final int COBENDELL_MEDICINE_3 = 1132;
|
||||
private static final int COBENDELL_MEDICINE_4 = 1133;
|
||||
private static final int COBENDELL_MEDICINE_5 = 1134;
|
||||
|
||||
// Rewards
|
||||
private static final int SPIRITSHOT_NO_GRADE = 2509;
|
||||
private static final int SOULSHOT_NO_GRADE = 1835;
|
||||
@@ -49,23 +55,12 @@ public class Q102_SeaOfSporesFever extends Quest
|
||||
private static final int ECHO_FEAST = 4415;
|
||||
private static final int ECHO_CELEBRATION = 4416;
|
||||
|
||||
// NPCs
|
||||
private static final int ALBERIUS = 30284;
|
||||
private static final int COBENDELL = 30156;
|
||||
private static final int BERROS = 30217;
|
||||
private static final int VELTRESS = 30219;
|
||||
private static final int RAYEN = 30221;
|
||||
private static final int GARTRANDELL = 30285;
|
||||
|
||||
public Q102_SeaOfSporesFever()
|
||||
{
|
||||
super(102, "Sea of Spores Fever");
|
||||
|
||||
registerQuestItems(ALBERIUS_LETTER, EVERGREEN_AMULET, DRYAD_TEARS, COBENDELL_MEDICINE_1, COBENDELL_MEDICINE_2, COBENDELL_MEDICINE_3, COBENDELL_MEDICINE_4, COBENDELL_MEDICINE_5, ALBERIUS_LIST);
|
||||
|
||||
addStartNpc(ALBERIUS);
|
||||
addTalkId(ALBERIUS, COBENDELL, BERROS, RAYEN, GARTRANDELL, VELTRESS);
|
||||
|
||||
addKillId(20013, 20019);
|
||||
}
|
||||
|
||||
@@ -81,9 +76,7 @@ public class Q102_SeaOfSporesFever extends Quest
|
||||
|
||||
if (event.equals("30284-02.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(ALBERIUS_LETTER, 1);
|
||||
}
|
||||
|
||||
@@ -103,6 +96,7 @@ public class Q102_SeaOfSporesFever extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.ELF)
|
||||
{
|
||||
htmltext = "30284-00.htm";
|
||||
@@ -116,12 +110,14 @@ public class Q102_SeaOfSporesFever extends Quest
|
||||
htmltext = "30284-07.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ALBERIUS:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30284-03.htm";
|
||||
@@ -133,7 +129,7 @@ public class Q102_SeaOfSporesFever extends Quest
|
||||
else if (cond == 4)
|
||||
{
|
||||
htmltext = "30284-04.htm";
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
st.set("medicines", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(COBENDELL_MEDICINE_1, 1);
|
||||
@@ -170,12 +166,13 @@ public class Q102_SeaOfSporesFever extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case COBENDELL:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30156-03.htm";
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ALBERIUS_LETTER, 1);
|
||||
st.giveItems(EVERGREEN_AMULET, 1);
|
||||
@@ -191,7 +188,7 @@ public class Q102_SeaOfSporesFever extends Quest
|
||||
else if (cond == 3)
|
||||
{
|
||||
htmltext = "30156-05.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(DRYAD_TEARS, -1);
|
||||
st.takeItems(EVERGREEN_AMULET, 1);
|
||||
@@ -206,44 +203,51 @@ public class Q102_SeaOfSporesFever extends Quest
|
||||
htmltext = "30156-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BERROS:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "30217-01.htm";
|
||||
checkItem(st, COBENDELL_MEDICINE_2);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case VELTRESS:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "30219-01.htm";
|
||||
checkItem(st, COBENDELL_MEDICINE_3);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case RAYEN:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "30221-01.htm";
|
||||
checkItem(st, COBENDELL_MEDICINE_4);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GARTRANDELL:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "30285-01.htm";
|
||||
checkItem(st, COBENDELL_MEDICINE_5);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -252,7 +256,7 @@ public class Q102_SeaOfSporesFever extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "2");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 2);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -260,7 +264,7 @@ public class Q102_SeaOfSporesFever extends Quest
|
||||
|
||||
if (st.dropItems(DRYAD_TEARS, 1, 10, 300000))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -275,7 +279,7 @@ public class Q102_SeaOfSporesFever extends Quest
|
||||
final int medicinesLeft = st.getInt("medicines") - 1;
|
||||
if (medicinesLeft == 0)
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -26,6 +26,10 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q103_SpiritOfCraftsman extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int KARROD = 30307;
|
||||
private static final int CECKTINON = 30132;
|
||||
private static final int HARNE = 30144;
|
||||
// Items
|
||||
private static final int KARROD_LETTER = 968;
|
||||
private static final int CECKTINON_VOUCHER_1 = 969;
|
||||
@@ -35,7 +39,6 @@ public class Q103_SpiritOfCraftsman extends Quest
|
||||
private static final int ZOMBIE_HEAD = 973;
|
||||
private static final int STEELBENDER_HEAD = 974;
|
||||
private static final int BONE_FRAGMENT = 1107;
|
||||
|
||||
// Rewards
|
||||
private static final int SPIRITSHOT_NO_GRADE = 2509;
|
||||
private static final int SOULSHOT_NO_GRADE = 1835;
|
||||
@@ -49,20 +52,12 @@ public class Q103_SpiritOfCraftsman extends Quest
|
||||
private static final int ECHO_FEAST = 4415;
|
||||
private static final int ECHO_CELEBRATION = 4416;
|
||||
|
||||
// NPCs
|
||||
private static final int KARROD = 30307;
|
||||
private static final int CECKTINON = 30132;
|
||||
private static final int HARNE = 30144;
|
||||
|
||||
public Q103_SpiritOfCraftsman()
|
||||
{
|
||||
super(103, "Spirit of Craftsman");
|
||||
|
||||
registerQuestItems(KARROD_LETTER, CECKTINON_VOUCHER_1, CECKTINON_VOUCHER_2, BONE_FRAGMENT, SOUL_CATCHER, PRESERVING_OIL, ZOMBIE_HEAD, STEELBENDER_HEAD);
|
||||
|
||||
addStartNpc(KARROD);
|
||||
addTalkId(KARROD, CECKTINON, HARNE);
|
||||
|
||||
addKillId(20015, 20020, 20455, 20517, 20518);
|
||||
}
|
||||
|
||||
@@ -78,9 +73,7 @@ public class Q103_SpiritOfCraftsman extends Quest
|
||||
|
||||
if (event.equals("30307-05.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(KARROD_LETTER, 1);
|
||||
}
|
||||
|
||||
@@ -100,6 +93,7 @@ public class Q103_SpiritOfCraftsman extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.DARK_ELF)
|
||||
{
|
||||
htmltext = "30307-00.htm";
|
||||
@@ -113,12 +107,14 @@ public class Q103_SpiritOfCraftsman extends Quest
|
||||
htmltext = "30307-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case KARROD:
|
||||
{
|
||||
if (cond < 8)
|
||||
{
|
||||
htmltext = "30307-06.htm";
|
||||
@@ -164,12 +160,13 @@ public class Q103_SpiritOfCraftsman extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case CECKTINON:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30132-01.htm";
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(KARROD_LETTER, 1);
|
||||
st.giveItems(CECKTINON_VOUCHER_1, 1);
|
||||
@@ -181,7 +178,7 @@ public class Q103_SpiritOfCraftsman extends Quest
|
||||
else if (cond == 5)
|
||||
{
|
||||
htmltext = "30132-03.htm";
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SOUL_CATCHER, 1);
|
||||
st.giveItems(PRESERVING_OIL, 1);
|
||||
@@ -193,7 +190,7 @@ public class Q103_SpiritOfCraftsman extends Quest
|
||||
else if (cond == 7)
|
||||
{
|
||||
htmltext = "30132-05.htm";
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ZOMBIE_HEAD, 1);
|
||||
st.giveItems(STEELBENDER_HEAD, 1);
|
||||
@@ -203,12 +200,13 @@ public class Q103_SpiritOfCraftsman extends Quest
|
||||
htmltext = "30132-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case HARNE:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30144-01.htm";
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CECKTINON_VOUCHER_1, 1);
|
||||
st.giveItems(CECKTINON_VOUCHER_2, 1);
|
||||
@@ -220,7 +218,7 @@ public class Q103_SpiritOfCraftsman extends Quest
|
||||
else if (cond == 4)
|
||||
{
|
||||
htmltext = "30144-03.htm";
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CECKTINON_VOUCHER_2, 1);
|
||||
st.takeItems(BONE_FRAGMENT, 10);
|
||||
@@ -231,12 +229,15 @@ public class Q103_SpiritOfCraftsman extends Quest
|
||||
htmltext = "30144-04.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -256,20 +257,23 @@ public class Q103_SpiritOfCraftsman extends Quest
|
||||
case 20517:
|
||||
case 20518:
|
||||
case 20455:
|
||||
if ((st.getInt("cond") == 3) && st.dropItems(BONE_FRAGMENT, 1, 10, 300000))
|
||||
{
|
||||
if (st.isCond(3) && st.dropItems(BONE_FRAGMENT, 1, 10, 300000))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 20015:
|
||||
case 20020:
|
||||
if ((st.getInt("cond") == 6) && st.dropItems(ZOMBIE_HEAD, 1, 1, 300000))
|
||||
{
|
||||
if (st.isCond(6) && st.dropItems(ZOMBIE_HEAD, 1, 1, 300000))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
st.takeItems(PRESERVING_OIL, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -27,12 +27,16 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q104_SpiritOfMirrors extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int GALLINT = 30017;
|
||||
private static final int ARNOLD = 30041;
|
||||
private static final int JOHNSTONE = 30043;
|
||||
private static final int KENYOS = 30045;
|
||||
// Items
|
||||
private static final int GALLINS_OAK_WAND = 748;
|
||||
private static final int WAND_SPIRITBOUND_1 = 1135;
|
||||
private static final int WAND_SPIRITBOUND_2 = 1136;
|
||||
private static final int WAND_SPIRITBOUND_3 = 1137;
|
||||
|
||||
// Rewards
|
||||
private static final int SPIRITSHOT_NO_GRADE = 2509;
|
||||
private static final int SOULSHOT_NO_GRADE = 1835;
|
||||
@@ -46,18 +50,10 @@ public class Q104_SpiritOfMirrors extends Quest
|
||||
private static final int ECHO_FEAST = 4415;
|
||||
private static final int ECHO_CELEBRATION = 4416;
|
||||
|
||||
// NPCs
|
||||
private static final int GALLINT = 30017;
|
||||
private static final int ARNOLD = 30041;
|
||||
private static final int JOHNSTONE = 30043;
|
||||
private static final int KENYOS = 30045;
|
||||
|
||||
public Q104_SpiritOfMirrors()
|
||||
{
|
||||
super(104, "Spirit of Mirrors");
|
||||
|
||||
registerQuestItems(GALLINS_OAK_WAND, WAND_SPIRITBOUND_1, WAND_SPIRITBOUND_2, WAND_SPIRITBOUND_3);
|
||||
|
||||
addStartNpc(GALLINT);
|
||||
addTalkId(GALLINT, ARNOLD, JOHNSTONE, KENYOS);
|
||||
|
||||
@@ -76,9 +72,7 @@ public class Q104_SpiritOfMirrors extends Quest
|
||||
|
||||
if (event.equals("30017-03.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(GALLINS_OAK_WAND, 1);
|
||||
st.giveItems(GALLINS_OAK_WAND, 1);
|
||||
st.giveItems(GALLINS_OAK_WAND, 1);
|
||||
@@ -100,6 +94,7 @@ public class Q104_SpiritOfMirrors extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.HUMAN)
|
||||
{
|
||||
htmltext = "30017-00.htm";
|
||||
@@ -113,12 +108,14 @@ public class Q104_SpiritOfMirrors extends Quest
|
||||
htmltext = "30017-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case GALLINT:
|
||||
{
|
||||
if ((cond == 1) || (cond == 2))
|
||||
{
|
||||
htmltext = "30017-04.htm";
|
||||
@@ -168,23 +165,27 @@ public class Q104_SpiritOfMirrors extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KENYOS:
|
||||
case JOHNSTONE:
|
||||
case ARNOLD:
|
||||
{
|
||||
htmltext = npc.getNpcId() + "-01.htm";
|
||||
if (cond == 1)
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -210,7 +211,7 @@ public class Q104_SpiritOfMirrors extends Quest
|
||||
st.giveItems(WAND_SPIRITBOUND_1, 1);
|
||||
if (st.hasQuestItems(WAND_SPIRITBOUND_2, WAND_SPIRITBOUND_3))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -227,7 +228,7 @@ public class Q104_SpiritOfMirrors extends Quest
|
||||
st.giveItems(WAND_SPIRITBOUND_2, 1);
|
||||
if (st.hasQuestItems(WAND_SPIRITBOUND_1, WAND_SPIRITBOUND_3))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -244,7 +245,7 @@ public class Q104_SpiritOfMirrors extends Quest
|
||||
st.giveItems(WAND_SPIRITBOUND_3, 1);
|
||||
if (st.hasQuestItems(WAND_SPIRITBOUND_1, WAND_SPIRITBOUND_2))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -27,6 +27,15 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q105_SkirmishWithTheOrcs extends Quest
|
||||
{
|
||||
// Monster
|
||||
private static final int KABOO_CHIEF_UOPH = 27059;
|
||||
private static final int KABOO_CHIEF_KRACHA = 27060;
|
||||
private static final int KABOO_CHIEF_BATOH = 27061;
|
||||
private static final int KABOO_CHIEF_TANUKIA = 27062;
|
||||
private static final int KABOO_CHIEF_TUREL = 27064;
|
||||
private static final int KABOO_CHIEF_ROKO = 27065;
|
||||
private static final int KABOO_CHIEF_KAMUT = 27067;
|
||||
private static final int KABOO_CHIEF_MURTIKA = 27068;
|
||||
// Item
|
||||
private static final int KENDELL_ORDER_1 = 1836;
|
||||
private static final int KENDELL_ORDER_2 = 1837;
|
||||
@@ -38,17 +47,6 @@ public class Q105_SkirmishWithTheOrcs extends Quest
|
||||
private static final int KENDELL_ORDER_8 = 1843;
|
||||
private static final int KABOO_CHIEF_TORC_1 = 1844;
|
||||
private static final int KABOO_CHIEF_TORC_2 = 1845;
|
||||
|
||||
// Monster
|
||||
private static final int KABOO_CHIEF_UOPH = 27059;
|
||||
private static final int KABOO_CHIEF_KRACHA = 27060;
|
||||
private static final int KABOO_CHIEF_BATOH = 27061;
|
||||
private static final int KABOO_CHIEF_TANUKIA = 27062;
|
||||
private static final int KABOO_CHIEF_TUREL = 27064;
|
||||
private static final int KABOO_CHIEF_ROKO = 27065;
|
||||
private static final int KABOO_CHIEF_KAMUT = 27067;
|
||||
private static final int KABOO_CHIEF_MURTIKA = 27068;
|
||||
|
||||
// Rewards
|
||||
private static final int SPIRITSHOT_FOR_BEGINNERS = 5790;
|
||||
private static final int SOULSHOT_FOR_BEGINNERS = 5789;
|
||||
@@ -63,12 +61,9 @@ public class Q105_SkirmishWithTheOrcs extends Quest
|
||||
public Q105_SkirmishWithTheOrcs()
|
||||
{
|
||||
super(105, "Skirmish with the Orcs");
|
||||
|
||||
registerQuestItems(KENDELL_ORDER_1, KENDELL_ORDER_2, KENDELL_ORDER_3, KENDELL_ORDER_4, KENDELL_ORDER_5, KENDELL_ORDER_6, KENDELL_ORDER_7, KENDELL_ORDER_8, KABOO_CHIEF_TORC_1, KABOO_CHIEF_TORC_2);
|
||||
|
||||
addStartNpc(30218); // Kendell
|
||||
addTalkId(30218);
|
||||
|
||||
addKillId(KABOO_CHIEF_UOPH, KABOO_CHIEF_KRACHA, KABOO_CHIEF_BATOH, KABOO_CHIEF_TANUKIA, KABOO_CHIEF_TUREL, KABOO_CHIEF_ROKO, KABOO_CHIEF_KAMUT, KABOO_CHIEF_MURTIKA);
|
||||
}
|
||||
|
||||
@@ -84,11 +79,10 @@ public class Q105_SkirmishWithTheOrcs extends Quest
|
||||
|
||||
if (event.equals("30218-03.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(Rnd.get(1836, 1839), 1); // Kendell's orders 1 to 4.
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@@ -105,6 +99,7 @@ public class Q105_SkirmishWithTheOrcs extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.ELF)
|
||||
{
|
||||
htmltext = "30218-00.htm";
|
||||
@@ -118,9 +113,10 @@ public class Q105_SkirmishWithTheOrcs extends Quest
|
||||
htmltext = "30218-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30218-05.htm";
|
||||
@@ -128,7 +124,7 @@ public class Q105_SkirmishWithTheOrcs extends Quest
|
||||
else if (cond == 2)
|
||||
{
|
||||
htmltext = "30218-06.htm";
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(KABOO_CHIEF_TORC_1, 1);
|
||||
st.takeItems(KENDELL_ORDER_1, 1);
|
||||
@@ -184,10 +180,12 @@ public class Q105_SkirmishWithTheOrcs extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
@@ -207,33 +205,37 @@ public class Q105_SkirmishWithTheOrcs extends Quest
|
||||
case KABOO_CHIEF_KRACHA:
|
||||
case KABOO_CHIEF_BATOH:
|
||||
case KABOO_CHIEF_TANUKIA:
|
||||
if ((st.getInt("cond") == 1) && st.hasQuestItems(npc.getNpcId() - 25223)) // npcId - 25223 = itemId to verify.
|
||||
{
|
||||
if (st.isCond(1) && st.hasQuestItems(npc.getNpcId() - 25223)) // npcId - 25223 = itemId to verify.
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(KABOO_CHIEF_TORC_1, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KABOO_CHIEF_TUREL:
|
||||
case KABOO_CHIEF_ROKO:
|
||||
if ((st.getInt("cond") == 3) && st.hasQuestItems(npc.getNpcId() - 25224)) // npcId - 25224 = itemId to verify.
|
||||
{
|
||||
if (st.isCond(3) && st.hasQuestItems(npc.getNpcId() - 25224)) // npcId - 25224 = itemId to verify.
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(KABOO_CHIEF_TORC_2, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KABOO_CHIEF_KAMUT:
|
||||
case KABOO_CHIEF_MURTIKA:
|
||||
if ((st.getInt("cond") == 3) && st.hasQuestItems(npc.getNpcId() - 25225)) // npcId - 25225 = itemId to verify.
|
||||
{
|
||||
if (st.isCond(3) && st.hasQuestItems(npc.getNpcId() - 25225)) // npcId - 25225 = itemId to verify.
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(KABOO_CHIEF_TORC_2, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -29,14 +29,12 @@ public class Q106_ForgottenTruth extends Quest
|
||||
// NPCs
|
||||
private static final int THIFIELL = 30358;
|
||||
private static final int KARTIA = 30133;
|
||||
|
||||
// Items
|
||||
private static final int ONYX_TALISMAN_1 = 984;
|
||||
private static final int ONYX_TALISMAN_2 = 985;
|
||||
private static final int ANCIENT_SCROLL = 986;
|
||||
private static final int ANCIENT_CLAY_TABLET = 987;
|
||||
private static final int KARTIA_TRANSLATION = 988;
|
||||
|
||||
// Rewards
|
||||
private static final int SPIRITSHOT_NO_GRADE = 2509;
|
||||
private static final int SOULSHOT_NO_GRADE = 1835;
|
||||
@@ -53,12 +51,9 @@ public class Q106_ForgottenTruth extends Quest
|
||||
public Q106_ForgottenTruth()
|
||||
{
|
||||
super(106, "Forgotten Truth");
|
||||
|
||||
registerQuestItems(ONYX_TALISMAN_1, ONYX_TALISMAN_2, ANCIENT_SCROLL, ANCIENT_CLAY_TABLET, KARTIA_TRANSLATION);
|
||||
|
||||
addStartNpc(THIFIELL);
|
||||
addTalkId(THIFIELL, KARTIA);
|
||||
|
||||
addKillId(27070); // Tumran Orc Brigand
|
||||
}
|
||||
|
||||
@@ -74,11 +69,10 @@ public class Q106_ForgottenTruth extends Quest
|
||||
|
||||
if (event.equals("30358-05.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(ONYX_TALISMAN_1, 1);
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@@ -95,6 +89,7 @@ public class Q106_ForgottenTruth extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.DARK_ELF)
|
||||
{
|
||||
htmltext = "30358-00.htm";
|
||||
@@ -108,12 +103,14 @@ public class Q106_ForgottenTruth extends Quest
|
||||
htmltext = "30358-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case THIFIELL:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30358-06.htm";
|
||||
@@ -167,12 +164,13 @@ public class Q106_ForgottenTruth extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KARTIA:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30133-01.htm";
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ONYX_TALISMAN_1, 1);
|
||||
st.giveItems(ONYX_TALISMAN_2, 1);
|
||||
@@ -184,7 +182,7 @@ public class Q106_ForgottenTruth extends Quest
|
||||
else if (cond == 3)
|
||||
{
|
||||
htmltext = "30133-03.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ONYX_TALISMAN_2, 1);
|
||||
st.takeItems(ANCIENT_SCROLL, 1);
|
||||
@@ -196,12 +194,15 @@ public class Q106_ForgottenTruth extends Quest
|
||||
htmltext = "30133-04.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
@@ -209,7 +210,7 @@ public class Q106_ForgottenTruth extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "2");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 2);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -221,7 +222,7 @@ public class Q106_ForgottenTruth extends Quest
|
||||
}
|
||||
else if (st.dropItems(ANCIENT_CLAY_TABLET, 1, 1, 200000))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -29,7 +29,6 @@ public class Q107_MercilessPunishment extends Quest
|
||||
// NPCs
|
||||
private static final int HATOS = 30568;
|
||||
private static final int PARUGON = 30580;
|
||||
|
||||
// Items
|
||||
private static final int HATOS_ORDER_1 = 1553;
|
||||
private static final int HATOS_ORDER_2 = 1554;
|
||||
@@ -37,7 +36,6 @@ public class Q107_MercilessPunishment extends Quest
|
||||
private static final int LETTER_TO_HUMAN = 1557;
|
||||
private static final int LETTER_TO_DARKELF = 1556;
|
||||
private static final int LETTER_TO_ELF = 1558;
|
||||
|
||||
// Rewards
|
||||
private static final int BUTCHER_SWORD = 1510;
|
||||
private static final int SPIRITSHOT_FOR_BEGINNERS = 5790;
|
||||
@@ -52,12 +50,9 @@ public class Q107_MercilessPunishment extends Quest
|
||||
public Q107_MercilessPunishment()
|
||||
{
|
||||
super(107, "Merciless Punishment");
|
||||
|
||||
registerQuestItems(HATOS_ORDER_1, HATOS_ORDER_2, HATOS_ORDER_3, LETTER_TO_HUMAN, LETTER_TO_DARKELF, LETTER_TO_ELF);
|
||||
|
||||
addStartNpc(HATOS);
|
||||
addTalkId(HATOS, PARUGON);
|
||||
|
||||
addKillId(27041); // Baranka's Messenger
|
||||
}
|
||||
|
||||
@@ -71,31 +66,36 @@ public class Q107_MercilessPunishment extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30568-03.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(HATOS_ORDER_1, 1);
|
||||
}
|
||||
else if (event.equals("30568-06.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_GIVEUP);
|
||||
st.exitQuest(true);
|
||||
}
|
||||
else if (event.equals("30568-07.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HATOS_ORDER_1, 1);
|
||||
st.giveItems(HATOS_ORDER_2, 1);
|
||||
}
|
||||
else if (event.equals("30568-09.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HATOS_ORDER_2, 1);
|
||||
st.giveItems(HATOS_ORDER_3, 1);
|
||||
case "30568-03.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
st.giveItems(HATOS_ORDER_1, 1);
|
||||
break;
|
||||
}
|
||||
case "30568-06.htm":
|
||||
{
|
||||
st.playSound(QuestState.SOUND_GIVEUP);
|
||||
st.exitQuest(true);
|
||||
break;
|
||||
}
|
||||
case "30568-07.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HATOS_ORDER_1, 1);
|
||||
st.giveItems(HATOS_ORDER_2, 1);
|
||||
break;
|
||||
}
|
||||
case "30568-09.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HATOS_ORDER_2, 1);
|
||||
st.giveItems(HATOS_ORDER_3, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -114,6 +114,7 @@ public class Q107_MercilessPunishment extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.ORC)
|
||||
{
|
||||
htmltext = "30568-00.htm";
|
||||
@@ -127,12 +128,14 @@ public class Q107_MercilessPunishment extends Quest
|
||||
htmltext = "30568-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case HATOS:
|
||||
{
|
||||
if ((cond == 1) || (cond == 2))
|
||||
{
|
||||
htmltext = "30568-04.htm";
|
||||
@@ -185,21 +188,25 @@ public class Q107_MercilessPunishment extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case PARUGON:
|
||||
{
|
||||
htmltext = "30580-01.htm";
|
||||
if (cond == 1)
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -214,22 +221,22 @@ public class Q107_MercilessPunishment extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
final int cond = st.getInt("cond");
|
||||
final int cond = st.getCond();
|
||||
if (cond == 2)
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(LETTER_TO_HUMAN, 1);
|
||||
}
|
||||
else if (cond == 4)
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(LETTER_TO_DARKELF, 1);
|
||||
}
|
||||
else if (cond == 6)
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(LETTER_TO_ELF, 1);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,10 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
private static final int BRUNON = 30526;
|
||||
private static final int MARON = 30529;
|
||||
private static final int TOROCCO = 30555;
|
||||
|
||||
// Monsters
|
||||
private static final int GOBLIN_BRIGAND_LEADER = 20323;
|
||||
private static final int GOBLIN_BRIGAND_LIEUTENANT = 20324;
|
||||
private static final int BLADE_BAT = 20480;
|
||||
// Items
|
||||
private static final int GOUPH_CONTRACT = 1559;
|
||||
private static final int REEP_CONTRACT = 1560;
|
||||
@@ -50,12 +53,6 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
private static final int BERRY_TART = 1569;
|
||||
private static final int BAT_DIAGRAM = 1570;
|
||||
private static final int STAR_DIAMOND = 1571;
|
||||
|
||||
// Monsters
|
||||
private static final int GOBLIN_BRIGAND_LEADER = 20323;
|
||||
private static final int GOBLIN_BRIGAND_LIEUTENANT = 20324;
|
||||
private static final int BLADE_BAT = 20480;
|
||||
|
||||
// Rewards
|
||||
private static final int SILVERSMITH_HAMMER = 1511;
|
||||
private static final int SPIRITSHOT_FOR_BEGINNERS = 5790;
|
||||
@@ -66,48 +63,25 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
private static final int ECHO_FEAST = 4415;
|
||||
private static final int ECHO_CELEBRATION = 4416;
|
||||
private static final int LESSER_HEALING_POTION = 1060;
|
||||
|
||||
// @formatter:off
|
||||
private static final int[][] LEADER_DROPLIST =
|
||||
{
|
||||
{
|
||||
AQUAMARINE,
|
||||
1,
|
||||
10,
|
||||
800000
|
||||
},
|
||||
{
|
||||
CHRYSOBERYL,
|
||||
1,
|
||||
10,
|
||||
800000
|
||||
}
|
||||
{AQUAMARINE, 1, 10, 800000},
|
||||
{CHRYSOBERYL, 1, 10, 800000}
|
||||
};
|
||||
|
||||
private static final int[][] LIEUTENANT_DROPLIST =
|
||||
{
|
||||
{
|
||||
AQUAMARINE,
|
||||
1,
|
||||
10,
|
||||
600000
|
||||
},
|
||||
{
|
||||
CHRYSOBERYL,
|
||||
1,
|
||||
10,
|
||||
600000
|
||||
}
|
||||
{AQUAMARINE, 1, 10, 600000},
|
||||
{CHRYSOBERYL, 1, 10, 600000}
|
||||
};
|
||||
// @formatter:on
|
||||
|
||||
public Q108_JumbleTumbleDiamondFuss()
|
||||
{
|
||||
super(108, "Jumble, Tumble, Diamond Fuss");
|
||||
|
||||
registerQuestItems(GOUPH_CONTRACT, REEP_CONTRACT, ELVEN_WINE, BRUNON_DICE, BRUNON_CONTRACT, AQUAMARINE, CHRYSOBERYL, GEM_BOX, COAL_PIECE, BRUNON_LETTER, BERRY_TART, BAT_DIAGRAM, STAR_DIAMOND);
|
||||
|
||||
addStartNpc(GOUPH);
|
||||
addTalkId(GOUPH, REEP, MURDOC, AIRY, BRUNON, MARON, TOROCCO);
|
||||
|
||||
addKillId(GOBLIN_BRIGAND_LEADER, GOBLIN_BRIGAND_LIEUTENANT, BLADE_BAT);
|
||||
}
|
||||
|
||||
@@ -121,26 +95,30 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30523-03.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(GOUPH_CONTRACT, 1);
|
||||
}
|
||||
else if (event.equals("30555-02.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(REEP_CONTRACT, 1);
|
||||
st.giveItems(ELVEN_WINE, 1);
|
||||
}
|
||||
else if (event.equals("30526-02.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BRUNON_DICE, 1);
|
||||
st.giveItems(BRUNON_CONTRACT, 1);
|
||||
case "30523-03.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
st.giveItems(GOUPH_CONTRACT, 1);
|
||||
break;
|
||||
}
|
||||
case "30555-02.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(REEP_CONTRACT, 1);
|
||||
st.giveItems(ELVEN_WINE, 1);
|
||||
break;
|
||||
}
|
||||
case "30526-02.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BRUNON_DICE, 1);
|
||||
st.giveItems(BRUNON_CONTRACT, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -159,6 +137,7 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.DWARF)
|
||||
{
|
||||
htmltext = "30523-00.htm";
|
||||
@@ -172,12 +151,14 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
htmltext = "30523-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case GOUPH:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30523-04.htm";
|
||||
@@ -189,7 +170,7 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
else if (cond == 7)
|
||||
{
|
||||
htmltext = "30523-06.htm";
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GEM_BOX, 1);
|
||||
st.giveItems(COAL_PIECE, 1);
|
||||
@@ -230,12 +211,13 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case REEP:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30516-01.htm";
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GOUPH_CONTRACT, 1);
|
||||
st.giveItems(REEP_CONTRACT, 1);
|
||||
@@ -245,8 +227,9 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
htmltext = "30516-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TOROCCO:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30555-01.htm";
|
||||
@@ -264,12 +247,13 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
htmltext = "30555-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARON:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "30529-01.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ELVEN_WINE, 1);
|
||||
st.giveItems(BRUNON_DICE, 1);
|
||||
@@ -283,8 +267,9 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
htmltext = "30529-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BRUNON:
|
||||
{
|
||||
if (cond == 4)
|
||||
{
|
||||
htmltext = "30526-01.htm";
|
||||
@@ -296,7 +281,7 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
else if (cond == 6)
|
||||
{
|
||||
htmltext = "30526-04.htm";
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BRUNON_CONTRACT, 1);
|
||||
st.takeItems(AQUAMARINE, -1);
|
||||
@@ -310,7 +295,7 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
else if (cond == 8)
|
||||
{
|
||||
htmltext = "30526-06.htm";
|
||||
st.set("cond", "9");
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(COAL_PIECE, 1);
|
||||
st.giveItems(BRUNON_LETTER, 1);
|
||||
@@ -324,12 +309,13 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
htmltext = "30526-08.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MURDOC:
|
||||
{
|
||||
if (cond == 9)
|
||||
{
|
||||
htmltext = "30521-01.htm";
|
||||
st.set("cond", "10");
|
||||
st.setCond(10);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BRUNON_LETTER, 1);
|
||||
st.giveItems(BERRY_TART, 1);
|
||||
@@ -343,12 +329,13 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
htmltext = "30521-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case AIRY:
|
||||
{
|
||||
if (cond == 10)
|
||||
{
|
||||
htmltext = "30522-01.htm";
|
||||
st.set("cond", "11");
|
||||
st.setCond(11);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BERRY_TART, 1);
|
||||
st.giveItems(BAT_DIAGRAM, 1);
|
||||
@@ -362,12 +349,15 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
htmltext = "30522-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
@@ -384,26 +374,30 @@ public class Q108_JumbleTumbleDiamondFuss extends Quest
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case GOBLIN_BRIGAND_LEADER:
|
||||
if ((st.getInt("cond") == 5) && st.dropMultipleItems(LEADER_DROPLIST))
|
||||
{
|
||||
if (st.isCond(5) && st.dropMultipleItems(LEADER_DROPLIST))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GOBLIN_BRIGAND_LIEUTENANT:
|
||||
if ((st.getInt("cond") == 5) && st.dropMultipleItems(LIEUTENANT_DROPLIST))
|
||||
{
|
||||
if (st.isCond(5) && st.dropMultipleItems(LIEUTENANT_DROPLIST))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BLADE_BAT:
|
||||
if ((st.getInt("cond") == 11) && st.dropItems(STAR_DIAMOND, 1, 1, 200000))
|
||||
{
|
||||
if (st.isCond(11) && st.dropItems(STAR_DIAMOND, 1, 1, 200000))
|
||||
{
|
||||
st.takeItems(BAT_DIAGRAM, 1);
|
||||
st.set("cond", "12");
|
||||
st.setCond(12);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -24,23 +24,19 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q151_CureForFeverDisease extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int ELIAS = 30050;
|
||||
private static final int YOHANES = 30032;
|
||||
// Items
|
||||
private static final int POISON_SAC = 703;
|
||||
private static final int FEVER_MEDICINE = 704;
|
||||
|
||||
// NPCs
|
||||
private static final int ELIAS = 30050;
|
||||
private static final int YOHANES = 30032;
|
||||
|
||||
public Q151_CureForFeverDisease()
|
||||
{
|
||||
super(151, "Cure for Fever Disease");
|
||||
|
||||
registerQuestItems(FEVER_MEDICINE, POISON_SAC);
|
||||
|
||||
addStartNpc(ELIAS);
|
||||
addTalkId(ELIAS, YOHANES);
|
||||
|
||||
addKillId(20103, 20106, 20108);
|
||||
}
|
||||
|
||||
@@ -56,9 +52,7 @@ public class Q151_CureForFeverDisease extends Quest
|
||||
|
||||
if (event.equals("30050-03.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -77,14 +71,17 @@ public class Q151_CureForFeverDisease extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 15) ? "30050-01.htm" : "30050-02.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ELIAS:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30050-04.htm";
|
||||
@@ -102,12 +99,13 @@ public class Q151_CureForFeverDisease extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case YOHANES:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30032-01.htm";
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(POISON_SAC, 1);
|
||||
st.giveItems(FEVER_MEDICINE, 1);
|
||||
@@ -117,12 +115,15 @@ public class Q151_CureForFeverDisease extends Quest
|
||||
htmltext = "30032-02.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -131,7 +132,7 @@ public class Q151_CureForFeverDisease extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "1");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 1);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -139,7 +140,7 @@ public class Q151_CureForFeverDisease extends Quest
|
||||
|
||||
if (st.dropItems(POISON_SAC, 1, 1, 200000))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -24,31 +24,25 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q152_ShardsOfGolem extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int HARRIS = 30035;
|
||||
private static final int ALTRAN = 30283;
|
||||
// Monster
|
||||
private static final int STONE_GOLEM = 20016;
|
||||
// Items
|
||||
private static final int HARRIS_RECEIPT_1 = 1008;
|
||||
private static final int HARRIS_RECEIPT_2 = 1009;
|
||||
private static final int GOLEM_SHARD = 1010;
|
||||
private static final int TOOL_BOX = 1011;
|
||||
|
||||
// Reward
|
||||
private static final int WOODEN_BREASTPLATE = 23;
|
||||
|
||||
// NPCs
|
||||
private static final int HARRIS = 30035;
|
||||
private static final int ALTRAN = 30283;
|
||||
|
||||
// Mob
|
||||
private static final int STONE_GOLEM = 20016;
|
||||
|
||||
public Q152_ShardsOfGolem()
|
||||
{
|
||||
super(152, "Shards of Golem");
|
||||
|
||||
registerQuestItems(HARRIS_RECEIPT_1, HARRIS_RECEIPT_2, GOLEM_SHARD, TOOL_BOX);
|
||||
|
||||
addStartNpc(HARRIS);
|
||||
addTalkId(HARRIS, ALTRAN);
|
||||
|
||||
addKillId(STONE_GOLEM);
|
||||
}
|
||||
|
||||
@@ -64,14 +58,12 @@ public class Q152_ShardsOfGolem extends Quest
|
||||
|
||||
if (event.equals("30035-02.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(HARRIS_RECEIPT_1, 1);
|
||||
}
|
||||
else if (event.equals("30283-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HARRIS_RECEIPT_1, 1);
|
||||
st.giveItems(HARRIS_RECEIPT_2, 1);
|
||||
@@ -93,14 +85,17 @@ public class Q152_ShardsOfGolem extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 10) ? "30035-01a.htm" : "30035-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case HARRIS:
|
||||
{
|
||||
if (cond < 4)
|
||||
{
|
||||
htmltext = "30035-03.htm";
|
||||
@@ -116,8 +111,9 @@ public class Q152_ShardsOfGolem extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ALTRAN:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30283-01.htm";
|
||||
@@ -129,7 +125,7 @@ public class Q152_ShardsOfGolem extends Quest
|
||||
else if (cond == 3)
|
||||
{
|
||||
htmltext = "30283-04.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GOLEM_SHARD, -1);
|
||||
st.giveItems(TOOL_BOX, 1);
|
||||
@@ -139,12 +135,15 @@ public class Q152_ShardsOfGolem extends Quest
|
||||
htmltext = "30283-05.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -153,7 +152,7 @@ public class Q152_ShardsOfGolem extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "2");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 2);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -161,7 +160,7 @@ public class Q152_ShardsOfGolem extends Quest
|
||||
|
||||
if (st.dropItems(GOLEM_SHARD, 1, 5, 300000))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -29,7 +29,6 @@ public class Q153_DeliverGoods extends Quest
|
||||
private static final int SILVIA = 30003;
|
||||
private static final int ARNOLD = 30041;
|
||||
private static final int RANT = 30054;
|
||||
|
||||
// Items
|
||||
private static final int DELIVERY_LIST = 1012;
|
||||
private static final int HEAVY_WOOD_BOX = 1013;
|
||||
@@ -38,7 +37,6 @@ public class Q153_DeliverGoods extends Quest
|
||||
private static final int JACKSON_RECEIPT = 1016;
|
||||
private static final int SILVIA_RECEIPT = 1017;
|
||||
private static final int RANT_RECEIPT = 1018;
|
||||
|
||||
// Rewards
|
||||
private static final int SOULSHOT_NO_GRADE = 1835;
|
||||
private static final int RING_OF_KNOWLEDGE = 875;
|
||||
@@ -46,9 +44,7 @@ public class Q153_DeliverGoods extends Quest
|
||||
public Q153_DeliverGoods()
|
||||
{
|
||||
super(153, "Deliver Goods");
|
||||
|
||||
registerQuestItems(DELIVERY_LIST, HEAVY_WOOD_BOX, CLOTH_BUNDLE, CLAY_POT, JACKSON_RECEIPT, SILVIA_RECEIPT, RANT_RECEIPT);
|
||||
|
||||
addStartNpc(ARNOLD);
|
||||
addTalkId(JACKSON, SILVIA, ARNOLD, RANT);
|
||||
}
|
||||
@@ -65,9 +61,7 @@ public class Q153_DeliverGoods extends Quest
|
||||
|
||||
if (event.equals("30041-02.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(DELIVERY_LIST, 1);
|
||||
st.giveItems(CLAY_POT, 1);
|
||||
st.giveItems(CLOTH_BUNDLE, 1);
|
||||
@@ -90,18 +84,21 @@ public class Q153_DeliverGoods extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 2) ? "30041-00.htm" : "30041-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ARNOLD:
|
||||
if (st.getInt("cond") == 1)
|
||||
{
|
||||
if (st.isCond(1))
|
||||
{
|
||||
htmltext = "30041-03.htm";
|
||||
}
|
||||
else if (st.getInt("cond") == 2)
|
||||
else if (st.isCond(2))
|
||||
{
|
||||
htmltext = "30041-04.htm";
|
||||
st.takeItems(DELIVERY_LIST, 1);
|
||||
@@ -115,8 +112,9 @@ public class Q153_DeliverGoods extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case JACKSON:
|
||||
{
|
||||
if (st.hasQuestItems(HEAVY_WOOD_BOX))
|
||||
{
|
||||
htmltext = "30002-01.htm";
|
||||
@@ -124,7 +122,7 @@ public class Q153_DeliverGoods extends Quest
|
||||
st.giveItems(JACKSON_RECEIPT, 1);
|
||||
if (st.hasQuestItems(SILVIA_RECEIPT, RANT_RECEIPT))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -137,8 +135,9 @@ public class Q153_DeliverGoods extends Quest
|
||||
htmltext = "30002-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SILVIA:
|
||||
{
|
||||
if (st.hasQuestItems(CLOTH_BUNDLE))
|
||||
{
|
||||
htmltext = "30003-01.htm";
|
||||
@@ -147,7 +146,7 @@ public class Q153_DeliverGoods extends Quest
|
||||
st.giveItems(SOULSHOT_NO_GRADE, 3);
|
||||
if (st.hasQuestItems(JACKSON_RECEIPT, RANT_RECEIPT))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -160,8 +159,9 @@ public class Q153_DeliverGoods extends Quest
|
||||
htmltext = "30003-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case RANT:
|
||||
{
|
||||
if (st.hasQuestItems(CLAY_POT))
|
||||
{
|
||||
htmltext = "30054-01.htm";
|
||||
@@ -169,7 +169,7 @@ public class Q153_DeliverGoods extends Quest
|
||||
st.giveItems(RANT_RECEIPT, 1);
|
||||
if (st.hasQuestItems(JACKSON_RECEIPT, SILVIA_RECEIPT))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -182,12 +182,15 @@ public class Q153_DeliverGoods extends Quest
|
||||
htmltext = "30054-02.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -28,24 +28,19 @@ public class Q154_SacrificeToTheSea extends Quest
|
||||
private static final int ROCKSWELL = 30312;
|
||||
private static final int CRISTEL = 30051;
|
||||
private static final int ROLFE = 30055;
|
||||
|
||||
// Items
|
||||
private static final int FOX_FUR = 1032;
|
||||
private static final int FOX_FUR_YARN = 1033;
|
||||
private static final int MAIDEN_DOLL = 1034;
|
||||
|
||||
// Reward
|
||||
private static final int EARING = 113;
|
||||
|
||||
public Q154_SacrificeToTheSea()
|
||||
{
|
||||
super(154, "Sacrifice to the Sea");
|
||||
|
||||
registerQuestItems(FOX_FUR, FOX_FUR_YARN, MAIDEN_DOLL);
|
||||
|
||||
addStartNpc(ROCKSWELL);
|
||||
addTalkId(ROCKSWELL, CRISTEL, ROLFE);
|
||||
|
||||
addKillId(20481, 20544, 20545); // Following Keltirs can be found near Talking Island.
|
||||
}
|
||||
|
||||
@@ -61,9 +56,7 @@ public class Q154_SacrificeToTheSea extends Quest
|
||||
|
||||
if (event.equals("30312-04.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -82,14 +75,17 @@ public class Q154_SacrificeToTheSea extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 2) ? "30312-02.htm" : "30312-03.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ROCKSWELL:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30312-05.htm";
|
||||
@@ -112,8 +108,9 @@ public class Q154_SacrificeToTheSea extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case CRISTEL:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = (st.hasQuestItems(FOX_FUR)) ? "30051-01.htm" : "30051-01a.htm";
|
||||
@@ -121,7 +118,7 @@ public class Q154_SacrificeToTheSea extends Quest
|
||||
else if (cond == 2)
|
||||
{
|
||||
htmltext = "30051-02.htm";
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(FOX_FUR, -1);
|
||||
st.giveItems(FOX_FUR_YARN, 1);
|
||||
@@ -135,8 +132,9 @@ public class Q154_SacrificeToTheSea extends Quest
|
||||
htmltext = "30051-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ROLFE:
|
||||
{
|
||||
if (cond < 3)
|
||||
{
|
||||
htmltext = "30055-03.htm";
|
||||
@@ -144,7 +142,7 @@ public class Q154_SacrificeToTheSea extends Quest
|
||||
else if (cond == 3)
|
||||
{
|
||||
htmltext = "30055-01.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(FOX_FUR_YARN, 1);
|
||||
st.giveItems(MAIDEN_DOLL, 1);
|
||||
@@ -154,12 +152,15 @@ public class Q154_SacrificeToTheSea extends Quest
|
||||
htmltext = "30055-02.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -168,7 +169,7 @@ public class Q154_SacrificeToTheSea extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "1");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 1);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -176,7 +177,7 @@ public class Q154_SacrificeToTheSea extends Quest
|
||||
|
||||
if (st.dropItems(FOX_FUR, 1, 10, 400000))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -24,20 +24,17 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q155_FindSirWindawood extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int ABELLOS = 30042;
|
||||
private static final int WINDAWOOD = 30311;
|
||||
// Items
|
||||
private static final int OFFICIAL_LETTER = 1019;
|
||||
private static final int HASTE_POTION = 734;
|
||||
|
||||
// NPCs
|
||||
private static final int ABELLOS = 30042;
|
||||
private static final int WINDAWOOD = 30311;
|
||||
|
||||
public Q155_FindSirWindawood()
|
||||
{
|
||||
super(155, "Find Sir Windawood");
|
||||
|
||||
registerQuestItems(OFFICIAL_LETTER);
|
||||
|
||||
addStartNpc(ABELLOS);
|
||||
addTalkId(WINDAWOOD, ABELLOS);
|
||||
}
|
||||
@@ -54,9 +51,7 @@ public class Q155_FindSirWindawood extends Quest
|
||||
|
||||
if (event.equals("30042-02.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(OFFICIAL_LETTER, 1);
|
||||
}
|
||||
|
||||
@@ -76,17 +71,21 @@ public class Q155_FindSirWindawood extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 3) ? "30042-01a.htm" : "30042-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ABELLOS:
|
||||
{
|
||||
htmltext = "30042-03.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case WINDAWOOD:
|
||||
{
|
||||
if (st.hasQuestItems(OFFICIAL_LETTER))
|
||||
{
|
||||
htmltext = "30311-01.htm";
|
||||
@@ -96,12 +95,15 @@ public class Q155_FindSirWindawood extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -24,20 +24,17 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q156_MillenniumLove extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int LILITH = 30368;
|
||||
private static final int BAENEDES = 30369;
|
||||
// Items
|
||||
private static final int LILITH_LETTER = 1022;
|
||||
private static final int THEON_DIARY = 1023;
|
||||
|
||||
// NPCs
|
||||
private static final int LILITH = 30368;
|
||||
private static final int BAENEDES = 30369;
|
||||
|
||||
public Q156_MillenniumLove()
|
||||
{
|
||||
super(156, "Millennium Love");
|
||||
|
||||
registerQuestItems(LILITH_LETTER, THEON_DIARY);
|
||||
|
||||
addStartNpc(LILITH);
|
||||
addTalkId(LILITH, BAENEDES);
|
||||
}
|
||||
@@ -52,26 +49,30 @@ public class Q156_MillenniumLove extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30368-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(LILITH_LETTER, 1);
|
||||
}
|
||||
else if (event.equals("30369-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LILITH_LETTER, 1);
|
||||
st.giveItems(THEON_DIARY, 1);
|
||||
}
|
||||
else if (event.equals("30369-03.htm"))
|
||||
{
|
||||
st.takeItems(LILITH_LETTER, 1);
|
||||
st.rewardExpAndSp(3000, 0);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30368-04.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
st.giveItems(LILITH_LETTER, 1);
|
||||
break;
|
||||
}
|
||||
case "30369-02.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LILITH_LETTER, 1);
|
||||
st.giveItems(THEON_DIARY, 1);
|
||||
break;
|
||||
}
|
||||
case "30369-03.htm":
|
||||
{
|
||||
st.takeItems(LILITH_LETTER, 1);
|
||||
st.rewardExpAndSp(3000, 0);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -90,13 +91,16 @@ public class Q156_MillenniumLove extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 15) ? "30368-00.htm" : "30368-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case LILITH:
|
||||
{
|
||||
if (st.hasQuestItems(LILITH_LETTER))
|
||||
{
|
||||
htmltext = "30368-05.htm";
|
||||
@@ -111,8 +115,9 @@ public class Q156_MillenniumLove extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BAENEDES:
|
||||
{
|
||||
if (st.hasQuestItems(LILITH_LETTER))
|
||||
{
|
||||
htmltext = "30369-01.htm";
|
||||
@@ -122,12 +127,15 @@ public class Q156_MillenniumLove extends Quest
|
||||
htmltext = "30369-04.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -26,19 +26,15 @@ public class Q157_RecoverSmuggledGoods extends Quest
|
||||
{
|
||||
// Item
|
||||
private static final int ADAMANTITE_ORE = 1024;
|
||||
|
||||
// Reward
|
||||
private static final int BUCKLER = 20;
|
||||
|
||||
public Q157_RecoverSmuggledGoods()
|
||||
{
|
||||
super(157, "Recover Smuggled Goods");
|
||||
|
||||
registerQuestItems(ADAMANTITE_ORE);
|
||||
|
||||
addStartNpc(30005); // Wilford
|
||||
addTalkId(30005);
|
||||
|
||||
addKillId(20121); // Toad
|
||||
}
|
||||
|
||||
@@ -54,9 +50,7 @@ public class Q157_RecoverSmuggledGoods extends Quest
|
||||
|
||||
if (event.equals("30005-05.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -75,11 +69,13 @@ public class Q157_RecoverSmuggledGoods extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 5) ? "30005-02.htm" : "30005-03.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30005-06.htm";
|
||||
@@ -93,10 +89,12 @@ public class Q157_RecoverSmuggledGoods extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
@@ -104,7 +102,7 @@ public class Q157_RecoverSmuggledGoods extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "1");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 1);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -112,7 +110,7 @@ public class Q157_RecoverSmuggledGoods extends Quest
|
||||
|
||||
if (st.dropItems(ADAMANTITE_ORE, 1, 20, 400000))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -26,19 +26,15 @@ public class Q158_SeedOfEvil extends Quest
|
||||
{
|
||||
// Item
|
||||
private static final int CLAY_TABLET = 1025;
|
||||
|
||||
// Reward
|
||||
private static final int ENCHANT_ARMOR_D = 956;
|
||||
|
||||
public Q158_SeedOfEvil()
|
||||
{
|
||||
super(158, "Seed of Evil");
|
||||
|
||||
registerQuestItems(CLAY_TABLET);
|
||||
|
||||
addStartNpc(30031); // Biotin
|
||||
addTalkId(30031);
|
||||
|
||||
addKillId(27016); // Nerkas
|
||||
}
|
||||
|
||||
@@ -54,9 +50,7 @@ public class Q158_SeedOfEvil extends Quest
|
||||
|
||||
if (event.equals("30031-04.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -75,10 +69,12 @@ public class Q158_SeedOfEvil extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 21) ? "30031-02.htm" : "30031-03.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
if (!st.hasQuestItems(CLAY_TABLET))
|
||||
{
|
||||
htmltext = "30031-05.htm";
|
||||
@@ -92,10 +88,12 @@ public class Q158_SeedOfEvil extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -104,13 +102,13 @@ public class Q158_SeedOfEvil extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "1");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 1);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(CLAY_TABLET, 1);
|
||||
|
||||
|
||||
@@ -33,12 +33,9 @@ public class Q159_ProtectTheWaterSource extends Quest
|
||||
public Q159_ProtectTheWaterSource()
|
||||
{
|
||||
super(159, "Protect the Water Source");
|
||||
|
||||
registerQuestItems(PLAGUE_DUST, HYACINTH_CHARM_1, HYACINTH_CHARM_2);
|
||||
|
||||
addStartNpc(30154); // Asterios
|
||||
addTalkId(30154);
|
||||
|
||||
addKillId(27017); // Plague Zombie
|
||||
}
|
||||
|
||||
@@ -54,9 +51,7 @@ public class Q159_ProtectTheWaterSource extends Quest
|
||||
|
||||
if (event.equals("30154-04.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(HYACINTH_CHARM_1, 1);
|
||||
}
|
||||
|
||||
@@ -76,6 +71,7 @@ public class Q159_ProtectTheWaterSource extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.ELF)
|
||||
{
|
||||
htmltext = "30154-00.htm";
|
||||
@@ -89,9 +85,10 @@ public class Q159_ProtectTheWaterSource extends Quest
|
||||
htmltext = "30154-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30154-05.htm";
|
||||
@@ -99,7 +96,7 @@ public class Q159_ProtectTheWaterSource extends Quest
|
||||
else if (cond == 2)
|
||||
{
|
||||
htmltext = "30154-06.htm";
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(PLAGUE_DUST, -1);
|
||||
st.takeItems(HYACINTH_CHARM_1, 1);
|
||||
@@ -119,10 +116,12 @@ public class Q159_ProtectTheWaterSource extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -137,13 +136,13 @@ public class Q159_ProtectTheWaterSource extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
if ((st.getInt("cond") == 1) && st.dropItems(PLAGUE_DUST, 1, 1, 400000))
|
||||
if (st.isCond(1) && st.dropItems(PLAGUE_DUST, 1, 1, 400000))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
else if ((st.getInt("cond") == 3) && st.dropItems(PLAGUE_DUST, 1, 5, 400000))
|
||||
else if (st.isCond(2) && st.dropItems(PLAGUE_DUST, 1, 5, 400000))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -25,27 +25,23 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q160_NerupasRequest extends Quest
|
||||
{
|
||||
// Items
|
||||
private static final int SILVERY_SPIDERSILK = 1026;
|
||||
private static final int UNOREN_RECEIPT = 1027;
|
||||
private static final int CREAMEES_TICKET = 1028;
|
||||
private static final int NIGHTSHADE_LEAF = 1029;
|
||||
|
||||
// Reward
|
||||
private static final int LESSER_HEALING_POTION = 1060;
|
||||
|
||||
// NPCs
|
||||
private static final int NERUPA = 30370;
|
||||
private static final int UNOREN = 30147;
|
||||
private static final int CREAMEES = 30149;
|
||||
private static final int JULIA = 30152;
|
||||
// Items
|
||||
private static final int SILVERY_SPIDERSILK = 1026;
|
||||
private static final int UNOREN_RECEIPT = 1027;
|
||||
private static final int CREAMEES_TICKET = 1028;
|
||||
private static final int NIGHTSHADE_LEAF = 1029;
|
||||
// Reward
|
||||
private static final int LESSER_HEALING_POTION = 1060;
|
||||
|
||||
public Q160_NerupasRequest()
|
||||
{
|
||||
super(160, "Nerupa's Request");
|
||||
|
||||
registerQuestItems(SILVERY_SPIDERSILK, UNOREN_RECEIPT, CREAMEES_TICKET, NIGHTSHADE_LEAF);
|
||||
|
||||
addStartNpc(NERUPA);
|
||||
addTalkId(NERUPA, UNOREN, CREAMEES, JULIA);
|
||||
}
|
||||
@@ -62,9 +58,7 @@ public class Q160_NerupasRequest extends Quest
|
||||
|
||||
if (event.equals("30370-04.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(SILVERY_SPIDERSILK, 1);
|
||||
}
|
||||
|
||||
@@ -84,6 +78,7 @@ public class Q160_NerupasRequest extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.ELF)
|
||||
{
|
||||
htmltext = "30370-00.htm";
|
||||
@@ -97,12 +92,14 @@ public class Q160_NerupasRequest extends Quest
|
||||
htmltext = "30370-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case NERUPA:
|
||||
{
|
||||
if (cond < 4)
|
||||
{
|
||||
htmltext = "30370-05.htm";
|
||||
@@ -117,12 +114,13 @@ public class Q160_NerupasRequest extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case UNOREN:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30147-01.htm";
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SILVERY_SPIDERSILK, 1);
|
||||
st.giveItems(UNOREN_RECEIPT, 1);
|
||||
@@ -136,12 +134,13 @@ public class Q160_NerupasRequest extends Quest
|
||||
htmltext = "30147-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case CREAMEES:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30149-01.htm";
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(UNOREN_RECEIPT, 1);
|
||||
st.giveItems(CREAMEES_TICKET, 1);
|
||||
@@ -155,12 +154,13 @@ public class Q160_NerupasRequest extends Quest
|
||||
htmltext = "30149-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case JULIA:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "30152-01.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CREAMEES_TICKET, 1);
|
||||
st.giveItems(NIGHTSHADE_LEAF, 1);
|
||||
@@ -170,12 +170,15 @@ public class Q160_NerupasRequest extends Quest
|
||||
htmltext = "30152-02.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -28,7 +28,6 @@ public class Q161_FruitOfTheMotherTree extends Quest
|
||||
// NPCs
|
||||
private static final int ANDELLIA = 30362;
|
||||
private static final int THALIA = 30371;
|
||||
|
||||
// Items
|
||||
private static final int ANDELLIA_LETTER = 1036;
|
||||
private static final int MOTHERTREE_FRUIT = 1037;
|
||||
@@ -36,9 +35,7 @@ public class Q161_FruitOfTheMotherTree extends Quest
|
||||
public Q161_FruitOfTheMotherTree()
|
||||
{
|
||||
super(161, "Fruit of the Mothertree");
|
||||
|
||||
registerQuestItems(ANDELLIA_LETTER, MOTHERTREE_FRUIT);
|
||||
|
||||
addStartNpc(ANDELLIA);
|
||||
addTalkId(ANDELLIA, THALIA);
|
||||
}
|
||||
@@ -55,9 +52,7 @@ public class Q161_FruitOfTheMotherTree extends Quest
|
||||
|
||||
if (event.equals("30362-04.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(ANDELLIA_LETTER, 1);
|
||||
}
|
||||
|
||||
@@ -77,6 +72,7 @@ public class Q161_FruitOfTheMotherTree extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.ELF)
|
||||
{
|
||||
htmltext = "30362-00.htm";
|
||||
@@ -90,12 +86,14 @@ public class Q161_FruitOfTheMotherTree extends Quest
|
||||
htmltext = "30362-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ANDELLIA:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30362-05.htm";
|
||||
@@ -110,12 +108,13 @@ public class Q161_FruitOfTheMotherTree extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case THALIA:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30371-01.htm";
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ANDELLIA_LETTER, 1);
|
||||
st.giveItems(MOTHERTREE_FRUIT, 1);
|
||||
@@ -125,12 +124,15 @@ public class Q161_FruitOfTheMotherTree extends Quest
|
||||
htmltext = "30371-02.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -35,14 +35,11 @@ public class Q162_CurseOfTheUndergroundFortress extends Quest
|
||||
private static final int DUNGEON_SKELETON_ARCHER = 20463;
|
||||
private static final int DUNGEON_SKELETON = 20464;
|
||||
private static final int DREAD_SOLDIER = 20504;
|
||||
|
||||
// Items
|
||||
private static final int BONE_FRAGMENT = 1158;
|
||||
private static final int ELF_SKULL = 1159;
|
||||
|
||||
// Rewards
|
||||
private static final int BONE_SHIELD = 625;
|
||||
|
||||
// Drop chances
|
||||
private static final Map<Integer, Integer> CHANCES = new HashMap<>();
|
||||
static
|
||||
@@ -58,12 +55,9 @@ public class Q162_CurseOfTheUndergroundFortress extends Quest
|
||||
public Q162_CurseOfTheUndergroundFortress()
|
||||
{
|
||||
super(162, "Curse of the Underground Fortress");
|
||||
|
||||
registerQuestItems(BONE_FRAGMENT, ELF_SKULL);
|
||||
|
||||
addStartNpc(30147); // Unoren
|
||||
addTalkId(30147);
|
||||
|
||||
addKillId(SHADE_HORROR, DARK_TERROR, MIST_TERROR, DUNGEON_SKELETON_ARCHER, DUNGEON_SKELETON, DREAD_SOLDIER);
|
||||
}
|
||||
|
||||
@@ -79,9 +73,7 @@ public class Q162_CurseOfTheUndergroundFortress extends Quest
|
||||
|
||||
if (event.equals("30147-04.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -100,6 +92,7 @@ public class Q162_CurseOfTheUndergroundFortress extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() == Race.DARK_ELF)
|
||||
{
|
||||
htmltext = "30147-00.htm";
|
||||
@@ -113,9 +106,10 @@ public class Q162_CurseOfTheUndergroundFortress extends Quest
|
||||
htmltext = "30147-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30147-05.htm";
|
||||
@@ -131,10 +125,12 @@ public class Q162_CurseOfTheUndergroundFortress extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -143,33 +139,35 @@ public class Q162_CurseOfTheUndergroundFortress extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "1");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 1);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
final int npcId = npc.getNpcId();
|
||||
|
||||
switch (npcId)
|
||||
{
|
||||
case DUNGEON_SKELETON:
|
||||
case DUNGEON_SKELETON_ARCHER:
|
||||
case DREAD_SOLDIER:
|
||||
{
|
||||
if (st.dropItems(BONE_FRAGMENT, 1, 10, CHANCES.get(npcId)) && (st.getQuestItemsCount(ELF_SKULL) >= 3))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SHADE_HORROR:
|
||||
case DARK_TERROR:
|
||||
case MIST_TERROR:
|
||||
{
|
||||
if (st.dropItems(ELF_SKULL, 1, 3, CHANCES.get(npcId)) && (st.getQuestItemsCount(BONE_FRAGMENT) >= 10))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -27,7 +27,6 @@ public class Q163_LegacyOfThePoet extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int STARDEN = 30220;
|
||||
|
||||
// Items
|
||||
private static final int[] RUMIELS_POEMS =
|
||||
{
|
||||
@@ -36,45 +35,23 @@ public class Q163_LegacyOfThePoet extends Quest
|
||||
1040,
|
||||
1041
|
||||
};
|
||||
|
||||
// Droplist
|
||||
private static final int[][] DROPLIST =
|
||||
{
|
||||
{
|
||||
RUMIELS_POEMS[0],
|
||||
1,
|
||||
1,
|
||||
100000
|
||||
},
|
||||
{
|
||||
RUMIELS_POEMS[1],
|
||||
1,
|
||||
1,
|
||||
200000
|
||||
},
|
||||
{
|
||||
RUMIELS_POEMS[2],
|
||||
1,
|
||||
1,
|
||||
200000
|
||||
},
|
||||
{
|
||||
RUMIELS_POEMS[3],
|
||||
1,
|
||||
1,
|
||||
400000
|
||||
}
|
||||
// @formatter:off
|
||||
{RUMIELS_POEMS[0], 1, 1, 100000},
|
||||
{RUMIELS_POEMS[1], 1, 1, 200000},
|
||||
{RUMIELS_POEMS[2], 1, 1, 200000},
|
||||
{RUMIELS_POEMS[3], 1, 1, 400000}
|
||||
// @formatter:on
|
||||
};
|
||||
|
||||
public Q163_LegacyOfThePoet()
|
||||
{
|
||||
super(163, "Legacy of the Poet");
|
||||
|
||||
registerQuestItems(RUMIELS_POEMS);
|
||||
|
||||
addStartNpc(STARDEN);
|
||||
addTalkId(STARDEN);
|
||||
|
||||
addKillId(20372, 20373);
|
||||
}
|
||||
|
||||
@@ -90,9 +67,7 @@ public class Q163_LegacyOfThePoet extends Quest
|
||||
|
||||
if (event.equals("30220-07.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -111,6 +86,7 @@ public class Q163_LegacyOfThePoet extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() == Race.DARK_ELF)
|
||||
{
|
||||
htmltext = "30220-00.htm";
|
||||
@@ -124,17 +100,16 @@ public class Q163_LegacyOfThePoet extends Quest
|
||||
htmltext = "30220-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
if (st.getInt("cond") == 2)
|
||||
{
|
||||
if (st.isCond(2))
|
||||
{
|
||||
htmltext = "30220-09.htm";
|
||||
|
||||
for (int poem : RUMIELS_POEMS)
|
||||
{
|
||||
st.takeItems(poem, -1);
|
||||
}
|
||||
|
||||
st.rewardItems(57, 13890);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
@@ -144,10 +119,12 @@ public class Q163_LegacyOfThePoet extends Quest
|
||||
htmltext = "30220-08.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -156,7 +133,7 @@ public class Q163_LegacyOfThePoet extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "1");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 1);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -164,7 +141,7 @@ public class Q163_LegacyOfThePoet extends Quest
|
||||
|
||||
if (st.dropMultipleItems(DROPLIST))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -31,12 +31,9 @@ public class Q164_BloodFiend extends Quest
|
||||
public Q164_BloodFiend()
|
||||
{
|
||||
super(164, "Blood Fiend");
|
||||
|
||||
registerQuestItems(KIRUNAK_SKULL);
|
||||
|
||||
addStartNpc(30149);
|
||||
addTalkId(30149);
|
||||
|
||||
addKillId(27021);
|
||||
}
|
||||
|
||||
@@ -52,9 +49,7 @@ public class Q164_BloodFiend extends Quest
|
||||
|
||||
if (event.equals("30149-04.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -73,6 +68,7 @@ public class Q164_BloodFiend extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() == Race.DARK_ELF)
|
||||
{
|
||||
htmltext = "30149-00.htm";
|
||||
@@ -86,8 +82,9 @@ public class Q164_BloodFiend extends Quest
|
||||
htmltext = "30149-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
if (st.hasQuestItems(KIRUNAK_SKULL))
|
||||
{
|
||||
htmltext = "30149-06.htm";
|
||||
@@ -101,10 +98,12 @@ public class Q164_BloodFiend extends Quest
|
||||
htmltext = "30149-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -113,13 +112,13 @@ public class Q164_BloodFiend extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "1");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 1);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(KIRUNAK_SKULL, 1);
|
||||
|
||||
|
||||
@@ -33,11 +33,9 @@ public class Q165_ShilensHunt extends Quest
|
||||
private static final int YOUNG_BROWN_KELTIR = 20529;
|
||||
private static final int BROWN_KELTIR = 20532;
|
||||
private static final int ELDER_BROWN_KELTIR = 20536;
|
||||
|
||||
// Items
|
||||
private static final int DARK_BEZOAR = 1160;
|
||||
private static final int LESSER_HEALING_POTION = 1060;
|
||||
|
||||
// Drop chances
|
||||
private static final Map<Integer, Integer> CHANCES = new HashMap<>();
|
||||
static
|
||||
@@ -51,12 +49,9 @@ public class Q165_ShilensHunt extends Quest
|
||||
public Q165_ShilensHunt()
|
||||
{
|
||||
super(165, "Shilen's Hunt");
|
||||
|
||||
registerQuestItems(DARK_BEZOAR);
|
||||
|
||||
addStartNpc(30348); // Nelsya
|
||||
addTalkId(30348);
|
||||
|
||||
addKillId(ASHEN_WOLF, YOUNG_BROWN_KELTIR, BROWN_KELTIR, ELDER_BROWN_KELTIR);
|
||||
}
|
||||
|
||||
@@ -72,9 +67,7 @@ public class Q165_ShilensHunt extends Quest
|
||||
|
||||
if (event.equals("30348-03.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -93,6 +86,7 @@ public class Q165_ShilensHunt extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.DARK_ELF)
|
||||
{
|
||||
htmltext = "30348-00.htm";
|
||||
@@ -106,8 +100,9 @@ public class Q165_ShilensHunt extends Quest
|
||||
htmltext = "30348-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
if (st.getQuestItemsCount(DARK_BEZOAR) >= 13)
|
||||
{
|
||||
htmltext = "30348-05.htm";
|
||||
@@ -122,10 +117,12 @@ public class Q165_ShilensHunt extends Quest
|
||||
htmltext = "30348-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -134,7 +131,7 @@ public class Q165_ShilensHunt extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "1");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 1);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -142,7 +139,7 @@ public class Q165_ShilensHunt extends Quest
|
||||
|
||||
if (st.dropItems(DARK_BEZOAR, 1, 13, CHANCES.get(npc.getNpcId())))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -30,7 +30,6 @@ public class Q166_MassOfDarkness extends Quest
|
||||
private static final int IRIA = 30135;
|
||||
private static final int DORANKUS = 30139;
|
||||
private static final int TRUDY = 30143;
|
||||
|
||||
// Items
|
||||
private static final int UNDRIAS_LETTER = 1088;
|
||||
private static final int CEREMONIAL_DAGGER = 1089;
|
||||
@@ -40,9 +39,7 @@ public class Q166_MassOfDarkness extends Quest
|
||||
public Q166_MassOfDarkness()
|
||||
{
|
||||
super(166, "Mass of Darkness");
|
||||
|
||||
registerQuestItems(UNDRIAS_LETTER, CEREMONIAL_DAGGER, DREVIANT_WINE, GARMIEL_SCRIPTURE);
|
||||
|
||||
addStartNpc(UNDRIAS);
|
||||
addTalkId(UNDRIAS, IRIA, DORANKUS, TRUDY);
|
||||
}
|
||||
@@ -59,9 +56,7 @@ public class Q166_MassOfDarkness extends Quest
|
||||
|
||||
if (event.equals("30130-04.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(UNDRIAS_LETTER, 1);
|
||||
}
|
||||
|
||||
@@ -81,6 +76,7 @@ public class Q166_MassOfDarkness extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.DARK_ELF)
|
||||
{
|
||||
htmltext = "30130-00.htm";
|
||||
@@ -94,12 +90,14 @@ public class Q166_MassOfDarkness extends Quest
|
||||
htmltext = "30130-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case UNDRIAS:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30130-05.htm";
|
||||
@@ -117,15 +115,16 @@ public class Q166_MassOfDarkness extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case IRIA:
|
||||
{
|
||||
if ((cond == 1) && !st.hasQuestItems(CEREMONIAL_DAGGER))
|
||||
{
|
||||
htmltext = "30135-01.htm";
|
||||
st.giveItems(CEREMONIAL_DAGGER, 1);
|
||||
if (st.hasQuestItems(DREVIANT_WINE, GARMIEL_SCRIPTURE))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -138,15 +137,16 @@ public class Q166_MassOfDarkness extends Quest
|
||||
htmltext = "30135-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DORANKUS:
|
||||
{
|
||||
if ((cond == 1) && !st.hasQuestItems(DREVIANT_WINE))
|
||||
{
|
||||
htmltext = "30139-01.htm";
|
||||
st.giveItems(DREVIANT_WINE, 1);
|
||||
if (st.hasQuestItems(CEREMONIAL_DAGGER, GARMIEL_SCRIPTURE))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -159,15 +159,16 @@ public class Q166_MassOfDarkness extends Quest
|
||||
htmltext = "30139-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TRUDY:
|
||||
{
|
||||
if ((cond == 1) && !st.hasQuestItems(GARMIEL_SCRIPTURE))
|
||||
{
|
||||
htmltext = "30143-01.htm";
|
||||
st.giveItems(GARMIEL_SCRIPTURE, 1);
|
||||
if (st.hasQuestItems(CEREMONIAL_DAGGER, DREVIANT_WINE))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -180,12 +181,15 @@ public class Q166_MassOfDarkness extends Quest
|
||||
htmltext = "30143-02.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -24,21 +24,18 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q167_DwarvenKinship extends Quest
|
||||
{
|
||||
// Items
|
||||
private static final int CARLON_LETTER = 1076;
|
||||
private static final int NORMAN_LETTER = 1106;
|
||||
|
||||
// NPCs
|
||||
private static final int CARLON = 30350;
|
||||
private static final int NORMAN = 30210;
|
||||
private static final int HAPROCK = 30255;
|
||||
// Items
|
||||
private static final int CARLON_LETTER = 1076;
|
||||
private static final int NORMAN_LETTER = 1106;
|
||||
|
||||
public Q167_DwarvenKinship()
|
||||
{
|
||||
super(167, "Dwarven Kinship");
|
||||
|
||||
registerQuestItems(CARLON_LETTER, NORMAN_LETTER);
|
||||
|
||||
addStartNpc(CARLON);
|
||||
addTalkId(CARLON, HAPROCK, NORMAN);
|
||||
}
|
||||
@@ -53,33 +50,38 @@ public class Q167_DwarvenKinship extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30350-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(CARLON_LETTER, 1);
|
||||
}
|
||||
else if (event.equals("30255-03.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.takeItems(CARLON_LETTER, 1);
|
||||
st.giveItems(NORMAN_LETTER, 1);
|
||||
st.rewardItems(57, 2000);
|
||||
}
|
||||
else if (event.equals("30255-04.htm"))
|
||||
{
|
||||
st.takeItems(CARLON_LETTER, 1);
|
||||
st.rewardItems(57, 3000);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
else if (event.equals("30210-02.htm"))
|
||||
{
|
||||
st.takeItems(NORMAN_LETTER, 1);
|
||||
st.rewardItems(57, 20000);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
case "30350-04.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
st.giveItems(CARLON_LETTER, 1);
|
||||
break;
|
||||
}
|
||||
case "30255-03.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.takeItems(CARLON_LETTER, 1);
|
||||
st.giveItems(NORMAN_LETTER, 1);
|
||||
st.rewardItems(57, 2000);
|
||||
break;
|
||||
}
|
||||
case "30255-04.htm":
|
||||
{
|
||||
st.takeItems(CARLON_LETTER, 1);
|
||||
st.rewardItems(57, 3000);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
case "30210-02.htm":
|
||||
{
|
||||
st.takeItems(NORMAN_LETTER, 1);
|
||||
st.rewardItems(57, 20000);
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -98,21 +100,25 @@ public class Q167_DwarvenKinship extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 15) ? "30350-02.htm" : "30350-03.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case CARLON:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30350-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case HAPROCK:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30255-01.htm";
|
||||
@@ -122,19 +128,23 @@ public class Q167_DwarvenKinship extends Quest
|
||||
htmltext = "30255-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case NORMAN:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30210-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -25,6 +25,11 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q168_DeliverSupplies extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int JENNA = 30349;
|
||||
private static final int ROSELYN = 30355;
|
||||
private static final int KRISTIN = 30357;
|
||||
private static final int HARANT = 30360;
|
||||
// Items
|
||||
private static final int JENNA_LETTER = 1153;
|
||||
private static final int SENTRY_BLADE_1 = 1154;
|
||||
@@ -32,18 +37,10 @@ public class Q168_DeliverSupplies extends Quest
|
||||
private static final int SENTRY_BLADE_3 = 1156;
|
||||
private static final int OLD_BRONZE_SWORD = 1157;
|
||||
|
||||
// NPCs
|
||||
private static final int JENNA = 30349;
|
||||
private static final int ROSELYN = 30355;
|
||||
private static final int KRISTIN = 30357;
|
||||
private static final int HARANT = 30360;
|
||||
|
||||
public Q168_DeliverSupplies()
|
||||
{
|
||||
super(168, "Deliver Supplies");
|
||||
|
||||
registerQuestItems(JENNA_LETTER, SENTRY_BLADE_1, SENTRY_BLADE_2, SENTRY_BLADE_3, OLD_BRONZE_SWORD);
|
||||
|
||||
addStartNpc(JENNA);
|
||||
addTalkId(JENNA, ROSELYN, KRISTIN, HARANT);
|
||||
}
|
||||
@@ -60,9 +57,7 @@ public class Q168_DeliverSupplies extends Quest
|
||||
|
||||
if (event.equals("30349-03.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
st.giveItems(JENNA_LETTER, 1);
|
||||
}
|
||||
|
||||
@@ -82,6 +77,7 @@ public class Q168_DeliverSupplies extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.DARK_ELF)
|
||||
{
|
||||
htmltext = "30349-00.htm";
|
||||
@@ -95,12 +91,14 @@ public class Q168_DeliverSupplies extends Quest
|
||||
htmltext = "30349-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case JENNA:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30349-04.htm";
|
||||
@@ -108,7 +106,7 @@ public class Q168_DeliverSupplies extends Quest
|
||||
else if (cond == 2)
|
||||
{
|
||||
htmltext = "30349-05.htm";
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SENTRY_BLADE_1, 1);
|
||||
}
|
||||
@@ -125,12 +123,13 @@ public class Q168_DeliverSupplies extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case HARANT:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30360-01.htm";
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(JENNA_LETTER, 1);
|
||||
st.giveItems(SENTRY_BLADE_1, 1);
|
||||
@@ -142,8 +141,9 @@ public class Q168_DeliverSupplies extends Quest
|
||||
htmltext = "30360-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ROSELYN:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
if (st.hasQuestItems(SENTRY_BLADE_2))
|
||||
@@ -153,7 +153,7 @@ public class Q168_DeliverSupplies extends Quest
|
||||
st.giveItems(OLD_BRONZE_SWORD, 1);
|
||||
if (st.getQuestItemsCount(OLD_BRONZE_SWORD) == 2)
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
}
|
||||
@@ -167,8 +167,9 @@ public class Q168_DeliverSupplies extends Quest
|
||||
htmltext = "30355-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KRISTIN:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
if (st.hasQuestItems(SENTRY_BLADE_3))
|
||||
@@ -178,7 +179,7 @@ public class Q168_DeliverSupplies extends Quest
|
||||
st.giveItems(OLD_BRONZE_SWORD, 1);
|
||||
if (st.getQuestItemsCount(OLD_BRONZE_SWORD) == 2)
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
}
|
||||
@@ -192,12 +193,15 @@ public class Q168_DeliverSupplies extends Quest
|
||||
htmltext = "30357-02.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
|
||||
@@ -33,12 +33,9 @@ public class Q169_OffspringOfNightmares extends Quest
|
||||
public Q169_OffspringOfNightmares()
|
||||
{
|
||||
super(169, "Offspring of Nightmares");
|
||||
|
||||
registerQuestItems(CRACKED_SKULL, PERFECT_SKULL);
|
||||
|
||||
addStartNpc(30145); // Vlasty
|
||||
addTalkId(30145);
|
||||
|
||||
addKillId(20105, 20025);
|
||||
}
|
||||
|
||||
@@ -54,9 +51,7 @@ public class Q169_OffspringOfNightmares extends Quest
|
||||
|
||||
if (event.equals("30145-04.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
else if (event.equals("30145-08.htm"))
|
||||
{
|
||||
@@ -85,6 +80,7 @@ public class Q169_OffspringOfNightmares extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.DARK_ELF)
|
||||
{
|
||||
htmltext = "30145-00.htm";
|
||||
@@ -98,9 +94,10 @@ public class Q169_OffspringOfNightmares extends Quest
|
||||
htmltext = "30145-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
if (cond == 1)
|
||||
{
|
||||
if (st.hasQuestItems(CRACKED_SKULL))
|
||||
@@ -117,10 +114,12 @@ public class Q169_OffspringOfNightmares extends Quest
|
||||
htmltext = "30145-07.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -135,9 +134,9 @@ public class Q169_OffspringOfNightmares extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
if ((st.getInt("cond") == 1) && st.dropItems(PERFECT_SKULL, 1, 1, 200000))
|
||||
if (st.isCond(1) && st.dropItems(PERFECT_SKULL, 1, 1, 200000))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -31,12 +31,9 @@ public class Q170_DangerousSeduction extends Quest
|
||||
public Q170_DangerousSeduction()
|
||||
{
|
||||
super(170, "Dangerous Seduction");
|
||||
|
||||
registerQuestItems(NIGHTMARE_CRYSTAL);
|
||||
|
||||
addStartNpc(30305); // Vellior
|
||||
addTalkId(30305);
|
||||
|
||||
addKillId(27022); // Merkenis
|
||||
}
|
||||
|
||||
@@ -52,9 +49,7 @@ public class Q170_DangerousSeduction extends Quest
|
||||
|
||||
if (event.equals("30305-04.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.startQuest();
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -73,6 +68,7 @@ public class Q170_DangerousSeduction extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.DARK_ELF)
|
||||
{
|
||||
htmltext = "30305-00.htm";
|
||||
@@ -86,8 +82,9 @@ public class Q170_DangerousSeduction extends Quest
|
||||
htmltext = "30305-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
{
|
||||
if (st.hasQuestItems(NIGHTMARE_CRYSTAL))
|
||||
{
|
||||
htmltext = "30305-06.htm";
|
||||
@@ -101,10 +98,12 @@ public class Q170_DangerousSeduction extends Quest
|
||||
htmltext = "30305-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -113,13 +112,13 @@ public class Q170_DangerousSeduction extends Quest
|
||||
@Override
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
final QuestState st = checkPlayerCondition(player, npc, "cond", "1");
|
||||
final QuestState st = checkPlayerCondition(player, npc, 1);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(NIGHTMARE_CRYSTAL, 1);
|
||||
|
||||
|
||||
@@ -28,6 +28,13 @@ import org.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
public class Q171_ActsOfEvil extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int ALVAH = 30381;
|
||||
private static final int ARODIN = 30207;
|
||||
private static final int TYRA = 30420;
|
||||
private static final int ROLENTO = 30437;
|
||||
private static final int NETI = 30425;
|
||||
private static final int BURAI = 30617;
|
||||
// Items
|
||||
private static final int BLADE_MOLD = 4239;
|
||||
private static final int TYRA_BILL = 4240;
|
||||
@@ -40,15 +47,6 @@ public class Q171_ActsOfEvil extends Quest
|
||||
private static final int CERTIFICATE = 4247;
|
||||
private static final int CARGO_BOX = 4248;
|
||||
private static final int OL_MAHUM_HEAD = 4249;
|
||||
|
||||
// NPCs
|
||||
private static final int ALVAH = 30381;
|
||||
private static final int ARODIN = 30207;
|
||||
private static final int TYRA = 30420;
|
||||
private static final int ROLENTO = 30437;
|
||||
private static final int NETI = 30425;
|
||||
private static final int BURAI = 30617;
|
||||
|
||||
// Turek Orcs drop chances
|
||||
private static final Map<Integer, Integer> CHANCES = new HashMap<>();
|
||||
static
|
||||
@@ -62,12 +60,9 @@ public class Q171_ActsOfEvil extends Quest
|
||||
public Q171_ActsOfEvil()
|
||||
{
|
||||
super(171, "Acts of Evil");
|
||||
|
||||
registerQuestItems(BLADE_MOLD, TYRA_BILL, RANGER_REPORT_1, RANGER_REPORT_2, RANGER_REPORT_3, RANGER_REPORT_4, WEAPON_TRADE_CONTRACT, ATTACK_DIRECTIVES, CERTIFICATE, CARGO_BOX, OL_MAHUM_HEAD);
|
||||
|
||||
addStartNpc(ALVAH);
|
||||
addTalkId(ALVAH, ARODIN, TYRA, ROLENTO, NETI, BURAI);
|
||||
|
||||
addKillId(20496, 20497, 20498, 20499, 20062, 20064, 20066, 20438);
|
||||
}
|
||||
|
||||
@@ -81,42 +76,49 @@ public class Q171_ActsOfEvil extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30381-02.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
}
|
||||
else if (event.equals("30207-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("30381-04.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("30381-07.htm"))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(WEAPON_TRADE_CONTRACT, 1);
|
||||
}
|
||||
else if (event.equals("30437-03.htm"))
|
||||
{
|
||||
st.set("cond", "9");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(CARGO_BOX, 1);
|
||||
st.giveItems(CERTIFICATE, 1);
|
||||
}
|
||||
else if (event.equals("30617-04.htm"))
|
||||
{
|
||||
st.set("cond", "10");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ATTACK_DIRECTIVES, 1);
|
||||
st.takeItems(CARGO_BOX, 1);
|
||||
st.takeItems(CERTIFICATE, 1);
|
||||
case "30381-02.htm":
|
||||
{
|
||||
st.startQuest();
|
||||
break;
|
||||
}
|
||||
case "30207-02.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "30381-04.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "30381-07.htm":
|
||||
{
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(WEAPON_TRADE_CONTRACT, 1);
|
||||
break;
|
||||
}
|
||||
case "30437-03.htm":
|
||||
{
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(CARGO_BOX, 1);
|
||||
st.giveItems(CERTIFICATE, 1);
|
||||
break;
|
||||
}
|
||||
case "30617-04.htm":
|
||||
{
|
||||
st.setCond(10);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ATTACK_DIRECTIVES, 1);
|
||||
st.takeItems(CARGO_BOX, 1);
|
||||
st.takeItems(CERTIFICATE, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -135,14 +137,17 @@ public class Q171_ActsOfEvil extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
htmltext = (player.getLevel() < 27) ? "30381-01a.htm" : "30381-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ALVAH:
|
||||
{
|
||||
if (cond < 4)
|
||||
{
|
||||
htmltext = "30381-02a.htm";
|
||||
@@ -156,7 +161,7 @@ public class Q171_ActsOfEvil extends Quest
|
||||
if (st.hasQuestItems(RANGER_REPORT_1, RANGER_REPORT_2, RANGER_REPORT_3, RANGER_REPORT_4))
|
||||
{
|
||||
htmltext = "30381-05.htm";
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(RANGER_REPORT_1, 1);
|
||||
st.takeItems(RANGER_REPORT_2, 1);
|
||||
@@ -191,8 +196,9 @@ public class Q171_ActsOfEvil extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ARODIN:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30207-01.htm";
|
||||
@@ -206,7 +212,7 @@ public class Q171_ActsOfEvil extends Quest
|
||||
if (st.hasQuestItems(TYRA_BILL))
|
||||
{
|
||||
htmltext = "30207-03.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(TYRA_BILL, 1);
|
||||
}
|
||||
@@ -220,14 +226,15 @@ public class Q171_ActsOfEvil extends Quest
|
||||
htmltext = "30207-03a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TYRA:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
if (st.getQuestItemsCount(BLADE_MOLD) >= 20)
|
||||
{
|
||||
htmltext = "30420-01.htm";
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BLADE_MOLD, -1);
|
||||
st.giveItems(TYRA_BILL, 1);
|
||||
@@ -246,12 +253,13 @@ public class Q171_ActsOfEvil extends Quest
|
||||
htmltext = "30420-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case NETI:
|
||||
{
|
||||
if (cond == 7)
|
||||
{
|
||||
htmltext = "30425-01.htm";
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (cond > 7)
|
||||
@@ -259,8 +267,9 @@ public class Q171_ActsOfEvil extends Quest
|
||||
htmltext = "30425-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ROLENTO:
|
||||
{
|
||||
if (cond == 8)
|
||||
{
|
||||
htmltext = "30437-01.htm";
|
||||
@@ -270,8 +279,9 @@ public class Q171_ActsOfEvil extends Quest
|
||||
htmltext = "30437-03a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BURAI:
|
||||
{
|
||||
if ((cond == 9) && st.hasQuestItems(CERTIFICATE, CARGO_BOX, ATTACK_DIRECTIVES))
|
||||
{
|
||||
htmltext = "30617-01.htm";
|
||||
@@ -281,7 +291,7 @@ public class Q171_ActsOfEvil extends Quest
|
||||
if (st.getQuestItemsCount(OL_MAHUM_HEAD) >= 30)
|
||||
{
|
||||
htmltext = "30617-05.htm";
|
||||
st.set("cond", "11");
|
||||
st.setCond(11);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(OL_MAHUM_HEAD, -1);
|
||||
st.rewardItems(57, 8000);
|
||||
@@ -292,12 +302,15 @@ public class Q171_ActsOfEvil extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -313,14 +326,14 @@ public class Q171_ActsOfEvil extends Quest
|
||||
}
|
||||
|
||||
final int npcId = npc.getNpcId();
|
||||
|
||||
switch (npcId)
|
||||
{
|
||||
case 20496:
|
||||
case 20497:
|
||||
case 20498:
|
||||
case 20499:
|
||||
if ((st.getInt("cond") == 2) && !st.dropItems(BLADE_MOLD, 1, 20, CHANCES.get(npcId)))
|
||||
{
|
||||
if (st.isCond(2) && !st.dropItems(BLADE_MOLD, 1, 20, CHANCES.get(npcId)))
|
||||
{
|
||||
final int count = st.getQuestItemsCount(BLADE_MOLD);
|
||||
if ((count == 5) || ((count >= 10) && (Rnd.get(100) < 25)))
|
||||
@@ -329,10 +342,11 @@ public class Q171_ActsOfEvil extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 20062:
|
||||
case 20064:
|
||||
if (st.getInt("cond") == 5)
|
||||
{
|
||||
if (st.isCond(5))
|
||||
{
|
||||
if (!st.hasQuestItems(RANGER_REPORT_1))
|
||||
{
|
||||
@@ -359,22 +373,25 @@ public class Q171_ActsOfEvil extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 20438:
|
||||
if ((st.getInt("cond") == 6) && (Rnd.get(100) < 10) && !st.hasQuestItems(WEAPON_TRADE_CONTRACT, ATTACK_DIRECTIVES))
|
||||
{
|
||||
if (st.isCond(6) && (Rnd.get(100) < 10) && !st.hasQuestItems(WEAPON_TRADE_CONTRACT, ATTACK_DIRECTIVES))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(WEAPON_TRADE_CONTRACT, 1);
|
||||
st.giveItems(ATTACK_DIRECTIVES, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 20066:
|
||||
if (st.getInt("cond") == 10)
|
||||
{
|
||||
if (st.isCond(10))
|
||||
{
|
||||
st.dropItems(OL_MAHUM_HEAD, 1, 30, 500000);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -27,13 +27,23 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q211_TrialOfTheChallenger extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int FILAUR = 30535;
|
||||
private static final int KASH = 30644;
|
||||
private static final int MARTIEN = 30645;
|
||||
private static final int RALDO = 30646;
|
||||
private static final int CHEST_OF_SHYSLASSYS = 30647;
|
||||
// Monsters
|
||||
private static final int SHYSLASSYS = 27110;
|
||||
private static final int GORR = 27112;
|
||||
private static final int BARAHAM = 27113;
|
||||
private static final int SUCCUBUS_QUEEN = 27114;
|
||||
// Items
|
||||
private static final int LETTER_OF_KASH = 2628;
|
||||
private static final int WATCHER_EYE_1 = 2629;
|
||||
private static final int WATCHER_EYE_2 = 2630;
|
||||
private static final int SCROLL_OF_SHYSLASSYS = 2631;
|
||||
private static final int BROKEN_KEY = 2632;
|
||||
|
||||
// Rewards
|
||||
private static final int ADENA = 57;
|
||||
private static final int ELVEN_NECKLACE_BEADS = 1904;
|
||||
@@ -47,28 +57,12 @@ public class Q211_TrialOfTheChallenger extends Quest
|
||||
private static final int MARK_OF_CHALLENGER = 2627;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// NPCs
|
||||
private static final int FILAUR = 30535;
|
||||
private static final int KASH = 30644;
|
||||
private static final int MARTIEN = 30645;
|
||||
private static final int RALDO = 30646;
|
||||
private static final int CHEST_OF_SHYSLASSYS = 30647;
|
||||
|
||||
// Monsters
|
||||
private static final int SHYSLASSYS = 27110;
|
||||
private static final int GORR = 27112;
|
||||
private static final int BARAHAM = 27113;
|
||||
private static final int SUCCUBUS_QUEEN = 27114;
|
||||
|
||||
public Q211_TrialOfTheChallenger()
|
||||
{
|
||||
super(211, "Trial of the Challenger");
|
||||
|
||||
registerQuestItems(LETTER_OF_KASH, WATCHER_EYE_1, WATCHER_EYE_2, SCROLL_OF_SHYSLASSYS, BROKEN_KEY);
|
||||
|
||||
addStartNpc(KASH);
|
||||
addTalkId(FILAUR, KASH, MARTIEN, RALDO, CHEST_OF_SHYSLASSYS);
|
||||
|
||||
addKillId(SHYSLASSYS, GORR, BARAHAM, SUCCUBUS_QUEEN);
|
||||
}
|
||||
|
||||
@@ -82,73 +76,74 @@ public class Q211_TrialOfTheChallenger extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
// KASH
|
||||
if (event.equals("30644-05.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange35", false))
|
||||
case "30644-05.htm":
|
||||
{
|
||||
htmltext = "30644-05a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_35.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange35", true);
|
||||
}
|
||||
}
|
||||
// MARTIEN
|
||||
else if (event.equals("30645-02.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_OF_KASH, 1);
|
||||
}
|
||||
// RALDO
|
||||
else if (event.equals("30646-04.htm") || event.equals("30646-06.htm"))
|
||||
{
|
||||
st.set("cond", "8");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(WATCHER_EYE_2, 1);
|
||||
}
|
||||
// CHEST_OF_SHYSLASSYS
|
||||
else if (event.equals("30647-04.htm"))
|
||||
{
|
||||
if (st.hasQuestItems(BROKEN_KEY))
|
||||
{
|
||||
if (Rnd.get(10) < 2)
|
||||
st.startQuest();
|
||||
if (!player.getVariables().getBoolean("secondClassChange35", false))
|
||||
{
|
||||
htmltext = "30647-03.htm";
|
||||
st.playSound(QuestState.SOUND_JACKPOT);
|
||||
st.takeItems(BROKEN_KEY, 1);
|
||||
final int chance = Rnd.get(100);
|
||||
if (chance > 90)
|
||||
htmltext = "30644-05a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_35.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange35", true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30645-02.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_OF_KASH, 1);
|
||||
break;
|
||||
}
|
||||
case "30646-04.htm":
|
||||
case "30646-06.htm":
|
||||
{
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(WATCHER_EYE_2, 1);
|
||||
break;
|
||||
}
|
||||
case "30647-04.htm":
|
||||
{
|
||||
if (st.hasQuestItems(BROKEN_KEY))
|
||||
{
|
||||
if (Rnd.get(10) < 2)
|
||||
{
|
||||
st.rewardItems(BRIGANDINE_GAUNTLETS_PATTERN, 1);
|
||||
st.rewardItems(IRON_BOOTS_DESIGN, 1);
|
||||
st.rewardItems(MANTICOR_SKIN_GAITERS_PATTERN, 1);
|
||||
st.rewardItems(MITHRIL_SCALE_GAITERS_MATERIAL, 1);
|
||||
st.rewardItems(RIP_GAUNTLETS_PATTERN, 1);
|
||||
}
|
||||
else if (chance > 70)
|
||||
{
|
||||
st.rewardItems(ELVEN_NECKLACE_BEADS, 1);
|
||||
st.rewardItems(TOME_OF_BLOOD_PAGE, 1);
|
||||
}
|
||||
else if (chance > 40)
|
||||
{
|
||||
st.rewardItems(WHITE_TUNIC_PATTERN, 1);
|
||||
htmltext = "30647-03.htm";
|
||||
st.playSound(QuestState.SOUND_JACKPOT);
|
||||
st.takeItems(BROKEN_KEY, 1);
|
||||
final int chance = Rnd.get(100);
|
||||
if (chance > 90)
|
||||
{
|
||||
st.rewardItems(BRIGANDINE_GAUNTLETS_PATTERN, 1);
|
||||
st.rewardItems(IRON_BOOTS_DESIGN, 1);
|
||||
st.rewardItems(MANTICOR_SKIN_GAITERS_PATTERN, 1);
|
||||
st.rewardItems(MITHRIL_SCALE_GAITERS_MATERIAL, 1);
|
||||
st.rewardItems(RIP_GAUNTLETS_PATTERN, 1);
|
||||
}
|
||||
else if (chance > 70)
|
||||
{
|
||||
st.rewardItems(ELVEN_NECKLACE_BEADS, 1);
|
||||
st.rewardItems(TOME_OF_BLOOD_PAGE, 1);
|
||||
}
|
||||
else if (chance > 40)
|
||||
{
|
||||
st.rewardItems(WHITE_TUNIC_PATTERN, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.rewardItems(IRON_BOOTS_DESIGN, 1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
st.rewardItems(IRON_BOOTS_DESIGN, 1);
|
||||
htmltext = "30647-02.htm";
|
||||
st.takeItems(BROKEN_KEY, 1);
|
||||
st.rewardItems(ADENA, Rnd.get(1, 1000));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30647-02.htm";
|
||||
st.takeItems(BROKEN_KEY, 1);
|
||||
st.rewardItems(ADENA, Rnd.get(1, 1000));
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,6 +163,7 @@ public class Q211_TrialOfTheChallenger extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getClassId() != ClassId.WARRIOR) && (player.getClassId() != ClassId.ELVEN_KNIGHT) && (player.getClassId() != ClassId.PALUS_KNIGHT) && (player.getClassId() != ClassId.ORC_RAIDER) && (player.getClassId() != ClassId.ORC_MONK))
|
||||
{
|
||||
htmltext = "30644-02.htm";
|
||||
@@ -181,12 +177,14 @@ public class Q211_TrialOfTheChallenger extends Quest
|
||||
htmltext = "30644-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case KASH:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30644-06.htm";
|
||||
@@ -194,7 +192,7 @@ public class Q211_TrialOfTheChallenger extends Quest
|
||||
else if (cond == 2)
|
||||
{
|
||||
htmltext = "30644-07.htm";
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SCROLL_OF_SHYSLASSYS, 1);
|
||||
st.giveItems(LETTER_OF_KASH, 1);
|
||||
@@ -208,12 +206,14 @@ public class Q211_TrialOfTheChallenger extends Quest
|
||||
htmltext = "30644-09.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case CHEST_OF_SHYSLASSYS:
|
||||
{
|
||||
htmltext = "30647-01.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case MARTIEN:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "30645-01.htm";
|
||||
@@ -225,7 +225,7 @@ public class Q211_TrialOfTheChallenger extends Quest
|
||||
else if (cond == 5)
|
||||
{
|
||||
htmltext = "30645-04.htm";
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(WATCHER_EYE_1, 1);
|
||||
}
|
||||
@@ -242,8 +242,9 @@ public class Q211_TrialOfTheChallenger extends Quest
|
||||
htmltext = "30645-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case RALDO:
|
||||
{
|
||||
if (cond == 7)
|
||||
{
|
||||
htmltext = "30646-01.htm";
|
||||
@@ -263,14 +264,15 @@ public class Q211_TrialOfTheChallenger extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case FILAUR:
|
||||
{
|
||||
if (cond == 8)
|
||||
{
|
||||
if (player.getLevel() >= 36)
|
||||
{
|
||||
htmltext = "30535-01.htm";
|
||||
st.set("cond", "9");
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -288,12 +290,15 @@ public class Q211_TrialOfTheChallenger extends Quest
|
||||
htmltext = "30535-04.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -311,39 +316,44 @@ public class Q211_TrialOfTheChallenger extends Quest
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case SHYSLASSYS:
|
||||
if (st.getInt("cond") == 1)
|
||||
{
|
||||
if (st.isCond(1))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(BROKEN_KEY, 1);
|
||||
st.giveItems(SCROLL_OF_SHYSLASSYS, 1);
|
||||
addSpawn(CHEST_OF_SHYSLASSYS, npc, false, 200000);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GORR:
|
||||
if ((st.getInt("cond") == 4) && st.dropItemsAlways(WATCHER_EYE_1, 1, 1))
|
||||
{
|
||||
if (st.isCond(4) && st.dropItemsAlways(WATCHER_EYE_1, 1, 1))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BARAHAM:
|
||||
if ((st.getInt("cond") == 6) && st.dropItemsAlways(WATCHER_EYE_2, 1, 1))
|
||||
{
|
||||
if (st.isCond(6) && st.dropItemsAlways(WATCHER_EYE_2, 1, 1))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
}
|
||||
addSpawn(RALDO, npc, false, 100000);
|
||||
break;
|
||||
|
||||
}
|
||||
case SUCCUBUS_QUEEN:
|
||||
if (st.getInt("cond") == 9)
|
||||
{
|
||||
if (st.isCond(9))
|
||||
{
|
||||
st.set("cond", "10");
|
||||
st.setCond(10);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
addSpawn(RALDO, npc, false, 100000);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -28,6 +28,14 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q212_TrialOfDuty extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int HANNAVALT = 30109;
|
||||
private static final int DUSTIN = 30116;
|
||||
private static final int SIR_COLLIN = 30311;
|
||||
private static final int SIR_ARON = 30653;
|
||||
private static final int SIR_KIEL = 30654;
|
||||
private static final int SILVERSHADOW = 30655;
|
||||
private static final int SPIRIT_TALIANUS = 30656;
|
||||
// Items
|
||||
private static final int LETTER_OF_DUSTIN = 2634;
|
||||
private static final int KNIGHTS_TEAR = 2635;
|
||||
@@ -43,29 +51,16 @@ public class Q212_TrialOfDuty extends Quest
|
||||
private static final int ATHEBALDT_SHIN = 2645;
|
||||
private static final int LETTER_OF_WINDAWOOD = 2646;
|
||||
private static final int OLD_KNIGHT_SWORD = 3027;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_DUTY = 2633;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// NPCs
|
||||
private static final int HANNAVALT = 30109;
|
||||
private static final int DUSTIN = 30116;
|
||||
private static final int SIR_COLLIN = 30311;
|
||||
private static final int SIR_ARON = 30653;
|
||||
private static final int SIR_KIEL = 30654;
|
||||
private static final int SILVERSHADOW = 30655;
|
||||
private static final int SPIRIT_TALIANUS = 30656;
|
||||
|
||||
public Q212_TrialOfDuty()
|
||||
{
|
||||
super(212, "Trial of Duty");
|
||||
|
||||
registerQuestItems(LETTER_OF_DUSTIN, KNIGHTS_TEAR, MIRROR_OF_ORPIC, TEAR_OF_CONFESSION, REPORT_PIECE_1, REPORT_PIECE_2, TEAR_OF_LOYALTY, MILITAS_ARTICLE, SAINTS_ASHES_URN, ATHEBALDT_SKULL, ATHEBALDT_RIBS, ATHEBALDT_SHIN, LETTER_OF_WINDAWOOD, OLD_KNIGHT_SWORD);
|
||||
|
||||
addStartNpc(HANNAVALT);
|
||||
addTalkId(HANNAVALT, DUSTIN, SIR_COLLIN, SIR_ARON, SIR_KIEL, SILVERSHADOW, SPIRIT_TALIANUS);
|
||||
|
||||
addKillId(20144, 20190, 20191, 20200, 20201, 20270, 27119, 20577, 20578, 20579, 20580, 20581, 20582);
|
||||
}
|
||||
|
||||
@@ -81,10 +76,7 @@ public class Q212_TrialOfDuty extends Quest
|
||||
|
||||
if (event.equals("30109-04.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
|
||||
st.startQuest();
|
||||
if (!player.getVariables().getBoolean("secondClassChange35", false))
|
||||
{
|
||||
htmltext = "30109-04a.htm";
|
||||
@@ -94,7 +86,7 @@ public class Q212_TrialOfDuty extends Quest
|
||||
}
|
||||
else if (event.equals("30116-05.htm"))
|
||||
{
|
||||
st.set("cond", "14");
|
||||
st.setCond(14);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(TEAR_OF_LOYALTY, 1);
|
||||
}
|
||||
@@ -115,6 +107,7 @@ public class Q212_TrialOfDuty extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getClassId() != ClassId.KNIGHT) && (player.getClassId() != ClassId.ELVEN_KNIGHT) && (player.getClassId() != ClassId.PALUS_KNIGHT))
|
||||
{
|
||||
htmltext = "30109-02.htm";
|
||||
@@ -128,12 +121,14 @@ public class Q212_TrialOfDuty extends Quest
|
||||
htmltext = "30109-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case HANNAVALT:
|
||||
{
|
||||
if (cond == 18)
|
||||
{
|
||||
htmltext = "30109-05.htm";
|
||||
@@ -149,12 +144,13 @@ public class Q212_TrialOfDuty extends Quest
|
||||
htmltext = "30109-04a.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SIR_ARON:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30653-01.htm";
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(OLD_KNIGHT_SWORD, 1);
|
||||
}
|
||||
@@ -165,7 +161,7 @@ public class Q212_TrialOfDuty extends Quest
|
||||
else if (cond == 3)
|
||||
{
|
||||
htmltext = "30653-03.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(KNIGHTS_TEAR, 1);
|
||||
st.takeItems(OLD_KNIGHT_SWORD, 1);
|
||||
@@ -175,12 +171,13 @@ public class Q212_TrialOfDuty extends Quest
|
||||
htmltext = "30653-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SIR_KIEL:
|
||||
{
|
||||
if (cond == 4)
|
||||
{
|
||||
htmltext = "30654-01.htm";
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (cond == 5)
|
||||
@@ -190,7 +187,7 @@ public class Q212_TrialOfDuty extends Quest
|
||||
else if (cond == 6)
|
||||
{
|
||||
htmltext = "30654-03.htm";
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(MIRROR_OF_ORPIC, 1);
|
||||
}
|
||||
@@ -201,7 +198,7 @@ public class Q212_TrialOfDuty extends Quest
|
||||
else if (cond == 9)
|
||||
{
|
||||
htmltext = "30654-05.htm";
|
||||
st.set("cond", "10");
|
||||
st.setCond(10);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(TEAR_OF_CONFESSION, 1);
|
||||
}
|
||||
@@ -210,12 +207,13 @@ public class Q212_TrialOfDuty extends Quest
|
||||
htmltext = "30654-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SPIRIT_TALIANUS:
|
||||
{
|
||||
if (cond == 8)
|
||||
{
|
||||
htmltext = "30656-01.htm";
|
||||
st.set("cond", "9");
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MIRROR_OF_ORPIC, 1);
|
||||
st.takeItems(REPORT_PIECE_2, 1);
|
||||
@@ -225,8 +223,9 @@ public class Q212_TrialOfDuty extends Quest
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SILVERSHADOW:
|
||||
{
|
||||
if (cond == 10)
|
||||
{
|
||||
if (player.getLevel() < 35)
|
||||
@@ -236,7 +235,7 @@ public class Q212_TrialOfDuty extends Quest
|
||||
else
|
||||
{
|
||||
htmltext = "30655-02.htm";
|
||||
st.set("cond", "11");
|
||||
st.setCond(11);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
}
|
||||
@@ -247,7 +246,7 @@ public class Q212_TrialOfDuty extends Quest
|
||||
else if (cond == 12)
|
||||
{
|
||||
htmltext = "30655-04.htm";
|
||||
st.set("cond", "13");
|
||||
st.setCond(13);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MILITAS_ARTICLE, -1);
|
||||
st.giveItems(TEAR_OF_LOYALTY, 1);
|
||||
@@ -257,8 +256,9 @@ public class Q212_TrialOfDuty extends Quest
|
||||
htmltext = "30655-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DUSTIN:
|
||||
{
|
||||
if (cond == 13)
|
||||
{
|
||||
htmltext = "30116-01.htm";
|
||||
@@ -270,7 +270,7 @@ public class Q212_TrialOfDuty extends Quest
|
||||
else if (cond == 15)
|
||||
{
|
||||
htmltext = "30116-07.htm";
|
||||
st.set("cond", "16");
|
||||
st.setCond(16);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ATHEBALDT_SKULL, 1);
|
||||
st.takeItems(ATHEBALDT_RIBS, 1);
|
||||
@@ -284,7 +284,7 @@ public class Q212_TrialOfDuty extends Quest
|
||||
else if (cond == 17)
|
||||
{
|
||||
htmltext = "30116-08.htm";
|
||||
st.set("cond", "18");
|
||||
st.setCond(18);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_OF_WINDAWOOD, 1);
|
||||
st.giveItems(LETTER_OF_DUSTIN, 1);
|
||||
@@ -294,12 +294,13 @@ public class Q212_TrialOfDuty extends Quest
|
||||
htmltext = "30116-10.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SIR_COLLIN:
|
||||
{
|
||||
if (cond == 16)
|
||||
{
|
||||
htmltext = "30311-01.htm";
|
||||
st.set("cond", "17");
|
||||
st.setCond(17);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SAINTS_ASHES_URN, 1);
|
||||
st.giveItems(LETTER_OF_WINDAWOOD, 1);
|
||||
@@ -309,12 +310,15 @@ public class Q212_TrialOfDuty extends Quest
|
||||
htmltext = "30311-02.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -329,63 +333,68 @@ public class Q212_TrialOfDuty extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
final int cond = st.getInt("cond");
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case 20190:
|
||||
case 20191:
|
||||
if ((cond == 2) && (Rnd.get(10) < 1))
|
||||
{
|
||||
if (st.isCond(2) && (Rnd.get(10) < 1))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_BEFORE_BATTLE);
|
||||
addSpawn(27119, npc, false, 120000);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 27119:
|
||||
if ((cond == 2) && (player.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) == OLD_KNIGHT_SWORD))
|
||||
{
|
||||
if (st.isCond(2) && (player.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) == OLD_KNIGHT_SWORD))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(KNIGHTS_TEAR, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 20201:
|
||||
case 20200:
|
||||
if ((cond == 5) && st.dropItemsAlways(REPORT_PIECE_1, 1, 10))
|
||||
{
|
||||
if (st.isCond(5) && st.dropItemsAlways(REPORT_PIECE_1, 1, 10))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
st.takeItems(REPORT_PIECE_1, -1);
|
||||
st.giveItems(REPORT_PIECE_2, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 20144:
|
||||
if (((cond == 7) || (cond == 8)) && (Rnd.get(100) < 33))
|
||||
{
|
||||
if ((st.isCond(7) || st.isCond(8)) && (Rnd.get(100) < 33))
|
||||
{
|
||||
if (cond == 7)
|
||||
if (st.isCond(7))
|
||||
{
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
addSpawn(30656, npc, false, 300000);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 20577:
|
||||
case 20578:
|
||||
case 20579:
|
||||
case 20580:
|
||||
case 20581:
|
||||
case 20582:
|
||||
if ((cond == 11) && st.dropItemsAlways(MILITAS_ARTICLE, 1, 20))
|
||||
{
|
||||
if (st.isCond(11) && st.dropItemsAlways(MILITAS_ARTICLE, 1, 20))
|
||||
{
|
||||
st.set("cond", "12");
|
||||
st.setCond(12);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 20270:
|
||||
if ((cond == 14) && Rnd.nextBoolean())
|
||||
{
|
||||
if (st.isCond(14) && Rnd.nextBoolean())
|
||||
{
|
||||
if (!st.hasQuestItems(ATHEBALDT_SKULL))
|
||||
{
|
||||
@@ -399,12 +408,13 @@ public class Q212_TrialOfDuty extends Quest
|
||||
}
|
||||
else if (!st.hasQuestItems(ATHEBALDT_SHIN))
|
||||
{
|
||||
st.set("cond", "15");
|
||||
st.setCond(15);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(ATHEBALDT_SHIN, 1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -26,6 +26,23 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q213_TrialOfTheSeeker extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int TERRY = 30064;
|
||||
private static final int DUFNER = 30106;
|
||||
private static final int BRUNON = 30526;
|
||||
private static final int VIKTOR = 30684;
|
||||
private static final int MARINA = 30715;
|
||||
// Monsters
|
||||
private static final int NEER_GHOUL_BERSERKER = 20198;
|
||||
private static final int ANT_CAPTAIN = 20080;
|
||||
private static final int OL_MAHUM_CAPTAIN = 20211;
|
||||
private static final int TURAK_BUGBEAR_WARRIOR = 20249;
|
||||
private static final int TUREK_ORC_WARLORD = 20495;
|
||||
private static final int MEDUSA = 20158;
|
||||
private static final int ANT_WARRIOR_CAPTAIN = 20088;
|
||||
private static final int MARSH_STAKATO_DRONE = 20234;
|
||||
private static final int BREKA_ORC_OVERLORD = 20270;
|
||||
private static final int LETO_LIZARDMAN_WARRIOR = 20580;
|
||||
// Items
|
||||
private static final int DUFNER_LETTER = 2647;
|
||||
private static final int TERRY_ORDER_1 = 2648;
|
||||
@@ -53,39 +70,16 @@ public class Q213_TrialOfTheSeeker extends Quest
|
||||
private static final int ABYSS_RUNESTONE_3 = 2670;
|
||||
private static final int ABYSS_RUNESTONE_4 = 2671;
|
||||
private static final int TERRY_REPORT = 2672;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_SEEKER = 2673;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// NPCs
|
||||
private static final int TERRY = 30064;
|
||||
private static final int DUFNER = 30106;
|
||||
private static final int BRUNON = 30526;
|
||||
private static final int VIKTOR = 30684;
|
||||
private static final int MARINA = 30715;
|
||||
|
||||
// Monsters
|
||||
private static final int NEER_GHOUL_BERSERKER = 20198;
|
||||
private static final int ANT_CAPTAIN = 20080;
|
||||
private static final int OL_MAHUM_CAPTAIN = 20211;
|
||||
private static final int TURAK_BUGBEAR_WARRIOR = 20249;
|
||||
private static final int TUREK_ORC_WARLORD = 20495;
|
||||
private static final int MEDUSA = 20158;
|
||||
private static final int ANT_WARRIOR_CAPTAIN = 20088;
|
||||
private static final int MARSH_STAKATO_DRONE = 20234;
|
||||
private static final int BREKA_ORC_OVERLORD = 20270;
|
||||
private static final int LETO_LIZARDMAN_WARRIOR = 20580;
|
||||
|
||||
public Q213_TrialOfTheSeeker()
|
||||
{
|
||||
super(213, "Trial of the Seeker");
|
||||
|
||||
registerQuestItems(DUFNER_LETTER, TERRY_ORDER_1, TERRY_ORDER_2, TERRY_LETTER, VIKTOR_LETTER, HAWKEYE_LETTER, MYSTERIOUS_RUNESTONE, OL_MAHUM_RUNESTONE, TUREK_RUNESTONE, ANT_RUNESTONE, TURAK_BUGBEAR_RUNESTONE, TERRY_BOX, VIKTOR_REQUEST, MEDUSA_SCALES, SHILEN_RUNESTONE, ANALYSIS_REQUEST, MARINA_LETTER, EXPERIMENT_TOOLS, ANALYSIS_RESULT, TERRY_ORDER_3, LIST_OF_HOST, ABYSS_RUNESTONE_1, ABYSS_RUNESTONE_2, ABYSS_RUNESTONE_3, ABYSS_RUNESTONE_4, TERRY_REPORT);
|
||||
|
||||
addStartNpc(DUFNER);
|
||||
addTalkId(TERRY, DUFNER, BRUNON, VIKTOR, MARINA);
|
||||
|
||||
addKillId(NEER_GHOUL_BERSERKER, ANT_CAPTAIN, OL_MAHUM_CAPTAIN, TURAK_BUGBEAR_WARRIOR, TUREK_ORC_WARLORD, ANT_WARRIOR_CAPTAIN, MARSH_STAKATO_DRONE, BREKA_ORC_OVERLORD, LETO_LIZARDMAN_WARRIOR, MEDUSA);
|
||||
}
|
||||
|
||||
@@ -99,108 +93,114 @@ public class Q213_TrialOfTheSeeker extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
// DUFNER
|
||||
if (event.equals("30106-05.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(DUFNER_LETTER, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange35", false))
|
||||
case "30106-05.htm":
|
||||
{
|
||||
htmltext = "30106-05a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_35.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange35", true);
|
||||
st.startQuest();
|
||||
st.giveItems(DUFNER_LETTER, 1);
|
||||
if (!player.getVariables().getBoolean("secondClassChange35", false))
|
||||
{
|
||||
htmltext = "30106-05a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_35.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange35", true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
// TERRY
|
||||
else if (event.equals("30064-03.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(DUFNER_LETTER, 1);
|
||||
st.giveItems(TERRY_ORDER_1, 1);
|
||||
}
|
||||
else if (event.equals("30064-06.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MYSTERIOUS_RUNESTONE, 1);
|
||||
st.takeItems(TERRY_ORDER_1, 1);
|
||||
st.giveItems(TERRY_ORDER_2, 1);
|
||||
}
|
||||
else if (event.equals("30064-10.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ANT_RUNESTONE, 1);
|
||||
st.takeItems(OL_MAHUM_RUNESTONE, 1);
|
||||
st.takeItems(TURAK_BUGBEAR_RUNESTONE, 1);
|
||||
st.takeItems(TUREK_RUNESTONE, 1);
|
||||
st.takeItems(TERRY_ORDER_2, 1);
|
||||
st.giveItems(TERRY_BOX, 1);
|
||||
st.giveItems(TERRY_LETTER, 1);
|
||||
}
|
||||
else if (event.equals("30064-18.htm"))
|
||||
{
|
||||
if (player.getLevel() < 36)
|
||||
case "30064-03.htm":
|
||||
{
|
||||
htmltext = "30064-17.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(ANALYSIS_RESULT, 1);
|
||||
st.giveItems(TERRY_ORDER_3, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.set("cond", "16");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ANALYSIS_RESULT, 1);
|
||||
st.giveItems(LIST_OF_HOST, 1);
|
||||
st.takeItems(DUFNER_LETTER, 1);
|
||||
st.giveItems(TERRY_ORDER_1, 1);
|
||||
break;
|
||||
}
|
||||
case "30064-06.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MYSTERIOUS_RUNESTONE, 1);
|
||||
st.takeItems(TERRY_ORDER_1, 1);
|
||||
st.giveItems(TERRY_ORDER_2, 1);
|
||||
break;
|
||||
}
|
||||
case "30064-10.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ANT_RUNESTONE, 1);
|
||||
st.takeItems(OL_MAHUM_RUNESTONE, 1);
|
||||
st.takeItems(TURAK_BUGBEAR_RUNESTONE, 1);
|
||||
st.takeItems(TUREK_RUNESTONE, 1);
|
||||
st.takeItems(TERRY_ORDER_2, 1);
|
||||
st.giveItems(TERRY_BOX, 1);
|
||||
st.giveItems(TERRY_LETTER, 1);
|
||||
break;
|
||||
}
|
||||
case "30064-18.htm":
|
||||
{
|
||||
if (player.getLevel() < 36)
|
||||
{
|
||||
htmltext = "30064-17.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(ANALYSIS_RESULT, 1);
|
||||
st.giveItems(TERRY_ORDER_3, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.setCond(16);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ANALYSIS_RESULT, 1);
|
||||
st.giveItems(LIST_OF_HOST, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30684-05.htm":
|
||||
{
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(TERRY_LETTER, 1);
|
||||
st.giveItems(VIKTOR_LETTER, 1);
|
||||
break;
|
||||
}
|
||||
case "30684-11.htm":
|
||||
{
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(TERRY_LETTER, 1);
|
||||
st.takeItems(TERRY_BOX, 1);
|
||||
st.takeItems(HAWKEYE_LETTER, 1);
|
||||
st.takeItems(VIKTOR_LETTER, 1);
|
||||
st.giveItems(VIKTOR_REQUEST, 1);
|
||||
break;
|
||||
}
|
||||
case "30684-15.htm":
|
||||
{
|
||||
st.setCond(11);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(VIKTOR_REQUEST, 1);
|
||||
st.takeItems(MEDUSA_SCALES, 10);
|
||||
st.giveItems(ANALYSIS_REQUEST, 1);
|
||||
st.giveItems(SHILEN_RUNESTONE, 1);
|
||||
break;
|
||||
}
|
||||
case "30715-02.htm":
|
||||
{
|
||||
st.setCond(12);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SHILEN_RUNESTONE, 1);
|
||||
st.takeItems(ANALYSIS_REQUEST, 1);
|
||||
st.giveItems(MARINA_LETTER, 1);
|
||||
break;
|
||||
}
|
||||
case "30715-05.htm":
|
||||
{
|
||||
st.setCond(14);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(EXPERIMENT_TOOLS, 1);
|
||||
st.giveItems(ANALYSIS_RESULT, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// VIKTOR
|
||||
else if (event.equals("30684-05.htm"))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(TERRY_LETTER, 1);
|
||||
st.giveItems(VIKTOR_LETTER, 1);
|
||||
}
|
||||
else if (event.equals("30684-11.htm"))
|
||||
{
|
||||
st.set("cond", "9");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(TERRY_LETTER, 1);
|
||||
st.takeItems(TERRY_BOX, 1);
|
||||
st.takeItems(HAWKEYE_LETTER, 1);
|
||||
st.takeItems(VIKTOR_LETTER, 1);
|
||||
st.giveItems(VIKTOR_REQUEST, 1);
|
||||
}
|
||||
else if (event.equals("30684-15.htm"))
|
||||
{
|
||||
st.set("cond", "11");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(VIKTOR_REQUEST, 1);
|
||||
st.takeItems(MEDUSA_SCALES, 10);
|
||||
st.giveItems(ANALYSIS_REQUEST, 1);
|
||||
st.giveItems(SHILEN_RUNESTONE, 1);
|
||||
}
|
||||
// MARINA
|
||||
else if (event.equals("30715-02.htm"))
|
||||
{
|
||||
st.set("cond", "12");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SHILEN_RUNESTONE, 1);
|
||||
st.takeItems(ANALYSIS_REQUEST, 1);
|
||||
st.giveItems(MARINA_LETTER, 1);
|
||||
}
|
||||
else if (event.equals("30715-05.htm"))
|
||||
{
|
||||
st.set("cond", "14");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(EXPERIMENT_TOOLS, 1);
|
||||
st.giveItems(ANALYSIS_RESULT, 1);
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -219,6 +219,7 @@ public class Q213_TrialOfTheSeeker extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getClassId() == ClassId.ROGUE) || (player.getClassId() == ClassId.ELVEN_SCOUT) || (player.getClassId() == ClassId.ASSASSIN))
|
||||
{
|
||||
htmltext = (player.getLevel() < 35) ? "30106-02.htm" : "30106-03.htm";
|
||||
@@ -228,12 +229,14 @@ public class Q213_TrialOfTheSeeker extends Quest
|
||||
htmltext = "30106-00.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case DUFNER:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30106-06.htm";
|
||||
@@ -256,8 +259,9 @@ public class Q213_TrialOfTheSeeker extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TERRY:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30064-01.htm";
|
||||
@@ -285,7 +289,7 @@ public class Q213_TrialOfTheSeeker extends Quest
|
||||
else if (cond == 7)
|
||||
{
|
||||
htmltext = "30064-12.htm";
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(VIKTOR_LETTER, 1);
|
||||
st.giveItems(HAWKEYE_LETTER, 1);
|
||||
@@ -311,7 +315,7 @@ public class Q213_TrialOfTheSeeker extends Quest
|
||||
else
|
||||
{
|
||||
htmltext = "30064-21.htm";
|
||||
st.set("cond", "15");
|
||||
st.setCond(15);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(TERRY_ORDER_3, 1);
|
||||
st.giveItems(LIST_OF_HOST, 1);
|
||||
@@ -340,8 +344,9 @@ public class Q213_TrialOfTheSeeker extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case VIKTOR:
|
||||
{
|
||||
if (cond == 6)
|
||||
{
|
||||
htmltext = "30684-01.htm";
|
||||
@@ -371,8 +376,9 @@ public class Q213_TrialOfTheSeeker extends Quest
|
||||
htmltext = "30684-17.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARINA:
|
||||
{
|
||||
if (cond == 11)
|
||||
{
|
||||
htmltext = "30715-01.htm";
|
||||
@@ -390,12 +396,13 @@ public class Q213_TrialOfTheSeeker extends Quest
|
||||
htmltext = "30715-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BRUNON:
|
||||
{
|
||||
if (cond == 12)
|
||||
{
|
||||
htmltext = "30526-01.htm";
|
||||
st.set("cond", "13");
|
||||
st.setCond(13);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MARINA_LETTER, 1);
|
||||
st.giveItems(EXPERIMENT_TOOLS, 1);
|
||||
@@ -405,12 +412,15 @@ public class Q213_TrialOfTheSeeker extends Quest
|
||||
htmltext = "30526-02.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -425,79 +435,88 @@ public class Q213_TrialOfTheSeeker extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
final int cond = st.getInt("cond");
|
||||
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case NEER_GHOUL_BERSERKER:
|
||||
if ((cond == 2) && st.dropItems(MYSTERIOUS_RUNESTONE, 1, 1, 100000))
|
||||
{
|
||||
if (st.isCond(2) && st.dropItems(MYSTERIOUS_RUNESTONE, 1, 1, 100000))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ANT_CAPTAIN:
|
||||
if ((cond == 4) && st.dropItems(ANT_RUNESTONE, 1, 1, 250000) && st.hasQuestItems(OL_MAHUM_RUNESTONE, TURAK_BUGBEAR_RUNESTONE, TUREK_RUNESTONE))
|
||||
{
|
||||
if (st.isCond(4) && st.dropItems(ANT_RUNESTONE, 1, 1, 250000) && st.hasQuestItems(OL_MAHUM_RUNESTONE, TURAK_BUGBEAR_RUNESTONE, TUREK_RUNESTONE))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case OL_MAHUM_CAPTAIN:
|
||||
if ((cond == 4) && st.dropItems(OL_MAHUM_RUNESTONE, 1, 1, 250000) && st.hasQuestItems(ANT_RUNESTONE, TURAK_BUGBEAR_RUNESTONE, TUREK_RUNESTONE))
|
||||
{
|
||||
if (st.isCond(4) && st.dropItems(OL_MAHUM_RUNESTONE, 1, 1, 250000) && st.hasQuestItems(ANT_RUNESTONE, TURAK_BUGBEAR_RUNESTONE, TUREK_RUNESTONE))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TURAK_BUGBEAR_WARRIOR:
|
||||
if ((cond == 4) && st.dropItems(TURAK_BUGBEAR_RUNESTONE, 1, 1, 250000) && st.hasQuestItems(ANT_RUNESTONE, OL_MAHUM_RUNESTONE, TUREK_RUNESTONE))
|
||||
{
|
||||
if (st.isCond(4) && st.dropItems(TURAK_BUGBEAR_RUNESTONE, 1, 1, 250000) && st.hasQuestItems(ANT_RUNESTONE, OL_MAHUM_RUNESTONE, TUREK_RUNESTONE))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TUREK_ORC_WARLORD:
|
||||
if ((cond == 4) && st.dropItems(TUREK_RUNESTONE, 1, 1, 250000) && st.hasQuestItems(ANT_RUNESTONE, OL_MAHUM_RUNESTONE, TURAK_BUGBEAR_RUNESTONE))
|
||||
{
|
||||
if (st.isCond(4) && st.dropItems(TUREK_RUNESTONE, 1, 1, 250000) && st.hasQuestItems(ANT_RUNESTONE, OL_MAHUM_RUNESTONE, TURAK_BUGBEAR_RUNESTONE))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MEDUSA:
|
||||
if ((cond == 9) && st.dropItems(MEDUSA_SCALES, 1, 10, 300000))
|
||||
{
|
||||
if (st.isCond(9) && st.dropItems(MEDUSA_SCALES, 1, 10, 300000))
|
||||
{
|
||||
st.set("cond", "10");
|
||||
st.setCond(10);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARSH_STAKATO_DRONE:
|
||||
if (((cond == 15) || (cond == 16)) && st.dropItems(ABYSS_RUNESTONE_1, 1, 1, 250000) && st.hasQuestItems(ABYSS_RUNESTONE_2, ABYSS_RUNESTONE_3, ABYSS_RUNESTONE_4))
|
||||
{
|
||||
if ((st.isCond(15) || st.isCond(16)) && st.dropItems(ABYSS_RUNESTONE_1, 1, 1, 250000) && st.hasQuestItems(ABYSS_RUNESTONE_2, ABYSS_RUNESTONE_3, ABYSS_RUNESTONE_4))
|
||||
{
|
||||
st.set("cond", "17");
|
||||
st.setCond(17);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BREKA_ORC_OVERLORD:
|
||||
if (((cond == 15) || (cond == 16)) && st.dropItems(ABYSS_RUNESTONE_2, 1, 1, 250000) && st.hasQuestItems(ABYSS_RUNESTONE_1, ABYSS_RUNESTONE_3, ABYSS_RUNESTONE_4))
|
||||
{
|
||||
if ((st.isCond(15) || st.isCond(16)) && st.dropItems(ABYSS_RUNESTONE_2, 1, 1, 250000) && st.hasQuestItems(ABYSS_RUNESTONE_1, ABYSS_RUNESTONE_3, ABYSS_RUNESTONE_4))
|
||||
{
|
||||
st.set("cond", "17");
|
||||
st.setCond(17);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ANT_WARRIOR_CAPTAIN:
|
||||
if (((cond == 15) || (cond == 16)) && st.dropItems(ABYSS_RUNESTONE_3, 1, 1, 250000) && st.hasQuestItems(ABYSS_RUNESTONE_1, ABYSS_RUNESTONE_2, ABYSS_RUNESTONE_4))
|
||||
{
|
||||
if ((st.isCond(15) || st.isCond(16)) && st.dropItems(ABYSS_RUNESTONE_3, 1, 1, 250000) && st.hasQuestItems(ABYSS_RUNESTONE_1, ABYSS_RUNESTONE_2, ABYSS_RUNESTONE_4))
|
||||
{
|
||||
st.set("cond", "17");
|
||||
st.setCond(17);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LETO_LIZARDMAN_WARRIOR:
|
||||
if (((cond == 15) || (cond == 16)) && st.dropItems(ABYSS_RUNESTONE_4, 1, 1, 250000) && st.hasQuestItems(ABYSS_RUNESTONE_1, ABYSS_RUNESTONE_2, ABYSS_RUNESTONE_3))
|
||||
{
|
||||
if ((st.isCond(15) || st.isCond(16)) && st.dropItems(ABYSS_RUNESTONE_4, 1, 1, 250000) && st.hasQuestItems(ABYSS_RUNESTONE_1, ABYSS_RUNESTONE_2, ABYSS_RUNESTONE_3))
|
||||
{
|
||||
st.set("cond", "17");
|
||||
st.setCond(17);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -26,6 +26,32 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q214_TrialOfTheScholar extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int SYLVAIN = 30070;
|
||||
private static final int LUCAS = 30071;
|
||||
private static final int VALKON = 30103;
|
||||
private static final int DIETER = 30111;
|
||||
private static final int JUREK = 30115;
|
||||
private static final int EDROC = 30230;
|
||||
private static final int RAUT = 30316;
|
||||
private static final int POITAN = 30458;
|
||||
private static final int MIRIEN = 30461;
|
||||
private static final int MARIA = 30608;
|
||||
private static final int CRETA = 30609;
|
||||
private static final int CRONOS = 30610;
|
||||
private static final int TRIFF = 30611;
|
||||
private static final int CASIAN = 30612;
|
||||
// Monsters
|
||||
private static final int MONSTER_EYE_DESTROYER = 20068;
|
||||
private static final int MEDUSA = 20158;
|
||||
private static final int GHOUL = 20201;
|
||||
private static final int SHACKLE_1 = 20235;
|
||||
private static final int SHACKLE_2 = 20279;
|
||||
private static final int BREKA_ORC_SHAMAN = 20269;
|
||||
private static final int FETTERED_SOUL = 20552;
|
||||
private static final int GRANDIS = 20554;
|
||||
private static final int ENCHANTED_GARGOYLE = 20567;
|
||||
private static final int LETO_LIZARDMAN_WARRIOR = 20580;
|
||||
// Items
|
||||
private static final int MIRIEN_SIGIL_1 = 2675;
|
||||
private static final int MIRIEN_SIGIL_2 = 2676;
|
||||
@@ -72,48 +98,16 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
private static final int FETTERED_SOUL_ICHOR = 2718;
|
||||
private static final int ENCHANTED_GARGOYLE_NAIL = 2719;
|
||||
private static final int SYMBOL_OF_CRONOS = 2720;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_SCHOLAR = 2674;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// NPCs
|
||||
private static final int SYLVAIN = 30070;
|
||||
private static final int LUCAS = 30071;
|
||||
private static final int VALKON = 30103;
|
||||
private static final int DIETER = 30111;
|
||||
private static final int JUREK = 30115;
|
||||
private static final int EDROC = 30230;
|
||||
private static final int RAUT = 30316;
|
||||
private static final int POITAN = 30458;
|
||||
private static final int MIRIEN = 30461;
|
||||
private static final int MARIA = 30608;
|
||||
private static final int CRETA = 30609;
|
||||
private static final int CRONOS = 30610;
|
||||
private static final int TRIFF = 30611;
|
||||
private static final int CASIAN = 30612;
|
||||
|
||||
// Monsters
|
||||
private static final int MONSTER_EYE_DESTROYER = 20068;
|
||||
private static final int MEDUSA = 20158;
|
||||
private static final int GHOUL = 20201;
|
||||
private static final int SHACKLE_1 = 20235;
|
||||
private static final int SHACKLE_2 = 20279;
|
||||
private static final int BREKA_ORC_SHAMAN = 20269;
|
||||
private static final int FETTERED_SOUL = 20552;
|
||||
private static final int GRANDIS = 20554;
|
||||
private static final int ENCHANTED_GARGOYLE = 20567;
|
||||
private static final int LETO_LIZARDMAN_WARRIOR = 20580;
|
||||
|
||||
public Q214_TrialOfTheScholar()
|
||||
{
|
||||
super(214, "Trial of the Scholar");
|
||||
|
||||
registerQuestItems(MIRIEN_SIGIL_1, MIRIEN_SIGIL_2, MIRIEN_SIGIL_3, MIRIEN_INSTRUCTION, MARIA_LETTER_1, MARIA_LETTER_2, LUCAS_LETTER, LUCILLA_HANDBAG, CRETA_LETTER_1, CRETA_PAINTING_1, CRETA_PAINTING_2, CRETA_PAINTING_3, BROWN_SCROLL_SCRAP, CRYSTAL_OF_PURITY_1, HIGH_PRIEST_SIGIL, GRAND_MAGISTER_SIGIL, CRONOS_SIGIL, SYLVAIN_LETTER, SYMBOL_OF_SYLVAIN, JUREK_LIST, MONSTER_EYE_DESTROYER_SKIN, SHAMAN_NECKLACE, SHACKLE_SCALP, SYMBOL_OF_JUREK, CRONOS_LETTER, DIETER_KEY, CRETA_LETTER_2, DIETER_LETTER, DIETER_DIARY, RAUT_LETTER_ENVELOPE, TRIFF_RING, SCRIPTURE_CHAPTER_1, SCRIPTURE_CHAPTER_2, SCRIPTURE_CHAPTER_3, SCRIPTURE_CHAPTER_4, VALKON_REQUEST, POITAN_NOTES, STRONG_LIQUOR, CRYSTAL_OF_PURITY_2, CASIAN_LIST, GHOUL_SKIN, MEDUSA_BLOOD, FETTERED_SOUL_ICHOR, ENCHANTED_GARGOYLE_NAIL, SYMBOL_OF_CRONOS);
|
||||
|
||||
addStartNpc(MIRIEN);
|
||||
addTalkId(MIRIEN, SYLVAIN, LUCAS, VALKON, DIETER, JUREK, EDROC, RAUT, POITAN, MARIA, CRETA, CRONOS, TRIFF, CASIAN);
|
||||
|
||||
addKillId(MONSTER_EYE_DESTROYER, MEDUSA, GHOUL, SHACKLE_1, SHACKLE_2, BREKA_ORC_SHAMAN, FETTERED_SOUL, GRANDIS, ENCHANTED_GARGOYLE, LETO_LIZARDMAN_WARRIOR);
|
||||
}
|
||||
|
||||
@@ -127,193 +121,201 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
// MIRIEN
|
||||
if (event.equals("30461-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(MIRIEN_SIGIL_1, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange35", false))
|
||||
case "30461-04.htm":
|
||||
{
|
||||
htmltext = "30461-04a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_35.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange35", true);
|
||||
st.startQuest();
|
||||
st.giveItems(MIRIEN_SIGIL_1, 1);
|
||||
if (!player.getVariables().getBoolean("secondClassChange35", false))
|
||||
{
|
||||
htmltext = "30461-04a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_35.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange35", true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30461-09.htm"))
|
||||
{
|
||||
if (player.getLevel() < 36)
|
||||
case "30461-09.htm":
|
||||
{
|
||||
if (player.getLevel() < 36)
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(MIRIEN_INSTRUCTION, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30461-10.htm";
|
||||
st.setCond(19);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MIRIEN_SIGIL_2, 1);
|
||||
st.takeItems(SYMBOL_OF_JUREK, 1);
|
||||
st.giveItems(MIRIEN_SIGIL_3, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30070-02.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(HIGH_PRIEST_SIGIL, 1);
|
||||
st.giveItems(SYLVAIN_LETTER, 1);
|
||||
break;
|
||||
}
|
||||
case "30608-02.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SYLVAIN_LETTER, 1);
|
||||
st.giveItems(MARIA_LETTER_1, 1);
|
||||
break;
|
||||
}
|
||||
case "30608-08.htm":
|
||||
{
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRETA_LETTER_1, 1);
|
||||
st.giveItems(LUCILLA_HANDBAG, 1);
|
||||
break;
|
||||
}
|
||||
case "30608-14.htm":
|
||||
{
|
||||
st.setCond(13);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BROWN_SCROLL_SCRAP, -1);
|
||||
st.takeItems(CRETA_PAINTING_3, 1);
|
||||
st.giveItems(CRYSTAL_OF_PURITY_1, 1);
|
||||
break;
|
||||
}
|
||||
case "30115-03.htm":
|
||||
{
|
||||
st.setCond(16);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(GRAND_MAGISTER_SIGIL, 1);
|
||||
st.giveItems(JUREK_LIST, 1);
|
||||
break;
|
||||
}
|
||||
case "30071-04.htm":
|
||||
{
|
||||
st.setCond(10);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRETA_PAINTING_2, 1);
|
||||
st.giveItems(CRETA_PAINTING_3, 1);
|
||||
break;
|
||||
}
|
||||
case "30609-05.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MARIA_LETTER_2, 1);
|
||||
st.giveItems(CRETA_LETTER_1, 1);
|
||||
break;
|
||||
}
|
||||
case "30609-09.htm":
|
||||
{
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LUCILLA_HANDBAG, 1);
|
||||
st.giveItems(CRETA_PAINTING_1, 1);
|
||||
break;
|
||||
}
|
||||
case "30609-14.htm":
|
||||
{
|
||||
st.setCond(22);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(DIETER_KEY, 1);
|
||||
st.giveItems(CRETA_LETTER_2, 1);
|
||||
break;
|
||||
}
|
||||
case "30610-10.htm":
|
||||
{
|
||||
st.setCond(20);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(CRONOS_LETTER, 1);
|
||||
st.giveItems(CRONOS_SIGIL, 1);
|
||||
break;
|
||||
}
|
||||
case "30610-14.htm":
|
||||
{
|
||||
st.setCond(31);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRONOS_SIGIL, 1);
|
||||
st.takeItems(DIETER_DIARY, 1);
|
||||
st.takeItems(SCRIPTURE_CHAPTER_1, 1);
|
||||
st.takeItems(SCRIPTURE_CHAPTER_2, 1);
|
||||
st.takeItems(SCRIPTURE_CHAPTER_3, 1);
|
||||
st.takeItems(SCRIPTURE_CHAPTER_4, 1);
|
||||
st.takeItems(TRIFF_RING, 1);
|
||||
st.giveItems(SYMBOL_OF_CRONOS, 1);
|
||||
break;
|
||||
}
|
||||
case "30111-05.htm":
|
||||
{
|
||||
st.setCond(21);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRONOS_LETTER, 1);
|
||||
st.giveItems(DIETER_KEY, 1);
|
||||
break;
|
||||
}
|
||||
case "30111-09.htm":
|
||||
{
|
||||
st.setCond(23);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRETA_LETTER_2, 1);
|
||||
st.giveItems(DIETER_DIARY, 1);
|
||||
st.giveItems(DIETER_LETTER, 1);
|
||||
break;
|
||||
}
|
||||
case "30230-02.htm":
|
||||
{
|
||||
st.setCond(24);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(DIETER_LETTER, 1);
|
||||
st.giveItems(RAUT_LETTER_ENVELOPE, 1);
|
||||
break;
|
||||
}
|
||||
case "30316-02.htm":
|
||||
{
|
||||
st.setCond(25);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(RAUT_LETTER_ENVELOPE, 1);
|
||||
st.giveItems(SCRIPTURE_CHAPTER_1, 1);
|
||||
st.giveItems(STRONG_LIQUOR, 1);
|
||||
break;
|
||||
}
|
||||
case "30611-04.htm":
|
||||
{
|
||||
st.setCond(26);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(STRONG_LIQUOR, 1);
|
||||
st.giveItems(TRIFF_RING, 1);
|
||||
break;
|
||||
}
|
||||
case "30103-04.htm":
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(MIRIEN_INSTRUCTION, 1);
|
||||
st.giveItems(VALKON_REQUEST, 1);
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30612-04.htm":
|
||||
{
|
||||
htmltext = "30461-10.htm";
|
||||
st.set("cond", "19");
|
||||
st.setCond(28);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MIRIEN_SIGIL_2, 1);
|
||||
st.takeItems(SYMBOL_OF_JUREK, 1);
|
||||
st.giveItems(MIRIEN_SIGIL_3, 1);
|
||||
st.giveItems(CASIAN_LIST, 1);
|
||||
break;
|
||||
}
|
||||
case "30612-07.htm":
|
||||
{
|
||||
st.setCond(30);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CASIAN_LIST, 1);
|
||||
st.takeItems(ENCHANTED_GARGOYLE_NAIL, -1);
|
||||
st.takeItems(FETTERED_SOUL_ICHOR, -1);
|
||||
st.takeItems(GHOUL_SKIN, -1);
|
||||
st.takeItems(MEDUSA_BLOOD, -1);
|
||||
st.takeItems(POITAN_NOTES, 1);
|
||||
st.giveItems(SCRIPTURE_CHAPTER_4, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// SYLVAIN
|
||||
else if (event.equals("30070-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(HIGH_PRIEST_SIGIL, 1);
|
||||
st.giveItems(SYLVAIN_LETTER, 1);
|
||||
}
|
||||
// MARIA
|
||||
else if (event.equals("30608-02.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SYLVAIN_LETTER, 1);
|
||||
st.giveItems(MARIA_LETTER_1, 1);
|
||||
}
|
||||
else if (event.equals("30608-08.htm"))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRETA_LETTER_1, 1);
|
||||
st.giveItems(LUCILLA_HANDBAG, 1);
|
||||
}
|
||||
else if (event.equals("30608-14.htm"))
|
||||
{
|
||||
st.set("cond", "13");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BROWN_SCROLL_SCRAP, -1);
|
||||
st.takeItems(CRETA_PAINTING_3, 1);
|
||||
st.giveItems(CRYSTAL_OF_PURITY_1, 1);
|
||||
}
|
||||
// JUREK
|
||||
else if (event.equals("30115-03.htm"))
|
||||
{
|
||||
st.set("cond", "16");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(GRAND_MAGISTER_SIGIL, 1);
|
||||
st.giveItems(JUREK_LIST, 1);
|
||||
}
|
||||
// LUCAS
|
||||
else if (event.equals("30071-04.htm"))
|
||||
{
|
||||
st.set("cond", "10");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRETA_PAINTING_2, 1);
|
||||
st.giveItems(CRETA_PAINTING_3, 1);
|
||||
}
|
||||
// CRETA
|
||||
else if (event.equals("30609-05.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MARIA_LETTER_2, 1);
|
||||
st.giveItems(CRETA_LETTER_1, 1);
|
||||
}
|
||||
else if (event.equals("30609-09.htm"))
|
||||
{
|
||||
st.set("cond", "8");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LUCILLA_HANDBAG, 1);
|
||||
st.giveItems(CRETA_PAINTING_1, 1);
|
||||
}
|
||||
else if (event.equals("30609-14.htm"))
|
||||
{
|
||||
st.set("cond", "22");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(DIETER_KEY, 1);
|
||||
st.giveItems(CRETA_LETTER_2, 1);
|
||||
}
|
||||
// CRONOS
|
||||
else if (event.equals("30610-10.htm"))
|
||||
{
|
||||
st.set("cond", "20");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(CRONOS_LETTER, 1);
|
||||
st.giveItems(CRONOS_SIGIL, 1);
|
||||
}
|
||||
else if (event.equals("30610-14.htm"))
|
||||
{
|
||||
st.set("cond", "31");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRONOS_SIGIL, 1);
|
||||
st.takeItems(DIETER_DIARY, 1);
|
||||
st.takeItems(SCRIPTURE_CHAPTER_1, 1);
|
||||
st.takeItems(SCRIPTURE_CHAPTER_2, 1);
|
||||
st.takeItems(SCRIPTURE_CHAPTER_3, 1);
|
||||
st.takeItems(SCRIPTURE_CHAPTER_4, 1);
|
||||
st.takeItems(TRIFF_RING, 1);
|
||||
st.giveItems(SYMBOL_OF_CRONOS, 1);
|
||||
}
|
||||
// DIETER
|
||||
else if (event.equals("30111-05.htm"))
|
||||
{
|
||||
st.set("cond", "21");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRONOS_LETTER, 1);
|
||||
st.giveItems(DIETER_KEY, 1);
|
||||
}
|
||||
else if (event.equals("30111-09.htm"))
|
||||
{
|
||||
st.set("cond", "23");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRETA_LETTER_2, 1);
|
||||
st.giveItems(DIETER_DIARY, 1);
|
||||
st.giveItems(DIETER_LETTER, 1);
|
||||
}
|
||||
// EDROC
|
||||
else if (event.equals("30230-02.htm"))
|
||||
{
|
||||
st.set("cond", "24");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(DIETER_LETTER, 1);
|
||||
st.giveItems(RAUT_LETTER_ENVELOPE, 1);
|
||||
}
|
||||
// RAUT
|
||||
else if (event.equals("30316-02.htm"))
|
||||
{
|
||||
st.set("cond", "25");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(RAUT_LETTER_ENVELOPE, 1);
|
||||
st.giveItems(SCRIPTURE_CHAPTER_1, 1);
|
||||
st.giveItems(STRONG_LIQUOR, 1);
|
||||
}
|
||||
// TRIFF
|
||||
else if (event.equals("30611-04.htm"))
|
||||
{
|
||||
st.set("cond", "26");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(STRONG_LIQUOR, 1);
|
||||
st.giveItems(TRIFF_RING, 1);
|
||||
}
|
||||
// VALKON
|
||||
else if (event.equals("30103-04.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(VALKON_REQUEST, 1);
|
||||
}
|
||||
// CASIAN
|
||||
else if (event.equals("30612-04.htm"))
|
||||
{
|
||||
st.set("cond", "28");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(CASIAN_LIST, 1);
|
||||
}
|
||||
else if (event.equals("30612-07.htm"))
|
||||
{
|
||||
st.set("cond", "30");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CASIAN_LIST, 1);
|
||||
st.takeItems(ENCHANTED_GARGOYLE_NAIL, -1);
|
||||
st.takeItems(FETTERED_SOUL_ICHOR, -1);
|
||||
st.takeItems(GHOUL_SKIN, -1);
|
||||
st.takeItems(MEDUSA_BLOOD, -1);
|
||||
st.takeItems(POITAN_NOTES, 1);
|
||||
st.giveItems(SCRIPTURE_CHAPTER_4, 1);
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -332,6 +334,7 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getClassId() != ClassId.WIZARD) && (player.getClassId() != ClassId.ELVEN_WIZARD) && (player.getClassId() != ClassId.DARK_WIZARD))
|
||||
{
|
||||
htmltext = "30461-01.htm";
|
||||
@@ -345,12 +348,14 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
htmltext = "30461-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case MIRIEN:
|
||||
{
|
||||
if (cond < 14)
|
||||
{
|
||||
htmltext = "30461-05.htm";
|
||||
@@ -358,7 +363,7 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
else if (cond == 14)
|
||||
{
|
||||
htmltext = "30461-06.htm";
|
||||
st.set("cond", "15");
|
||||
st.setCond(15);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MIRIEN_SIGIL_1, 1);
|
||||
st.takeItems(SYMBOL_OF_SYLVAIN, 1);
|
||||
@@ -383,7 +388,7 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
else
|
||||
{
|
||||
htmltext = "30461-12.htm";
|
||||
st.set("cond", "19");
|
||||
st.setCond(19);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MIRIEN_INSTRUCTION, 1);
|
||||
st.takeItems(MIRIEN_SIGIL_2, 1);
|
||||
@@ -408,8 +413,9 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SYLVAIN:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30070-01.htm";
|
||||
@@ -421,7 +427,7 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
else if (cond == 13)
|
||||
{
|
||||
htmltext = "30070-04.htm";
|
||||
st.set("cond", "14");
|
||||
st.setCond(14);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRYSTAL_OF_PURITY_1, 1);
|
||||
st.takeItems(HIGH_PRIEST_SIGIL, 1);
|
||||
@@ -436,8 +442,9 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
htmltext = "30070-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARIA:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30608-01.htm";
|
||||
@@ -449,7 +456,7 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
else if (cond == 4)
|
||||
{
|
||||
htmltext = "30608-04.htm";
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LUCAS_LETTER, 1);
|
||||
st.giveItems(MARIA_LETTER_2, 1);
|
||||
@@ -469,7 +476,7 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
else if (cond == 8)
|
||||
{
|
||||
htmltext = "30608-10.htm";
|
||||
st.set("cond", "9");
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CRETA_PAINTING_1, 1);
|
||||
st.giveItems(CRETA_PAINTING_2, 1);
|
||||
@@ -481,7 +488,7 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
else if (cond == 10)
|
||||
{
|
||||
htmltext = "30608-12.htm";
|
||||
st.set("cond", "11");
|
||||
st.setCond(11);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (cond == 11)
|
||||
@@ -515,8 +522,9 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case JUREK:
|
||||
{
|
||||
if (cond == 15)
|
||||
{
|
||||
htmltext = "30115-01.htm";
|
||||
@@ -528,7 +536,7 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
else if (cond == 17)
|
||||
{
|
||||
htmltext = "30115-05.htm";
|
||||
st.set("cond", "18");
|
||||
st.setCond(18);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GRAND_MAGISTER_SIGIL, 1);
|
||||
st.takeItems(JUREK_LIST, 1);
|
||||
@@ -546,12 +554,13 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
htmltext = "30115-07.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LUCAS:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "30071-01.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MARIA_LETTER_1, 1);
|
||||
st.giveItems(LUCAS_LETTER, 1);
|
||||
@@ -577,8 +586,9 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
htmltext = "30071-07.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case CRETA:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "30609-01.htm";
|
||||
@@ -608,8 +618,9 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
htmltext = "30609-15.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case CRONOS:
|
||||
{
|
||||
if (cond == 19)
|
||||
{
|
||||
htmltext = "30610-01.htm";
|
||||
@@ -627,8 +638,9 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
htmltext = "30610-15.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DIETER:
|
||||
{
|
||||
if (cond == 20)
|
||||
{
|
||||
htmltext = "30111-01.htm";
|
||||
@@ -658,8 +670,9 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
htmltext = "30111-15.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case EDROC:
|
||||
{
|
||||
if (cond == 23)
|
||||
{
|
||||
htmltext = "30230-01.htm";
|
||||
@@ -673,8 +686,9 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
htmltext = "30230-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case RAUT:
|
||||
{
|
||||
if (cond == 24)
|
||||
{
|
||||
htmltext = "30316-01.htm";
|
||||
@@ -688,8 +702,9 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
htmltext = "30316-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TRIFF:
|
||||
{
|
||||
if (cond == 25)
|
||||
{
|
||||
htmltext = "30611-01.htm";
|
||||
@@ -699,8 +714,9 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
htmltext = "30611-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case VALKON:
|
||||
{
|
||||
if (st.hasQuestItems(TRIFF_RING))
|
||||
{
|
||||
if (!st.hasQuestItems(SCRIPTURE_CHAPTER_2))
|
||||
@@ -730,8 +746,9 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case POITAN:
|
||||
{
|
||||
if ((cond == 26) || (cond == 27))
|
||||
{
|
||||
if (!st.hasQuestItems(POITAN_NOTES))
|
||||
@@ -754,8 +771,9 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
htmltext = "30458-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case CASIAN:
|
||||
{
|
||||
if (((cond == 26) || (cond == 27)) && st.hasQuestItems(POITAN_NOTES))
|
||||
{
|
||||
if (st.hasQuestItems(SCRIPTURE_CHAPTER_1, SCRIPTURE_CHAPTER_2, SCRIPTURE_CHAPTER_3))
|
||||
@@ -767,7 +785,7 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
htmltext = "30612-01.htm";
|
||||
if (cond == 26)
|
||||
{
|
||||
st.set("cond", "27");
|
||||
st.setCond(27);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
}
|
||||
@@ -785,12 +803,15 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
htmltext = "30612-08.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -808,68 +829,78 @@ public class Q214_TrialOfTheScholar extends Quest
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case LETO_LIZARDMAN_WARRIOR:
|
||||
if ((st.getInt("cond") == 11) && st.dropItems(BROWN_SCROLL_SCRAP, 1, 5, 500000))
|
||||
{
|
||||
if (st.isCond(11) && st.dropItems(BROWN_SCROLL_SCRAP, 1, 5, 500000))
|
||||
{
|
||||
st.set("cond", "12");
|
||||
st.setCond(12);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SHACKLE_1:
|
||||
case SHACKLE_2:
|
||||
if ((st.getInt("cond") == 16) && st.dropItems(SHACKLE_SCALP, 1, 2, 500000) && (st.getQuestItemsCount(MONSTER_EYE_DESTROYER_SKIN) == 5) && (st.getQuestItemsCount(SHAMAN_NECKLACE) == 5))
|
||||
{
|
||||
if (st.isCond(16) && st.dropItems(SHACKLE_SCALP, 1, 2, 500000) && (st.getQuestItemsCount(MONSTER_EYE_DESTROYER_SKIN) == 5) && (st.getQuestItemsCount(SHAMAN_NECKLACE) == 5))
|
||||
{
|
||||
st.set("cond", "17");
|
||||
st.setCond(17);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MONSTER_EYE_DESTROYER:
|
||||
if ((st.getInt("cond") == 16) && st.dropItems(MONSTER_EYE_DESTROYER_SKIN, 1, 5, 500000) && (st.getQuestItemsCount(SHACKLE_SCALP) == 2) && (st.getQuestItemsCount(SHAMAN_NECKLACE) == 5))
|
||||
{
|
||||
if (st.isCond(16) && st.dropItems(MONSTER_EYE_DESTROYER_SKIN, 1, 5, 500000) && (st.getQuestItemsCount(SHACKLE_SCALP) == 2) && (st.getQuestItemsCount(SHAMAN_NECKLACE) == 5))
|
||||
{
|
||||
st.set("cond", "17");
|
||||
st.setCond(17);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BREKA_ORC_SHAMAN:
|
||||
if ((st.getInt("cond") == 16) && st.dropItems(SHAMAN_NECKLACE, 1, 5, 500000) && (st.getQuestItemsCount(SHACKLE_SCALP) == 2) && (st.getQuestItemsCount(MONSTER_EYE_DESTROYER_SKIN) == 5))
|
||||
{
|
||||
if (st.isCond(16) && st.dropItems(SHAMAN_NECKLACE, 1, 5, 500000) && (st.getQuestItemsCount(SHACKLE_SCALP) == 2) && (st.getQuestItemsCount(MONSTER_EYE_DESTROYER_SKIN) == 5))
|
||||
{
|
||||
st.set("cond", "17");
|
||||
st.setCond(17);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GRANDIS:
|
||||
{
|
||||
if (st.hasQuestItems(TRIFF_RING))
|
||||
{
|
||||
st.dropItems(SCRIPTURE_CHAPTER_3, 1, 1, 300000);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MEDUSA:
|
||||
if ((st.getInt("cond") == 28) && st.dropItemsAlways(MEDUSA_BLOOD, 1, 12) && (st.getQuestItemsCount(GHOUL_SKIN) == 10) && (st.getQuestItemsCount(FETTERED_SOUL_ICHOR) == 5) && (st.getQuestItemsCount(ENCHANTED_GARGOYLE_NAIL) == 5))
|
||||
{
|
||||
if (st.isCond(28) && st.dropItemsAlways(MEDUSA_BLOOD, 1, 12) && (st.getQuestItemsCount(GHOUL_SKIN) == 10) && (st.getQuestItemsCount(FETTERED_SOUL_ICHOR) == 5) && (st.getQuestItemsCount(ENCHANTED_GARGOYLE_NAIL) == 5))
|
||||
{
|
||||
st.set("cond", "29");
|
||||
st.setCond(29);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GHOUL:
|
||||
if ((st.getInt("cond") == 28) && st.dropItemsAlways(GHOUL_SKIN, 1, 10) && (st.getQuestItemsCount(MEDUSA_BLOOD) == 12) && (st.getQuestItemsCount(FETTERED_SOUL_ICHOR) == 5) && (st.getQuestItemsCount(ENCHANTED_GARGOYLE_NAIL) == 5))
|
||||
{
|
||||
if (st.isCond(28) && st.dropItemsAlways(GHOUL_SKIN, 1, 10) && (st.getQuestItemsCount(MEDUSA_BLOOD) == 12) && (st.getQuestItemsCount(FETTERED_SOUL_ICHOR) == 5) && (st.getQuestItemsCount(ENCHANTED_GARGOYLE_NAIL) == 5))
|
||||
{
|
||||
st.set("cond", "29");
|
||||
st.setCond(29);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case FETTERED_SOUL:
|
||||
if ((st.getInt("cond") == 28) && st.dropItemsAlways(FETTERED_SOUL_ICHOR, 1, 5) && (st.getQuestItemsCount(MEDUSA_BLOOD) == 12) && (st.getQuestItemsCount(GHOUL_SKIN) == 10) && (st.getQuestItemsCount(ENCHANTED_GARGOYLE_NAIL) == 5))
|
||||
{
|
||||
if (st.isCond(28) && st.dropItemsAlways(FETTERED_SOUL_ICHOR, 1, 5) && (st.getQuestItemsCount(MEDUSA_BLOOD) == 12) && (st.getQuestItemsCount(GHOUL_SKIN) == 10) && (st.getQuestItemsCount(ENCHANTED_GARGOYLE_NAIL) == 5))
|
||||
{
|
||||
st.set("cond", "29");
|
||||
st.setCond(29);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ENCHANTED_GARGOYLE:
|
||||
if ((st.getInt("cond") == 28) && st.dropItemsAlways(ENCHANTED_GARGOYLE_NAIL, 1, 5) && (st.getQuestItemsCount(MEDUSA_BLOOD) == 12) && (st.getQuestItemsCount(GHOUL_SKIN) == 10) && (st.getQuestItemsCount(FETTERED_SOUL_ICHOR) == 5))
|
||||
{
|
||||
if (st.isCond(28) && st.dropItemsAlways(ENCHANTED_GARGOYLE_NAIL, 1, 5) && (st.getQuestItemsCount(MEDUSA_BLOOD) == 12) && (st.getQuestItemsCount(GHOUL_SKIN) == 10) && (st.getQuestItemsCount(FETTERED_SOUL_ICHOR) == 5))
|
||||
{
|
||||
st.set("cond", "29");
|
||||
st.setCond(29);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -27,6 +27,22 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q215_TrialOfThePilgrim extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int SANTIAGO = 30648;
|
||||
private static final int TANAPI = 30571;
|
||||
private static final int ANCESTOR_MARTANKUS = 30649;
|
||||
private static final int GAURI_TWINKLEROCK = 30550;
|
||||
private static final int DORF = 30651;
|
||||
private static final int GERALD = 30650;
|
||||
private static final int PRIMOS = 30117;
|
||||
private static final int PETRON = 30036;
|
||||
private static final int ANDELLIA = 30362;
|
||||
private static final int URUHA = 30652;
|
||||
private static final int CASIAN = 30612;
|
||||
// Monsters
|
||||
private static final int LAVA_SALAMANDER = 27116;
|
||||
private static final int NAHIR = 27117;
|
||||
private static final int BLACK_WILLOW = 27118;
|
||||
// Items
|
||||
private static final int BOOK_OF_SAGE = 2722;
|
||||
private static final int VOUCHER_OF_TRIAL = 2723;
|
||||
@@ -40,38 +56,16 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
private static final int BOOK_OF_DARKNESS = 2731;
|
||||
private static final int DEBRIS_OF_WILLOW = 2732;
|
||||
private static final int TAG_OF_RUMOR = 2733;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_PILGRIM = 2721;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// NPCs
|
||||
private static final int SANTIAGO = 30648;
|
||||
private static final int TANAPI = 30571;
|
||||
private static final int ANCESTOR_MARTANKUS = 30649;
|
||||
private static final int GAURI_TWINKLEROCK = 30550;
|
||||
private static final int DORF = 30651;
|
||||
private static final int GERALD = 30650;
|
||||
private static final int PRIMOS = 30117;
|
||||
private static final int PETRON = 30036;
|
||||
private static final int ANDELLIA = 30362;
|
||||
private static final int URUHA = 30652;
|
||||
private static final int CASIAN = 30612;
|
||||
|
||||
// Monsters
|
||||
private static final int LAVA_SALAMANDER = 27116;
|
||||
private static final int NAHIR = 27117;
|
||||
private static final int BLACK_WILLOW = 27118;
|
||||
|
||||
public Q215_TrialOfThePilgrim()
|
||||
{
|
||||
super(215, "Trial of the Pilgrim");
|
||||
|
||||
registerQuestItems(BOOK_OF_SAGE, VOUCHER_OF_TRIAL, SPIRIT_OF_FLAME, ESSENCE_OF_FLAME, BOOK_OF_GERALD, GRAY_BADGE, PICTURE_OF_NAHIR, HAIR_OF_NAHIR, STATUE_OF_EINHASAD, BOOK_OF_DARKNESS, DEBRIS_OF_WILLOW, TAG_OF_RUMOR);
|
||||
|
||||
addStartNpc(SANTIAGO);
|
||||
addTalkId(SANTIAGO, TANAPI, ANCESTOR_MARTANKUS, GAURI_TWINKLEROCK, DORF, GERALD, PRIMOS, PETRON, ANDELLIA, URUHA, CASIAN);
|
||||
|
||||
addKillId(LAVA_SALAMANDER, NAHIR, BLACK_WILLOW);
|
||||
}
|
||||
|
||||
@@ -79,64 +73,69 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
|
||||
{
|
||||
String htmltext = event;
|
||||
|
||||
final QuestState st = player.getQuestState(getName());
|
||||
if (st == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30648-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(VOUCHER_OF_TRIAL, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange35", false))
|
||||
case "30648-04.htm":
|
||||
{
|
||||
htmltext = "30648-04a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_35.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange35", true);
|
||||
st.startQuest();
|
||||
st.giveItems(VOUCHER_OF_TRIAL, 1);
|
||||
if (!player.getVariables().getBoolean("secondClassChange35", false))
|
||||
{
|
||||
htmltext = "30648-04a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_35.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange35", true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30649-04.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ESSENCE_OF_FLAME, 1);
|
||||
st.giveItems(SPIRIT_OF_FLAME, 1);
|
||||
}
|
||||
else if (event.equals("30650-02.htm"))
|
||||
{
|
||||
if (st.getQuestItemsCount(57) >= 100000)
|
||||
case "30649-04.htm":
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(57, 100000);
|
||||
st.giveItems(BOOK_OF_GERALD, 1);
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ESSENCE_OF_FLAME, 1);
|
||||
st.giveItems(SPIRIT_OF_FLAME, 1);
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30650-02.htm":
|
||||
{
|
||||
htmltext = "30650-03.htm";
|
||||
if (st.getQuestItemsCount(57) >= 100000)
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(57, 100000);
|
||||
st.giveItems(BOOK_OF_GERALD, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30650-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30652-02.htm":
|
||||
{
|
||||
st.setCond(15);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(DEBRIS_OF_WILLOW, 1);
|
||||
st.giveItems(BOOK_OF_DARKNESS, 1);
|
||||
break;
|
||||
}
|
||||
case "30362-04.htm":
|
||||
{
|
||||
st.setCond(16);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "30362-05.htm":
|
||||
{
|
||||
st.setCond(16);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BOOK_OF_DARKNESS, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30652-02.htm"))
|
||||
{
|
||||
st.set("cond", "15");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(DEBRIS_OF_WILLOW, 1);
|
||||
st.giveItems(BOOK_OF_DARKNESS, 1);
|
||||
}
|
||||
else if (event.equals("30362-04.htm"))
|
||||
{
|
||||
st.set("cond", "16");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (event.equals("30362-05.htm"))
|
||||
{
|
||||
st.set("cond", "16");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BOOK_OF_DARKNESS, 1);
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -155,6 +154,7 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getClassId() != ClassId.CLERIC) && (player.getClassId() != ClassId.ORACLE) && (player.getClassId() != ClassId.SHILLIEN_ORACLE) && (player.getClassId() != ClassId.ORC_SHAMAN))
|
||||
{
|
||||
htmltext = "30648-02.htm";
|
||||
@@ -168,12 +168,14 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
htmltext = "30648-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case SANTIAGO:
|
||||
{
|
||||
if (cond < 17)
|
||||
{
|
||||
htmltext = "30648-09.htm";
|
||||
@@ -189,12 +191,13 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TANAPI:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30571-01.htm";
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(VOUCHER_OF_TRIAL, 1);
|
||||
}
|
||||
@@ -208,17 +211,18 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
|
||||
if (cond == 5)
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ANCESTOR_MARTANKUS:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30649-01.htm";
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (cond == 3)
|
||||
@@ -230,12 +234,13 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
htmltext = "30649-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GAURI_TWINKLEROCK:
|
||||
{
|
||||
if (cond == 6)
|
||||
{
|
||||
htmltext = "30550-01.htm";
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(TAG_OF_RUMOR, 1);
|
||||
}
|
||||
@@ -244,12 +249,13 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
htmltext = "30550-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DORF:
|
||||
{
|
||||
if (cond == 7)
|
||||
{
|
||||
htmltext = (!st.hasQuestItems(BOOK_OF_GERALD)) ? "30651-01.htm" : "30651-02.htm";
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(TAG_OF_RUMOR, 1);
|
||||
st.giveItems(GRAY_BADGE, 1);
|
||||
@@ -259,8 +265,9 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
htmltext = "30651-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GERALD:
|
||||
{
|
||||
if ((cond == 7) && !st.hasQuestItems(BOOK_OF_GERALD))
|
||||
{
|
||||
htmltext = "30650-01.htm";
|
||||
@@ -273,12 +280,13 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
st.giveItems(57, 100000);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case PRIMOS:
|
||||
{
|
||||
if (cond == 8)
|
||||
{
|
||||
htmltext = "30117-01.htm";
|
||||
st.set("cond", "9");
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (cond > 8)
|
||||
@@ -286,12 +294,13 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
htmltext = "30117-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case PETRON:
|
||||
{
|
||||
if (cond == 9)
|
||||
{
|
||||
htmltext = "30036-01.htm";
|
||||
st.set("cond", "10");
|
||||
st.setCond(10);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(PICTURE_OF_NAHIR, 1);
|
||||
}
|
||||
@@ -302,7 +311,7 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
else if (cond == 11)
|
||||
{
|
||||
htmltext = "30036-03.htm";
|
||||
st.set("cond", "12");
|
||||
st.setCond(12);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HAIR_OF_NAHIR, 1);
|
||||
st.takeItems(PICTURE_OF_NAHIR, 1);
|
||||
@@ -313,8 +322,9 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
htmltext = "30036-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ANDELLIA:
|
||||
{
|
||||
if (cond == 12)
|
||||
{
|
||||
if (player.getLevel() < 36)
|
||||
@@ -324,7 +334,7 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
else
|
||||
{
|
||||
htmltext = "30362-01.htm";
|
||||
st.set("cond", "13");
|
||||
st.setCond(13);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
}
|
||||
@@ -345,8 +355,9 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
htmltext = "30362-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case URUHA:
|
||||
{
|
||||
if (cond == 14)
|
||||
{
|
||||
htmltext = "30652-01.htm";
|
||||
@@ -356,12 +367,13 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
htmltext = "30652-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case CASIAN:
|
||||
{
|
||||
if (cond == 16)
|
||||
{
|
||||
htmltext = "30612-01.htm";
|
||||
st.set("cond", "17");
|
||||
st.setCond(17);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BOOK_OF_DARKNESS, 1);
|
||||
st.takeItems(GRAY_BADGE, 1);
|
||||
@@ -374,12 +386,15 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
htmltext = "30612-02.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -397,25 +412,29 @@ public class Q215_TrialOfThePilgrim extends Quest
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case LAVA_SALAMANDER:
|
||||
if ((st.getInt("cond") == 3) && st.dropItems(ESSENCE_OF_FLAME, 1, 1, 200000))
|
||||
{
|
||||
if (st.isCond(3) && st.dropItems(ESSENCE_OF_FLAME, 1, 1, 200000))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case NAHIR:
|
||||
if ((st.getInt("cond") == 10) && st.dropItems(HAIR_OF_NAHIR, 1, 1, 200000))
|
||||
{
|
||||
if (st.isCond(10) && st.dropItems(HAIR_OF_NAHIR, 1, 1, 200000))
|
||||
{
|
||||
st.set("cond", "11");
|
||||
st.setCond(11);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BLACK_WILLOW:
|
||||
if ((st.getInt("cond") == 13) && st.dropItems(DEBRIS_OF_WILLOW, 1, 1, 200000))
|
||||
{
|
||||
if (st.isCond(13) && st.dropItems(DEBRIS_OF_WILLOW, 1, 1, 200000))
|
||||
{
|
||||
st.set("cond", "14");
|
||||
st.setCond(14);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -27,6 +27,26 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q216_TrialOfTheGuildsman extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int VALKON = 30103;
|
||||
private static final int NORMAN = 30210;
|
||||
private static final int ALTRAN = 30283;
|
||||
private static final int PINTER = 30298;
|
||||
private static final int DUNING = 30688;
|
||||
// Monsters
|
||||
private static final int ANT = 20079;
|
||||
private static final int ANT_CAPTAIN = 20080;
|
||||
private static final int GRANITE_GOLEM = 20083;
|
||||
private static final int MANDRAGORA_SPROUT = 20154;
|
||||
private static final int MANDRAGORA_SAPLING = 20155;
|
||||
private static final int MANDRAGORA_BLOSSOM = 20156;
|
||||
private static final int SILENOS = 20168;
|
||||
private static final int STRAIN = 20200;
|
||||
private static final int GHOUL = 20201;
|
||||
private static final int DEAD_SEEKER = 20202;
|
||||
private static final int BREKA_ORC_SHAMAN = 20269;
|
||||
private static final int BREKA_ORC_OVERLORD = 20270;
|
||||
private static final int BREKA_ORC_WARRIOR = 20271;
|
||||
// Items
|
||||
private static final int RECIPE_JOURNEYMAN_RING = 3024;
|
||||
private static final int RECIPE_AMBER_BEAD = 3025;
|
||||
@@ -50,42 +70,16 @@ public class Q216_TrialOfTheGuildsman extends Quest
|
||||
private static final int AMBER_LUMP = 3137;
|
||||
private static final int JOURNEYMAN_DECO_BEADS = 3138;
|
||||
private static final int JOURNEYMAN_RING = 3139;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_GUILDSMAN = 3119;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// NPCs
|
||||
private static final int VALKON = 30103;
|
||||
private static final int NORMAN = 30210;
|
||||
private static final int ALTRAN = 30283;
|
||||
private static final int PINTER = 30298;
|
||||
private static final int DUNING = 30688;
|
||||
|
||||
// Monsters
|
||||
private static final int ANT = 20079;
|
||||
private static final int ANT_CAPTAIN = 20080;
|
||||
private static final int GRANITE_GOLEM = 20083;
|
||||
private static final int MANDRAGORA_SPROUT = 20154;
|
||||
private static final int MANDRAGORA_SAPLING = 20155;
|
||||
private static final int MANDRAGORA_BLOSSOM = 20156;
|
||||
private static final int SILENOS = 20168;
|
||||
private static final int STRAIN = 20200;
|
||||
private static final int GHOUL = 20201;
|
||||
private static final int DEAD_SEEKER = 20202;
|
||||
private static final int BREKA_ORC_SHAMAN = 20269;
|
||||
private static final int BREKA_ORC_OVERLORD = 20270;
|
||||
private static final int BREKA_ORC_WARRIOR = 20271;
|
||||
|
||||
public Q216_TrialOfTheGuildsman()
|
||||
{
|
||||
super(216, "Trial of the Guildsman");
|
||||
|
||||
registerQuestItems(RECIPE_JOURNEYMAN_RING, RECIPE_AMBER_BEAD, VALKON_RECOMMENDATION, MANDRAGORA_BERRY, ALTRAN_INSTRUCTIONS, ALTRAN_RECOMMENDATION_1, ALTRAN_RECOMMENDATION_2, NORMAN_INSTRUCTIONS, NORMAN_RECEIPT, DUNING_INSTRUCTIONS, DUNING_KEY, NORMAN_LIST, GRAY_BONE_POWDER, GRANITE_WHETSTONE, RED_PIGMENT, BRAIDED_YARN, JOURNEYMAN_GEM, PINTER_INSTRUCTIONS, AMBER_BEAD, AMBER_LUMP, JOURNEYMAN_DECO_BEADS, JOURNEYMAN_RING);
|
||||
|
||||
addStartNpc(VALKON);
|
||||
addTalkId(VALKON, NORMAN, ALTRAN, PINTER, DUNING);
|
||||
|
||||
addKillId(ANT, ANT_CAPTAIN, GRANITE_GOLEM, MANDRAGORA_SPROUT, MANDRAGORA_SAPLING, MANDRAGORA_BLOSSOM, SILENOS, STRAIN, GHOUL, DEAD_SEEKER, BREKA_ORC_SHAMAN, BREKA_ORC_OVERLORD, BREKA_ORC_WARRIOR);
|
||||
}
|
||||
|
||||
@@ -93,94 +87,103 @@ public class Q216_TrialOfTheGuildsman extends Quest
|
||||
public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
|
||||
{
|
||||
String htmltext = event;
|
||||
|
||||
final QuestState st = player.getQuestState(getName());
|
||||
if (st == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30103-06.htm"))
|
||||
switch (event)
|
||||
{
|
||||
if (st.getQuestItemsCount(57) >= 2000)
|
||||
case "30103-06.htm":
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.takeItems(57, 2000);
|
||||
st.giveItems(VALKON_RECOMMENDATION, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange35", false))
|
||||
if (st.getQuestItemsCount(57) >= 2000)
|
||||
{
|
||||
htmltext = "30103-06d.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_35.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange35", true);
|
||||
st.startQuest();
|
||||
st.takeItems(57, 2000);
|
||||
st.giveItems(VALKON_RECOMMENDATION, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange35", false))
|
||||
{
|
||||
htmltext = "30103-06d.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_35.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange35", true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30103-05a.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30103-06c.htm":
|
||||
case "30103-07c.htm":
|
||||
{
|
||||
htmltext = "30103-05a.htm";
|
||||
if (st.getCond() < 3)
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30103-06c.htm") || event.equals("30103-07c.htm"))
|
||||
{
|
||||
if (st.getInt("cond") < 3)
|
||||
case "30103-09a.htm":
|
||||
case "30103-09b.htm":
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.takeItems(ALTRAN_INSTRUCTIONS, 1);
|
||||
st.takeItems(JOURNEYMAN_RING, -1);
|
||||
st.giveItems(MARK_OF_GUILDSMAN, 1);
|
||||
st.rewardExpAndSp(80993, 12250);
|
||||
player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
case "30210-04.htm":
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(ALTRAN_RECOMMENDATION_1, 1);
|
||||
st.giveItems(NORMAN_INSTRUCTIONS, 1);
|
||||
st.giveItems(NORMAN_RECEIPT, 1);
|
||||
break;
|
||||
}
|
||||
case "30210-10.htm":
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(NORMAN_LIST, 1);
|
||||
break;
|
||||
}
|
||||
case "30283-03.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MANDRAGORA_BERRY, 1);
|
||||
st.takeItems(VALKON_RECOMMENDATION, 1);
|
||||
st.giveItems(ALTRAN_INSTRUCTIONS, 1);
|
||||
st.giveItems(ALTRAN_RECOMMENDATION_1, 1);
|
||||
st.giveItems(ALTRAN_RECOMMENDATION_2, 1);
|
||||
st.giveItems(RECIPE_JOURNEYMAN_RING, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30103-09a.htm") || event.equals("30103-09b.htm"))
|
||||
{
|
||||
st.takeItems(ALTRAN_INSTRUCTIONS, 1);
|
||||
st.takeItems(JOURNEYMAN_RING, -1);
|
||||
st.giveItems(MARK_OF_GUILDSMAN, 1);
|
||||
st.rewardExpAndSp(80993, 12250);
|
||||
player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
else if (event.equals("30210-04.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(ALTRAN_RECOMMENDATION_1, 1);
|
||||
st.giveItems(NORMAN_INSTRUCTIONS, 1);
|
||||
st.giveItems(NORMAN_RECEIPT, 1);
|
||||
}
|
||||
else if (event.equals("30210-10.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(NORMAN_LIST, 1);
|
||||
}
|
||||
else if (event.equals("30283-03.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MANDRAGORA_BERRY, 1);
|
||||
st.takeItems(VALKON_RECOMMENDATION, 1);
|
||||
st.giveItems(ALTRAN_INSTRUCTIONS, 1);
|
||||
st.giveItems(ALTRAN_RECOMMENDATION_1, 1);
|
||||
st.giveItems(ALTRAN_RECOMMENDATION_2, 1);
|
||||
st.giveItems(RECIPE_JOURNEYMAN_RING, 1);
|
||||
}
|
||||
else if (event.equals("30298-04.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(ALTRAN_RECOMMENDATION_2, 1);
|
||||
st.giveItems(PINTER_INSTRUCTIONS, 1);
|
||||
|
||||
// Artisan receives a recipe to craft Amber Beads, while spoiler case is handled in onKill section.
|
||||
if (player.getClassId() == ClassId.ARTISAN)
|
||||
case "30298-04.htm":
|
||||
{
|
||||
htmltext = "30298-05.htm";
|
||||
st.giveItems(RECIPE_AMBER_BEAD, 1);
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(ALTRAN_RECOMMENDATION_2, 1);
|
||||
st.giveItems(PINTER_INSTRUCTIONS, 1);
|
||||
// Artisan receives a recipe to craft Amber Beads, while spoiler case is handled in onKill section.
|
||||
if (player.getClassId() == ClassId.ARTISAN)
|
||||
{
|
||||
htmltext = "30298-05.htm";
|
||||
st.giveItems(RECIPE_AMBER_BEAD, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30688-02.htm":
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(NORMAN_RECEIPT, 1);
|
||||
st.giveItems(DUNING_INSTRUCTIONS, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30688-02.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(NORMAN_RECEIPT, 1);
|
||||
st.giveItems(DUNING_INSTRUCTIONS, 1);
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -199,6 +202,7 @@ public class Q216_TrialOfTheGuildsman extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getClassId() != ClassId.SCAVENGER) && (player.getClassId() != ClassId.ARTISAN))
|
||||
{
|
||||
htmltext = "30103-01.htm";
|
||||
@@ -212,12 +216,14 @@ public class Q216_TrialOfTheGuildsman extends Quest
|
||||
htmltext = "30103-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case VALKON:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30103-06c.htm";
|
||||
@@ -235,14 +241,15 @@ public class Q216_TrialOfTheGuildsman extends Quest
|
||||
htmltext = (st.getQuestItemsCount(JOURNEYMAN_RING) == 7) ? "30103-09.htm" : "30103-08.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ALTRAN:
|
||||
{
|
||||
if (cond < 4)
|
||||
{
|
||||
htmltext = "30283-01.htm";
|
||||
if (cond == 1)
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
}
|
||||
@@ -255,8 +262,9 @@ public class Q216_TrialOfTheGuildsman extends Quest
|
||||
htmltext = "30283-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case NORMAN:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
if (st.hasQuestItems(ALTRAN_RECOMMENDATION_1))
|
||||
@@ -292,7 +300,7 @@ public class Q216_TrialOfTheGuildsman extends Quest
|
||||
|
||||
if (st.getQuestItemsCount(JOURNEYMAN_DECO_BEADS) == 7)
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -307,8 +315,9 @@ public class Q216_TrialOfTheGuildsman extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DUNING:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
if (st.hasQuestItems(NORMAN_RECEIPT))
|
||||
@@ -334,8 +343,9 @@ public class Q216_TrialOfTheGuildsman extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case PINTER:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
if (st.hasQuestItems(ALTRAN_RECOMMENDATION_2))
|
||||
@@ -357,7 +367,7 @@ public class Q216_TrialOfTheGuildsman extends Quest
|
||||
|
||||
if (st.getQuestItemsCount(JOURNEYMAN_GEM) == 7)
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -372,12 +382,15 @@ public class Q216_TrialOfTheGuildsman extends Quest
|
||||
htmltext = "30298-08.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -397,61 +410,66 @@ public class Q216_TrialOfTheGuildsman extends Quest
|
||||
case MANDRAGORA_SPROUT:
|
||||
case MANDRAGORA_SAPLING:
|
||||
case MANDRAGORA_BLOSSOM:
|
||||
if ((st.getInt("cond") == 3) && st.dropItemsAlways(MANDRAGORA_BERRY, 1, 1))
|
||||
{
|
||||
if (st.isCond(3) && st.dropItemsAlways(MANDRAGORA_BERRY, 1, 1))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BREKA_ORC_WARRIOR:
|
||||
case BREKA_ORC_OVERLORD:
|
||||
case BREKA_ORC_SHAMAN:
|
||||
{
|
||||
if (st.hasQuestItems(DUNING_INSTRUCTIONS))
|
||||
{
|
||||
st.dropItemsAlways(DUNING_KEY, 1, 30);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GHOUL:
|
||||
case STRAIN:
|
||||
{
|
||||
if (st.hasQuestItems(NORMAN_LIST))
|
||||
{
|
||||
st.dropItemsAlways(GRAY_BONE_POWDER, 5, 70);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GRANITE_GOLEM:
|
||||
{
|
||||
if (st.hasQuestItems(NORMAN_LIST))
|
||||
{
|
||||
st.dropItemsAlways(GRANITE_WHETSTONE, 7, 70);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DEAD_SEEKER:
|
||||
{
|
||||
if (st.hasQuestItems(NORMAN_LIST))
|
||||
{
|
||||
st.dropItemsAlways(RED_PIGMENT, 7, 70);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SILENOS:
|
||||
{
|
||||
if (st.hasQuestItems(NORMAN_LIST))
|
||||
{
|
||||
st.dropItemsAlways(BRAIDED_YARN, 10, 70);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ANT:
|
||||
case ANT_CAPTAIN:
|
||||
if (st.hasQuestItems(PINTER_INSTRUCTIONS))
|
||||
{
|
||||
// Different cases if player is a wannabe BH or WS.
|
||||
if (st.hasQuestItems(PINTER_INSTRUCTIONS) && st.dropItemsAlways(AMBER_BEAD, ((player.getClassId() == ClassId.SCAVENGER) && (npc.getSpoiledBy() == player.getObjectId())) ? 10 : 5, 70) && (player.getClassId() == ClassId.ARTISAN) && Rnd.nextBoolean())
|
||||
{
|
||||
// Different cases if player is a wannabe BH or WS.
|
||||
if (st.dropItemsAlways(AMBER_BEAD, ((player.getClassId() == ClassId.SCAVENGER) && (npc.getSpoiledBy() == player.getObjectId())) ? 10 : 5, 70) && (player.getClassId() == ClassId.ARTISAN) && Rnd.nextBoolean())
|
||||
{
|
||||
st.giveItems(AMBER_LUMP, 1);
|
||||
}
|
||||
st.giveItems(AMBER_LUMP, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -27,6 +27,36 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q217_TestimonyOfTrust extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int HOLLINT = 30191;
|
||||
private static final int ASTERIOS = 30154;
|
||||
private static final int THIFIELL = 30358;
|
||||
private static final int CLAYTON = 30464;
|
||||
private static final int SERESIN = 30657;
|
||||
private static final int KAKAI = 30565;
|
||||
private static final int MANAKIA = 30515;
|
||||
private static final int LOCKIRIN = 30531;
|
||||
private static final int NIKOLA = 30621;
|
||||
private static final int BIOTIN = 30031;
|
||||
// Monsters
|
||||
private static final int DRYAD = 20013;
|
||||
private static final int DRYAD_ELDER = 20019;
|
||||
private static final int LIREIN = 20036;
|
||||
private static final int LIREIN_ELDER = 20044;
|
||||
private static final int ACTEA_OF_VERDANT_WILDS = 27121;
|
||||
private static final int LUELL_OF_ZEPHYR_WINDS = 27120;
|
||||
private static final int GUARDIAN_BASILIK = 20550;
|
||||
private static final int ANT_RECRUIT = 20082;
|
||||
private static final int ANT_PATROL = 20084;
|
||||
private static final int ANT_GUARD = 20086;
|
||||
private static final int ANT_SOLDIER = 20087;
|
||||
private static final int ANT_WARRIOR_CAPTAIN = 20088;
|
||||
private static final int MARSH_STAKATO = 20157;
|
||||
private static final int MARSH_STAKATO_WORKER = 20230;
|
||||
private static final int MARSH_STAKATO_SOLDIER = 20232;
|
||||
private static final int MARSH_STAKATO_DRONE = 20234;
|
||||
private static final int WINDSUS = 20553;
|
||||
private static final int PORTA = 20213;
|
||||
// Items
|
||||
private static final int LETTER_TO_ELF = 2735;
|
||||
private static final int LETTER_TO_DARK_ELF = 2736;
|
||||
@@ -55,52 +85,16 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
private static final int LETTER_TO_NIKOLA = 2759;
|
||||
private static final int ORDER_OF_NIKOLA = 2760;
|
||||
private static final int HEARTSTONE_OF_PORTA = 2761;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_TRUST = 2734;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// NPCs
|
||||
private static final int HOLLINT = 30191;
|
||||
private static final int ASTERIOS = 30154;
|
||||
private static final int THIFIELL = 30358;
|
||||
private static final int CLAYTON = 30464;
|
||||
private static final int SERESIN = 30657;
|
||||
private static final int KAKAI = 30565;
|
||||
private static final int MANAKIA = 30515;
|
||||
private static final int LOCKIRIN = 30531;
|
||||
private static final int NIKOLA = 30621;
|
||||
private static final int BIOTIN = 30031;
|
||||
|
||||
// Monsters
|
||||
private static final int DRYAD = 20013;
|
||||
private static final int DRYAD_ELDER = 20019;
|
||||
private static final int LIREIN = 20036;
|
||||
private static final int LIREIN_ELDER = 20044;
|
||||
private static final int ACTEA_OF_VERDANT_WILDS = 27121;
|
||||
private static final int LUELL_OF_ZEPHYR_WINDS = 27120;
|
||||
private static final int GUARDIAN_BASILIK = 20550;
|
||||
private static final int ANT_RECRUIT = 20082;
|
||||
private static final int ANT_PATROL = 20084;
|
||||
private static final int ANT_GUARD = 20086;
|
||||
private static final int ANT_SOLDIER = 20087;
|
||||
private static final int ANT_WARRIOR_CAPTAIN = 20088;
|
||||
private static final int MARSH_STAKATO = 20157;
|
||||
private static final int MARSH_STAKATO_WORKER = 20230;
|
||||
private static final int MARSH_STAKATO_SOLDIER = 20232;
|
||||
private static final int MARSH_STAKATO_DRONE = 20234;
|
||||
private static final int WINDSUS = 20553;
|
||||
private static final int PORTA = 20213;
|
||||
|
||||
public Q217_TestimonyOfTrust()
|
||||
{
|
||||
super(217, "Testimony of Trust");
|
||||
|
||||
registerQuestItems(LETTER_TO_ELF, LETTER_TO_DARK_ELF, LETTER_TO_DWARF, LETTER_TO_ORC, LETTER_TO_SERESIN, SCROLL_OF_DARK_ELF_TRUST, SCROLL_OF_ELF_TRUST, SCROLL_OF_DWARF_TRUST, SCROLL_OF_ORC_TRUST, RECOMMENDATION_OF_HOLLINT, ORDER_OF_ASTERIOS, BREATH_OF_WINDS, SEED_OF_VERDURE, LETTER_FROM_THIFIELL, BLOOD_GUARDIAN_BASILIK, GIANT_APHID, STAKATO_FLUIDS, BASILIK_PLASMA, HONEY_DEW, STAKATO_ICHOR, ORDER_OF_CLAYTON, PARASITE_OF_LOTA, LETTER_TO_MANAKIA, LETTER_OF_MANAKIA, LETTER_TO_NIKOLA, ORDER_OF_NIKOLA, HEARTSTONE_OF_PORTA);
|
||||
|
||||
addStartNpc(HOLLINT);
|
||||
addTalkId(HOLLINT, ASTERIOS, THIFIELL, CLAYTON, SERESIN, KAKAI, MANAKIA, LOCKIRIN, NIKOLA, BIOTIN);
|
||||
|
||||
addKillId(DRYAD, DRYAD_ELDER, LIREIN, LIREIN_ELDER, ACTEA_OF_VERDANT_WILDS, LUELL_OF_ZEPHYR_WINDS, GUARDIAN_BASILIK, ANT_RECRUIT, ANT_PATROL, ANT_GUARD, ANT_SOLDIER, ANT_WARRIOR_CAPTAIN, MARSH_STAKATO, MARSH_STAKATO_WORKER, MARSH_STAKATO_SOLDIER, MARSH_STAKATO_DRONE, WINDSUS, PORTA);
|
||||
}
|
||||
|
||||
@@ -108,87 +102,94 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
|
||||
{
|
||||
String htmltext = event;
|
||||
|
||||
final QuestState st = player.getQuestState(getName());
|
||||
if (st == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30191-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(LETTER_TO_ELF, 1);
|
||||
st.giveItems(LETTER_TO_DARK_ELF, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange37", false))
|
||||
case "30191-04.htm":
|
||||
{
|
||||
htmltext = "30191-04a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_37.get(player.getRace().ordinal()));
|
||||
player.getVariables().set("secondClassChange37", true);
|
||||
}
|
||||
}
|
||||
else if (event.equals("30154-03.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_TO_ELF, 1);
|
||||
st.giveItems(ORDER_OF_ASTERIOS, 1);
|
||||
}
|
||||
else if (event.equals("30358-02.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_TO_DARK_ELF, 1);
|
||||
st.giveItems(LETTER_FROM_THIFIELL, 1);
|
||||
}
|
||||
else if (event.equals("30515-02.htm"))
|
||||
{
|
||||
st.set("cond", "14");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_TO_MANAKIA, 1);
|
||||
}
|
||||
else if (event.equals("30531-02.htm"))
|
||||
{
|
||||
st.set("cond", "18");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_TO_DWARF, 1);
|
||||
st.giveItems(LETTER_TO_NIKOLA, 1);
|
||||
}
|
||||
else if (event.equals("30565-02.htm"))
|
||||
{
|
||||
st.set("cond", "13");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_TO_ORC, 1);
|
||||
st.giveItems(LETTER_TO_MANAKIA, 1);
|
||||
}
|
||||
else if (event.equals("30621-02.htm"))
|
||||
{
|
||||
st.set("cond", "19");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_TO_NIKOLA, 1);
|
||||
st.giveItems(ORDER_OF_NIKOLA, 1);
|
||||
}
|
||||
else if (event.equals("30657-03.htm"))
|
||||
{
|
||||
if (player.getLevel() < 38)
|
||||
{
|
||||
htmltext = "30657-02.htm";
|
||||
if (st.getInt("cond") == 10)
|
||||
st.startQuest();
|
||||
st.giveItems(LETTER_TO_ELF, 1);
|
||||
st.giveItems(LETTER_TO_DARK_ELF, 1);
|
||||
if (!player.getVariables().getBoolean("secondClassChange37", false))
|
||||
{
|
||||
st.set("cond", "11");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
htmltext = "30191-04a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_37.get(player.getRace().ordinal()));
|
||||
player.getVariables().set("secondClassChange37", true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30154-03.htm":
|
||||
{
|
||||
st.set("cond", "12");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_TO_SERESIN, 1);
|
||||
st.giveItems(LETTER_TO_DWARF, 1);
|
||||
st.giveItems(LETTER_TO_ORC, 1);
|
||||
st.takeItems(LETTER_TO_ELF, 1);
|
||||
st.giveItems(ORDER_OF_ASTERIOS, 1);
|
||||
break;
|
||||
}
|
||||
case "30358-02.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_TO_DARK_ELF, 1);
|
||||
st.giveItems(LETTER_FROM_THIFIELL, 1);
|
||||
break;
|
||||
}
|
||||
case "30515-02.htm":
|
||||
{
|
||||
st.setCond(14);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_TO_MANAKIA, 1);
|
||||
break;
|
||||
}
|
||||
case "30531-02.htm":
|
||||
{
|
||||
st.setCond(18);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_TO_DWARF, 1);
|
||||
st.giveItems(LETTER_TO_NIKOLA, 1);
|
||||
break;
|
||||
}
|
||||
case "30565-02.htm":
|
||||
{
|
||||
st.setCond(13);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_TO_ORC, 1);
|
||||
st.giveItems(LETTER_TO_MANAKIA, 1);
|
||||
break;
|
||||
}
|
||||
case "30621-02.htm":
|
||||
{
|
||||
st.setCond(19);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_TO_NIKOLA, 1);
|
||||
st.giveItems(ORDER_OF_NIKOLA, 1);
|
||||
break;
|
||||
}
|
||||
case "30657-03.htm":
|
||||
{
|
||||
if (player.getLevel() < 38)
|
||||
{
|
||||
htmltext = "30657-02.htm";
|
||||
if (st.isCond(10))
|
||||
{
|
||||
st.setCond(11);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
st.setCond(12);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_TO_SERESIN, 1);
|
||||
st.giveItems(LETTER_TO_DWARF, 1);
|
||||
st.giveItems(LETTER_TO_ORC, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -208,6 +209,7 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getClassId().level() != 1)
|
||||
{
|
||||
htmltext = "30191-01a.htm";
|
||||
@@ -225,12 +227,14 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
htmltext = "30191-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case HOLLINT:
|
||||
{
|
||||
if (cond < 9)
|
||||
{
|
||||
htmltext = "30191-08.htm";
|
||||
@@ -238,7 +242,7 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
else if (cond == 9)
|
||||
{
|
||||
htmltext = "30191-05.htm";
|
||||
st.set("cond", "10");
|
||||
st.setCond(10);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SCROLL_OF_DARK_ELF_TRUST, 1);
|
||||
st.takeItems(SCROLL_OF_ELF_TRUST, 1);
|
||||
@@ -251,7 +255,7 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
else if (cond == 22)
|
||||
{
|
||||
htmltext = "30191-06.htm";
|
||||
st.set("cond", "23");
|
||||
st.setCond(23);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SCROLL_OF_DWARF_TRUST, 1);
|
||||
st.takeItems(SCROLL_OF_ORC_TRUST, 1);
|
||||
@@ -262,8 +266,9 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
htmltext = "30191-07.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ASTERIOS:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30154-01.htm";
|
||||
@@ -275,7 +280,7 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
else if (cond == 3)
|
||||
{
|
||||
htmltext = "30154-05.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BREATH_OF_WINDS, 1);
|
||||
st.takeItems(SEED_OF_VERDURE, 1);
|
||||
@@ -287,8 +292,9 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
htmltext = "30154-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case THIFIELL:
|
||||
{
|
||||
if (cond == 4)
|
||||
{
|
||||
htmltext = "30358-01.htm";
|
||||
@@ -300,7 +306,7 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
else if (cond == 8)
|
||||
{
|
||||
htmltext = "30358-03.htm";
|
||||
st.set("cond", "9");
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BASILIK_PLASMA, 1);
|
||||
st.takeItems(HONEY_DEW, 1);
|
||||
@@ -312,12 +318,13 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
htmltext = "30358-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case CLAYTON:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "30464-01.htm";
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_FROM_THIFIELL, 1);
|
||||
st.giveItems(ORDER_OF_CLAYTON, 1);
|
||||
@@ -331,14 +338,15 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
htmltext = "30464-03.htm";
|
||||
if (cond == 7)
|
||||
{
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ORDER_OF_CLAYTON, 1);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SERESIN:
|
||||
{
|
||||
if ((cond == 10) || (cond == 11))
|
||||
{
|
||||
htmltext = "30657-01.htm";
|
||||
@@ -352,8 +360,9 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
htmltext = "30657-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KAKAI:
|
||||
{
|
||||
if (cond == 12)
|
||||
{
|
||||
htmltext = "30565-01.htm";
|
||||
@@ -365,7 +374,7 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
else if (cond == 16)
|
||||
{
|
||||
htmltext = "30565-04.htm";
|
||||
st.set("cond", "17");
|
||||
st.setCond(17);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_OF_MANAKIA, 1);
|
||||
st.giveItems(SCROLL_OF_ORC_TRUST, 1);
|
||||
@@ -375,8 +384,9 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
htmltext = "30565-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MANAKIA:
|
||||
{
|
||||
if (cond == 13)
|
||||
{
|
||||
htmltext = "30515-01.htm";
|
||||
@@ -388,7 +398,7 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
else if (cond == 15)
|
||||
{
|
||||
htmltext = "30515-04.htm";
|
||||
st.set("cond", "16");
|
||||
st.setCond(16);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(PARASITE_OF_LOTA, -1);
|
||||
st.giveItems(LETTER_OF_MANAKIA, 1);
|
||||
@@ -398,8 +408,9 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
htmltext = "30515-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LOCKIRIN:
|
||||
{
|
||||
if (cond == 17)
|
||||
{
|
||||
htmltext = "30531-01.htm";
|
||||
@@ -411,7 +422,7 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
else if (cond == 21)
|
||||
{
|
||||
htmltext = "30531-04.htm";
|
||||
st.set("cond", "22");
|
||||
st.setCond(22);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(SCROLL_OF_DWARF_TRUST, 1);
|
||||
}
|
||||
@@ -420,8 +431,9 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
htmltext = "30531-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case NIKOLA:
|
||||
{
|
||||
if (cond == 18)
|
||||
{
|
||||
htmltext = "30621-01.htm";
|
||||
@@ -433,7 +445,7 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
else if (cond == 20)
|
||||
{
|
||||
htmltext = "30621-04.htm";
|
||||
st.set("cond", "21");
|
||||
st.setCond(21);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HEARTSTONE_OF_PORTA, -1);
|
||||
st.takeItems(ORDER_OF_NIKOLA, 1);
|
||||
@@ -443,8 +455,9 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
htmltext = "30621-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BIOTIN:
|
||||
{
|
||||
if (cond == 23)
|
||||
{
|
||||
htmltext = "30031-01.htm";
|
||||
@@ -456,12 +469,15 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -476,34 +492,36 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
final int npcId = npc.getNpcId();
|
||||
switch (npcId)
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case DRYAD:
|
||||
case DRYAD_ELDER:
|
||||
if ((st.getInt("cond") == 2) && !st.hasQuestItems(SEED_OF_VERDURE) && (Rnd.get(100) < 33))
|
||||
{
|
||||
if (st.isCond(2) && !st.hasQuestItems(SEED_OF_VERDURE) && (Rnd.get(100) < 33))
|
||||
{
|
||||
addSpawn(ACTEA_OF_VERDANT_WILDS, npc, true, 200000);
|
||||
st.playSound(QuestState.SOUND_BEFORE_BATTLE);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LIREIN:
|
||||
case LIREIN_ELDER:
|
||||
if ((st.getInt("cond") == 2) && !st.hasQuestItems(BREATH_OF_WINDS) && (Rnd.get(100) < 33))
|
||||
{
|
||||
if (st.isCond(2) && !st.hasQuestItems(BREATH_OF_WINDS) && (Rnd.get(100) < 33))
|
||||
{
|
||||
addSpawn(LUELL_OF_ZEPHYR_WINDS, npc, true, 200000);
|
||||
st.playSound(QuestState.SOUND_BEFORE_BATTLE);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ACTEA_OF_VERDANT_WILDS:
|
||||
if ((st.getInt("cond") == 2) && !st.hasQuestItems(SEED_OF_VERDURE))
|
||||
{
|
||||
if (st.isCond(2) && !st.hasQuestItems(SEED_OF_VERDURE))
|
||||
{
|
||||
st.giveItems(SEED_OF_VERDURE, 1);
|
||||
if (st.hasQuestItems(BREATH_OF_WINDS))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -512,14 +530,15 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LUELL_OF_ZEPHYR_WINDS:
|
||||
if ((st.getInt("cond") == 2) && !st.hasQuestItems(BREATH_OF_WINDS))
|
||||
{
|
||||
if (st.isCond(2) && !st.hasQuestItems(BREATH_OF_WINDS))
|
||||
{
|
||||
st.giveItems(BREATH_OF_WINDS, 1);
|
||||
if (st.hasQuestItems(SEED_OF_VERDURE))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -528,66 +547,72 @@ public class Q217_TestimonyOfTrust extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARSH_STAKATO:
|
||||
case MARSH_STAKATO_WORKER:
|
||||
case MARSH_STAKATO_SOLDIER:
|
||||
case MARSH_STAKATO_DRONE:
|
||||
if ((st.getInt("cond") == 6) && !st.hasQuestItems(STAKATO_ICHOR) && st.dropItemsAlways(STAKATO_FLUIDS, 1, 10))
|
||||
{
|
||||
if (st.isCond(6) && !st.hasQuestItems(STAKATO_ICHOR) && st.dropItemsAlways(STAKATO_FLUIDS, 1, 10))
|
||||
{
|
||||
st.takeItems(STAKATO_FLUIDS, -1);
|
||||
st.giveItems(STAKATO_ICHOR, 1);
|
||||
|
||||
if (st.hasQuestItems(BASILIK_PLASMA, HONEY_DEW))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ANT_RECRUIT:
|
||||
case ANT_PATROL:
|
||||
case ANT_GUARD:
|
||||
case ANT_SOLDIER:
|
||||
case ANT_WARRIOR_CAPTAIN:
|
||||
if ((st.getInt("cond") == 6) && !st.hasQuestItems(HONEY_DEW) && st.dropItemsAlways(GIANT_APHID, 1, 10))
|
||||
{
|
||||
if (st.isCond(6) && !st.hasQuestItems(HONEY_DEW) && st.dropItemsAlways(GIANT_APHID, 1, 10))
|
||||
{
|
||||
st.takeItems(GIANT_APHID, -1);
|
||||
st.giveItems(HONEY_DEW, 1);
|
||||
|
||||
if (st.hasQuestItems(BASILIK_PLASMA, STAKATO_ICHOR))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GUARDIAN_BASILIK:
|
||||
if ((st.getInt("cond") == 6) && !st.hasQuestItems(BASILIK_PLASMA) && st.dropItemsAlways(BLOOD_GUARDIAN_BASILIK, 1, 10))
|
||||
{
|
||||
if (st.isCond(6) && !st.hasQuestItems(BASILIK_PLASMA) && st.dropItemsAlways(BLOOD_GUARDIAN_BASILIK, 1, 10))
|
||||
{
|
||||
st.takeItems(BLOOD_GUARDIAN_BASILIK, -1);
|
||||
st.giveItems(BASILIK_PLASMA, 1);
|
||||
|
||||
if (st.hasQuestItems(HONEY_DEW, STAKATO_ICHOR))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case WINDSUS:
|
||||
if ((st.getInt("cond") == 14) && st.dropItems(PARASITE_OF_LOTA, 1, 10, 500000))
|
||||
{
|
||||
if (st.isCond(14) && st.dropItems(PARASITE_OF_LOTA, 1, 10, 500000))
|
||||
{
|
||||
st.set("cond", "15");
|
||||
st.setCond(15);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case PORTA:
|
||||
if ((st.getInt("cond") == 19) && st.dropItemsAlways(HEARTSTONE_OF_PORTA, 1, 10))
|
||||
{
|
||||
if (st.isCond(19) && st.dropItemsAlways(HEARTSTONE_OF_PORTA, 1, 10))
|
||||
{
|
||||
st.set("cond", "20");
|
||||
st.setCond(20);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -36,7 +36,6 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
private static final int ARKENIA = 30419;
|
||||
private static final int CARDIEN = 30460;
|
||||
private static final int ISAEL = 30655;
|
||||
|
||||
// Items
|
||||
private static final int TALINS_SPEAR = 3026;
|
||||
private static final int CARDIEN_LETTER = 3141;
|
||||
@@ -64,7 +63,6 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
private static final int WYRM_TALON = 3163;
|
||||
private static final int SPIDER_ICHOR = 3164;
|
||||
private static final int HARPY_DOWN = 3165;
|
||||
|
||||
private static final int[] TALINS_PIECES =
|
||||
{
|
||||
3166,
|
||||
@@ -74,7 +72,6 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
3170,
|
||||
3171
|
||||
};
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_LIFE = 3140;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
@@ -82,12 +79,9 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
public Q218_TestimonyOfLife()
|
||||
{
|
||||
super(218, "Testimony of Life");
|
||||
|
||||
registerQuestItems(TALINS_SPEAR, CARDIEN_LETTER, CAMOMILE_CHARM, HIERARCH_LETTER, MOONFLOWER_CHARM, GRAIL_DIAGRAM, THALIA_LETTER_1, THALIA_LETTER_2, THALIA_INSTRUCTIONS, PUSHKIN_LIST, PURE_MITHRIL_CUP, ARKENIA_CONTRACT, ARKENIA_INSTRUCTIONS, ADONIUS_LIST, ANDARIEL_SCRIPTURE_COPY, STARDUST, ISAEL_INSTRUCTIONS, ISAEL_LETTER, GRAIL_OF_PURITY, TEARS_OF_UNICORN, WATER_OF_LIFE, PURE_MITHRIL_ORE, ANT_SOLDIER_ACID, WYRM_TALON, SPIDER_ICHOR, HARPY_DOWN, 3166, 3167, 3168, 3169, 3170, 3171);
|
||||
|
||||
addStartNpc(CARDIEN);
|
||||
addTalkId(ASTERIOS, PUSHKIN, THALIA, ADONIUS, ARKENIA, CARDIEN, ISAEL);
|
||||
|
||||
addKillId(20145, 20176, 20233, 27077, 20550, 20581, 20582, 20082, 20084, 20086, 20087, 20088);
|
||||
}
|
||||
|
||||
@@ -101,90 +95,98 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30460-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(CARDIEN_LETTER, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange37", false))
|
||||
case "30460-04.htm":
|
||||
{
|
||||
htmltext = "30460-04a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_37.get(player.getRace().ordinal()));
|
||||
player.getVariables().set("secondClassChange37", true);
|
||||
st.startQuest();
|
||||
st.giveItems(CARDIEN_LETTER, 1);
|
||||
if (!player.getVariables().getBoolean("secondClassChange37", false))
|
||||
{
|
||||
htmltext = "30460-04a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_37.get(player.getRace().ordinal()));
|
||||
player.getVariables().set("secondClassChange37", true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30154-07.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CARDIEN_LETTER, 1);
|
||||
st.giveItems(HIERARCH_LETTER, 1);
|
||||
st.giveItems(MOONFLOWER_CHARM, 1);
|
||||
}
|
||||
else if (event.equals("30371-03.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HIERARCH_LETTER, 1);
|
||||
st.giveItems(GRAIL_DIAGRAM, 1);
|
||||
}
|
||||
else if (event.equals("30371-11.htm"))
|
||||
{
|
||||
st.takeItems(STARDUST, 1);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
|
||||
if (player.getLevel() < 38)
|
||||
case "30154-07.htm":
|
||||
{
|
||||
htmltext = "30371-10.htm";
|
||||
st.set("cond", "13");
|
||||
st.giveItems(THALIA_INSTRUCTIONS, 1);
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CARDIEN_LETTER, 1);
|
||||
st.giveItems(HIERARCH_LETTER, 1);
|
||||
st.giveItems(MOONFLOWER_CHARM, 1);
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30371-03.htm":
|
||||
{
|
||||
st.set("cond", "14");
|
||||
st.giveItems(THALIA_LETTER_2, 1);
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HIERARCH_LETTER, 1);
|
||||
st.giveItems(GRAIL_DIAGRAM, 1);
|
||||
break;
|
||||
}
|
||||
case "30371-11.htm":
|
||||
{
|
||||
st.takeItems(STARDUST, 1);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
if (player.getLevel() < 38)
|
||||
{
|
||||
htmltext = "30371-10.htm";
|
||||
st.setCond(13);
|
||||
st.giveItems(THALIA_INSTRUCTIONS, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.setCond(14);
|
||||
st.giveItems(THALIA_LETTER_2, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30300-06.htm":
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GRAIL_DIAGRAM, 1);
|
||||
st.giveItems(PUSHKIN_LIST, 1);
|
||||
break;
|
||||
}
|
||||
case "30300-10.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(PUSHKIN_LIST, 1);
|
||||
st.takeItems(ANT_SOLDIER_ACID, -1);
|
||||
st.takeItems(PURE_MITHRIL_ORE, -1);
|
||||
st.takeItems(WYRM_TALON, -1);
|
||||
st.giveItems(PURE_MITHRIL_CUP, 1);
|
||||
break;
|
||||
}
|
||||
case "30419-04.htm":
|
||||
{
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(THALIA_LETTER_1, 1);
|
||||
st.giveItems(ARKENIA_CONTRACT, 1);
|
||||
st.giveItems(ARKENIA_INSTRUCTIONS, 1);
|
||||
break;
|
||||
}
|
||||
case "30375-02.htm":
|
||||
{
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ARKENIA_INSTRUCTIONS, 1);
|
||||
st.giveItems(ADONIUS_LIST, 1);
|
||||
break;
|
||||
}
|
||||
case "30655-02.htm":
|
||||
{
|
||||
st.setCond(15);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(THALIA_LETTER_2, 1);
|
||||
st.giveItems(ISAEL_INSTRUCTIONS, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30300-06.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GRAIL_DIAGRAM, 1);
|
||||
st.giveItems(PUSHKIN_LIST, 1);
|
||||
}
|
||||
else if (event.equals("30300-10.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(PUSHKIN_LIST, 1);
|
||||
st.takeItems(ANT_SOLDIER_ACID, -1);
|
||||
st.takeItems(PURE_MITHRIL_ORE, -1);
|
||||
st.takeItems(WYRM_TALON, -1);
|
||||
st.giveItems(PURE_MITHRIL_CUP, 1);
|
||||
}
|
||||
else if (event.equals("30419-04.htm"))
|
||||
{
|
||||
st.set("cond", "8");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(THALIA_LETTER_1, 1);
|
||||
st.giveItems(ARKENIA_CONTRACT, 1);
|
||||
st.giveItems(ARKENIA_INSTRUCTIONS, 1);
|
||||
}
|
||||
else if (event.equals("30375-02.htm"))
|
||||
{
|
||||
st.set("cond", "9");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ARKENIA_INSTRUCTIONS, 1);
|
||||
st.giveItems(ADONIUS_LIST, 1);
|
||||
}
|
||||
else if (event.equals("30655-02.htm"))
|
||||
{
|
||||
st.set("cond", "15");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(THALIA_LETTER_2, 1);
|
||||
st.giveItems(ISAEL_INSTRUCTIONS, 1);
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -203,6 +205,7 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.ELF)
|
||||
{
|
||||
htmltext = "30460-01.htm";
|
||||
@@ -216,12 +219,14 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
htmltext = "30460-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ASTERIOS:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30154-01.htm";
|
||||
@@ -233,7 +238,7 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
else if (cond == 20)
|
||||
{
|
||||
htmltext = "30154-09.htm";
|
||||
st.set("cond", "21");
|
||||
st.setCond(21);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MOONFLOWER_CHARM, 1);
|
||||
st.takeItems(WATER_OF_LIFE, 1);
|
||||
@@ -244,8 +249,9 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
htmltext = "30154-10.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case PUSHKIN:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "30300-01.htm";
|
||||
@@ -267,8 +273,9 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
htmltext = "30300-12.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case THALIA:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30371-01.htm";
|
||||
@@ -284,7 +291,7 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
else if (cond == 6)
|
||||
{
|
||||
htmltext = "30371-06.htm";
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(PURE_MITHRIL_CUP, 1);
|
||||
st.giveItems(THALIA_LETTER_1, 1);
|
||||
@@ -310,7 +317,7 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
else
|
||||
{
|
||||
htmltext = "30371-13.htm";
|
||||
st.set("cond", "14");
|
||||
st.setCond(14);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(THALIA_INSTRUCTIONS, 1);
|
||||
st.giveItems(THALIA_LETTER_2, 1);
|
||||
@@ -327,7 +334,7 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
else if (cond == 17)
|
||||
{
|
||||
htmltext = "30371-16.htm";
|
||||
st.set("cond", "18");
|
||||
st.setCond(18);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ISAEL_LETTER, 1);
|
||||
st.giveItems(GRAIL_OF_PURITY, 1);
|
||||
@@ -339,7 +346,7 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
else if (cond == 19)
|
||||
{
|
||||
htmltext = "30371-18.htm";
|
||||
st.set("cond", "20");
|
||||
st.setCond(20);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(TEARS_OF_UNICORN, 1);
|
||||
st.giveItems(WATER_OF_LIFE, 1);
|
||||
@@ -349,8 +356,9 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
htmltext = "30371-19.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ADONIUS:
|
||||
{
|
||||
if (cond == 8)
|
||||
{
|
||||
htmltext = "30375-01.htm";
|
||||
@@ -362,7 +370,7 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
else if (cond == 10)
|
||||
{
|
||||
htmltext = "30375-04.htm";
|
||||
st.set("cond", "11");
|
||||
st.setCond(11);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ADONIUS_LIST, 1);
|
||||
st.takeItems(HARPY_DOWN, -1);
|
||||
@@ -378,8 +386,9 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
htmltext = "30375-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ARKENIA:
|
||||
{
|
||||
if (cond == 7)
|
||||
{
|
||||
htmltext = "30419-01.htm";
|
||||
@@ -391,7 +400,7 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
else if (cond == 11)
|
||||
{
|
||||
htmltext = "30419-06.htm";
|
||||
st.set("cond", "12");
|
||||
st.setCond(12);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ANDARIEL_SCRIPTURE_COPY, 1);
|
||||
st.takeItems(ARKENIA_CONTRACT, 1);
|
||||
@@ -406,8 +415,9 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
htmltext = "30419-08.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case CARDIEN:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30460-05.htm";
|
||||
@@ -427,8 +437,9 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ISAEL:
|
||||
{
|
||||
if (cond == 14)
|
||||
{
|
||||
htmltext = "30655-01.htm";
|
||||
@@ -442,7 +453,7 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
if (st.hasQuestItems(TALINS_PIECES))
|
||||
{
|
||||
htmltext = "30655-04.htm";
|
||||
st.set("cond", "17");
|
||||
st.setCond(17);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
|
||||
for (int itemId : TALINS_PIECES)
|
||||
@@ -468,13 +479,16 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
htmltext = "30655-06.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -492,58 +506,65 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case 20550:
|
||||
if ((st.getInt("cond") == 4) && st.dropItems(PURE_MITHRIL_ORE, 1, 10, 500000) && (st.getQuestItemsCount(WYRM_TALON) >= 20) && (st.getQuestItemsCount(ANT_SOLDIER_ACID) >= 20))
|
||||
{
|
||||
if (st.isCond(4) && st.dropItems(PURE_MITHRIL_ORE, 1, 10, 500000) && (st.getQuestItemsCount(WYRM_TALON) >= 20) && (st.getQuestItemsCount(ANT_SOLDIER_ACID) >= 20))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 20176:
|
||||
if ((st.getInt("cond") == 4) && st.dropItems(WYRM_TALON, 1, 20, 500000) && (st.getQuestItemsCount(PURE_MITHRIL_ORE) >= 10) && (st.getQuestItemsCount(ANT_SOLDIER_ACID) >= 20))
|
||||
{
|
||||
if (st.isCond(4) && st.dropItems(WYRM_TALON, 1, 20, 500000) && (st.getQuestItemsCount(PURE_MITHRIL_ORE) >= 10) && (st.getQuestItemsCount(ANT_SOLDIER_ACID) >= 20))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 20082:
|
||||
case 20084:
|
||||
case 20086:
|
||||
case 20087:
|
||||
case 20088:
|
||||
if ((st.getInt("cond") == 4) && st.dropItems(ANT_SOLDIER_ACID, 1, 20, 800000) && (st.getQuestItemsCount(PURE_MITHRIL_ORE) >= 10) && (st.getQuestItemsCount(WYRM_TALON) >= 20))
|
||||
{
|
||||
if (st.isCond(4) && st.dropItems(ANT_SOLDIER_ACID, 1, 20, 800000) && (st.getQuestItemsCount(PURE_MITHRIL_ORE) >= 10) && (st.getQuestItemsCount(WYRM_TALON) >= 20))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 20233:
|
||||
if ((st.getInt("cond") == 9) && st.dropItems(SPIDER_ICHOR, 1, 20, 500000) && (st.getQuestItemsCount(HARPY_DOWN) >= 20))
|
||||
{
|
||||
if (st.isCond(9) && st.dropItems(SPIDER_ICHOR, 1, 20, 500000) && (st.getQuestItemsCount(HARPY_DOWN) >= 20))
|
||||
{
|
||||
st.set("cond", "10");
|
||||
st.setCond(10);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 20145:
|
||||
if ((st.getInt("cond") == 9) && st.dropItems(HARPY_DOWN, 1, 20, 500000) && (st.getQuestItemsCount(SPIDER_ICHOR) >= 20))
|
||||
{
|
||||
if (st.isCond(9) && st.dropItems(HARPY_DOWN, 1, 20, 500000) && (st.getQuestItemsCount(SPIDER_ICHOR) >= 20))
|
||||
{
|
||||
st.set("cond", "10");
|
||||
st.setCond(10);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 27077:
|
||||
if ((st.getInt("cond") == 18) && (player.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) == TALINS_SPEAR))
|
||||
{
|
||||
if (st.isCond(18) && (player.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) == TALINS_SPEAR))
|
||||
{
|
||||
st.set("cond", "19");
|
||||
st.setCond(19);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GRAIL_OF_PURITY, 1);
|
||||
st.takeItems(TALINS_SPEAR, 1);
|
||||
st.giveItems(TEARS_OF_UNICORN, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case 20581:
|
||||
case 20582:
|
||||
if ((st.getInt("cond") == 15) && Rnd.nextBoolean())
|
||||
{
|
||||
if (st.isCond(15) && Rnd.nextBoolean())
|
||||
{
|
||||
for (int itemId : TALINS_PIECES)
|
||||
{
|
||||
@@ -554,10 +575,11 @@ public class Q218_TestimonyOfLife extends Quest
|
||||
return null;
|
||||
}
|
||||
}
|
||||
st.set("cond", "16");
|
||||
st.setCond(16);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -40,7 +40,22 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
private static final int ARKENIA = 30419;
|
||||
private static final int BLOODY_PIXY = 31845;
|
||||
private static final int BLIGHT_TREANT = 31850;
|
||||
|
||||
// Monsters
|
||||
private static final int HANGMAN_TREE = 20144;
|
||||
private static final int MARSH_STAKATO = 20157;
|
||||
private static final int MEDUSA = 20158;
|
||||
private static final int TYRANT = 20192;
|
||||
private static final int TYRANT_KINGPIN = 20193;
|
||||
private static final int DEAD_SEEKER = 20202;
|
||||
private static final int MARSH_STAKATO_WORKER = 20230;
|
||||
private static final int MARSH_STAKATO_SOLDIER = 20232;
|
||||
private static final int MARSH_SPIDER = 20233;
|
||||
private static final int MARSH_STAKATO_DRONE = 20234;
|
||||
private static final int BREKA_ORC_OVERLORD = 20270;
|
||||
private static final int GRANDIS = 20554;
|
||||
private static final int LETO_LIZARDMAN_OVERLORD = 20582;
|
||||
private static final int KARUL_BUGBEAR = 20600;
|
||||
private static final int BLACK_WILLOW_LURKER = 27079;
|
||||
// Items
|
||||
private static final int KAIRA_LETTER = 3173;
|
||||
private static final int METHEUS_FUNERAL_JAR = 3174;
|
||||
@@ -72,28 +87,9 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
private static final int BLACK_WILLOW_LEAF = 3200;
|
||||
private static final int BLIGHT_TREANT_SAP = 3201;
|
||||
private static final int ARKENIA_LETTER = 3202;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_FATE = 3172;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// Monsters
|
||||
private static final int HANGMAN_TREE = 20144;
|
||||
private static final int MARSH_STAKATO = 20157;
|
||||
private static final int MEDUSA = 20158;
|
||||
private static final int TYRANT = 20192;
|
||||
private static final int TYRANT_KINGPIN = 20193;
|
||||
private static final int DEAD_SEEKER = 20202;
|
||||
private static final int MARSH_STAKATO_WORKER = 20230;
|
||||
private static final int MARSH_STAKATO_SOLDIER = 20232;
|
||||
private static final int MARSH_SPIDER = 20233;
|
||||
private static final int MARSH_STAKATO_DRONE = 20234;
|
||||
private static final int BREKA_ORC_OVERLORD = 20270;
|
||||
private static final int GRANDIS = 20554;
|
||||
private static final int LETO_LIZARDMAN_OVERLORD = 20582;
|
||||
private static final int KARUL_BUGBEAR = 20600;
|
||||
private static final int BLACK_WILLOW_LURKER = 27079;
|
||||
|
||||
// Cond 6 drop chances
|
||||
private static final Map<Integer, Integer> CHANCES = new HashMap<>();
|
||||
static
|
||||
@@ -112,12 +108,9 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
public Q219_TestimonyOfFate()
|
||||
{
|
||||
super(219, "Testimony of Fate");
|
||||
|
||||
registerQuestItems(KAIRA_LETTER, METHEUS_FUNERAL_JAR, KASANDRA_REMAINS, HERBALISM_TEXTBOOK, IXIA_LIST, MEDUSA_ICHOR, MARSH_SPIDER_FLUIDS, DEAD_SEEKER_DUNG, TYRANT_BLOOD, NIGHTSHADE_ROOT, BELLADONNA, ALDER_SKULL_1, ALDER_SKULL_2, ALDER_RECEIPT, REVELATIONS_MANUSCRIPT, KAIRA_RECOMMENDATION, KAIRA_INSTRUCTIONS, PALUS_CHARM, THIFIELL_LETTER, ARKENIA_NOTE, PIXY_GARNET, GRANDIS_SKULL, KARUL_BUGBEAR_SKULL, BREKA_OVERLORD_SKULL, LETO_OVERLORD_SKULL, RED_FAIRY_DUST, BLIGHT_TREANT_SEED, BLACK_WILLOW_LEAF, BLIGHT_TREANT_SAP, ARKENIA_LETTER);
|
||||
|
||||
addStartNpc(KAIRA);
|
||||
addTalkId(KAIRA, METHEUS, IXIA, ALDER_SPIRIT, ROA, NORMAN, THIFIELL, ARKENIA, BLOODY_PIXY, BLIGHT_TREANT);
|
||||
|
||||
addKillId(HANGMAN_TREE, MARSH_STAKATO, MEDUSA, TYRANT, TYRANT_KINGPIN, DEAD_SEEKER, MARSH_STAKATO_WORKER, MARSH_STAKATO_SOLDIER, MARSH_SPIDER, MARSH_STAKATO_DRONE, BREKA_ORC_OVERLORD, GRANDIS, LETO_LIZARDMAN_OVERLORD, KARUL_BUGBEAR, BLACK_WILLOW_LURKER);
|
||||
}
|
||||
|
||||
@@ -131,69 +124,75 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30476-05.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(KAIRA_LETTER, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange37", false))
|
||||
case "30476-05.htm":
|
||||
{
|
||||
htmltext = "30476-05a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_37.get(player.getRace().ordinal()));
|
||||
player.getVariables().set("secondClassChange37", true);
|
||||
st.startQuest();
|
||||
st.giveItems(KAIRA_LETTER, 1);
|
||||
if (!player.getVariables().getBoolean("secondClassChange37", false))
|
||||
{
|
||||
htmltext = "30476-05a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_37.get(player.getRace().ordinal()));
|
||||
player.getVariables().set("secondClassChange37", true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30114-04.htm"))
|
||||
{
|
||||
st.set("cond", "12");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ALDER_SKULL_2, 1);
|
||||
st.giveItems(ALDER_RECEIPT, 1);
|
||||
}
|
||||
else if (event.equals("30476-12.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
|
||||
if (player.getLevel() < 38)
|
||||
case "30114-04.htm":
|
||||
{
|
||||
htmltext = "30476-13.htm";
|
||||
st.set("cond", "14");
|
||||
st.giveItems(KAIRA_INSTRUCTIONS, 1);
|
||||
st.setCond(12);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ALDER_SKULL_2, 1);
|
||||
st.giveItems(ALDER_RECEIPT, 1);
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30476-12.htm":
|
||||
{
|
||||
st.set("cond", "15");
|
||||
st.takeItems(REVELATIONS_MANUSCRIPT, 1);
|
||||
st.giveItems(KAIRA_RECOMMENDATION, 1);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
if (player.getLevel() < 38)
|
||||
{
|
||||
htmltext = "30476-13.htm";
|
||||
st.setCond(14);
|
||||
st.giveItems(KAIRA_INSTRUCTIONS, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.setCond(15);
|
||||
st.takeItems(REVELATIONS_MANUSCRIPT, 1);
|
||||
st.giveItems(KAIRA_RECOMMENDATION, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30419-02.htm":
|
||||
{
|
||||
st.setCond(17);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(THIFIELL_LETTER, 1);
|
||||
st.giveItems(ARKENIA_NOTE, 1);
|
||||
break;
|
||||
}
|
||||
case "31845-02.htm":
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(PIXY_GARNET, 1);
|
||||
break;
|
||||
}
|
||||
case "31850-02.htm":
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(BLIGHT_TREANT_SEED, 1);
|
||||
break;
|
||||
}
|
||||
case "30419-05.htm":
|
||||
{
|
||||
st.setCond(18);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ARKENIA_NOTE, 1);
|
||||
st.takeItems(BLIGHT_TREANT_SAP, 1);
|
||||
st.takeItems(RED_FAIRY_DUST, 1);
|
||||
st.giveItems(ARKENIA_LETTER, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30419-02.htm"))
|
||||
{
|
||||
st.set("cond", "17");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(THIFIELL_LETTER, 1);
|
||||
st.giveItems(ARKENIA_NOTE, 1);
|
||||
}
|
||||
else if (event.equals("31845-02.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(PIXY_GARNET, 1);
|
||||
}
|
||||
else if (event.equals("31850-02.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(BLIGHT_TREANT_SEED, 1);
|
||||
}
|
||||
else if (event.equals("30419-05.htm"))
|
||||
{
|
||||
st.set("cond", "18");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ARKENIA_NOTE, 1);
|
||||
st.takeItems(BLIGHT_TREANT_SAP, 1);
|
||||
st.takeItems(RED_FAIRY_DUST, 1);
|
||||
st.giveItems(ARKENIA_LETTER, 1);
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -212,6 +211,7 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.DARK_ELF)
|
||||
{
|
||||
htmltext = "30476-02.htm";
|
||||
@@ -225,12 +225,14 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
htmltext = "30476-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case KAIRA:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30476-06.htm";
|
||||
@@ -246,7 +248,7 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
else if (cond == 9)
|
||||
{
|
||||
htmltext = "30476-09.htm";
|
||||
st.set("cond", "10");
|
||||
st.setCond(10);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ALDER_SKULL_1, 1);
|
||||
addSpawn(ALDER_SPIRIT, player, false, 0);
|
||||
@@ -268,7 +270,7 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
else
|
||||
{
|
||||
htmltext = "30476-12.htm";
|
||||
st.set("cond", "15");
|
||||
st.setCond(15);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(KAIRA_INSTRUCTIONS, 1);
|
||||
st.takeItems(REVELATIONS_MANUSCRIPT, 1);
|
||||
@@ -284,12 +286,13 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
htmltext = "30476-17.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case METHEUS:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30614-01.htm";
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(KAIRA_LETTER, 1);
|
||||
st.giveItems(METHEUS_FUNERAL_JAR, 1);
|
||||
@@ -301,8 +304,8 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
else if (cond == 3)
|
||||
{
|
||||
htmltext = "30614-03.htm";
|
||||
st.set("cond", "4");
|
||||
st.set("cond", "5");
|
||||
st.setCond(4);
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(KASANDRA_REMAINS, 1);
|
||||
st.giveItems(HERBALISM_TEXTBOOK, 1);
|
||||
@@ -314,7 +317,7 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
else if (cond == 8)
|
||||
{
|
||||
htmltext = "30614-05.htm";
|
||||
st.set("cond", "9");
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BELLADONNA, 1);
|
||||
st.giveItems(ALDER_SKULL_1, 1);
|
||||
@@ -324,12 +327,13 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
htmltext = "30614-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case IXIA:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "30463-01.htm";
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HERBALISM_TEXTBOOK, 1);
|
||||
st.giveItems(IXIA_LIST, 1);
|
||||
@@ -341,7 +345,7 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
else if (cond == 7)
|
||||
{
|
||||
htmltext = "30463-03.htm";
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(IXIA_LIST, 1);
|
||||
st.takeItems(DEAD_SEEKER_DUNG, -1);
|
||||
@@ -360,19 +364,21 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
htmltext = "30463-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ALDER_SPIRIT:
|
||||
{
|
||||
if (cond == 10)
|
||||
{
|
||||
htmltext = "30613-01.htm";
|
||||
st.set("cond", "11");
|
||||
st.setCond(11);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(ALDER_SKULL_2, 1);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ROA:
|
||||
{
|
||||
if (cond == 11)
|
||||
{
|
||||
htmltext = "30114-01.htm";
|
||||
@@ -386,12 +392,13 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
htmltext = "30114-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case NORMAN:
|
||||
{
|
||||
if (cond == 12)
|
||||
{
|
||||
htmltext = "30210-01.htm";
|
||||
st.set("cond", "13");
|
||||
st.setCond(13);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ALDER_RECEIPT, 1);
|
||||
st.giveItems(REVELATIONS_MANUSCRIPT, 1);
|
||||
@@ -401,12 +408,13 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
htmltext = "30210-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case THIFIELL:
|
||||
{
|
||||
if (cond == 15)
|
||||
{
|
||||
htmltext = "30358-01.htm";
|
||||
st.set("cond", "16");
|
||||
st.setCond(16);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(KAIRA_RECOMMENDATION, 1);
|
||||
st.giveItems(PALUS_CHARM, 1);
|
||||
@@ -432,8 +440,9 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ARKENIA:
|
||||
{
|
||||
if (cond == 16)
|
||||
{
|
||||
htmltext = "30419-01.htm";
|
||||
@@ -447,8 +456,9 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
htmltext = "30419-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BLOODY_PIXY:
|
||||
{
|
||||
if (cond == 17)
|
||||
{
|
||||
if (st.hasQuestItems(PIXY_GARNET))
|
||||
@@ -483,8 +493,9 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
htmltext = "31845-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BLIGHT_TREANT:
|
||||
{
|
||||
if (cond == 17)
|
||||
{
|
||||
if (st.hasQuestItems(BLIGHT_TREANT_SEED))
|
||||
@@ -516,12 +527,15 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
htmltext = "31850-05.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -541,88 +555,100 @@ public class Q219_TestimonyOfFate extends Quest
|
||||
switch (npcId)
|
||||
{
|
||||
case HANGMAN_TREE:
|
||||
if (st.getInt("cond") == 2)
|
||||
{
|
||||
if (st.isCond(2))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(METHEUS_FUNERAL_JAR, 1);
|
||||
st.giveItems(KASANDRA_REMAINS, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DEAD_SEEKER:
|
||||
if ((st.getInt("cond") == 6) && st.dropItems(DEAD_SEEKER_DUNG, 1, 10, CHANCES.get(npcId)) && (st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
|
||||
{
|
||||
if (st.isCond(6) && st.dropItems(DEAD_SEEKER_DUNG, 1, 10, CHANCES.get(npcId)) && (st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TYRANT:
|
||||
case TYRANT_KINGPIN:
|
||||
if ((st.getInt("cond") == 6) && st.dropItems(TYRANT_BLOOD, 1, 10, CHANCES.get(npcId)) && (st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
|
||||
{
|
||||
if (st.isCond(6) && st.dropItems(TYRANT_BLOOD, 1, 10, CHANCES.get(npcId)) && (st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MEDUSA:
|
||||
if ((st.getInt("cond") == 6) && st.dropItems(MEDUSA_ICHOR, 1, 10, CHANCES.get(npcId)) && (st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
|
||||
{
|
||||
if (st.isCond(6) && st.dropItems(MEDUSA_ICHOR, 1, 10, CHANCES.get(npcId)) && (st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARSH_STAKATO:
|
||||
case MARSH_STAKATO_WORKER:
|
||||
case MARSH_STAKATO_SOLDIER:
|
||||
case MARSH_STAKATO_DRONE:
|
||||
if ((st.getInt("cond") == 6) && st.dropItems(NIGHTSHADE_ROOT, 1, 10, CHANCES.get(npcId)) && (st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
|
||||
{
|
||||
if (st.isCond(6) && st.dropItems(NIGHTSHADE_ROOT, 1, 10, CHANCES.get(npcId)) && (st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(MARSH_SPIDER_FLUIDS) >= 10))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARSH_SPIDER:
|
||||
if ((st.getInt("cond") == 6) && st.dropItems(MARSH_SPIDER_FLUIDS, 1, 10, CHANCES.get(npcId)) && (st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10))
|
||||
{
|
||||
if (st.isCond(6) && st.dropItems(MARSH_SPIDER_FLUIDS, 1, 10, CHANCES.get(npcId)) && (st.getQuestItemsCount(DEAD_SEEKER_DUNG) >= 10) && (st.getQuestItemsCount(TYRANT_BLOOD) >= 10) && (st.getQuestItemsCount(MEDUSA_ICHOR) >= 10) && (st.getQuestItemsCount(NIGHTSHADE_ROOT) >= 10))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GRANDIS:
|
||||
{
|
||||
if (st.hasQuestItems(PIXY_GARNET))
|
||||
{
|
||||
st.dropItemsAlways(GRANDIS_SKULL, 1, 10);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LETO_LIZARDMAN_OVERLORD:
|
||||
{
|
||||
if (st.hasQuestItems(PIXY_GARNET))
|
||||
{
|
||||
st.dropItemsAlways(LETO_OVERLORD_SKULL, 1, 10);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BREKA_ORC_OVERLORD:
|
||||
{
|
||||
if (st.hasQuestItems(PIXY_GARNET))
|
||||
{
|
||||
st.dropItemsAlways(BREKA_OVERLORD_SKULL, 1, 10);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KARUL_BUGBEAR:
|
||||
{
|
||||
if (st.hasQuestItems(PIXY_GARNET))
|
||||
{
|
||||
st.dropItemsAlways(KARUL_BUGBEAR_SKULL, 1, 10);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BLACK_WILLOW_LURKER:
|
||||
{
|
||||
if (st.hasQuestItems(BLIGHT_TREANT_SEED))
|
||||
{
|
||||
st.dropItemsAlways(BLACK_WILLOW_LEAF, 1, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -26,6 +26,38 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q220_TestimonyOfGlory extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int KASMAN = 30501;
|
||||
private static final int VOKIAN = 30514;
|
||||
private static final int MANAKIA = 30515;
|
||||
private static final int KAKAI = 30565;
|
||||
private static final int TANAPI = 30571;
|
||||
private static final int VOLTAR = 30615;
|
||||
private static final int KEPRA = 30616;
|
||||
private static final int BURAI = 30617;
|
||||
private static final int HARAK = 30618;
|
||||
private static final int DRIKO = 30619;
|
||||
private static final int CHIANTA = 30642;
|
||||
// Monsters
|
||||
private static final int TYRANT = 20192;
|
||||
private static final int MARSH_STAKATO_DRONE = 20234;
|
||||
private static final int GUARDIAN_BASILISK = 20550;
|
||||
private static final int MANASHEN_GARGOYLE = 20563;
|
||||
private static final int TIMAK_ORC = 20583;
|
||||
private static final int TIMAK_ORC_ARCHER = 20584;
|
||||
private static final int TIMAK_ORC_SOLDIER = 20585;
|
||||
private static final int TIMAK_ORC_WARRIOR = 20586;
|
||||
private static final int TIMAK_ORC_SHAMAN = 20587;
|
||||
private static final int TIMAK_ORC_OVERLORD = 20588;
|
||||
private static final int TAMLIN_ORC = 20601;
|
||||
private static final int TAMLIN_ORC_ARCHER = 20602;
|
||||
private static final int RAGNA_ORC_OVERLORD = 20778;
|
||||
private static final int RAGNA_ORC_SEER = 20779;
|
||||
private static final int PASHIKA_SON_OF_VOLTAR = 27080;
|
||||
private static final int VULTUS_SON_OF_VOLTAR = 27081;
|
||||
private static final int ENKU_ORC_OVERLORD = 27082;
|
||||
private static final int MAKUM_BUGBEAR_THUG = 27083;
|
||||
private static final int REVENANT_OF_TANTOS_CHIEF = 27086;
|
||||
// Items
|
||||
private static final int VOKIAN_ORDER_1 = 3204;
|
||||
private static final int MANASHEN_SHARD = 3205;
|
||||
@@ -61,45 +93,9 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
private static final int TANAPI_ORDER = 3235;
|
||||
private static final int SCEPTER_OF_TANTOS = 3236;
|
||||
private static final int RITUAL_BOX = 3237;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_GLORY = 3203;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// NPCs
|
||||
private static final int KASMAN = 30501;
|
||||
private static final int VOKIAN = 30514;
|
||||
private static final int MANAKIA = 30515;
|
||||
private static final int KAKAI = 30565;
|
||||
private static final int TANAPI = 30571;
|
||||
private static final int VOLTAR = 30615;
|
||||
private static final int KEPRA = 30616;
|
||||
private static final int BURAI = 30617;
|
||||
private static final int HARAK = 30618;
|
||||
private static final int DRIKO = 30619;
|
||||
private static final int CHIANTA = 30642;
|
||||
|
||||
// Monsters
|
||||
private static final int TYRANT = 20192;
|
||||
private static final int MARSH_STAKATO_DRONE = 20234;
|
||||
private static final int GUARDIAN_BASILISK = 20550;
|
||||
private static final int MANASHEN_GARGOYLE = 20563;
|
||||
private static final int TIMAK_ORC = 20583;
|
||||
private static final int TIMAK_ORC_ARCHER = 20584;
|
||||
private static final int TIMAK_ORC_SOLDIER = 20585;
|
||||
private static final int TIMAK_ORC_WARRIOR = 20586;
|
||||
private static final int TIMAK_ORC_SHAMAN = 20587;
|
||||
private static final int TIMAK_ORC_OVERLORD = 20588;
|
||||
private static final int TAMLIN_ORC = 20601;
|
||||
private static final int TAMLIN_ORC_ARCHER = 20602;
|
||||
private static final int RAGNA_ORC_OVERLORD = 20778;
|
||||
private static final int RAGNA_ORC_SEER = 20779;
|
||||
private static final int PASHIKA_SON_OF_VOLTAR = 27080;
|
||||
private static final int VULTUS_SON_OF_VOLTAR = 27081;
|
||||
private static final int ENKU_ORC_OVERLORD = 27082;
|
||||
private static final int MAKUM_BUGBEAR_THUG = 27083;
|
||||
private static final int REVENANT_OF_TANTOS_CHIEF = 27086;
|
||||
|
||||
// Checks & Instances
|
||||
private static boolean _sonsOfVoltar = false;
|
||||
private static boolean _enkuOrcOverlords = false;
|
||||
@@ -108,12 +104,9 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
public Q220_TestimonyOfGlory()
|
||||
{
|
||||
super(220, "Testimony of Glory");
|
||||
|
||||
registerQuestItems(VOKIAN_ORDER_1, MANASHEN_SHARD, TYRANT_TALON, GUARDIAN_BASILISK_FANG, VOKIAN_ORDER_2, NECKLACE_OF_AUTHORITY, CHIANTA_ORDER_1, SCEPTER_OF_BREKA, SCEPTER_OF_ENKU, SCEPTER_OF_VUKU, SCEPTER_OF_TUREK, SCEPTER_OF_TUNATH, CHIANTA_ORDER_2, CHIANTA_ORDER_3, TAMLIN_ORC_SKULL, TIMAK_ORC_HEAD, SCEPTER_BOX, PASHIKA_HEAD, VULTUS_HEAD, GLOVE_OF_VOLTAR, ENKU_OVERLORD_HEAD, GLOVE_OF_KEPRA, MAKUM_BUGBEAR_HEAD, GLOVE_OF_BURAI, MANAKIA_LETTER_1, MANAKIA_LETTER_2, KASMAN_LETTER_1, KASMAN_LETTER_2, KASMAN_LETTER_3, DRIKO_CONTRACT, STAKATO_DRONE_HUSK, TANAPI_ORDER, SCEPTER_OF_TANTOS, RITUAL_BOX);
|
||||
|
||||
addStartNpc(VOKIAN);
|
||||
addTalkId(KASMAN, VOKIAN, MANAKIA, KAKAI, TANAPI, VOLTAR, KEPRA, BURAI, HARAK, DRIKO, CHIANTA);
|
||||
|
||||
addAttackId(RAGNA_ORC_OVERLORD, RAGNA_ORC_SEER, REVENANT_OF_TANTOS_CHIEF);
|
||||
addKillId(TYRANT, MARSH_STAKATO_DRONE, GUARDIAN_BASILISK, MANASHEN_GARGOYLE, TIMAK_ORC, TIMAK_ORC_ARCHER, TIMAK_ORC_SOLDIER, TIMAK_ORC_WARRIOR, TIMAK_ORC_SHAMAN, TIMAK_ORC_OVERLORD, TAMLIN_ORC, TAMLIN_ORC_ARCHER, RAGNA_ORC_OVERLORD, RAGNA_ORC_SEER, PASHIKA_SON_OF_VOLTAR, VULTUS_SON_OF_VOLTAR, ENKU_ORC_OVERLORD, MAKUM_BUGBEAR_THUG, REVENANT_OF_TANTOS_CHIEF);
|
||||
}
|
||||
@@ -128,225 +121,238 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
// VOKIAN
|
||||
if (event.equals("30514-05.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(VOKIAN_ORDER_1, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange37", false))
|
||||
case "30514-05.htm":
|
||||
{
|
||||
htmltext = "30514-05a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_37.get(player.getRace().ordinal()));
|
||||
player.getVariables().set("secondClassChange37", true);
|
||||
st.startQuest();
|
||||
st.giveItems(VOKIAN_ORDER_1, 1);
|
||||
if (!player.getVariables().getBoolean("secondClassChange37", false))
|
||||
{
|
||||
htmltext = "30514-05a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_37.get(player.getRace().ordinal()));
|
||||
player.getVariables().set("secondClassChange37", true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
// CHIANTA
|
||||
else if (event.equals("30642-03.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(VOKIAN_ORDER_2, 1);
|
||||
st.giveItems(CHIANTA_ORDER_1, 1);
|
||||
}
|
||||
else if (event.equals("30642-07.htm"))
|
||||
{
|
||||
st.takeItems(CHIANTA_ORDER_1, 1);
|
||||
st.takeItems(KASMAN_LETTER_1, 1);
|
||||
st.takeItems(MANAKIA_LETTER_1, 1);
|
||||
st.takeItems(MANAKIA_LETTER_2, 1);
|
||||
st.takeItems(SCEPTER_OF_BREKA, 1);
|
||||
st.takeItems(SCEPTER_OF_ENKU, 1);
|
||||
st.takeItems(SCEPTER_OF_TUNATH, 1);
|
||||
st.takeItems(SCEPTER_OF_TUREK, 1);
|
||||
st.takeItems(SCEPTER_OF_VUKU, 1);
|
||||
|
||||
if (player.getLevel() >= 37)
|
||||
case "30642-03.htm":
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(CHIANTA_ORDER_3, 1);
|
||||
st.takeItems(VOKIAN_ORDER_2, 1);
|
||||
st.giveItems(CHIANTA_ORDER_1, 1);
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30642-07.htm":
|
||||
{
|
||||
st.takeItems(CHIANTA_ORDER_1, 1);
|
||||
st.takeItems(KASMAN_LETTER_1, 1);
|
||||
st.takeItems(MANAKIA_LETTER_1, 1);
|
||||
st.takeItems(MANAKIA_LETTER_2, 1);
|
||||
st.takeItems(SCEPTER_OF_BREKA, 1);
|
||||
st.takeItems(SCEPTER_OF_ENKU, 1);
|
||||
st.takeItems(SCEPTER_OF_TUNATH, 1);
|
||||
st.takeItems(SCEPTER_OF_TUREK, 1);
|
||||
st.takeItems(SCEPTER_OF_VUKU, 1);
|
||||
if (player.getLevel() >= 37)
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(CHIANTA_ORDER_3, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30642-06.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(CHIANTA_ORDER_2, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30501-02.htm":
|
||||
{
|
||||
if (!st.hasQuestItems(SCEPTER_OF_VUKU))
|
||||
{
|
||||
if (st.hasQuestItems(KASMAN_LETTER_1))
|
||||
{
|
||||
htmltext = "30501-04.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30501-03.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(KASMAN_LETTER_1, 1);
|
||||
}
|
||||
st.addRadar(-2150, 124443, -3724);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30501-05.htm":
|
||||
{
|
||||
if (!st.hasQuestItems(SCEPTER_OF_TUREK))
|
||||
{
|
||||
if (st.hasQuestItems(KASMAN_LETTER_2))
|
||||
{
|
||||
htmltext = "30501-07.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30501-06.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(KASMAN_LETTER_2, 1);
|
||||
}
|
||||
st.addRadar(-94294, 110818, -3563);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30501-08.htm":
|
||||
{
|
||||
if (!st.hasQuestItems(SCEPTER_OF_TUNATH))
|
||||
{
|
||||
if (st.hasQuestItems(KASMAN_LETTER_3))
|
||||
{
|
||||
htmltext = "30501-10.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30501-09.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(KASMAN_LETTER_3, 1);
|
||||
}
|
||||
st.addRadar(-55217, 200628, -3724);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30515-02.htm":
|
||||
{
|
||||
if (!st.hasQuestItems(SCEPTER_OF_BREKA))
|
||||
{
|
||||
if (st.hasQuestItems(MANAKIA_LETTER_1))
|
||||
{
|
||||
htmltext = "30515-04.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30515-03.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(MANAKIA_LETTER_1, 1);
|
||||
}
|
||||
st.addRadar(80100, 119991, -2264);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30515-05.htm":
|
||||
{
|
||||
if (!st.hasQuestItems(SCEPTER_OF_ENKU))
|
||||
{
|
||||
if (st.hasQuestItems(MANAKIA_LETTER_2))
|
||||
{
|
||||
htmltext = "30515-07.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30515-06.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(MANAKIA_LETTER_2, 1);
|
||||
}
|
||||
st.addRadar(19815, 189703, -3032);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30615-04.htm":
|
||||
{
|
||||
htmltext = "30642-06.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(CHIANTA_ORDER_2, 1);
|
||||
st.takeItems(MANAKIA_LETTER_1, 1);
|
||||
st.giveItems(GLOVE_OF_VOLTAR, 1);
|
||||
if (!_sonsOfVoltar)
|
||||
{
|
||||
addSpawn(PASHIKA_SON_OF_VOLTAR, 80117, 120039, -2259, 0, false, 200000);
|
||||
addSpawn(VULTUS_SON_OF_VOLTAR, 80058, 120038, -2259, 0, false, 200000);
|
||||
_sonsOfVoltar = true;
|
||||
|
||||
// Resets Sons Of Voltar
|
||||
startQuestTimer("voltar_sons_cleanup", 201000, null, player, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
// KASMAN
|
||||
else if (event.equals("30501-02.htm") && !st.hasQuestItems(SCEPTER_OF_VUKU))
|
||||
{
|
||||
if (st.hasQuestItems(KASMAN_LETTER_1))
|
||||
case "30616-05.htm":
|
||||
{
|
||||
htmltext = "30501-04.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30501-03.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(KASMAN_LETTER_1, 1);
|
||||
st.takeItems(MANAKIA_LETTER_2, 1);
|
||||
st.giveItems(GLOVE_OF_KEPRA, 1);
|
||||
if (!_enkuOrcOverlords)
|
||||
{
|
||||
addSpawn(ENKU_ORC_OVERLORD, 19894, 189743, -3074, 0, false, 200000);
|
||||
addSpawn(ENKU_ORC_OVERLORD, 19869, 189800, -3059, 0, false, 200000);
|
||||
addSpawn(ENKU_ORC_OVERLORD, 19818, 189818, -3047, 0, false, 200000);
|
||||
addSpawn(ENKU_ORC_OVERLORD, 19753, 189837, -3027, 0, false, 200000);
|
||||
_enkuOrcOverlords = true;
|
||||
|
||||
// Resets Enku Orc Overlords
|
||||
startQuestTimer("enku_orcs_cleanup", 201000, null, player, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
st.addRadar(-2150, 124443, -3724);
|
||||
}
|
||||
else if (event.equals("30501-05.htm") && !st.hasQuestItems(SCEPTER_OF_TUREK))
|
||||
{
|
||||
if (st.hasQuestItems(KASMAN_LETTER_2))
|
||||
case "30617-04.htm":
|
||||
{
|
||||
htmltext = "30501-07.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30501-06.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(KASMAN_LETTER_2, 1);
|
||||
st.takeItems(KASMAN_LETTER_2, 1);
|
||||
st.giveItems(GLOVE_OF_BURAI, 1);
|
||||
if (!_makumBugbearThugs)
|
||||
{
|
||||
addSpawn(MAKUM_BUGBEAR_THUG, -94292, 110781, -3701, 0, false, 200000);
|
||||
addSpawn(MAKUM_BUGBEAR_THUG, -94293, 110861, -3701, 0, false, 200000);
|
||||
_makumBugbearThugs = true;
|
||||
|
||||
// Resets Makum Bugbear Thugs
|
||||
startQuestTimer("makum_bugbears_cleanup", 201000, null, player, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
st.addRadar(-94294, 110818, -3563);
|
||||
}
|
||||
else if (event.equals("30501-08.htm") && !st.hasQuestItems(SCEPTER_OF_TUNATH))
|
||||
{
|
||||
if (st.hasQuestItems(KASMAN_LETTER_3))
|
||||
case "30618-03.htm":
|
||||
{
|
||||
htmltext = "30501-10.htm";
|
||||
st.takeItems(KASMAN_LETTER_3, 1);
|
||||
st.giveItems(SCEPTER_OF_TUNATH, 1);
|
||||
if (st.hasQuestItems(SCEPTER_OF_BREKA, SCEPTER_OF_ENKU, SCEPTER_OF_VUKU, SCEPTER_OF_TUREK))
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30619-03.htm":
|
||||
{
|
||||
htmltext = "30501-09.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(KASMAN_LETTER_3, 1);
|
||||
st.takeItems(KASMAN_LETTER_1, 1);
|
||||
st.giveItems(DRIKO_CONTRACT, 1);
|
||||
break;
|
||||
}
|
||||
st.addRadar(-55217, 200628, -3724);
|
||||
}
|
||||
// MANAKIA
|
||||
else if (event.equals("30515-02.htm") && !st.hasQuestItems(SCEPTER_OF_BREKA))
|
||||
{
|
||||
if (st.hasQuestItems(MANAKIA_LETTER_1))
|
||||
case "30571-03.htm":
|
||||
{
|
||||
htmltext = "30515-04.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30515-03.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(MANAKIA_LETTER_1, 1);
|
||||
}
|
||||
st.addRadar(80100, 119991, -2264);
|
||||
}
|
||||
else if (event.equals("30515-05.htm") && !st.hasQuestItems(SCEPTER_OF_ENKU))
|
||||
{
|
||||
if (st.hasQuestItems(MANAKIA_LETTER_2))
|
||||
{
|
||||
htmltext = "30515-07.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30515-06.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(MANAKIA_LETTER_2, 1);
|
||||
}
|
||||
st.addRadar(19815, 189703, -3032);
|
||||
}
|
||||
// VOLTAR
|
||||
else if (event.equals("30615-04.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(MANAKIA_LETTER_1, 1);
|
||||
st.giveItems(GLOVE_OF_VOLTAR, 1);
|
||||
|
||||
if (!_sonsOfVoltar)
|
||||
{
|
||||
addSpawn(PASHIKA_SON_OF_VOLTAR, 80117, 120039, -2259, 0, false, 200000);
|
||||
addSpawn(VULTUS_SON_OF_VOLTAR, 80058, 120038, -2259, 0, false, 200000);
|
||||
_sonsOfVoltar = true;
|
||||
|
||||
// Resets Sons Of Voltar
|
||||
startQuestTimer("voltar_sons_cleanup", 201000, null, player, false);
|
||||
}
|
||||
}
|
||||
// KEPRA
|
||||
else if (event.equals("30616-05.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(MANAKIA_LETTER_2, 1);
|
||||
st.giveItems(GLOVE_OF_KEPRA, 1);
|
||||
|
||||
if (!_enkuOrcOverlords)
|
||||
{
|
||||
addSpawn(ENKU_ORC_OVERLORD, 19894, 189743, -3074, 0, false, 200000);
|
||||
addSpawn(ENKU_ORC_OVERLORD, 19869, 189800, -3059, 0, false, 200000);
|
||||
addSpawn(ENKU_ORC_OVERLORD, 19818, 189818, -3047, 0, false, 200000);
|
||||
addSpawn(ENKU_ORC_OVERLORD, 19753, 189837, -3027, 0, false, 200000);
|
||||
_enkuOrcOverlords = true;
|
||||
|
||||
// Resets Enku Orc Overlords
|
||||
startQuestTimer("enku_orcs_cleanup", 201000, null, player, false);
|
||||
}
|
||||
}
|
||||
// BURAI
|
||||
else if (event.equals("30617-04.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(KASMAN_LETTER_2, 1);
|
||||
st.giveItems(GLOVE_OF_BURAI, 1);
|
||||
|
||||
if (!_makumBugbearThugs)
|
||||
{
|
||||
addSpawn(MAKUM_BUGBEAR_THUG, -94292, 110781, -3701, 0, false, 200000);
|
||||
addSpawn(MAKUM_BUGBEAR_THUG, -94293, 110861, -3701, 0, false, 200000);
|
||||
_makumBugbearThugs = true;
|
||||
|
||||
// Resets Makum Bugbear Thugs
|
||||
startQuestTimer("makum_bugbears_cleanup", 201000, null, player, false);
|
||||
}
|
||||
}
|
||||
// HARAK
|
||||
else if (event.equals("30618-03.htm"))
|
||||
{
|
||||
st.takeItems(KASMAN_LETTER_3, 1);
|
||||
st.giveItems(SCEPTER_OF_TUNATH, 1);
|
||||
|
||||
if (st.hasQuestItems(SCEPTER_OF_BREKA, SCEPTER_OF_ENKU, SCEPTER_OF_VUKU, SCEPTER_OF_TUREK))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SCEPTER_BOX, 1);
|
||||
st.giveItems(TANAPI_ORDER, 1);
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "voltar_sons_cleanup":
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
_sonsOfVoltar = false;
|
||||
return null;
|
||||
}
|
||||
case "enku_orcs_cleanup":
|
||||
{
|
||||
_enkuOrcOverlords = false;
|
||||
return null;
|
||||
}
|
||||
case "makum_bugbears_cleanup":
|
||||
{
|
||||
_makumBugbearThugs = false;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// DRIKO
|
||||
else if (event.equals("30619-03.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(KASMAN_LETTER_1, 1);
|
||||
st.giveItems(DRIKO_CONTRACT, 1);
|
||||
}
|
||||
// TANAPI
|
||||
else if (event.equals("30571-03.htm"))
|
||||
{
|
||||
st.set("cond", "9");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SCEPTER_BOX, 1);
|
||||
st.giveItems(TANAPI_ORDER, 1);
|
||||
}
|
||||
// Clean ups
|
||||
else if (event.equals("voltar_sons_cleanup"))
|
||||
{
|
||||
_sonsOfVoltar = false;
|
||||
return null;
|
||||
}
|
||||
else if (event.equals("enku_orcs_cleanup"))
|
||||
{
|
||||
_enkuOrcOverlords = false;
|
||||
return null;
|
||||
}
|
||||
else if (event.equals("makum_bugbears_cleanup"))
|
||||
{
|
||||
_makumBugbearThugs = false;
|
||||
return null;
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -365,6 +371,7 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.ORC)
|
||||
{
|
||||
htmltext = "30514-01.htm";
|
||||
@@ -382,12 +389,14 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
htmltext = "30514-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case VOKIAN:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30514-06.htm";
|
||||
@@ -395,7 +404,7 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
else if (cond == 2)
|
||||
{
|
||||
htmltext = "30514-08.htm";
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GUARDIAN_BASILISK_FANG, 10);
|
||||
st.takeItems(MANASHEN_SHARD, 10);
|
||||
@@ -413,8 +422,9 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
htmltext = "30514-10.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case CHIANTA:
|
||||
{
|
||||
if (cond == 3)
|
||||
{
|
||||
htmltext = "30642-01.htm";
|
||||
@@ -430,7 +440,7 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
if (player.getLevel() >= 37)
|
||||
{
|
||||
htmltext = "30642-09.htm";
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CHIANTA_ORDER_2, 1);
|
||||
st.giveItems(CHIANTA_ORDER_3, 1);
|
||||
@@ -452,7 +462,7 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
else if (cond == 7)
|
||||
{
|
||||
htmltext = "30642-11.htm";
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CHIANTA_ORDER_3, 1);
|
||||
st.takeItems(NECKLACE_OF_AUTHORITY, 1);
|
||||
@@ -469,8 +479,9 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
htmltext = "30642-13.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KASMAN:
|
||||
{
|
||||
if (st.hasQuestItems(CHIANTA_ORDER_1))
|
||||
{
|
||||
htmltext = "30501-01.htm";
|
||||
@@ -480,8 +491,9 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
htmltext = "30501-11.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MANAKIA:
|
||||
{
|
||||
if (st.hasQuestItems(CHIANTA_ORDER_1))
|
||||
{
|
||||
htmltext = "30515-01.htm";
|
||||
@@ -491,8 +503,9 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
htmltext = "30515-08.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case VOLTAR:
|
||||
{
|
||||
if (cond > 3)
|
||||
{
|
||||
if (st.hasQuestItems(MANAKIA_LETTER_1))
|
||||
@@ -522,7 +535,7 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
|
||||
if (st.hasQuestItems(SCEPTER_OF_ENKU, SCEPTER_OF_VUKU, SCEPTER_OF_TUREK, SCEPTER_OF_TUNATH))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -544,8 +557,9 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KEPRA:
|
||||
{
|
||||
if (cond > 3)
|
||||
{
|
||||
if (st.hasQuestItems(MANAKIA_LETTER_2))
|
||||
@@ -577,7 +591,7 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
|
||||
if (st.hasQuestItems(SCEPTER_OF_BREKA, SCEPTER_OF_VUKU, SCEPTER_OF_TUREK, SCEPTER_OF_TUNATH))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -599,8 +613,9 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BURAI:
|
||||
{
|
||||
if (cond > 3)
|
||||
{
|
||||
if (st.hasQuestItems(KASMAN_LETTER_2))
|
||||
@@ -630,7 +645,7 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
|
||||
if (st.hasQuestItems(SCEPTER_OF_BREKA, SCEPTER_OF_VUKU, SCEPTER_OF_ENKU, SCEPTER_OF_TUNATH))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -652,8 +667,9 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case HARAK:
|
||||
{
|
||||
if (cond > 3)
|
||||
{
|
||||
if (st.hasQuestItems(KASMAN_LETTER_3))
|
||||
@@ -675,8 +691,9 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DRIKO:
|
||||
{
|
||||
if (cond > 3)
|
||||
{
|
||||
if (st.hasQuestItems(KASMAN_LETTER_1))
|
||||
@@ -695,7 +712,7 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
|
||||
if (st.hasQuestItems(SCEPTER_OF_BREKA, SCEPTER_OF_TUREK, SCEPTER_OF_ENKU, SCEPTER_OF_TUNATH))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -722,8 +739,9 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TANAPI:
|
||||
{
|
||||
if (cond == 8)
|
||||
{
|
||||
htmltext = "30571-01.htm";
|
||||
@@ -735,7 +753,7 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
else if (cond == 10)
|
||||
{
|
||||
htmltext = "30571-05.htm";
|
||||
st.set("cond", "11");
|
||||
st.setCond(11);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SCEPTER_OF_TANTOS, 1);
|
||||
st.takeItems(TANAPI_ORDER, 1);
|
||||
@@ -746,8 +764,9 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
htmltext = "30571-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KAKAI:
|
||||
{
|
||||
if ((cond > 7) && (cond < 11))
|
||||
{
|
||||
htmltext = "30565-01.htm";
|
||||
@@ -763,12 +782,15 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -783,21 +805,21 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
final int cond = st.getInt("cond");
|
||||
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case RAGNA_ORC_OVERLORD:
|
||||
case RAGNA_ORC_SEER:
|
||||
if ((cond == 9) && npc.isScriptValue(0))
|
||||
{
|
||||
if (st.isCond(9) && npc.isScriptValue(0))
|
||||
{
|
||||
npc.broadcastNpcSay("Is it a lackey of Kakai?!");
|
||||
npc.setScriptValue(1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case REVENANT_OF_TANTOS_CHIEF:
|
||||
if (cond == 9)
|
||||
{
|
||||
if (st.isCond(9))
|
||||
{
|
||||
if (npc.isScriptValue(0))
|
||||
{
|
||||
@@ -811,6 +833,7 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -825,39 +848,42 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
final int cond = st.getInt("cond");
|
||||
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case TYRANT:
|
||||
if ((cond == 1) && st.dropItems(TYRANT_TALON, 1, 10, 500000) && ((st.getQuestItemsCount(GUARDIAN_BASILISK_FANG) + st.getQuestItemsCount(MANASHEN_SHARD)) == 20))
|
||||
{
|
||||
if (st.isCond(1) && st.dropItems(TYRANT_TALON, 1, 10, 500000) && ((st.getQuestItemsCount(GUARDIAN_BASILISK_FANG) + st.getQuestItemsCount(MANASHEN_SHARD)) == 20))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GUARDIAN_BASILISK:
|
||||
if ((cond == 1) && st.dropItems(GUARDIAN_BASILISK_FANG, 1, 10, 500000) && ((st.getQuestItemsCount(TYRANT_TALON) + st.getQuestItemsCount(MANASHEN_SHARD)) == 20))
|
||||
{
|
||||
if (st.isCond(1) && st.dropItems(GUARDIAN_BASILISK_FANG, 1, 10, 500000) && ((st.getQuestItemsCount(TYRANT_TALON) + st.getQuestItemsCount(MANASHEN_SHARD)) == 20))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MANASHEN_GARGOYLE:
|
||||
if ((cond == 1) && st.dropItems(MANASHEN_SHARD, 1, 10, 750000) && ((st.getQuestItemsCount(TYRANT_TALON) + st.getQuestItemsCount(GUARDIAN_BASILISK_FANG)) == 20))
|
||||
{
|
||||
if (st.isCond(1) && st.dropItems(MANASHEN_SHARD, 1, 10, 750000) && ((st.getQuestItemsCount(TYRANT_TALON) + st.getQuestItemsCount(GUARDIAN_BASILISK_FANG)) == 20))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARSH_STAKATO_DRONE:
|
||||
{
|
||||
if (st.hasQuestItems(DRIKO_CONTRACT))
|
||||
{
|
||||
st.dropItems(STAKATO_DRONE_HUSK, 1, 30, 750000);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case PASHIKA_SON_OF_VOLTAR:
|
||||
{
|
||||
if (st.hasQuestItems(GLOVE_OF_VOLTAR) && !st.hasQuestItems(PASHIKA_HEAD))
|
||||
{
|
||||
st.giveItems(PASHIKA_HEAD, 1);
|
||||
@@ -872,8 +898,9 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case VULTUS_SON_OF_VOLTAR:
|
||||
{
|
||||
if (st.hasQuestItems(GLOVE_OF_VOLTAR) && !st.hasQuestItems(VULTUS_HEAD))
|
||||
{
|
||||
st.giveItems(VULTUS_HEAD, 1);
|
||||
@@ -888,63 +915,71 @@ public class Q220_TestimonyOfGlory extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ENKU_ORC_OVERLORD:
|
||||
{
|
||||
if (st.hasQuestItems(GLOVE_OF_KEPRA) && st.dropItemsAlways(ENKU_OVERLORD_HEAD, 1, 4))
|
||||
{
|
||||
st.takeItems(GLOVE_OF_KEPRA, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MAKUM_BUGBEAR_THUG:
|
||||
{
|
||||
if (st.hasQuestItems(GLOVE_OF_BURAI) && st.dropItemsAlways(MAKUM_BUGBEAR_HEAD, 1, 2))
|
||||
{
|
||||
st.takeItems(GLOVE_OF_BURAI, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TIMAK_ORC:
|
||||
case TIMAK_ORC_ARCHER:
|
||||
case TIMAK_ORC_SOLDIER:
|
||||
case TIMAK_ORC_WARRIOR:
|
||||
case TIMAK_ORC_SHAMAN:
|
||||
case TIMAK_ORC_OVERLORD:
|
||||
if ((cond == 6) && st.dropItems(TIMAK_ORC_HEAD, 1, 20, 500000 + ((npc.getNpcId() - 20583) * 100000)) && (st.getQuestItemsCount(TAMLIN_ORC_SKULL) == 20))
|
||||
{
|
||||
if (st.isCond(6) && st.dropItems(TIMAK_ORC_HEAD, 1, 20, 500000 + ((npc.getNpcId() - 20583) * 100000)) && (st.getQuestItemsCount(TAMLIN_ORC_SKULL) == 20))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TAMLIN_ORC:
|
||||
if ((cond == 6) && st.dropItems(TAMLIN_ORC_SKULL, 1, 20, 500000) && (st.getQuestItemsCount(TIMAK_ORC_HEAD) == 20))
|
||||
{
|
||||
if (st.isCond(6) && st.dropItems(TAMLIN_ORC_SKULL, 1, 20, 500000) && (st.getQuestItemsCount(TIMAK_ORC_HEAD) == 20))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TAMLIN_ORC_ARCHER:
|
||||
if ((cond == 6) && st.dropItems(TAMLIN_ORC_SKULL, 1, 20, 600000) && (st.getQuestItemsCount(TIMAK_ORC_HEAD) == 20))
|
||||
{
|
||||
if (st.isCond(6) && st.dropItems(TAMLIN_ORC_SKULL, 1, 20, 600000) && (st.getQuestItemsCount(TIMAK_ORC_HEAD) == 20))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case RAGNA_ORC_OVERLORD:
|
||||
case RAGNA_ORC_SEER:
|
||||
if (cond == 9)
|
||||
{
|
||||
if (st.isCond(9))
|
||||
{
|
||||
npc.broadcastNpcSay("Too late!");
|
||||
addSpawn(REVENANT_OF_TANTOS_CHIEF, npc, true, 200000);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case REVENANT_OF_TANTOS_CHIEF:
|
||||
if ((cond == 9) && st.dropItemsAlways(SCEPTER_OF_TANTOS, 1, 1))
|
||||
{
|
||||
if (st.isCond(9) && st.dropItemsAlways(SCEPTER_OF_TANTOS, 1, 1))
|
||||
{
|
||||
st.set("cond", "10");
|
||||
st.setCond(10);
|
||||
npc.broadcastNpcSay("I'll get revenge someday!!");
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -26,12 +26,44 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q221_TestimonyOfProsperity extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int WILFORD = 30005;
|
||||
private static final int PARMAN = 30104;
|
||||
private static final int LILITH = 30368;
|
||||
private static final int BRIGHT = 30466;
|
||||
private static final int SHARI = 30517;
|
||||
private static final int MION = 30519;
|
||||
private static final int LOCKIRIN = 30531;
|
||||
private static final int SPIRON = 30532;
|
||||
private static final int BALANKI = 30533;
|
||||
private static final int KEEF = 30534;
|
||||
private static final int FILAUR = 30535;
|
||||
private static final int ARIN = 30536;
|
||||
private static final int MARYSE_REDBONNET = 30553;
|
||||
private static final int BOLTER = 30554;
|
||||
private static final int TOROCCO = 30555;
|
||||
private static final int TOMA = 30556;
|
||||
private static final int PIOTUR = 30597;
|
||||
private static final int EMILY = 30620;
|
||||
private static final int NIKOLA = 30621;
|
||||
private static final int BOX_OF_TITAN = 30622;
|
||||
// Monsters
|
||||
private static final int MANDRAGORA_SPROUT_1 = 20223;
|
||||
private static final int MANDRAGORA_SPROUT_2 = 20154;
|
||||
private static final int MANDRAGORA_SAPLING = 20155;
|
||||
private static final int MANDRAGORA_BLOSSOM = 20156;
|
||||
private static final int MARSH_STAKATO = 20157;
|
||||
private static final int GIANT_CRIMSON_ANT = 20228;
|
||||
private static final int MARSH_STAKATO_WORKER = 20230;
|
||||
private static final int TOAD_LORD = 20231;
|
||||
private static final int MARSH_STAKATO_SOLDIER = 20232;
|
||||
private static final int MARSH_SPIDER = 20233;
|
||||
private static final int MARSH_STAKATO_DRONE = 20234;
|
||||
// Items
|
||||
private static final int ADENA = 57;
|
||||
private static final int ANIMAL_SKIN = 1867;
|
||||
private static final int RECIPE_TITAN_KEY = 3023;
|
||||
private static final int KEY_OF_TITAN = 3030;
|
||||
|
||||
private static final int RING_OF_TESTIMONY_1 = 3239;
|
||||
private static final int RING_OF_TESTIMONY_2 = 3240;
|
||||
private static final int OLD_ACCOUNT_BOOK = 3241;
|
||||
@@ -70,55 +102,16 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
private static final int TOAD_LORD_SAC = 3274;
|
||||
private static final int SPIDER_THORN = 3275;
|
||||
private static final int CRYSTAL_BROOCH = 3428;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_PROSPERITY = 3238;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// NPCs
|
||||
private static final int WILFORD = 30005;
|
||||
private static final int PARMAN = 30104;
|
||||
private static final int LILITH = 30368;
|
||||
private static final int BRIGHT = 30466;
|
||||
private static final int SHARI = 30517;
|
||||
private static final int MION = 30519;
|
||||
private static final int LOCKIRIN = 30531;
|
||||
private static final int SPIRON = 30532;
|
||||
private static final int BALANKI = 30533;
|
||||
private static final int KEEF = 30534;
|
||||
private static final int FILAUR = 30535;
|
||||
private static final int ARIN = 30536;
|
||||
private static final int MARYSE_REDBONNET = 30553;
|
||||
private static final int BOLTER = 30554;
|
||||
private static final int TOROCCO = 30555;
|
||||
private static final int TOMA = 30556;
|
||||
private static final int PIOTUR = 30597;
|
||||
private static final int EMILY = 30620;
|
||||
private static final int NIKOLA = 30621;
|
||||
private static final int BOX_OF_TITAN = 30622;
|
||||
|
||||
// Monsters
|
||||
private static final int MANDRAGORA_SPROUT_1 = 20223;
|
||||
private static final int MANDRAGORA_SPROUT_2 = 20154;
|
||||
private static final int MANDRAGORA_SAPLING = 20155;
|
||||
private static final int MANDRAGORA_BLOSSOM = 20156;
|
||||
private static final int MARSH_STAKATO = 20157;
|
||||
private static final int GIANT_CRIMSON_ANT = 20228;
|
||||
private static final int MARSH_STAKATO_WORKER = 20230;
|
||||
private static final int TOAD_LORD = 20231;
|
||||
private static final int MARSH_STAKATO_SOLDIER = 20232;
|
||||
private static final int MARSH_SPIDER = 20233;
|
||||
private static final int MARSH_STAKATO_DRONE = 20234;
|
||||
|
||||
public Q221_TestimonyOfProsperity()
|
||||
{
|
||||
super(221, "Testimony of Prosperity");
|
||||
|
||||
registerQuestItems(RING_OF_TESTIMONY_1, RING_OF_TESTIMONY_2, OLD_ACCOUNT_BOOK, BLESSED_SEED, EMILY_RECIPE, LILITH_ELVEN_WAFER, MAPHR_TABLET_FRAGMENT, COLLECTION_LICENSE, LOCKIRIN_NOTICE_1, LOCKIRIN_NOTICE_2, LOCKIRIN_NOTICE_3, LOCKIRIN_NOTICE_4, LOCKIRIN_NOTICE_5, CONTRIBUTION_OF_SHARI, CONTRIBUTION_OF_MION, CONTRIBUTION_OF_MARYSE, MARYSE_REQUEST, CONTRIBUTION_OF_TOMA, RECEIPT_OF_BOLTER, RECEIPT_OF_CONTRIBUTION_1, RECEIPT_OF_CONTRIBUTION_2, RECEIPT_OF_CONTRIBUTION_3, RECEIPT_OF_CONTRIBUTION_4, RECEIPT_OF_CONTRIBUTION_5, PROCURATION_OF_TOROCCO, BRIGHT_LIST, MANDRAGORA_PETAL, CRIMSON_MOSS, MANDRAGORA_BOUQUET, PARMAN_INSTRUCTIONS, PARMAN_LETTER, CLAY_DOUGH, PATTERN_OF_KEYHOLE, NIKOLAS_LIST, STAKATO_SHELL, TOAD_LORD_SAC, SPIDER_THORN, CRYSTAL_BROOCH);
|
||||
|
||||
addStartNpc(PARMAN);
|
||||
addTalkId(WILFORD, PARMAN, LILITH, BRIGHT, SHARI, MION, LOCKIRIN, SPIRON, BALANKI, KEEF, FILAUR, ARIN, MARYSE_REDBONNET, BOLTER, TOROCCO, TOMA, PIOTUR, EMILY, NIKOLA, BOX_OF_TITAN);
|
||||
|
||||
addKillId(MANDRAGORA_SPROUT_1, MANDRAGORA_SAPLING, MANDRAGORA_BLOSSOM, MARSH_STAKATO, MANDRAGORA_SPROUT_2, GIANT_CRIMSON_ANT, MARSH_STAKATO_WORKER, TOAD_LORD, MARSH_STAKATO_SOLDIER, MARSH_SPIDER, MARSH_STAKATO_DRONE);
|
||||
}
|
||||
|
||||
@@ -132,158 +125,163 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
// PARMAN
|
||||
if (event.equals("30104-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(RING_OF_TESTIMONY_1, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange37", false))
|
||||
case "30104-04.htm":
|
||||
{
|
||||
htmltext = "30104-04e.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_37.get(player.getRace().ordinal()));
|
||||
player.getVariables().set("secondClassChange37", true);
|
||||
st.startQuest();
|
||||
st.giveItems(RING_OF_TESTIMONY_1, 1);
|
||||
if (!player.getVariables().getBoolean("secondClassChange37", false))
|
||||
{
|
||||
htmltext = "30104-04e.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_37.get(player.getRace().ordinal()));
|
||||
player.getVariables().set("secondClassChange37", true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30104-07.htm"))
|
||||
{
|
||||
st.takeItems(BLESSED_SEED, 1);
|
||||
st.takeItems(EMILY_RECIPE, 1);
|
||||
st.takeItems(LILITH_ELVEN_WAFER, 1);
|
||||
st.takeItems(OLD_ACCOUNT_BOOK, 1);
|
||||
st.takeItems(RING_OF_TESTIMONY_1, 1);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
|
||||
if (player.getLevel() < 38)
|
||||
case "30104-07.htm":
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.giveItems(PARMAN_INSTRUCTIONS, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30104-08.htm";
|
||||
st.set("cond", "4");
|
||||
st.giveItems(PARMAN_LETTER, 1);
|
||||
st.giveItems(RING_OF_TESTIMONY_2, 1);
|
||||
}
|
||||
}
|
||||
// LOCKIRIN
|
||||
else if (event.equals("30531-02.htm") && st.hasQuestItems(COLLECTION_LICENSE))
|
||||
{
|
||||
htmltext = "30531-04.htm";
|
||||
}
|
||||
else if (event.equals("30531-03.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(COLLECTION_LICENSE, 1);
|
||||
st.giveItems(LOCKIRIN_NOTICE_1, 1);
|
||||
st.giveItems(LOCKIRIN_NOTICE_2, 1);
|
||||
st.giveItems(LOCKIRIN_NOTICE_3, 1);
|
||||
st.giveItems(LOCKIRIN_NOTICE_4, 1);
|
||||
st.giveItems(LOCKIRIN_NOTICE_5, 1);
|
||||
}
|
||||
// KEEF
|
||||
else if (event.equals("30534-03a.htm") && (st.getQuestItemsCount(ADENA) >= 5000))
|
||||
{
|
||||
htmltext = "30534-03b.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(ADENA, 5000);
|
||||
st.takeItems(PROCURATION_OF_TOROCCO, 1);
|
||||
st.giveItems(RECEIPT_OF_CONTRIBUTION_3, 1);
|
||||
}
|
||||
// WILFORD
|
||||
else if (event.equals("30005-04.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(CRYSTAL_BROOCH, 1);
|
||||
}
|
||||
// BRIGHT
|
||||
else if (event.equals("30466-03.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(BRIGHT_LIST, 1);
|
||||
}
|
||||
// TOROCCO
|
||||
else if (event.equals("30555-02.htm"))
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(PROCURATION_OF_TOROCCO, 1);
|
||||
}
|
||||
// LILITH
|
||||
else if (event.equals("30368-03.htm"))
|
||||
{
|
||||
st.takeItems(CRYSTAL_BROOCH, 1);
|
||||
st.giveItems(LILITH_ELVEN_WAFER, 1);
|
||||
|
||||
if (st.hasQuestItems(BLESSED_SEED, OLD_ACCOUNT_BOOK, EMILY_RECIPE))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.takeItems(BLESSED_SEED, 1);
|
||||
st.takeItems(EMILY_RECIPE, 1);
|
||||
st.takeItems(LILITH_ELVEN_WAFER, 1);
|
||||
st.takeItems(OLD_ACCOUNT_BOOK, 1);
|
||||
st.takeItems(RING_OF_TESTIMONY_1, 1);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
if (player.getLevel() < 38)
|
||||
{
|
||||
st.setCond(3);
|
||||
st.giveItems(PARMAN_INSTRUCTIONS, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30104-08.htm";
|
||||
st.setCond(4);
|
||||
st.giveItems(PARMAN_LETTER, 1);
|
||||
st.giveItems(RING_OF_TESTIMONY_2, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30531-02.htm":
|
||||
{
|
||||
if (st.hasQuestItems(COLLECTION_LICENSE))
|
||||
{
|
||||
htmltext = "30531-04.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30531-03.htm":
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(COLLECTION_LICENSE, 1);
|
||||
st.giveItems(LOCKIRIN_NOTICE_1, 1);
|
||||
st.giveItems(LOCKIRIN_NOTICE_2, 1);
|
||||
st.giveItems(LOCKIRIN_NOTICE_3, 1);
|
||||
st.giveItems(LOCKIRIN_NOTICE_4, 1);
|
||||
st.giveItems(LOCKIRIN_NOTICE_5, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// PIOTUR
|
||||
else if (event.equals("30597-02.htm"))
|
||||
{
|
||||
st.giveItems(BLESSED_SEED, 1);
|
||||
|
||||
if (st.hasQuestItems(OLD_ACCOUNT_BOOK, EMILY_RECIPE, LILITH_ELVEN_WAFER))
|
||||
case "30534-03a.htm":
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
if (st.getQuestItemsCount(ADENA) >= 5000)
|
||||
{
|
||||
htmltext = "30534-03b.htm";
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.takeItems(ADENA, 5000);
|
||||
st.takeItems(PROCURATION_OF_TOROCCO, 1);
|
||||
st.giveItems(RECEIPT_OF_CONTRIBUTION_3, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30005-04.htm":
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(CRYSTAL_BROOCH, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// EMILY
|
||||
else if (event.equals("30620-03.htm"))
|
||||
{
|
||||
st.takeItems(MANDRAGORA_BOUQUET, 1);
|
||||
st.giveItems(EMILY_RECIPE, 1);
|
||||
|
||||
if (st.hasQuestItems(BLESSED_SEED, OLD_ACCOUNT_BOOK, LILITH_ELVEN_WAFER))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
case "30466-03.htm":
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(BRIGHT_LIST, 1);
|
||||
break;
|
||||
}
|
||||
case "30555-02.htm":
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
st.giveItems(PROCURATION_OF_TOROCCO, 1);
|
||||
break;
|
||||
}
|
||||
case "30368-03.htm":
|
||||
{
|
||||
st.takeItems(CRYSTAL_BROOCH, 1);
|
||||
st.giveItems(LILITH_ELVEN_WAFER, 1);
|
||||
if (st.hasQuestItems(BLESSED_SEED, OLD_ACCOUNT_BOOK, EMILY_RECIPE))
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30597-02.htm":
|
||||
{
|
||||
st.giveItems(BLESSED_SEED, 1);
|
||||
if (st.hasQuestItems(OLD_ACCOUNT_BOOK, EMILY_RECIPE, LILITH_ELVEN_WAFER))
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30620-03.htm":
|
||||
{
|
||||
st.takeItems(MANDRAGORA_BOUQUET, 1);
|
||||
st.giveItems(EMILY_RECIPE, 1);
|
||||
if (st.hasQuestItems(BLESSED_SEED, OLD_ACCOUNT_BOOK, LILITH_ELVEN_WAFER))
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.playSound(QuestState.SOUND_ITEMGET);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30621-04.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(CLAY_DOUGH, 1);
|
||||
break;
|
||||
}
|
||||
case "30622-02.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CLAY_DOUGH, 1);
|
||||
st.giveItems(PATTERN_OF_KEYHOLE, 1);
|
||||
break;
|
||||
}
|
||||
case "30622-04.htm":
|
||||
{
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(KEY_OF_TITAN, 1);
|
||||
st.takeItems(NIKOLAS_LIST, 1);
|
||||
st.takeItems(RECIPE_TITAN_KEY, 1);
|
||||
st.takeItems(STAKATO_SHELL, 20);
|
||||
st.takeItems(SPIDER_THORN, 10);
|
||||
st.takeItems(TOAD_LORD_SAC, 10);
|
||||
st.giveItems(MAPHR_TABLET_FRAGMENT, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// NIKOLA
|
||||
else if (event.equals("30621-04.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(CLAY_DOUGH, 1);
|
||||
}
|
||||
// BOX OF TITAN
|
||||
else if (event.equals("30622-02.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CLAY_DOUGH, 1);
|
||||
st.giveItems(PATTERN_OF_KEYHOLE, 1);
|
||||
}
|
||||
else if (event.equals("30622-04.htm"))
|
||||
{
|
||||
st.set("cond", "9");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(KEY_OF_TITAN, 1);
|
||||
st.takeItems(NIKOLAS_LIST, 1);
|
||||
st.takeItems(RECIPE_TITAN_KEY, 1);
|
||||
st.takeItems(STAKATO_SHELL, 20);
|
||||
st.takeItems(SPIDER_THORN, 10);
|
||||
st.takeItems(TOAD_LORD_SAC, 10);
|
||||
st.giveItems(MAPHR_TABLET_FRAGMENT, 1);
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -302,6 +300,7 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if (player.getRace() != Race.DWARF)
|
||||
{
|
||||
htmltext = "30104-01.htm";
|
||||
@@ -319,12 +318,14 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
htmltext = "30104-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case PARMAN:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30104-05.htm";
|
||||
@@ -342,7 +343,7 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
else
|
||||
{
|
||||
htmltext = "30104-10.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(PARMAN_INSTRUCTIONS, 1);
|
||||
st.giveItems(PARMAN_LETTER, 1);
|
||||
@@ -369,8 +370,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LOCKIRIN:
|
||||
{
|
||||
if ((cond == 1) || (cond == 2))
|
||||
{
|
||||
if (st.hasQuestItems(COLLECTION_LICENSE))
|
||||
@@ -388,7 +390,7 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
|
||||
if (st.hasQuestItems(BLESSED_SEED, EMILY_RECIPE, LILITH_ELVEN_WAFER))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -411,8 +413,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
htmltext = "30531-07.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SPIRON:
|
||||
{
|
||||
if ((cond == 1) && st.hasQuestItems(COLLECTION_LICENSE))
|
||||
{
|
||||
if (st.hasQuestItems(LOCKIRIN_NOTICE_1))
|
||||
@@ -434,8 +437,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BALANKI:
|
||||
{
|
||||
if ((cond == 1) && st.hasQuestItems(COLLECTION_LICENSE))
|
||||
{
|
||||
if (st.hasQuestItems(LOCKIRIN_NOTICE_2))
|
||||
@@ -458,8 +462,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KEEF:
|
||||
{
|
||||
if ((cond == 1) && st.hasQuestItems(COLLECTION_LICENSE))
|
||||
{
|
||||
if (st.hasQuestItems(LOCKIRIN_NOTICE_3))
|
||||
@@ -478,8 +483,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case FILAUR:
|
||||
{
|
||||
if ((cond == 1) && st.hasQuestItems(COLLECTION_LICENSE))
|
||||
{
|
||||
if (st.hasQuestItems(LOCKIRIN_NOTICE_4))
|
||||
@@ -501,8 +507,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ARIN:
|
||||
{
|
||||
if ((cond == 1) && st.hasQuestItems(COLLECTION_LICENSE))
|
||||
{
|
||||
if (st.hasQuestItems(LOCKIRIN_NOTICE_5))
|
||||
@@ -524,8 +531,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SHARI:
|
||||
{
|
||||
if ((cond == 1) && st.hasQuestItems(COLLECTION_LICENSE))
|
||||
{
|
||||
if (st.hasQuestItems(CONTRIBUTION_OF_SHARI))
|
||||
@@ -540,8 +548,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MION:
|
||||
{
|
||||
if ((cond == 1) && st.hasQuestItems(COLLECTION_LICENSE))
|
||||
{
|
||||
if (st.hasQuestItems(CONTRIBUTION_OF_MION))
|
||||
@@ -556,8 +565,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARYSE_REDBONNET:
|
||||
{
|
||||
if ((cond == 1) && st.hasQuestItems(COLLECTION_LICENSE))
|
||||
{
|
||||
if (st.hasQuestItems(MARYSE_REQUEST))
|
||||
@@ -587,8 +597,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TOROCCO:
|
||||
{
|
||||
if ((cond == 1) && st.hasQuestItems(COLLECTION_LICENSE))
|
||||
{
|
||||
if (st.hasQuestItems(PROCURATION_OF_TOROCCO))
|
||||
@@ -601,8 +612,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BOLTER:
|
||||
{
|
||||
if ((cond == 1) && st.hasQuestItems(COLLECTION_LICENSE))
|
||||
{
|
||||
if (st.hasQuestItems(RECEIPT_OF_BOLTER))
|
||||
@@ -617,8 +629,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TOMA:
|
||||
{
|
||||
if ((cond == 1) && st.hasQuestItems(COLLECTION_LICENSE))
|
||||
{
|
||||
if (st.hasQuestItems(CONTRIBUTION_OF_TOMA))
|
||||
@@ -633,8 +646,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case PIOTUR:
|
||||
{
|
||||
if ((cond == 1) || (cond == 2))
|
||||
{
|
||||
htmltext = (st.hasQuestItems(BLESSED_SEED)) ? "30597-03.htm" : "30597-01.htm";
|
||||
@@ -644,8 +658,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
htmltext = "30597-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case WILFORD:
|
||||
{
|
||||
if ((cond == 1) || (cond == 2))
|
||||
{
|
||||
if (st.hasQuestItems(LILITH_ELVEN_WAFER))
|
||||
@@ -662,8 +677,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
htmltext = "30005-07.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LILITH:
|
||||
{
|
||||
if ((cond == 1) || (cond == 2))
|
||||
{
|
||||
if (st.hasQuestItems(CRYSTAL_BROOCH))
|
||||
@@ -680,8 +696,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
htmltext = "30368-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BRIGHT:
|
||||
{
|
||||
if ((cond == 1) || (cond == 2))
|
||||
{
|
||||
if (st.hasQuestItems(EMILY_RECIPE))
|
||||
@@ -718,8 +735,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
htmltext = "30466-08.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case EMILY:
|
||||
{
|
||||
if ((cond == 1) || (cond == 2))
|
||||
{
|
||||
if (st.hasQuestItems(EMILY_RECIPE))
|
||||
@@ -736,8 +754,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
htmltext = "30620-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case NIKOLA:
|
||||
{
|
||||
if (cond == 4)
|
||||
{
|
||||
htmltext = "30621-01.htm";
|
||||
@@ -751,7 +770,7 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
else if (cond == 6)
|
||||
{
|
||||
htmltext = "30621-06.htm";
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(PATTERN_OF_KEYHOLE, 1);
|
||||
st.giveItems(NIKOLAS_LIST, 1);
|
||||
@@ -766,8 +785,9 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
htmltext = "30621-09.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BOX_OF_TITAN:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "30622-01.htm";
|
||||
@@ -781,12 +801,15 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
htmltext = "30622-05.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -801,86 +824,96 @@ public class Q221_TestimonyOfProsperity extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
final int cond = st.getInt("cond");
|
||||
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case MANDRAGORA_SPROUT_1:
|
||||
{
|
||||
if (st.hasQuestItems(BRIGHT_LIST))
|
||||
{
|
||||
st.dropItems(MANDRAGORA_PETAL, 1, 20, 300000);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MANDRAGORA_SPROUT_2:
|
||||
{
|
||||
if (st.hasQuestItems(BRIGHT_LIST))
|
||||
{
|
||||
st.dropItems(MANDRAGORA_PETAL, 1, 20, 600000);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MANDRAGORA_SAPLING:
|
||||
{
|
||||
if (st.hasQuestItems(BRIGHT_LIST))
|
||||
{
|
||||
st.dropItems(MANDRAGORA_PETAL, 1, 20, 800000);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MANDRAGORA_BLOSSOM:
|
||||
{
|
||||
if (st.hasQuestItems(BRIGHT_LIST))
|
||||
{
|
||||
st.dropItemsAlways(MANDRAGORA_PETAL, 1, 20);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GIANT_CRIMSON_ANT:
|
||||
{
|
||||
if (st.hasQuestItems(BRIGHT_LIST))
|
||||
{
|
||||
st.dropItemsAlways(CRIMSON_MOSS, 1, 10);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARSH_STAKATO:
|
||||
if ((cond == 7) && st.dropItems(STAKATO_SHELL, 1, 20, 200000) && ((st.getQuestItemsCount(TOAD_LORD_SAC) + st.getQuestItemsCount(SPIDER_THORN)) == 20))
|
||||
{
|
||||
if (st.isCond(7) && st.dropItems(STAKATO_SHELL, 1, 20, 200000) && ((st.getQuestItemsCount(TOAD_LORD_SAC) + st.getQuestItemsCount(SPIDER_THORN)) == 20))
|
||||
{
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARSH_STAKATO_WORKER:
|
||||
if ((cond == 7) && st.dropItems(STAKATO_SHELL, 1, 20, 300000) && ((st.getQuestItemsCount(TOAD_LORD_SAC) + st.getQuestItemsCount(SPIDER_THORN)) == 20))
|
||||
{
|
||||
if (st.isCond(7) && st.dropItems(STAKATO_SHELL, 1, 20, 300000) && ((st.getQuestItemsCount(TOAD_LORD_SAC) + st.getQuestItemsCount(SPIDER_THORN)) == 20))
|
||||
{
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARSH_STAKATO_SOLDIER:
|
||||
if ((cond == 7) && st.dropItems(STAKATO_SHELL, 1, 20, 500000) && ((st.getQuestItemsCount(TOAD_LORD_SAC) + st.getQuestItemsCount(SPIDER_THORN)) == 20))
|
||||
{
|
||||
if (st.isCond(7) && st.dropItems(STAKATO_SHELL, 1, 20, 500000) && ((st.getQuestItemsCount(TOAD_LORD_SAC) + st.getQuestItemsCount(SPIDER_THORN)) == 20))
|
||||
{
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARSH_STAKATO_DRONE:
|
||||
if ((cond == 7) && st.dropItems(STAKATO_SHELL, 1, 20, 600000) && ((st.getQuestItemsCount(TOAD_LORD_SAC) + st.getQuestItemsCount(SPIDER_THORN)) == 20))
|
||||
{
|
||||
if (st.isCond(7) && st.dropItems(STAKATO_SHELL, 1, 20, 600000) && ((st.getQuestItemsCount(TOAD_LORD_SAC) + st.getQuestItemsCount(SPIDER_THORN)) == 20))
|
||||
{
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TOAD_LORD:
|
||||
if ((cond == 7) && st.dropItems(TOAD_LORD_SAC, 1, 10, 200000) && ((st.getQuestItemsCount(STAKATO_SHELL) + st.getQuestItemsCount(SPIDER_THORN)) == 30))
|
||||
{
|
||||
if (st.isCond(7) && st.dropItems(TOAD_LORD_SAC, 1, 10, 200000) && ((st.getQuestItemsCount(STAKATO_SHELL) + st.getQuestItemsCount(SPIDER_THORN)) == 30))
|
||||
{
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARSH_SPIDER:
|
||||
if ((cond == 7) && st.dropItems(SPIDER_THORN, 1, 10, 200000) && ((st.getQuestItemsCount(STAKATO_SHELL) + st.getQuestItemsCount(TOAD_LORD_SAC)) == 30))
|
||||
{
|
||||
if (st.isCond(7) && st.dropItems(SPIDER_THORN, 1, 10, 200000) && ((st.getQuestItemsCount(STAKATO_SHELL) + st.getQuestItemsCount(TOAD_LORD_SAC)) == 30))
|
||||
{
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -28,7 +28,22 @@ public class Q222_TestOfTheDuelist extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int KAIEN = 30623;
|
||||
|
||||
// Monsters
|
||||
private static final int PUNCHER = 20085;
|
||||
private static final int NOBLE_ANT_LEADER = 20090;
|
||||
private static final int MARSH_STAKATO_DRONE = 20234;
|
||||
private static final int DEAD_SEEKER = 20202;
|
||||
private static final int BREKA_ORC_OVERLORD = 20270;
|
||||
private static final int FETTERED_SOUL = 20552;
|
||||
private static final int LETO_LIZARDMAN_OVERLORD = 20582;
|
||||
private static final int ENCHANTED_MONSTEREYE = 20564;
|
||||
private static final int TAMLIN_ORC = 20601;
|
||||
private static final int TAMLIN_ORC_ARCHER = 20602;
|
||||
private static final int EXCURO = 20214;
|
||||
private static final int KRATOR = 20217;
|
||||
private static final int GRANDIS = 20554;
|
||||
private static final int TIMAK_ORC_OVERLORD = 20588;
|
||||
private static final int LAKIN = 20604;
|
||||
// Items
|
||||
private static final int ORDER_GLUDIO = 2763;
|
||||
private static final int ORDER_DION = 2764;
|
||||
@@ -51,37 +66,16 @@ public class Q222_TestOfTheDuelist extends Quest
|
||||
private static final int GRANDIS_SKIN = 2781;
|
||||
private static final int TIMAK_ORC_BELT = 2782;
|
||||
private static final int LAKIN_MACE = 2783;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_DUELIST = 2762;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// Monsters
|
||||
private static final int PUNCHER = 20085;
|
||||
private static final int NOBLE_ANT_LEADER = 20090;
|
||||
private static final int MARSH_STAKATO_DRONE = 20234;
|
||||
private static final int DEAD_SEEKER = 20202;
|
||||
private static final int BREKA_ORC_OVERLORD = 20270;
|
||||
private static final int FETTERED_SOUL = 20552;
|
||||
private static final int LETO_LIZARDMAN_OVERLORD = 20582;
|
||||
private static final int ENCHANTED_MONSTEREYE = 20564;
|
||||
private static final int TAMLIN_ORC = 20601;
|
||||
private static final int TAMLIN_ORC_ARCHER = 20602;
|
||||
private static final int EXCURO = 20214;
|
||||
private static final int KRATOR = 20217;
|
||||
private static final int GRANDIS = 20554;
|
||||
private static final int TIMAK_ORC_OVERLORD = 20588;
|
||||
private static final int LAKIN = 20604;
|
||||
|
||||
public Q222_TestOfTheDuelist()
|
||||
{
|
||||
super(222, "Test of the Duelist");
|
||||
|
||||
registerQuestItems(ORDER_GLUDIO, ORDER_DION, ORDER_GIRAN, ORDER_OREN, ORDER_ADEN, FINAL_ORDER, PUNCHER_SHARD, NOBLE_ANT_FEELER, DRONE_CHITIN, DEAD_SEEKER_FANG, OVERLORD_NECKLACE, FETTERED_SOUL_CHAIN, CHIEF_AMULET, ENCHANTED_EYE_MEAT, TAMRIN_ORC_RING, TAMRIN_ORC_ARROW, EXCURO_SKIN, KRATOR_SHARD, GRANDIS_SKIN, TIMAK_ORC_BELT, LAKIN_MACE);
|
||||
|
||||
addStartNpc(KAIEN);
|
||||
addTalkId(KAIEN);
|
||||
|
||||
addKillId(PUNCHER, NOBLE_ANT_LEADER, MARSH_STAKATO_DRONE, DEAD_SEEKER, BREKA_ORC_OVERLORD, FETTERED_SOUL, LETO_LIZARDMAN_OVERLORD, ENCHANTED_MONSTEREYE, TAMLIN_ORC, TAMLIN_ORC_ARCHER, EXCURO, KRATOR, GRANDIS, TIMAK_ORC_OVERLORD, LAKIN);
|
||||
}
|
||||
|
||||
@@ -95,57 +89,60 @@ public class Q222_TestOfTheDuelist extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30623-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
if (player.getRace() == Race.ORC)
|
||||
case "30623-04.htm":
|
||||
{
|
||||
htmltext = "30623-05.htm";
|
||||
if (player.getRace() == Race.ORC)
|
||||
{
|
||||
htmltext = "30623-05.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30623-07.htm"))
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(ORDER_GLUDIO, 1);
|
||||
st.giveItems(ORDER_DION, 1);
|
||||
st.giveItems(ORDER_GIRAN, 1);
|
||||
st.giveItems(ORDER_OREN, 1);
|
||||
st.giveItems(ORDER_ADEN, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange39", false))
|
||||
case "30623-07.htm":
|
||||
{
|
||||
htmltext = "30623-07a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange39", true);
|
||||
st.startQuest();
|
||||
st.setCond(2);
|
||||
st.giveItems(ORDER_GLUDIO, 1);
|
||||
st.giveItems(ORDER_DION, 1);
|
||||
st.giveItems(ORDER_GIRAN, 1);
|
||||
st.giveItems(ORDER_OREN, 1);
|
||||
st.giveItems(ORDER_ADEN, 1);
|
||||
if (!player.getVariables().getBoolean("secondClassChange39", false))
|
||||
{
|
||||
htmltext = "30623-07a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange39", true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30623-16.htm"))
|
||||
{
|
||||
if (st.getInt("cond") == 3)
|
||||
case "30623-16.htm":
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
|
||||
st.takeItems(ORDER_GLUDIO, 1);
|
||||
st.takeItems(ORDER_DION, 1);
|
||||
st.takeItems(ORDER_GIRAN, 1);
|
||||
st.takeItems(ORDER_OREN, 1);
|
||||
st.takeItems(ORDER_ADEN, 1);
|
||||
|
||||
st.takeItems(PUNCHER_SHARD, -1);
|
||||
st.takeItems(NOBLE_ANT_FEELER, -1);
|
||||
st.takeItems(DRONE_CHITIN, -1);
|
||||
st.takeItems(DEAD_SEEKER_FANG, -1);
|
||||
st.takeItems(OVERLORD_NECKLACE, -1);
|
||||
st.takeItems(FETTERED_SOUL_CHAIN, -1);
|
||||
st.takeItems(CHIEF_AMULET, -1);
|
||||
st.takeItems(ENCHANTED_EYE_MEAT, -1);
|
||||
st.takeItems(TAMRIN_ORC_RING, -1);
|
||||
st.takeItems(TAMRIN_ORC_ARROW, -1);
|
||||
|
||||
st.giveItems(FINAL_ORDER, 1);
|
||||
if (st.isCond(3))
|
||||
{
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
|
||||
st.takeItems(ORDER_GLUDIO, 1);
|
||||
st.takeItems(ORDER_DION, 1);
|
||||
st.takeItems(ORDER_GIRAN, 1);
|
||||
st.takeItems(ORDER_OREN, 1);
|
||||
st.takeItems(ORDER_ADEN, 1);
|
||||
|
||||
st.takeItems(PUNCHER_SHARD, -1);
|
||||
st.takeItems(NOBLE_ANT_FEELER, -1);
|
||||
st.takeItems(DRONE_CHITIN, -1);
|
||||
st.takeItems(DEAD_SEEKER_FANG, -1);
|
||||
st.takeItems(OVERLORD_NECKLACE, -1);
|
||||
st.takeItems(FETTERED_SOUL_CHAIN, -1);
|
||||
st.takeItems(CHIEF_AMULET, -1);
|
||||
st.takeItems(ENCHANTED_EYE_MEAT, -1);
|
||||
st.takeItems(TAMRIN_ORC_RING, -1);
|
||||
st.takeItems(TAMRIN_ORC_ARROW, -1);
|
||||
|
||||
st.giveItems(FINAL_ORDER, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -165,6 +162,7 @@ public class Q222_TestOfTheDuelist extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
final int classId = player.getClassId().getId();
|
||||
if ((classId != 0x01) && (classId != 0x2f) && (classId != 0x13) && (classId != 0x20))
|
||||
{
|
||||
@@ -179,9 +177,10 @@ public class Q222_TestOfTheDuelist extends Quest
|
||||
htmltext = "30623-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30623-07a.htm";
|
||||
@@ -210,10 +209,12 @@ public class Q222_TestOfTheDuelist extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -228,119 +229,136 @@ public class Q222_TestOfTheDuelist extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
if (st.getInt("cond") == 2)
|
||||
if (st.isCond(2))
|
||||
{
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case PUNCHER:
|
||||
{
|
||||
if (st.dropItemsAlways(PUNCHER_SHARD, 1, 10) && (st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10) && (st.getQuestItemsCount(DRONE_CHITIN) >= 10) && (st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10) && (st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10) && (st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10) && (st.getQuestItemsCount(CHIEF_AMULET) >= 10) && (st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case NOBLE_ANT_LEADER:
|
||||
{
|
||||
if (st.dropItemsAlways(NOBLE_ANT_FEELER, 1, 10) && (st.getQuestItemsCount(PUNCHER_SHARD) >= 10) && (st.getQuestItemsCount(DRONE_CHITIN) >= 10) && (st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10) && (st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10) && (st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10) && (st.getQuestItemsCount(CHIEF_AMULET) >= 10) && (st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARSH_STAKATO_DRONE:
|
||||
{
|
||||
if (st.dropItemsAlways(DRONE_CHITIN, 1, 10) && (st.getQuestItemsCount(PUNCHER_SHARD) >= 10) && (st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10) && (st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10) && (st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10) && (st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10) && (st.getQuestItemsCount(CHIEF_AMULET) >= 10) && (st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DEAD_SEEKER:
|
||||
{
|
||||
if (st.dropItemsAlways(DEAD_SEEKER_FANG, 1, 10) && (st.getQuestItemsCount(PUNCHER_SHARD) >= 10) && (st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10) && (st.getQuestItemsCount(DRONE_CHITIN) >= 10) && (st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10) && (st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10) && (st.getQuestItemsCount(CHIEF_AMULET) >= 10) && (st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BREKA_ORC_OVERLORD:
|
||||
{
|
||||
if (st.dropItemsAlways(OVERLORD_NECKLACE, 1, 10) && (st.getQuestItemsCount(PUNCHER_SHARD) >= 10) && (st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10) && (st.getQuestItemsCount(DRONE_CHITIN) >= 10) && (st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10) && (st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10) && (st.getQuestItemsCount(CHIEF_AMULET) >= 10) && (st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case FETTERED_SOUL:
|
||||
{
|
||||
if (st.dropItemsAlways(FETTERED_SOUL_CHAIN, 1, 10) && (st.getQuestItemsCount(PUNCHER_SHARD) >= 10) && (st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10) && (st.getQuestItemsCount(DRONE_CHITIN) >= 10) && (st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10) && (st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10) && (st.getQuestItemsCount(CHIEF_AMULET) >= 10) && (st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LETO_LIZARDMAN_OVERLORD:
|
||||
{
|
||||
if (st.dropItemsAlways(CHIEF_AMULET, 1, 10) && (st.getQuestItemsCount(PUNCHER_SHARD) >= 10) && (st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10) && (st.getQuestItemsCount(DRONE_CHITIN) >= 10) && (st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10) && (st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10) && (st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10) && (st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ENCHANTED_MONSTEREYE:
|
||||
{
|
||||
if (st.dropItemsAlways(ENCHANTED_EYE_MEAT, 1, 10) && (st.getQuestItemsCount(PUNCHER_SHARD) >= 10) && (st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10) && (st.getQuestItemsCount(DRONE_CHITIN) >= 10) && (st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10) && (st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10) && (st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10) && (st.getQuestItemsCount(CHIEF_AMULET) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TAMLIN_ORC:
|
||||
{
|
||||
if (st.dropItemsAlways(TAMRIN_ORC_RING, 1, 10) && (st.getQuestItemsCount(PUNCHER_SHARD) >= 10) && (st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10) && (st.getQuestItemsCount(DRONE_CHITIN) >= 10) && (st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10) && (st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10) && (st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10) && (st.getQuestItemsCount(CHIEF_AMULET) >= 10) && (st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_ARROW) >= 10))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TAMLIN_ORC_ARCHER:
|
||||
{
|
||||
if (st.dropItemsAlways(TAMRIN_ORC_ARROW, 1, 10) && (st.getQuestItemsCount(PUNCHER_SHARD) >= 10) && (st.getQuestItemsCount(NOBLE_ANT_FEELER) >= 10) && (st.getQuestItemsCount(DRONE_CHITIN) >= 10) && (st.getQuestItemsCount(DEAD_SEEKER_FANG) >= 10) && (st.getQuestItemsCount(OVERLORD_NECKLACE) >= 10) && (st.getQuestItemsCount(FETTERED_SOUL_CHAIN) >= 10) && (st.getQuestItemsCount(CHIEF_AMULET) >= 10) && (st.getQuestItemsCount(ENCHANTED_EYE_MEAT) >= 10) && (st.getQuestItemsCount(TAMRIN_ORC_RING) >= 10))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (st.getInt("cond") == 4)
|
||||
else if (st.isCond(4))
|
||||
{
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case EXCURO:
|
||||
{
|
||||
if (st.dropItemsAlways(EXCURO_SKIN, 1, 3) && (st.getQuestItemsCount(KRATOR_SHARD) >= 3) && (st.getQuestItemsCount(LAKIN_MACE) >= 3) && (st.getQuestItemsCount(GRANDIS_SKIN) >= 3) && (st.getQuestItemsCount(TIMAK_ORC_BELT) >= 3))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KRATOR:
|
||||
{
|
||||
if (st.dropItemsAlways(KRATOR_SHARD, 1, 3) && (st.getQuestItemsCount(EXCURO_SKIN) >= 3) && (st.getQuestItemsCount(LAKIN_MACE) >= 3) && (st.getQuestItemsCount(GRANDIS_SKIN) >= 3) && (st.getQuestItemsCount(TIMAK_ORC_BELT) >= 3))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LAKIN:
|
||||
{
|
||||
if (st.dropItemsAlways(LAKIN_MACE, 1, 3) && (st.getQuestItemsCount(EXCURO_SKIN) >= 3) && (st.getQuestItemsCount(KRATOR_SHARD) >= 3) && (st.getQuestItemsCount(GRANDIS_SKIN) >= 3) && (st.getQuestItemsCount(TIMAK_ORC_BELT) >= 3))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GRANDIS:
|
||||
{
|
||||
if (st.dropItemsAlways(GRANDIS_SKIN, 1, 3) && (st.getQuestItemsCount(EXCURO_SKIN) >= 3) && (st.getQuestItemsCount(KRATOR_SHARD) >= 3) && (st.getQuestItemsCount(LAKIN_MACE) >= 3) && (st.getQuestItemsCount(TIMAK_ORC_BELT) >= 3))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TIMAK_ORC_OVERLORD:
|
||||
{
|
||||
if (st.dropItemsAlways(TIMAK_ORC_BELT, 1, 3) && (st.getQuestItemsCount(EXCURO_SKIN) >= 3) && (st.getQuestItemsCount(KRATOR_SHARD) >= 3) && (st.getQuestItemsCount(LAKIN_MACE) >= 3) && (st.getQuestItemsCount(GRANDIS_SKIN) >= 3))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,25 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q223_TestOfTheChampion extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int ASCALON = 30624;
|
||||
private static final int GROOT = 30093;
|
||||
private static final int MOUEN = 30196;
|
||||
private static final int MASON = 30625;
|
||||
// Monsters
|
||||
private static final int HARPY = 20145;
|
||||
private static final int HARPY_MATRIARCH = 27088;
|
||||
private static final int MEDUSA = 20158;
|
||||
private static final int WINDSUS = 20553;
|
||||
private static final int ROAD_COLLECTOR = 27089;
|
||||
private static final int ROAD_SCAVENGER = 20551;
|
||||
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_SHAMAN = 20581;
|
||||
private static final int LETO_LIZARDMAN_OVERLORD = 20582;
|
||||
private static final int BLOODY_AXE_ELITE = 20780;
|
||||
// Items
|
||||
private static final int ASCALON_LETTER_1 = 3277;
|
||||
private static final int MASON_LETTER = 3278;
|
||||
@@ -47,41 +66,16 @@ public class Q223_TestOfTheChampion extends Quest
|
||||
private static final int BLOODY_AXE_HEAD = 3290;
|
||||
private static final int ROAD_RATMAN_HEAD = 3291;
|
||||
private static final int LETO_LIZARDMAN_FANG = 3292;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_CHAMPION = 3276;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// NPCs
|
||||
private static final int ASCALON = 30624;
|
||||
private static final int GROOT = 30093;
|
||||
private static final int MOUEN = 30196;
|
||||
private static final int MASON = 30625;
|
||||
|
||||
// Monsters
|
||||
private static final int HARPY = 20145;
|
||||
private static final int HARPY_MATRIARCH = 27088;
|
||||
private static final int MEDUSA = 20158;
|
||||
private static final int WINDSUS = 20553;
|
||||
private static final int ROAD_COLLECTOR = 27089;
|
||||
private static final int ROAD_SCAVENGER = 20551;
|
||||
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_SHAMAN = 20581;
|
||||
private static final int LETO_LIZARDMAN_OVERLORD = 20582;
|
||||
private static final int BLOODY_AXE_ELITE = 20780;
|
||||
|
||||
public Q223_TestOfTheChampion()
|
||||
{
|
||||
super(223, "Test of the Champion");
|
||||
|
||||
registerQuestItems(MASON_LETTER, MEDUSA_VENOM, WINDSUS_BILE, WHITE_ROSE_INSIGNIA, HARPY_EGG, GROOT_LETTER, MOUEN_LETTER, ASCALON_LETTER_1, IRON_ROSE_RING, BLOODY_AXE_HEAD, ASCALON_LETTER_2, ASCALON_LETTER_3, MOUEN_ORDER_1, ROAD_RATMAN_HEAD, MOUEN_ORDER_2, LETO_LIZARDMAN_FANG);
|
||||
|
||||
addStartNpc(ASCALON);
|
||||
addTalkId(ASCALON, GROOT, MOUEN, MASON);
|
||||
|
||||
addAttackId(HARPY, ROAD_SCAVENGER);
|
||||
addKillId(HARPY, MEDUSA, HARPY_MATRIARCH, ROAD_COLLECTOR, ROAD_SCAVENGER, WINDSUS, LETO_LIZARDMAN, LETO_LIZARDMAN_ARCHER, LETO_LIZARDMAN_SOLDIER, LETO_LIZARDMAN_WARRIOR, LETO_LIZARDMAN_SHAMAN, LETO_LIZARDMAN_OVERLORD, BLOODY_AXE_ELITE);
|
||||
}
|
||||
@@ -96,62 +90,69 @@ public class Q223_TestOfTheChampion extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if (event.equals("30624-06.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(ASCALON_LETTER_1, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange39", false))
|
||||
case "30624-06.htm":
|
||||
{
|
||||
htmltext = "30624-06a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange39", true);
|
||||
st.startQuest();
|
||||
st.giveItems(ASCALON_LETTER_1, 1);
|
||||
if (!player.getVariables().getBoolean("secondClassChange39", false))
|
||||
{
|
||||
htmltext = "30624-06a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange39", true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30624-10.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MASON_LETTER, 1);
|
||||
st.giveItems(ASCALON_LETTER_2, 1);
|
||||
break;
|
||||
}
|
||||
case "30624-14.htm":
|
||||
{
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GROOT_LETTER, 1);
|
||||
st.giveItems(ASCALON_LETTER_3, 1);
|
||||
break;
|
||||
}
|
||||
case "30625-03.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ASCALON_LETTER_1, 1);
|
||||
st.giveItems(IRON_ROSE_RING, 1);
|
||||
break;
|
||||
}
|
||||
case "30093-02.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ASCALON_LETTER_2, 1);
|
||||
st.giveItems(WHITE_ROSE_INSIGNIA, 1);
|
||||
break;
|
||||
}
|
||||
case "30196-03.htm":
|
||||
{
|
||||
st.setCond(10);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ASCALON_LETTER_3, 1);
|
||||
st.giveItems(MOUEN_ORDER_1, 1);
|
||||
break;
|
||||
}
|
||||
case "30196-06.htm":
|
||||
{
|
||||
st.setCond(12);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MOUEN_ORDER_1, 1);
|
||||
st.takeItems(ROAD_RATMAN_HEAD, 1);
|
||||
st.giveItems(MOUEN_ORDER_2, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30624-10.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MASON_LETTER, 1);
|
||||
st.giveItems(ASCALON_LETTER_2, 1);
|
||||
}
|
||||
else if (event.equals("30624-14.htm"))
|
||||
{
|
||||
st.set("cond", "9");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GROOT_LETTER, 1);
|
||||
st.giveItems(ASCALON_LETTER_3, 1);
|
||||
}
|
||||
else if (event.equals("30625-03.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ASCALON_LETTER_1, 1);
|
||||
st.giveItems(IRON_ROSE_RING, 1);
|
||||
}
|
||||
else if (event.equals("30093-02.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ASCALON_LETTER_2, 1);
|
||||
st.giveItems(WHITE_ROSE_INSIGNIA, 1);
|
||||
}
|
||||
else if (event.equals("30196-03.htm"))
|
||||
{
|
||||
st.set("cond", "10");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ASCALON_LETTER_3, 1);
|
||||
st.giveItems(MOUEN_ORDER_1, 1);
|
||||
}
|
||||
else if (event.equals("30196-06.htm"))
|
||||
{
|
||||
st.set("cond", "12");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MOUEN_ORDER_1, 1);
|
||||
st.takeItems(ROAD_RATMAN_HEAD, 1);
|
||||
st.giveItems(MOUEN_ORDER_2, 1);
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -170,6 +171,7 @@ public class Q223_TestOfTheChampion extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
final ClassId classId = player.getClassId();
|
||||
if ((classId != ClassId.WARRIOR) && (classId != ClassId.ORC_RAIDER))
|
||||
{
|
||||
@@ -184,12 +186,14 @@ public class Q223_TestOfTheChampion extends Quest
|
||||
htmltext = (classId == ClassId.WARRIOR) ? "30624-03.htm" : "30624-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case ASCALON:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30624-07.htm";
|
||||
@@ -233,8 +237,9 @@ public class Q223_TestOfTheChampion extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MASON:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30625-01.htm";
|
||||
@@ -246,7 +251,7 @@ public class Q223_TestOfTheChampion extends Quest
|
||||
else if (cond == 3)
|
||||
{
|
||||
htmltext = "30625-05.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BLOODY_AXE_HEAD, -1);
|
||||
st.takeItems(IRON_ROSE_RING, 1);
|
||||
@@ -261,8 +266,9 @@ public class Q223_TestOfTheChampion extends Quest
|
||||
htmltext = "30625-07.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GROOT:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "30093-01.htm";
|
||||
@@ -274,7 +280,7 @@ public class Q223_TestOfTheChampion extends Quest
|
||||
else if (cond == 7)
|
||||
{
|
||||
htmltext = "30093-04.htm";
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(WHITE_ROSE_INSIGNIA, 1);
|
||||
st.takeItems(HARPY_EGG, -1);
|
||||
@@ -291,8 +297,9 @@ public class Q223_TestOfTheChampion extends Quest
|
||||
htmltext = "30093-06.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MOUEN:
|
||||
{
|
||||
if (cond == 9)
|
||||
{
|
||||
htmltext = "30196-01.htm";
|
||||
@@ -312,7 +319,7 @@ public class Q223_TestOfTheChampion extends Quest
|
||||
else if (cond == 13)
|
||||
{
|
||||
htmltext = "30196-08.htm";
|
||||
st.set("cond", "14");
|
||||
st.setCond(14);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETO_LIZARDMAN_FANG, -1);
|
||||
st.takeItems(MOUEN_ORDER_2, 1);
|
||||
@@ -323,12 +330,15 @@ public class Q223_TestOfTheChampion extends Quest
|
||||
htmltext = "30196-09.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -346,7 +356,8 @@ public class Q223_TestOfTheChampion extends Quest
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case HARPY: // Possibility to spawn an HARPY _MATRIARCH.
|
||||
if ((st.getInt("cond") == 6) && Rnd.nextBoolean() && !npc.isScriptValue(1))
|
||||
{
|
||||
if (st.isCond(6) && Rnd.nextBoolean() && !npc.isScriptValue(1))
|
||||
{
|
||||
final Creature originalKiller = isPet ? attacker.getPet() : attacker;
|
||||
|
||||
@@ -362,9 +373,10 @@ public class Q223_TestOfTheChampion extends Quest
|
||||
npc.setScriptValue(1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ROAD_SCAVENGER: // Possibility to spawn a Road Collector.
|
||||
if ((st.getInt("cond") == 10) && Rnd.nextBoolean() && !npc.isScriptValue(1))
|
||||
{
|
||||
if (st.isCond(10) && Rnd.nextBoolean() && !npc.isScriptValue(1))
|
||||
{
|
||||
final Creature originalKiller = isPet ? attacker.getPet() : attacker;
|
||||
|
||||
@@ -380,6 +392,7 @@ public class Q223_TestOfTheChampion extends Quest
|
||||
npc.setScriptValue(1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -395,57 +408,63 @@ public class Q223_TestOfTheChampion extends Quest
|
||||
}
|
||||
|
||||
final int npcId = npc.getNpcId();
|
||||
|
||||
switch (npcId)
|
||||
{
|
||||
case BLOODY_AXE_ELITE:
|
||||
if ((st.getInt("cond") == 2) && st.dropItemsAlways(BLOODY_AXE_HEAD, 1, 100))
|
||||
{
|
||||
if (st.isCond(2) && st.dropItemsAlways(BLOODY_AXE_HEAD, 1, 100))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case HARPY:
|
||||
case HARPY_MATRIARCH:
|
||||
if ((st.getInt("cond") == 6) && st.dropItems(HARPY_EGG, 1, 30, 500000) && (st.getQuestItemsCount(MEDUSA_VENOM) == 30) && (st.getQuestItemsCount(WINDSUS_BILE) == 30))
|
||||
{
|
||||
if (st.isCond(6) && st.dropItems(HARPY_EGG, 1, 30, 500000) && (st.getQuestItemsCount(MEDUSA_VENOM) == 30) && (st.getQuestItemsCount(WINDSUS_BILE) == 30))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MEDUSA:
|
||||
if ((st.getInt("cond") == 6) && st.dropItems(MEDUSA_VENOM, 1, 30, 500000) && (st.getQuestItemsCount(HARPY_EGG) == 30) && (st.getQuestItemsCount(WINDSUS_BILE) == 30))
|
||||
{
|
||||
if (st.isCond(6) && st.dropItems(MEDUSA_VENOM, 1, 30, 500000) && (st.getQuestItemsCount(HARPY_EGG) == 30) && (st.getQuestItemsCount(WINDSUS_BILE) == 30))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case WINDSUS:
|
||||
if ((st.getInt("cond") == 6) && st.dropItems(WINDSUS_BILE, 1, 30, 500000) && (st.getQuestItemsCount(HARPY_EGG) == 30) && (st.getQuestItemsCount(MEDUSA_VENOM) == 30))
|
||||
{
|
||||
if (st.isCond(6) && st.dropItems(WINDSUS_BILE, 1, 30, 500000) && (st.getQuestItemsCount(HARPY_EGG) == 30) && (st.getQuestItemsCount(MEDUSA_VENOM) == 30))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ROAD_COLLECTOR:
|
||||
case ROAD_SCAVENGER:
|
||||
if ((st.getInt("cond") == 10) && st.dropItemsAlways(ROAD_RATMAN_HEAD, 1, 100))
|
||||
{
|
||||
if (st.isCond(10) && st.dropItemsAlways(ROAD_RATMAN_HEAD, 1, 100))
|
||||
{
|
||||
st.set("cond", "11");
|
||||
st.setCond(11);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LETO_LIZARDMAN:
|
||||
case LETO_LIZARDMAN_ARCHER:
|
||||
case LETO_LIZARDMAN_SOLDIER:
|
||||
case LETO_LIZARDMAN_WARRIOR:
|
||||
case LETO_LIZARDMAN_SHAMAN:
|
||||
case LETO_LIZARDMAN_OVERLORD:
|
||||
if ((st.getInt("cond") == 12) && st.dropItems(LETO_LIZARDMAN_FANG, 1, 100, 500000 + (100000 * (npcId - 20577))))
|
||||
{
|
||||
if (st.isCond(12) && st.dropItems(LETO_LIZARDMAN_FANG, 1, 100, 500000 + (100000 * (npcId - 20577))))
|
||||
{
|
||||
st.set("cond", "13");
|
||||
st.setCond(13);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -28,35 +28,12 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q224_TestOfSagittarius extends Quest
|
||||
{
|
||||
// Items
|
||||
private static final int BERNARD_INTRODUCTION = 3294;
|
||||
private static final int HAMIL_LETTER_1 = 3295;
|
||||
private static final int HAMIL_LETTER_2 = 3296;
|
||||
private static final int HAMIL_LETTER_3 = 3297;
|
||||
private static final int HUNTER_RUNE_1 = 3298;
|
||||
private static final int HUNTER_RUNE_2 = 3299;
|
||||
private static final int TALISMAN_OF_KADESH = 3300;
|
||||
private static final int TALISMAN_OF_SNAKE = 3301;
|
||||
private static final int MITHRIL_CLIP = 3302;
|
||||
private static final int STAKATO_CHITIN = 3303;
|
||||
private static final int REINFORCED_BOWSTRING = 3304;
|
||||
private static final int MANASHEN_HORN = 3305;
|
||||
private static final int BLOOD_OF_LIZARDMAN = 3306;
|
||||
|
||||
private static final int CRESCENT_MOON_BOW = 3028;
|
||||
private static final int WOODEN_ARROW = 17;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_SAGITTARIUS = 3293;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// NPCs
|
||||
private static final int BERNARD = 30702;
|
||||
private static final int HAMIL = 30626;
|
||||
private static final int SIR_ARON_TANFORD = 30653;
|
||||
private static final int VOKIAN = 30514;
|
||||
private static final int GAUEN = 30717;
|
||||
|
||||
// Monsters
|
||||
private static final int ANT = 20079;
|
||||
private static final int ANT_CAPTAIN = 20080;
|
||||
@@ -81,16 +58,32 @@ public class Q224_TestOfSagittarius extends Quest
|
||||
private static final int LETO_LIZARDMAN_SHAMAN = 20581;
|
||||
private static final int LETO_LIZARDMAN_OVERLORD = 20582;
|
||||
private static final int SERPENT_DEMON_KADESH = 27090;
|
||||
// Items
|
||||
private static final int BERNARD_INTRODUCTION = 3294;
|
||||
private static final int HAMIL_LETTER_1 = 3295;
|
||||
private static final int HAMIL_LETTER_2 = 3296;
|
||||
private static final int HAMIL_LETTER_3 = 3297;
|
||||
private static final int HUNTER_RUNE_1 = 3298;
|
||||
private static final int HUNTER_RUNE_2 = 3299;
|
||||
private static final int TALISMAN_OF_KADESH = 3300;
|
||||
private static final int TALISMAN_OF_SNAKE = 3301;
|
||||
private static final int MITHRIL_CLIP = 3302;
|
||||
private static final int STAKATO_CHITIN = 3303;
|
||||
private static final int REINFORCED_BOWSTRING = 3304;
|
||||
private static final int MANASHEN_HORN = 3305;
|
||||
private static final int BLOOD_OF_LIZARDMAN = 3306;
|
||||
private static final int CRESCENT_MOON_BOW = 3028;
|
||||
private static final int WOODEN_ARROW = 17;
|
||||
// Rewards
|
||||
private static final int MARK_OF_SAGITTARIUS = 3293;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
public Q224_TestOfSagittarius()
|
||||
{
|
||||
super(224, "Test of Sagittarius");
|
||||
|
||||
registerQuestItems(BERNARD_INTRODUCTION, HAMIL_LETTER_1, HAMIL_LETTER_2, HAMIL_LETTER_3, HUNTER_RUNE_1, HUNTER_RUNE_2, TALISMAN_OF_KADESH, TALISMAN_OF_SNAKE, MITHRIL_CLIP, STAKATO_CHITIN, REINFORCED_BOWSTRING, MANASHEN_HORN, BLOOD_OF_LIZARDMAN, CRESCENT_MOON_BOW);
|
||||
|
||||
addStartNpc(BERNARD);
|
||||
addTalkId(BERNARD, HAMIL, SIR_ARON_TANFORD, VOKIAN, GAUEN);
|
||||
|
||||
addKillId(ANT, ANT_CAPTAIN, ANT_OVERSEER, ANT_RECRUIT, ANT_PATROL, ANT_GUARD, NOBLE_ANT, NOBLE_ANT_LEADER, BREKA_ORC_SHAMAN, BREKA_ORC_OVERLORD, MARSH_STAKATO_WORKER, MARSH_STAKATO_SOLDIER, MARSH_STAKATO_DRONE, MARSH_SPIDER, ROAD_SCAVENGER, MANASHEN_GARGOYLE, LETO_LIZARDMAN, LETO_LIZARDMAN_ARCHER, LETO_LIZARDMAN_SOLDIER, LETO_LIZARDMAN_WARRIOR, LETO_LIZARDMAN_SHAMAN, LETO_LIZARDMAN_OVERLORD, SERPENT_DEMON_KADESH);
|
||||
}
|
||||
|
||||
@@ -104,49 +97,50 @@ public class Q224_TestOfSagittarius extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
// BERNARD
|
||||
if (event.equals("30702-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(BERNARD_INTRODUCTION, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange39", false))
|
||||
case "30702-04.htm":
|
||||
{
|
||||
htmltext = "30702-04a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange39", true);
|
||||
st.startQuest();
|
||||
st.giveItems(BERNARD_INTRODUCTION, 1);
|
||||
if (!player.getVariables().getBoolean("secondClassChange39", false))
|
||||
{
|
||||
htmltext = "30702-04a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange39", true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30626-03.htm":
|
||||
{
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BERNARD_INTRODUCTION, 1);
|
||||
st.giveItems(HAMIL_LETTER_1, 1);
|
||||
break;
|
||||
}
|
||||
case "30626-07.htm":
|
||||
{
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HUNTER_RUNE_1, 10);
|
||||
st.giveItems(HAMIL_LETTER_2, 1);
|
||||
break;
|
||||
}
|
||||
case "30653-02.htm":
|
||||
{
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HAMIL_LETTER_1, 1);
|
||||
break;
|
||||
}
|
||||
case "30514-02.htm":
|
||||
{
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HAMIL_LETTER_2, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// HAMIL
|
||||
else if (event.equals("30626-03.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BERNARD_INTRODUCTION, 1);
|
||||
st.giveItems(HAMIL_LETTER_1, 1);
|
||||
}
|
||||
else if (event.equals("30626-07.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HUNTER_RUNE_1, 10);
|
||||
st.giveItems(HAMIL_LETTER_2, 1);
|
||||
}
|
||||
// SIR_ARON_TANFORD
|
||||
else if (event.equals("30653-02.htm"))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HAMIL_LETTER_1, 1);
|
||||
}
|
||||
// VOKIAN
|
||||
else if (event.equals("30514-02.htm"))
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HAMIL_LETTER_2, 1);
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -165,6 +159,7 @@ public class Q224_TestOfSagittarius extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getClassId() != ClassId.ROGUE) && (player.getClassId() != ClassId.ELVEN_SCOUT) && (player.getClassId() != ClassId.ASSASSIN))
|
||||
{
|
||||
htmltext = "30702-02.htm";
|
||||
@@ -178,16 +173,19 @@ public class Q224_TestOfSagittarius extends Quest
|
||||
htmltext = "30702-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case BERNARD:
|
||||
{
|
||||
htmltext = "30702-05.htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case HAMIL:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30626-01.htm";
|
||||
@@ -207,7 +205,7 @@ public class Q224_TestOfSagittarius extends Quest
|
||||
else if (cond == 8)
|
||||
{
|
||||
htmltext = "30626-09.htm";
|
||||
st.set("cond", "9");
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HUNTER_RUNE_2, 10);
|
||||
st.giveItems(HAMIL_LETTER_3, 1);
|
||||
@@ -219,7 +217,7 @@ public class Q224_TestOfSagittarius extends Quest
|
||||
else if (cond == 12)
|
||||
{
|
||||
htmltext = "30626-11.htm";
|
||||
st.set("cond", "13");
|
||||
st.setCond(13);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (cond == 13)
|
||||
@@ -239,8 +237,9 @@ public class Q224_TestOfSagittarius extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SIR_ARON_TANFORD:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30653-01.htm";
|
||||
@@ -250,8 +249,9 @@ public class Q224_TestOfSagittarius extends Quest
|
||||
htmltext = "30653-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case VOKIAN:
|
||||
{
|
||||
if (cond == 5)
|
||||
{
|
||||
htmltext = "30514-01.htm";
|
||||
@@ -263,7 +263,7 @@ public class Q224_TestOfSagittarius extends Quest
|
||||
else if (cond == 7)
|
||||
{
|
||||
htmltext = "30514-04.htm";
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(TALISMAN_OF_SNAKE, 1);
|
||||
}
|
||||
@@ -272,12 +272,13 @@ public class Q224_TestOfSagittarius extends Quest
|
||||
htmltext = "30514-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GAUEN:
|
||||
{
|
||||
if (cond == 9)
|
||||
{
|
||||
htmltext = "30717-01.htm";
|
||||
st.set("cond", "10");
|
||||
st.setCond(10);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(HAMIL_LETTER_3, 1);
|
||||
}
|
||||
@@ -288,7 +289,7 @@ public class Q224_TestOfSagittarius extends Quest
|
||||
else if (cond == 11)
|
||||
{
|
||||
htmltext = "30717-02.htm";
|
||||
st.set("cond", "12");
|
||||
st.setCond(12);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MANASHEN_HORN, 1);
|
||||
st.takeItems(MITHRIL_CLIP, 1);
|
||||
@@ -302,12 +303,15 @@ public class Q224_TestOfSagittarius extends Quest
|
||||
htmltext = "30717-04.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -332,58 +336,65 @@ public class Q224_TestOfSagittarius extends Quest
|
||||
case ANT_GUARD:
|
||||
case NOBLE_ANT:
|
||||
case NOBLE_ANT_LEADER:
|
||||
if ((st.getInt("cond") == 3) && st.dropItems(HUNTER_RUNE_1, 1, 10, 500000))
|
||||
{
|
||||
if (st.isCond(3) && st.dropItems(HUNTER_RUNE_1, 1, 10, 500000))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BREKA_ORC_SHAMAN:
|
||||
case BREKA_ORC_OVERLORD:
|
||||
if ((st.getInt("cond") == 6) && st.dropItems(HUNTER_RUNE_2, 1, 10, 500000))
|
||||
{
|
||||
if (st.isCond(6) && st.dropItems(HUNTER_RUNE_2, 1, 10, 500000))
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
st.giveItems(TALISMAN_OF_SNAKE, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARSH_STAKATO_WORKER:
|
||||
case MARSH_STAKATO_SOLDIER:
|
||||
case MARSH_STAKATO_DRONE:
|
||||
if ((st.getInt("cond") == 10) && st.dropItems(STAKATO_CHITIN, 1, 1, 100000) && st.hasQuestItems(MANASHEN_HORN, MITHRIL_CLIP, REINFORCED_BOWSTRING))
|
||||
{
|
||||
if (st.isCond(10) && st.dropItems(STAKATO_CHITIN, 1, 1, 100000) && st.hasQuestItems(MANASHEN_HORN, MITHRIL_CLIP, REINFORCED_BOWSTRING))
|
||||
{
|
||||
st.set("cond", "11");
|
||||
st.setCond(11);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MARSH_SPIDER:
|
||||
if ((st.getInt("cond") == 10) && st.dropItems(REINFORCED_BOWSTRING, 1, 1, 100000) && st.hasQuestItems(MANASHEN_HORN, MITHRIL_CLIP, STAKATO_CHITIN))
|
||||
{
|
||||
if (st.isCond(10) && st.dropItems(REINFORCED_BOWSTRING, 1, 1, 100000) && st.hasQuestItems(MANASHEN_HORN, MITHRIL_CLIP, STAKATO_CHITIN))
|
||||
{
|
||||
st.set("cond", "11");
|
||||
st.setCond(11);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ROAD_SCAVENGER:
|
||||
if ((st.getInt("cond") == 10) && st.dropItems(MITHRIL_CLIP, 1, 1, 100000) && st.hasQuestItems(MANASHEN_HORN, REINFORCED_BOWSTRING, STAKATO_CHITIN))
|
||||
{
|
||||
if (st.isCond(10) && st.dropItems(MITHRIL_CLIP, 1, 1, 100000) && st.hasQuestItems(MANASHEN_HORN, REINFORCED_BOWSTRING, STAKATO_CHITIN))
|
||||
{
|
||||
st.set("cond", "11");
|
||||
st.setCond(11);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MANASHEN_GARGOYLE:
|
||||
if ((st.getInt("cond") == 10) && st.dropItems(MANASHEN_HORN, 1, 1, 100000) && st.hasQuestItems(REINFORCED_BOWSTRING, MITHRIL_CLIP, STAKATO_CHITIN))
|
||||
{
|
||||
if (st.isCond(10) && st.dropItems(MANASHEN_HORN, 1, 1, 100000) && st.hasQuestItems(REINFORCED_BOWSTRING, MITHRIL_CLIP, STAKATO_CHITIN))
|
||||
{
|
||||
st.set("cond", "11");
|
||||
st.setCond(11);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LETO_LIZARDMAN:
|
||||
case LETO_LIZARDMAN_ARCHER:
|
||||
case LETO_LIZARDMAN_SOLDIER:
|
||||
case LETO_LIZARDMAN_WARRIOR:
|
||||
case LETO_LIZARDMAN_SHAMAN:
|
||||
case LETO_LIZARDMAN_OVERLORD:
|
||||
if (st.getInt("cond") == 13)
|
||||
{
|
||||
if (st.isCond(13))
|
||||
{
|
||||
if (((st.getQuestItemsCount(BLOOD_OF_LIZARDMAN) - 120) * 5) > Rnd.get(100))
|
||||
{
|
||||
@@ -397,13 +408,14 @@ public class Q224_TestOfSagittarius extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SERPENT_DEMON_KADESH:
|
||||
if (st.getInt("cond") == 13)
|
||||
{
|
||||
if (st.isCond(13))
|
||||
{
|
||||
if (player.getInventory().getPaperdollItemId(Inventory.PAPERDOLL_RHAND) == CRESCENT_MOON_BOW)
|
||||
{
|
||||
st.set("cond", "14");
|
||||
st.setCond(14);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(TALISMAN_OF_KADESH, 1);
|
||||
}
|
||||
@@ -413,6 +425,7 @@ public class Q224_TestOfSagittarius extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -26,6 +26,22 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q225_TestOfTheSearcher extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int ALEX = 30291;
|
||||
private static final int TYRA = 30420;
|
||||
private static final int TREE = 30627;
|
||||
private static final int STRONG_WOODEN_CHEST = 30628;
|
||||
private static final int LUTHER = 30690;
|
||||
private static final int LEIRYNN = 30728;
|
||||
private static final int BORYS = 30729;
|
||||
private static final int JAX = 30730;
|
||||
// Monsters
|
||||
private static final int HANGMAN_TREE = 20144;
|
||||
private static final int ROAD_SCAVENGER = 20551;
|
||||
private static final int GIANT_FUNGUS = 20555;
|
||||
private static final int DELU_LIZARDMAN_SHAMAN = 20781;
|
||||
private static final int DELU_CHIEF_KALKIS = 27093;
|
||||
private static final int NEER_BODYGUARD = 27092;
|
||||
// Items
|
||||
private static final int LUTHER_LETTER = 2784;
|
||||
private static final int ALEX_WARRANT = 2785;
|
||||
@@ -52,40 +68,18 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
private static final int RUSTED_KEY = 2806;
|
||||
private static final int GOLD_BAR = 2807;
|
||||
private static final int ALEX_RECOMMEND = 2808;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_SEARCHER = 2809;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// NPCs
|
||||
private static final int ALEX = 30291;
|
||||
private static final int TYRA = 30420;
|
||||
private static final int TREE = 30627;
|
||||
private static final int STRONG_WOODEN_CHEST = 30628;
|
||||
private static final int LUTHER = 30690;
|
||||
private static final int LEIRYNN = 30728;
|
||||
private static final int BORYS = 30729;
|
||||
private static final int JAX = 30730;
|
||||
|
||||
// Monsters
|
||||
private static final int HANGMAN_TREE = 20144;
|
||||
private static final int ROAD_SCAVENGER = 20551;
|
||||
private static final int GIANT_FUNGUS = 20555;
|
||||
private static final int DELU_LIZARDMAN_SHAMAN = 20781;
|
||||
private static final int DELU_CHIEF_KALKIS = 27093;
|
||||
private static final int NEER_BODYGUARD = 27092;
|
||||
|
||||
// Misc
|
||||
private static NpcInstance _strongWoodenChest; // Used to avoid to spawn multiple instances.
|
||||
|
||||
public Q225_TestOfTheSearcher()
|
||||
{
|
||||
super(225, "Test of the Searcher");
|
||||
|
||||
registerQuestItems(LUTHER_LETTER, ALEX_WARRANT, LEIRYNN_ORDER_1, DELU_TOTEM, LEIRYNN_ORDER_2, CHIEF_KALKI_FANG, LEIRYNN_REPORT, STRANGE_MAP, LAMBERT_MAP, ALEX_LETTER, ALEX_ORDER, WINE_CATALOG, TYRA_CONTRACT, RED_SPORE_DUST, MALRUKIAN_WINE, OLD_ORDER, JAX_DIARY, TORN_MAP_PIECE_1, TORN_MAP_PIECE_2, SOLT_MAP, MAKEL_MAP, COMBINED_MAP, RUSTED_KEY, GOLD_BAR, ALEX_RECOMMEND);
|
||||
|
||||
addStartNpc(LUTHER);
|
||||
addTalkId(ALEX, TYRA, TREE, STRONG_WOODEN_CHEST, LUTHER, LEIRYNN, BORYS, JAX);
|
||||
|
||||
addAttackId(DELU_LIZARDMAN_SHAMAN);
|
||||
addKillId(HANGMAN_TREE, ROAD_SCAVENGER, GIANT_FUNGUS, DELU_LIZARDMAN_SHAMAN, DELU_CHIEF_KALKIS, NEER_BODYGUARD);
|
||||
}
|
||||
@@ -100,90 +94,89 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
// LUTHER
|
||||
if (event.equals("30690-05.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(LUTHER_LETTER, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange39", false))
|
||||
case "30690-05.htm":
|
||||
{
|
||||
htmltext = "30690-05a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange39", true);
|
||||
}
|
||||
}
|
||||
// ALEX
|
||||
else if (event.equals("30291-07.htm"))
|
||||
{
|
||||
st.set("cond", "8");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LEIRYNN_REPORT, 1);
|
||||
st.takeItems(STRANGE_MAP, 1);
|
||||
st.giveItems(ALEX_LETTER, 1);
|
||||
st.giveItems(ALEX_ORDER, 1);
|
||||
st.giveItems(LAMBERT_MAP, 1);
|
||||
}
|
||||
// TYRA
|
||||
else if (event.equals("30420-01a.htm"))
|
||||
{
|
||||
st.set("cond", "10");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(WINE_CATALOG, 1);
|
||||
st.giveItems(TYRA_CONTRACT, 1);
|
||||
}
|
||||
// JAX
|
||||
else if (event.equals("30730-01d.htm"))
|
||||
{
|
||||
st.set("cond", "14");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(OLD_ORDER, 1);
|
||||
st.giveItems(JAX_DIARY, 1);
|
||||
}
|
||||
// TREE
|
||||
else if (event.equals("30627-01a.htm"))
|
||||
{
|
||||
if (_strongWoodenChest == null)
|
||||
{
|
||||
if (st.getInt("cond") == 16)
|
||||
st.startQuest();
|
||||
st.giveItems(LUTHER_LETTER, 1);
|
||||
if (!player.getVariables().getBoolean("secondClassChange39", false))
|
||||
{
|
||||
st.set("cond", "17");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(RUSTED_KEY, 1);
|
||||
htmltext = "30690-05a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange39", true);
|
||||
}
|
||||
|
||||
_strongWoodenChest = addSpawn(STRONG_WOODEN_CHEST, 10098, 157287, -2406, 0, false, 0);
|
||||
startQuestTimer("chest_despawn", 300000, null, player, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// STRONG WOODEN CHEST
|
||||
else if (event.equals("30628-01a.htm"))
|
||||
{
|
||||
if (!st.hasQuestItems(RUSTED_KEY))
|
||||
case "30291-07.htm":
|
||||
{
|
||||
htmltext = "30628-02.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
st.set("cond", "18");
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(RUSTED_KEY, -1);
|
||||
st.giveItems(GOLD_BAR, 20);
|
||||
|
||||
st.takeItems(LEIRYNN_REPORT, 1);
|
||||
st.takeItems(STRANGE_MAP, 1);
|
||||
st.giveItems(ALEX_LETTER, 1);
|
||||
st.giveItems(ALEX_ORDER, 1);
|
||||
st.giveItems(LAMBERT_MAP, 1);
|
||||
break;
|
||||
}
|
||||
case "30420-01a.htm":
|
||||
{
|
||||
st.setCond(10);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(WINE_CATALOG, 1);
|
||||
st.giveItems(TYRA_CONTRACT, 1);
|
||||
break;
|
||||
}
|
||||
case "30730-01d.htm":
|
||||
{
|
||||
st.setCond(14);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(OLD_ORDER, 1);
|
||||
st.giveItems(JAX_DIARY, 1);
|
||||
break;
|
||||
}
|
||||
case "30627-01a.htm":
|
||||
{
|
||||
if (_strongWoodenChest == null)
|
||||
{
|
||||
if (st.isCond(16))
|
||||
{
|
||||
st.setCond(17);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(RUSTED_KEY, 1);
|
||||
}
|
||||
|
||||
_strongWoodenChest = addSpawn(STRONG_WOODEN_CHEST, 10098, 157287, -2406, 0, false, 0);
|
||||
startQuestTimer("chest_despawn", 300000, null, player, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30628-01a.htm":
|
||||
{
|
||||
if (!st.hasQuestItems(RUSTED_KEY))
|
||||
{
|
||||
htmltext = "30628-02.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
st.setCond(18);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(RUSTED_KEY, -1);
|
||||
st.giveItems(GOLD_BAR, 20);
|
||||
|
||||
_strongWoodenChest.deleteMe();
|
||||
_strongWoodenChest = null;
|
||||
cancelQuestTimer("chest_despawn", null, player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "chest_despawn":
|
||||
{
|
||||
_strongWoodenChest.deleteMe();
|
||||
_strongWoodenChest = null;
|
||||
cancelQuestTimer("chest_despawn", null, player);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// STRONG WOODEN CHEST DESPAWN
|
||||
else if (event.equals("chest_despawn"))
|
||||
{
|
||||
_strongWoodenChest.deleteMe();
|
||||
_strongWoodenChest = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
}
|
||||
@@ -201,6 +194,7 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getClassId() != ClassId.ROGUE) && (player.getClassId() != ClassId.ELVEN_SCOUT) && (player.getClassId() != ClassId.ASSASSIN) && (player.getClassId() != ClassId.SCAVENGER))
|
||||
{
|
||||
htmltext = "30690-01.htm";
|
||||
@@ -214,12 +208,14 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
htmltext = (player.getClassId() == ClassId.SCAVENGER) ? "30690-04.htm" : "30690-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case LUTHER:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30690-06.htm";
|
||||
@@ -239,12 +235,13 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ALEX:
|
||||
{
|
||||
if (cond == 1)
|
||||
{
|
||||
htmltext = "30291-01.htm";
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LUTHER_LETTER, 1);
|
||||
st.giveItems(ALEX_WARRANT, 1);
|
||||
@@ -276,7 +273,7 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
else if (cond == 18)
|
||||
{
|
||||
htmltext = "30291-11.htm";
|
||||
st.set("cond", "19");
|
||||
st.setCond(19);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ALEX_ORDER, 1);
|
||||
st.takeItems(COMBINED_MAP, 1);
|
||||
@@ -288,12 +285,13 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
htmltext = "30291-12.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LEIRYNN:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
htmltext = "30728-01.htm";
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ALEX_WARRANT, 1);
|
||||
st.giveItems(LEIRYNN_ORDER_1, 1);
|
||||
@@ -305,7 +303,7 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
else if (cond == 4)
|
||||
{
|
||||
htmltext = "30728-03.htm";
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(DELU_TOTEM, -1);
|
||||
st.takeItems(LEIRYNN_ORDER_1, 1);
|
||||
@@ -318,7 +316,7 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
else if (cond == 6)
|
||||
{
|
||||
htmltext = "30728-05.htm";
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(CHIEF_KALKI_FANG, 1);
|
||||
st.takeItems(LEIRYNN_ORDER_2, 1);
|
||||
@@ -333,12 +331,13 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
htmltext = "30728-07.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case BORYS:
|
||||
{
|
||||
if (cond == 8)
|
||||
{
|
||||
htmltext = "30729-01.htm";
|
||||
st.set("cond", "9");
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(ALEX_LETTER, 1);
|
||||
st.giveItems(WINE_CATALOG, 1);
|
||||
@@ -350,7 +349,7 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
else if (cond == 12)
|
||||
{
|
||||
htmltext = "30729-03.htm";
|
||||
st.set("cond", "13");
|
||||
st.setCond(13);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(MALRUKIAN_WINE, 1);
|
||||
st.takeItems(WINE_CATALOG, 1);
|
||||
@@ -365,8 +364,9 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
htmltext = "30729-05.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TYRA:
|
||||
{
|
||||
if (cond == 9)
|
||||
{
|
||||
htmltext = "30420-01.htm";
|
||||
@@ -378,7 +378,7 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
else if (cond == 11)
|
||||
{
|
||||
htmltext = "30420-03.htm";
|
||||
st.set("cond", "12");
|
||||
st.setCond(12);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(RED_SPORE_DUST, -1);
|
||||
st.takeItems(TYRA_CONTRACT, 1);
|
||||
@@ -389,8 +389,9 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
htmltext = "30420-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case JAX:
|
||||
{
|
||||
if (cond == 13)
|
||||
{
|
||||
htmltext = "30730-01.htm";
|
||||
@@ -402,7 +403,7 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
else if (cond == 15)
|
||||
{
|
||||
htmltext = "30730-03.htm";
|
||||
st.set("cond", "16");
|
||||
st.setCond(16);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LAMBERT_MAP, 1);
|
||||
st.takeItems(MAKEL_MAP, 1);
|
||||
@@ -415,26 +416,31 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
htmltext = "30730-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case TREE:
|
||||
{
|
||||
if ((cond == 16) || (cond == 17))
|
||||
{
|
||||
htmltext = "30627-01.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case STRONG_WOODEN_CHEST:
|
||||
{
|
||||
if (cond == 17)
|
||||
{
|
||||
htmltext = "30628-01.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -462,11 +468,11 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
public String onKill(NpcInstance npc, PlayerInstance player, boolean isPet)
|
||||
{
|
||||
QuestState st;
|
||||
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case DELU_LIZARDMAN_SHAMAN:
|
||||
st = checkPlayerCondition(player, npc, "cond", "3");
|
||||
{
|
||||
st = checkPlayerCondition(player, npc, 3);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -474,25 +480,27 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
|
||||
if (st.dropItemsAlways(DELU_TOTEM, 1, 10))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DELU_CHIEF_KALKIS:
|
||||
st = checkPlayerCondition(player, npc, "cond", "5");
|
||||
{
|
||||
st = checkPlayerCondition(player, npc, 5);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(CHIEF_KALKI_FANG, 1);
|
||||
st.giveItems(STRANGE_MAP, 1);
|
||||
break;
|
||||
|
||||
}
|
||||
case GIANT_FUNGUS:
|
||||
st = checkPlayerCondition(player, npc, "cond", "10");
|
||||
{
|
||||
st = checkPlayerCondition(player, npc, 10);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -500,12 +508,13 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
|
||||
if (st.dropItemsAlways(RED_SPORE_DUST, 1, 10))
|
||||
{
|
||||
st.set("cond", "11");
|
||||
st.setCond(11);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ROAD_SCAVENGER:
|
||||
st = checkPlayerCondition(player, npc, "cond", "14");
|
||||
{
|
||||
st = checkPlayerCondition(player, npc, 14);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -518,13 +527,14 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
|
||||
if (st.hasQuestItems(MAKEL_MAP))
|
||||
{
|
||||
st.set("cond", "15");
|
||||
st.setCond(15);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case HANGMAN_TREE:
|
||||
st = checkPlayerCondition(player, npc, "cond", "14");
|
||||
{
|
||||
st = checkPlayerCondition(player, npc, 14);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
@@ -537,10 +547,11 @@ public class Q225_TestOfTheSearcher extends Quest
|
||||
|
||||
if (st.hasQuestItems(SOLT_MAP))
|
||||
{
|
||||
st.set("cond", "15");
|
||||
st.setCond(15);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -27,22 +27,6 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q226_TestOfTheHealer extends Quest
|
||||
{
|
||||
// Items
|
||||
private static final int REPORT_OF_PERRIN = 2810;
|
||||
private static final int KRISTINA_LETTER = 2811;
|
||||
private static final int PICTURE_OF_WINDY = 2812;
|
||||
private static final int GOLDEN_STATUE = 2813;
|
||||
private static final int WINDY_PEBBLES = 2814;
|
||||
private static final int ORDER_OF_SORIUS = 2815;
|
||||
private static final int SECRET_LETTER_1 = 2816;
|
||||
private static final int SECRET_LETTER_2 = 2817;
|
||||
private static final int SECRET_LETTER_3 = 2818;
|
||||
private static final int SECRET_LETTER_4 = 2819;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_HEALER = 2820;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// NPCs
|
||||
private static final int BANDELLOS = 30473;
|
||||
private static final int SORIUS = 30327;
|
||||
@@ -57,7 +41,6 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
private static final int KAIN_FLYING_KNIFE = 30664;
|
||||
private static final int KRISTINA = 30665;
|
||||
private static final int DAURIN_HAMMERCRUSH = 30674;
|
||||
|
||||
// Monsters
|
||||
private static final int LETO_LIZARDMAN_LEADER = 27123;
|
||||
private static final int LETO_LIZARDMAN_ASSASSIN = 27124;
|
||||
@@ -65,19 +48,30 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
private static final int LETO_LIZARDMAN_WIZARD = 27126;
|
||||
private static final int LETO_LIZARDMAN_LORD = 27127;
|
||||
private static final int TATOMA = 27134;
|
||||
|
||||
// Items
|
||||
private static final int REPORT_OF_PERRIN = 2810;
|
||||
private static final int KRISTINA_LETTER = 2811;
|
||||
private static final int PICTURE_OF_WINDY = 2812;
|
||||
private static final int GOLDEN_STATUE = 2813;
|
||||
private static final int WINDY_PEBBLES = 2814;
|
||||
private static final int ORDER_OF_SORIUS = 2815;
|
||||
private static final int SECRET_LETTER_1 = 2816;
|
||||
private static final int SECRET_LETTER_2 = 2817;
|
||||
private static final int SECRET_LETTER_3 = 2818;
|
||||
private static final int SECRET_LETTER_4 = 2819;
|
||||
// Rewards
|
||||
private static final int MARK_OF_HEALER = 2820;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
// Misc
|
||||
private NpcInstance _tatoma;
|
||||
private NpcInstance _letoLeader;
|
||||
|
||||
public Q226_TestOfTheHealer()
|
||||
{
|
||||
super(226, "Test of the Healer");
|
||||
|
||||
registerQuestItems(REPORT_OF_PERRIN, KRISTINA_LETTER, PICTURE_OF_WINDY, GOLDEN_STATUE, WINDY_PEBBLES, ORDER_OF_SORIUS, SECRET_LETTER_1, SECRET_LETTER_2, SECRET_LETTER_3, SECRET_LETTER_4);
|
||||
|
||||
addStartNpc(BANDELLOS);
|
||||
addTalkId(BANDELLOS, SORIUS, ALLANA, PERRIN, GUPU, ORPHAN_GIRL, WINDY_SHAORING, MYSTERIOUS_DARKELF, PIPER_LONGBOW, SLEIN_SHINING_BLADE, KAIN_FLYING_KNIFE, KRISTINA, DAURIN_HAMMERCRUSH);
|
||||
|
||||
addKillId(LETO_LIZARDMAN_LEADER, LETO_LIZARDMAN_ASSASSIN, LETO_LIZARDMAN_SNIPER, LETO_LIZARDMAN_WIZARD, LETO_LIZARDMAN_LORD, TATOMA);
|
||||
}
|
||||
|
||||
@@ -91,110 +85,110 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
// BANDELLOS
|
||||
if (event.equals("30473-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(REPORT_OF_PERRIN, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange39", false))
|
||||
case "30473-04.htm":
|
||||
{
|
||||
htmltext = "30473-04a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange39", true);
|
||||
st.startQuest();
|
||||
st.giveItems(REPORT_OF_PERRIN, 1);
|
||||
if (!player.getVariables().getBoolean("secondClassChange39", false))
|
||||
{
|
||||
htmltext = "30473-04a.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange39", true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30473-09.htm"))
|
||||
{
|
||||
st.takeItems(GOLDEN_STATUE, 1);
|
||||
st.giveItems(MARK_OF_HEALER, 1);
|
||||
st.rewardExpAndSp(134839, 50000);
|
||||
player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
}
|
||||
// PERRIN
|
||||
else if (event.equals("30428-02.htm"))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
|
||||
if (_tatoma == null)
|
||||
case "30473-09.htm":
|
||||
{
|
||||
_tatoma = addSpawn(TATOMA, -93254, 147559, -2679, 0, false, 0);
|
||||
startQuestTimer("tatoma_despawn", 200000, null, player, false);
|
||||
st.takeItems(GOLDEN_STATUE, 1);
|
||||
st.giveItems(MARK_OF_HEALER, 1);
|
||||
st.rewardExpAndSp(134839, 50000);
|
||||
player.broadcastPacket(new SocialAction(player.getObjectId(), 3));
|
||||
st.playSound(QuestState.SOUND_FINISH);
|
||||
st.exitQuest(false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// GUPU
|
||||
else if (event.equals("30658-02.htm"))
|
||||
{
|
||||
if (st.getQuestItemsCount(57) >= 100000)
|
||||
case "30428-02.htm":
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(2);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(57, 100000);
|
||||
st.giveItems(PICTURE_OF_WINDY, 1);
|
||||
if (_tatoma == null)
|
||||
{
|
||||
_tatoma = addSpawn(TATOMA, -93254, 147559, -2679, 0, false, 0);
|
||||
startQuestTimer("tatoma_despawn", 200000, null, player, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
case "30658-02.htm":
|
||||
{
|
||||
htmltext = "30658-05.htm";
|
||||
if (st.getQuestItemsCount(57) >= 100000)
|
||||
{
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(57, 100000);
|
||||
st.giveItems(PICTURE_OF_WINDY, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "30658-05.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30658-03.htm"))
|
||||
{
|
||||
st.set("gupu", "1");
|
||||
}
|
||||
else if (event.equals("30658-07.htm"))
|
||||
{
|
||||
st.set("cond", "9");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
// WINDY SHAORING
|
||||
else if (event.equals("30660-03.htm"))
|
||||
{
|
||||
st.set("cond", "8");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(PICTURE_OF_WINDY, 1);
|
||||
st.giveItems(WINDY_PEBBLES, 1);
|
||||
}
|
||||
// DAURIN HAMMERCRUSH
|
||||
else if (event.equals("30674-02.htm"))
|
||||
{
|
||||
st.set("cond", "11");
|
||||
st.playSound(QuestState.SOUND_BEFORE_BATTLE);
|
||||
st.takeItems(ORDER_OF_SORIUS, 1);
|
||||
|
||||
if (_letoLeader == null)
|
||||
case "30658-03.htm":
|
||||
{
|
||||
_letoLeader = addSpawn(LETO_LIZARDMAN_LEADER, -97441, 106585, -3405, 0, false, 0);
|
||||
startQuestTimer("leto_leader_despawn", 200000, null, player, false);
|
||||
st.set("gupu", "1");
|
||||
break;
|
||||
}
|
||||
case "30658-07.htm":
|
||||
{
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
break;
|
||||
}
|
||||
case "30660-03.htm":
|
||||
{
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(PICTURE_OF_WINDY, 1);
|
||||
st.giveItems(WINDY_PEBBLES, 1);
|
||||
break;
|
||||
}
|
||||
case "30674-02.htm":
|
||||
{
|
||||
st.setCond(11);
|
||||
st.playSound(QuestState.SOUND_BEFORE_BATTLE);
|
||||
st.takeItems(ORDER_OF_SORIUS, 1);
|
||||
if (_letoLeader == null)
|
||||
{
|
||||
_letoLeader = addSpawn(LETO_LIZARDMAN_LEADER, -97441, 106585, -3405, 0, false, 0);
|
||||
startQuestTimer("leto_leader_despawn", 200000, null, player, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "30665-02.htm":
|
||||
{
|
||||
st.setCond(22);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SECRET_LETTER_1, 1);
|
||||
st.takeItems(SECRET_LETTER_2, 1);
|
||||
st.takeItems(SECRET_LETTER_3, 1);
|
||||
st.takeItems(SECRET_LETTER_4, 1);
|
||||
st.giveItems(KRISTINA_LETTER, 1);
|
||||
break;
|
||||
}
|
||||
case "tatoma_despawn":
|
||||
{
|
||||
_tatoma.deleteMe();
|
||||
_tatoma = null;
|
||||
return null;
|
||||
}
|
||||
case "leto_leader_despawn":
|
||||
{
|
||||
_letoLeader.deleteMe();
|
||||
_letoLeader = null;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// KRISTINA
|
||||
else if (event.equals("30665-02.htm"))
|
||||
{
|
||||
st.set("cond", "22");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SECRET_LETTER_1, 1);
|
||||
st.takeItems(SECRET_LETTER_2, 1);
|
||||
st.takeItems(SECRET_LETTER_3, 1);
|
||||
st.takeItems(SECRET_LETTER_4, 1);
|
||||
st.giveItems(KRISTINA_LETTER, 1);
|
||||
}
|
||||
// DESPAWNS
|
||||
else if (event.equals("tatoma_despawn"))
|
||||
{
|
||||
_tatoma.deleteMe();
|
||||
_tatoma = null;
|
||||
return null;
|
||||
}
|
||||
else if (event.equals("leto_leader_despawn"))
|
||||
{
|
||||
_letoLeader.deleteMe();
|
||||
_letoLeader = null;
|
||||
return null;
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -213,6 +207,7 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getClassId() != ClassId.KNIGHT) && (player.getClassId() != ClassId.ELVEN_KNIGHT) && (player.getClassId() != ClassId.CLERIC) && (player.getClassId() != ClassId.ORACLE))
|
||||
{
|
||||
htmltext = "30473-01.htm";
|
||||
@@ -226,12 +221,14 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
htmltext = "30473-03.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case BANDELLOS:
|
||||
{
|
||||
if (cond < 23)
|
||||
{
|
||||
htmltext = "30473-05.htm";
|
||||
@@ -253,8 +250,9 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case PERRIN:
|
||||
{
|
||||
if (cond < 3)
|
||||
{
|
||||
htmltext = "30428-01.htm";
|
||||
@@ -262,7 +260,7 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
else if (cond == 3)
|
||||
{
|
||||
htmltext = "30428-03.htm";
|
||||
st.set("cond", "4");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(REPORT_OF_PERRIN, 1);
|
||||
}
|
||||
@@ -271,16 +269,18 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
htmltext = "30428-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ORPHAN_GIRL:
|
||||
{
|
||||
htmltext = "30659-0" + Rnd.get(1, 5) + ".htm";
|
||||
break;
|
||||
|
||||
}
|
||||
case ALLANA:
|
||||
{
|
||||
if (cond == 4)
|
||||
{
|
||||
htmltext = "30424-01.htm";
|
||||
st.set("cond", "5");
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (cond > 4)
|
||||
@@ -288,18 +288,19 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
htmltext = "30424-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case GUPU:
|
||||
{
|
||||
if ((st.getInt("gupu") == 1) && (cond != 9))
|
||||
{
|
||||
htmltext = "30658-07.htm";
|
||||
st.set("cond", "9");
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (cond == 5)
|
||||
{
|
||||
htmltext = "30658-01.htm";
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (cond == 6)
|
||||
@@ -322,8 +323,9 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
htmltext = "30658-07.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case WINDY_SHAORING:
|
||||
{
|
||||
if (cond == 7)
|
||||
{
|
||||
htmltext = "30660-01.htm";
|
||||
@@ -333,12 +335,13 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
htmltext = "30660-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SORIUS:
|
||||
{
|
||||
if (cond == 9)
|
||||
{
|
||||
htmltext = "30327-01.htm";
|
||||
st.set("cond", "10");
|
||||
st.setCond(10);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(ORDER_OF_SORIUS, 1);
|
||||
}
|
||||
@@ -349,7 +352,7 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
else if (cond == 22)
|
||||
{
|
||||
htmltext = "30327-03.htm";
|
||||
st.set("cond", "23");
|
||||
st.setCond(23);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(KRISTINA_LETTER, 1);
|
||||
}
|
||||
@@ -358,8 +361,9 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
htmltext = "30327-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case DAURIN_HAMMERCRUSH:
|
||||
{
|
||||
if (cond == 10)
|
||||
{
|
||||
htmltext = "30674-01.htm";
|
||||
@@ -376,7 +380,7 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
else if (cond == 12)
|
||||
{
|
||||
htmltext = "30674-03.htm";
|
||||
st.set("cond", "13");
|
||||
st.setCond(13);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if (cond > 12)
|
||||
@@ -384,10 +388,11 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
htmltext = "30674-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case PIPER_LONGBOW:
|
||||
case SLEIN_SHINING_BLADE:
|
||||
case KAIN_FLYING_KNIFE:
|
||||
{
|
||||
if ((cond == 13) || (cond == 14))
|
||||
{
|
||||
htmltext = npc.getNpcId() + "-01.htm";
|
||||
@@ -399,16 +404,17 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
else if ((cond > 18) && (cond < 22))
|
||||
{
|
||||
htmltext = npc.getNpcId() + "-03.htm";
|
||||
st.set("cond", "21");
|
||||
st.setCond(21);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MYSTERIOUS_DARKELF:
|
||||
{
|
||||
if (cond == 13)
|
||||
{
|
||||
htmltext = "30661-01.htm";
|
||||
st.set("cond", "14");
|
||||
st.setCond(14);
|
||||
st.playSound(QuestState.SOUND_BEFORE_BATTLE);
|
||||
addSpawn(LETO_LIZARDMAN_ASSASSIN, player, true, 0);
|
||||
addSpawn(LETO_LIZARDMAN_ASSASSIN, player, true, 0);
|
||||
@@ -421,7 +427,7 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
else if (cond == 15)
|
||||
{
|
||||
htmltext = "30661-02.htm";
|
||||
st.set("cond", "16");
|
||||
st.setCond(16);
|
||||
st.playSound(QuestState.SOUND_BEFORE_BATTLE);
|
||||
addSpawn(LETO_LIZARDMAN_SNIPER, player, true, 0);
|
||||
addSpawn(LETO_LIZARDMAN_SNIPER, player, true, 0);
|
||||
@@ -434,7 +440,7 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
else if (cond == 17)
|
||||
{
|
||||
htmltext = "30661-03.htm";
|
||||
st.set("cond", "18");
|
||||
st.setCond(18);
|
||||
st.playSound(QuestState.SOUND_BEFORE_BATTLE);
|
||||
addSpawn(LETO_LIZARDMAN_WIZARD, player, true, 0);
|
||||
addSpawn(LETO_LIZARDMAN_WIZARD, player, true, 0);
|
||||
@@ -447,7 +453,7 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
else if (cond == 19)
|
||||
{
|
||||
htmltext = "30661-04.htm";
|
||||
st.set("cond", "20");
|
||||
st.setCond(20);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else if ((cond == 20) || (cond == 21))
|
||||
@@ -455,8 +461,9 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
htmltext = "30661-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KRISTINA:
|
||||
{
|
||||
if ((cond > 18) && (cond < 22))
|
||||
{
|
||||
htmltext = "30665-01.htm";
|
||||
@@ -470,12 +477,15 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
htmltext = "30665-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -490,56 +500,62 @@ public class Q226_TestOfTheHealer extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
final int cond = st.getInt("cond");
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case TATOMA:
|
||||
{
|
||||
if ((cond == 1) || (cond == 2))
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
_tatoma = null;
|
||||
cancelQuestTimer("tatoma_despawn", null, player);
|
||||
break;
|
||||
|
||||
}
|
||||
case LETO_LIZARDMAN_LEADER:
|
||||
{
|
||||
if ((cond == 10) || (cond == 11))
|
||||
{
|
||||
st.set("cond", "12");
|
||||
st.setCond(12);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(SECRET_LETTER_1, 1);
|
||||
}
|
||||
_letoLeader = null;
|
||||
cancelQuestTimer("leto_leader_despawn", null, player);
|
||||
break;
|
||||
|
||||
}
|
||||
case LETO_LIZARDMAN_ASSASSIN:
|
||||
{
|
||||
if ((cond == 13) || (cond == 14))
|
||||
{
|
||||
st.set("cond", "15");
|
||||
st.setCond(15);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(SECRET_LETTER_2, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LETO_LIZARDMAN_SNIPER:
|
||||
{
|
||||
if ((cond == 15) || (cond == 16))
|
||||
{
|
||||
st.set("cond", "17");
|
||||
st.setCond(17);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(SECRET_LETTER_3, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case LETO_LIZARDMAN_LORD:
|
||||
{
|
||||
if ((cond == 17) || (cond == 18))
|
||||
{
|
||||
st.set("cond", "19");
|
||||
st.setCond(19);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(SECRET_LETTER_4, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
@@ -29,6 +29,26 @@ import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||
|
||||
public class Q227_TestOfTheReformer extends Quest
|
||||
{
|
||||
// NPCs
|
||||
private static final int PUPINA = 30118;
|
||||
private static final int SLA = 30666;
|
||||
private static final int RAMUS = 30667;
|
||||
private static final int KATARI = 30668;
|
||||
private static final int KAKAN = 30669;
|
||||
private static final int NYAKURI = 30670;
|
||||
private static final int OL_MAHUM_PILGRIM = 30732;
|
||||
// Monsters
|
||||
private static final int MISERY_SKELETON = 20022;
|
||||
private static final int SKELETON_ARCHER = 20100;
|
||||
private static final int SKELETON_MARKSMAN = 20102;
|
||||
private static final int SKELETON_LORD = 20104;
|
||||
private static final int SILENT_HORROR = 20404;
|
||||
private static final int NAMELESS_REVENANT = 27099;
|
||||
private static final int ARURAUNE = 27128;
|
||||
private static final int OL_MAHUM_INSPECTOR = 27129;
|
||||
private static final int OL_MAHUM_BETRAYER = 27130;
|
||||
private static final int CRIMSON_WEREWOLF = 27131;
|
||||
private static final int KRUDEL_LIZARDMAN = 27132;
|
||||
// Items
|
||||
private static final int BOOK_OF_REFORM = 2822;
|
||||
private static final int LETTER_OF_INTRODUCTION = 2823;
|
||||
@@ -49,57 +69,27 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
private static final int BONE_FRAGMENT_8 = 2838;
|
||||
private static final int BONE_FRAGMENT_9 = 2839;
|
||||
private static final int KAKAN_LETTER = 3037;
|
||||
|
||||
// Rewards
|
||||
private static final int MARK_OF_REFORMER = 2821;
|
||||
private static final int DIMENSIONAL_DIAMOND = 7562;
|
||||
|
||||
// NPCs
|
||||
private static final int PUPINA = 30118;
|
||||
private static final int SLA = 30666;
|
||||
private static final int RAMUS = 30667;
|
||||
private static final int KATARI = 30668;
|
||||
private static final int KAKAN = 30669;
|
||||
private static final int NYAKURI = 30670;
|
||||
private static final int OL_MAHUM_PILGRIM = 30732;
|
||||
|
||||
// Monsters
|
||||
private static final int MISERY_SKELETON = 20022;
|
||||
private static final int SKELETON_ARCHER = 20100;
|
||||
private static final int SKELETON_MARKSMAN = 20102;
|
||||
private static final int SKELETON_LORD = 20104;
|
||||
private static final int SILENT_HORROR = 20404;
|
||||
private static final int NAMELESS_REVENANT = 27099;
|
||||
private static final int ARURAUNE = 27128;
|
||||
private static final int OL_MAHUM_INSPECTOR = 27129;
|
||||
private static final int OL_MAHUM_BETRAYER = 27130;
|
||||
private static final int CRIMSON_WEREWOLF = 27131;
|
||||
private static final int KRUDEL_LIZARDMAN = 27132;
|
||||
|
||||
// Checks & Instances
|
||||
private static long _timer;
|
||||
|
||||
// Misc
|
||||
private static NpcInstance _olMahumInspector;
|
||||
private static NpcInstance _olMahumPilgrim;
|
||||
private static NpcInstance _olMahumBetrayer;
|
||||
|
||||
private static boolean _crimsonWerewolf = false;
|
||||
private static boolean _krudelLizardman = false;
|
||||
|
||||
// Allowed skills when attacking Crimson Werewolf
|
||||
/*
|
||||
* private static final int[] ALLOWED_SKILLS = { 1031, 1069, 1164, 1168, 1147, 1177, 1184, 1201, 1206 };
|
||||
*/
|
||||
// private static final int[] ALLOWED_SKILLS = { 1031, 1069, 1164, 1168, 1147, 1177, 1184, 1201, 1206 };
|
||||
|
||||
public Q227_TestOfTheReformer()
|
||||
{
|
||||
super(227, "Test of the Reformer");
|
||||
|
||||
registerQuestItems(BOOK_OF_REFORM, LETTER_OF_INTRODUCTION, SLA_LETTER, GREETINGS, OL_MAHUM_MONEY, KATARI_LETTER, NYAKURI_LETTER, UNDEAD_LIST, RAMUS_LETTER, RIPPED_DIARY, HUGE_NAIL, LETTER_OF_BETRAYER, BONE_FRAGMENT_4, BONE_FRAGMENT_5, BONE_FRAGMENT_6, BONE_FRAGMENT_7, BONE_FRAGMENT_8, BONE_FRAGMENT_9, KAKAN_LETTER);
|
||||
|
||||
addStartNpc(PUPINA);
|
||||
addTalkId(PUPINA, SLA, RAMUS, KATARI, KAKAN, NYAKURI, OL_MAHUM_PILGRIM);
|
||||
|
||||
addAttackId(NAMELESS_REVENANT, CRIMSON_WEREWOLF);
|
||||
addKillId(MISERY_SKELETON, SKELETON_ARCHER, SKELETON_MARKSMAN, SKELETON_LORD, SILENT_HORROR, NAMELESS_REVENANT, ARURAUNE, OL_MAHUM_INSPECTOR, OL_MAHUM_BETRAYER, CRIMSON_WEREWOLF, KRUDEL_LIZARDMAN);
|
||||
}
|
||||
@@ -114,123 +104,117 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
// PUPINA
|
||||
if (event.equals("30118-04.htm"))
|
||||
switch (event)
|
||||
{
|
||||
st.setState(State.STARTED);
|
||||
st.set("cond", "1");
|
||||
st.playSound(QuestState.SOUND_ACCEPT);
|
||||
st.giveItems(BOOK_OF_REFORM, 1);
|
||||
|
||||
if (!player.getVariables().getBoolean("secondClassChange39", false))
|
||||
case "30118-04.htm":
|
||||
{
|
||||
htmltext = "30118-04b.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange39", true);
|
||||
st.startQuest();
|
||||
st.giveItems(BOOK_OF_REFORM, 1);
|
||||
if (!player.getVariables().getBoolean("secondClassChange39", false))
|
||||
{
|
||||
htmltext = "30118-04b.htm";
|
||||
st.giveItems(DIMENSIONAL_DIAMOND, DF_REWARD_39.get(player.getClassId().getId()));
|
||||
player.getVariables().set("secondClassChange39", true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
else if (event.equals("30118-06.htm"))
|
||||
{
|
||||
st.set("cond", "4");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BOOK_OF_REFORM, 1);
|
||||
st.takeItems(HUGE_NAIL, 1);
|
||||
st.giveItems(LETTER_OF_INTRODUCTION, 1);
|
||||
}
|
||||
// SLA
|
||||
else if (event.equals("30666-04.htm"))
|
||||
{
|
||||
st.set("cond", "5");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_OF_INTRODUCTION, 1);
|
||||
st.giveItems(SLA_LETTER, 1);
|
||||
}
|
||||
// KAKAN
|
||||
else if (event.equals("30669-03.htm"))
|
||||
{
|
||||
if (st.getInt("cond") != 12)
|
||||
case "30118-06.htm":
|
||||
{
|
||||
st.set("cond", "12");
|
||||
st.setCond(4);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BOOK_OF_REFORM, 1);
|
||||
st.takeItems(HUGE_NAIL, 1);
|
||||
st.giveItems(LETTER_OF_INTRODUCTION, 1);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!_crimsonWerewolf)
|
||||
case "30666-04.htm":
|
||||
{
|
||||
addSpawn(CRIMSON_WEREWOLF, -9382, -89852, -2333, 0, false, 299000);
|
||||
_crimsonWerewolf = true;
|
||||
|
||||
// Resets Crimson Werewolf
|
||||
startQuestTimer("werewolf_cleanup", 300000, null, player, false);
|
||||
st.setCond(5);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_OF_INTRODUCTION, 1);
|
||||
st.giveItems(SLA_LETTER, 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// NYAKURI
|
||||
else if (event.equals("30670-03.htm"))
|
||||
{
|
||||
st.set("cond", "15");
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
if (!_krudelLizardman)
|
||||
case "30669-03.htm":
|
||||
{
|
||||
addSpawn(KRUDEL_LIZARDMAN, 126019, -179983, -1781, 0, false, 299000);
|
||||
_krudelLizardman = true;
|
||||
|
||||
// Resets Krudel Lizardman
|
||||
startQuestTimer("lizardman_cleanup", 300000, null, player, false);
|
||||
}
|
||||
}
|
||||
// Despawns Crimson Werewolf
|
||||
else if (event.equals("werewolf_despawn"))
|
||||
{
|
||||
npc.abortAttack();
|
||||
npc.broadcastNpcSay("Cowardly guy!");
|
||||
npc.decayMe();
|
||||
_crimsonWerewolf = false;
|
||||
cancelQuestTimer("werewolf_cleanup", null, player);
|
||||
return null;
|
||||
}
|
||||
// Despawns
|
||||
else if (event.equals("ol_mahums_despawn"))
|
||||
{
|
||||
_timer++;
|
||||
|
||||
if ((st.getInt("cond") == 8) || (_timer >= 60))
|
||||
{
|
||||
if (_olMahumPilgrim != null)
|
||||
if (!st.isCond(12))
|
||||
{
|
||||
_olMahumPilgrim.deleteMe();
|
||||
_olMahumPilgrim = null;
|
||||
st.setCond(12);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
|
||||
if (_olMahumInspector != null)
|
||||
if (!_crimsonWerewolf)
|
||||
{
|
||||
_olMahumInspector.deleteMe();
|
||||
_olMahumInspector = null;
|
||||
addSpawn(CRIMSON_WEREWOLF, -9382, -89852, -2333, 0, false, 299000);
|
||||
_crimsonWerewolf = true;
|
||||
|
||||
// Resets Crimson Werewolf
|
||||
startQuestTimer("werewolf_cleanup", 300000, null, player, false);
|
||||
}
|
||||
cancelQuestTimer("ol_mahums_despawn", null, player);
|
||||
_timer = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
else if (event.equals("betrayer_despawn"))
|
||||
{
|
||||
if (_olMahumBetrayer != null)
|
||||
case "30670-03.htm":
|
||||
{
|
||||
_olMahumBetrayer.deleteMe();
|
||||
_olMahumBetrayer = null;
|
||||
st.setCond(15);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
if (!_krudelLizardman)
|
||||
{
|
||||
addSpawn(KRUDEL_LIZARDMAN, 126019, -179983, -1781, 0, false, 299000);
|
||||
_krudelLizardman = true;
|
||||
|
||||
// Resets Krudel Lizardman
|
||||
startQuestTimer("lizardman_cleanup", 300000, null, player, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case "werewolf_despawn":
|
||||
{
|
||||
npc.abortAttack();
|
||||
npc.broadcastNpcSay("Cowardly guy!");
|
||||
npc.decayMe();
|
||||
_crimsonWerewolf = false;
|
||||
cancelQuestTimer("werewolf_cleanup", null, player);
|
||||
return null;
|
||||
}
|
||||
case "ol_mahums_despawn":
|
||||
{
|
||||
_timer++;
|
||||
if (st.isCond(8) || (_timer >= 60))
|
||||
{
|
||||
if (_olMahumPilgrim != null)
|
||||
{
|
||||
_olMahumPilgrim.deleteMe();
|
||||
_olMahumPilgrim = null;
|
||||
}
|
||||
|
||||
if (_olMahumInspector != null)
|
||||
{
|
||||
_olMahumInspector.deleteMe();
|
||||
_olMahumInspector = null;
|
||||
}
|
||||
cancelQuestTimer("ol_mahums_despawn", null, player);
|
||||
_timer = 0;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
case "betrayer_despawn":
|
||||
{
|
||||
if (_olMahumBetrayer != null)
|
||||
{
|
||||
_olMahumBetrayer.deleteMe();
|
||||
_olMahumBetrayer = null;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
case "werewolf_cleanup":
|
||||
{
|
||||
_crimsonWerewolf = false;
|
||||
return null;
|
||||
}
|
||||
case "lizardman_cleanup":
|
||||
{
|
||||
_krudelLizardman = false;
|
||||
return null;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
// Clean ups
|
||||
else if (event.equals("werewolf_cleanup"))
|
||||
{
|
||||
_crimsonWerewolf = false;
|
||||
return null;
|
||||
}
|
||||
else if (event.equals("lizardman_cleanup"))
|
||||
{
|
||||
_krudelLizardman = false;
|
||||
return null;
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -249,6 +233,7 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
{
|
||||
if ((player.getClassId() == ClassId.CLERIC) || (player.getClassId() == ClassId.SHILLIEN_ORACLE))
|
||||
{
|
||||
htmltext = (player.getLevel() < 39) ? "30118-01.htm" : "30118-03.htm";
|
||||
@@ -258,12 +243,14 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
htmltext = "30118-02.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.STARTED:
|
||||
final int cond = st.getInt("cond");
|
||||
{
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case PUPINA:
|
||||
{
|
||||
if (cond < 3)
|
||||
{
|
||||
htmltext = "30118-04a.htm";
|
||||
@@ -277,8 +264,9 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
htmltext = "30118-07.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SLA:
|
||||
{
|
||||
if (cond == 4)
|
||||
{
|
||||
htmltext = "30666-01.htm";
|
||||
@@ -290,7 +278,7 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
else if (cond == 10)
|
||||
{
|
||||
htmltext = "30666-06.htm";
|
||||
st.set("cond", "11");
|
||||
st.setCond(11);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(OL_MAHUM_MONEY, 1);
|
||||
st.giveItems(GREETINGS, 3);
|
||||
@@ -313,15 +301,16 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
st.exitQuest(false);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KATARI:
|
||||
{
|
||||
if ((cond == 5) || (cond == 6))
|
||||
{
|
||||
htmltext = "30668-01.htm";
|
||||
|
||||
if (cond == 5)
|
||||
{
|
||||
st.set("cond", "6");
|
||||
st.setCond(6);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(SLA_LETTER, 1);
|
||||
}
|
||||
@@ -371,7 +360,7 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
else if (cond == 9)
|
||||
{
|
||||
htmltext = "30668-03.htm";
|
||||
st.set("cond", "10");
|
||||
st.setCond(10);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(LETTER_OF_BETRAYER, 1);
|
||||
st.giveItems(KATARI_LETTER, 1);
|
||||
@@ -381,18 +370,20 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
htmltext = "30668-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case OL_MAHUM_PILGRIM:
|
||||
{
|
||||
if (cond == 7)
|
||||
{
|
||||
htmltext = "30732-01.htm";
|
||||
st.set("cond", "8");
|
||||
st.setCond(8);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(OL_MAHUM_MONEY, 1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KAKAN:
|
||||
{
|
||||
if ((cond == 11) || (cond == 12))
|
||||
{
|
||||
htmltext = "30669-01.htm";
|
||||
@@ -400,7 +391,7 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
else if (cond == 13)
|
||||
{
|
||||
htmltext = "30669-04.htm";
|
||||
st.set("cond", "14");
|
||||
st.setCond(14);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GREETINGS, 1);
|
||||
st.giveItems(KAKAN_LETTER, 1);
|
||||
@@ -410,8 +401,9 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
htmltext = "30669-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case NYAKURI:
|
||||
{
|
||||
if ((cond == 14) || (cond == 15))
|
||||
{
|
||||
htmltext = "30670-01.htm";
|
||||
@@ -419,7 +411,7 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
else if (cond == 16)
|
||||
{
|
||||
htmltext = "30670-04.htm";
|
||||
st.set("cond", "17");
|
||||
st.setCond(17);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GREETINGS, 1);
|
||||
st.giveItems(NYAKURI_LETTER, 1);
|
||||
@@ -429,12 +421,13 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
htmltext = "30670-04.htm";
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case RAMUS:
|
||||
{
|
||||
if (cond == 17)
|
||||
{
|
||||
htmltext = "30667-01.htm";
|
||||
st.set("cond", "18");
|
||||
st.setCond(18);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(GREETINGS, 1);
|
||||
st.giveItems(UNDEAD_LIST, 1);
|
||||
@@ -446,7 +439,7 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
else if (cond == 19)
|
||||
{
|
||||
htmltext = "30667-03.htm";
|
||||
st.set("cond", "20");
|
||||
st.setCond(20);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.takeItems(BONE_FRAGMENT_4, 1);
|
||||
st.takeItems(BONE_FRAGMENT_5, 1);
|
||||
@@ -461,12 +454,15 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
htmltext = "30667-03.htm";
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case State.COMPLETED:
|
||||
{
|
||||
htmltext = getAlreadyCompletedMsg();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return htmltext;
|
||||
@@ -481,18 +477,20 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
final int cond = st.getInt("cond");
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case NAMELESS_REVENANT:
|
||||
{
|
||||
// TODO: if (((cond == 1) || (cond == 2)) && (skill != null) && (skill.getId() == 1031))
|
||||
if ((cond == 1) || (cond == 2))
|
||||
{
|
||||
npc.setScriptValue(1);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case CRIMSON_WEREWOLF:
|
||||
{
|
||||
// TODO: if ((cond == 12) && !npc.isScriptValue(1) && ((skill == null) || !ArraysUtil.contains(ALLOWED_SKILLS, skill.getId())))
|
||||
if ((cond == 12) && !npc.isScriptValue(1))
|
||||
{
|
||||
@@ -500,6 +498,7 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
startQuestTimer("werewolf_despawn", 1000, npc, attacker, false);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
@@ -514,74 +513,81 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
return null;
|
||||
}
|
||||
|
||||
final int cond = st.getInt("cond");
|
||||
final int cond = st.getCond();
|
||||
switch (npc.getNpcId())
|
||||
{
|
||||
case NAMELESS_REVENANT:
|
||||
{
|
||||
if (((cond == 1) || (cond == 2)) && npc.isScriptValue(1) && st.dropItemsAlways(RIPPED_DIARY, 1, 7))
|
||||
{
|
||||
st.set("cond", "2");
|
||||
st.setCond(2);
|
||||
st.takeItems(RIPPED_DIARY, -1);
|
||||
addSpawn(ARURAUNE, npc, false, 300000);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case ARURAUNE:
|
||||
{
|
||||
if (cond == 2)
|
||||
{
|
||||
st.set("cond", "3");
|
||||
st.setCond(3);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(HUGE_NAIL, 1);
|
||||
npc.broadcastNpcSay("The concealed truth will always be revealed...!");
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case OL_MAHUM_INSPECTOR:
|
||||
{
|
||||
if (cond == 6)
|
||||
{
|
||||
st.set("cond", "7");
|
||||
st.setCond(7);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case OL_MAHUM_BETRAYER:
|
||||
{
|
||||
if (cond == 8)
|
||||
{
|
||||
st.set("cond", "9");
|
||||
st.setCond(9);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
st.giveItems(LETTER_OF_BETRAYER, 1);
|
||||
cancelQuestTimer("betrayer_despawn", null, player);
|
||||
_olMahumBetrayer = null;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case CRIMSON_WEREWOLF:
|
||||
{
|
||||
if (cond == 12)
|
||||
{
|
||||
st.set("cond", "13");
|
||||
st.setCond(13);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
cancelQuestTimer("werewolf_cleanup", null, player);
|
||||
_crimsonWerewolf = false;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case KRUDEL_LIZARDMAN:
|
||||
{
|
||||
if (cond == 15)
|
||||
{
|
||||
st.set("cond", "16");
|
||||
st.setCond(16);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
cancelQuestTimer("lizardman_cleanup", null, player);
|
||||
_krudelLizardman = false;
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SILENT_HORROR:
|
||||
{
|
||||
if ((cond == 18) && !st.hasQuestItems(BONE_FRAGMENT_4))
|
||||
{
|
||||
st.giveItems(BONE_FRAGMENT_4, 1);
|
||||
if (st.hasQuestItems(BONE_FRAGMENT_5, BONE_FRAGMENT_6, BONE_FRAGMENT_7, BONE_FRAGMENT_8))
|
||||
{
|
||||
st.set("cond", "19");
|
||||
st.setCond(19);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -590,14 +596,15 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SKELETON_LORD:
|
||||
{
|
||||
if ((cond == 18) && !st.hasQuestItems(BONE_FRAGMENT_5))
|
||||
{
|
||||
st.giveItems(BONE_FRAGMENT_5, 1);
|
||||
if (st.hasQuestItems(BONE_FRAGMENT_4, BONE_FRAGMENT_6, BONE_FRAGMENT_7, BONE_FRAGMENT_8))
|
||||
{
|
||||
st.set("cond", "19");
|
||||
st.setCond(19);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -606,14 +613,15 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SKELETON_MARKSMAN:
|
||||
{
|
||||
if ((cond == 18) && !st.hasQuestItems(BONE_FRAGMENT_6))
|
||||
{
|
||||
st.giveItems(BONE_FRAGMENT_6, 1);
|
||||
if (st.hasQuestItems(BONE_FRAGMENT_4, BONE_FRAGMENT_5, BONE_FRAGMENT_7, BONE_FRAGMENT_8))
|
||||
{
|
||||
st.set("cond", "19");
|
||||
st.setCond(19);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -622,14 +630,15 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case MISERY_SKELETON:
|
||||
{
|
||||
if ((cond == 18) && !st.hasQuestItems(BONE_FRAGMENT_7))
|
||||
{
|
||||
st.giveItems(BONE_FRAGMENT_7, 1);
|
||||
if (st.hasQuestItems(BONE_FRAGMENT_4, BONE_FRAGMENT_5, BONE_FRAGMENT_6, BONE_FRAGMENT_8))
|
||||
{
|
||||
st.set("cond", "19");
|
||||
st.setCond(19);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -638,14 +647,15 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
case SKELETON_ARCHER:
|
||||
{
|
||||
if ((cond == 18) && !st.hasQuestItems(BONE_FRAGMENT_8))
|
||||
{
|
||||
st.giveItems(BONE_FRAGMENT_8, 1);
|
||||
if (st.hasQuestItems(BONE_FRAGMENT_4, BONE_FRAGMENT_5, BONE_FRAGMENT_6, BONE_FRAGMENT_7))
|
||||
{
|
||||
st.set("cond", "19");
|
||||
st.setCond(19);
|
||||
st.playSound(QuestState.SOUND_MIDDLE);
|
||||
}
|
||||
else
|
||||
@@ -654,6 +664,7 @@ public class Q227_TestOfTheReformer extends Quest
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user