Addition of quest Help with Temple Restoration (11002).

Contributed by Stayway.
This commit is contained in:
MobiusDev 2018-04-02 19:45:42 +00:00
parent ca8ac1fb29
commit ec723bf305
20 changed files with 312 additions and 10 deletions

View File

@ -0,0 +1,8 @@
<html><body>Inventory Book:<br>
<font color="LEVEL">1. Wooden Pole </font>.<br>
These poles are hewn from first that grow at the north of the Immortal Plateau. They are very sturdy and have a pleasant smell, that's why they're often used for construction. Orcs also need first for their rituals with dance and flame. An Orc Captain and his Lieutenant stole 20 of such poles from village recently.<br><br>
<font color="LEVEL">2. Wooden door panels</font>.<br>
A set of parts for installing a doorframe and shutters. Werewolf Chief and Werewolf Hunters stole them to use as claw sharpeners.<br><br>
<font color="LEVEL">3. Stone Powder</font>.<br>
Stone blocks for repairs of the collapsed Temple wall were delivered from Mines, but there is not enough of them. We need more materials to finish construction works. According to rumors, Stone Golems can be found nearby. They could be a source of an excellent Stone Powder.<br>
</body></html>

View File

@ -24,7 +24,6 @@
10997 Loser Priest (1/3)
10998 Loser Priest (2/3)
10999 Loser Priest (3/3)
11002 Help with Temple Restoration
11003 Perfect Leather Armor (1/3)
11004 Perfect Leather Armor (2/3)
11005 Perfect Leather Armor (3/3)

View File

@ -2,5 +2,5 @@
So you want to take the scepter, don't you?<br>
I'm a blacksmith, and I like swords better, but if you use magic, a scepter is the right choice.<br>
Have you heard how a recent storm destroyed so many buildings? I am very concerned about the damage that the local temple has suffered. Harrys began reconstruction, but he needs more workers. Could you help him, please?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q11002_HelpWithTempleRestoration 30283-01.htm">"Agree to help"</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q11002_HelpWithTempleRestoration 30283-02.htm">"Agree to help"</Button><br>
</body></html>

View File

@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import com.l2jmobius.gameserver.util.Util;
/**
* Tombs of Ancestors (11001)
@ -65,8 +64,8 @@ public class Q11001_TombsOfAncestors extends Quest
addStartNpc(NEWBIE_GUIDE);
addTalkId(NEWBIE_GUIDE, ALTRAN);
addKillId(WOLF, ELDER_WOLF, ORC, ORC_SOLDIER, ORC_ARCHER, ORC_WARRIOR, WEREWOLVES);
addCondLevel(MIN_LVL, MAX_LVL, "");
addCondRace(Race.HUMAN, "");
addCondLevel(MIN_LVL, MAX_LVL, "no-level.html");
addCondRace(Race.HUMAN, "no-race.html");
registerQuestItems(HUNTERS_MEMO, WOLF_PELT, ORC_AMULET, WEREWOLFS_FANG, BROKEN_SWORD);
}
@ -182,7 +181,7 @@ public class Q11001_TombsOfAncestors extends Quest
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isStarted() && Util.checkIfInRange(1500, npc, killer, true))
if (qs != null)
{
switch (npc.getId())
{

View File

@ -0,0 +1,4 @@
<html><body>Newbie Guide:<br>
You ought to gain more experience. Come back later.<br>
<font color="LEVEL">(This quest is available to characters of Level 11 or higher.)</font><br>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Newbie Guide:<br>
I can see you're a stranger here. Pardon me, but I am asking only citizens for help.<br>
<font color="LEVEL">(This quest is available to Humans only.)</font><br>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Magister Harrys:<br>
Oh, so you're from Altran? Thank you for helping us out. There are just a few of us here. And I can say we don't manage.<br>
Not only there are not enough people to repair buildings, but we're also constantly being robbed of construction materials. Take the last time, for example! I just got Wooden Poles and a Wooden Door, and they were stolen on the spot! It emerged that the <font color="LEVEL">Wooden Poles</font> were taken by the Orcs for some fire dance of theirs. So, you got it? They're dancing around some fires, that are burning on my building materials! And this time, the stolen <font color="LEVEL">Wooden Poles</font> were found at <font color="LEVEL">Orc Captains and Lieutenants</font>! Can you please bring them back?<br>
I put down the rest of the tasks in this <font color="LEVEL">Inventory Book</font>. Complete them as well.<br>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Magister Harrys:<br>
I can see you're not finished yet. Is it hard, eh? Please, be patient for a while.
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Magister Harrys:<br>
You have had a hard time. But you did a great job! Now we can finish the repairs of the collapsed buildings. I have prepared a gift to thank you. I'm sure you will make good use of it.<br>
Make your choice. I would gladly give you all I have, but I need something to reward other travelers! Please, pick just one item.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q11002_HelpWithTempleRestoration reward1">Select Warrior's Armor</Button><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q11002_HelpWithTempleRestoration reward2">Select Medium's Tunic</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Magister Harrys:<br>
Warrior's armor is very tough. It will save your life in dangerous situation<br>
I hope you like your reward. Speaking of armor... Did you know that <font color="LEVEL">Weapon Merchant Lector </font>is now a leatherworker, too? He took a large order in the town of Oren, but he's short of materials. Could you come see him?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q11003_PerfectLeatherArmor1 30035-02.htm">Say you will go to Lector</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Magister Harrys:<br>
Medium's Tunic is very soft and comfy. I hope you will wear it with pleasure<br>
I also wanted to tell you that <font color="LEVEL">Weapon Merchant Lector </font>is now a leatherworker, too? He took a large order in the town of Oren, but he's short of materials. Could you come see him?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q11003_PerfectLeatherArmor1 30035-02.htm">Say you will go to Lector</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Blacksmith Altran:<br>
People say Harrys is struggling to handle the consequences of a recent storm. Could you help him, please?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q11002_HelpWithTempleRestoration 30283-02.htm">Agree to help</Button><br><br>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Blacksmith Altran:<br>
Thank you!<br>
You will find <font color="LEVEL">Harrys</font> in the <font color="LEVEL">Temple of Einhasad</font>. It's in the southern part of the town. Don't be lost. Tell Harrys that I sent you. He will tell you, what to do. Good luck.<br>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Blacksmith Altran:<br>
Do you know that Harrys has been looking for you? Hurry up. Harrys is in the <font color="LEVEL">Temple of Einhasad</font>, it is easy to find.<br>
</body></html>

View File

@ -0,0 +1,245 @@
/*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package quests.Q11002_HelpWithTempleRestoration;
import com.l2jmobius.gameserver.enums.QuestSound;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
/**
* Help with Temple Restoration (11002)
* @author Stayway
*/
public class Q11002_HelpWithTempleRestoration extends Quest
{
// NPCs
private static final int ALTRAN = 30283;
private static final int HARRYS = 30035;
// Items
private static final int WOODEN_POLE = 90205;
private static final int WOODEN_DOOR_PANEL = 90206;
private static final int STONE_POWDER = 90207;
private static final int INVENTORY_BOOK = 90204;
// Rewards
private static final int WARRIORS_ARMOR = 90306;
private static final int WARRIORS_GAITERS = 90307;
private static final int MEDIUMS_TUNIC = 90308;
private static final int MEDIUMS_STOCKINGS = 90309;
private static final int RING_NOVICE = 29497;
// Monsters
private static final int ORC_LIEUTENANT = 20096;
private static final int ORC_CAPTAIN = 20098;
private static final int WEREWOLF_CHIEFTAIN = 20342;
private static final int WEREWOLF_HUMTER = 20343;
private static final int STONE_GOLEM = 20016;
private static final int CRASHER = 20101;
// Misc
private static final int MIN_LVL = 11;
private static final int MAX_LVL = 20;
public Q11002_HelpWithTempleRestoration()
{
super(11002);
addStartNpc(ALTRAN);
addTalkId(HARRYS, ALTRAN);
addKillId(ORC_CAPTAIN, ORC_LIEUTENANT, WEREWOLF_HUMTER, WEREWOLF_CHIEFTAIN, STONE_GOLEM, CRASHER);
addCondLevel(MIN_LVL, MAX_LVL, "no-level.html"); // Custom
addCondRace(Race.HUMAN, "no-race.html"); // Custom
registerQuestItems(INVENTORY_BOOK, WOODEN_POLE, WOODEN_DOOR_PANEL, STONE_POWDER);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = null;
switch (event)
{
case "30283-02.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "reward1":
{
if (qs.isCond(5))
{
takeItems(player, INVENTORY_BOOK, 1);
takeItems(player, WOODEN_POLE, 20);
takeItems(player, WOODEN_DOOR_PANEL, 25);
takeItems(player, STONE_POWDER, 20);
giveItems(player, WARRIORS_ARMOR, 1);
giveItems(player, WARRIORS_GAITERS, 1);
giveItems(player, RING_NOVICE, 2);
addExpAndSp(player, 80000, 0);
qs.exitQuest(false, true);
htmltext = "30035-03.html";
}
break;
}
case "reward2":
{
if (qs.isCond(5))
{
takeItems(player, INVENTORY_BOOK, 1);
takeItems(player, WOODEN_POLE, 20);
takeItems(player, WOODEN_DOOR_PANEL, 25);
takeItems(player, STONE_POWDER, 20);
giveItems(player, MEDIUMS_TUNIC, 1);
giveItems(player, MEDIUMS_STOCKINGS, 1);
giveItems(player, RING_NOVICE, 2);
addExpAndSp(player, 80000, 0);
qs.exitQuest(false, true);
htmltext = "30035-04.html";
}
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
{
final QuestState qs = getQuestState(talker, true);
String htmltext = getNoQuestMsg(talker);
switch (qs.getState())
{
case State.CREATED:
{
htmltext = "30283-01.html";
break;
}
case State.STARTED:
{
if (npc.getId() == ALTRAN)
{
if (qs.isCond(1))
{
htmltext = "30283-02a.html";
}
break;
}
else if (npc.getId() == HARRYS)
{
switch (qs.getCond())
{
case 1:
{
htmltext = "30035-01.htm";
qs.setCond(2, true);
showOnScreenMsg(talker, NpcStringId.YOU_HAVE_TALKED_TO_HARRYS_NGO_HUNTING_AND_KILL_ORC_LIEUTENANTS_AND_ORC_CAPTAINS, ExShowScreenMessage.TOP_CENTER, 10000);
giveItems(talker, INVENTORY_BOOK, 1);
break;
}
case 2:
{
htmltext = "30035-01a.html";
break;
}
case 5:
{
htmltext = "30035-02.html";
break;
}
}
}
break;
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if (qs != null)
{
switch (npc.getId())
{
case ORC_CAPTAIN:
case ORC_LIEUTENANT:
{
if (qs.isCond(2) && (getQuestItemsCount(killer, WOODEN_POLE) < 20))
{
if (getRandom(100) < 84)
{
giveItems(killer, WOODEN_POLE, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_MIDDLE);
if (getQuestItemsCount(killer, WOODEN_POLE) >= 20)
{
showOnScreenMsg(killer, NpcStringId.YOU_HAVE_KILLED_ENOUGH_ORC_LIEUTENANTS_AND_ORC_CAPTAINS_N_GO_HUNTING_AND_KILL_WEREWOLF_HUNTERS_AND_WEREWOLF_CHIEFTAINS, ExShowScreenMessage.TOP_CENTER, 10000);
qs.setCond(3);
}
}
break;
}
}
case WEREWOLF_HUMTER:
case WEREWOLF_CHIEFTAIN:
{
if (qs.isCond(3) && (getQuestItemsCount(killer, WOODEN_DOOR_PANEL) < 25))
{
if (getRandom(100) < 87)
{
giveItems(killer, WOODEN_DOOR_PANEL, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_MIDDLE);
if (getQuestItemsCount(killer, WOODEN_DOOR_PANEL) >= 25)
{
showOnScreenMsg(killer, NpcStringId.YOU_HAVE_KILLED_ENOUGH_WEREWOLF_HUNTERS_AND_WEREWOLF_CHIEFTAINS_N_GO_HUNTING_AND_KILL_STONE_GOLEMS_AND_CRASHERS, ExShowScreenMessage.TOP_CENTER, 10000);
qs.setCond(4);
}
}
break;
}
}
case CRASHER:
case STONE_GOLEM:
{
if (qs.isCond(4) && (getQuestItemsCount(killer, STONE_POWDER) < 20))
{
if (getRandom(100) < 84)
{
giveItems(killer, STONE_POWDER, 1);
playSound(killer, QuestSound.ITEMSOUND_QUEST_MIDDLE);
if ((getQuestItemsCount(killer, STONE_POWDER) >= 20) && (getQuestItemsCount(killer, STONE_POWDER) >= 10))
{
showOnScreenMsg(killer, NpcStringId.YOU_HAVE_ALL_OF_THE_ITEMS_HARRYS_REQUESTED_RETURN_TO_HIM, ExShowScreenMessage.TOP_CENTER, 10000);
qs.setCond(5);
}
}
break;
}
}
}
}
return super.onKill(npc, killer, isSummon);
}
}

View File

@ -0,0 +1,4 @@
<html><body>Newbie Guide:<br>
You ought to gain more experience. Come back later.<br>
<font color="LEVEL">(This quest is available to characters of Level 2 or higher.)</font><br>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Newbie Guide:<br>
I can see you're a stranger here. Pardon me, but I am asking only citizens for help.<br>
<font color="LEVEL">(This quest is available to Humans only.)</font><br>
</body></html>

View File

@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import com.l2jmobius.gameserver.util.Util;
/**
* Shilen's Hunt (11013)
@ -188,7 +187,7 @@ public class Q11013_ShilensHunt extends Quest
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isStarted() && Util.checkIfInRange(1500, npc, killer, true))
if (qs != null)
{
switch (npc.getId())
{

View File

@ -25,7 +25,6 @@ import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.model.quest.State;
import com.l2jmobius.gameserver.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import com.l2jmobius.gameserver.util.Util;
/**
* Tribal Benefit (11019)
@ -116,7 +115,7 @@ public class Q11019_TribalBenefit extends Quest
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getQuestState(killer, false);
if ((qs != null) && qs.isStarted() && Util.checkIfInRange(1500, npc, killer, true))
if (qs != null)
{
switch (npc.getId())
{

View File

@ -150,6 +150,7 @@ import quests.Q00935_ExploringTheEastWingOfTheDungeonOfAbyss.Q00935_ExploringThe
import quests.Q10995_MutualBenefit.Q10995_MutualBenefit;
import quests.Q11000_MoonKnight.Q11000_MoonKnight;
import quests.Q11001_TombsOfAncestors.Q11001_TombsOfAncestors;
import quests.Q11002_HelpWithTempleRestoration.Q11002_HelpWithTempleRestoration;
import quests.Q11007_NoiseInWoods.Q11007_NoiseInWoods;
import quests.Q11013_ShilensHunt.Q11013_ShilensHunt;
import quests.Q11019_TribalBenefit.Q11019_TribalBenefit;
@ -294,6 +295,7 @@ public class QuestMasterHandler
Q10995_MutualBenefit.class,
Q11000_MoonKnight.class,
Q11001_TombsOfAncestors.class,
Q11002_HelpWithTempleRestoration.class,
Q11007_NoiseInWoods.class,
Q11013_ShilensHunt.class,
Q11019_TribalBenefit.class,