actual freya branch
This commit is contained in:
@@ -0,0 +1,404 @@
|
||||
/*
|
||||
* 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 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.L2Clan;
|
||||
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.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
|
||||
{
|
||||
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_ALREADY_EXISTS = SystemMessage.getSystemMessage(SystemMessageId.THE_AIRSHIP_IS_ALREADY_EXISTS);
|
||||
private static final SystemMessage SM_ALREADY_SUMMONED = SystemMessage.getSystemMessage(SystemMessageId.ANOTHER_AIRSHIP_ALREADY_SUMMONED);
|
||||
private static final SystemMessage SM_NEED_LICENSE = SystemMessage.getSystemMessage(SystemMessageId.THE_AIRSHIP_NEED_LICENSE_TO_SUMMON);
|
||||
private static final SystemMessage SM_NEED_CLANLVL5 = SystemMessage.getSystemMessage(SystemMessageId.THE_AIRSHIP_NEED_CLANLVL_5_TO_SUMMON);
|
||||
private static final SystemMessage SM_NO_PRIVS = SystemMessage.getSystemMessage(SystemMessageId.THE_AIRSHIP_NO_PRIVILEGES);
|
||||
private static final SystemMessage SM_ALREADY_USED = SystemMessage.getSystemMessage(SystemMessageId.THE_AIRSHIP_ALREADY_USED);
|
||||
private static final SystemMessage SM_LICENSE_ALREADY_ACQUIRED = SystemMessage.getSystemMessage(SystemMessageId.THE_AIRSHIP_SUMMON_LICENSE_ALREADY_ACQUIRED);
|
||||
private static final SystemMessage SM_LICENSE_ENTERED = SystemMessage.getSystemMessage(SystemMessageId.THE_AIRSHIP_SUMMON_LICENSE_ENTERED);
|
||||
private static final SystemMessage SM_NEED_MORE = SystemMessage.getSystemMessage(SystemMessageId.THE_AIRSHIP_NEED_MORE_S1).addItemName(STARSTONE);
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if ("summon".equalsIgnoreCase(event))
|
||||
{
|
||||
if (_dockedShip != null)
|
||||
{
|
||||
if (_dockedShip.isOwner(player))
|
||||
player.sendPacket(SM_ALREADY_EXISTS);
|
||||
return null;
|
||||
}
|
||||
if (_isBusy)
|
||||
{
|
||||
player.sendPacket(SM_ALREADY_SUMMONED);
|
||||
return null;
|
||||
}
|
||||
if ((player.getClanPrivileges() & L2Clan.CP_CL_SUMMON_AIRSHIP) != L2Clan.CP_CL_SUMMON_AIRSHIP)
|
||||
{
|
||||
player.sendPacket(SM_NO_PRIVS);
|
||||
return null;
|
||||
}
|
||||
int ownerId = player.getClanId();
|
||||
if (!AirShipManager.getInstance().hasAirShipLicense(ownerId))
|
||||
{
|
||||
player.sendPacket(SM_NEED_LICENSE);
|
||||
return null;
|
||||
}
|
||||
if (AirShipManager.getInstance().hasAirShip(ownerId))
|
||||
{
|
||||
player.sendPacket(SM_ALREADY_USED);
|
||||
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.SHOUT, npc.getNpcId(), 1800219); // 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_WHILE_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.getPet() != null || 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_NOT_MEET_REQUEIREMENTS);
|
||||
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(SM_NEED_CLANLVL5);
|
||||
return null;
|
||||
}
|
||||
if (!player.isClanLeader())
|
||||
{
|
||||
player.sendPacket(SM_NO_PRIVS);
|
||||
return null;
|
||||
}
|
||||
final int ownerId = player.getClanId();
|
||||
if (AirShipManager.getInstance().hasAirShipLicense(ownerId))
|
||||
{
|
||||
player.sendPacket(SM_LICENSE_ALREADY_ACQUIRED);
|
||||
return null;
|
||||
}
|
||||
if (!player.destroyItemByItemId("AirShipLicense", LICENSE, 1, npc, true))
|
||||
{
|
||||
player.sendPacket(SM_NEED_MORE);
|
||||
return null;
|
||||
}
|
||||
|
||||
AirShipManager.getInstance().registerLicense(ownerId);
|
||||
player.sendPacket(SM_LICENSE_ENTERED);
|
||||
return null;
|
||||
}
|
||||
else
|
||||
return event;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (player.getQuestState(getName()) == null)
|
||||
newQuestState(player);
|
||||
|
||||
return npc.getNpcId() + ".htm";
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
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.x, p.y, p.z))
|
||||
{
|
||||
_log.log(Level.WARNING, getName()+": Arrival path finish point ("+p.x+","+p.y+","+p.z+") 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.x, p.y, p.z))
|
||||
{
|
||||
_log.log(Level.WARNING, getName()+": Departure path finish point ("+p.x+","+p.y+","+p.z+") 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final class DecayTask implements Runnable
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
if (_dockedShip != null)
|
||||
_dockedShip.deleteMe();
|
||||
}
|
||||
}
|
||||
|
||||
private final class DepartTask implements Runnable
|
||||
{
|
||||
public void run()
|
||||
{
|
||||
if (_dockedShip != null
|
||||
&& _dockedShip.isInDock()
|
||||
&& !_dockedShip.isMoving())
|
||||
{
|
||||
if (_departPath != null)
|
||||
_dockedShip.executePath(_departPath);
|
||||
else
|
||||
_dockedShip.deleteMe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public AirShipController(int questId, String name, String descr)
|
||||
{
|
||||
super(questId, name, descr);
|
||||
}
|
||||
}
|
||||
@@ -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 the Airship.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
|
||||
</body></html>
|
||||
@@ -0,0 +1,6 @@
|
||||
<html><head><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 the Airship.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
|
||||
</body></html>
|
||||
+290
@@ -0,0 +1,290 @@
|
||||
/*
|
||||
* 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 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.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.NpcSay;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author DS
|
||||
*
|
||||
*/
|
||||
public 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;
|
||||
|
||||
@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;
|
||||
}
|
||||
if (player.isParalyzed())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_PETRIFIED);
|
||||
return null;
|
||||
}
|
||||
if (player.isDead() || player.isFakeDeath())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_DEAD);
|
||||
return null;
|
||||
}
|
||||
if (player.isFishing())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_FISHING);
|
||||
return null;
|
||||
}
|
||||
if (player.isInCombat())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_IN_BATTLE);
|
||||
return null;
|
||||
}
|
||||
if (player.isInDuel())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_IN_A_DUEL);
|
||||
return null;
|
||||
}
|
||||
if (player.isSitting())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_SITTING);
|
||||
return null;
|
||||
}
|
||||
if (player.isCastingNow())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_CASTING);
|
||||
return null;
|
||||
}
|
||||
if (player.isCursedWeaponEquipped())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_A_CURSED_WEAPON_IS_EQUIPPED);
|
||||
return null;
|
||||
}
|
||||
if (player.isCombatFlagEquipped())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_HOLDING_A_FLAG);
|
||||
return null;
|
||||
}
|
||||
if (player.getPet() != null || player.isMounted())
|
||||
{
|
||||
player.sendPacket(SystemMessageId.YOU_CANNOT_BOARD_AN_AIRSHIP_WHILE_A_PET_OR_A_SERVITOR_IS_SUMMONED);
|
||||
return null;
|
||||
}
|
||||
|
||||
if (_ship.isInDock() && _ship.isInsideRadius(player, 600, true, false))
|
||||
_ship.addPassenger(player);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (player.getQuestState(getName()) == null)
|
||||
newQuestState(player);
|
||||
|
||||
return npc.getNpcId() + ".htm";
|
||||
}
|
||||
|
||||
public AirShipGludioGracia(int questId, String name, String descr)
|
||||
{
|
||||
super(questId, name, descr);
|
||||
for (int id : CONTROLLERS)
|
||||
{
|
||||
addStartNpc(id);
|
||||
addFirstTalkId(id);
|
||||
addTalkId(id);
|
||||
}
|
||||
_ship = AirShipManager.getInstance().getNewAirShip(-149378, 252552, 198, 33837);
|
||||
_ship.setOustLoc(OUST_GLUDIO);
|
||||
_ship.registerEngine(this);
|
||||
_ship.runEngine(60000);
|
||||
}
|
||||
|
||||
public void run()
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (_cycle)
|
||||
{
|
||||
case 0:
|
||||
broadcastInGludio(1800223); // 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(1800220); // 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(1800221); // 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(1800222); // 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();
|
||||
}
|
||||
}
|
||||
|
||||
private final void broadcastInGludio(int msg)
|
||||
{
|
||||
if (!_foundAtcGludio)
|
||||
{
|
||||
_foundAtcGludio = true;
|
||||
_atcGludio = findController();
|
||||
}
|
||||
if (_atcGludio != null)
|
||||
_atcGludio.broadcastPacket(new NpcSay(_atcGludio.getObjectId(), Say2.SHOUT, _atcGludio.getNpcId(), msg));
|
||||
}
|
||||
|
||||
private final void broadcastInGracia(int msg)
|
||||
{
|
||||
if (!_foundAtcGracia)
|
||||
{
|
||||
_foundAtcGracia = true;
|
||||
_atcGracia = findController();
|
||||
}
|
||||
if (_atcGracia != null)
|
||||
_atcGracia.broadcastPacket(new NpcSay(_atcGracia.getObjectId(), Say2.SHOUT, _atcGracia.getNpcId(), msg));
|
||||
}
|
||||
|
||||
private final L2Npc findController()
|
||||
{
|
||||
// check objects around the ship
|
||||
for (L2Object obj : L2World.getInstance().getVisibleObjects(_ship, 600))
|
||||
{
|
||||
if (obj instanceof L2Npc)
|
||||
{
|
||||
for (int id : CONTROLLERS)
|
||||
{
|
||||
if (((L2Npc)obj).getNpcId() == id)
|
||||
return (L2Npc)obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new AirShipGludioGracia(-1, AirShipGludioGracia.class.getSimpleName(), "vehicles");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,276 @@
|
||||
/*
|
||||
* 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 vehicles;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.instancemanager.BoatManager;
|
||||
import com.l2jserver.gameserver.model.VehiclePathPoint;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2BoatInstance;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PlaySound;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author DS
|
||||
*
|
||||
*/
|
||||
public class BoatGiranTalking implements Runnable
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(BoatGiranTalking.class.getName());
|
||||
|
||||
// Time: 868s
|
||||
private static final VehiclePathPoint[] GIRAN_TO_TALKING =
|
||||
{
|
||||
new VehiclePathPoint(51914, 189023, -3610, 150, 800),
|
||||
new VehiclePathPoint(60567, 189789, -3610, 150, 800),
|
||||
new VehiclePathPoint(63732, 197457, -3610, 200, 800),
|
||||
new VehiclePathPoint(63732, 219946, -3610, 250, 800),
|
||||
new VehiclePathPoint(62008, 222240, -3610, 250, 1200),
|
||||
new VehiclePathPoint(56115, 226791, -3610, 250, 1200),
|
||||
new VehiclePathPoint(40384, 226432, -3610, 300, 800),
|
||||
new VehiclePathPoint(37760, 226432, -3610, 300, 800),
|
||||
new VehiclePathPoint(27153, 226791, -3610, 300, 800),
|
||||
new VehiclePathPoint(12672, 227535, -3610, 300, 800),
|
||||
new VehiclePathPoint(-1808, 228280, -3610, 300, 800),
|
||||
new VehiclePathPoint(-22165, 230542, -3610, 300, 800),
|
||||
new VehiclePathPoint(-42523, 235205, -3610, 300, 800),
|
||||
new VehiclePathPoint(-68451, 259560, -3610, 250, 800),
|
||||
new VehiclePathPoint(-70848, 261696, -3610, 200, 800),
|
||||
new VehiclePathPoint(-83344, 261610, -3610, 200, 800),
|
||||
new VehiclePathPoint(-88344, 261660, -3610, 180, 800),
|
||||
new VehiclePathPoint(-92344, 261660, -3610, 180, 800),
|
||||
new VehiclePathPoint(-94242, 261659, -3610 ,150, 800)
|
||||
};
|
||||
|
||||
private static final VehiclePathPoint[] TALKING_DOCK =
|
||||
{
|
||||
new VehiclePathPoint(-96622, 261660, -3610, 150, 800)
|
||||
};
|
||||
|
||||
// Time: 1398s
|
||||
private static final VehiclePathPoint[] TALKING_TO_GIRAN =
|
||||
{
|
||||
new VehiclePathPoint(-113925, 261660, -3610, 150, 800),
|
||||
new VehiclePathPoint(-126107, 249116, -3610, 180, 800),
|
||||
new VehiclePathPoint(-126107, 234499, -3610, 180, 800),
|
||||
new VehiclePathPoint(-126107, 219882, -3610, 180, 800),
|
||||
new VehiclePathPoint(-109414, 204914, -3610, 180, 800),
|
||||
new VehiclePathPoint(-92807, 204914, -3610, 180, 800),
|
||||
new VehiclePathPoint(-80425, 216450, -3610, 250, 800),
|
||||
new VehiclePathPoint(-68043, 227987, -3610, 250, 800),
|
||||
new VehiclePathPoint(-63744, 231168, -3610, 250, 800),
|
||||
new VehiclePathPoint(-60844, 231369, -3610, 250, 1800),
|
||||
new VehiclePathPoint(-44915, 231369, -3610, 200, 800),
|
||||
new VehiclePathPoint(-28986, 231369, -3610, 200, 800),
|
||||
new VehiclePathPoint(8233, 207624, -3610, 200, 800),
|
||||
new VehiclePathPoint(21470, 201503, -3610, 180, 800),
|
||||
new VehiclePathPoint(40058, 195383, -3610, 180, 800),
|
||||
new VehiclePathPoint(43022, 193793, -3610, 150, 800),
|
||||
new VehiclePathPoint(45986, 192203, -3610, 150, 800),
|
||||
new VehiclePathPoint(48950, 190613, -3610, 150, 800)
|
||||
};
|
||||
|
||||
private static final VehiclePathPoint GIRAN_DOCK = TALKING_TO_GIRAN[TALKING_TO_GIRAN.length - 1];
|
||||
|
||||
private final L2BoatInstance _boat;
|
||||
private int _cycle = 0;
|
||||
private int _shoutCount = 0;
|
||||
|
||||
private final CreatureSay ARRIVED_AT_GIRAN;
|
||||
private final CreatureSay ARRIVED_AT_GIRAN_2;
|
||||
private final CreatureSay LEAVE_GIRAN5;
|
||||
private final CreatureSay LEAVE_GIRAN1;
|
||||
private final CreatureSay LEAVE_GIRAN0;
|
||||
private final CreatureSay LEAVING_GIRAN;
|
||||
private final CreatureSay ARRIVED_AT_TALKING;
|
||||
private final CreatureSay ARRIVED_AT_TALKING_2;
|
||||
private final CreatureSay LEAVE_TALKING5;
|
||||
private final CreatureSay LEAVE_TALKING1;
|
||||
private final CreatureSay LEAVE_TALKING0;
|
||||
private final CreatureSay LEAVING_TALKING;
|
||||
private final CreatureSay BUSY_TALKING;
|
||||
|
||||
private final CreatureSay ARRIVAL_TALKING15;
|
||||
private final CreatureSay ARRIVAL_TALKING10;
|
||||
private final CreatureSay ARRIVAL_TALKING5;
|
||||
private final CreatureSay ARRIVAL_TALKING1;
|
||||
private final CreatureSay ARRIVAL_GIRAN20;
|
||||
private final CreatureSay ARRIVAL_GIRAN15;
|
||||
private final CreatureSay ARRIVAL_GIRAN10;
|
||||
private final CreatureSay ARRIVAL_GIRAN5;
|
||||
private final CreatureSay ARRIVAL_GIRAN1;
|
||||
|
||||
private final PlaySound GIRAN_SOUND;
|
||||
private final PlaySound TALKING_SOUND;
|
||||
|
||||
public BoatGiranTalking(L2BoatInstance boat)
|
||||
{
|
||||
_boat = boat;
|
||||
|
||||
ARRIVED_AT_GIRAN = new CreatureSay(0, Say2.BOAT, 801, 992);
|
||||
ARRIVED_AT_GIRAN_2 = new CreatureSay(0, Say2.BOAT, 801, 987);
|
||||
LEAVE_GIRAN5 = new CreatureSay(0, Say2.BOAT, 801, 988);
|
||||
LEAVE_GIRAN1 = new CreatureSay(0, Say2.BOAT, 801, 989);
|
||||
LEAVE_GIRAN0 = new CreatureSay(0, Say2.BOAT, 801, 990);
|
||||
LEAVING_GIRAN = new CreatureSay(0, Say2.BOAT, 801, 991);
|
||||
ARRIVED_AT_TALKING = new CreatureSay(0, Say2.BOAT, 801, 979);
|
||||
ARRIVED_AT_TALKING_2 = new CreatureSay(0, Say2.BOAT, 801, 993);
|
||||
LEAVE_TALKING5 = new CreatureSay(0, Say2.BOAT, 801, 994);
|
||||
LEAVE_TALKING1 = new CreatureSay(0, Say2.BOAT, 801, 995);
|
||||
LEAVE_TALKING0 = new CreatureSay(0, Say2.BOAT, 801, 996);
|
||||
LEAVING_TALKING = new CreatureSay(0, Say2.BOAT, 801, 997);
|
||||
BUSY_TALKING = new CreatureSay(0, Say2.BOAT, 801, 1487);
|
||||
|
||||
ARRIVAL_TALKING15 = new CreatureSay(0, Say2.BOAT, 801, 1162);
|
||||
ARRIVAL_TALKING10 = new CreatureSay(0, Say2.BOAT, 801, 1163);
|
||||
ARRIVAL_TALKING5 = new CreatureSay(0, Say2.BOAT, 801, 1164);
|
||||
ARRIVAL_TALKING1 = new CreatureSay(0, Say2.BOAT, 801, 1165);
|
||||
ARRIVAL_GIRAN20 = new CreatureSay(0, Say2.BOAT, 801, 1166);
|
||||
ARRIVAL_GIRAN15 = new CreatureSay(0, Say2.BOAT, 801, 1167);
|
||||
ARRIVAL_GIRAN10 = new CreatureSay(0, Say2.BOAT, 801, 1168);
|
||||
ARRIVAL_GIRAN5 = new CreatureSay(0, Say2.BOAT, 801, 1169);
|
||||
ARRIVAL_GIRAN1 = new CreatureSay(0, Say2.BOAT, 801, 1170);
|
||||
|
||||
GIRAN_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), GIRAN_DOCK.x, GIRAN_DOCK.y, GIRAN_DOCK.z);
|
||||
TALKING_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), TALKING_DOCK[0].x, TALKING_DOCK[0].y, TALKING_DOCK[0].z);
|
||||
}
|
||||
|
||||
public void run()
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (_cycle)
|
||||
{
|
||||
case 0:
|
||||
BoatManager.getInstance().broadcastPacket(GIRAN_DOCK, TALKING_DOCK[0], LEAVE_GIRAN5);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 240000);
|
||||
break;
|
||||
case 1:
|
||||
BoatManager.getInstance().broadcastPacket(GIRAN_DOCK, TALKING_DOCK[0], LEAVE_GIRAN1);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 40000);
|
||||
break;
|
||||
case 2:
|
||||
BoatManager.getInstance().broadcastPacket(GIRAN_DOCK, TALKING_DOCK[0], LEAVE_GIRAN0);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 20000);
|
||||
break;
|
||||
case 3:
|
||||
BoatManager.getInstance().broadcastPackets(GIRAN_DOCK, TALKING_DOCK[0], LEAVING_GIRAN, ARRIVAL_TALKING15);
|
||||
_boat.broadcastPacket(GIRAN_SOUND);
|
||||
_boat.payForRide(3946, 1, 46763, 187041, -3451);
|
||||
_boat.executePath(GIRAN_TO_TALKING);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 250000);
|
||||
break;
|
||||
case 4:
|
||||
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GIRAN_DOCK, ARRIVAL_TALKING10);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 5:
|
||||
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GIRAN_DOCK, ARRIVAL_TALKING5);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 240000);
|
||||
break;
|
||||
case 6:
|
||||
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GIRAN_DOCK, ARRIVAL_TALKING1);
|
||||
break;
|
||||
case 7:
|
||||
if (BoatManager.getInstance().dockBusy(BoatManager.TALKING_ISLAND))
|
||||
{
|
||||
if (_shoutCount == 0)
|
||||
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GIRAN_DOCK, BUSY_TALKING);
|
||||
|
||||
_shoutCount++;
|
||||
if (_shoutCount > 35)
|
||||
_shoutCount = 0;
|
||||
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 5000);
|
||||
return;
|
||||
}
|
||||
_boat.executePath(TALKING_DOCK);
|
||||
break;
|
||||
case 8:
|
||||
BoatManager.getInstance().dockShip(BoatManager.TALKING_ISLAND, true);
|
||||
BoatManager.getInstance().broadcastPackets(TALKING_DOCK[0], GIRAN_DOCK, ARRIVED_AT_TALKING, ARRIVED_AT_TALKING_2);
|
||||
_boat.broadcastPacket(TALKING_SOUND);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 9:
|
||||
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GIRAN_DOCK, LEAVE_TALKING5);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 240000);
|
||||
break;
|
||||
case 10:
|
||||
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GIRAN_DOCK, LEAVE_TALKING1);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 40000);
|
||||
break;
|
||||
case 11:
|
||||
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GIRAN_DOCK, LEAVE_TALKING0);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 20000);
|
||||
break;
|
||||
case 12:
|
||||
BoatManager.getInstance().dockShip(BoatManager.TALKING_ISLAND, false);
|
||||
BoatManager.getInstance().broadcastPackets(TALKING_DOCK[0], GIRAN_DOCK, LEAVING_TALKING);
|
||||
_boat.broadcastPacket(TALKING_SOUND);
|
||||
_boat.payForRide(3945, 1, -96777, 258970, -3623);
|
||||
_boat.executePath(TALKING_TO_GIRAN);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 200000);
|
||||
break;
|
||||
case 13:
|
||||
BoatManager.getInstance().broadcastPacket(GIRAN_DOCK, TALKING_DOCK[0], ARRIVAL_GIRAN20);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 14:
|
||||
BoatManager.getInstance().broadcastPacket(GIRAN_DOCK, TALKING_DOCK[0], ARRIVAL_GIRAN15);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 15:
|
||||
BoatManager.getInstance().broadcastPacket(GIRAN_DOCK, TALKING_DOCK[0], ARRIVAL_GIRAN10);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 16:
|
||||
BoatManager.getInstance().broadcastPacket(GIRAN_DOCK, TALKING_DOCK[0], ARRIVAL_GIRAN5);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 240000);
|
||||
break;
|
||||
case 17:
|
||||
BoatManager.getInstance().broadcastPacket(GIRAN_DOCK, TALKING_DOCK[0], ARRIVAL_GIRAN1);
|
||||
break;
|
||||
case 18:
|
||||
BoatManager.getInstance().broadcastPackets(GIRAN_DOCK, TALKING_DOCK[0], ARRIVED_AT_GIRAN, ARRIVED_AT_GIRAN_2);
|
||||
_boat.broadcastPacket(GIRAN_SOUND);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
}
|
||||
_shoutCount = 0;
|
||||
_cycle++;
|
||||
if (_cycle > 18)
|
||||
_cycle = 0;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_log.log(Level.WARNING, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
final L2BoatInstance boat = BoatManager.getInstance().getNewBoat(2, 48950, 190613, -3610, 60800);
|
||||
if (boat != null)
|
||||
{
|
||||
boat.registerEngine(new BoatGiranTalking(boat));
|
||||
boat.runEngine(180000);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,309 @@
|
||||
/*
|
||||
* 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 vehicles;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.instancemanager.BoatManager;
|
||||
import com.l2jserver.gameserver.model.VehiclePathPoint;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2BoatInstance;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PlaySound;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author DS
|
||||
*
|
||||
*/
|
||||
public class BoatGludinRune implements Runnable
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(BoatGludinRune.class.getName());
|
||||
|
||||
// Time: 1151s
|
||||
private static final VehiclePathPoint[] GLUDIN_TO_RUNE =
|
||||
{
|
||||
new VehiclePathPoint(-95686, 155514, -3610, 150, 800),
|
||||
new VehiclePathPoint(-98112, 159040, -3610, 150, 800),
|
||||
new VehiclePathPoint(-104192, 160608, -3610, 200, 1800),
|
||||
new VehiclePathPoint(-109952, 159616, -3610, 250, 1800),
|
||||
new VehiclePathPoint(-112768, 154784, -3610, 290, 1800),
|
||||
new VehiclePathPoint(-114688, 139040, -3610, 290, 1800),
|
||||
new VehiclePathPoint(-115232, 134368, -3610, 290, 1800),
|
||||
new VehiclePathPoint(-113888, 121696, -3610, 290, 1800),
|
||||
new VehiclePathPoint(-107808, 104928, -3610, 290, 1800),
|
||||
new VehiclePathPoint(-97152, 75520, -3610, 290, 800),
|
||||
new VehiclePathPoint(-85536, 67264, -3610, 290, 1800),
|
||||
new VehiclePathPoint(-64640, 55840, -3610, 290, 1800),
|
||||
new VehiclePathPoint(-60096, 44672, -3610, 290, 1800),
|
||||
new VehiclePathPoint(-52672, 37440, -3610, 290, 1800),
|
||||
new VehiclePathPoint(-46144, 33184, -3610, 290, 1800),
|
||||
new VehiclePathPoint(-36096, 24928, -3610, 290, 1800),
|
||||
new VehiclePathPoint(-33792, 8448, -3610, 290, 1800),
|
||||
new VehiclePathPoint(-23776, 3424, -3610, 290, 1000),
|
||||
new VehiclePathPoint(-12000, -1760, -3610, 290, 1000),
|
||||
new VehiclePathPoint(672, 480, -3610, 290, 1800),
|
||||
new VehiclePathPoint(15488, 200, -3610, 290, 1000),
|
||||
new VehiclePathPoint(24736, 164, -3610, 290, 1000),
|
||||
new VehiclePathPoint(32192, -1156, -3610, 290, 1000),
|
||||
new VehiclePathPoint(39200, -8032, -3610, 270, 1000),
|
||||
new VehiclePathPoint(44320, -25152, -3610, 270, 1000),
|
||||
new VehiclePathPoint(40576, -31616, -3610, 250, 800),
|
||||
new VehiclePathPoint(36819, -35315, -3610, 220, 800)
|
||||
};
|
||||
|
||||
private static final VehiclePathPoint[] RUNE_DOCK =
|
||||
{
|
||||
new VehiclePathPoint(34381, -37680, -3610, 200, 800)
|
||||
};
|
||||
|
||||
// Time: 967s
|
||||
private static final VehiclePathPoint[] RUNE_TO_GLUDIN =
|
||||
{
|
||||
new VehiclePathPoint(32750, -39300, -3610, 150, 800),
|
||||
new VehiclePathPoint(27440, -39328, -3610, 180, 1000),
|
||||
new VehiclePathPoint(21456, -34272, -3610, 200, 1000),
|
||||
new VehiclePathPoint(6608, -29520, -3610, 250, 800),
|
||||
new VehiclePathPoint(4160, -27828, -3610, 270, 800),
|
||||
new VehiclePathPoint(2432, -25472, -3610, 270, 1000),
|
||||
new VehiclePathPoint(-8000, -16272, -3610, 220, 1000),
|
||||
new VehiclePathPoint(-18976, -9760, -3610, 290, 800),
|
||||
new VehiclePathPoint(-23776, 3408, -3610, 290, 800),
|
||||
new VehiclePathPoint(-33792, 8432, -3610, 290, 800),
|
||||
new VehiclePathPoint(-36096, 24912, -3610, 290, 800),
|
||||
new VehiclePathPoint(-46144, 33184, -3610, 290, 800),
|
||||
new VehiclePathPoint(-52688, 37440, -3610, 290, 800),
|
||||
new VehiclePathPoint(-60096, 44672, -3610, 290, 800),
|
||||
new VehiclePathPoint(-64640, 55840, -3610, 290, 800),
|
||||
new VehiclePathPoint(-85552, 67248, -3610, 290, 800),
|
||||
new VehiclePathPoint(-97168, 85264, -3610, 290, 800),
|
||||
new VehiclePathPoint(-107824, 104912, -3610, 290, 800),
|
||||
new VehiclePathPoint(-102151, 135704, -3610, 290, 800),
|
||||
new VehiclePathPoint(-96686, 140595, -3610, 290, 800),
|
||||
new VehiclePathPoint(-95686, 147717, -3610, 250, 800),
|
||||
new VehiclePathPoint(-95686, 148218, -3610, 200, 800)
|
||||
};
|
||||
|
||||
private static final VehiclePathPoint[] GLUDIN_DOCK =
|
||||
{
|
||||
new VehiclePathPoint(-95686, 150514, -3610, 150, 800)
|
||||
};
|
||||
|
||||
private final L2BoatInstance _boat;
|
||||
private int _cycle = 0;
|
||||
private int _shoutCount = 0;
|
||||
|
||||
private final CreatureSay ARRIVED_AT_GLUDIN;
|
||||
private final CreatureSay ARRIVED_AT_GLUDIN_2;
|
||||
private final CreatureSay LEAVE_GLUDIN5;
|
||||
private final CreatureSay LEAVE_GLUDIN1;
|
||||
private final CreatureSay LEAVE_GLUDIN0;
|
||||
private final CreatureSay LEAVING_GLUDIN;
|
||||
private final CreatureSay ARRIVED_AT_RUNE;
|
||||
private final CreatureSay ARRIVED_AT_RUNE_2;
|
||||
private final CreatureSay LEAVE_RUNE5;
|
||||
private final CreatureSay LEAVE_RUNE1;
|
||||
private final CreatureSay LEAVE_RUNE0;
|
||||
private final CreatureSay LEAVING_RUNE;
|
||||
private final CreatureSay BUSY_GLUDIN;
|
||||
private final CreatureSay BUSY_RUNE;
|
||||
|
||||
private final CreatureSay ARRIVAL_RUNE15;
|
||||
private final CreatureSay ARRIVAL_RUNE10;
|
||||
private final CreatureSay ARRIVAL_RUNE5;
|
||||
private final CreatureSay ARRIVAL_RUNE1;
|
||||
private final CreatureSay ARRIVAL_GLUDIN15;
|
||||
private final CreatureSay ARRIVAL_GLUDIN10;
|
||||
private final CreatureSay ARRIVAL_GLUDIN5;
|
||||
private final CreatureSay ARRIVAL_GLUDIN1;
|
||||
|
||||
private final PlaySound GLUDIN_SOUND;
|
||||
private final PlaySound RUNE_SOUND;
|
||||
|
||||
public BoatGludinRune(L2BoatInstance boat)
|
||||
{
|
||||
_boat = boat;
|
||||
|
||||
ARRIVED_AT_GLUDIN = new CreatureSay(0, Say2.BOAT, 801, 986);
|
||||
ARRIVED_AT_GLUDIN_2 = new CreatureSay(0, Say2.BOAT, 801, 1625);
|
||||
LEAVE_GLUDIN5 = new CreatureSay(0, Say2.BOAT, 801, 1626);
|
||||
LEAVE_GLUDIN1 = new CreatureSay(0, Say2.BOAT, 801, 1627);
|
||||
LEAVE_GLUDIN0 = new CreatureSay(0, Say2.BOAT, 801, 1628);
|
||||
LEAVING_GLUDIN = new CreatureSay(0, Say2.BOAT, 801, 1629);
|
||||
ARRIVED_AT_RUNE = new CreatureSay(0, Say2.BOAT, 801, 1620);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(0, Say2.BOAT, 801, 980);
|
||||
LEAVE_RUNE5 = new CreatureSay(0, Say2.BOAT, 801, 1621);
|
||||
LEAVE_RUNE1 = new CreatureSay(0, Say2.BOAT, 801, 1622);
|
||||
LEAVE_RUNE0 = new CreatureSay(0, Say2.BOAT, 801, 1623);
|
||||
LEAVING_RUNE = new CreatureSay(0, Say2.BOAT, 801, 1624);
|
||||
BUSY_GLUDIN = new CreatureSay(0, Say2.BOAT, 801, 1618);
|
||||
BUSY_RUNE = new CreatureSay(0, Say2.BOAT, 801, 1619);
|
||||
|
||||
ARRIVAL_RUNE15 = new CreatureSay(0, Say2.BOAT, 801, 1634);
|
||||
ARRIVAL_RUNE10 = new CreatureSay(0, Say2.BOAT, 801, 1635);
|
||||
ARRIVAL_RUNE5 = new CreatureSay(0, Say2.BOAT, 801, 1636);
|
||||
ARRIVAL_RUNE1 = new CreatureSay(0, Say2.BOAT, 801, 1637);
|
||||
ARRIVAL_GLUDIN15 = new CreatureSay(0, Say2.BOAT, 801, 1630);
|
||||
ARRIVAL_GLUDIN10 = new CreatureSay(0, Say2.BOAT, 801, 1631);
|
||||
ARRIVAL_GLUDIN5 = new CreatureSay(0, Say2.BOAT, 801, 1632);
|
||||
ARRIVAL_GLUDIN1 = new CreatureSay(0, Say2.BOAT, 801, 1633);
|
||||
|
||||
GLUDIN_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), GLUDIN_DOCK[0].x, GLUDIN_DOCK[0].y, GLUDIN_DOCK[0].z);
|
||||
RUNE_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), RUNE_DOCK[0].x, RUNE_DOCK[0].y, RUNE_DOCK[0].z);
|
||||
}
|
||||
|
||||
public void run()
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (_cycle)
|
||||
{
|
||||
case 0:
|
||||
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], RUNE_DOCK[0], LEAVE_GLUDIN5);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 240000);
|
||||
break;
|
||||
case 1:
|
||||
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], RUNE_DOCK[0], LEAVE_GLUDIN1);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 40000);
|
||||
break;
|
||||
case 2:
|
||||
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], RUNE_DOCK[0], LEAVE_GLUDIN0);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 20000);
|
||||
break;
|
||||
case 3:
|
||||
BoatManager.getInstance().dockShip(BoatManager.GLUDIN_HARBOR, false);
|
||||
BoatManager.getInstance().broadcastPackets(GLUDIN_DOCK[0], RUNE_DOCK[0], LEAVING_GLUDIN);
|
||||
_boat.broadcastPacket(GLUDIN_SOUND);
|
||||
_boat.payForRide(7905, 1, -90015, 150422, -3610);
|
||||
_boat.executePath(GLUDIN_TO_RUNE);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 250000);
|
||||
break;
|
||||
case 4:
|
||||
BoatManager.getInstance().broadcastPacket(RUNE_DOCK[0], GLUDIN_DOCK[0], ARRIVAL_RUNE15);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 5:
|
||||
BoatManager.getInstance().broadcastPacket(RUNE_DOCK[0], GLUDIN_DOCK[0], ARRIVAL_RUNE10);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 6:
|
||||
BoatManager.getInstance().broadcastPacket(RUNE_DOCK[0], GLUDIN_DOCK[0], ARRIVAL_RUNE5);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 240000);
|
||||
break;
|
||||
case 7:
|
||||
BoatManager.getInstance().broadcastPacket(RUNE_DOCK[0], GLUDIN_DOCK[0], ARRIVAL_RUNE1);
|
||||
break;
|
||||
case 8:
|
||||
if (BoatManager.getInstance().dockBusy(BoatManager.RUNE_HARBOR))
|
||||
{
|
||||
if (_shoutCount == 0)
|
||||
BoatManager.getInstance().broadcastPacket(RUNE_DOCK[0], GLUDIN_DOCK[0], BUSY_RUNE);
|
||||
|
||||
_shoutCount++;
|
||||
if (_shoutCount > 35)
|
||||
_shoutCount = 0;
|
||||
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 5000);
|
||||
return;
|
||||
}
|
||||
_boat.executePath(RUNE_DOCK);
|
||||
break;
|
||||
case 9:
|
||||
BoatManager.getInstance().dockShip(BoatManager.RUNE_HARBOR, true);
|
||||
BoatManager.getInstance().broadcastPackets(RUNE_DOCK[0], GLUDIN_DOCK[0], ARRIVED_AT_RUNE, ARRIVED_AT_RUNE_2);
|
||||
_boat.broadcastPacket(RUNE_SOUND);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 10:
|
||||
BoatManager.getInstance().broadcastPacket(RUNE_DOCK[0], GLUDIN_DOCK[0], LEAVE_RUNE5);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 240000);
|
||||
break;
|
||||
case 11:
|
||||
BoatManager.getInstance().broadcastPacket(RUNE_DOCK[0], GLUDIN_DOCK[0], LEAVE_RUNE1);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 40000);
|
||||
break;
|
||||
case 12:
|
||||
BoatManager.getInstance().broadcastPacket(RUNE_DOCK[0], GLUDIN_DOCK[0], LEAVE_RUNE0);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 20000);
|
||||
break;
|
||||
case 13:
|
||||
BoatManager.getInstance().dockShip(BoatManager.RUNE_HARBOR, false);
|
||||
BoatManager.getInstance().broadcastPackets(RUNE_DOCK[0], GLUDIN_DOCK[0], LEAVING_RUNE);
|
||||
_boat.broadcastPacket(RUNE_SOUND);
|
||||
_boat.payForRide(7904, 1, 34513, -38009, -3640);
|
||||
_boat.executePath(RUNE_TO_GLUDIN);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 60000);
|
||||
break;
|
||||
case 14:
|
||||
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], RUNE_DOCK[0], ARRIVAL_GLUDIN15);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 15:
|
||||
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], RUNE_DOCK[0], ARRIVAL_GLUDIN10);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 16:
|
||||
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], RUNE_DOCK[0], ARRIVAL_GLUDIN5);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 240000);
|
||||
break;
|
||||
case 17:
|
||||
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], RUNE_DOCK[0], ARRIVAL_GLUDIN1);
|
||||
break;
|
||||
case 18:
|
||||
if (BoatManager.getInstance().dockBusy(BoatManager.GLUDIN_HARBOR))
|
||||
{
|
||||
if (_shoutCount == 0)
|
||||
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], RUNE_DOCK[0], BUSY_GLUDIN);
|
||||
|
||||
_shoutCount++;
|
||||
if (_shoutCount > 35)
|
||||
_shoutCount = 0;
|
||||
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 5000);
|
||||
return;
|
||||
}
|
||||
_boat.executePath(GLUDIN_DOCK);
|
||||
break;
|
||||
case 19:
|
||||
BoatManager.getInstance().dockShip(BoatManager.GLUDIN_HARBOR, true);
|
||||
BoatManager.getInstance().broadcastPackets(GLUDIN_DOCK[0], RUNE_DOCK[0], ARRIVED_AT_GLUDIN, ARRIVED_AT_GLUDIN_2);
|
||||
_boat.broadcastPacket(GLUDIN_SOUND);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
}
|
||||
_shoutCount = 0;
|
||||
_cycle++;
|
||||
if (_cycle > 19)
|
||||
_cycle = 0;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_log.log(Level.WARNING, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
final L2BoatInstance boat = BoatManager.getInstance().getNewBoat(3, -95686, 150514, -3610, 16723);
|
||||
if (boat != null)
|
||||
{
|
||||
boat.registerEngine(new BoatGludinRune(boat));
|
||||
boat.runEngine(180000);
|
||||
BoatManager.getInstance().dockShip(BoatManager.GLUDIN_HARBOR, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,179 @@
|
||||
/*
|
||||
* 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 vehicles;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.instancemanager.BoatManager;
|
||||
import com.l2jserver.gameserver.model.VehiclePathPoint;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2BoatInstance;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PlaySound;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author DS
|
||||
*
|
||||
*/
|
||||
public class BoatInnadrilTour implements Runnable
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(BoatInnadrilTour.class.getName());
|
||||
|
||||
// Time: 1867s
|
||||
private static final VehiclePathPoint[] TOUR =
|
||||
{
|
||||
new VehiclePathPoint(105129, 226240, -3610, 150, 800),
|
||||
new VehiclePathPoint(90604, 238797, -3610, 150, 800),
|
||||
new VehiclePathPoint(74853, 237943, -3610, 150, 800),
|
||||
new VehiclePathPoint(68207, 235399, -3610, 150, 800),
|
||||
new VehiclePathPoint(63226, 230487, -3610, 150, 800),
|
||||
new VehiclePathPoint(61843, 224797, -3610, 150, 800),
|
||||
new VehiclePathPoint(61822, 203066, -3610, 150, 800),
|
||||
new VehiclePathPoint(59051, 197685, -3610, 150, 800),
|
||||
new VehiclePathPoint(54048, 195298, -3610, 150, 800),
|
||||
new VehiclePathPoint(41609, 195687, -3610, 150, 800),
|
||||
new VehiclePathPoint(35821, 200284, -3610, 150, 800),
|
||||
new VehiclePathPoint(35567, 205265, -3610, 150, 800),
|
||||
new VehiclePathPoint(35617, 222471, -3610, 150, 800),
|
||||
new VehiclePathPoint(37932, 226588, -3610, 150, 800),
|
||||
new VehiclePathPoint(42932, 229394, -3610, 150, 800),
|
||||
new VehiclePathPoint(74324, 245231, -3610, 150, 800),
|
||||
new VehiclePathPoint(81872, 250314, -3610, 150, 800),
|
||||
new VehiclePathPoint(101692, 249882, -3610, 150, 800),
|
||||
new VehiclePathPoint(107907, 256073, -3610, 150, 800),
|
||||
new VehiclePathPoint(112317, 257133, -3610, 150, 800),
|
||||
new VehiclePathPoint(126273, 255313, -3610, 150, 800),
|
||||
new VehiclePathPoint(128067, 250961, -3610, 150, 800),
|
||||
new VehiclePathPoint(128520, 238249, -3610, 150, 800),
|
||||
new VehiclePathPoint(126428, 235072, -3610, 150, 800),
|
||||
new VehiclePathPoint(121843, 234656, -3610, 150, 800),
|
||||
new VehiclePathPoint(120096, 234268, -3610, 150, 800),
|
||||
new VehiclePathPoint(118572, 233046, -3610, 150, 800),
|
||||
new VehiclePathPoint(117671, 228951, -3610, 150, 800),
|
||||
new VehiclePathPoint(115936, 226540, -3610, 150, 800),
|
||||
new VehiclePathPoint(113628, 226240, -3610, 150, 800),
|
||||
new VehiclePathPoint(111300, 226240, -3610, 150, 800),
|
||||
new VehiclePathPoint(111264, 226240, -3610, 150, 800)
|
||||
};
|
||||
|
||||
private static final VehiclePathPoint DOCK = TOUR[TOUR.length - 1];
|
||||
|
||||
private final L2BoatInstance _boat;
|
||||
private int _cycle = 0;
|
||||
|
||||
private final CreatureSay ARRIVED_AT_INNADRIL;
|
||||
private final CreatureSay LEAVE_INNADRIL5;
|
||||
private final CreatureSay LEAVE_INNADRIL1;
|
||||
private final CreatureSay LEAVE_INNADRIL0;
|
||||
private final CreatureSay LEAVING_INNADRIL;
|
||||
|
||||
private final CreatureSay ARRIVAL20;
|
||||
private final CreatureSay ARRIVAL15;
|
||||
private final CreatureSay ARRIVAL10;
|
||||
private final CreatureSay ARRIVAL5;
|
||||
private final CreatureSay ARRIVAL1;
|
||||
|
||||
private final PlaySound INNADRIL_SOUND;
|
||||
|
||||
public BoatInnadrilTour(L2BoatInstance boat)
|
||||
{
|
||||
_boat = boat;
|
||||
|
||||
ARRIVED_AT_INNADRIL = new CreatureSay(0, Say2.BOAT, 801, 998);
|
||||
LEAVE_INNADRIL5 = new CreatureSay(0, Say2.BOAT, 801, 999);
|
||||
LEAVE_INNADRIL1 = new CreatureSay(0, Say2.BOAT, 801, 1000);
|
||||
LEAVE_INNADRIL0 = new CreatureSay(0, Say2.BOAT, 801, 1001);
|
||||
LEAVING_INNADRIL = new CreatureSay(0, Say2.BOAT, 801, 1002);
|
||||
|
||||
ARRIVAL20 = new CreatureSay(0, Say2.BOAT, 801, 1171);
|
||||
ARRIVAL15 = new CreatureSay(0, Say2.BOAT, 801, 1172);
|
||||
ARRIVAL10 = new CreatureSay(0, Say2.BOAT, 801, 1173);
|
||||
ARRIVAL5 = new CreatureSay(0, Say2.BOAT, 801, 1174);
|
||||
ARRIVAL1 = new CreatureSay(0, Say2.BOAT, 801, 1175);
|
||||
|
||||
INNADRIL_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), DOCK.x, DOCK.y, DOCK.z);
|
||||
}
|
||||
|
||||
public void run()
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (_cycle)
|
||||
{
|
||||
case 0:
|
||||
BoatManager.getInstance().broadcastPacket(DOCK, DOCK, LEAVE_INNADRIL5);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 240000);
|
||||
break;
|
||||
case 1:
|
||||
BoatManager.getInstance().broadcastPacket(DOCK, DOCK, LEAVE_INNADRIL1);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 40000);
|
||||
break;
|
||||
case 2:
|
||||
BoatManager.getInstance().broadcastPacket(DOCK, DOCK, LEAVE_INNADRIL0);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 20000);
|
||||
break;
|
||||
case 3:
|
||||
BoatManager.getInstance().broadcastPackets(DOCK, DOCK, LEAVING_INNADRIL, INNADRIL_SOUND);
|
||||
_boat.payForRide(0, 1, 107092, 219098, -3952);
|
||||
_boat.executePath(TOUR);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 650000);
|
||||
break;
|
||||
case 4:
|
||||
BoatManager.getInstance().broadcastPacket(DOCK, DOCK, ARRIVAL20);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 5:
|
||||
BoatManager.getInstance().broadcastPacket(DOCK, DOCK, ARRIVAL15);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 6:
|
||||
BoatManager.getInstance().broadcastPacket(DOCK, DOCK, ARRIVAL10);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 7:
|
||||
BoatManager.getInstance().broadcastPacket(DOCK, DOCK, ARRIVAL5);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 240000);
|
||||
break;
|
||||
case 8:
|
||||
BoatManager.getInstance().broadcastPacket(DOCK, DOCK, ARRIVAL1);
|
||||
break;
|
||||
case 9:
|
||||
BoatManager.getInstance().broadcastPackets(DOCK, DOCK, ARRIVED_AT_INNADRIL, INNADRIL_SOUND);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
}
|
||||
_cycle++;
|
||||
if (_cycle > 9)
|
||||
_cycle = 0;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_log.log(Level.WARNING, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
final L2BoatInstance boat = BoatManager.getInstance().getNewBoat(4, 111264, 226240, -3610, 32768);
|
||||
if (boat != null)
|
||||
{
|
||||
boat.registerEngine(new BoatInnadrilTour(boat));
|
||||
boat.runEngine(180000);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
/*
|
||||
* 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 vehicles;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.instancemanager.BoatManager;
|
||||
import com.l2jserver.gameserver.model.VehiclePathPoint;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2BoatInstance;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PlaySound;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author DS
|
||||
*
|
||||
*/
|
||||
public class BoatRunePrimeval implements Runnable
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(BoatRunePrimeval.class.getName());
|
||||
|
||||
// Time: 239s
|
||||
private static final VehiclePathPoint[] RUNE_TO_PRIMEVAL =
|
||||
{
|
||||
new VehiclePathPoint(32750, -39300, -3610, 180, 800),
|
||||
new VehiclePathPoint(27440, -39328, -3610, 250, 1000),
|
||||
new VehiclePathPoint(19616, -39360, -3610, 270, 1000),
|
||||
new VehiclePathPoint(3840, -38528, -3610, 270, 1000),
|
||||
new VehiclePathPoint(1664, -37120, -3610, 270, 1000),
|
||||
new VehiclePathPoint(896, -34560, -3610, 180, 1800),
|
||||
new VehiclePathPoint(832, -31104, -3610, 180, 180),
|
||||
new VehiclePathPoint(2240, -29132, -3610, 150, 1800),
|
||||
new VehiclePathPoint(4160, -27828, -3610, 150, 1800),
|
||||
new VehiclePathPoint(5888, -27279, -3610, 150, 1800),
|
||||
new VehiclePathPoint(7000, -27279, -3610, 150, 1800),
|
||||
new VehiclePathPoint(10342, -27279, -3610, 150, 1800)
|
||||
};
|
||||
|
||||
// Time: 221s
|
||||
private static final VehiclePathPoint[] PRIMEVAL_TO_RUNE =
|
||||
{
|
||||
new VehiclePathPoint(15528, -27279, -3610, 180, 800),
|
||||
new VehiclePathPoint(22304, -29664, -3610, 290, 800),
|
||||
new VehiclePathPoint(33824, -26880, -3610, 290, 800),
|
||||
new VehiclePathPoint(38848, -21792, -3610, 240, 1200),
|
||||
new VehiclePathPoint(43424, -22080, -3610, 180, 1800),
|
||||
new VehiclePathPoint(44320, -25152, -3610, 180, 1800),
|
||||
new VehiclePathPoint(40576, -31616, -3610, 250, 800),
|
||||
new VehiclePathPoint(36819, -35315, -3610, 220, 800)
|
||||
};
|
||||
|
||||
private static final VehiclePathPoint[] RUNE_DOCK =
|
||||
{
|
||||
new VehiclePathPoint(34381, -37680, -3610, 220, 800)
|
||||
};
|
||||
|
||||
private static final VehiclePathPoint PRIMEVAL_DOCK = RUNE_TO_PRIMEVAL[RUNE_TO_PRIMEVAL.length - 1];
|
||||
|
||||
private final L2BoatInstance _boat;
|
||||
private int _cycle = 0;
|
||||
private int _shoutCount = 0;
|
||||
|
||||
private final CreatureSay ARRIVED_AT_RUNE;
|
||||
private final CreatureSay ARRIVED_AT_RUNE_2;
|
||||
private final CreatureSay LEAVING_RUNE;
|
||||
private final CreatureSay ARRIVED_AT_PRIMEVAL;
|
||||
private final CreatureSay ARRIVED_AT_PRIMEVAL_2;
|
||||
private final CreatureSay LEAVING_PRIMEVAL;
|
||||
private final CreatureSay BUSY_RUNE;
|
||||
|
||||
private final PlaySound RUNE_SOUND;
|
||||
private final PlaySound PRIMEVAL_SOUND;
|
||||
|
||||
public BoatRunePrimeval(L2BoatInstance boat)
|
||||
{
|
||||
_boat = boat;
|
||||
|
||||
ARRIVED_AT_RUNE = new CreatureSay(0, Say2.BOAT, 801, 1620);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(0, Say2.BOAT, 801, 1991);
|
||||
LEAVING_RUNE = new CreatureSay(0, Say2.BOAT, 801, 1992);
|
||||
ARRIVED_AT_PRIMEVAL = new CreatureSay(0, Say2.BOAT, 801, 1988);
|
||||
ARRIVED_AT_PRIMEVAL_2 = new CreatureSay(0, Say2.BOAT, 801, 1989);
|
||||
LEAVING_PRIMEVAL = new CreatureSay(0, Say2.BOAT, 801, 1990);
|
||||
BUSY_RUNE = new CreatureSay(0, Say2.BOAT, 801, 1993);
|
||||
|
||||
RUNE_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), RUNE_DOCK[0].x, RUNE_DOCK[0].y, RUNE_DOCK[0].z);
|
||||
PRIMEVAL_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), PRIMEVAL_DOCK.x, PRIMEVAL_DOCK.y, PRIMEVAL_DOCK.z);
|
||||
}
|
||||
|
||||
public void run()
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (_cycle)
|
||||
{
|
||||
case 0:
|
||||
BoatManager.getInstance().dockShip(BoatManager.RUNE_HARBOR, false);
|
||||
BoatManager.getInstance().broadcastPackets(RUNE_DOCK[0], PRIMEVAL_DOCK, LEAVING_RUNE, RUNE_SOUND);
|
||||
_boat.payForRide(8925, 1, 34513, -38009, -3640);
|
||||
_boat.executePath(RUNE_TO_PRIMEVAL);
|
||||
break;
|
||||
case 1:
|
||||
BoatManager.getInstance().broadcastPackets(PRIMEVAL_DOCK, RUNE_DOCK[0], ARRIVED_AT_PRIMEVAL, ARRIVED_AT_PRIMEVAL_2, PRIMEVAL_SOUND);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 180000);
|
||||
break;
|
||||
case 2:
|
||||
BoatManager.getInstance().broadcastPackets(PRIMEVAL_DOCK, RUNE_DOCK[0], LEAVING_PRIMEVAL, PRIMEVAL_SOUND);
|
||||
_boat.payForRide(8924, 1, 10447, -24982, -3664);
|
||||
_boat.executePath(PRIMEVAL_TO_RUNE);
|
||||
break;
|
||||
case 3:
|
||||
if (BoatManager.getInstance().dockBusy(BoatManager.RUNE_HARBOR))
|
||||
{
|
||||
if (_shoutCount == 0)
|
||||
BoatManager.getInstance().broadcastPacket(RUNE_DOCK[0], PRIMEVAL_DOCK, BUSY_RUNE);
|
||||
|
||||
_shoutCount++;
|
||||
if (_shoutCount > 35)
|
||||
_shoutCount = 0;
|
||||
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 5000);
|
||||
return;
|
||||
}
|
||||
_boat.executePath(RUNE_DOCK);
|
||||
break;
|
||||
case 4:
|
||||
BoatManager.getInstance().dockShip(BoatManager.RUNE_HARBOR, true);
|
||||
BoatManager.getInstance().broadcastPackets(RUNE_DOCK[0], PRIMEVAL_DOCK, ARRIVED_AT_RUNE, ARRIVED_AT_RUNE_2, RUNE_SOUND);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 180000);
|
||||
break;
|
||||
}
|
||||
_shoutCount = 0;
|
||||
_cycle++;
|
||||
if (_cycle > 4)
|
||||
_cycle = 0;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_log.log(Level.WARNING, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
final L2BoatInstance boat = BoatManager.getInstance().getNewBoat(5, 34381, -37680, -3610, 40785);
|
||||
if (boat != null)
|
||||
{
|
||||
boat.registerEngine(new BoatRunePrimeval(boat));
|
||||
boat.runEngine(180000);
|
||||
BoatManager.getInstance().dockShip(BoatManager.RUNE_HARBOR, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,270 @@
|
||||
/*
|
||||
* 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 vehicles;
|
||||
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jserver.gameserver.ThreadPoolManager;
|
||||
import com.l2jserver.gameserver.instancemanager.BoatManager;
|
||||
import com.l2jserver.gameserver.model.VehiclePathPoint;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2BoatInstance;
|
||||
import com.l2jserver.gameserver.network.clientpackets.Say2;
|
||||
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
|
||||
import com.l2jserver.gameserver.network.serverpackets.PlaySound;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author DS
|
||||
*
|
||||
*/
|
||||
public class BoatTalkingGludin implements Runnable
|
||||
{
|
||||
private static final Logger _log = Logger.getLogger(BoatTalkingGludin.class.getName());
|
||||
|
||||
// Time: 919s
|
||||
private static final VehiclePathPoint[] TALKING_TO_GLUDIN =
|
||||
{
|
||||
new VehiclePathPoint(-121385, 261660, -3610, 180, 800),
|
||||
new VehiclePathPoint(-127694, 253312, -3610, 200, 800),
|
||||
new VehiclePathPoint(-129274, 237060, -3610, 250, 800),
|
||||
new VehiclePathPoint(-114688, 139040, -3610, 200, 800),
|
||||
new VehiclePathPoint(-109663, 135704, -3610, 180, 800),
|
||||
new VehiclePathPoint(-102151, 135704, -3610, 180, 800),
|
||||
new VehiclePathPoint(-96686, 140595, -3610, 180, 800),
|
||||
new VehiclePathPoint(-95686, 147718, -3610, 180, 800),
|
||||
new VehiclePathPoint(-95686, 148718, -3610, 180, 800),
|
||||
new VehiclePathPoint(-95686, 149718, -3610, 150, 800)
|
||||
};
|
||||
|
||||
private static final VehiclePathPoint[] GLUDIN_DOCK =
|
||||
{
|
||||
new VehiclePathPoint(-95686, 150514, -3610, 150, 800)
|
||||
};
|
||||
|
||||
// Time: 780s
|
||||
private static final VehiclePathPoint[] GLUDIN_TO_TALKING =
|
||||
{
|
||||
new VehiclePathPoint(-95686, 155514, -3610, 180, 800),
|
||||
new VehiclePathPoint(-95686, 185514, -3610, 250, 800),
|
||||
new VehiclePathPoint(-60136, 238816, -3610, 200, 800),
|
||||
new VehiclePathPoint(-60520, 259609, -3610, 180, 1800),
|
||||
new VehiclePathPoint(-65344, 261460, -3610, 180, 1800),
|
||||
new VehiclePathPoint(-83344, 261560, -3610, 180, 1800),
|
||||
new VehiclePathPoint(-88344, 261660, -3610, 180, 1800),
|
||||
new VehiclePathPoint(-92344, 261660, -3610, 150, 1800),
|
||||
new VehiclePathPoint(-94242, 261659, -3610, 150, 1800)
|
||||
};
|
||||
|
||||
private static final VehiclePathPoint[] TALKING_DOCK =
|
||||
{
|
||||
new VehiclePathPoint(-96622, 261660, -3610, 150, 1800)
|
||||
};
|
||||
|
||||
private final L2BoatInstance _boat;
|
||||
private int _cycle = 0;
|
||||
private int _shoutCount = 0;
|
||||
|
||||
private final CreatureSay ARRIVED_AT_TALKING;
|
||||
private final CreatureSay ARRIVED_AT_TALKING_2;
|
||||
private final CreatureSay LEAVE_TALKING5;
|
||||
private final CreatureSay LEAVE_TALKING1;
|
||||
private final CreatureSay LEAVE_TALKING1_2;
|
||||
private final CreatureSay LEAVE_TALKING0;
|
||||
private final CreatureSay LEAVING_TALKING;
|
||||
private final CreatureSay ARRIVED_AT_GLUDIN;
|
||||
private final CreatureSay ARRIVED_AT_GLUDIN_2;
|
||||
private final CreatureSay LEAVE_GLUDIN5;
|
||||
private final CreatureSay LEAVE_GLUDIN1;
|
||||
private final CreatureSay LEAVE_GLUDIN0;
|
||||
private final CreatureSay LEAVING_GLUDIN;
|
||||
private final CreatureSay BUSY_TALKING;
|
||||
private final CreatureSay BUSY_GLUDIN;
|
||||
|
||||
private final CreatureSay ARRIVAL_GLUDIN10;
|
||||
private final CreatureSay ARRIVAL_GLUDIN5;
|
||||
private final CreatureSay ARRIVAL_GLUDIN1;
|
||||
private final CreatureSay ARRIVAL_TALKING10;
|
||||
private final CreatureSay ARRIVAL_TALKING5;
|
||||
private final CreatureSay ARRIVAL_TALKING1;
|
||||
|
||||
private final PlaySound TALKING_SOUND;
|
||||
private final PlaySound GLUDIN_SOUND;
|
||||
|
||||
public BoatTalkingGludin(L2BoatInstance boat)
|
||||
{
|
||||
_boat = boat;
|
||||
_cycle = 0;
|
||||
|
||||
ARRIVED_AT_TALKING = new CreatureSay(0, Say2.BOAT, 801, 979);
|
||||
ARRIVED_AT_TALKING_2 = new CreatureSay(0, Say2.BOAT, 801, 980);
|
||||
LEAVE_TALKING5 = new CreatureSay(0, Say2.BOAT, 801, 981);
|
||||
LEAVE_TALKING1 = new CreatureSay(0, Say2.BOAT, 801, 982);
|
||||
LEAVE_TALKING1_2 = new CreatureSay(0, Say2.BOAT, 801, 983);
|
||||
LEAVE_TALKING0 = new CreatureSay(0, Say2.BOAT, 801, 984);
|
||||
LEAVING_TALKING = new CreatureSay(0, Say2.BOAT, 801, 985);
|
||||
ARRIVED_AT_GLUDIN = new CreatureSay(0, Say2.BOAT, 801, 986);
|
||||
ARRIVED_AT_GLUDIN_2 = new CreatureSay(0, Say2.BOAT, 801, 987);
|
||||
LEAVE_GLUDIN5 = new CreatureSay(0, Say2.BOAT, 801, 988);
|
||||
LEAVE_GLUDIN1 = new CreatureSay(0, Say2.BOAT, 801, 989);
|
||||
LEAVE_GLUDIN0 = new CreatureSay(0, Say2.BOAT, 801, 990);
|
||||
LEAVING_GLUDIN = new CreatureSay(0, Say2.BOAT, 801, 991);
|
||||
BUSY_TALKING = new CreatureSay(0, Say2.BOAT, 801, 1486);
|
||||
BUSY_GLUDIN = new CreatureSay(0, Say2.BOAT, 801, 1485);
|
||||
|
||||
ARRIVAL_GLUDIN10 = new CreatureSay(0, Say2.BOAT, 801, 1159);
|
||||
ARRIVAL_GLUDIN5 = new CreatureSay(0, Say2.BOAT, 801, 1160);
|
||||
ARRIVAL_GLUDIN1 = new CreatureSay(0, Say2.BOAT, 801, 1161);
|
||||
ARRIVAL_TALKING10 = new CreatureSay(0, Say2.BOAT, 801, 1191);
|
||||
ARRIVAL_TALKING5 = new CreatureSay(0, Say2.BOAT, 801, 1192);
|
||||
ARRIVAL_TALKING1 = new CreatureSay(0, Say2.BOAT, 801, 1193);
|
||||
|
||||
TALKING_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), TALKING_DOCK[0].x, TALKING_DOCK[0].y, TALKING_DOCK[0].z);
|
||||
GLUDIN_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), GLUDIN_DOCK[0].x, GLUDIN_DOCK[0].y, GLUDIN_DOCK[0].z);
|
||||
}
|
||||
|
||||
public void run()
|
||||
{
|
||||
try
|
||||
{
|
||||
switch (_cycle)
|
||||
{
|
||||
case 0:
|
||||
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GLUDIN_DOCK[0], LEAVE_TALKING5);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 240000);
|
||||
break;
|
||||
case 1:
|
||||
BoatManager.getInstance().broadcastPackets(TALKING_DOCK[0], GLUDIN_DOCK[0], LEAVE_TALKING1, LEAVE_TALKING1_2);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 40000);
|
||||
break;
|
||||
case 2:
|
||||
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GLUDIN_DOCK[0], LEAVE_TALKING0);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 20000);
|
||||
break;
|
||||
case 3:
|
||||
BoatManager.getInstance().dockShip(BoatManager.TALKING_ISLAND, false);
|
||||
BoatManager.getInstance().broadcastPackets(TALKING_DOCK[0], GLUDIN_DOCK[0], LEAVING_TALKING);
|
||||
_boat.broadcastPacket(TALKING_SOUND);
|
||||
_boat.payForRide(1074, 1, -96777, 258970, -3623);
|
||||
_boat.executePath(TALKING_TO_GLUDIN);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 4:
|
||||
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], TALKING_DOCK[0], ARRIVAL_GLUDIN10);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 5:
|
||||
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], TALKING_DOCK[0], ARRIVAL_GLUDIN5);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 240000);
|
||||
break;
|
||||
case 6:
|
||||
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], TALKING_DOCK[0], ARRIVAL_GLUDIN1);
|
||||
break;
|
||||
case 7:
|
||||
if (BoatManager.getInstance().dockBusy(BoatManager.GLUDIN_HARBOR))
|
||||
{
|
||||
if (_shoutCount == 0)
|
||||
BoatManager.getInstance().broadcastPacket(GLUDIN_DOCK[0], TALKING_DOCK[0], BUSY_GLUDIN);
|
||||
|
||||
_shoutCount++;
|
||||
if (_shoutCount > 35)
|
||||
_shoutCount = 0;
|
||||
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 5000);
|
||||
return;
|
||||
}
|
||||
_boat.executePath(GLUDIN_DOCK);
|
||||
break;
|
||||
case 8:
|
||||
BoatManager.getInstance().dockShip(BoatManager.GLUDIN_HARBOR, true);
|
||||
BoatManager.getInstance().broadcastPackets(GLUDIN_DOCK[0], TALKING_DOCK[0], ARRIVED_AT_GLUDIN, ARRIVED_AT_GLUDIN_2);
|
||||
_boat.broadcastPacket(GLUDIN_SOUND);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 9:
|
||||
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GLUDIN_DOCK[0], LEAVE_GLUDIN5);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 240000);
|
||||
break;
|
||||
case 10:
|
||||
BoatManager.getInstance().broadcastPackets(TALKING_DOCK[0], GLUDIN_DOCK[0], LEAVE_GLUDIN1, LEAVE_TALKING1_2);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 40000);
|
||||
break;
|
||||
case 11:
|
||||
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GLUDIN_DOCK[0], LEAVE_GLUDIN0);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 20000);
|
||||
break;
|
||||
case 12:
|
||||
BoatManager.getInstance().dockShip(BoatManager.GLUDIN_HARBOR, false);
|
||||
BoatManager.getInstance().broadcastPackets(TALKING_DOCK[0], GLUDIN_DOCK[0], LEAVING_GLUDIN);
|
||||
_boat.broadcastPacket(GLUDIN_SOUND);
|
||||
_boat.payForRide(1075, 1, -90015, 150422, -3610);
|
||||
_boat.executePath(GLUDIN_TO_TALKING);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 150000);
|
||||
break;
|
||||
case 13:
|
||||
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GLUDIN_DOCK[0], ARRIVAL_TALKING10);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
case 14:
|
||||
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GLUDIN_DOCK[0], ARRIVAL_TALKING5);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 240000);
|
||||
break;
|
||||
case 15:
|
||||
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GLUDIN_DOCK[0], ARRIVAL_TALKING1);
|
||||
break;
|
||||
case 16:
|
||||
if (BoatManager.getInstance().dockBusy(BoatManager.TALKING_ISLAND))
|
||||
{
|
||||
if (_shoutCount == 0)
|
||||
BoatManager.getInstance().broadcastPacket(TALKING_DOCK[0], GLUDIN_DOCK[0], BUSY_TALKING);
|
||||
|
||||
_shoutCount++;
|
||||
if (_shoutCount > 35)
|
||||
_shoutCount = 0;
|
||||
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 5000);
|
||||
return;
|
||||
}
|
||||
_boat.executePath(TALKING_DOCK);
|
||||
break;
|
||||
case 17:
|
||||
BoatManager.getInstance().dockShip(BoatManager.TALKING_ISLAND, true);
|
||||
BoatManager.getInstance().broadcastPackets(TALKING_DOCK[0], GLUDIN_DOCK[0], ARRIVED_AT_TALKING, ARRIVED_AT_TALKING_2);
|
||||
_boat.broadcastPacket(TALKING_SOUND);
|
||||
ThreadPoolManager.getInstance().scheduleGeneral(this, 300000);
|
||||
break;
|
||||
}
|
||||
_shoutCount = 0;
|
||||
_cycle++;
|
||||
if (_cycle > 17)
|
||||
_cycle = 0;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_log.log(Level.WARNING, e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
final L2BoatInstance boat = BoatManager.getInstance().getNewBoat(1, -96622, 261660, -3610, 32768);
|
||||
if (boat != null)
|
||||
{
|
||||
boat.registerEngine(new BoatTalkingGludin(boat));
|
||||
boat.runEngine(180000);
|
||||
BoatManager.getInstance().dockShip(BoatManager.TALKING_ISLAND, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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 lords whose clan is level 5 or higher</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 thinkk this is too time-consuming, you can also buy them from Officer Tolonis right over there..<br>
|
||||
<a action="bypass -h Quest EngineerLekon license">Obtain the Airship Summon License.</a>
|
||||
</body></html>
|
||||
@@ -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>
|
||||
<a action="bypass -h Quest EngineerLekon 32557-1.htm">Ask about Airship Summon License.</a><br>
|
||||
<a action="bypass -h npc_%objectId%_Quest">Quest</a>
|
||||
</body></html>
|
||||
+92
@@ -0,0 +1,92 @@
|
||||
/*
|
||||
* 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 vehicles.EngineerLekon;
|
||||
|
||||
import com.l2jserver.gameserver.instancemanager.AirShipManager;
|
||||
import com.l2jserver.gameserver.model.actor.L2Npc;
|
||||
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
|
||||
import com.l2jserver.gameserver.model.quest.Quest;
|
||||
import com.l2jserver.gameserver.network.SystemMessageId;
|
||||
import com.l2jserver.gameserver.network.serverpackets.SystemMessage;
|
||||
|
||||
public class EngineerLekon extends Quest
|
||||
{
|
||||
private static final int LEKON = 32557;
|
||||
|
||||
private static final int LICENSE = 13559;
|
||||
private static final int STARSTONE = 13277;
|
||||
private static final int LICENSE_COST = 10;
|
||||
|
||||
private static final SystemMessage SM_NEED_CLANLVL5 = SystemMessage.getSystemMessage(SystemMessageId.THE_AIRSHIP_NEED_CLANLVL_5_TO_SUMMON);
|
||||
private static final SystemMessage SM_NO_PRIVS = SystemMessage.getSystemMessage(SystemMessageId.THE_AIRSHIP_NO_PRIVILEGES);
|
||||
private static final SystemMessage SM_LICENSE_ALREADY_ACQUIRED = SystemMessage.getSystemMessage(SystemMessageId.THE_AIRSHIP_SUMMON_LICENSE_ALREADY_ACQUIRED);
|
||||
|
||||
@Override
|
||||
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if ("license".equalsIgnoreCase(event))
|
||||
{
|
||||
if (player.getClan() == null || player.getClan().getLevel() < 5)
|
||||
{
|
||||
player.sendPacket(SM_NEED_CLANLVL5);
|
||||
return null;
|
||||
}
|
||||
if (!player.isClanLeader())
|
||||
{
|
||||
player.sendPacket(SM_NO_PRIVS);
|
||||
return null;
|
||||
}
|
||||
if (AirShipManager.getInstance().hasAirShipLicense(player.getClanId()))
|
||||
{
|
||||
player.sendPacket(SM_LICENSE_ALREADY_ACQUIRED);
|
||||
return null;
|
||||
}
|
||||
if (player.getInventory().getItemByItemId(LICENSE) != null)
|
||||
{
|
||||
player.sendPacket(SM_LICENSE_ALREADY_ACQUIRED);
|
||||
return null;
|
||||
}
|
||||
if (!player.destroyItemByItemId("AirShipLicense", STARSTONE, LICENSE_COST, npc, true))
|
||||
return null;
|
||||
|
||||
player.addItem("AirShipLicense", LICENSE, 1, npc, true);
|
||||
return null;
|
||||
}
|
||||
else
|
||||
return event;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String onFirstTalk(L2Npc npc, L2PcInstance player)
|
||||
{
|
||||
if (player.getQuestState(getName()) == null)
|
||||
newQuestState(player);
|
||||
|
||||
return npc.getNpcId() + ".htm";
|
||||
}
|
||||
|
||||
public EngineerLekon(int questId, String name, String descr)
|
||||
{
|
||||
super(questId, name, descr);
|
||||
addStartNpc(LEKON);
|
||||
addFirstTalkId(LEKON);
|
||||
addTalkId(LEKON);
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new EngineerLekon(-1, EngineerLekon.class.getSimpleName(), "vehicles");
|
||||
}
|
||||
}
|
||||
+8
@@ -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>
|
||||
Vendored
+96
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* 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 vehicles.KeucereusNorthController;
|
||||
|
||||
import vehicles.AirShipController;
|
||||
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.VehiclePathPoint;
|
||||
|
||||
public 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(int questId, String name, String descr)
|
||||
{
|
||||
super(questId, name, descr);
|
||||
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();
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new KeucereusNorthController(-1, KeucereusNorthController.class.getSimpleName(), "vehicles");
|
||||
}
|
||||
}
|
||||
+8
@@ -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>
|
||||
Vendored
+96
@@ -0,0 +1,96 @@
|
||||
/*
|
||||
* 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 vehicles.KeucereusSouthController;
|
||||
|
||||
import vehicles.AirShipController;
|
||||
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.VehiclePathPoint;
|
||||
|
||||
public 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(int questId, String name, String descr)
|
||||
{
|
||||
super(questId, name, descr);
|
||||
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();
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new KeucereusSouthController(-1, KeucereusSouthController.class.getSimpleName(), "vehicles");
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
+87
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
* 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 vehicles.SoDController;
|
||||
|
||||
import vehicles.AirShipController;
|
||||
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.VehiclePathPoint;
|
||||
|
||||
public 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(int questId, String name, String descr)
|
||||
{
|
||||
super(questId, name, descr);
|
||||
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();
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new SoDController(-1, SoDController.class.getSimpleName(), "vehicles");
|
||||
}
|
||||
}
|
||||
@@ -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>
|
||||
+91
@@ -0,0 +1,91 @@
|
||||
/*
|
||||
* 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 vehicles.SoIController;
|
||||
|
||||
import vehicles.AirShipController;
|
||||
|
||||
import com.l2jserver.gameserver.model.Location;
|
||||
import com.l2jserver.gameserver.model.VehiclePathPoint;
|
||||
|
||||
public 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(int questId, String name, String descr)
|
||||
{
|
||||
super(questId, name, descr);
|
||||
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();
|
||||
}
|
||||
|
||||
public static void main(String[] args)
|
||||
{
|
||||
new SoIController(-1, SoIController.class.getSimpleName(), "vehicles");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user