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

@@ -0,0 +1,61 @@
/*
* 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 ai.areas.KeucereusAllianceBase;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.NpcStringId;
import ai.AbstractNpcAI;
/**
* El AI.
* @author St3eT
*/
public final class El extends AbstractNpcAI
{
// NPCs
private static final int EL = 32556;
private El()
{
addSpawnId(EL);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.equals("SPAM_TEXT") && (npc != null))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_CAN_USE_THE_JUMP_BOARD_TO_GET_STRAIGHT_TO_THE_2ND_FLOOR, 1000);
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onSpawn(L2Npc npc)
{
startQuestTimer("SPAM_TEXT", 10000, npc, null, true);
return super.onSpawn(npc);
}
public static void main(String[] args)
{
new El();
}
}

View File

@@ -0,0 +1,113 @@
/*
* 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 ai.areas.KeucereusAllianceBase;
import java.util.Collections;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.model.L2Spawn;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.NpcStringId;
import ai.AbstractNpcAI;
/**
* Dilios AI
* @author JIV, Sephiroth, Apocalipce
*/
public final class GeneralDilios extends AbstractNpcAI
{
private static final int GENERAL_ID = 32549;
private static final int GUARD_ID = 32619;
private L2Npc _general = null;
private final Set<L2Spawn> _guards = Collections.newSetFromMap(new ConcurrentHashMap<L2Spawn, Boolean>());
private static final NpcStringId[] DILIOS_TEXT =
{
NpcStringId.SPREAD_THE_WORD_HEROES_YOUNG_AND_OLD_ARE_GATHERING_TO_MARCH_TO_THE_SEED_OF_DESTRUCTION_AND_TAKE_DOWN_TIAT_ONCE_AND_FOR_ALL,
// NpcStringId.MESSENGER_INFORM_THE_PATRONS_OF_THE_KEUCEREUS_ALLIANCE_BASE_THE_SEED_OF_DESTRUCTION_IS_CURRENTLY_SECURED_UNDER_THE_FLAG_OF_THE_KEUCEREUS_ALLIANCE,
// NpcStringId.MESSENGER_INFORM_THE_PATRONS_OF_THE_KEUCEREUS_ALLIANCE_BASE_TIATS_MOUNTED_TROOP_IS_CURRENTLY_TRYING_TO_RETAKE_SEED_OF_DESTRUCTION_COMMIT_ALL_THE_AVAILABLE_REINFORCEMENTS_INTO_SEED_OF_DESTRUCTION,
NpcStringId.SPREAD_THE_WORD_BRAVE_WARRIORS_HAVE_STORMED_THE_HALL_OF_SUFFERING_AND_ARE_MARCHING_ONTO_THE_HALL_OF_EROSION_IN_THE_SEED_OF_INFINITY,
// NpcStringId.MESSENGER_INFORM_THE_BROTHERS_IN_KUCEREUS_CLAN_OUTPOST_SWEEPING_THE_SEED_OF_INFINITY_IS_CURRENTLY_COMPLETE_TO_THE_HEART_OF_THE_SEED_EKIMUS_IS_BEING_DIRECTLY_ATTACKED_AND_THE_UNDEAD_REMAINING_IN_THE_HALL_OF_SUFFERING_ARE_BEING_ERADICATED,
NpcStringId.SPREAD_THE_WORD_THE_FLAG_OF_THE_KEUCEREUS_ALLIANCE_FLIES_PROUDLY_OVER_THE_SEED_OF_INFINITY
// NpcStringId.MESSENGER_INFORM_THE_PATRONS_OF_THE_KEUCEREUS_ALLIANCE_BASE_THE_RESURRECTED_UNDEAD_IN_THE_SEED_OF_INFINITY_ARE_POURING_INTO_THE_HALL_OF_SUFFERING_AND_THE_HALL_OF_EROSION
// NpcStringId.MESSENGER_INFORM_THE_BROTHERS_IN_KUCEREUS_CLAN_OUTPOST_EKIMUS_IS_ABOUT_TO_BE_REVIVED_BY_THE_RESURRECTED_UNDEAD_IN_SEED_OF_INFINITY_SEND_ALL_REINFORCEMENTS_TO_THE_HEART_AND_THE_HALL_OF_SUFFERING
};
public GeneralDilios()
{
addSpawnId(GENERAL_ID, GUARD_ID);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.startsWith("command_"))
{
int value = Integer.parseInt(event.substring(8));
if (value < 6)
{
_general.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.STABBING_THREE_TIMES);
startQuestTimer("guard_animation_0", 3400, null, null);
}
else
{
value = -1;
_general.broadcastSay(ChatType.NPC_SHOUT, DILIOS_TEXT[getRandom(DILIOS_TEXT.length)]);
}
startQuestTimer("command_" + (value + 1), 60000, null, null);
}
else if (event.startsWith("guard_animation_"))
{
final int value = Integer.parseInt(event.substring(16));
for (L2Spawn guard : _guards)
{
guard.getLastSpawn().broadcastSocialAction(4);
}
if (value < 2)
{
startQuestTimer("guard_animation_" + (value + 1), 1500, null, null);
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onSpawn(L2Npc npc)
{
if (npc.getId() == GENERAL_ID)
{
startQuestTimer("command_0", 60000, null, null);
_general = npc;
}
else if (npc.getId() == GUARD_ID)
{
_guards.add(npc.getSpawn());
}
return super.onSpawn(npc);
}
public static void main(String[] args)
{
new GeneralDilios();
}
}

View File

@@ -0,0 +1,7 @@
<html><body>Engineer Lekon:<br>
Airship, eh? If you want board an Airship, you need to first register for a Summon License. There's a switch on the Airship controls that proves your qualifications to summon and pilot it. Unless you obtain that license, you won't be allowed to fly.<br>
Only <font color="LEVEL">Clan Leaders whose clan is level 5 or above</font> may earn the license. There is also a limit on the number of Airships.<br>
If you meet the requirements, you can obtain a Airship Summon License in exchange for <font color="LEVEL">10 Energy Star Stones</font>.<br>
An Energy Star Stone can be made by assembling Star Stones found floating in the skies over Gracia. If you think this is too time-consuming, you can also buy them from Officer Tolonis right over there..<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Lekon licence">Obtain an Airship Summon License </Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Engineer Lekon:<br>
Only a Clan Leader whose clan is level 5 or above can be issued an Airship Summon License.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><head><body>Engineer Lekon:<br>
You don't have enough Energy Star Stones yet. You can make them by assembling Star Stones found floating in the skies over Gracia. If you prefer, you can also purchase them from Officer Tolonis.
</body></html>

View File

@@ -0,0 +1,3 @@
<html><body>Engineer Lekon:<br>
Hey, I see here that you already have a Airship Summon License! Haven't you registered it yet? Or did you lose it already?
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Engineer Lekon:<br>
I'm too busy to take a breath! I'm supposed to maintain all these Airships and air vehicles by myself?! How does that make sense?<br>
And it's all very detailed, time-consuming work with no margin for error. Somebody up there must really hate me!<br>
Well, at least they supply me with the materials I need. Hey, adventurer! You must know how to use Airships or air vehicles. Care to lend me a hand?<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Lekon 32557-01.html">Ask about Airship Summon License</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,94 @@
/*
* 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 ai.areas.KeucereusAllianceBase.Lekon;
import com.l2jmobius.gameserver.instancemanager.AirShipManager;
import com.l2jmobius.gameserver.model.L2Clan;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.SystemMessageId;
import ai.AbstractNpcAI;
/**
* Lekon AI.
* @author St3eT
*/
public final class Lekon extends AbstractNpcAI
{
// NPCs
private static final int LEKON = 32557;
// Items
private static final int LICENCE = 13559; // Airship Summon License
private static final int STONE = 13277; // Energy Star Stone
// Misc
private static final int MIN_CLAN_LV = 5;
private static final int STONE_COUNT = 10;
public Lekon()
{
addFirstTalkId(LEKON);
addTalkId(LEKON);
addStartNpc(LEKON);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
switch (event)
{
case "32557-01.html":
{
htmltext = event;
break;
}
case "licence":
{
final L2Clan clan = player.getClan();
if ((clan == null) || !player.isClanLeader() || (clan.getLevel() < MIN_CLAN_LV))
{
htmltext = "32557-02.html";
}
else if (hasAtLeastOneQuestItem(player, LICENCE))
{
htmltext = "32557-04.html";
}
else if (AirShipManager.getInstance().hasAirShipLicense(clan.getId()))
{
player.sendPacket(SystemMessageId.THE_AIRSHIP_SUMMON_LICENSE_HAS_ALREADY_BEEN_ACQUIRED);
}
else if (getQuestItemsCount(player, STONE) >= STONE_COUNT)
{
takeItems(player, STONE, STONE_COUNT);
giveItems(player, LICENCE, 1);
}
else
{
htmltext = "32557-03.html";
}
break;
}
}
return htmltext;
}
public static void main(String[] args)
{
new Lekon();
}
}

View File

@@ -0,0 +1,140 @@
/*
* 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 ai.areas.KeucereusAllianceBase;
import java.util.Calendar;
import java.util.GregorianCalendar;
import com.l2jmobius.gameserver.datatables.SpawnTable;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.enums.Movie;
import com.l2jmobius.gameserver.model.L2World;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.NpcStringId;
import ai.AbstractNpcAI;
/**
* Lindvior Scene AI.
* @author nonom
*/
public final class Lindvior extends AbstractNpcAI
{
private static final int LINDVIOR_CAMERA = 18669;
private static final int TOMARIS = 32552;
private static final int ARTIUS = 32559;
private static final int RESET_HOUR = 18;
private static final int RESET_MIN = 58;
private static final int RESET_DAY_1 = Calendar.TUESDAY;
private static final int RESET_DAY_2 = Calendar.FRIDAY;
private static boolean ALT_MODE = false;
private static int ALT_MODE_MIN = 60; // schedule delay in minutes if ALT_MODE enabled
private L2Npc _lindviorCamera = null;
private L2Npc _tomaris = null;
private L2Npc _artius = null;
public Lindvior()
{
scheduleNextLindviorVisit();
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
switch (event)
{
case "tomaris_shout1":
{
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.HUH_THE_SKY_LOOKS_FUNNY_WHAT_S_THAT);
break;
}
case "artius_shout":
{
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.A_POWERFUL_SUBORDINATE_IS_BEING_HELD_BY_THE_BARRIER_ORB_THIS_REACTION_MEANS);
break;
}
case "tomaris_shout2":
{
npc.broadcastSay(ChatType.NPC_SHOUT, NpcStringId.BE_CAREFUL_SOMETHING_S_COMING);
break;
}
case "lindvior_scene":
{
if (npc != null)
{
playMovie(L2World.getInstance().getVisibleObjects(npc, L2PcInstance.class, 4000), Movie.SC_LINDVIOR);
}
break;
}
case "start":
{
_lindviorCamera = SpawnTable.getInstance().getAnySpawn(LINDVIOR_CAMERA).getLastSpawn();
_tomaris = SpawnTable.getInstance().getAnySpawn(TOMARIS).getLastSpawn();
_artius = SpawnTable.getInstance().getAnySpawn(ARTIUS).getLastSpawn();
startQuestTimer("tomaris_shout1", 1000, _tomaris, null);
startQuestTimer("artius_shout", 60000, _artius, null);
startQuestTimer("tomaris_shout2", 90000, _tomaris, null);
startQuestTimer("lindvior_scene", 120000, _lindviorCamera, null);
scheduleNextLindviorVisit();
break;
}
}
return super.onAdvEvent(event, npc, player);
}
public void scheduleNextLindviorVisit()
{
final long delay = (ALT_MODE) ? ALT_MODE_MIN * 60000 : scheduleNextLindviorDate();
startQuestTimer("start", delay, null, null);
}
protected long scheduleNextLindviorDate()
{
final GregorianCalendar date = new GregorianCalendar();
date.set(Calendar.MINUTE, RESET_MIN);
date.set(Calendar.HOUR_OF_DAY, RESET_HOUR);
if (System.currentTimeMillis() >= date.getTimeInMillis())
{
date.add(Calendar.DAY_OF_WEEK, 1);
}
final int dayOfWeek = date.get(Calendar.DAY_OF_WEEK);
if (dayOfWeek <= RESET_DAY_1)
{
date.add(Calendar.DAY_OF_WEEK, RESET_DAY_1 - dayOfWeek);
}
else if (dayOfWeek <= RESET_DAY_2)
{
date.add(Calendar.DAY_OF_WEEK, RESET_DAY_2 - dayOfWeek);
}
else
{
date.add(Calendar.DAY_OF_WEEK, 1 + RESET_DAY_1);
}
return date.getTimeInMillis() - System.currentTimeMillis();
}
public static void main(String[] args)
{
new Lindvior();
}
}

View File

@@ -0,0 +1,5 @@
<html><body>Mage Notingale:<br>
First of all, you must acquire either an Aurabird or an Airship in order to fight against the enemies who populate our skies. Since the number of Airships is limited, I recommend you acquire an Aurabird.<br>
To do so, go meet Engineer Lekon and do what he tells you. Even if you decide to acquire an Airship, Lekon is worth talking to.<br>
Check your map and I will tell you his location.
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Mage Notingale:<br>
Once you have acquired transportaion, the next thing is to fight against those who are attacking us.<br>
Our chief enemies are the monsters of the skies and the Seeds. Since you cannot possible handle either of these by yourself, you should start by gathering a party of your fellows.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-03.html">Ask about Aerial Raid Monsters.</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-04.html">Ask about major hunting grounds.</Button>
</body></html>

View File

@@ -0,0 +1,7 @@
<html><body>Mage Notingale:<br>
The following enemies have attacked us from the skies nearby:<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-05.html">Valdstone the Master Rider</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-06.html">Rok the King of Birds</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-07.html">Enira the Banshee Queen</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-08.html">Dius the Messenger of Destruction</Button>
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Mage Notigale:<br>
The following Seeds are the main sites of enemy power nearby:<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-09.html">Seed of Infinity</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-10.html">Seed of Destruction</Button>
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Mage Notingale:<br>
Valdstone the Master Rider used to be a lord of this land. He gained the power to control wild Aurabirds in exchange for yielding his territory to the Seed of Infinity.<br>
His Elite Riders always watch our fortress. Look at the map to see where he and his minions most frequently appear.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Mage Notingale:<br>
Rok, the King of Birds, used to be the largest and most intelligent bird in Gracia. But since the Seed of Destruction and Storm Dragon Lindvior appeared, he has been in hiding.<br>
As the power of the Seed of Destruction has waned, however, he appears to be regaining his former control over birds. When the power of the Seed of Destruction is weak, you may see Rok if you attack birds nearby. I will mark the areas on the map where he most often appears.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Mage Notingale:<br>
It is said that Enira the Banshee Queen is a subordinate of Ekimus, the ruler of the Seed of Infinity. But I believe differently. It seems as though she is keeping an eye on the Seed of Infinity.<br>
Of course, I'm not saying Enira is on our side. She is still very much a threat. If we hope to travel the skies of Gracia unmolested, she must be defeated. I have marked the areas where she frequently appears on your map.
</body></html>

View File

@@ -0,0 +1,4 @@
<html><body>Mage Notingale:<br>
Dius the Messenger of Destruction is a huge Drake of the Sky. He scours the skies for Tiat, the lord of the Seed of Destruction.<br>
Fortunately, he is normally scarce. If you apply a special <font color="LEVEL">bait for Drakes</font> to <font color="LEVEL">Baby Drake Wings</font>, however, you can lure him out. I will mark the area where he appears on your map.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Mage Notingale:<br>
I will mark the location of the Seed of Infinity on your map.<br>
It is controlled by Ekimus, the lord of Eternity. His ability to control both living and dead has transformed the whole Seed of Infinity into a living organism...<br>
General Dilios can give you more details.
</body></html>

View File

@@ -0,0 +1,5 @@
<html><body>Mage Notingale:<br>
I will mark the location of the Seed of Destruction on your map.<br>
It is controlled by Tiat, the lord of the Mounted Troop. The Seed is like a one huge fortress, thwarting any attempts to enter.<br>
General Dilios can give you more details.
</body></html>

View File

@@ -0,0 +1,9 @@
<html><body>Mage Nottingale:<br>
Welcome to Gracia! I am here to guide adventures who come from Aden.<br>
It is impossible to walk around in Gracia because of the contamination caused by the Seeds. Most move via Airship, but that is also difficult -- there simply aren't enough for everyone.<br>
The magicians of Aden crafted an alternative plan. It is called an <font color="LEVEL">Aura Bird</font>. I think it is the better solution for you.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-02.html">"What should I do?"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-03.html">"Can you tell me about Aerial Raid Monsters?"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest Nottingale 32627-04.html">"Any there any major hunting grounds nearby?"</Button>
<Button ALIGN=LEFT ICON="QUEST" action="bypass -h npc_%objectId%_Quest">Quest</Button>
</body></html>

View File

@@ -0,0 +1,125 @@
/*
* 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 ai.areas.KeucereusAllianceBase.Nottingale;
import java.util.HashMap;
import java.util.Map;
import com.l2jmobius.gameserver.instancemanager.AirShipManager;
import com.l2jmobius.gameserver.model.ClanPrivilege;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.quest.QuestState;
import com.l2jmobius.gameserver.network.serverpackets.RadarControl;
import ai.AbstractNpcAI;
import quests.Q10273_GoodDayToFly.Q10273_GoodDayToFly;
/**
* Nottingale AI.
* @author xban1x
*/
public final class Nottingale extends AbstractNpcAI
{
// NPC
private static final int NOTTINGALE = 32627;
// Misc
private static final Map<Integer, RadarControl> RADARS = new HashMap<>();
static
{
RADARS.put(2, new RadarControl(0, 2, -184545, 243120, 1581));
RADARS.put(5, new RadarControl(0, 1, -192361, 254528, 3598));
RADARS.put(6, new RadarControl(0, 1, -174600, 219711, 4424));
RADARS.put(7, new RadarControl(0, 1, -181989, 208968, 4424));
RADARS.put(8, new RadarControl(0, 1, -252898, 235845, 5343));
RADARS.put(9, new RadarControl(0, 1, -212819, 209813, 4288));
RADARS.put(10, new RadarControl(0, 1, -246899, 251918, 4352));
}
public Nottingale()
{
addStartNpc(NOTTINGALE);
addTalkId(NOTTINGALE);
addFirstTalkId(NOTTINGALE);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
String htmltext = null;
switch (event)
{
case "32627-02.html":
case "32627-03.html":
case "32627-04.html":
{
if (player.getClan() != null)
{
if (player.hasClanPrivilege(ClanPrivilege.CL_SUMMON_AIRSHIP) && AirShipManager.getInstance().hasAirShipLicense(player.getClanId()) && !AirShipManager.getInstance().hasAirShip(player.getClanId()))
{
htmltext = event;
}
else
{
final QuestState st = player.getQuestState(Q10273_GoodDayToFly.class.getSimpleName());
if ((st != null) && st.isCompleted())
{
htmltext = event;
}
else
{
player.sendPacket(RADARS.get(2));
htmltext = "32627-01.html";
}
}
}
else
{
final QuestState st = player.getQuestState(Q10273_GoodDayToFly.class.getSimpleName());
if ((st != null) && st.isCompleted())
{
htmltext = event;
}
else
{
player.sendPacket(RADARS.get(2));
htmltext = "32627-01.html";
}
}
break;
}
case "32627-05.html":
case "32627-06.html":
case "32627-07.html":
case "32627-08.html":
case "32627-09.html":
case "32627-10.html":
{
player.sendPacket(RADARS.get(Integer.valueOf(event.substring(6, 8))));
htmltext = event;
break;
}
}
return htmltext;
}
public static void main(String[] args)
{
new Nottingale();
}
}

View File

@@ -0,0 +1,61 @@
/*
* 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 ai.areas.KeucereusAllianceBase;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.network.NpcStringId;
import ai.AbstractNpcAI;
/**
* Plenos AI.
* @author St3eT
*/
public final class Plenos extends AbstractNpcAI
{
// NPCs
private static final int PLENOS = 32563;
private Plenos()
{
addSpawnId(PLENOS);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (event.equals("SPAM_TEXT") && (npc != null))
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOU_CAN_BE_TELEPORTED_TO_EACH_SEED_IF_YOU_VOLUNTEER_WHY_NOT_TRY, 1000);
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onSpawn(L2Npc npc)
{
startQuestTimer("SPAM_TEXT", 10000, npc, null, true);
return super.onSpawn(npc);
}
public static void main(String[] args)
{
new Plenos();
}
}

View File

@@ -0,0 +1,7 @@
<html><head><body>Seed Teleport Device:<br>
Let me guide you to the Seeds.<br>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeedTeleportDevice seedOfAnnihilation">"I want to go to the Seed of Annihilation (Lv.85)."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeedTeleportDevice seedOfDestruction">"I want to go to the Seed of Destruction (Lv.93)."</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeedTeleportDevice seedOfInfinity">"Can I go to the Seed of Infinity (Lv.95)?"</Button>
<Button ALIGN=LEFT ICON="NORMAL" action="bypass -h Quest SeedTeleportDevice seedOfHellfire">"Teleport me to the Seed of Hellfire (Lv.97)."</Button>
</body></html>

View File

@@ -0,0 +1,3 @@
<html><head><body>Seed Teleport Device:<br>
You must be Lv. <font color="LEVEL">97</font> or above to use the Seed of Teleport Device to the <font color="LEVEL">Seed of Hellfire</font>.
</body></html>

View File

@@ -0,0 +1,86 @@
/*
* 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 ai.areas.KeucereusAllianceBase.SeedTeleportDevice;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import ai.AbstractNpcAI;
/**
* Seed Teleport Device AI.
* @author St3eT
*/
public final class SeedTeleportDevice extends AbstractNpcAI
{
// NPCs
private static final int SEED_TELEPORT_DEVICE = 15929;
// Locations
private static final Location SOA = new Location(-175572, 154572, 2712);
private static final Location SOD = new Location(-247024, 251794, 4336);
private static final Location SOI = new Location(-213699, 210686, 4408);
private static final Location SOH = new Location(-147354, 152581, -14048);
// Misc
private static final int SOH_MIN_LV = 97;
private SeedTeleportDevice()
{
addStartNpc(SEED_TELEPORT_DEVICE);
addFirstTalkId(SEED_TELEPORT_DEVICE);
addTalkId(SEED_TELEPORT_DEVICE);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
switch (event)
{
case "seedOfAnnihilation":
{
player.teleToLocation(SOA);
break;
}
case "seedOfDestruction":
{
player.teleToLocation(SOD);
break;
}
case "seedOfInfinity":
{
player.teleToLocation(SOI);
break;
}
case "seedOfHellfire":
{
if (player.getLevel() < SOH_MIN_LV)
{
return "SeedOfHellfire-noLv.html";
}
player.teleToLocation(SOH);
break;
}
}
return super.onAdvEvent(event, npc, player);
}
public static void main(String[] args)
{
new SeedTeleportDevice();
}
}