Addition of quests todo file.
This commit is contained in:
@@ -1,4 +0,0 @@
|
||||
<html><body>Grand Olympiad Manager:<br>
|
||||
You do not meet the requirements for taking on this mission.<br>
|
||||
(Only noblesse characters above level 75 who have completed a third class transfer can undertake this quest.)
|
||||
</body></html>
|
||||
@@ -1,5 +0,0 @@
|
||||
<html><body>Grand Olympiad Manager:<br>
|
||||
While challenging the Olympiad, it is important to widen your level of experience as well. Just by making the challenge, you will receive a small reward. Will you make the challenge?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00552_OlympiadVeteran 31688-03.html">Accept</Button>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00552_OlympiadVeteran 31688-02.htm">"Tell me more."</Button>
|
||||
</body></html>
|
||||
@@ -1,5 +0,0 @@
|
||||
<html><body>Grand Olympiad Manager:<br>
|
||||
Please participate in all the various categories of matches in the Olympiad. If you participate in each of the <font color="LEVEL">non-class battles, class battles, and group battles 5 times</font>, your mission will be complete.<br>
|
||||
If it is difficult to participate in the three match categories, you can participate in just one category, and you will still receive some reward. If you're still satisfied, you can come to me. But please remember that once you receive the reward, you can't take on the mission again that same day.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00552_OlympiadVeteran 31688-03.html">Accept</Button>
|
||||
</body></html>
|
||||
@@ -1,4 +0,0 @@
|
||||
<html><body>Grand Olympiad Manager:<br>
|
||||
The mission has been accepted. Please check to see if there are any other missions. Once preparations are complete, challenge the Olympiad.<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h npc_%objectId%_Quest">See other missions.</Button>
|
||||
</body></html>
|
||||
@@ -1,3 +0,0 @@
|
||||
<html><body>Grand Olympiad Manager:<br>
|
||||
Well done. Please come back tomorrow.
|
||||
</body></html>
|
||||
@@ -1,4 +0,0 @@
|
||||
<html><body>Grand Olympiad Manager:<br>
|
||||
You have already received the reward for this mission. You should rest before you try again!<br>
|
||||
(This quest can only be undertaken once a day. This quest resets everyday at 6:30 AM.)
|
||||
</body></html>
|
||||
@@ -1,4 +0,0 @@
|
||||
<html><body>Grand Olympiad Manager:<br>
|
||||
You did not fulfill the requirements for receiving a reward.<br>
|
||||
you must participate at least 5 times in a non-class battle, class battle, or group battle in order to receive the reward. Of course, if you participate in all three categories, you can expect an even greater reward.
|
||||
</body></html>
|
||||
@@ -1,4 +0,0 @@
|
||||
<html><body>Grand Olympiad Manager:<br>
|
||||
I will give you an incomplete reward. Please remember that once you receive the reward, you can't take on the mission again today. Still want the reward?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00552_OlympiadVeteran 31688-04.html">"Yes."</Button>
|
||||
</body></html>
|
||||
@@ -1,4 +0,0 @@
|
||||
<html><body>Grand Olympiad Manager:<br>
|
||||
I will give you an incomplete reward. Please remember that once you receive the reward, you cannot take on the mission anymore today. Do you still want to go ahead?<br>
|
||||
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Q00552_OlympiadVeteran 31688-04.html">"Yes please."</Button>
|
||||
</body></html>
|
||||
@@ -1,230 +0,0 @@
|
||||
/*
|
||||
* 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.Q00552_OlympiadVeteran;
|
||||
|
||||
import com.l2jmobius.gameserver.enums.QuestType;
|
||||
import com.l2jmobius.gameserver.model.actor.L2Npc;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jmobius.gameserver.model.olympiad.CompetitionType;
|
||||
import com.l2jmobius.gameserver.model.olympiad.Participant;
|
||||
import com.l2jmobius.gameserver.model.quest.Quest;
|
||||
import com.l2jmobius.gameserver.model.quest.QuestState;
|
||||
import com.l2jmobius.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* Olympiad Veteran (552)
|
||||
* @author lion
|
||||
*/
|
||||
public class Q00552_OlympiadVeteran extends Quest
|
||||
{
|
||||
// NPC
|
||||
private static final int MANAGER = 31688;
|
||||
// Items
|
||||
private static final int TEAM_EVENT_CERTIFICATE = 17241;
|
||||
private static final int CLASS_FREE_BATTLE_CERTIFICATE = 17242;
|
||||
private static final int CLASS_BATTLE_CERTIFICATE = 17243;
|
||||
private static final int OLY_CHEST = 17169;
|
||||
|
||||
public Q00552_OlympiadVeteran()
|
||||
{
|
||||
super(552, Q00552_OlympiadVeteran.class.getSimpleName(), "Olympiad Veteran");
|
||||
addStartNpc(MANAGER);
|
||||
addTalkId(MANAGER);
|
||||
registerQuestItems(TEAM_EVENT_CERTIFICATE, CLASS_FREE_BATTLE_CERTIFICATE, CLASS_BATTLE_CERTIFICATE);
|
||||
addOlympiadMatchFinishId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if (qs == null)
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
String htmltext = event;
|
||||
|
||||
if (event.equalsIgnoreCase("31688-03.html"))
|
||||
{
|
||||
qs.startQuest();
|
||||
}
|
||||
else if (event.equalsIgnoreCase("31688-04.html"))
|
||||
{
|
||||
final long count = getQuestItemsCount(player, TEAM_EVENT_CERTIFICATE) + getQuestItemsCount(player, CLASS_FREE_BATTLE_CERTIFICATE) + getQuestItemsCount(player, CLASS_BATTLE_CERTIFICATE);
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
giveItems(player, OLY_CHEST, count);
|
||||
qs.exitQuest(QuestType.DAILY, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = getNoQuestMsg(player);
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onOlympiadMatchFinish(Participant winner, Participant looser, CompetitionType type)
|
||||
{
|
||||
if (winner != null)
|
||||
{
|
||||
final L2PcInstance player = winner.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs != null) && qs.isStarted())
|
||||
{
|
||||
int matches;
|
||||
switch (type)
|
||||
{
|
||||
case CLASSED:
|
||||
{
|
||||
matches = qs.getInt("classed") + 1;
|
||||
qs.set("classed", String.valueOf(matches));
|
||||
if ((matches == 5) && !hasQuestItems(player, CLASS_BATTLE_CERTIFICATE))
|
||||
{
|
||||
giveItems(player, CLASS_BATTLE_CERTIFICATE, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NON_CLASSED:
|
||||
{
|
||||
matches = qs.getInt("nonclassed") + 1;
|
||||
qs.set("nonclassed", String.valueOf(matches));
|
||||
if ((matches == 5) && !hasQuestItems(player, CLASS_FREE_BATTLE_CERTIFICATE))
|
||||
{
|
||||
giveItems(player, CLASS_FREE_BATTLE_CERTIFICATE, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TEAMS:
|
||||
{
|
||||
matches = qs.getInt("teams") + 1;
|
||||
qs.set("teams", String.valueOf(matches));
|
||||
if ((matches == 5) && !hasQuestItems(player, TEAM_EVENT_CERTIFICATE))
|
||||
{
|
||||
giveItems(player, TEAM_EVENT_CERTIFICATE, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (looser == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
final L2PcInstance player = looser.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
final QuestState qs = getQuestState(player, false);
|
||||
if ((qs == null) || !qs.isStarted())
|
||||
{
|
||||
return;
|
||||
}
|
||||
int matches;
|
||||
switch (type)
|
||||
{
|
||||
case CLASSED:
|
||||
{
|
||||
matches = qs.getInt("classed") + 1;
|
||||
qs.set("classed", String.valueOf(matches));
|
||||
if (matches == 5)
|
||||
{
|
||||
giveItems(player, CLASS_BATTLE_CERTIFICATE, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NON_CLASSED:
|
||||
{
|
||||
matches = qs.getInt("nonclassed") + 1;
|
||||
qs.set("nonclassed", String.valueOf(matches));
|
||||
if (matches == 5)
|
||||
{
|
||||
giveItems(player, CLASS_FREE_BATTLE_CERTIFICATE, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TEAMS:
|
||||
{
|
||||
matches = qs.getInt("teams") + 1;
|
||||
qs.set("teams", String.valueOf(matches));
|
||||
if (matches == 5)
|
||||
{
|
||||
giveItems(player, TEAM_EVENT_CERTIFICATE, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
final QuestState qs = getQuestState(player, true);
|
||||
if (qs == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if ((player.getLevel() < 75) || !player.isNoble())
|
||||
{
|
||||
htmltext = "31688-00.htm";
|
||||
}
|
||||
else if (qs.isCreated())
|
||||
{
|
||||
htmltext = "31688-01.htm";
|
||||
}
|
||||
else if (qs.isCompleted())
|
||||
{
|
||||
if (qs.isNowAvailable())
|
||||
{
|
||||
qs.setState(State.CREATED);
|
||||
htmltext = (player.getLevel() < 75) || !player.isNoble() ? "31688-00.htm" : "31688-01.htm";
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31688-05.html";
|
||||
}
|
||||
}
|
||||
else if (qs.isStarted())
|
||||
{
|
||||
final long count = getQuestItemsCount(player, TEAM_EVENT_CERTIFICATE) + getQuestItemsCount(player, CLASS_FREE_BATTLE_CERTIFICATE) + getQuestItemsCount(player, CLASS_BATTLE_CERTIFICATE);
|
||||
|
||||
if (count == 3)
|
||||
{
|
||||
htmltext = "31688-04.html";
|
||||
giveItems(player, OLY_CHEST, 4);
|
||||
qs.exitQuest(QuestType.DAILY, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31688-s" + count + ".html";
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user