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,119 +1,119 @@
/*
* 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.Q00110_ToThePrimevalIsle;
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;
/**
* To the Primeval Isle (110)
* @author Adry_85
*/
public class Q00110_ToThePrimevalIsle extends Quest
{
// NPCs
private static final int ANTON = 31338;
private static final int MARQUEZ = 32113;
// Item
private static final int ANCIENT_BOOK = 8777;
public Q00110_ToThePrimevalIsle()
{
super(110, Q00110_ToThePrimevalIsle.class.getSimpleName(), "To the Primeval Isle");
addStartNpc(ANTON);
addTalkId(ANTON, MARQUEZ);
registerQuestItems(ANCIENT_BOOK);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return getNoQuestMsg(player);
}
switch (event)
{
case "31338-1.html":
{
giveItems(player, ANCIENT_BOOK, 1);
qs.startQuest();
break;
}
case "32113-2.html":
case "32113-2a.html":
{
giveAdena(player, 191678, true);
addExpAndSp(player, 251602, 25245);
qs.exitQuest(false, true);
break;
}
}
return event;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, true);
if (qs == null)
{
return htmltext;
}
switch (npc.getId())
{
case ANTON:
{
switch (qs.getState())
{
case State.CREATED:
{
htmltext = (player.getLevel() < 75) ? "31338-0a.htm" : "31338-0b.htm";
break;
}
case State.STARTED:
{
htmltext = "31338-1a.html";
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
break;
}
case MARQUEZ:
{
if (qs.isCond(1))
{
htmltext = "32113-1.html";
}
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.Q00110_ToThePrimevalIsle;
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;
/**
* To the Primeval Isle (110)
* @author Adry_85
*/
public class Q00110_ToThePrimevalIsle extends Quest
{
// NPCs
private static final int ANTON = 31338;
private static final int MARQUEZ = 32113;
// Item
private static final int ANCIENT_BOOK = 8777;
public Q00110_ToThePrimevalIsle()
{
super(110);
addStartNpc(ANTON);
addTalkId(ANTON, MARQUEZ);
registerQuestItems(ANCIENT_BOOK);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final QuestState qs = getQuestState(player, false);
if (qs == null)
{
return getNoQuestMsg(player);
}
switch (event)
{
case "31338-1.html":
{
giveItems(player, ANCIENT_BOOK, 1);
qs.startQuest();
break;
}
case "32113-2.html":
case "32113-2a.html":
{
giveAdena(player, 191678, true);
addExpAndSp(player, 251602, 25245);
qs.exitQuest(false, true);
break;
}
}
return event;
}
@Override
public String onTalk(L2Npc npc, L2PcInstance player)
{
String htmltext = getNoQuestMsg(player);
final QuestState qs = getQuestState(player, true);
if (qs == null)
{
return htmltext;
}
switch (npc.getId())
{
case ANTON:
{
switch (qs.getState())
{
case State.CREATED:
{
htmltext = (player.getLevel() < 75) ? "31338-0a.htm" : "31338-0b.htm";
break;
}
case State.STARTED:
{
htmltext = "31338-1a.html";
break;
}
case State.COMPLETED:
{
htmltext = getAlreadyCompletedMsg(player);
break;
}
}
break;
}
case MARQUEZ:
{
if (qs.isCond(1))
{
htmltext = "32113-1.html";
}
break;
}
}
return htmltext;
}
}