This commit is contained in:
mobius
2015-01-01 20:02:50 +00:00
parent eeae660458
commit a6a3718849
17894 changed files with 2818932 additions and 0 deletions

View File

@@ -0,0 +1,425 @@
/*
* 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 gracia.vehicles;
import java.util.concurrent.Future;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.l2jserver.gameserver.ThreadPoolManager;
import com.l2jserver.gameserver.instancemanager.AirShipManager;
import com.l2jserver.gameserver.instancemanager.ZoneManager;
import com.l2jserver.gameserver.model.ClanPrivilege;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.model.VehiclePathPoint;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2AirShipInstance;
import com.l2jserver.gameserver.model.actor.instance.L2ControllableAirShipInstance;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.model.zone.L2ZoneType;
import com.l2jserver.gameserver.model.zone.type.L2ScriptZone;
import com.l2jserver.gameserver.network.NpcStringId;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.clientpackets.Say2;
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
public abstract class AirShipController extends Quest
{
protected final class DecayTask implements Runnable
{
@Override
public void run()
{
if (_dockedShip != null)
{
_dockedShip.deleteMe();
}
}
}
protected final class DepartTask implements Runnable
{
@Override
public void run()
{
if ((_dockedShip != null) && _dockedShip.isInDock() && !_dockedShip.isMoving())
{
if (_departPath != null)
{
_dockedShip.executePath(_departPath);
}
else
{
_dockedShip.deleteMe();
}
}
}
}
public static final Logger _log = Logger.getLogger(AirShipController.class.getName());
protected int _dockZone = 0;
protected int _shipSpawnX = 0;
protected int _shipSpawnY = 0;
protected int _shipSpawnZ = 0;
protected int _shipHeading = 0;
protected Location _oustLoc = null;
protected int _locationId = 0;
protected VehiclePathPoint[] _arrivalPath = null;
protected VehiclePathPoint[] _departPath = null;
protected VehiclePathPoint[][] _teleportsTable = null;
protected int[] _fuelTable = null;
protected int _movieId = 0;
protected boolean _isBusy = false;
protected L2ControllableAirShipInstance _dockedShip = null;
private final Runnable _decayTask = new DecayTask();
private final Runnable _departTask = new DepartTask();
private Future<?> _departSchedule = null;
private NpcSay _arrivalMessage = null;
private static final int DEPART_INTERVAL = 300000; // 5 min
private static final int LICENSE = 13559;
private static final int STARSTONE = 13277;
private static final int SUMMON_COST = 5;
private static final SystemMessage SM_NEED_MORE = SystemMessage.getSystemMessage(SystemMessageId.AN_AIRSHIP_CANNOT_BE_SUMMONED_BECAUSE_YOU_DON_T_HAVE_ENOUGH_S1).addItemName(STARSTONE);
public AirShipController(int questId, String name, String descr)
{
super(questId, name, descr);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if ("summon".equalsIgnoreCase(event))
{
if (_dockedShip != null)
{
if (_dockedShip.isOwner(player))
{
player.sendPacket(SystemMessageId.THE_CLAN_OWNED_AIRSHIP_ALREADY_EXISTS);
}
return null;
}
if (_isBusy)
{
player.sendPacket(SystemMessageId.ANOTHER_AIRSHIP_HAS_ALREADY_BEEN_SUMMONED_PLEASE_TRY_AGAIN_LATER);
return null;
}
if (!player.hasClanPrivilege(ClanPrivilege.CL_SUMMON_AIRSHIP))
{
player.sendPacket(SystemMessageId.AIRSHIP_SUMMON_LICENSE_REGISTRATION_CAN_ONLY_BE_DONE_BY_THE_CLAN_LEADER);
return null;
}
int ownerId = player.getClanId();
if (!AirShipManager.getInstance().hasAirShipLicense(ownerId))
{
player.sendPacket(SystemMessageId.AN_AIRSHIP_CANNOT_BE_SUMMONED_BECAUSE_EITHER_YOU_HAVE_NOT_REGISTERED_YOUR_AIRSHIP_LICENSE_OR_THE_AIRSHIP_HAS_NOT_YET_BEEN_SUMMONED);
return null;
}
if (AirShipManager.getInstance().hasAirShip(ownerId))
{
player.sendPacket(SystemMessageId.YOUR_CLAN_S_AIRSHIP_IS_ALREADY_BEING_USED_BY_ANOTHER_CLAN_MEMBER);
return null;
}
if (!player.destroyItemByItemId("AirShipSummon", STARSTONE, SUMMON_COST, npc, true))
{
player.sendPacket(SM_NEED_MORE);
return null;
}
_isBusy = true;
final L2AirShipInstance ship = AirShipManager.getInstance().getNewAirShip(_shipSpawnX, _shipSpawnY, _shipSpawnZ, _shipHeading, ownerId);
if (ship != null)
{
if (_arrivalPath != null)
{
ship.executePath(_arrivalPath);
}
if (_arrivalMessage == null)
{
_arrivalMessage = new NpcSay(npc.getObjectId(), Say2.NPC_SHOUT, npc.getId(), NpcStringId.THE_AIRSHIP_HAS_BEEN_SUMMONED_IT_WILL_AUTOMATICALLY_DEPART_IN_5_MINUTES);
}
npc.broadcastPacket(_arrivalMessage);
}
else
{
_isBusy = false;
}
return null;
}
else if ("board".equalsIgnoreCase(event))
{
if (player.isTransformed())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_TRANSFORMED);
return null;
}
else if (player.isParalyzed())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_PETRIFIED);
return null;
}
else if (player.isDead() || player.isFakeDeath())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_DEAD);
return null;
}
else if (player.isFishing())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_FISHING);
return null;
}
else if (player.isInCombat())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_IN_BATTLE);
return null;
}
else if (player.isInDuel())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_IN_A_DUEL);
return null;
}
else if (player.isSitting())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_SITTING);
return null;
}
else if (player.isCastingNow())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_CASTING);
return null;
}
else if (player.isCursedWeaponEquipped())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHEN_A_CURSED_WEAPON_IS_EQUIPPED);
return null;
}
else if (player.isCombatFlagEquipped())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_HOLDING_A_FLAG);
return null;
}
else if (player.hasSummon() || player.isMounted())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_A_PET_OR_A_SERVITOR_IS_SUMMONED);
return null;
}
else if (player.isFlyingMounted())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_BECAUSE_YOU_DO_NOT_MEET_THE_REQUIREMENTS);
return null;
}
if (_dockedShip != null)
{
_dockedShip.addPassenger(player);
}
return null;
}
else if ("register".equalsIgnoreCase(event))
{
if ((player.getClan() == null) || (player.getClan().getLevel() < 5))
{
player.sendPacket(SystemMessageId.IN_ORDER_TO_ACQUIRE_AN_AIRSHIP_THE_CLAN_S_LEVEL_MUST_BE_LEVEL_5_OR_ABOVE);
return null;
}
if (!player.isClanLeader())
{
player.sendPacket(SystemMessageId.AIRSHIP_SUMMON_LICENSE_REGISTRATION_CAN_ONLY_BE_DONE_BY_THE_CLAN_LEADER);
return null;
}
final int ownerId = player.getClanId();
if (AirShipManager.getInstance().hasAirShipLicense(ownerId))
{
player.sendPacket(SystemMessageId.THE_AIRSHIP_SUMMON_LICENSE_HAS_ALREADY_BEEN_ACQUIRED);
return null;
}
if (!player.destroyItemByItemId("AirShipLicense", LICENSE, 1, npc, true))
{
player.sendPacket(SM_NEED_MORE);
return null;
}
AirShipManager.getInstance().registerLicense(ownerId);
player.sendPacket(SystemMessageId.THE_AIRSHIP_SUMMON_LICENSE_HAS_BEEN_ENTERED_YOUR_CLAN_CAN_NOW_SUMMON_THE_AIRSHIP);
return null;
}
else
{
return event;
}
}
@Override
public String onEnterZone(L2Character character, L2ZoneType zone)
{
if (character instanceof L2ControllableAirShipInstance)
{
if (_dockedShip == null)
{
_dockedShip = (L2ControllableAirShipInstance) character;
_dockedShip.setInDock(_dockZone);
_dockedShip.setOustLoc(_oustLoc);
// Ship is not empty - display movie to passengers and dock
if (!_dockedShip.isEmpty())
{
if (_movieId != 0)
{
for (L2PcInstance passenger : _dockedShip.getPassengers())
{
if (passenger != null)
{
passenger.showQuestMovie(_movieId);
}
}
}
ThreadPoolManager.getInstance().scheduleGeneral(_decayTask, 1000);
}
else
{
_departSchedule = ThreadPoolManager.getInstance().scheduleGeneral(_departTask, DEPART_INTERVAL);
}
}
}
return null;
}
@Override
public String onExitZone(L2Character character, L2ZoneType zone)
{
if (character instanceof L2ControllableAirShipInstance)
{
if (character.equals(_dockedShip))
{
if (_departSchedule != null)
{
_departSchedule.cancel(false);
_departSchedule = null;
}
_dockedShip.setInDock(0);
_dockedShip = null;
_isBusy = false;
}
}
return null;
}
@Override
public String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return npc.getId() + ".htm";
}
protected void validityCheck()
{
L2ScriptZone zone = ZoneManager.getInstance().getZoneById(_dockZone, L2ScriptZone.class);
if (zone == null)
{
_log.log(Level.WARNING, getName() + ": Invalid zone " + _dockZone + ", controller disabled");
_isBusy = true;
return;
}
VehiclePathPoint p;
if (_arrivalPath != null)
{
if (_arrivalPath.length == 0)
{
_log.log(Level.WARNING, getName() + ": Zero arrival path length.");
_arrivalPath = null;
}
else
{
p = _arrivalPath[_arrivalPath.length - 1];
if (!zone.isInsideZone(p.getLocation()))
{
_log.log(Level.WARNING, getName() + ": Arrival path finish point (" + p.getX() + "," + p.getY() + "," + p.getZ() + ") not in zone " + _dockZone);
_arrivalPath = null;
}
}
}
if (_arrivalPath == null)
{
if (!ZoneManager.getInstance().getZoneById(_dockZone, L2ScriptZone.class).isInsideZone(_shipSpawnX, _shipSpawnY, _shipSpawnZ))
{
_log.log(Level.WARNING, getName() + ": Arrival path is null and spawn point not in zone " + _dockZone + ", controller disabled");
_isBusy = true;
return;
}
}
if (_departPath != null)
{
if (_departPath.length == 0)
{
_log.log(Level.WARNING, getName() + ": Zero depart path length.");
_departPath = null;
}
else
{
p = _departPath[_departPath.length - 1];
if (zone.isInsideZone(p.getLocation()))
{
_log.log(Level.WARNING, getName() + ": Departure path finish point (" + p.getX() + "," + p.getY() + "," + p.getZ() + ") in zone " + _dockZone);
_departPath = null;
}
}
}
if (_teleportsTable != null)
{
if (_fuelTable == null)
{
_log.log(Level.WARNING, getName() + ": Fuel consumption not defined.");
}
else
{
if (_teleportsTable.length != _fuelTable.length)
{
_log.log(Level.WARNING, getName() + ": Fuel consumption not match teleport list.");
}
else
{
AirShipManager.getInstance().registerAirShipTeleportList(_dockZone, _locationId, _teleportsTable, _fuelTable);
}
}
}
}
}

View File

@@ -0,0 +1,6 @@
<html><body>Airship Controller:<br>
You see a floating piece of stone filled with a mysterious power. The green light is flashing, so there doesn't appear to be anything wrong with its function.<br>
Using this should allow you to board the Airship headed for the continent of Gracia.<br>
<a action="bypass -h Quest AirShipGludioGracia board">Board the Airship.</a><br>
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
</body></html>

View File

@@ -0,0 +1,6 @@
<html><body>Airship Controller:<br>
You see a floating piece of stone filled with a mysterious power. The green light is flashing, so there doesn't appear to be anything wrong with its function.<br>
Using this should allow you to board the Airship headed for the continent of Gracia.<br>
<a action="bypass -h Quest AirShipGludioGracia board">Board the Airship.</a><br>
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
</body></html>

View File

@@ -0,0 +1,310 @@
/*
* 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 gracia.vehicles.AirShipGludioGracia;
import com.l2jserver.gameserver.ThreadPoolManager;
import com.l2jserver.gameserver.instancemanager.AirShipManager;
import com.l2jserver.gameserver.model.L2Object;
import com.l2jserver.gameserver.model.L2World;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.model.VehiclePathPoint;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2AirShipInstance;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.quest.Quest;
import com.l2jserver.gameserver.network.NpcStringId;
import com.l2jserver.gameserver.network.SystemMessageId;
import com.l2jserver.gameserver.network.clientpackets.Say2;
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
/**
* @author DS
*/
public final class AirShipGludioGracia extends Quest implements Runnable
{
private static final int[] CONTROLLERS =
{
32607,
32609
};
private static final int GLUDIO_DOCK_ID = 10;
private static final int GRACIA_DOCK_ID = 11;
private static final Location OUST_GLUDIO = new Location(-149379, 255246, -80);
private static final Location OUST_GRACIA = new Location(-186563, 243590, 2608);
private static final VehiclePathPoint[] GLUDIO_TO_WARPGATE =
{
new VehiclePathPoint(-151202, 252556, 231),
new VehiclePathPoint(-160403, 256144, 222),
new VehiclePathPoint(-167874, 256731, -509, 0, 41035)
// teleport: x,y,z,speed=0,heading
};
private static final VehiclePathPoint[] WARPGATE_TO_GRACIA =
{
new VehiclePathPoint(-169763, 254815, 282),
new VehiclePathPoint(-171822, 250061, 425),
new VehiclePathPoint(-172595, 247737, 398),
new VehiclePathPoint(-174538, 246185, 39),
new VehiclePathPoint(-179440, 243651, 1337),
new VehiclePathPoint(-182601, 243957, 2739),
new VehiclePathPoint(-184952, 245122, 2694),
new VehiclePathPoint(-186936, 244563, 2617)
};
private static final VehiclePathPoint[] GRACIA_TO_WARPGATE =
{
new VehiclePathPoint(-187801, 244997, 2672),
new VehiclePathPoint(-188520, 245932, 2465),
new VehiclePathPoint(-189932, 245243, 1682),
new VehiclePathPoint(-191192, 242969, 1523),
new VehiclePathPoint(-190408, 239088, 1706),
new VehiclePathPoint(-187475, 237113, 2768),
new VehiclePathPoint(-184673, 238433, 2802),
new VehiclePathPoint(-184524, 241119, 2816),
new VehiclePathPoint(-182129, 243385, 2733),
new VehiclePathPoint(-179440, 243651, 1337),
new VehiclePathPoint(-174538, 246185, 39),
new VehiclePathPoint(-172595, 247737, 398),
new VehiclePathPoint(-171822, 250061, 425),
new VehiclePathPoint(-169763, 254815, 282),
new VehiclePathPoint(-168067, 256626, 343),
new VehiclePathPoint(-157261, 255664, 221, 0, 64781)
// teleport: x,y,z,speed=0,heading
};
private static final VehiclePathPoint[] WARPGATE_TO_GLUDIO =
{
new VehiclePathPoint(-153414, 255385, 221),
new VehiclePathPoint(-149548, 258172, 221),
new VehiclePathPoint(-146884, 257097, 221),
new VehiclePathPoint(-146672, 254239, 221),
new VehiclePathPoint(-147855, 252712, 206),
new VehiclePathPoint(-149378, 252552, 198)
};
private final L2AirShipInstance _ship;
private int _cycle = 0;
private boolean _foundAtcGludio = false;
private L2Npc _atcGludio = null;
private boolean _foundAtcGracia = false;
private L2Npc _atcGracia = null;
public AirShipGludioGracia()
{
super(-1, AirShipGludioGracia.class.getSimpleName(), "gracia/vehicles");
addStartNpc(CONTROLLERS);
addFirstTalkId(CONTROLLERS);
addTalkId(CONTROLLERS);
_ship = AirShipManager.getInstance().getNewAirShip(-149378, 252552, 198, 33837);
_ship.setOustLoc(OUST_GLUDIO);
_ship.setInDock(GLUDIO_DOCK_ID);
_ship.registerEngine(this);
_ship.runEngine(60000);
}
private final void broadcastInGludio(NpcStringId npcString)
{
if (!_foundAtcGludio)
{
_foundAtcGludio = true;
_atcGludio = findController();
}
if (_atcGludio != null)
{
_atcGludio.broadcastPacket(new NpcSay(_atcGludio.getObjectId(), Say2.NPC_SHOUT, _atcGludio.getId(), npcString));
}
}
private final void broadcastInGracia(NpcStringId npcStringId)
{
if (!_foundAtcGracia)
{
_foundAtcGracia = true;
_atcGracia = findController();
}
if (_atcGracia != null)
{
_atcGracia.broadcastPacket(new NpcSay(_atcGracia.getObjectId(), Say2.NPC_SHOUT, _atcGracia.getId(), npcStringId));
}
}
private final L2Npc findController()
{
// check objects around the ship
for (L2Object obj : L2World.getInstance().getVisibleObjects(_ship, 600))
{
if (obj.isNpc())
{
for (int id : CONTROLLERS)
{
if (obj.getId() == id)
{
return (L2Npc) obj;
}
}
}
}
return null;
}
@Override
public final String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
if (player.isTransformed())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_TRANSFORMED);
return null;
}
else if (player.isParalyzed())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_PETRIFIED);
return null;
}
else if (player.isDead() || player.isFakeDeath())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_DEAD);
return null;
}
else if (player.isFishing())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_FISHING);
return null;
}
else if (player.isInCombat())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_IN_BATTLE);
return null;
}
else if (player.isInDuel())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_IN_A_DUEL);
return null;
}
else if (player.isSitting())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_SITTING);
return null;
}
else if (player.isCastingNow())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_CASTING);
return null;
}
else if (player.isCursedWeaponEquipped())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHEN_A_CURSED_WEAPON_IS_EQUIPPED);
return null;
}
else if (player.isCombatFlagEquipped())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_HOLDING_A_FLAG);
return null;
}
else if (player.hasSummon() || player.isMounted())
{
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_A_PET_OR_A_SERVITOR_IS_SUMMONED);
return null;
}
else if (_ship.isInDock() && _ship.isInsideRadius(player, 600, true, false))
{
_ship.addPassenger(player);
}
return null;
}
@Override
public final String onFirstTalk(L2Npc npc, L2PcInstance player)
{
return npc.getId() + ".htm";
}
@Override
public void run()
{
try
{
switch (_cycle)
{
case 0:
broadcastInGludio(NpcStringId.THE_REGULARLY_SCHEDULED_AIRSHIP_THAT_FLIES_TO_THE_GRACIA_CONTINENT_HAS_DEPARTED);
_ship.setInDock(0);
_ship.executePath(GLUDIO_TO_WARPGATE);
break;
case 1:
// _ship.teleToLocation(-167874, 256731, -509, 41035, false);
_ship.setOustLoc(OUST_GRACIA);
ThreadPoolManager.getInstance().scheduleGeneral(this, 5000);
break;
case 2:
_ship.executePath(WARPGATE_TO_GRACIA);
break;
case 3:
broadcastInGracia(NpcStringId.THE_REGULARLY_SCHEDULED_AIRSHIP_HAS_ARRIVED_IT_WILL_DEPART_FOR_THE_ADEN_CONTINENT_IN_1_MINUTE);
_ship.setInDock(GRACIA_DOCK_ID);
_ship.oustPlayers();
ThreadPoolManager.getInstance().scheduleGeneral(this, 60000);
break;
case 4:
broadcastInGracia(NpcStringId.THE_REGULARLY_SCHEDULED_AIRSHIP_THAT_FLIES_TO_THE_ADEN_CONTINENT_HAS_DEPARTED);
_ship.setInDock(0);
_ship.executePath(GRACIA_TO_WARPGATE);
break;
case 5:
// _ship.teleToLocation(-157261, 255664, 221, 64781, false);
_ship.setOustLoc(OUST_GLUDIO);
ThreadPoolManager.getInstance().scheduleGeneral(this, 5000);
break;
case 6:
_ship.executePath(WARPGATE_TO_GLUDIO);
break;
case 7:
broadcastInGludio(NpcStringId.THE_REGULARLY_SCHEDULED_AIRSHIP_HAS_ARRIVED_IT_WILL_DEPART_FOR_THE_GRACIA_CONTINENT_IN_1_MINUTE);
_ship.setInDock(GLUDIO_DOCK_ID);
_ship.oustPlayers();
ThreadPoolManager.getInstance().scheduleGeneral(this, 60000);
break;
}
_cycle++;
if (_cycle > 7)
{
_cycle = 0;
}
}
catch (Exception e)
{
e.printStackTrace();
}
}
@Override
public boolean unload(boolean removeFromList)
{
if (_ship != null)
{
_ship.oustPlayers();
_ship.deleteMe();
}
return super.unload(removeFromList);
}
}

View File

@@ -0,0 +1,8 @@
<html><body>Airship Controller:<br>
You see a floating piece of stone filled with a mysterious power. The green light is flashing, so there doesn't appear to be anything wrong with its function.<br><br>
By manipulating this, you should be able to control the Airship.<br>
<a action="bypass -h Quest KeucereusNorthController board">Board the Airship.</a><br>
<a action="bypass -h Quest KeucereusNorthController summon">Summon the Airship.</a><br>
<a action="bypass -h Quest KeucereusNorthController register">Register summoning license.</a><br>
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
</body></html>

View File

@@ -0,0 +1,97 @@
/*
* 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 gracia.vehicles.KeucereusNorthController;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.model.VehiclePathPoint;
import gracia.vehicles.AirShipController;
public final class KeucereusNorthController extends AirShipController
{
private static final int DOCK_ZONE = 50602;
private static final int LOCATION = 100;
private static final int CONTROLLER_ID = 32606;
private static final VehiclePathPoint[] ARRIVAL =
{
new VehiclePathPoint(-183218, 239494, 2500, 280, 2000),
new VehiclePathPoint(-183218, 239494, 1336, 280, 2000)
};
private static final VehiclePathPoint[] DEPART =
{
new VehiclePathPoint(-183218, 239494, 1700, 280, 2000),
new VehiclePathPoint(-181974, 235358, 1700, 280, 2000)
};
private static final VehiclePathPoint[][] TELEPORTS =
{
{
new VehiclePathPoint(-183218, 239494, 1700, 280, 2000),
new VehiclePathPoint(-181974, 235358, 1700, 280, 2000),
new VehiclePathPoint(-186373, 234000, 2500, 0, 0)
},
{
new VehiclePathPoint(-183218, 239494, 1700, 280, 2000),
new VehiclePathPoint(-181974, 235358, 1700, 280, 2000),
new VehiclePathPoint(-206692, 220997, 3000, 0, 0)
},
{
new VehiclePathPoint(-183218, 239494, 1700, 280, 2000),
new VehiclePathPoint(-181974, 235358, 1700, 280, 2000),
new VehiclePathPoint(-235693, 248843, 5100, 0, 0)
}
};
private static final int[] FUEL =
{
0,
50,
100
};
public KeucereusNorthController()
{
super(-1, KeucereusNorthController.class.getSimpleName(), "gracia/vehicles");
addStartNpc(CONTROLLER_ID);
addFirstTalkId(CONTROLLER_ID);
addTalkId(CONTROLLER_ID);
_dockZone = DOCK_ZONE;
addEnterZoneId(DOCK_ZONE);
addExitZoneId(DOCK_ZONE);
_shipSpawnX = -184145;
_shipSpawnY = 242373;
_shipSpawnZ = 3000;
_oustLoc = new Location(-183900, 239384, 1320);
_locationId = LOCATION;
_arrivalPath = ARRIVAL;
_departPath = DEPART;
_teleportsTable = TELEPORTS;
_fuelTable = FUEL;
_movieId = 1001;
validityCheck();
}
}

View File

@@ -0,0 +1,8 @@
<html><body>Airship Controller:<br>
You see a floating piece of stone filled with a mysterious power. The green light is flashing, so there doesn't appear to be anything wrong with its function.<br><br>
By manipulating this, you should be able to control the Airship.<br>
<a action="bypass -h Quest KeucereusSouthController board">Board the Airship.</a><br>
<a action="bypass -h Quest KeucereusSouthController summon">Summon the Airship.</a><br>
<a action="bypass -h Quest KeucereusSouthController register">Register summoning license.</a><br>
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
</body></html>

View File

@@ -0,0 +1,97 @@
/*
* 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 gracia.vehicles.KeucereusSouthController;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.model.VehiclePathPoint;
import gracia.vehicles.AirShipController;
public final class KeucereusSouthController extends AirShipController
{
private static final int DOCK_ZONE = 50603;
private static final int LOCATION = 100;
private static final int CONTROLLER_ID = 32517;
private static final VehiclePathPoint[] ARRIVAL =
{
new VehiclePathPoint(-185312, 246544, 2500),
new VehiclePathPoint(-185312, 246544, 1336)
};
private static final VehiclePathPoint[] DEPART =
{
new VehiclePathPoint(-185312, 246544, 1700, 280, 2000),
new VehiclePathPoint(-186900, 251699, 1700, 280, 2000)
};
private static final VehiclePathPoint[][] TELEPORTS =
{
{
new VehiclePathPoint(-185312, 246544, 1700, 280, 2000),
new VehiclePathPoint(-186900, 251699, 1700, 280, 2000),
new VehiclePathPoint(-186373, 234000, 2500, 0, 0)
},
{
new VehiclePathPoint(-185312, 246544, 1700, 280, 2000),
new VehiclePathPoint(-186900, 251699, 1700, 280, 2000),
new VehiclePathPoint(-206692, 220997, 3000, 0, 0)
},
{
new VehiclePathPoint(-185312, 246544, 1700, 280, 2000),
new VehiclePathPoint(-186900, 251699, 1700, 280, 2000),
new VehiclePathPoint(-235693, 248843, 5100, 0, 0)
}
};
private static final int[] FUEL =
{
0,
50,
100
};
public KeucereusSouthController()
{
super(-1, KeucereusSouthController.class.getSimpleName(), "gracia/vehicles");
addStartNpc(CONTROLLER_ID);
addFirstTalkId(CONTROLLER_ID);
addTalkId(CONTROLLER_ID);
_dockZone = DOCK_ZONE;
addEnterZoneId(DOCK_ZONE);
addExitZoneId(DOCK_ZONE);
_shipSpawnX = -184527;
_shipSpawnY = 243611;
_shipSpawnZ = 3000;
_locationId = LOCATION;
_arrivalPath = ARRIVAL;
_departPath = DEPART;
_teleportsTable = TELEPORTS;
_fuelTable = FUEL;
_oustLoc = new Location(-186148, 246296, 1360);
_movieId = 1000;
validityCheck();
}
}

View File

@@ -0,0 +1,7 @@
<html><body>Airship Controller:<br>
You see a floating piece of stone filled with a mysterious power. The green light is flashing, so there doesn't appear to be anything wrong with its function.<br><br>
By manipulating this, you should be able to control the Airship.<br>
<a action="bypass -h Quest SoDController board">Board the Airship.</a><br>
<a action="bypass -h Quest SoDController summon">Summon the Airship.</a><br>
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
</body></html>

View File

@@ -0,0 +1,87 @@
/*
* 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 gracia.vehicles.SoDController;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.model.VehiclePathPoint;
import gracia.vehicles.AirShipController;
public final class SoDController extends AirShipController
{
private static final int DOCK_ZONE = 50601;
private static final int LOCATION = 102;
private static final int CONTROLLER_ID = 32605;
private static final VehiclePathPoint[] ARRIVAL =
{
new VehiclePathPoint(-246445, 252331, 4359, 280, 2000),
};
private static final VehiclePathPoint[] DEPART =
{
new VehiclePathPoint(-245245, 251040, 4359, 280, 2000)
};
private static final VehiclePathPoint[][] TELEPORTS =
{
{
new VehiclePathPoint(-245245, 251040, 4359, 280, 2000),
new VehiclePathPoint(-235693, 248843, 5100, 0, 0)
},
{
new VehiclePathPoint(-245245, 251040, 4359, 280, 2000),
new VehiclePathPoint(-195357, 233430, 2500, 0, 0)
}
};
private static final int[] FUEL =
{
0,
100
};
public SoDController()
{
super(-1, SoDController.class.getSimpleName(), "gracia/vehicles");
addStartNpc(CONTROLLER_ID);
addFirstTalkId(CONTROLLER_ID);
addTalkId(CONTROLLER_ID);
_dockZone = DOCK_ZONE;
addEnterZoneId(DOCK_ZONE);
addExitZoneId(DOCK_ZONE);
_shipSpawnX = -247702;
_shipSpawnY = 253631;
_shipSpawnZ = 4359;
_oustLoc = new Location(-247746, 251079, 4328);
_locationId = LOCATION;
_arrivalPath = ARRIVAL;
_departPath = DEPART;
_teleportsTable = TELEPORTS;
_fuelTable = FUEL;
_movieId = 1003;
validityCheck();
}
}

View File

@@ -0,0 +1,7 @@
<html><body>Airship Controller:<br>
You see a floating piece of stone filled with a mysterious power. The green light is flashing, so there doesn't appear to be anything wrong with its function.<br><br>
By manipulating this, you should be able to control the Airship.<br>
<a action="bypass -h Quest SoIController board">Board the Airship.</a><br>
<a action="bypass -h Quest SoIController summon">Summon the Airship.</a><br>
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
</body></html>

View File

@@ -0,0 +1,91 @@
/*
* 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 gracia.vehicles.SoIController;
import com.l2jserver.gameserver.model.Location;
import com.l2jserver.gameserver.model.VehiclePathPoint;
import gracia.vehicles.AirShipController;
public final class SoIController extends AirShipController
{
private static final int DOCK_ZONE = 50600;
private static final int LOCATION = 101;
private static final int CONTROLLER_ID = 32604;
private static final VehiclePathPoint[] ARRIVAL =
{
new VehiclePathPoint(-214422, 211396, 5000, 280, 2000),
new VehiclePathPoint(-214422, 211396, 4422, 280, 2000)
};
private static final VehiclePathPoint[] DEPART =
{
new VehiclePathPoint(-214422, 211396, 5000, 280, 2000),
new VehiclePathPoint(-215877, 209709, 5000, 280, 2000)
};
private static final VehiclePathPoint[][] TELEPORTS =
{
{
new VehiclePathPoint(-214422, 211396, 5000, 280, 2000),
new VehiclePathPoint(-215877, 209709, 5000, 280, 2000),
new VehiclePathPoint(-206692, 220997, 3000, 0, 0)
},
{
new VehiclePathPoint(-214422, 211396, 5000, 280, 2000),
new VehiclePathPoint(-215877, 209709, 5000, 280, 2000),
new VehiclePathPoint(-195357, 233430, 2500, 0, 0)
}
};
private static final int[] FUEL =
{
0,
50
};
public SoIController()
{
super(-1, SoIController.class.getSimpleName(), "gracia/vehicles");
addStartNpc(CONTROLLER_ID);
addFirstTalkId(CONTROLLER_ID);
addTalkId(CONTROLLER_ID);
_dockZone = DOCK_ZONE;
addEnterZoneId(DOCK_ZONE);
addExitZoneId(DOCK_ZONE);
_shipSpawnX = -212719;
_shipSpawnY = 213348;
_shipSpawnZ = 5000;
_oustLoc = new Location(-213401, 210401, 4408);
_locationId = LOCATION;
_arrivalPath = ARRIVAL;
_departPath = DEPART;
_teleportsTable = TELEPORTS;
_fuelTable = FUEL;
_movieId = 1002;
validityCheck();
}
}