Removed several Innadril spawns.
This commit is contained in:
@@ -1,320 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package vehicles;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.instancemanager.BoatManager;
|
||||
import com.l2jmobius.gameserver.model.VehiclePathPoint;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2BoatInstance;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||
import com.l2jmobius.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, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_HAS_ARRIVED_AT_GLUDIN_HARBOR);
|
||||
ARRIVED_AT_GLUDIN_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
LEAVE_GLUDIN5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_FIVE_MINUTES);
|
||||
LEAVE_GLUDIN1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_RUNE_HARBOR_WILL_TAKE_PLACE_IN_ONE_MINUTE);
|
||||
LEAVE_GLUDIN0 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY2);
|
||||
LEAVING_GLUDIN = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WE_ARE_NOW_DEPARTING_FOR_GLUDIN_HARBOR_HOLD_ON_AND_ENJOY_THE_RIDE);
|
||||
ARRIVED_AT_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WELCOME_TO_RUNE_HARBOR);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_GLUDIN_HARBOR_AFTER_ANCHORING_FOR_TEN_MINUTES);
|
||||
LEAVE_RUNE5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_GLUDIN_HARBOR_WILL_TAKE_PLACE_IN_FIVE_MINUTES);
|
||||
LEAVE_RUNE1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.DEPARTURE_FOR_GLUDIN_HARBOR_WILL_TAKE_PLACE_IN_ONE_MINUTE);
|
||||
LEAVE_RUNE0 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.MAKE_HASTE_WE_WILL_BE_DEPARTING_FOR_GLUDIN_HARBOR_SHORTLY);
|
||||
LEAVING_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.WE_ARE_NOW_DEPARTING_FOR_GLUDIN_HARBOR_HOLD_ON_AND_ENJOY_THE_RIDE);
|
||||
BUSY_GLUDIN = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_TO_GLUDIN_HARBOR_HAS_BEEN_DELAYED);
|
||||
BUSY_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_TO_RUNE_HARBOR_HAS_BEEN_DELAYED);
|
||||
|
||||
ARRIVAL_RUNE15 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL_RUNE10 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL_RUNE5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL_RUNE1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_GLUDIN_HARBOR_WILL_BE_ARRIVING_AT_RUNE_HARBOR_IN_APPROXIMATELY_1_MINUTE);
|
||||
ARRIVAL_GLUDIN15 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL_GLUDIN10 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL_GLUDIN5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL_GLUDIN1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_RUNE_HARBOR_WILL_BE_ARRIVING_AT_GLUDIN_HARBOR_IN_APPROXIMATELY_1_MINUTE);
|
||||
|
||||
GLUDIN_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), GLUDIN_DOCK[0].getX(), GLUDIN_DOCK[0].getY(), GLUDIN_DOCK[0].getZ());
|
||||
RUNE_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), RUNE_DOCK[0].getX(), RUNE_DOCK[0].getY(), RUNE_DOCK[0].getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
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.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);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,182 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package vehicles;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.instancemanager.BoatManager;
|
||||
import com.l2jmobius.gameserver.model.VehiclePathPoint;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2BoatInstance;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||
import com.l2jmobius.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, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_HAS_ARRIVED_IT_WILL_ANCHOR_FOR_TEN_MINUTES);
|
||||
LEAVE_INNADRIL5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_LEAVE_IN_FIVE_MINUTES);
|
||||
LEAVE_INNADRIL1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_LEAVE_IN_ONE_MINUTE);
|
||||
LEAVE_INNADRIL0 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_BE_LEAVING_SOON);
|
||||
LEAVING_INNADRIL = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_IS_LEAVING);
|
||||
|
||||
ARRIVAL20 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_20_MINUTES);
|
||||
ARRIVAL15 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_15_MINUTES);
|
||||
ARRIVAL10 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_10_MINUTES);
|
||||
ARRIVAL5 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_5_MINUTES);
|
||||
ARRIVAL1 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_INNADRIL_PLEASURE_BOAT_WILL_ARRIVE_IN_APPROXIMATELY_1_MINUTE);
|
||||
|
||||
INNADRIL_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), DOCK.getX(), DOCK.getY(), DOCK.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
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.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);
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,175 +0,0 @@
|
||||
/*
|
||||
* This file is part of the L2J Mobius project.
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package vehicles;
|
||||
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.l2jmobius.gameserver.ThreadPoolManager;
|
||||
import com.l2jmobius.gameserver.enums.ChatType;
|
||||
import com.l2jmobius.gameserver.instancemanager.BoatManager;
|
||||
import com.l2jmobius.gameserver.model.VehiclePathPoint;
|
||||
import com.l2jmobius.gameserver.model.actor.instance.L2BoatInstance;
|
||||
import com.l2jmobius.gameserver.network.SystemMessageId;
|
||||
import com.l2jmobius.gameserver.network.serverpackets.CreatureSay;
|
||||
import com.l2jmobius.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, ChatType.BOAT, 801, SystemMessageId.WELCOME_TO_RUNE_HARBOR);
|
||||
ARRIVED_AT_RUNE_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_PRIMEVAL_ISLE_AFTER_ANCHORING_FOR_THREE_MINUTES);
|
||||
LEAVING_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_IS_NOW_DEPARTING_RUNE_HARBOR_FOR_PRIMEVAL_ISLE);
|
||||
ARRIVED_AT_PRIMEVAL = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_HAS_ARRIVED_AT_PRIMEVAL_ISLE);
|
||||
ARRIVED_AT_PRIMEVAL_2 = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_WILL_LEAVE_FOR_RUNE_HARBOR_AFTER_ANCHORING_FOR_THREE_MINUTES);
|
||||
LEAVING_PRIMEVAL = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_IS_NOW_DEPARTING_PRIMEVAL_ISLE_FOR_RUNE_HARBOR);
|
||||
BUSY_RUNE = new CreatureSay(0, ChatType.BOAT, 801, SystemMessageId.THE_FERRY_FROM_PRIMEVAL_ISLE_TO_RUNE_HARBOR_HAS_BEEN_DELAYED);
|
||||
|
||||
RUNE_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), RUNE_DOCK[0].getX(), RUNE_DOCK[0].getY(), RUNE_DOCK[0].getZ());
|
||||
PRIMEVAL_SOUND = new PlaySound(0, "itemsound.ship_arrival_departure", 1, _boat.getObjectId(), PRIMEVAL_DOCK.getX(), PRIMEVAL_DOCK.getY(), PRIMEVAL_DOCK.getZ());
|
||||
}
|
||||
|
||||
@Override
|
||||
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.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);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user