This commit is contained in:
4
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/31042-00.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/31042-00.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Melody Maestro Kantabilon:<br>
|
||||
Your pitch is way off!<br>
|
||||
(This quest can only be undertaken by a character of level 38 or above.)
|
||||
</body></html>
|
6
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/31042-01.htm
vendored
Normal file
6
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/31042-01.htm
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
<html><body>Melody Maestro Kantabilon:<br>
|
||||
Great news! I found the musical score for a wedding march I've been searching for!<br>
|
||||
Now I can play for all the lucky couples in the world!<br>
|
||||
I need a special Echo Crystal to store this music. Bring me 50 Silver Crystals, and I'll fill half of them with music for you!<br>
|
||||
<a action="bypass -h Quest Q00431_WeddingMarch 31042-02.htm">"I'll get them."</a>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/31042-02.htm
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/31042-02.htm
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Melody Maestro Kantabilon:<br>
|
||||
According to the contract, you must bring me 50 Silver Crystals currently held by the Lienriks <font color="LEVEL">near Heine</font>.
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/31042-03.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/31042-03.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Melody Maestro Kantabilon:<br>
|
||||
How can you call yourself an Adventurer if you can't even get these crystals?
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/31042-04.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/31042-04.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Melody Maestro Kantabilon:<br>
|
||||
Oh, I'm so thrilled! Now I can share this blessed music at wedding ceremonies!<br>
|
||||
<a action="bypass -h Quest Q00431_WeddingMarch 31042-06.html">"Here are the crystals."</a>
|
||||
</body></html>
|
3
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/31042-05.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/31042-05.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Melody Maestro Kantabilon:<br>
|
||||
What can you gain by deceiving me? Go get the crystals!
|
||||
</body></html>
|
4
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/31042-06.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/31042-06.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<html><body>Melody Maestro Kantabilon:<br>
|
||||
Here are the Echo Crystals with the wedding march.<br>
|
||||
May this music bless you someday!
|
||||
</body></html>
|
132
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/Q00431_WeddingMarch.java
vendored
Normal file
132
trunk/dist/game/data/scripts/quests/Q00431_WeddingMarch/Q00431_WeddingMarch.java
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
/*
|
||||
* Copyright (C) 2004-2014 L2J DataPack
|
||||
*
|
||||
* This file is part of L2J DataPack.
|
||||
*
|
||||
* L2J DataPack 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.
|
||||
*
|
||||
* L2J DataPack 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.Q00431_WeddingMarch;
|
||||
|
||||
import com.l2jserver.gameserver.enums.QuestSound;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* Wedding March (431)<br>
|
||||
* Original Jython script by CubicVirtuoso.
|
||||
* @author eyjine
|
||||
*/
|
||||
public class Q00431_WeddingMarch extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int KANTABILON = 31042;
|
||||
// Monsters
|
||||
private static final int[] MOBS =
|
||||
{
|
||||
20786, // Lienrik
|
||||
20787, // Lienrik Lad
|
||||
};
|
||||
// Items
|
||||
private static final int SILVER_CRYSTAL = 7540;
|
||||
private static final int WEDDING_ECHO_CRYSTAL = 7062;
|
||||
// Misc
|
||||
private static final int MIN_LEVEL = 38;
|
||||
private static final int CRYSTAL_COUNT = 50;
|
||||
|
||||
public Q00431_WeddingMarch()
|
||||
{
|
||||
super(431, Q00431_WeddingMarch.class.getSimpleName(), "Wedding March");
|
||||
addStartNpc(KANTABILON);
|
||||
addTalkId(KANTABILON);
|
||||
addKillId(MOBS);
|
||||
registerQuestItems(SILVER_CRYSTAL);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
String htmltext = null;
|
||||
if (event.equalsIgnoreCase("31042-02.htm"))
|
||||
{
|
||||
st.startQuest();
|
||||
htmltext = event;
|
||||
}
|
||||
else if (event.equalsIgnoreCase("31042-06.html"))
|
||||
{
|
||||
if (st.getQuestItemsCount(SILVER_CRYSTAL) < CRYSTAL_COUNT)
|
||||
{
|
||||
return "31042-05.html";
|
||||
}
|
||||
st.giveItems(WEDDING_ECHO_CRYSTAL, 25);
|
||||
st.exitQuest(true, true);
|
||||
htmltext = event;
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onKill(L2Npc npc, L2PcInstance player, boolean isSummon)
|
||||
{
|
||||
final L2PcInstance member = getRandomPartyMember(player, 1);
|
||||
if (member != null)
|
||||
{
|
||||
final QuestState st = getQuestState(member, false);
|
||||
if (getRandomBoolean())
|
||||
{
|
||||
st.giveItems(SILVER_CRYSTAL, 1);
|
||||
if (st.getQuestItemsCount(SILVER_CRYSTAL) >= CRYSTAL_COUNT)
|
||||
{
|
||||
st.setCond(2, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
st.playSound(QuestSound.ITEMSOUND_QUEST_ITEMGET);
|
||||
}
|
||||
}
|
||||
}
|
||||
return super.onKill(npc, player, isSummon);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
final QuestState st = getQuestState(player, true);
|
||||
|
||||
if (st == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
switch (st.getState())
|
||||
{
|
||||
case State.CREATED:
|
||||
htmltext = (player.getLevel() >= MIN_LEVEL) ? "31042-01.htm" : "31042-00.htm";
|
||||
break;
|
||||
case State.STARTED:
|
||||
htmltext = (st.isCond(1)) ? "31042-03.html" : "31042-04.html";
|
||||
break;
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user