Quest Twisted Creation Tree (10310).

Contributed by gigilo1968.
This commit is contained in:
MobiusDev 2016-08-26 20:02:25 +00:00
parent bfc582df43
commit e9dfdcf654
19 changed files with 323 additions and 1 deletions

View File

@ -66,7 +66,6 @@
10303 Crossroads between Light and Darkness
10304 For the Forgotten Heroes
10307 The Corrupted Leader: His Truth
10310 Twisted Creation Tree
10311 Peaceful Days are Over
10312 Abandoned God's Creature
10315 To the Prison of Darkness

View File

@ -0,0 +1,4 @@
<html><body>Horpina:<br>
Ooh! You're the famous adventurer Selina keeps talking about. How exciting to finally meet you! I'm Horpina. I just came over here from the Ancient City Arcan to investigate some rumors about the Garden of Genesis. I've been standing here for a while, hoping someone would show up. I thought I could just handle this myself, but that's not going to work. Are you interested in helping? I'd love to see you in action!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10310_TwistedCreationTree 33031-02.html">"What can I do to help?"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Horpina:<br>
The creatures of the Garden of Genesis live their entire lives cut off from the outside world. That situation both protects them and protect the rest of the world FROM them. I don't know who or what is trying to get the creatures out of the garden, or why, but if they make it out Magmeld and over to the human continent... I don't know how we'll stop the carnage. So, we need to prevent it from happening in the first place! It's a good think that you came by when you did. I want you to stop these creatures! For the safety of both Magmeld and the human continent!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10310_TwistedCreationTree 33031-03.html">"Okay, I'll try."</Button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Horpina:<br>
I'm SO glad you're here! First, I want you to defeat Garden Sentries, Garden Scouts, Garden Commanders, Outdoor Gardeners, and Garden Destroyers. Defeat 10 of each, that should slow them down!
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Horpina:<br>
I'm SO glad you're here! First, I want you to defeat Garden Sentries, Garden Scouts, Garden Commanders, Outdoor Gardeners, and Garden Destroyers. Defeat 10 of each, that should slow them down!
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Horpina:<br>
Great job! That should slow them down and keep them in the garden, but we need to figure out what's causing the chaos. Who's controlling things and making the Genesis Trees restless?<br>
If we can't figure that out and correct the problem, things are going to get out of control fast!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10310_TwistedCreationTree 33031-06.html">"What do you think is behind this?"</Button>
</body></html>

View File

@ -0,0 +1,10 @@
<html><body>Horpina:<br>
Our investigation has just begun, so we don't know much yet. But we will!<br>
Thanks for helping us, meow! Choose a gift!<br>
<button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10310_TwistedCreationTree giveReward_9546">11 Fire Stones</button>
<button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10310_TwistedCreationTree giveReward_9547">11 Water Stones</button>
<button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10310_TwistedCreationTree giveReward_9548">11 Earth Stones</button>
<button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10310_TwistedCreationTree giveReward_9549">11 Wind Stones</button>
<button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10310_TwistedCreationTree giveReward_9550">11 Dark Stones</button>
<button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10310_TwistedCreationTree giveReward_9551">11 Holy Stones</button>
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Horpina:<br>
Don't forget me when you move on!
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Selina:<br>
I haven't seen you before, have I? Adventurers like you will need to work hard to survive here.<br>
(Only characters level 90 or above can take this quest on.)
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Selina:<br>
I'm sorry - I didn't introduce myself. My name is Selina, and I'm a scholar dispatched from Aden Castle. I'm here to investigate the Garden of Genesis ecosystem, specifically.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10310_TwistedCreationTree 33032-02.htm">"Go on."</Button>
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Selina:<br>
It's a beautiful place, isn't it? <br1>
Places like these prove to me that gods exist... I mean, how can sheer circumstance create such a paradise?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10310_TwistedCreationTree 33032-03.htm">"Go on."</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Selina:<br>
We're trying to figure out exactly how this place appeared. Our latest theories include a Seal of Emperor being broken...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10310_TwistedCreationTree 33032-04.htm">"A what?"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Selina:<br>
A seal designed to keep something hidden away. Shilen for example... though I suppose that could include an entire land... <br1>
Still, this is pure speculation. I'm investigating the Garden of Genesis with Horpina, who I think has something to ask of you. You should see her when you have a chance.
</body></html>

View File

@ -0,0 +1,3 @@
<html><body>Selina:<br>
Just in time! I think Horpina has something to ask of you - why don't you go see her?
</body></html>

View File

@ -0,0 +1,5 @@
<html><body>Selina:<br>
The Garden of Genesis... <br1>
According to ancient myth, the Garden of Gods was created to preserve the creatures the ancient gods loved the most. Because of that, the creatures here have never been seen anywhere else!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10310_TwistedCreationTree 33032-07.html">"Why were they hidden though?"</Button>
</body></html>

View File

@ -0,0 +1,4 @@
<html><body>Selina:<br>
Well... we may never have an answer to that question. <br1> It may not be the most important, either. Instead, let me pose this question to you: if the seal to this place was broken, and we can now access its wondrous lands, what's to say other seals haven't been broken? And what's to say those seals weren't holding back far more terrifying things?<br>
It's a question that sends shivers down me.
</body></html>

View File

@ -0,0 +1,252 @@
/*
* 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.Q10310_TwistedCreationTree;
import com.l2jmobius.gameserver.enums.QuestSound;
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.serverpackets.ExQuestNpcLogList;
import com.l2jmobius.gameserver.util.Util;
import quests.Q10302_UnsettlingShadowAndRumors.Q10302_UnsettlingShadowAndRumors;
/**
* Twisted Creation Tree (10310)
* @URL https://l2wiki.com/Creation_of_Twisted_Spiral
* @author Gigi
*/
public final class Q10310_TwistedCreationTree extends Quest
{
// NPCs
private static final int SELINA = 33032;
private static final int GORFINA = 33031;
// Monsters
private static final int GARDEN_SENTRY = 22947;
private static final int GARDEN_SCOUT = 22948;
private static final int GARDEN_COMMANDER = 22949;
private static final int OUTDOOR_GARDENER = 22950;
private static final int GARDEN_DESTROYER = 22951;
// Misc
private static final int MIN_LEVEL = 90;
public Q10310_TwistedCreationTree()
{
super(10310);
addStartNpc(SELINA);
addTalkId(SELINA, GORFINA);
addKillId(GARDEN_SENTRY, GARDEN_SCOUT, GARDEN_COMMANDER, OUTDOOR_GARDENER, GARDEN_DESTROYER);
addCondMinLevel(MIN_LEVEL, "33032-00.htm");
addCondCompletedQuest(Q10302_UnsettlingShadowAndRumors.class.getSimpleName(), "33032-00.htm");
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return htmltext;
}
switch (event)
{
case "33032-02.htm":
case "33032-03.htm":
case "33032-07.html":
case "33031-02.html":
case "33031-06.html":
{
htmltext = event;
break;
}
case "33032-04.htm":
{
qs.startQuest();
htmltext = event;
break;
}
case "33031-03.html":
{
qs.setCond(2, true);
htmltext = event;
break;
}
default:
{
if (event.startsWith("giveReward_"))
{
final int itemId = Integer.parseInt(event.replace("giveReward_", ""));
qs.exitQuest(false, true);
giveAdena(player, 3424540, false);
giveItems(player, itemId, 11);
addExpAndSp(player, 50178765, 12042);
htmltext = "33031-07.html";
}
}
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = null;
switch (qs.getState())
{
case State.CREATED:
{
if (npc.getId() == SELINA)
{
htmltext = "33032-01.htm";
break;
}
}
case State.STARTED:
{
switch (npc.getId())
{
case SELINA:
{
if (qs.isCond(1))
{
htmltext = "33032-05.html";
}
else if (qs.getCond() > 1)
{
htmltext = "33032-06.html";
}
break;
}
case GORFINA:
{
switch (qs.getCond())
{
case 1:
{
htmltext = "33031-01.html";
break;
}
case 2:
{
htmltext = "33031-04.html";
break;
}
case 3:
{
htmltext = "33031-05.html";
break;
}
}
break;
}
}
break;
}
case State.COMPLETED:
{
htmltext = "complete.html";
break;
}
}
return htmltext;
}
@Override
public String onKill(L2Npc npc, L2PcInstance killer, boolean isSummon)
{
final QuestState qs = getRandomPartyMemberState(killer, 2, 3, npc);
if ((qs != null) && qs.isCond(2) && Util.checkIfInRange(1500, npc, qs.getPlayer(), false))
{
switch (npc.getId())
{
case GARDEN_SENTRY:
{
int kills = qs.getInt(Integer.toString(GARDEN_SENTRY));
if (kills < 10)
{
kills++;
qs.set(Integer.toString(GARDEN_SENTRY), kills);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
case GARDEN_SCOUT:
{
int kills = qs.getInt(Integer.toString(GARDEN_SCOUT));
if (kills < 10)
{
kills++;
qs.set(Integer.toString(GARDEN_SCOUT), kills);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
case GARDEN_COMMANDER:
{
int kills = qs.getInt(Integer.toString(GARDEN_COMMANDER));
if (kills < 10)
{
kills++;
qs.set(Integer.toString(GARDEN_COMMANDER), kills);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
case OUTDOOR_GARDENER:
{
int kills = qs.getInt(Integer.toString(OUTDOOR_GARDENER));
if (kills < 10)
{
kills++;
qs.set(Integer.toString(OUTDOOR_GARDENER), kills);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
case GARDEN_DESTROYER:
{
int kills = qs.getInt(Integer.toString(GARDEN_DESTROYER));
if (kills < 10)
{
kills++;
qs.set(Integer.toString(GARDEN_DESTROYER), kills);
playSound(killer, QuestSound.ITEMSOUND_QUEST_ITEMGET);
}
break;
}
}
final ExQuestNpcLogList log = new ExQuestNpcLogList(getId());
log.addNpc(GARDEN_SENTRY, qs.getInt(Integer.toString(GARDEN_SENTRY)));
log.addNpc(GARDEN_SCOUT, qs.getInt(Integer.toString(GARDEN_SCOUT)));
log.addNpc(GARDEN_COMMANDER, qs.getInt(Integer.toString(GARDEN_COMMANDER)));
log.addNpc(OUTDOOR_GARDENER, qs.getInt(Integer.toString(OUTDOOR_GARDENER)));
log.addNpc(GARDEN_DESTROYER, qs.getInt(Integer.toString(GARDEN_DESTROYER)));
qs.getPlayer().sendPacket(log);
if ((qs.getInt(Integer.toString(GARDEN_SENTRY)) >= 10) && (qs.getInt(Integer.toString(GARDEN_SCOUT)) >= 10) && (qs.getInt(Integer.toString(GARDEN_COMMANDER)) >= 10) && (qs.getInt(Integer.toString(GARDEN_DESTROYER)) >= 10) && (qs.getInt(Integer.toString(GARDEN_DESTROYER)) >= 10))
{
qs.setCond(1);
qs.setCond(3, true);
}
}
return super.onKill(npc, killer, isSummon);
}
}

View File

@ -0,0 +1,4 @@
<html><body>Selina:<br>
Thanks to your help, we now have enough information to report on when I return to Aden! I should thank you again.<br>
(You have already completed this quest.)
</body></html>

View File

@ -213,6 +213,7 @@ import quests.Q10301_ShadowOfTerrorBlackishRedFog.Q10301_ShadowOfTerrorBlackishR
import quests.Q10302_UnsettlingShadowAndRumors.Q10302_UnsettlingShadowAndRumors;
import quests.Q10305_UnstoppableFutileEfforts.Q10305_UnstoppableFutileEfforts;
import quests.Q10306_TheCorruptedLeader.Q10306_TheCorruptedLeader;
import quests.Q10310_TwistedCreationTree.Q10310_TwistedCreationTree;
import quests.Q10317_OrbisWitch.Q10317_OrbisWitch;
import quests.Q10318_DecayingDarkness.Q10318_DecayingDarkness;
import quests.Q10320_LetsGoToTheCentralSquare.Q10320_LetsGoToTheCentralSquare;
@ -596,6 +597,7 @@ public class QuestMasterHandler
Q10302_UnsettlingShadowAndRumors.class,
Q10305_UnstoppableFutileEfforts.class,
Q10306_TheCorruptedLeader.class,
Q10310_TwistedCreationTree.class,
Q10317_OrbisWitch.class,
Q10318_DecayingDarkness.class,
Q10320_LetsGoToTheCentralSquare.class,