This commit is contained in:
4
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-00.htm
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-00.htm
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<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>
|
||||
5
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-01.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-01.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<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>
|
||||
<a action="bypass -h Quest Q00552_OlympiadVeteran 31688-03.html">Accept</a><br>
|
||||
<a action="bypass -h Quest Q00552_OlympiadVeteran 31688-02.htm">"Tell me more."</a>
|
||||
</body></html>
|
||||
5
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-02.htm
vendored
Normal file
5
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-02.htm
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
<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>
|
||||
<a action="bypass -h Quest Q00552_OlympiadVeteran 31688-03.html">Accept</a>
|
||||
</body></html>
|
||||
4
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-03.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-03.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<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>
|
||||
<a action="bypass -h npc_%objectId%_Quest">See other missions.</a>
|
||||
</body></html>
|
||||
3
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-04.html
vendored
Normal file
3
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-04.html
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
<html><body>Grand Olympiad Manager:<br>
|
||||
Well done. Please come back tomorrow.
|
||||
</body></html>
|
||||
4
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-05.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-05.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<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>
|
||||
4
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-s0.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-s0.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<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>
|
||||
4
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-s1.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-s1.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<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>
|
||||
<a action="bypass -h Quest Q00552_OlympiadVeteran 31688-04.html">"Yes."</a>
|
||||
</body></html>
|
||||
4
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-s2.html
vendored
Normal file
4
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/31688-s2.html
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
<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>
|
||||
<a action="bypass -h Quest Q00552_OlympiadVeteran 31688-04.html">"Yes please."</a>
|
||||
</body></html>
|
||||
235
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/Q00552_OlympiadVeteran.java
vendored
Normal file
235
trunk/dist/game/data/scripts/quests/Q00552_OlympiadVeteran/Q00552_OlympiadVeteran.java
vendored
Normal file
@@ -0,0 +1,235 @@
|
||||
/*
|
||||
* 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.Q00552_OlympiadVeteran;
|
||||
|
||||
import com.l2jserver.gameserver.enums.QuestType;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.olympiad.CompetitionType;
|
||||
import com.l2jserver.gameserver.model.olympiad.Participant;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.model.quest.QuestState;
|
||||
import com.l2jserver.gameserver.model.quest.State;
|
||||
|
||||
/**
|
||||
* Olympiad Veteran (552)<br>
|
||||
* @author lion
|
||||
* @since Nov. 5, 2011, improved by jurchiks
|
||||
* @version 2011-02-05 Based on official H5 PTS server and 551 quest ;)
|
||||
*/
|
||||
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 st = getQuestState(player, false);
|
||||
if (st == null)
|
||||
{
|
||||
return getNoQuestMsg(player);
|
||||
}
|
||||
String htmltext = event;
|
||||
|
||||
if (event.equalsIgnoreCase("31688-03.html"))
|
||||
{
|
||||
st.startQuest();
|
||||
}
|
||||
else if (event.equalsIgnoreCase("31688-04.html"))
|
||||
{
|
||||
final long count = st.getQuestItemsCount(TEAM_EVENT_CERTIFICATE) + st.getQuestItemsCount(CLASS_FREE_BATTLE_CERTIFICATE) + st.getQuestItemsCount(CLASS_BATTLE_CERTIFICATE);
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
st.giveItems(OLY_CHEST, count);
|
||||
st.exitQuest(QuestType.DAILY, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = getNoQuestMsg(player); // missing items
|
||||
}
|
||||
}
|
||||
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 st = getQuestState(player, false);
|
||||
if ((st != null) && st.isStarted())
|
||||
{
|
||||
int matches;
|
||||
switch (type)
|
||||
{
|
||||
case CLASSED:
|
||||
{
|
||||
matches = st.getInt("classed") + 1;
|
||||
st.set("classed", String.valueOf(matches));
|
||||
if ((matches == 5) && !st.hasQuestItems(CLASS_BATTLE_CERTIFICATE))
|
||||
{
|
||||
st.giveItems(CLASS_BATTLE_CERTIFICATE, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NON_CLASSED:
|
||||
{
|
||||
matches = st.getInt("nonclassed") + 1;
|
||||
st.set("nonclassed", String.valueOf(matches));
|
||||
if ((matches == 5) && !st.hasQuestItems(CLASS_FREE_BATTLE_CERTIFICATE))
|
||||
{
|
||||
st.giveItems(CLASS_FREE_BATTLE_CERTIFICATE, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TEAMS:
|
||||
{
|
||||
matches = st.getInt("teams") + 1;
|
||||
st.set("teams", String.valueOf(matches));
|
||||
if ((matches == 5) && !st.hasQuestItems(TEAM_EVENT_CERTIFICATE))
|
||||
{
|
||||
st.giveItems(TEAM_EVENT_CERTIFICATE, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (looser != null)
|
||||
{
|
||||
final L2PcInstance player = looser.getPlayer();
|
||||
if (player == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
final QuestState st = getQuestState(player, false);
|
||||
if ((st != null) && st.isStarted())
|
||||
{
|
||||
int matches;
|
||||
switch (type)
|
||||
{
|
||||
case CLASSED:
|
||||
{
|
||||
matches = st.getInt("classed") + 1;
|
||||
st.set("classed", String.valueOf(matches));
|
||||
if (matches == 5)
|
||||
{
|
||||
st.giveItems(CLASS_BATTLE_CERTIFICATE, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case NON_CLASSED:
|
||||
{
|
||||
matches = st.getInt("nonclassed") + 1;
|
||||
st.set("nonclassed", String.valueOf(matches));
|
||||
if (matches == 5)
|
||||
{
|
||||
st.giveItems(CLASS_FREE_BATTLE_CERTIFICATE, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case TEAMS:
|
||||
{
|
||||
matches = st.getInt("teams") + 1;
|
||||
st.set("teams", String.valueOf(matches));
|
||||
if (matches == 5)
|
||||
{
|
||||
st.giveItems(TEAM_EVENT_CERTIFICATE, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
String htmltext = getNoQuestMsg(player);
|
||||
final QuestState st = getQuestState(player, true);
|
||||
if (st == null)
|
||||
{
|
||||
return htmltext;
|
||||
}
|
||||
|
||||
if ((player.getLevel() < 75) || !player.isNoble())
|
||||
{
|
||||
htmltext = "31688-00.htm";
|
||||
}
|
||||
else if (st.isCreated())
|
||||
{
|
||||
htmltext = "31688-01.htm";
|
||||
}
|
||||
else if (st.isCompleted())
|
||||
{
|
||||
if (st.isNowAvailable())
|
||||
{
|
||||
st.setState(State.CREATED);
|
||||
if ((player.getLevel() < 75) || !player.isNoble())
|
||||
{
|
||||
htmltext = "31688-00.htm";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31688-05.html";
|
||||
}
|
||||
}
|
||||
else if (st.isStarted())
|
||||
{
|
||||
final long count = st.getQuestItemsCount(TEAM_EVENT_CERTIFICATE) + st.getQuestItemsCount(CLASS_FREE_BATTLE_CERTIFICATE) + st.getQuestItemsCount(CLASS_BATTLE_CERTIFICATE);
|
||||
|
||||
if (count == 3)
|
||||
{
|
||||
htmltext = "31688-04.html";
|
||||
st.giveItems(OLY_CHEST, 4);
|
||||
st.exitQuest(QuestType.DAILY, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
htmltext = "31688-s" + count + ".html";
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user