Quest A New Craft (10766).

Contributed by gigilo1968.
This commit is contained in:
MobiusDev 2016-03-16 20:48:18 +00:00
parent 85348ce202
commit 4205113c4a
24 changed files with 302 additions and 0 deletions

View File

@ -0,0 +1,5 @@
<html><body>Magister Ayanthe:<br>
Now that you've unlocked your ability, you should get ready to take the leap into the world. Speaking of which, I'd like to advise you to learn a skill that will help you.<br>
We call it <font color="LEVEL">Alchemy</font>.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q10766_ANewCraft 33942-02.htm">"What's Alchemy?"</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Magister Ayanthe:<br>
While we did not need means of wealth for our lives, the Material Realm requires <font color="LEVEL">Adena</font> to live. That's why we developed a new study where we use existing materials to create new valuables: Alchemy.<br>
Using this skill will help you obtain what you need in the Material Realm. <br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10766_ANewCraft 33942-03.htm">"How do I learn this?"</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Magister Ayanthe:<br>
Interested? Good. You will need that to learn Alchemy.<br>
Unfortunately, there's nothing more I can tell you about Alchemy. In Faeron Village, there is an Ertheia who invented and organized Alchemy. You can go to her to learn.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10766_ANewCraft 33942-04.html">"Okay."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Magister Ayanthe:<br>
Go to <font color="LEVEL">Alchemist Zephyra</font>, one of the twin sisters who invented Alchemy after Faeron Village came to the Material Realm. Tell her that I sent you, and she will teach you the basics.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Magister Ayanthe:<br>
Go to <font color="LEVEL">Alchemist Zephyra</font>. Say that I have sent you, and she will teach you the basics of Alchemy.
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Master Katalin:<br>
Now that you've unlocked your ability, you should get ready to take the leap into the world. Speaking of which, I'd like to advise you to learn a skill that will help you.<br>
We call it <font color="LEVEL">Alchemy</font>.<br>
<Button ALIGN=LEFT ICON="Normal" action="bypass -h Quest Q10766_ANewCraft 33943-02.htm">"What's Alchemy?"</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Master Katalin:<br>
While we did not need means of wealth for our lives, the Material Realm requires <font color="LEVEL">Adena</font> to live. That's why we developed a new study where we use existing materials to create new valuables: Alchemy.<br>
Using this skill will help you obtain what you need in the Material Realm. <br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10766_ANewCraft 33943-03.htm">"How do I learn this?"</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Master Katalin:<br>
Interested? Good. You will need that to learn Alchemy.<br>
Unfortunately, there's nothing more I can tell you about Alchemy. In Faeron Village, there is an Ertheia who invented and organized Alchemy. You can go to her to learn.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10766_ANewCraft 33943-04.html">"Okay."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Master Katalin:<br>
Go to <font color="LEVEL">Alchemist Zephyra</font>, one of the twin sisters who invented Alchemy after Faeron Village came to the Material Realm. Tell her that I sent you, and she will teach you the basics.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Master Katalin:<br>
Go to <font color="LEVEL">Alchemist Zephyra</font>. Say that I have sent you, and she will teach you the basics of Alchemy.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Zephyra the Alchemist:<br>
An Ertheia yet unknown to me. You must be new to the Material Realm. How may I help you?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10766_ANewCraft 33978-02.html">"I'm here to learn Alchemy."</Button>
</body></html>

View File

@ -0,0 +1,6 @@
<html><body>Zephyra the Alchemist:<br>
Oh! Learn about <font color="LEVEL">Alchemy</font>? Fine, let me explain.<br>
Alchemy is divided into <font color="LEVEL">Combination</font>, which makes <font color="LEVEL">Air Stones</font>, and <font color="LEVEL">Transmutation</font>, which uses <font color="LEVEL">Air Stones or Material Realm items</font> to make <font color="LEVEL">Potions, Enchant Scrolls, Life Stones, and Dyes</font>.<br>
You must have the power to control the wind spirits as a child of Sayha, but the amount of control needed for Alchemy calls for an <font color="LEVEL">Alchemy Cube</font>.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10766_ANewCraft 33978-03.html">"Interesting. Go on."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Zephyra the Alchemist:<br>
The Alchemy Cube is made of compressed wind energy. You may grind the items with it to make Air Stones. <br>
You cannot understand Alchemy through words. You've gotten this far, which means that you can use the Alchemy Cube. Let's try "Combination" to actually make something. I will allow you time to prepare.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Zephyra the Alchemist:<br>
Are you ready now? Let's try to make something with Alchemy. Try to remember the instructions. Bring me the transmuted item and I will trade it for something more valuable. You must make it.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10766_ANewCraft 33978-05.html">"I want to make some money."</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Zephyra the Alchemist:<br>
Now try making <font color="LEVEL">1 Air Stone</font> and <font color="LEVEL">1 Windy Healing Potion</font>.<br>
Use <font color="LEVEL">Alchemy - Combination</font> to use an <font color="LEVEL">Alchemy Cube</font>. You can create <font color="LEVEL">Air Stones</font> with it. You can check the number of items you can get beforehand by inserting items in the Alchemy Cube. <font color="LEVEL">The more items you have in the cube</font>, the more items you can get.<br>
<font color="LEVEL">Windy Healing Potions</font> can be made via <font color="LEVEL">Alchemy - Transmutation</font>. You can see the list of items you can make by clicking on Transmutation. Go to <font color="LEVEL">Pelu the Grocer</font> for the items you need. Remember that you can only create one <font color="LEVEL">when you have all the required items</font>.
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Zephyra the Alchemist:<br>
Did you make it? Let me see.
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10766_ANewCraft 33978-07.html">"Here it is."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Zephyra the Alchemist:<br>
Congratulations on understanding the basics of Alchemy. You can make the items you need in combat yourself with this skill. Or you could make money to buy those. I wish you luck then.
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Zephyra the Alchemist:<br>
Now try making <font color="LEVEL">1 Air Stone</font> and <font color="LEVEL">1 Windy Healing Potion</font>.<br>
Use <font color="LEVEL">Alchemy - Combination</font> to use an <font color="LEVEL">Alchemy Cube</font>. You can create <font color="LEVEL">Air Stones</font> with it. You can check the number of items you can get beforehand by inserting items in the Alchemy Cube. <font color="LEVEL">The more items you have in the cube</font>, the more items you can get.<br>
<font color="LEVEL">Windy Healing Potions</font> can be made via <font color="LEVEL">Alchemy - Transmutation</font>. You can see the list of items you can make by clicking on Transmutation. Go to <font color="LEVEL">Pelu the Grocer</font> for the items you need. Remember that you can only create one <font color="LEVEL">when you have all the required items</font>.
</body></html>

View File

@ -0,0 +1,210 @@
/*
* 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.Q10766_ANewCraft;
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.events.EventType;
import com.l2jmobius.gameserver.model.events.ListenerRegisterType;
import com.l2jmobius.gameserver.model.events.annotations.Id;
import com.l2jmobius.gameserver.model.events.annotations.RegisterEvent;
import com.l2jmobius.gameserver.model.events.annotations.RegisterType;
import com.l2jmobius.gameserver.model.events.impl.item.OnItemCreate;
import com.l2jmobius.gameserver.model.holders.ItemHolder;
import com.l2jmobius.gameserver.model.quest.Quest;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.network.serverpackets.TutorialShowHtml;
/**
* A New Craft (10766)
* @URL https://l2wiki.com/A_New_Craft
* @author Gigi
*/
public class Q10766_ANewCraft extends Quest
{
// NPCs
private static final int KATALIN = 33943;
private static final int AYANTHE = 33942;
private static final int ZEPHYRA = 33978;
// Items
private static final ItemHolder WINDY_HEALING_POTION = new ItemHolder(39466, 50);
private static final ItemHolder WINDY_QUICK_HEALING_POTION = new ItemHolder(39471, 50);
private static final int AIR_STONE = 39461;
private static final int WINDY_HEALING_POTION_1 = 39466;
// Misc
private static final int MIN_LEVEL = 40;
// Reward
private static final int EXP_REWARD = 168000;
private static final int SP_REWARD = 40;
public Q10766_ANewCraft()
{
super(10766, Q10766_ANewCraft.class.getSimpleName(), "A New Craft");
addStartNpc(KATALIN, AYANTHE);
addTalkId(KATALIN, AYANTHE, ZEPHYRA);
registerQuestItems(AIR_STONE, WINDY_HEALING_POTION_1);
addCondMinLevel(MIN_LEVEL, "noLevel.html");
addCondRace(Race.ERTHEIA, "noErtheia.html");
}
@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 "33943-02.htm":
case "33943-03.htm":
case "33942-02.htm":
case "33942-03.htm":
case "33978-02.html":
{
htmltext = event;
break;
}
case "33943-04.html":
{
qs.startQuest();
htmltext = event;
break;
}
case "33942-04.html":
{
qs.startQuest();
htmltext = event;
break;
}
case "33978-03.html":
{
qs.setCond(2, true);
player.sendPacket(new TutorialShowHtml(npc.getObjectId(), "..\\L2Text\\QT_026_alchemy_01.htm", TutorialShowHtml.LARGE_WINDOW));
htmltext = event;
break;
}
case "33978-05.html":
{
qs.setCond(3, true);
qs.set(Integer.toString(AIR_STONE), 0);
qs.set(Integer.toString(WINDY_HEALING_POTION_1), 0);
htmltext = event;
break;
}
case "33978-07.html":
{
takeItems(player, AIR_STONE, 1);
takeItems(player, WINDY_HEALING_POTION_1, 1);
giveItems(player, WINDY_HEALING_POTION);
giveItems(player, WINDY_QUICK_HEALING_POTION);
addExpAndSp(player, EXP_REWARD, SP_REWARD);
qs.exitQuest(false, true);
htmltext = event;
break;
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
switch (npc.getId())
{
case KATALIN:
{
if (qs.isCreated() && !player.isMageClass())
{
htmltext = "33943-01.htm";
}
else
{
htmltext = "noFighter.html";
}
if (qs.getCond() > 0)
{
htmltext = "33943-05.html";
}
else if (qs.isCompleted())
{
htmltext = getAlreadyCompletedMsg(player);
}
break;
}
case AYANTHE:
{
if (qs.isCreated() && player.isMageClass())
{
htmltext = "33942-01.htm";
}
else
{
htmltext = "noMage.html";
}
if (qs.getCond() > 0)
{
htmltext = "33942-05.html";
}
else if (qs.isCompleted())
{
htmltext = getAlreadyCompletedMsg(player);
}
break;
}
case ZEPHYRA:
{
if (qs.isCond(1))
{
htmltext = "33978-01.html";
}
if (qs.isCond(2))
{
htmltext = "33978-04.html";
}
if (qs.isCond(3) && ((getQuestItemsCount(player, AIR_STONE) == 0) || (getQuestItemsCount(player, WINDY_HEALING_POTION_1) == 1)))
{
htmltext = "33978-08.html";
}
if (qs.isCond(4))
{
htmltext = "33978-06.html";
}
}
}
return htmltext;
}
@RegisterEvent(EventType.ON_ITEM_CREATE)
@RegisterType(ListenerRegisterType.ITEM)
@Id(AIR_STONE)
@Id(WINDY_HEALING_POTION_1)
public void onItemCreate(OnItemCreate event)
{
final QuestState qs = getQuestState(event.getActiveChar(), false);
if ((qs != null) && (qs.isCond(3)) && (getQuestItemsCount(qs.getPlayer(), AIR_STONE) >= 1) && (getQuestItemsCount(qs.getPlayer(), WINDY_HEALING_POTION_1) >= 1))
{
qs.setCond(4, true);
}
}
}

View File

@ -0,0 +1,3 @@
<html><body>Ivory Tower Wizard Rombel:<br>
This quest is only for Ertheia class.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Master Katalin:<br>
This quest available only Fighter class Entheria race character
</body></html>

View File

@ -0,0 +1,4 @@
<html><body><br>
This mission will be too hard for you. Don't be disappointed. Once you have grown a little more, please come back<br>
(You must be level 40 or above to start this quest.)
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Magister Ayanthe:<br>
This quest available only Mage class Entheria race character
</body></html>

View File

@ -290,6 +290,7 @@ import quests.Q10761_AnOrcInLove.Q10761_AnOrcInLove;
import quests.Q10762_MarionetteSpirit.Q10762_MarionetteSpirit; import quests.Q10762_MarionetteSpirit.Q10762_MarionetteSpirit;
import quests.Q10763_TerrifyingChertuba.Q10763_TerrifyingChertuba; import quests.Q10763_TerrifyingChertuba.Q10763_TerrifyingChertuba;
import quests.Q10764_FreeSpirit.Q10764_FreeSpirit; import quests.Q10764_FreeSpirit.Q10764_FreeSpirit;
import quests.Q10766_ANewCraft.Q10766_ANewCraft;
import quests.Q10769_LettersFromTheQueen_CrumaTower.Q10769_LettersFromTheQueen_CrumaTower; import quests.Q10769_LettersFromTheQueen_CrumaTower.Q10769_LettersFromTheQueen_CrumaTower;
import quests.Q10770_InSearchOfTheGrail.Q10770_InSearchOfTheGrail; import quests.Q10770_InSearchOfTheGrail.Q10770_InSearchOfTheGrail;
import quests.Q10771_VolatilePower.Q10771_VolatilePower; import quests.Q10771_VolatilePower.Q10771_VolatilePower;
@ -580,6 +581,7 @@ final class QuestMasterHandler
Q10762_MarionetteSpirit.class, Q10762_MarionetteSpirit.class,
Q10763_TerrifyingChertuba.class, Q10763_TerrifyingChertuba.class,
Q10764_FreeSpirit.class, Q10764_FreeSpirit.class,
Q10766_ANewCraft.class,
Q10769_LettersFromTheQueen_CrumaTower.class, Q10769_LettersFromTheQueen_CrumaTower.class,
Q10770_InSearchOfTheGrail.class, Q10770_InSearchOfTheGrail.class,
Q10771_VolatilePower.class, Q10771_VolatilePower.class,