Merged with released L2J-Unity files.

This commit is contained in:
mobiusdev
2016-06-12 01:34:09 +00:00
parent e003e87887
commit 635557f5da
18352 changed files with 3245113 additions and 2892959 deletions

View File

@@ -1,4 +1,4 @@
<html><body>Captured Tree Spirit:<br>
I'm a tree spirit..Let me out of here. My freedom's...been...stolen from me...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10764_FreeSpirit start">"I'll free you from the Magic Chain."</Button>
<html><body>Captured Tree Spirit:<br>
I'm a tree spirit...Let me out of here. My freedom's...been...stolen from me...<br>
(You can free the spirits if you have a key while performing "Free Spirit", and are Lv. 38 or above.)
</body></html>

View File

@@ -1,4 +1,4 @@
<html><body>Captured Wind Spirit:<br>
I'm a wind spirit..Even as I look upon the sky, I cannot fly to it...I am no longer free...<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10764_FreeSpirit start">"I'll free you from the Magic Chain."</Button>
<html><body>Captured Wind Spirit:<br>
I'm a wind spirit...Even as I look upon the sky, I cannot fly to it...I am no longer free...<br>
(You can free the spirits if you have a key while performing "Free Spirit" and are Lv. 38 or above.)
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Vorbosc:<br>
My heart has been pounding, and I miss her. I must be in love. You're not mature enough to know love.<br>
(This quest is only available for characters Lv. 38 or above who have completed the quest "Terrifying Chertuba.")
</body></html>

View File

@@ -1,4 +1,4 @@
<html><body>Vorbos:<br>
YOu're here! Finally it's time to save her. I have both keys now.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10764_FreeSpirit 33966-02.htm">So... How?</button>
<html><body>Vorbos:<br>
You're here! Finally it's time to save her. I have both keys now.<br><br><br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10764_FreeSpirit 33966-02.htm">"So...how?"</Button>
</body></html>

View File

@@ -1,6 +1,5 @@
<html><body>Vorbos:<br>
Want to go myself, but can't show ugly self in front of her or her people!<br>
And my kin locked the spirits. How could I go?<br1>
You help.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10764_FreeSpirit 33966-03.htm">Yes, you're right!</button>
<html><body>Vorbos:<br>
Want to go myself, but can't show ugly self in front of her or her people!<br>
And my kin locked the spirits. How could I go? You help.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10764_FreeSpirit 33966-03.htm">"Yeah, you're right."</Button>
</body></html>

View File

@@ -1,7 +1,6 @@
<html><body>Vorbos:<br>
Thanks you! You're first one who wanted to help.<br1>
I'm touched!<br>
Now go help spirits!<br>
I will give you keys. Go unshackle <font color=LEVEL>Captured Tree Spirits</font> and <font color=LEVEL>Captured Wind Spirits</font> and <font color=LEVEL>free</font> them!<br>
And make sure no one can shackle spirits again by bringing <font color=LEVEL>10 Broken Chains</font>!
<html><body>Vorbos:<br>
Thank you! You're first one who wanted to help. I'm touched!<br>
Now go help spirits!<br>
I will give you keys. Go unshackle <font color="LEVEL">Captured Tree Spirits</font> and <font color="LEVEL">Captured Wind Spirits</font> and <font color="LEVEL">free</font> them!<br>
And make sure no one can shackle spirits again by bringing <font color="LEVEL">10 Broken Chains</font>!
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Vorbos:<br>
Thank you! You're first one who wanted to help. I'm touched!<br>
Now go help the spirits!<br>
I will give you keys. Go unshackle <font color="LEVEL">Captured Tree Spirits</font> and <font color="LEVEL">Captured Wind Spirits</font> <font color="LEVEL">and free</font> them!<br>
And make sure no one can shackle spirits again by bringing <font color="LEVEL">10 Broken Chains</font>!
</body></html>

View File

@@ -1,6 +0,0 @@
<html><body>Vorbos:<br>
She is here! SHe came to ugly me! She came to me!<br>
My love has talked to me and thanked me.<br>
I can die happy now! I am happy! So long, hero!<br1>
You are my hero!
</body></html>

View File

@@ -1,5 +1,5 @@
<html><body>Vorbos:<br>
You're back. What happened?<br>
I trust you, but I was still worried!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10764_FreeSpirit 33966-05.htm">The spirits are free. Do not worry.</button>
<html><body>Vorbos:<br>
You're back. What happened?<br>
I trust you, but I was still worried!<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q10764_FreeSpirit 33966-06.html">"The spirits are free. Do not worry."</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Vorbos:<br>
She is here! She came to ugly me! She came to me!<br>
My love has talked to me and thanked me.<br>
I can die happy now! I am happy! So long, hero! You are my hero!
</body></html>

View File

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

View File

@@ -1,3 +0,0 @@
<html><body>Vorbos:<br>
Your level is wrong for this quest.
</body></html>

View File

@@ -1,3 +0,0 @@
<html><body>Captured Tree Spirit:<br>
I'm a tree spirit...Let me our of here. My freedom's...been...stolen from me...<br>
</body></html>

View File

@@ -1,3 +0,0 @@
<html><body>Captured Wind Spirit:<br>
I'm a wind spirit...Even as I look upon the sky, I cannot fly to it...I am no longer free...<br>
</body></html>

View File

@@ -1,204 +1,160 @@
/*
* 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.Q10764_FreeSpirit;
import com.l2jmobius.gameserver.enums.ChatType;
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.network.NpcStringId;
import com.l2jmobius.gameserver.network.serverpackets.NpcSay;
import com.l2jmobius.gameserver.util.Broadcast;
import quests.Q10763_TerrifyingChertuba.Q10763_TerrifyingChertuba;
/**
* Free Spirit (10764)
* @author Gigi
*/
public class Q10764_FreeSpirit extends Quest
{
// NPCs
private static final int VORBOS = 33966;
private static final int CAPTURED_TREE = 33964;
private static final int CAPTURED_WIND = 33965;
private static final int LIBERATED_WIND_SPIRIT = 33968;
private static final int LIBERATED_TREE_SPIRIT = 33969;
// Items
private static final int LOOSENED_CHAIN = 39518;
// Reward
private static final int STEEL_DOOR_GUILD = 37045;
// Other
private static final int MIN_LEVEL = 38;
public Q10764_FreeSpirit()
{
super(10764, Q10764_FreeSpirit.class.getSimpleName(), "Free Spirit");
addStartNpc(VORBOS);
addTalkId(VORBOS, CAPTURED_TREE, CAPTURED_WIND);
registerQuestItems(LOOSENED_CHAIN);
addCondRace(Race.ERTHEIA, "33966-no.html");
addCondMinLevel(MIN_LEVEL, "33966-noLevel.html");
addCondCompletedQuest(Q10763_TerrifyingChertuba.class.getSimpleName(), "restriction.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 "start":
{
if (qs.isStarted() && qs.isCond(1))
{
if (getQuestItemsCount(player, LOOSENED_CHAIN) < 10)
{
giveItems(player, LOOSENED_CHAIN, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
npc.deleteMe();
}
if (getQuestItemsCount(player, LOOSENED_CHAIN) >= 10)
{
qs.setCond(2);
}
}
break;
}
case "33966-02.htm":
{
htmltext = event;
break;
}
case "33966-03.htm": // start the quest
{
qs.startQuest();
break;
}
case "33966-05.htm":
{
if (qs.isCond(2))
{
takeItems(player, LOOSENED_CHAIN, -1);
giveItems(player, STEEL_DOOR_GUILD, 10);
addExpAndSp(player, 1312934, 315);
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 = null;
if (qs == null)
{
return htmltext;
}
if (player.getRace() != Race.ERTHEIA)
{
return "33966-no.html";
}
switch (npc.getId())
{
case VORBOS:
{
if (qs.isCreated() && (player.getLevel() >= MIN_LEVEL))
{
htmltext = "33966-01.htm";
}
else if (qs.isStarted())
{
switch (qs.getCond())
{
case 1:
{
htmltext = "33966-06.html";
break;
}
case 2:
{
htmltext = "33966-04.htm";
break;
}
}
}
else if (qs.isCompleted())
{
htmltext = getAlreadyCompletedMsg(player);
}
break;
}
case CAPTURED_TREE:
{
if (qs.isStarted())
{
htmltext = "33964-01.html";
}
if (getQuestItemsCount(player, LOOSENED_CHAIN) < 10)
{
final L2Npc newSpawn = addSpawn(LIBERATED_TREE_SPIRIT, npc.getX() + 20, npc.getY() + 20, npc.getZ(), npc.getHeading(), false, 5000);
Broadcast.toKnownPlayers(newSpawn, new NpcSay(newSpawn.getObjectId(), ChatType.NPC_GENERAL, newSpawn.getId(), NpcStringId.THANK_YOU_THANK_YOU_FOR_HELPING));
giveItems(player, LOOSENED_CHAIN, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
npc.deleteMe();
}
if (getQuestItemsCount(player, LOOSENED_CHAIN) >= 10)
{
qs.setCond(2);
}
break;
}
case CAPTURED_WIND:
{
if (qs.isStarted())
{
htmltext = "33965-01.html";
}
if (getQuestItemsCount(player, LOOSENED_CHAIN) < 10)
{
final L2Npc newSpawn = addSpawn(LIBERATED_WIND_SPIRIT, npc.getX() + 20, npc.getY() + 20, npc.getZ(), npc.getHeading(), false, 5000);
Broadcast.toKnownPlayers(newSpawn, new NpcSay(newSpawn.getObjectId(), ChatType.NPC_GENERAL, newSpawn.getId(), NpcStringId.THANK_YOU_THANK_YOU_FOR_HELPING));
giveItems(player, LOOSENED_CHAIN, 1);
playSound(player, QuestSound.ITEMSOUND_QUEST_MIDDLE);
npc.deleteMe();
}
if (getQuestItemsCount(player, LOOSENED_CHAIN) >= 10)
{
qs.setCond(2);
}
break;
}
}
return htmltext;
}
}
/*
* 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.Q10764_FreeSpirit;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.enums.Race;
import com.l2jmobius.gameserver.model.Location;
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 quests.Q10763_TerrifyingChertuba.Q10763_TerrifyingChertuba;
/**
* Free Spirit (10764)
* @author malyelfik
*/
public final class Q10764_FreeSpirit extends Quest
{
// NPC
private static final int VORBOS = 33966;
private static final int TREE_SPIRIT = 33964;
private static final int WIND_SPIRIT = 33965;
private static final int SYLPH = 33967;
private static final int LIBERATED_WIND_SPIRIT = 33968;
private static final int LIBERATED_TREE_SPIRIT = 33969;
// Items
private static final int MAGIC_CHAIN_KEY_BUNDLE = 39490;
private static final int LOOSENED_CHAIN = 39518;
// Location
private static final Location SYLPH_LOCATION = new Location(-85001, 106057, -3592);
// Misc
private static final int MIN_LEVEL = 38;
public Q10764_FreeSpirit()
{
super(10764);
addStartNpc(VORBOS);
addTalkId(VORBOS, TREE_SPIRIT, WIND_SPIRIT);
addSpawnId(LIBERATED_TREE_SPIRIT, LIBERATED_WIND_SPIRIT, SYLPH);
addCondRace(Race.ERTHEIA, "33966-00.htm");
addCondMinLevel(MIN_LEVEL, "33966-00.htm");
addCondCompletedQuest(Q10763_TerrifyingChertuba.class.getSimpleName(), "33966-00.htm");
registerQuestItems(MAGIC_CHAIN_KEY_BUNDLE, LOOSENED_CHAIN);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return null;
}
String htmltext = event;
switch (event)
{
case "33966-02.htm":
break;
case "33966-03.htm":
{
qs.startQuest();
giveItems(player, MAGIC_CHAIN_KEY_BUNDLE, 10);
break;
}
case "33966-06.html":
{
if (qs.isCond(2))
{
addSpawn(SYLPH, SYLPH_LOCATION, false, 4000);
giveStoryQuestReward(player, 10);
addExpAndSp(player, 1312934, 315);
qs.exitQuest(false, true);
}
break;
}
default:
htmltext = null;
}
return htmltext;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, true);
String htmltext = getNoQuestMsg(player);
if (npc.getId() == VORBOS)
{
switch (qs.getState())
{
case State.CREATED:
htmltext = "33966-01.htm";
break;
case State.STARTED:
htmltext = (qs.isCond(1)) ? "33966-04.html" : "33966-05.html";
break;
case State.COMPLETED:
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
else
{
if (qs.isStarted() && qs.isCond(1))
{
final int npcId = (npc.getId() == WIND_SPIRIT) ? LIBERATED_WIND_SPIRIT : LIBERATED_TREE_SPIRIT;
giveItems(player, LOOSENED_CHAIN, 1);
addSpawn(npcId, npc, false, 2500);
npc.deleteMe();
if (getQuestItemsCount(player, LOOSENED_CHAIN) >= 10)
{
qs.setCond(2, true);
}
htmltext = null;
}
else
{
htmltext = npc.getId() + "-01.html";
}
}
return htmltext;
}
@Override
public String onSpawn(L2Npc npc)
{
if (npc.getId() == SYLPH)
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THANK_YOU_YOU_ARE_KIND);
}
else
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.THANK_YOU_THANK_YOU_FOR_HELPING);
}
return super.onSpawn(npc);
}
}

View File

@@ -1,3 +0,0 @@
<html><body>Vorbos:<br>
(Quest only available to Ertheia characters Lv. 38 or above who have completed the quest "Terrifying Chertuba.")
</body></html>