Addition of quest In Search of Cloth (34).

Contributed by gigilo1968.
This commit is contained in:
MobiusDevelopment
2019-08-26 21:29:48 +00:00
parent 7ae71f7562
commit e10ab27f38
22 changed files with 343 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
<html><body>Merchant Radia:<br>
Welcome! How can I help you? You're not here to propose to me, are you?<br>
Just kidding! Don't tell me you thought I was serious.<br>
Oh, you're here for Leikar's order? I'm sorry, but it's not here yet. Can you actually go to the Town of Gludio to check with Varan? The shipment is way late.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00034_InSearchOfCloth 30088-03.htm">"Sure, I guess."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Merchant Radia:<br>
Leikar's order isn't ready because the materials haven't arrived yet. You'll need to check back later. (You must be Lv. 85 or above to start this quest.)
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Merchant Radia:<br>
I would've checked with Varan myself if I wasn't so busy. Go ask him why the materials aren't here yet.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Merchant Radia:<br>
What are you still doing here? If you want the order, you'll have to check with Varan and find out where the materials are!
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Merchant Radia:<br>
Welcome back! So what did Varan say?<br>
What? Doesn't look possible to close the deal? Seriously? <br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00034_InSearchOfCloth 30088-06.html">"He wants you to know that he's sorry."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Merchant Radia:<br>
Well then, I guess we'll have to look elsewhere. Do you think you could go to <font color="LEVEL">Ralford in Oren Castle's Ivory Tower</font>? He can probably get what I need. I have means of contacting him, so I'll tell him to be expecting you.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Merchant Radia:<br>
Please go to Ralford at the Ivory Tower. I can't make you what you need unless I have the supplies.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Merchant Radia:<br>
Oh, you're back with all of them! Here, let me have them.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00034_InSearchOfCloth 30088-10.html">"Yup, you're welcome."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Armor Trader Radia:<br>
You haven't heard from Ralford? I need spidersilk, 420 Armor Fragments (Low Grade) and 750 Accessory Gems (Low Grade). Please hurry.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Merchant Radia:<br>
Yes, your fabric is ready! Let me get it for you.<br>
Here it is! Isn't it nice? You can really make something nice with this. Have a safe journey!
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Merchant Radia:<br>
Didn't Ralford tell you? I need <font color="LEVEL">420 Low-grade Armor Fragments, 750 Low-grade Accessory Gems, and Spider Silk</font>. Please, retrieve them!
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Trader Ralford:<br>
Hello there! I understand you're looking for Spidersilk, Armor Fragments, and Accessory Gems? I'm afraid we're out. You can probably buy leftovers from most travelers, but as for Spidersilk... well, I can make it myself. Will you help me?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00034_InSearchOfCloth 30165-02.html">"Make it yourself? Wow. What do you need?"</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Trader Ralford:<br>
If you go to place called Cruma Marshlands, you'll find some <font color="LEVEL">Marsh Spiders</font>. I need <font color="LEVEL">10 Spinnerets</font> from them. If you bring those, I'll make you some spidersilk.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Trader Ralford:<br>
This isn't enough. I need more Spinnerests.<br>
You can get them from <font color="LEVEL">Marsh Spiders</font> in the Cruma Marshlands.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Trader Ralford:<br>
Wonderful! Give me the Spinneret and I'll make spidersilk for you.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00034_InSearchOfCloth 30165-05.html">"Here it is."</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Trader Ralford:<br>
Thank you. Just wait here a moment...<br>
Here's the Spider Silk you requested. Radia had actually asked for other materials as well, but you seem capable of finding enough. She needs <font color="LEVEL">420 Low-grade Armor Fragments and 750 Low-grade Accessory Gems</font>. Easy enough for you, right?
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Trader Ralford:<br>
Radia needs <font color="LEVEL">420 Low-grade Armor Fragments, 750 Low-grade Accessory Gems, and Spider Silk</font>. Deliver them to her you've collected them all.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Trader Varan:<br>
Ah, you mean Radia's order? Well, I haven't gotten the materials yet. The goods she wants have been rather scarce of late, making them difficult to obtain.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00034_InSearchOfCloth 30294-02.html"> When can I get it then?</Button>
</BODY></HTML>

View File

@@ -0,0 +1,3 @@
<html><body>Trader Varan:<br>
Tell her I'm sorry I couldn't fill the order on time, and that I accept responsibility for the breach of Contract.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Trader Varan:<br>
Please tell Radia that I won't make a mistake like this again.
</body></html>

View File

@@ -0,0 +1,269 @@
/*
* 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.Q00034_InSearchOfCloth;
import org.l2jmobius.gameserver.enums.QuestSound;
import org.l2jmobius.gameserver.model.actor.Npc;
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.State;
/**
* In Search of Cloth (34)
* @URL https://l2wiki.com/In_Search_of_Cloth
* @author malyelfik
*/
public class Q00034_InSearchOfCloth extends Quest
{
// NPCs
private static final int RADIA = 30088;
private static final int RALFORD = 30165;
private static final int VARAN = 30294;
// Monsters
private static final int MARSH_SPIDER = 20233;
// Items
private static final int ARMOR_FRAGMENT_LOW_GRADE = 36551;
private static final int ACCESSORY_GEM_LOW_GRADE = 36556;
private static final int MYSTERIOUS_CLOTH = 7076;
private static final int SKEIN_OF_YARN = 7161;
private static final int SPINNERET = 7528;
// Misc
private static final int MIN_LEVEL = 85;
private static final int SPINNERET_COUNT = 10;
private static final int ARMOR_FRAGMENT_COUNT = 420;
private static final int ACCESSORY_GEM_COUNT = 750;
public Q00034_InSearchOfCloth()
{
super(34);
addStartNpc(RADIA);
addTalkId(RADIA, RALFORD, VARAN);
addKillId(MARSH_SPIDER);
addCondMinLevel(MIN_LEVEL, "30088-02.html");
registerQuestItems(SKEIN_OF_YARN, SPINNERET);
}
@Override
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
{
final QuestState st = getQuestState(player, false);
if (st == null)
{
return null;
}
String htmltext = event;
switch (event)
{
case "30088-03.htm":
{
st.startQuest();
break;
}
case "30294-02.html":
{
if (st.isCond(1))
{
st.setCond(2, true);
}
break;
}
case "30088-06.html":
{
if (st.isCond(2))
{
st.setCond(3, true);
}
break;
}
case "30165-02.html":
{
if (st.isCond(3))
{
st.setCond(4, true);
}
break;
}
case "30165-05.html":
{
if (st.isCond(5))
{
if (getQuestItemsCount(player, SPINNERET) < SPINNERET_COUNT)
{
return getNoQuestMsg(player);
}
takeItems(player, SPINNERET, SPINNERET_COUNT);
giveItems(player, SKEIN_OF_YARN, 1);
st.setCond(6, true);
}
break;
}
case "30088-10.html":
{
if (st.isCond(6))
{
if ((getQuestItemsCount(player, ARMOR_FRAGMENT_LOW_GRADE) >= ARMOR_FRAGMENT_COUNT) && (getQuestItemsCount(player, ACCESSORY_GEM_LOW_GRADE) >= ACCESSORY_GEM_COUNT) && hasQuestItems(player, SKEIN_OF_YARN))
{
if ((player.getLevel() >= MIN_LEVEL))
{
takeItems(player, SKEIN_OF_YARN, 1);
takeItems(player, ARMOR_FRAGMENT_LOW_GRADE, ARMOR_FRAGMENT_COUNT);
takeItems(player, ACCESSORY_GEM_LOW_GRADE, ACCESSORY_GEM_COUNT);
giveItems(player, MYSTERIOUS_CLOTH, 1);
st.exitQuest(false, true);
}
else
{
htmltext = getNoQuestLevelRewardMsg(player);
}
}
else
{
htmltext = "30088-11.html";
}
}
break;
}
default:
{
htmltext = null;
break;
}
}
return htmltext;
}
@Override
public String onKill(Npc npc, PlayerInstance player, boolean isSummon)
{
final QuestState st = getQuestState(player, false);
final PlayerInstance member = getRandomPartyMember(player, 4);
if ((st != null) && (st.isCond(4)) && (member != null) && getRandomBoolean())
{
giveItems(member, SPINNERET, 1);
if (getQuestItemsCount(member, SPINNERET) >= SPINNERET_COUNT)
{
st.setCond(5, true);
}
else
{
playSound(member, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
}
return super.onKill(npc, player, isSummon);
}
@Override
public String onTalk(Npc npc, PlayerInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState st = getQuestState(player, true);
switch (st.getState())
{
case State.CREATED:
{
if (npc.getId() == RADIA)
{
htmltext = "30088-01.htm";
break;
}
}
case State.STARTED:
{
switch (npc.getId())
{
case RADIA:
{
switch (st.getCond())
{
case 1:
{
htmltext = "30088-04.html";
break;
}
case 2:
{
htmltext = "30088-05.html";
break;
}
case 3:
{
htmltext = "30088-07.html";
break;
}
case 6:
{
htmltext = ((getQuestItemsCount(player, ARMOR_FRAGMENT_LOW_GRADE) >= ARMOR_FRAGMENT_COUNT) && (getQuestItemsCount(player, ACCESSORY_GEM_LOW_GRADE) >= ACCESSORY_GEM_COUNT)) ? "30088-08.html" : "30088-09.html";
break;
}
}
break;
}
case VARAN:
{
if (st.isCond(1))
{
htmltext = "30294-01.html";
}
else if (st.isCond(2))
{
htmltext = "30294-03.html";
}
break;
}
case RALFORD:
{
switch (st.getCond())
{
case 3:
{
htmltext = "30165-01.html";
break;
}
case 4:
{
htmltext = "30165-03.html";
break;
}
case 5:
{
htmltext = "30165-04.html";
break;
}
case 6:
{
htmltext = "30165-06.html";
break;
}
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
return htmltext;
}
}

View File

@@ -26,6 +26,7 @@ import quests.Q00017_LightAndDarkness.Q00017_LightAndDarkness;
import quests.Q00031_SecretBuriedInTheSwamp.Q00031_SecretBuriedInTheSwamp; import quests.Q00031_SecretBuriedInTheSwamp.Q00031_SecretBuriedInTheSwamp;
import quests.Q00032_AnObviousLie.Q00032_AnObviousLie; import quests.Q00032_AnObviousLie.Q00032_AnObviousLie;
import quests.Q00033_MakeAPairOfDressShoes.Q00033_MakeAPairOfDressShoes; import quests.Q00033_MakeAPairOfDressShoes.Q00033_MakeAPairOfDressShoes;
import quests.Q00034_InSearchOfCloth.Q00034_InSearchOfCloth;
import quests.Q00035_FindGlitteringJewelry.Q00035_FindGlitteringJewelry; import quests.Q00035_FindGlitteringJewelry.Q00035_FindGlitteringJewelry;
import quests.Q00036_MakeASewingKit.Q00036_MakeASewingKit; import quests.Q00036_MakeASewingKit.Q00036_MakeASewingKit;
import quests.Q00037_MakeFormalWear.Q00037_MakeFormalWear; import quests.Q00037_MakeFormalWear.Q00037_MakeFormalWear;
@@ -442,6 +443,7 @@ public class QuestMasterHandler
Q00031_SecretBuriedInTheSwamp.class, Q00031_SecretBuriedInTheSwamp.class,
Q00032_AnObviousLie.class, Q00032_AnObviousLie.class,
Q00033_MakeAPairOfDressShoes.class, Q00033_MakeAPairOfDressShoes.class,
Q00034_InSearchOfCloth.class,
Q00035_FindGlitteringJewelry.class, Q00035_FindGlitteringJewelry.class,
Q00036_MakeASewingKit.class, Q00036_MakeASewingKit.class,
Q00037_MakeFormalWear.class, Q00037_MakeFormalWear.class,