Cleaned up boss AI scripts.
This commit is contained in:
@@ -57,18 +57,24 @@ public class Antharas extends Quest
|
|||||||
{
|
{
|
||||||
protected static final Logger LOGGER = Logger.getLogger(Antharas.class.getName());
|
protected static final Logger LOGGER = Logger.getLogger(Antharas.class.getName());
|
||||||
|
|
||||||
// Config
|
// Antharas status.
|
||||||
|
private static final int DORMANT = 0; // Antharas is spawned and no one has entered yet. Entry is unlocked
|
||||||
|
private static final int WAITING = 1; // Antharas is spawend and someone has entered, triggering a 30 minute window for additional people to enter before he unleashes his attack. Entry is unlocked.
|
||||||
|
private static final int FIGHTING = 2; // Antharas is engaged in battle, annihilating his foes. Entry is locked
|
||||||
|
private static final int DEAD = 3; // Antharas has been killed. Entry is locked
|
||||||
|
// Monsters.
|
||||||
|
private static final int ANTHARAS_OLD = 29019;
|
||||||
|
private static final int ANTHARAS_WEAK = 29066;
|
||||||
|
private static final int ANTHARAS_NORMAL = 29067;
|
||||||
|
private static final int ANTHARAS_STRONG = 29068;
|
||||||
|
// Configs.
|
||||||
private static final int FWA_ACTIVITYTIMEOFANTHARAS = 120;
|
private static final int FWA_ACTIVITYTIMEOFANTHARAS = 120;
|
||||||
// private static final int FWA_APPTIMEOFANTHARAS = 1800000;
|
protected static final boolean FWA_OLDANTHARAS = Config.ANTHARAS_OLD; // Use antharas Interlude with minions.
|
||||||
// private static final int FWA_INACTIVITYTIME = 900000;
|
|
||||||
// private static final boolean FWA_OLDANTHARAS = true; // use antharas interlude with minions
|
|
||||||
protected static final boolean FWA_OLDANTHARAS = Config.ANTHARAS_OLD; // use antharas interlude with minions
|
|
||||||
private static final boolean FWA_MOVEATRANDOM = true;
|
private static final boolean FWA_MOVEATRANDOM = true;
|
||||||
private static final boolean FWA_DOSERVEREARTHQUAKE = true;
|
private static final boolean FWA_DOSERVEREARTHQUAKE = true;
|
||||||
private static final int FWA_LIMITOFWEAK = 45;
|
private static final int FWA_LIMITOFWEAK = 45;
|
||||||
private static final int FWA_LIMITOFNORMAL = 63;
|
private static final int FWA_LIMITOFNORMAL = 63;
|
||||||
|
private static final int FWA_MAXMOBS = 10; // This includes Antharas.
|
||||||
private static final int FWA_MAXMOBS = 10; // this includes Antharas itself
|
|
||||||
private static final int FWA_INTERVALOFMOBSWEAK = 180000;
|
private static final int FWA_INTERVALOFMOBSWEAK = 180000;
|
||||||
private static final int FWA_INTERVALOFMOBSNORMAL = 150000;
|
private static final int FWA_INTERVALOFMOBSNORMAL = 150000;
|
||||||
private static final int FWA_INTERVALOFMOBSSTRONG = 120000;
|
private static final int FWA_INTERVALOFMOBSSTRONG = 120000;
|
||||||
@@ -83,23 +89,6 @@ public class Antharas extends Quest
|
|||||||
-7709,
|
-7709,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
protected Collection<Spawn> _teleportCubeSpawn = ConcurrentHashMap.newKeySet();
|
|
||||||
protected Collection<NpcInstance> _teleportCube = ConcurrentHashMap.newKeySet();
|
|
||||||
|
|
||||||
// Spawn data of monsters.
|
|
||||||
protected Map<Integer, Spawn> _monsterSpawn = new ConcurrentHashMap<>();
|
|
||||||
|
|
||||||
// Instance of monsters.
|
|
||||||
protected Collection<NpcInstance> _monsters = ConcurrentHashMap.newKeySet();
|
|
||||||
protected GrandBossInstance _antharas = null;
|
|
||||||
|
|
||||||
// monstersId
|
|
||||||
private static final int ANTHARASOLDID = 29019;
|
|
||||||
private static final int ANTHARASWEAKID = 29066;
|
|
||||||
private static final int ANTHARASNORMALID = 29067;
|
|
||||||
private static final int ANTHARASSTRONGID = 29068;
|
|
||||||
|
|
||||||
// Tasks.
|
// Tasks.
|
||||||
protected ScheduledFuture<?> _cubeSpawnTask = null;
|
protected ScheduledFuture<?> _cubeSpawnTask = null;
|
||||||
protected ScheduledFuture<?> _monsterSpawnTask = null;
|
protected ScheduledFuture<?> _monsterSpawnTask = null;
|
||||||
@@ -110,38 +99,19 @@ public class Antharas extends Quest
|
|||||||
protected ScheduledFuture<?> _selfDestructionTask = null;
|
protected ScheduledFuture<?> _selfDestructionTask = null;
|
||||||
protected ScheduledFuture<?> _moveAtRandomTask = null;
|
protected ScheduledFuture<?> _moveAtRandomTask = null;
|
||||||
protected ScheduledFuture<?> _movieTask = null;
|
protected ScheduledFuture<?> _movieTask = null;
|
||||||
|
// Misc.
|
||||||
// Antharas Status Tracking :
|
protected Collection<Spawn> _teleportCubeSpawn = ConcurrentHashMap.newKeySet();
|
||||||
private static final int DORMANT = 0; // Antharas is spawned and no one has entered yet. Entry is unlocked
|
protected Collection<NpcInstance> _teleportCube = ConcurrentHashMap.newKeySet();
|
||||||
private static final int WAITING = 1; // Antharas is spawend and someone has entered, triggering a 30 minute window for additional people to enter
|
protected Map<Integer, Spawn> _monsterSpawn = new ConcurrentHashMap<>();
|
||||||
// before he unleashes his attack. Entry is unlocked
|
protected Collection<NpcInstance> _monsters = ConcurrentHashMap.newKeySet();
|
||||||
private static final int FIGHTING = 2; // Antharas is engaged in battle, annihilating his foes. Entry is locked
|
protected GrandBossInstance _antharas = null;
|
||||||
private static final int DEAD = 3; // Antharas has been killed. Entry is locked
|
protected static long _lastAction = 0;
|
||||||
|
|
||||||
protected static long _LastAction = 0;
|
|
||||||
|
|
||||||
protected static BossZone _zone;
|
protected static BossZone _zone;
|
||||||
|
|
||||||
// Boss: Antharas
|
|
||||||
public Antharas()
|
public Antharas()
|
||||||
{
|
{
|
||||||
super(-1, "ai/bosses");
|
super(-1, "ai/bosses");
|
||||||
final int[] mob =
|
registerMobs(ANTHARAS_OLD, ANTHARAS_WEAK, ANTHARAS_NORMAL, ANTHARAS_STRONG, 29069, 29070, 29071, 29072, 29073, 29074, 29075, 29076);
|
||||||
{
|
|
||||||
ANTHARASOLDID,
|
|
||||||
ANTHARASWEAKID,
|
|
||||||
ANTHARASNORMALID,
|
|
||||||
ANTHARASSTRONGID,
|
|
||||||
29069,
|
|
||||||
29070,
|
|
||||||
29071,
|
|
||||||
29072,
|
|
||||||
29073,
|
|
||||||
29074,
|
|
||||||
29075,
|
|
||||||
29076
|
|
||||||
};
|
|
||||||
registerMobs(mob);
|
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,19 +125,18 @@ public class Antharas extends Quest
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize
|
|
||||||
private void init()
|
private void init()
|
||||||
{
|
{
|
||||||
// Setting spawn data of monsters.
|
// Setting spawn data of monsters.
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_zone = GrandBossManager.getInstance().getZone(179700, 113800, -7709);
|
_zone = GrandBossManager.getInstance().getZone(179700, 113800, -7709);
|
||||||
NpcTemplate template1;
|
NpcTemplate template;
|
||||||
Spawn tempSpawn;
|
Spawn tempSpawn;
|
||||||
|
|
||||||
// Old Antharas
|
// Old Antharas.
|
||||||
template1 = NpcTable.getInstance().getTemplate(ANTHARASOLDID);
|
template = NpcTable.getInstance().getTemplate(ANTHARAS_OLD);
|
||||||
tempSpawn = new Spawn(template1);
|
tempSpawn = new Spawn(template);
|
||||||
tempSpawn.setX(181323);
|
tempSpawn.setX(181323);
|
||||||
tempSpawn.setY(114850);
|
tempSpawn.setY(114850);
|
||||||
tempSpawn.setZ(-7623);
|
tempSpawn.setZ(-7623);
|
||||||
@@ -175,11 +144,11 @@ public class Antharas extends Quest
|
|||||||
tempSpawn.setAmount(1);
|
tempSpawn.setAmount(1);
|
||||||
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
||||||
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
||||||
_monsterSpawn.put(29019, tempSpawn);
|
_monsterSpawn.put(ANTHARAS_OLD, tempSpawn);
|
||||||
|
|
||||||
// Weak Antharas
|
// Weak Antharas.
|
||||||
template1 = NpcTable.getInstance().getTemplate(ANTHARASWEAKID);
|
template = NpcTable.getInstance().getTemplate(ANTHARAS_WEAK);
|
||||||
tempSpawn = new Spawn(template1);
|
tempSpawn = new Spawn(template);
|
||||||
tempSpawn.setX(181323);
|
tempSpawn.setX(181323);
|
||||||
tempSpawn.setY(114850);
|
tempSpawn.setY(114850);
|
||||||
tempSpawn.setZ(-7623);
|
tempSpawn.setZ(-7623);
|
||||||
@@ -187,11 +156,11 @@ public class Antharas extends Quest
|
|||||||
tempSpawn.setAmount(1);
|
tempSpawn.setAmount(1);
|
||||||
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
||||||
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
||||||
_monsterSpawn.put(29066, tempSpawn);
|
_monsterSpawn.put(ANTHARAS_WEAK, tempSpawn);
|
||||||
|
|
||||||
// Normal Antharas
|
// Normal Antharas.
|
||||||
template1 = NpcTable.getInstance().getTemplate(ANTHARASNORMALID);
|
template = NpcTable.getInstance().getTemplate(ANTHARAS_NORMAL);
|
||||||
tempSpawn = new Spawn(template1);
|
tempSpawn = new Spawn(template);
|
||||||
tempSpawn.setX(181323);
|
tempSpawn.setX(181323);
|
||||||
tempSpawn.setY(114850);
|
tempSpawn.setY(114850);
|
||||||
tempSpawn.setZ(-7623);
|
tempSpawn.setZ(-7623);
|
||||||
@@ -199,11 +168,11 @@ public class Antharas extends Quest
|
|||||||
tempSpawn.setAmount(1);
|
tempSpawn.setAmount(1);
|
||||||
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
||||||
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
||||||
_monsterSpawn.put(29067, tempSpawn);
|
_monsterSpawn.put(ANTHARAS_NORMAL, tempSpawn);
|
||||||
|
|
||||||
// Strong Antharas
|
// Strong Antharas.
|
||||||
template1 = NpcTable.getInstance().getTemplate(ANTHARASSTRONGID);
|
template = NpcTable.getInstance().getTemplate(ANTHARAS_STRONG);
|
||||||
tempSpawn = new Spawn(template1);
|
tempSpawn = new Spawn(template);
|
||||||
tempSpawn.setX(181323);
|
tempSpawn.setX(181323);
|
||||||
tempSpawn.setY(114850);
|
tempSpawn.setY(114850);
|
||||||
tempSpawn.setZ(-7623);
|
tempSpawn.setZ(-7623);
|
||||||
@@ -211,7 +180,7 @@ public class Antharas extends Quest
|
|||||||
tempSpawn.setAmount(1);
|
tempSpawn.setAmount(1);
|
||||||
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
||||||
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
||||||
_monsterSpawn.put(29068, tempSpawn);
|
_monsterSpawn.put(ANTHARAS_STRONG, tempSpawn);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -239,40 +208,40 @@ public class Antharas extends Quest
|
|||||||
LOGGER.warning(e.getMessage());
|
LOGGER.warning(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
Integer status = GrandBossManager.getInstance().getBossStatus(ANTHARASOLDID);
|
Integer status = GrandBossManager.getInstance().getBossStatus(ANTHARAS_OLD);
|
||||||
if (FWA_OLDANTHARAS || (status == WAITING))
|
if (FWA_OLDANTHARAS || (status == WAITING))
|
||||||
{
|
{
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(ANTHARASOLDID);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(ANTHARAS_OLD);
|
||||||
final Long respawnTime = info.getLong("respawn_time");
|
final Long respawnTime = info.getLong("respawn_time");
|
||||||
if ((status == DEAD) && (respawnTime <= Chronos.currentTimeMillis()))
|
if ((status == DEAD) && (respawnTime <= Chronos.currentTimeMillis()))
|
||||||
{
|
{
|
||||||
// the time has already expired while the server was offline. Immediately spawn antharas in his cave.
|
// The time has already expired while the server was offline. Immediately spawn antharas in his cave.
|
||||||
// also, the status needs to be changed to DORMANT
|
// Also, the status needs to be changed to DORMANT.
|
||||||
GrandBossManager.getInstance().setBossStatus(ANTHARASOLDID, DORMANT);
|
GrandBossManager.getInstance().setBossStatus(ANTHARAS_OLD, DORMANT);
|
||||||
status = DORMANT;
|
status = DORMANT;
|
||||||
}
|
}
|
||||||
else if (status == FIGHTING)
|
else if (status == FIGHTING)
|
||||||
{
|
{
|
||||||
final int loc_x = info.getInt("loc_x");
|
final int x = info.getInt("loc_x");
|
||||||
final int loc_y = info.getInt("loc_y");
|
final int y = info.getInt("loc_y");
|
||||||
final int loc_z = info.getInt("loc_z");
|
final int z = info.getInt("loc_z");
|
||||||
final int heading = info.getInt("heading");
|
final int heading = info.getInt("heading");
|
||||||
final int hp = info.getInt("currentHP");
|
final int hp = info.getInt("currentHP");
|
||||||
final int mp = info.getInt("currentMP");
|
final int mp = info.getInt("currentMP");
|
||||||
_antharas = (GrandBossInstance) addSpawn(ANTHARASOLDID, loc_x, loc_y, loc_z, heading, false, 0);
|
_antharas = (GrandBossInstance) addSpawn(ANTHARAS_OLD, x, y, z, heading, false, 0);
|
||||||
GrandBossManager.getInstance().addBoss(_antharas);
|
GrandBossManager.getInstance().addBoss(_antharas);
|
||||||
_antharas.setCurrentHpMp(hp, mp);
|
_antharas.setCurrentHpMp(hp, mp);
|
||||||
_LastAction = Chronos.currentTimeMillis();
|
_lastAction = Chronos.currentTimeMillis();
|
||||||
// Start repeating timer to check for inactivity
|
// Start repeating timer to check for inactivity.
|
||||||
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
||||||
}
|
}
|
||||||
else if (status == DEAD)
|
else if (status == DEAD)
|
||||||
{
|
{
|
||||||
ThreadPool.schedule(new UnlockAntharas(ANTHARASOLDID), respawnTime - Chronos.currentTimeMillis());
|
ThreadPool.schedule(new UnlockAntharas(ANTHARAS_OLD), respawnTime - Chronos.currentTimeMillis());
|
||||||
}
|
}
|
||||||
else if (status == DORMANT)
|
else if (status == DORMANT)
|
||||||
{
|
{
|
||||||
// Here status is 0 on Database, dont do nothing
|
// Here status is 0 on Database, don't do anything.
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -281,23 +250,23 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
final Integer statusWeak = GrandBossManager.getInstance().getBossStatus(ANTHARASWEAKID);
|
final Integer statusWeak = GrandBossManager.getInstance().getBossStatus(ANTHARAS_WEAK);
|
||||||
final Integer statusNormal = GrandBossManager.getInstance().getBossStatus(ANTHARASNORMALID);
|
final Integer statusNormal = GrandBossManager.getInstance().getBossStatus(ANTHARAS_NORMAL);
|
||||||
final Integer statusStrong = GrandBossManager.getInstance().getBossStatus(ANTHARASSTRONGID);
|
final Integer statusStrong = GrandBossManager.getInstance().getBossStatus(ANTHARAS_STRONG);
|
||||||
int antharasId = 0;
|
int antharasId = 0;
|
||||||
if ((statusWeak == FIGHTING) || (statusWeak == DEAD))
|
if ((statusWeak == FIGHTING) || (statusWeak == DEAD))
|
||||||
{
|
{
|
||||||
antharasId = ANTHARASWEAKID;
|
antharasId = ANTHARAS_WEAK;
|
||||||
status = statusWeak;
|
status = statusWeak;
|
||||||
}
|
}
|
||||||
else if ((statusNormal == FIGHTING) || (statusNormal == DEAD))
|
else if ((statusNormal == FIGHTING) || (statusNormal == DEAD))
|
||||||
{
|
{
|
||||||
antharasId = ANTHARASNORMALID;
|
antharasId = ANTHARAS_NORMAL;
|
||||||
status = statusNormal;
|
status = statusNormal;
|
||||||
}
|
}
|
||||||
else if ((statusStrong == FIGHTING) || (statusStrong == DEAD))
|
else if ((statusStrong == FIGHTING) || (statusStrong == DEAD))
|
||||||
{
|
{
|
||||||
antharasId = ANTHARASSTRONGID;
|
antharasId = ANTHARAS_STRONG;
|
||||||
status = statusStrong;
|
status = statusStrong;
|
||||||
}
|
}
|
||||||
if ((antharasId != 0) && (status == FIGHTING))
|
if ((antharasId != 0) && (status == FIGHTING))
|
||||||
@@ -312,8 +281,8 @@ public class Antharas extends Quest
|
|||||||
_antharas = (GrandBossInstance) addSpawn(antharasId, loc_x, loc_y, loc_z, heading, false, 0);
|
_antharas = (GrandBossInstance) addSpawn(antharasId, loc_x, loc_y, loc_z, heading, false, 0);
|
||||||
GrandBossManager.getInstance().addBoss(_antharas);
|
GrandBossManager.getInstance().addBoss(_antharas);
|
||||||
_antharas.setCurrentHpMp(hp, mp);
|
_antharas.setCurrentHpMp(hp, mp);
|
||||||
_LastAction = Chronos.currentTimeMillis();
|
_lastAction = Chronos.currentTimeMillis();
|
||||||
// Start repeating timer to check for inactivity
|
// Start repeating timer to check for inactivity.
|
||||||
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
||||||
}
|
}
|
||||||
else if ((antharasId != 0) && (status == DEAD))
|
else if ((antharasId != 0) && (status == DEAD))
|
||||||
@@ -322,8 +291,8 @@ public class Antharas extends Quest
|
|||||||
final Long respawnTime = info.getLong("respawn_time");
|
final Long respawnTime = info.getLong("respawn_time");
|
||||||
if (respawnTime <= Chronos.currentTimeMillis())
|
if (respawnTime <= Chronos.currentTimeMillis())
|
||||||
{
|
{
|
||||||
// the time has already expired while the server was offline. Immediately spawn antharas in his cave.
|
// The time has already expired while the server was offline. Immediately spawn antharas in his cave.
|
||||||
// also, the status needs to be changed to DORMANT
|
// Also, the status needs to be changed to DORMANT.
|
||||||
GrandBossManager.getInstance().setBossStatus(antharasId, DORMANT);
|
GrandBossManager.getInstance().setBossStatus(antharasId, DORMANT);
|
||||||
status = DORMANT;
|
status = DORMANT;
|
||||||
}
|
}
|
||||||
@@ -335,7 +304,6 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do spawn teleport cube.
|
|
||||||
public void spawnCube()
|
public void spawnCube()
|
||||||
{
|
{
|
||||||
if (_mobsSpawnTask != null)
|
if (_mobsSpawnTask != null)
|
||||||
@@ -360,7 +328,6 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setting Antharas spawn task.
|
|
||||||
public void setAntharasSpawnTask()
|
public void setAntharasSpawnTask()
|
||||||
{
|
{
|
||||||
if (_monsterSpawnTask == null)
|
if (_monsterSpawnTask == null)
|
||||||
@@ -369,7 +336,7 @@ public class Antharas extends Quest
|
|||||||
{
|
{
|
||||||
if (_monsterSpawnTask == null)
|
if (_monsterSpawnTask == null)
|
||||||
{
|
{
|
||||||
GrandBossManager.getInstance().setBossStatus(ANTHARASOLDID, WAITING);
|
GrandBossManager.getInstance().setBossStatus(ANTHARAS_OLD, WAITING);
|
||||||
_monsterSpawnTask = ThreadPool.schedule(new AntharasSpawn(1), 60000 * Config.ANTHARAS_WAIT_TIME);
|
_monsterSpawnTask = ThreadPool.schedule(new AntharasSpawn(1), 60000 * Config.ANTHARAS_WAIT_TIME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -380,16 +347,15 @@ public class Antharas extends Quest
|
|||||||
{
|
{
|
||||||
int intervalOfMobs;
|
int intervalOfMobs;
|
||||||
|
|
||||||
// Interval of minions is decided by the type of Antharas
|
// Interval of minions is decided by the type of Antharas that invaded the lair.
|
||||||
// that invaded the lair.
|
|
||||||
switch (antharasId)
|
switch (antharasId)
|
||||||
{
|
{
|
||||||
case ANTHARASWEAKID:
|
case ANTHARAS_WEAK:
|
||||||
{
|
{
|
||||||
intervalOfMobs = FWA_INTERVALOFMOBSWEAK;
|
intervalOfMobs = FWA_INTERVALOFMOBSWEAK;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ANTHARASNORMALID:
|
case ANTHARAS_NORMAL:
|
||||||
{
|
{
|
||||||
intervalOfMobs = FWA_INTERVALOFMOBSNORMAL;
|
intervalOfMobs = FWA_INTERVALOFMOBSNORMAL;
|
||||||
break;
|
break;
|
||||||
@@ -402,10 +368,9 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Spawn mobs.
|
// Spawn mobs.
|
||||||
_mobsSpawnTask = ThreadPool.scheduleAtFixedRate(new MobsSpawn(), intervalOfMobs, intervalOfMobs);
|
_mobsSpawnTask = ThreadPool.scheduleAtFixedRate(new MinionsSpawn(), intervalOfMobs, intervalOfMobs);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do spawn Antharas.
|
|
||||||
private class AntharasSpawn implements Runnable
|
private class AntharasSpawn implements Runnable
|
||||||
{
|
{
|
||||||
private int _taskId = 0;
|
private int _taskId = 0;
|
||||||
@@ -430,25 +395,24 @@ public class Antharas extends Quest
|
|||||||
{
|
{
|
||||||
case 1: // Spawn.
|
case 1: // Spawn.
|
||||||
{
|
{
|
||||||
// Strength of Antharas is decided by the number of players that
|
// Strength of Antharas is decided by the number of players that invaded the lair.
|
||||||
// invaded the lair.
|
|
||||||
_monsterSpawnTask.cancel(false);
|
_monsterSpawnTask.cancel(false);
|
||||||
_monsterSpawnTask = null;
|
_monsterSpawnTask = null;
|
||||||
if (FWA_OLDANTHARAS)
|
if (FWA_OLDANTHARAS)
|
||||||
{
|
{
|
||||||
npcId = 29019; // old
|
npcId = ANTHARAS_OLD;
|
||||||
}
|
}
|
||||||
else if ((_players == null) || (_players.size() <= FWA_LIMITOFWEAK))
|
else if ((_players == null) || (_players.size() <= FWA_LIMITOFWEAK))
|
||||||
{
|
{
|
||||||
npcId = 29066; // weak
|
npcId = ANTHARAS_WEAK;
|
||||||
}
|
}
|
||||||
else if (_players.size() > FWA_LIMITOFNORMAL)
|
else if (_players.size() > FWA_LIMITOFNORMAL)
|
||||||
{
|
{
|
||||||
npcId = 29068; // strong
|
npcId = ANTHARAS_STRONG;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
npcId = 29067; // normal
|
npcId = ANTHARAS_NORMAL;
|
||||||
}
|
}
|
||||||
// Do spawn.
|
// Do spawn.
|
||||||
antharasSpawn = _monsterSpawn.get(npcId);
|
antharasSpawn = _monsterSpawn.get(npcId);
|
||||||
@@ -456,10 +420,10 @@ public class Antharas extends Quest
|
|||||||
GrandBossManager.getInstance().addBoss(_antharas);
|
GrandBossManager.getInstance().addBoss(_antharas);
|
||||||
_monsters.add(_antharas);
|
_monsters.add(_antharas);
|
||||||
_antharas.setImmobilized(true);
|
_antharas.setImmobilized(true);
|
||||||
GrandBossManager.getInstance().setBossStatus(ANTHARASOLDID, DORMANT);
|
GrandBossManager.getInstance().setBossStatus(ANTHARAS_OLD, DORMANT);
|
||||||
GrandBossManager.getInstance().setBossStatus(npcId, FIGHTING);
|
GrandBossManager.getInstance().setBossStatus(npcId, FIGHTING);
|
||||||
_LastAction = Chronos.currentTimeMillis();
|
_lastAction = Chronos.currentTimeMillis();
|
||||||
// Start repeating timer to check for inactivity
|
// Start repeating timer to check for inactivity.
|
||||||
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
||||||
// Setting 1st time of minions spawn task.
|
// Setting 1st time of minions spawn task.
|
||||||
if (!FWA_OLDANTHARAS)
|
if (!FWA_OLDANTHARAS)
|
||||||
@@ -574,10 +538,9 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do spawn Behemoth or Bomber.
|
private class MinionsSpawn implements Runnable
|
||||||
private class MobsSpawn implements Runnable
|
|
||||||
{
|
{
|
||||||
public MobsSpawn()
|
public MinionsSpawn()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -608,7 +571,7 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
template1 = NpcTable.getInstance().getTemplate(npcId);
|
template1 = NpcTable.getInstance().getTemplate(npcId);
|
||||||
tempSpawn = new Spawn(template1);
|
tempSpawn = new Spawn(template1);
|
||||||
// allocates it at random in the lair of Antharas.
|
// Allocates it at random in the lair of Antharas.
|
||||||
int tried = 0;
|
int tried = 0;
|
||||||
boolean notFound = true;
|
boolean notFound = true;
|
||||||
int x = 175000;
|
int x = 175000;
|
||||||
@@ -672,7 +635,6 @@ public class Antharas extends Quest
|
|||||||
return super.onAggroRangeEnter(npc, player, isPet);
|
return super.onAggroRangeEnter(npc, player, isPet);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do self destruction.
|
|
||||||
private class SelfDestructionOfBomber implements Runnable
|
private class SelfDestructionOfBomber implements Runnable
|
||||||
{
|
{
|
||||||
private final NpcInstance _bomber;
|
private final NpcInstance _bomber;
|
||||||
@@ -742,23 +704,21 @@ public class Antharas extends Quest
|
|||||||
return super.onSpellFinished(npc, player, skill);
|
return super.onSpellFinished(npc, player, skill);
|
||||||
}
|
}
|
||||||
|
|
||||||
// At end of activity time.
|
|
||||||
protected class CheckActivity implements Runnable
|
protected class CheckActivity implements Runnable
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final Long temp = (Chronos.currentTimeMillis() - _LastAction);
|
final Long temp = (Chronos.currentTimeMillis() - _lastAction);
|
||||||
if (temp > (Config.ANTHARAS_DESPAWN_TIME * 60000))
|
if (temp > (Config.ANTHARAS_DESPAWN_TIME * 60000))
|
||||||
{
|
{
|
||||||
GrandBossManager.getInstance().setBossStatus(_antharas.getNpcId(), DORMANT);
|
GrandBossManager.getInstance().setBossStatus(_antharas.getNpcId(), DORMANT);
|
||||||
setUnspawn();
|
finishRaid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean Antharas's lair.
|
public void finishRaid()
|
||||||
public void setUnspawn()
|
|
||||||
{
|
{
|
||||||
// Eliminate players.
|
// Eliminate players.
|
||||||
_zone.oustAllPlayers();
|
_zone.oustAllPlayers();
|
||||||
@@ -822,7 +782,6 @@ public class Antharas extends Quest
|
|||||||
_teleportCube.clear();
|
_teleportCube.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do spawn teleport cube.
|
|
||||||
private class CubeSpawn implements Runnable
|
private class CubeSpawn implements Runnable
|
||||||
{
|
{
|
||||||
private final int _type;
|
private final int _type;
|
||||||
@@ -842,12 +801,11 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setUnspawn();
|
finishRaid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnLock Antharas.
|
|
||||||
private static class UnlockAntharas implements Runnable
|
private static class UnlockAntharas implements Runnable
|
||||||
{
|
{
|
||||||
private final int _bossId;
|
private final int _bossId;
|
||||||
@@ -871,7 +829,6 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action is enabled the boss.
|
|
||||||
private class SetMobilised implements Runnable
|
private class SetMobilised implements Runnable
|
||||||
{
|
{
|
||||||
private final GrandBossInstance _boss;
|
private final GrandBossInstance _boss;
|
||||||
@@ -895,7 +852,6 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move at random on after Antharas appears.
|
|
||||||
private static class MoveAtRandom implements Runnable
|
private static class MoveAtRandom implements Runnable
|
||||||
{
|
{
|
||||||
private final NpcInstance _npc;
|
private final NpcInstance _npc;
|
||||||
@@ -917,9 +873,9 @@ public class Antharas extends Quest
|
|||||||
@Override
|
@Override
|
||||||
public String onAttack(NpcInstance npc, PlayerInstance attacker, int damage, boolean isPet)
|
public String onAttack(NpcInstance npc, PlayerInstance attacker, int damage, boolean isPet)
|
||||||
{
|
{
|
||||||
if ((npc.getNpcId() == 29019) || (npc.getNpcId() == 29066) || (npc.getNpcId() == 29067) || (npc.getNpcId() == 29068))
|
if ((npc.getNpcId() == ANTHARAS_OLD) || (npc.getNpcId() == ANTHARAS_WEAK) || (npc.getNpcId() == ANTHARAS_NORMAL) || (npc.getNpcId() == ANTHARAS_STRONG))
|
||||||
{
|
{
|
||||||
_LastAction = Chronos.currentTimeMillis();
|
_lastAction = Chronos.currentTimeMillis();
|
||||||
if (!FWA_OLDANTHARAS && (_mobsSpawnTask == null))
|
if (!FWA_OLDANTHARAS && (_mobsSpawnTask == null))
|
||||||
{
|
{
|
||||||
startMinionSpawns(npc.getNpcId());
|
startMinionSpawns(npc.getNpcId());
|
||||||
@@ -946,7 +902,6 @@ public class Antharas extends Quest
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
npc.doCast(skill);
|
npc.doCast(skill);
|
||||||
}
|
}
|
||||||
return super.onAttack(npc, attacker, damage, isPet);
|
return super.onAttack(npc, attacker, damage, isPet);
|
||||||
@@ -955,27 +910,27 @@ public class Antharas extends Quest
|
|||||||
@Override
|
@Override
|
||||||
public String onKill(NpcInstance npc, PlayerInstance killer, boolean isPet)
|
public String onKill(NpcInstance npc, PlayerInstance killer, boolean isPet)
|
||||||
{
|
{
|
||||||
if ((npc.getNpcId() == 29019) || (npc.getNpcId() == 29066) || (npc.getNpcId() == 29067) || (npc.getNpcId() == 29068))
|
if ((npc.getNpcId() == ANTHARAS_OLD) || (npc.getNpcId() == ANTHARAS_WEAK) || (npc.getNpcId() == ANTHARAS_NORMAL) || (npc.getNpcId() == ANTHARAS_STRONG))
|
||||||
{
|
{
|
||||||
npc.broadcastPacket(new PlaySound(1, "BS01_D", npc));
|
npc.broadcastPacket(new PlaySound(1, "BS01_D", npc));
|
||||||
_cubeSpawnTask = ThreadPool.schedule(new CubeSpawn(0), 10000);
|
_cubeSpawnTask = ThreadPool.schedule(new CubeSpawn(0), 10000);
|
||||||
GrandBossManager.getInstance().setBossStatus(npc.getNpcId(), DEAD);
|
GrandBossManager.getInstance().setBossStatus(npc.getNpcId(), DEAD);
|
||||||
final long respawnTime = (Config.ANTHARAS_RESP_FIRST + Rnd.get(Config.ANTHARAS_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.ANTHARAS_RESP_FIRST + Rnd.get(Config.ANTHARAS_RESP_SECOND)) * 3600000;
|
||||||
ThreadPool.schedule(new UnlockAntharas(npc.getNpcId()), respawnTime);
|
ThreadPool.schedule(new UnlockAntharas(npc.getNpcId()), respawnTime);
|
||||||
// also save the respawn time so that the info is maintained past reboots
|
// Also save the respawn time so that the info is maintained past restarts.
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(npc.getNpcId());
|
final StatSet info = GrandBossManager.getInstance().getStatSet(npc.getNpcId());
|
||||||
info.set("respawn_time", (Chronos.currentTimeMillis() + respawnTime));
|
info.set("respawn_time", (Chronos.currentTimeMillis() + respawnTime));
|
||||||
GrandBossManager.getInstance().setStatSet(npc.getNpcId(), info);
|
GrandBossManager.getInstance().setStatSet(npc.getNpcId(), info);
|
||||||
}
|
}
|
||||||
else if (npc.getNpcId() == 29069)
|
else if (npc.getNpcId() == 29069)
|
||||||
{
|
{
|
||||||
final int countHPHerb = Rnd.get(6, 18);
|
final int hpHerbCount = Rnd.get(6, 18);
|
||||||
final int countMPHerb = Rnd.get(6, 18);
|
final int mpHerbCount = Rnd.get(6, 18);
|
||||||
for (int i = 0; i < countHPHerb; i++)
|
for (int i = 0; i < hpHerbCount; i++)
|
||||||
{
|
{
|
||||||
((MonsterInstance) npc).dropItem(killer, 8602, 1);
|
((MonsterInstance) npc).dropItem(killer, 8602, 1);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < countMPHerb; i++)
|
for (int i = 0; i < mpHerbCount; i++)
|
||||||
{
|
{
|
||||||
((MonsterInstance) npc).dropItem(killer, 8605, 1);
|
((MonsterInstance) npc).dropItem(killer, 8605, 1);
|
||||||
}
|
}
|
||||||
|
@@ -66,19 +66,14 @@ public class Baium extends Quest
|
|||||||
{
|
{
|
||||||
protected static final Logger LOGGER = Logger.getLogger(Baium.class.getName());
|
protected static final Logger LOGGER = Logger.getLogger(Baium.class.getName());
|
||||||
|
|
||||||
private Creature _target;
|
// Baium status.
|
||||||
private Skill _skill;
|
private static final byte ASLEEP = 0; // Baium is in the stone version, waiting to be woken up. Entry is unlocked.
|
||||||
|
private static final byte AWAKE = 1; // Baium is awake and fighting. Entry is locked.
|
||||||
|
private static final byte DEAD = 2; // Baium has been killed and has not yet spawned. Entry is locked.
|
||||||
private static final int STONE_BAIUM = 29025;
|
private static final int STONE_BAIUM = 29025;
|
||||||
private static final int ANGELIC_VORTEX = 31862;
|
private static final int ANGELIC_VORTEX = 31862;
|
||||||
private static final int LIVE_BAIUM = 29020;
|
private static final int LIVE_BAIUM = 29020;
|
||||||
private static final int ARCHANGEL = 29021;
|
private static final int ARCHANGEL = 29021;
|
||||||
|
|
||||||
// Baium status tracking,
|
|
||||||
private static final byte ASLEEP = 0; // baium is in the stone version, waiting to be woken up. Entry is unlocked,
|
|
||||||
private static final byte AWAKE = 1; // baium is awake and fighting. Entry is locked.
|
|
||||||
private static final byte DEAD = 2; // baium has been killed and has not yet spawned. Entry is locked,
|
|
||||||
|
|
||||||
// Archangel locations.
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
private static final int[][] ANGEL_LOCATION =
|
private static final int[][] ANGEL_LOCATION =
|
||||||
{
|
{
|
||||||
@@ -89,44 +84,42 @@ public class Baium extends Quest
|
|||||||
{115792, 16608, 10080, 0},
|
{115792, 16608, 10080, 0},
|
||||||
};
|
};
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
|
// Misc.
|
||||||
private long _lastAttackVsBaiumTime = 0;
|
private long _lastAttackVsBaiumTime = 0;
|
||||||
private final List<NpcInstance> _minions = new CopyOnWriteArrayList<>();
|
private final List<NpcInstance> _minions = new CopyOnWriteArrayList<>();
|
||||||
protected BossZone _zone;
|
private BossZone _zone;
|
||||||
|
private Creature _target;
|
||||||
|
private Skill _skill;
|
||||||
|
|
||||||
public Baium()
|
public Baium()
|
||||||
{
|
{
|
||||||
super(-1, "ai/bosses");
|
super(-1, "ai/bosses");
|
||||||
|
|
||||||
final int[] mob =
|
registerMobs(LIVE_BAIUM);
|
||||||
{
|
|
||||||
LIVE_BAIUM
|
|
||||||
};
|
|
||||||
registerMobs(mob);
|
|
||||||
|
|
||||||
// Quest NPC starter initialization
|
// Quest NPC starter initialization
|
||||||
addStartNpc(STONE_BAIUM);
|
addStartNpc(STONE_BAIUM);
|
||||||
addStartNpc(ANGELIC_VORTEX);
|
addStartNpc(ANGELIC_VORTEX);
|
||||||
addTalkId(STONE_BAIUM);
|
addTalkId(STONE_BAIUM);
|
||||||
addTalkId(ANGELIC_VORTEX);
|
addTalkId(ANGELIC_VORTEX);
|
||||||
|
|
||||||
_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
|
_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
|
||||||
|
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(LIVE_BAIUM);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(LIVE_BAIUM);
|
||||||
final Integer status = GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM);
|
final Integer status = GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM);
|
||||||
if (status == DEAD)
|
if (status == DEAD)
|
||||||
{
|
{
|
||||||
// load the unlock date and time for baium from DB
|
// Load the unlock date and time for baium from DB.
|
||||||
final long temp = (info.getLong("respawn_time") - Chronos.currentTimeMillis());
|
final long temp = (info.getLong("respawn_time") - Chronos.currentTimeMillis());
|
||||||
if (temp > 0)
|
if (temp > 0)
|
||||||
{
|
{
|
||||||
// the unlock time has not yet expired. Mark Baium as currently locked (dead). Setup a timer
|
// The unlock time has not yet expired. Mark Baium as currently locked (dead).
|
||||||
// to fire at the correct time (calculate the time between now and the unlock time,
|
// Setup a timer to fire at the correct time (calculate the time between now and the unlock time, setup a timer to fire after that many msec).
|
||||||
// setup a timer to fire after that many msec)
|
|
||||||
startQuestTimer("baium_unlock", temp, null, null);
|
startQuestTimer("baium_unlock", temp, null, null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// the time has already expired while the server was offline. Delete the saved time and
|
// The time has already expired while the server was offline. Delete the saved time and immediately spawn the stone-baium. Also the state need not be changed from ASLEEP.
|
||||||
// immediately spawn the stone-baium. Also the state need not be changed from ASLEEP
|
|
||||||
addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0);
|
addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0);
|
||||||
if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
|
if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
|
||||||
{
|
{
|
||||||
@@ -137,13 +130,13 @@ public class Baium extends Quest
|
|||||||
}
|
}
|
||||||
else if (status == AWAKE)
|
else if (status == AWAKE)
|
||||||
{
|
{
|
||||||
final int loc_x = info.getInt("loc_x");
|
final int x = info.getInt("loc_x");
|
||||||
final int loc_y = info.getInt("loc_y");
|
final int y = info.getInt("loc_y");
|
||||||
final int loc_z = info.getInt("loc_z");
|
final int z = info.getInt("loc_z");
|
||||||
final int heading = info.getInt("heading");
|
final int heading = info.getInt("heading");
|
||||||
final int hp = info.getInt("currentHP");
|
final int hp = info.getInt("currentHP");
|
||||||
final int mp = info.getInt("currentMP");
|
final int mp = info.getInt("currentMP");
|
||||||
final GrandBossInstance baium = (GrandBossInstance) addSpawn(LIVE_BAIUM, loc_x, loc_y, loc_z, heading, false, 0);
|
final GrandBossInstance baium = (GrandBossInstance) addSpawn(LIVE_BAIUM, x, y, z, heading, false, 0);
|
||||||
if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
|
if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
|
||||||
{
|
{
|
||||||
AnnouncementsTable.getInstance().announceToAll("Raid boss " + baium.getName() + " spawned in world.");
|
AnnouncementsTable.getInstance().announceToAll("Raid boss " + baium.getName() + " spawned in world.");
|
||||||
@@ -163,7 +156,7 @@ public class Baium extends Quest
|
|||||||
{
|
{
|
||||||
LOGGER.warning(e.getMessage());
|
LOGGER.warning(e.getMessage());
|
||||||
}
|
}
|
||||||
}, 100L);
|
}, 100);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -201,7 +194,8 @@ public class Baium extends Quest
|
|||||||
{
|
{
|
||||||
npc.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
|
npc.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
|
||||||
npc.broadcastPacket(new Earthquake(npc.getX(), npc.getY(), npc.getZ(), 40, 5));
|
npc.broadcastPacket(new Earthquake(npc.getX(), npc.getY(), npc.getZ(), 40, 5));
|
||||||
// start monitoring baium's inactivity
|
|
||||||
|
// Start monitoring baium's inactivity.
|
||||||
_lastAttackVsBaiumTime = Chronos.currentTimeMillis();
|
_lastAttackVsBaiumTime = Chronos.currentTimeMillis();
|
||||||
startQuestTimer("baium_despawn", 60000, npc, null, true);
|
startQuestTimer("baium_despawn", 60000, npc, null, true);
|
||||||
if (player != null)
|
if (player != null)
|
||||||
@@ -227,9 +221,8 @@ public class Baium extends Quest
|
|||||||
{
|
{
|
||||||
LOGGER.warning(e.getMessage());
|
LOGGER.warning(e.getMessage());
|
||||||
}
|
}
|
||||||
}, 11100L);
|
}, 11100);
|
||||||
// TODO: the person who woke baium up should be knocked across the room, onto a wall, and
|
// TODO: the person who woke baium up should be knocked across the room, onto a wall, and lose massive amounts of HP.
|
||||||
// lose massive amounts of HP.
|
|
||||||
for (int[] element : ANGEL_LOCATION)
|
for (int[] element : ANGEL_LOCATION)
|
||||||
{
|
{
|
||||||
final MonsterInstance angel = (MonsterInstance) addSpawn(ARCHANGEL, element[0], element[1], element[2], element[3], false, 0);
|
final MonsterInstance angel = (MonsterInstance) addSpawn(ARCHANGEL, element[0], element[1], element[2], element[3], false, 0);
|
||||||
@@ -239,21 +232,20 @@ public class Baium extends Quest
|
|||||||
angel.isAggressive();
|
angel.isAggressive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// despawn the live baium after 30 minutes of inactivity
|
|
||||||
// also check if the players are cheating, having pulled Baium outside his zone...
|
|
||||||
}
|
}
|
||||||
else if (event.equals("baium_despawn") && (npc != null))
|
else if (event.equals("baium_despawn") && (npc != null))
|
||||||
{
|
{
|
||||||
|
// Despawn the live baium after 30 minutes of inactivity also check if the players are cheating, having pulled Baium outside his zone...
|
||||||
if (npc.getNpcId() == LIVE_BAIUM)
|
if (npc.getNpcId() == LIVE_BAIUM)
|
||||||
{
|
{
|
||||||
// just in case the zone reference has been lost (somehow...), restore the reference
|
// Just in case the zone reference has been lost (somehow...), restore the reference.
|
||||||
if (_zone == null)
|
if (_zone == null)
|
||||||
{
|
{
|
||||||
_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
|
_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
|
||||||
}
|
}
|
||||||
if ((_lastAttackVsBaiumTime + (Config.BAIUM_SLEEP * 1000)) < Chronos.currentTimeMillis())
|
if ((_lastAttackVsBaiumTime + (Config.BAIUM_SLEEP * 1000)) < Chronos.currentTimeMillis())
|
||||||
{
|
{
|
||||||
npc.deleteMe(); // despawn the live-baium
|
npc.deleteMe(); // Despawn the live-baium.
|
||||||
for (NpcInstance minion : _minions)
|
for (NpcInstance minion : _minions)
|
||||||
{
|
{
|
||||||
if (minion != null)
|
if (minion != null)
|
||||||
@@ -263,8 +255,8 @@ public class Baium extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
_minions.clear();
|
_minions.clear();
|
||||||
addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0); // spawn stone-baium
|
addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0); // Spawn stone-baium.
|
||||||
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP); // mark that Baium is not awake any more
|
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP); // Mark that Baium is not awake any more.
|
||||||
_zone.oustAllPlayers();
|
_zone.oustAllPlayers();
|
||||||
cancelQuestTimer("baium_despawn", npc, null);
|
cancelQuestTimer("baium_despawn", npc, null);
|
||||||
}
|
}
|
||||||
@@ -301,8 +293,7 @@ public class Baium extends Quest
|
|||||||
{
|
{
|
||||||
if (Config.ALLOW_DIRECT_TP_TO_BOSS_ROOM || _zone.isPlayerAllowed(player))
|
if (Config.ALLOW_DIRECT_TP_TO_BOSS_ROOM || _zone.isPlayerAllowed(player))
|
||||||
{
|
{
|
||||||
// once Baium is awaken, no more people may enter until he dies, the server reboots, or
|
// Once Baium is awaken, no more people may enter until he dies, the server reboots, or 30 minutes pass with no attacks made against Baium.
|
||||||
// 30 minutes pass with no attacks made against Baium.
|
|
||||||
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, AWAKE);
|
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, AWAKE);
|
||||||
npc.deleteMe();
|
npc.deleteMe();
|
||||||
final GrandBossInstance baium = (GrandBossInstance) addSpawn(LIVE_BAIUM, npc);
|
final GrandBossInstance baium = (GrandBossInstance) addSpawn(LIVE_BAIUM, npc);
|
||||||
@@ -325,21 +316,20 @@ public class Baium extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
htmltext = "Conditions are not right to wake up Baium";
|
htmltext = "Conditions are not right to wake up Baium.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (npcId == ANGELIC_VORTEX)
|
else if (npcId == ANGELIC_VORTEX)
|
||||||
{
|
{
|
||||||
if (player.isFlying())
|
if (player.isFlying())
|
||||||
{
|
{
|
||||||
// print "Player "+player.getName()+" attempted to enter Baium's lair while flying!";
|
return "<html><body>Angelic Vortex:<br>You may not enter while flying a wyvern.</body></html>";
|
||||||
return "<html><body>Angelic Vortex:<br>You may not enter while flying a wyvern</body></html>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((status == ASLEEP) && (player.getQuestState(getName()).getQuestItemsCount(4295) > 0)) // bloody fabric
|
if ((status == ASLEEP) && (player.getQuestState(getName()).getQuestItemsCount(4295) > 0)) // Bloody fabric.
|
||||||
{
|
{
|
||||||
player.getQuestState(getName()).takeItems(4295, 1);
|
player.getQuestState(getName()).takeItems(4295, 1);
|
||||||
// allow entry for the player for the next 30 secs (more than enough time for the TP to happen)
|
// Allow entry for the player for the next 30 secs (more than enough time for the TP to happen).
|
||||||
// Note: this just means 30secs to get in, no limits on how long it takes before we get out.
|
// Note: this just means 30secs to get in, no limits on how long it takes before we get out.
|
||||||
_zone.allowPlayerEntry(player, 30);
|
_zone.allowPlayerEntry(player, 30);
|
||||||
player.teleToLocation(113100, 14500, 10077);
|
player.teleToLocation(113100, 14500, 10077);
|
||||||
@@ -398,7 +388,7 @@ public class Baium extends Quest
|
|||||||
npc.doCast(SkillTable.getInstance().getSkill(4258, 1));
|
npc.doCast(SkillTable.getInstance().getSkill(4258, 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// update a variable with the last action against baium
|
// Update a variable with the last action against Baium.
|
||||||
_lastAttackVsBaiumTime = Chronos.currentTimeMillis();
|
_lastAttackVsBaiumTime = Chronos.currentTimeMillis();
|
||||||
callSkillAI(npc);
|
callSkillAI(npc);
|
||||||
}
|
}
|
||||||
@@ -410,13 +400,13 @@ public class Baium extends Quest
|
|||||||
{
|
{
|
||||||
npc.broadcastPacket(new PlaySound(1, "BS01_D", npc));
|
npc.broadcastPacket(new PlaySound(1, "BS01_D", npc));
|
||||||
cancelQuestTimer("baium_despawn", npc, null);
|
cancelQuestTimer("baium_despawn", npc, null);
|
||||||
// spawn the "Teleportation Cubic" for 15 minutes (to allow players to exit the lair)
|
// Spawn the "Teleportation Cubic" for 15 minutes (to allow players to exit the lair).
|
||||||
addSpawn(29055, 115203, 16620, 10078, 0, false, 900000); // //should we teleport everyone out if the cubic despawns??
|
addSpawn(29055, 115203, 16620, 10078, 0, false, 900000); // Should we teleport everyone out if the cubic despawns??
|
||||||
// "lock" baium for 5 days and 1 to 8 hours [i.e. 432,000,000 + 1*3,600,000 + random-less-than(8*3,600,000) millisecs]
|
// Lock baium for 5 days and 1 to 8 hours [i.e. 432,000,000 + 1*3,600,000 + random-less-than(8*3,600,000) millisecs]
|
||||||
final long respawnTime = (Config.BAIUM_RESP_FIRST + Rnd.get(Config.BAIUM_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.BAIUM_RESP_FIRST + Rnd.get(Config.BAIUM_RESP_SECOND)) * 3600000;
|
||||||
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, DEAD);
|
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, DEAD);
|
||||||
startQuestTimer("baium_unlock", respawnTime, null, null);
|
startQuestTimer("baium_unlock", respawnTime, null, null);
|
||||||
// also save the respawn time so that the info is maintained past reboots
|
// Also save the respawn time so that the info is maintained past reboots.
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(LIVE_BAIUM);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(LIVE_BAIUM);
|
||||||
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
||||||
GrandBossManager.getInstance().setStatSet(LIVE_BAIUM, info);
|
GrandBossManager.getInstance().setStatSet(LIVE_BAIUM, info);
|
||||||
@@ -482,7 +472,7 @@ public class Baium extends Quest
|
|||||||
}
|
}
|
||||||
startQuestTimer("clean_player", 20000, npc, null);
|
startQuestTimer("clean_player", 20000, npc, null);
|
||||||
|
|
||||||
return result.get(Rnd.get(result.size()));
|
return getRandomEntry(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void callSkillAI(NpcInstance npc)
|
public synchronized void callSkillAI(NpcInstance npc)
|
||||||
|
@@ -75,12 +75,11 @@ public class Core extends Quest
|
|||||||
MINNION_SPAWNS.put(SUSCEPTOR, new Location(17706, 109423, -6488));
|
MINNION_SPAWNS.put(SUSCEPTOR, new Location(17706, 109423, -6488));
|
||||||
MINNION_SPAWNS.put(SUSCEPTOR, new Location(17849, 109388, -6480));
|
MINNION_SPAWNS.put(SUSCEPTOR, new Location(17849, 109388, -6480));
|
||||||
}
|
}
|
||||||
// Misc
|
// Status.
|
||||||
private static final byte ALIVE = 0;
|
private static final byte ALIVE = 0;
|
||||||
private static final byte DEAD = 1;
|
private static final byte DEAD = 1;
|
||||||
|
// Misc.
|
||||||
private static boolean _firstAttacked;
|
private static boolean _firstAttacked;
|
||||||
|
|
||||||
private static final Collection<Attackable> _minions = ConcurrentHashMap.newKeySet();
|
private static final Collection<Attackable> _minions = ConcurrentHashMap.newKeySet();
|
||||||
|
|
||||||
public Core()
|
public Core()
|
||||||
@@ -149,7 +148,7 @@ public class Core extends Quest
|
|||||||
{
|
{
|
||||||
GrandBossManager.getInstance().addBoss(npc);
|
GrandBossManager.getInstance().addBoss(npc);
|
||||||
npc.broadcastPacket(new PlaySound(1, "BS01_A", npc));
|
npc.broadcastPacket(new PlaySound(1, "BS01_A", npc));
|
||||||
// Spawn minions
|
// Spawn minions.
|
||||||
Attackable mob;
|
Attackable mob;
|
||||||
Location spawnLocation;
|
Location spawnLocation;
|
||||||
for (Entry<Integer, Location> spawn : MINNION_SPAWNS.entrySet())
|
for (Entry<Integer, Location> spawn : MINNION_SPAWNS.entrySet())
|
||||||
|
@@ -85,16 +85,9 @@ public class Orfen extends Quest
|
|||||||
}
|
}
|
||||||
case LIVE:
|
case LIVE:
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* int loc_x = info.getInteger("loc_x"); int loc_y = info.getInteger("loc_y"); int loc_z = info.getInteger("loc_z"); int heading = info.getInteger("heading");
|
|
||||||
*/
|
|
||||||
final int loc_x = 55024;
|
|
||||||
final int loc_y = 17368;
|
|
||||||
final int loc_z = -5412;
|
|
||||||
final int heading = 0;
|
|
||||||
final int hp = info.getInt("currentHP");
|
final int hp = info.getInt("currentHP");
|
||||||
final int mp = info.getInt("currentMP");
|
final int mp = info.getInt("currentMP");
|
||||||
_orfen = (GrandBossInstance) addSpawn(ORFEN, loc_x, loc_y, loc_z, heading, false, 0);
|
_orfen = (GrandBossInstance) addSpawn(ORFEN, 55024, 17368, -5412, 0, false, 0);
|
||||||
if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
|
if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
|
||||||
{
|
{
|
||||||
AnnouncementsTable.getInstance().announceToAll("Raid boss " + _orfen.getName() + " spawned in world.");
|
AnnouncementsTable.getInstance().announceToAll("Raid boss " + _orfen.getName() + " spawned in world.");
|
||||||
@@ -166,7 +159,8 @@ public class Orfen extends Quest
|
|||||||
startQuestTimer("ORFEN_RETURN", 10000, npc, null);
|
startQuestTimer("ORFEN_RETURN", 10000, npc, null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // restart the refresh scheduling
|
{
|
||||||
|
// Restart the refresh scheduling.
|
||||||
startQuestTimer("ORFEN_REFRESH", 10000, npc, null);
|
startQuestTimer("ORFEN_REFRESH", 10000, npc, null);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -236,11 +230,11 @@ public class Orfen extends Quest
|
|||||||
{
|
{
|
||||||
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
||||||
GrandBossManager.getInstance().setBossStatus(ORFEN, DEAD);
|
GrandBossManager.getInstance().setBossStatus(ORFEN, DEAD);
|
||||||
// time is 48hour +/- 20hour
|
// Time is 48hour +/- 20hour.
|
||||||
final long respawnTime = (Config.ORFEN_RESP_FIRST + Rnd.get(Config.ORFEN_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.ORFEN_RESP_FIRST + Rnd.get(Config.ORFEN_RESP_SECOND)) * 3600000;
|
||||||
cancelQuestTimer("ORFEN_REFRESH", npc, null);
|
cancelQuestTimer("ORFEN_REFRESH", npc, null);
|
||||||
startQuestTimer("ORFEN_SPAWN", respawnTime, null, null);
|
startQuestTimer("ORFEN_SPAWN", respawnTime, null, null);
|
||||||
// also save the respawn time so that the info is maintained past reboots
|
// Also save the respawn time so that the info is maintained past restarts.
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(ORFEN);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(ORFEN);
|
||||||
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
||||||
GrandBossManager.getInstance().setStatSet(ORFEN, info);
|
GrandBossManager.getInstance().setStatSet(ORFEN, info);
|
||||||
|
@@ -34,24 +34,21 @@ import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
|||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.quest.EventType;
|
import org.l2jmobius.gameserver.model.quest.EventType;
|
||||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||||
import org.l2jmobius.gameserver.model.zone.type.BossZone;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||||
|
|
||||||
public class QueenAnt extends Quest
|
public class QueenAnt extends Quest
|
||||||
{
|
{
|
||||||
|
// Queen Ant status
|
||||||
|
private static final int LIVE = 0; // Queen Ant is spawned.
|
||||||
|
private static final int DEAD = 1; // Queen Ant has been killed.
|
||||||
|
// NPCs
|
||||||
private static final int QUEEN = 29001;
|
private static final int QUEEN = 29001;
|
||||||
private static final int LARVA = 29002;
|
private static final int LARVA = 29002;
|
||||||
private static final int NURSE = 29003;
|
private static final int NURSE = 29003;
|
||||||
private static final int GUARD = 29004;
|
private static final int GUARD = 29004;
|
||||||
private static final int ROYAL = 29005;
|
private static final int ROYAL = 29005;
|
||||||
|
// Misc
|
||||||
// QUEEN Status Tracking :
|
|
||||||
private static final int LIVE = 0; // Queen Ant is spawned.
|
|
||||||
private static final int DEAD = 1; // Queen Ant has been killed.
|
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
private static BossZone _zone;
|
|
||||||
private MonsterInstance _larva = null;
|
private MonsterInstance _larva = null;
|
||||||
private MonsterInstance _queen = null;
|
private MonsterInstance _queen = null;
|
||||||
private final List<MonsterInstance> _minions = new CopyOnWriteArrayList<>();
|
private final List<MonsterInstance> _minions = new CopyOnWriteArrayList<>();
|
||||||
@@ -59,7 +56,7 @@ public class QueenAnt extends Quest
|
|||||||
|
|
||||||
enum Event
|
enum Event
|
||||||
{
|
{
|
||||||
QUEEN_SPAWN, /* CHECK_QA_ZONE, */
|
QUEEN_SPAWN,
|
||||||
CHECK_MINIONS_ZONE,
|
CHECK_MINIONS_ZONE,
|
||||||
CHECK_NURSE_ALIVE,
|
CHECK_NURSE_ALIVE,
|
||||||
ACTION,
|
ACTION,
|
||||||
@@ -90,8 +87,6 @@ public class QueenAnt extends Quest
|
|||||||
addEventId(mob, EventType.ON_ATTACK);
|
addEventId(mob, EventType.ON_ATTACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
_zone = GrandBossManager.getInstance().getZone(-21610, 181594, -5734);
|
|
||||||
|
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(QUEEN);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(QUEEN);
|
||||||
final Integer status = GrandBossManager.getInstance().getBossStatus(QUEEN);
|
final Integer status = GrandBossManager.getInstance().getBossStatus(QUEEN);
|
||||||
|
|
||||||
@@ -115,13 +110,10 @@ public class QueenAnt extends Quest
|
|||||||
GrandBossManager.getInstance().addBoss(queen);
|
GrandBossManager.getInstance().addBoss(queen);
|
||||||
spawnBoss(queen);
|
spawnBoss(queen);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case LIVE:
|
case LIVE:
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* int loc_x = info.getInteger("loc_x"); int loc_y = info.getInteger("loc_y"); int loc_z = info.getInteger("loc_z"); int heading = info.getInteger("heading");
|
|
||||||
*/
|
|
||||||
final int hp = info.getInt("currentHP");
|
final int hp = info.getInt("currentHP");
|
||||||
final int mp = info.getInt("currentMP");
|
final int mp = info.getInt("currentMP");
|
||||||
final GrandBossInstance queen = (GrandBossInstance) addSpawn(QUEEN, -21610, 181594, -5734, 0, false, 0);
|
final GrandBossInstance queen = (GrandBossInstance) addSpawn(QUEEN, -21610, 181594, -5734, 0, false, 0);
|
||||||
@@ -132,8 +124,8 @@ public class QueenAnt extends Quest
|
|||||||
GrandBossManager.getInstance().addBoss(queen);
|
GrandBossManager.getInstance().addBoss(queen);
|
||||||
queen.setCurrentHpMp(hp, mp);
|
queen.setCurrentHpMp(hp, mp);
|
||||||
spawnBoss(queen);
|
spawnBoss(queen);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
final GrandBossInstance queen = (GrandBossInstance) addSpawn(QUEEN, -21610, 181594, -5734, 0, false, 0);
|
final GrandBossInstance queen = (GrandBossInstance) addSpawn(QUEEN, -21610, 181594, -5734, 0, false, 0);
|
||||||
@@ -144,6 +136,7 @@ public class QueenAnt extends Quest
|
|||||||
GrandBossManager.getInstance().setBossStatus(QUEEN, LIVE);
|
GrandBossManager.getInstance().setBossStatus(QUEEN, LIVE);
|
||||||
GrandBossManager.getInstance().addBoss(queen);
|
GrandBossManager.getInstance().addBoss(queen);
|
||||||
spawnBoss(queen);
|
spawnBoss(queen);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -365,7 +358,7 @@ public class QueenAnt extends Quest
|
|||||||
{
|
{
|
||||||
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
||||||
GrandBossManager.getInstance().setBossStatus(QUEEN, DEAD);
|
GrandBossManager.getInstance().setBossStatus(QUEEN, DEAD);
|
||||||
// time is 36hour +/- 17hour
|
// Time is 36hour +/- 17hour.
|
||||||
final long respawnTime = (Config.QA_RESP_FIRST + Rnd.get(Config.QA_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.QA_RESP_FIRST + Rnd.get(Config.QA_RESP_SECOND)) * 3600000;
|
||||||
startQuestTimer("QUEEN_SPAWN", respawnTime, null, null);
|
startQuestTimer("QUEEN_SPAWN", respawnTime, null, null);
|
||||||
startQuestTimer("LARVA_DESPAWN", 4 * 60 * 60 * 1000, null, null);
|
startQuestTimer("LARVA_DESPAWN", 4 * 60 * 60 * 1000, null, null);
|
||||||
@@ -375,7 +368,7 @@ public class QueenAnt extends Quest
|
|||||||
cancelQuestTimer("CHECK_NURSE_ALIVE", npc, null);
|
cancelQuestTimer("CHECK_NURSE_ALIVE", npc, null);
|
||||||
cancelQuestTimer("HEAL", null, null);
|
cancelQuestTimer("HEAL", null, null);
|
||||||
// cancelQuestTimer("CHECK_QA_ZONE", npc, null);
|
// cancelQuestTimer("CHECK_QA_ZONE", npc, null);
|
||||||
// also save the respawn time so that the info is maintained past reboots
|
// Also save the respawn time so that the info is maintained past restarts.
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(QUEEN);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(QUEEN);
|
||||||
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
||||||
GrandBossManager.getInstance().setStatSet(QUEEN, info);
|
GrandBossManager.getInstance().setStatSet(QUEEN, info);
|
||||||
|
@@ -50,40 +50,35 @@ import org.l2jmobius.gameserver.util.Util;
|
|||||||
*/
|
*/
|
||||||
public class Valakas extends Quest
|
public class Valakas extends Quest
|
||||||
{
|
{
|
||||||
|
// Valakas status
|
||||||
|
private static final byte DORMANT = 0; // Valakas is spawned and no one has entered yet. Entry is unlocked.
|
||||||
|
private static final byte WAITING = 1; // Valakas is spawend and someone has entered, triggering a 30 minute window for additional people to enter before he unleashes his attack. Entry is unlocked.
|
||||||
|
private static final byte FIGHTING = 2; // Valakas is engaged in battle, annihilating his foes. Entry is locked.
|
||||||
|
private static final byte DEAD = 3; // Valakas has been killed. Entry is locked.
|
||||||
|
// NPC
|
||||||
|
private static final int VALAKAS = 29028;
|
||||||
|
// Misc
|
||||||
private int i_ai0 = 0;
|
private int i_ai0 = 0;
|
||||||
private int i_ai1 = 0;
|
private int i_ai1 = 0;
|
||||||
private int i_ai2 = 0;
|
private int i_ai2 = 0;
|
||||||
private int i_ai3 = 0;
|
private int i_ai3 = 0;
|
||||||
private int i_ai4 = 0;
|
private int i_ai4 = 0;
|
||||||
private int i_quest0 = 0;
|
private int i_quest0 = 0;
|
||||||
private long lastAttackTime = 0; // time to tracking valakas when was last time attacked
|
private long lastAttackTime = 0; // Time to tracking valakas when was last time attacked.
|
||||||
private int i_quest2 = 0; // hate value for 1st player
|
private int i_quest2 = 0; // Hate value for 1st player.
|
||||||
private int i_quest3 = 0; // hate value for 2nd player
|
private int i_quest3 = 0; // Hate value for 2nd player.
|
||||||
private int i_quest4 = 0; // hate value for 3rd player
|
private int i_quest4 = 0; // Hate value for 3rd player.
|
||||||
private Creature c_quest2 = null; // 1st most hated target
|
private Creature c_quest2 = null; // 1st most hated target.
|
||||||
private Creature c_quest3 = null; // 2nd most hated target
|
private Creature c_quest3 = null; // 2nd most hated target.
|
||||||
private Creature c_quest4 = null; // 3rd most hated target
|
private Creature c_quest4 = null; // 3rd most hated target.
|
||||||
|
private static BossZone _zone;
|
||||||
|
|
||||||
private static final int VALAKAS = 29028;
|
|
||||||
|
|
||||||
// Valakas Status Tracking :
|
|
||||||
private static final byte DORMANT = 0; // Valakas is spawned and no one has entered yet. Entry is unlocked
|
|
||||||
private static final byte WAITING = 1; // Valakas is spawend and someone has entered, triggering a 30 minute window for additional people to enter
|
|
||||||
// before he unleashes his attack. Entry is unlocked
|
|
||||||
private static final byte FIGHTING = 2; // Valakas is engaged in battle, annihilating his foes. Entry is locked
|
|
||||||
private static final byte DEAD = 3; // Valakas has been killed. Entry is locked
|
|
||||||
|
|
||||||
private static BossZone _Zone;
|
|
||||||
|
|
||||||
// Boss: Valakas
|
|
||||||
public Valakas()
|
public Valakas()
|
||||||
{
|
{
|
||||||
super(-1, "ai/bosses");
|
super(-1, "ai/bosses");
|
||||||
final int[] mob =
|
|
||||||
{
|
registerMobs(VALAKAS);
|
||||||
VALAKAS
|
|
||||||
};
|
|
||||||
registerMobs(mob);
|
|
||||||
i_ai0 = 0;
|
i_ai0 = 0;
|
||||||
i_ai1 = 0;
|
i_ai1 = 0;
|
||||||
i_ai2 = 0;
|
i_ai2 = 0;
|
||||||
@@ -91,38 +86,33 @@ public class Valakas extends Quest
|
|||||||
i_ai4 = 0;
|
i_ai4 = 0;
|
||||||
i_quest0 = 0;
|
i_quest0 = 0;
|
||||||
lastAttackTime = Chronos.currentTimeMillis();
|
lastAttackTime = Chronos.currentTimeMillis();
|
||||||
_Zone = GrandBossManager.getInstance().getZone(212852, -114842, -1632);
|
_zone = GrandBossManager.getInstance().getZone(212852, -114842, -1632);
|
||||||
|
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(VALAKAS);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(VALAKAS);
|
||||||
final Integer status = GrandBossManager.getInstance().getBossStatus(VALAKAS);
|
final Integer status = GrandBossManager.getInstance().getBossStatus(VALAKAS);
|
||||||
if (status == DEAD)
|
if (status == DEAD)
|
||||||
{
|
{
|
||||||
// load the unlock date and time for valakas from DB
|
// Load the unlock date and time for valakas from DB.
|
||||||
final long temp = (info.getLong("respawn_time") - Chronos.currentTimeMillis());
|
final long temp = (info.getLong("respawn_time") - Chronos.currentTimeMillis());
|
||||||
// if valakas is locked until a certain time, mark it so and start the unlock timer
|
// If valakas is locked until a certain time, mark it so and start the unlock timer the unlock time has not yet expired.
|
||||||
// the unlock time has not yet expired. Mark valakas as currently locked. Setup a timer
|
// Mark valakas as currently locked. Setup a timer to fire at the correct time (calculate the time between now and the unlock time, setup a timer to fire after that many msec).
|
||||||
// to fire at the correct time (calculate the time between now and the unlock time,
|
|
||||||
// setup a timer to fire after that many msec)
|
|
||||||
if (temp > 0)
|
if (temp > 0)
|
||||||
{
|
{
|
||||||
startQuestTimer("valakas_unlock", temp, null, null);
|
startQuestTimer("valakas_unlock", temp, null, null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// the time has already expired while the server was offline.
|
// The time has already expired while the server was offline.
|
||||||
// the status needs to be changed to DORMANT
|
// The status needs to be changed to DORMANT.
|
||||||
GrandBossManager.getInstance().setBossStatus(VALAKAS, DORMANT);
|
GrandBossManager.getInstance().setBossStatus(VALAKAS, DORMANT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (status == FIGHTING)
|
else if (status == FIGHTING)
|
||||||
{
|
{
|
||||||
// respawn to original location
|
// Respawn to original location.
|
||||||
final int loc_x = 213004;
|
|
||||||
final int loc_y = -114890;
|
|
||||||
final int loc_z = -1595;
|
|
||||||
final int heading = 0;
|
|
||||||
final int hp = info.getInt("currentHP");
|
final int hp = info.getInt("currentHP");
|
||||||
final int mp = info.getInt("currentMP");
|
final int mp = info.getInt("currentMP");
|
||||||
final GrandBossInstance valakas = (GrandBossInstance) addSpawn(VALAKAS, loc_x, loc_y, loc_z, heading, false, 0);
|
final GrandBossInstance valakas = (GrandBossInstance) addSpawn(VALAKAS, 213004, -114890, -1595, 0, false, 0);
|
||||||
GrandBossManager.getInstance().addBoss(valakas);
|
GrandBossManager.getInstance().addBoss(valakas);
|
||||||
ThreadPool.schedule(() ->
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
@@ -134,18 +124,18 @@ public class Valakas extends Quest
|
|||||||
catch (Throwable e)
|
catch (Throwable e)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}, 100L);
|
}, 100);
|
||||||
|
|
||||||
startQuestTimer("launch_random_skill", 60000, valakas, null, true);
|
startQuestTimer("launch_random_skill", 60000, valakas, null, true);
|
||||||
// Start repeating timer to check for inactivity
|
// Start repeating timer to check for inactivity.
|
||||||
startQuestTimer("check_activity_and_do_actions", 60000, valakas, null, true);
|
startQuestTimer("check_activity_and_do_actions", 60000, valakas, null, true);
|
||||||
}
|
}
|
||||||
else if (status == WAITING)
|
else if (status == WAITING)
|
||||||
{
|
{
|
||||||
// Start timer to lock entry after 30 minutes and spawn valakas
|
// Start timer to lock entry after 30 minutes and spawn Valakas.
|
||||||
startQuestTimer("lock_entry_and_spawn_valakas", (Config.VALAKAS_WAIT_TIME * 60000), null, null);
|
startQuestTimer("lock_entry_and_spawn_valakas", (Config.VALAKAS_WAIT_TIME * 60000), null, null);
|
||||||
} // if it was dormant, just leave it as it was:
|
}
|
||||||
// the valakas NPC is not spawned yet and his instance is not loaded
|
// If it was dormant, just leave it as it was. The valakas NPC is not spawned yet and his instance is not loaded.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -153,174 +143,193 @@ public class Valakas extends Quest
|
|||||||
{
|
{
|
||||||
if (npc != null)
|
if (npc != null)
|
||||||
{
|
{
|
||||||
long temp = 0;
|
switch (event)
|
||||||
if (event.equals("check_activity_and_do_actions"))
|
|
||||||
{
|
{
|
||||||
int level = 0;
|
case "check_activity_and_do_actions":
|
||||||
int sk4691 = 0;
|
|
||||||
for (Effect e : npc.getAllEffects())
|
|
||||||
{
|
{
|
||||||
if (e.getSkill().getId() == 4629)
|
int level = 0;
|
||||||
|
int sk4691 = 0;
|
||||||
|
for (Effect e : npc.getAllEffects())
|
||||||
{
|
{
|
||||||
sk4691 = 1;
|
if (e.getSkill().getId() == 4629)
|
||||||
level = e.getSkill().getLevel();
|
{
|
||||||
break;
|
sk4691 = 1;
|
||||||
|
level = e.getSkill().getLevel();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
final Integer status = GrandBossManager.getInstance().getBossStatus(VALAKAS);
|
||||||
|
if ((status == FIGHTING) && ((Chronos.currentTimeMillis() - lastAttackTime) > (Config.VALAKAS_DESPAWN_TIME * 60000))) // 15 mins by default.
|
||||||
final Integer status = GrandBossManager.getInstance().getBossStatus(VALAKAS);
|
{
|
||||||
temp = (Chronos.currentTimeMillis() - lastAttackTime);
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||||
if ((status == FIGHTING) && (temp > (Config.VALAKAS_DESPAWN_TIME * 60000))) // 15 mins by default
|
|
||||||
{
|
// delete the actual boss
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
final GrandBossInstance boss = GrandBossManager.getInstance().deleteBoss(VALAKAS);
|
||||||
|
boss.decayMe();
|
||||||
// delete the actual boss
|
GrandBossManager.getInstance().setBossStatus(VALAKAS, DORMANT);
|
||||||
final GrandBossInstance boss = GrandBossManager.getInstance().deleteBoss(VALAKAS);
|
// npc.setCurrentHpMp(npc.getMaxHp(), npc.getMaxMp());
|
||||||
boss.decayMe();
|
_zone.oustAllPlayers();
|
||||||
GrandBossManager.getInstance().setBossStatus(VALAKAS, DORMANT);
|
cancelQuestTimer("check_activity_and_do_actions", npc, null);
|
||||||
// npc.setCurrentHpMp(npc.getMaxHp(), npc.getMaxMp());
|
i_quest2 = 0;
|
||||||
_Zone.oustAllPlayers();
|
i_quest3 = 0;
|
||||||
cancelQuestTimer("check_activity_and_do_actions", npc, null);
|
i_quest4 = 0;
|
||||||
i_quest2 = 0;
|
}
|
||||||
i_quest3 = 0;
|
else if (npc.getCurrentHp() > ((npc.getMaxHp() * 1) / 4))
|
||||||
i_quest4 = 0;
|
{
|
||||||
}
|
if ((sk4691 == 0) || ((sk4691 == 1) && (level != 4)))
|
||||||
else if (npc.getCurrentHp() > ((npc.getMaxHp() * 1) / 4))
|
{
|
||||||
{
|
npc.setTarget(npc);
|
||||||
if ((sk4691 == 0) || ((sk4691 == 1) && (level != 4)))
|
npc.doCast(SkillTable.getInstance().getSkill(4691, 4));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (npc.getCurrentHp() > ((npc.getMaxHp() * 2) / 4.0))
|
||||||
|
{
|
||||||
|
if ((sk4691 == 0) || ((sk4691 == 1) && (level != 3)))
|
||||||
|
{
|
||||||
|
npc.setTarget(npc);
|
||||||
|
npc.doCast(SkillTable.getInstance().getSkill(4691, 3));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (npc.getCurrentHp() > ((npc.getMaxHp() * 3) / 4.0))
|
||||||
|
{
|
||||||
|
if ((sk4691 == 0) || ((sk4691 == 1) && (level != 2)))
|
||||||
|
{
|
||||||
|
npc.setTarget(npc);
|
||||||
|
npc.doCast(SkillTable.getInstance().getSkill(4691, 2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((sk4691 == 0) || ((sk4691 == 1) && (level != 1)))
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
npc.setTarget(npc);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4691, 4));
|
npc.doCast(SkillTable.getInstance().getSkill(4691, 1));
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if (npc.getCurrentHp() > ((npc.getMaxHp() * 2) / 4.0))
|
case "launch_random_skill":
|
||||||
{
|
{
|
||||||
if ((sk4691 == 0) || ((sk4691 == 1) && (level != 3)))
|
if (!npc.isInvul())
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
getRandomSkill(npc);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4691, 3));
|
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
else if (npc.getCurrentHp() > ((npc.getMaxHp() * 3) / 4.0))
|
|
||||||
{
|
|
||||||
if ((sk4691 == 0) || ((sk4691 == 1) && (level != 2)))
|
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4691, 2));
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if ((sk4691 == 0) || ((sk4691 == 1) && (level != 1)))
|
case "1004":
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
startQuestTimer("1102", 1500, npc, null);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4691, 1));
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1300, 180, -5, 3000, 15000));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
case "1102":
|
||||||
else if (event.equals("launch_random_skill"))
|
|
||||||
{
|
|
||||||
if (!npc.isInvul())
|
|
||||||
{
|
{
|
||||||
|
startQuestTimer("1103", 3300, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 500, 180, -8, 600, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1103":
|
||||||
|
{
|
||||||
|
startQuestTimer("1104", 2900, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 800, 180, -8, 2700, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1104":
|
||||||
|
{
|
||||||
|
startQuestTimer("1105", 2700, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 200, 250, 70, 0, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1105":
|
||||||
|
{
|
||||||
|
startQuestTimer("1106", 1, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1100, 250, 70, 2500, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1106":
|
||||||
|
{
|
||||||
|
startQuestTimer("1107", 3200, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 700, 150, 30, 0, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1107":
|
||||||
|
{
|
||||||
|
startQuestTimer("1108", 1400, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1200, 150, 20, 2900, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1108":
|
||||||
|
{
|
||||||
|
startQuestTimer("1109", 6700, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 750, 170, 15, 3400, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1109":
|
||||||
|
{
|
||||||
|
startQuestTimer("1110", 5700, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 750, 170, -10, 3400, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1110":
|
||||||
|
{
|
||||||
|
GrandBossManager.getInstance().setBossStatus(VALAKAS, FIGHTING);
|
||||||
|
startQuestTimer("check_activity_and_do_actions", 60000, npc, null, true);
|
||||||
|
npc.setInvul(false);
|
||||||
getRandomSkill(npc);
|
getRandomSkill(npc);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else
|
case "1111":
|
||||||
{
|
{
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
startQuestTimer("1112", 3500, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1100, 210, -5, 3000, 10000));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
case "1112":
|
||||||
else if (event.equals("1004"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1102", 1500, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1300, 180, -5, 3000, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1102"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1103", 3300, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 500, 180, -8, 600, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1103"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1104", 2900, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 800, 180, -8, 2700, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1104"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1105", 2700, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 200, 250, 70, 0, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1105"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1106", 1, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1100, 250, 70, 2500, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1106"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1107", 3200, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 700, 150, 30, 0, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1107"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1108", 1400, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1200, 150, 20, 2900, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1108"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1109", 6700, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 750, 170, 15, 3400, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1109"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1110", 5700, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 750, 170, -10, 3400, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1110"))
|
|
||||||
{
|
|
||||||
GrandBossManager.getInstance().setBossStatus(VALAKAS, FIGHTING);
|
|
||||||
startQuestTimer("check_activity_and_do_actions", 60000, npc, null, true);
|
|
||||||
npc.setInvul(false);
|
|
||||||
getRandomSkill(npc);
|
|
||||||
}
|
|
||||||
else if (event.equals("1111"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1112", 3500, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1100, 210, -5, 3000, 10000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1112"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1113", 4500, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1300, 200, -8, 3000, 10000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1113"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1114", 500, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1000, 190, 0, 3000, 10000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1114"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1115", 4600, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 120, 0, 2500, 10000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1115"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1116", 750, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 20, 0, 3000, 10000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1116"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1117", 2500, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 10, 0, 3000, 10000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1117"))
|
|
||||||
{
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 10, 0, 3000, 250));
|
|
||||||
addSpawn(31759, 212852, -114842, -1632, 0, false, 900000);
|
|
||||||
final int radius = 1500;
|
|
||||||
for (int i = 0; i < 20; i++)
|
|
||||||
{
|
{
|
||||||
final int x = (int) (radius * Math.cos(i * .331)); // .331~2pi/19
|
startQuestTimer("1113", 4500, npc, null);
|
||||||
final int y = (int) (radius * Math.sin(i * .331));
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1300, 200, -8, 3000, 10000));
|
||||||
addSpawn(31759, 212852 + x, -114842 + y, -1632, 0, false, 900000);
|
break;
|
||||||
|
}
|
||||||
|
case "1113":
|
||||||
|
{
|
||||||
|
startQuestTimer("1114", 500, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1000, 190, 0, 3000, 10000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1114":
|
||||||
|
{
|
||||||
|
startQuestTimer("1115", 4600, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 120, 0, 2500, 10000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1115":
|
||||||
|
{
|
||||||
|
startQuestTimer("1116", 750, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 20, 0, 3000, 10000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1116":
|
||||||
|
{
|
||||||
|
startQuestTimer("1117", 2500, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 10, 0, 3000, 10000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1117":
|
||||||
|
{
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 10, 0, 3000, 250));
|
||||||
|
addSpawn(31759, 212852, -114842, -1632, 0, false, 900000);
|
||||||
|
final int radius = 1500;
|
||||||
|
for (int i = 0; i < 20; i++)
|
||||||
|
{
|
||||||
|
final int x = (int) (radius * Math.cos(i * .331)); // .331~2pi/19
|
||||||
|
final int y = (int) (radius * Math.sin(i * .331));
|
||||||
|
addSpawn(31759, 212852 + x, -114842 + y, -1632, 0, false, 900000);
|
||||||
|
}
|
||||||
|
startQuestTimer("remove_players", 900000, null, null);
|
||||||
|
cancelQuestTimer("check_activity_and_do_actions", npc, null);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
startQuestTimer("remove_players", 900000, null, null);
|
|
||||||
cancelQuestTimer("check_activity_and_do_actions", npc, null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (event.equals("lock_entry_and_spawn_valakas"))
|
else if (event.equals("lock_entry_and_spawn_valakas"))
|
||||||
@@ -353,8 +362,9 @@ public class Valakas extends Quest
|
|||||||
}
|
}
|
||||||
else if (event.equals("remove_players"))
|
else if (event.equals("remove_players"))
|
||||||
{
|
{
|
||||||
_Zone.oustAllPlayers();
|
_zone.oustAllPlayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -365,10 +375,9 @@ public class Valakas extends Quest
|
|||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
lastAttackTime = Chronos.currentTimeMillis();
|
lastAttackTime = Chronos.currentTimeMillis();
|
||||||
/*
|
// if (!Config.ALLOW_DIRECT_TP_TO_BOSS_ROOM && GrandBossManager.getInstance().getBossStatus(VALAKAS) != FIGHTING && !npc.getSpawn().isCustomBossInstance()) { attacker.teleToLocation(150037, -57255, -2976); }
|
||||||
* if (!Config.ALLOW_DIRECT_TP_TO_BOSS_ROOM && GrandBossManager.getInstance().getBossStatus(VALAKAS) != FIGHTING && !npc.getSpawn().isCustomBossInstance()) { attacker.teleToLocation(150037, -57255, -2976); }
|
|
||||||
*/
|
|
||||||
if (attacker.getMountType() == 1)
|
if (attacker.getMountType() == 1)
|
||||||
{
|
{
|
||||||
int sk4258 = 0;
|
int sk4258 = 0;
|
||||||
@@ -583,10 +592,9 @@ public class Valakas extends Quest
|
|||||||
npc.broadcastPacket(new PlaySound(1, "B03_D", npc));
|
npc.broadcastPacket(new PlaySound(1, "B03_D", npc));
|
||||||
startQuestTimer("1111", 500, npc, null);
|
startQuestTimer("1111", 500, npc, null);
|
||||||
GrandBossManager.getInstance().setBossStatus(VALAKAS, DEAD);
|
GrandBossManager.getInstance().setBossStatus(VALAKAS, DEAD);
|
||||||
|
|
||||||
final long respawnTime = (Config.VALAKAS_RESP_FIRST + Rnd.get(Config.VALAKAS_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.VALAKAS_RESP_FIRST + Rnd.get(Config.VALAKAS_RESP_SECOND)) * 3600000;
|
||||||
startQuestTimer("valakas_unlock", respawnTime, null, null);
|
startQuestTimer("valakas_unlock", respawnTime, null, null);
|
||||||
// also save the respawn time so that the info is maintained past reboots
|
// Also save the respawn time so that the info is maintained past restarts.
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(VALAKAS);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(VALAKAS);
|
||||||
info.set("respawn_time", (Chronos.currentTimeMillis() + respawnTime));
|
info.set("respawn_time", (Chronos.currentTimeMillis() + respawnTime));
|
||||||
GrandBossManager.getInstance().setStatSet(VALAKAS, info);
|
GrandBossManager.getInstance().setStatSet(VALAKAS, info);
|
||||||
|
@@ -47,6 +47,10 @@ public class Zaken extends Quest
|
|||||||
{
|
{
|
||||||
protected static final Logger LOGGER = Logger.getLogger(Zaken.class.getName());
|
protected static final Logger LOGGER = Logger.getLogger(Zaken.class.getName());
|
||||||
|
|
||||||
|
// Zaken status
|
||||||
|
private static final byte ALIVE = 0; // Zaken is spawned.
|
||||||
|
private static final byte DEAD = 1; // Zaken has been killed.
|
||||||
|
// NPCs
|
||||||
private static final int ZAKEN = 29022;
|
private static final int ZAKEN = 29022;
|
||||||
private static final int DOLL_BLADER_B = 29023;
|
private static final int DOLL_BLADER_B = 29023;
|
||||||
private static final int VALE_MASTER_B = 29024;
|
private static final int VALE_MASTER_B = 29024;
|
||||||
@@ -106,31 +110,28 @@ public class Zaken extends Quest
|
|||||||
-2944,
|
-2944,
|
||||||
-2944
|
-2944
|
||||||
};
|
};
|
||||||
// Zaken status tracking
|
|
||||||
private static final byte ALIVE = 0; // Zaken is spawned.
|
|
||||||
private static final byte DEAD = 1; // Zaken has been killed.
|
|
||||||
// Misc
|
// Misc
|
||||||
private static BossZone _zone;
|
private static BossZone _zone;
|
||||||
private int _1001 = 0; // used for first cancel of QuestTimer "1001"
|
private int _1001 = 0; // Used for first cancel of QuestTimer "1001".
|
||||||
private int _ai0 = 0; // used for zaken coords updater
|
private int _ai0 = 0; // Used for zaken coords updater.
|
||||||
private int _ai1 = 0; // used for X coord tracking for non-random teleporting in zaken's self teleport skill
|
private int _ai1 = 0; // Used for X coord tracking for non-random teleporting in zaken's self teleport skill.
|
||||||
private int _ai2 = 0; // used for Y coord tracking for non-random teleporting in zaken's self teleport skill
|
private int _ai2 = 0; // Used for Y coord tracking for non-random teleporting in zaken's self teleport skill.
|
||||||
private int _ai3 = 0; // used for Z coord tracking for non-random teleporting in zaken's self teleport skill
|
private int _ai3 = 0; // Used for Z coord tracking for non-random teleporting in zaken's self teleport skill.
|
||||||
private int _ai4 = 0; // used for spawning minions cycles
|
private int _ai4 = 0; // Used for spawning minions cycles.
|
||||||
private int _quest0 = 0; // used for teleporting progress
|
private int _quest0 = 0; // Used for teleporting progress.
|
||||||
private int _quest1 = 0; // used for most hated players progress
|
private int _quest1 = 0; // Used for most hated players progress.
|
||||||
private int _quest2 = 0; // used for zaken HP check for teleport
|
private int _quest2 = 0; // Used for zaken HP check for teleport.
|
||||||
private PlayerInstance c_quest0 = null; // 1st player used for area teleport
|
private PlayerInstance c_quest0 = null; // 1st player used for area teleport.
|
||||||
private PlayerInstance c_quest1 = null; // 2nd player used for area teleport
|
private PlayerInstance c_quest1 = null; // 2nd player used for area teleport.
|
||||||
private PlayerInstance c_quest2 = null; // 3rd player used for area teleport
|
private PlayerInstance c_quest2 = null; // 3rd player used for area teleport.
|
||||||
private PlayerInstance c_quest3 = null; // 4th player used for area teleport
|
private PlayerInstance c_quest3 = null; // 4th player used for area teleport.
|
||||||
private PlayerInstance c_quest4 = null; // 5th player used for area teleport
|
private PlayerInstance c_quest4 = null; // 5th player used for area teleport.
|
||||||
|
|
||||||
public Zaken()
|
public Zaken()
|
||||||
{
|
{
|
||||||
super(-1, "ai/bosses");
|
super(-1, "ai/bosses");
|
||||||
|
|
||||||
// Zaken doors handling
|
// Zaken doors handling.
|
||||||
ThreadPool.scheduleAtFixedRate(() ->
|
ThreadPool.scheduleAtFixedRate(() ->
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -168,17 +169,17 @@ public class Zaken extends Quest
|
|||||||
final Integer status = GrandBossManager.getInstance().getBossStatus(ZAKEN);
|
final Integer status = GrandBossManager.getInstance().getBossStatus(ZAKEN);
|
||||||
if (status == DEAD)
|
if (status == DEAD)
|
||||||
{
|
{
|
||||||
// load the unlock date and time for zaken from DB
|
// Load the unlock date and time for zaken from DB.
|
||||||
final long temp = info.getLong("respawn_time") - Chronos.currentTimeMillis();
|
final long temp = info.getLong("respawn_time") - Chronos.currentTimeMillis();
|
||||||
// if zaken is locked until a certain time, mark it so and start the unlock timer
|
// If Zaken is locked until a certain time, mark it so and start the unlock timer.
|
||||||
// the unlock time has not yet expired.
|
// The unlock time has not yet expired.
|
||||||
if (temp > 0)
|
if (temp > 0)
|
||||||
{
|
{
|
||||||
startQuestTimer("zaken_unlock", temp, null, null);
|
startQuestTimer("zaken_unlock", temp, null, null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// the time has already expired while the server was offline. Immediately spawn zaken.
|
// The time has already expired while the server was offline. Immediately spawn Zaken.
|
||||||
final GrandBossInstance zaken = (GrandBossInstance) addSpawn(ZAKEN, 55312, 219168, -3223, 0, false, 0);
|
final GrandBossInstance zaken = (GrandBossInstance) addSpawn(ZAKEN, 55312, 219168, -3223, 0, false, 0);
|
||||||
GrandBossManager.getInstance().setBossStatus(ZAKEN, ALIVE);
|
GrandBossManager.getInstance().setBossStatus(ZAKEN, ALIVE);
|
||||||
spawnBoss(zaken);
|
spawnBoss(zaken);
|
||||||
@@ -186,13 +187,13 @@ public class Zaken extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
final int loc_x = info.getInt("loc_x");
|
final int x = info.getInt("loc_x");
|
||||||
final int loc_y = info.getInt("loc_y");
|
final int y = info.getInt("loc_y");
|
||||||
final int loc_z = info.getInt("loc_z");
|
final int z = info.getInt("loc_z");
|
||||||
final int heading = info.getInt("heading");
|
final int heading = info.getInt("heading");
|
||||||
final int hp = info.getInt("currentHP");
|
final int hp = info.getInt("currentHP");
|
||||||
final int mp = info.getInt("currentMP");
|
final int mp = info.getInt("currentMP");
|
||||||
final GrandBossInstance zaken = (GrandBossInstance) addSpawn(ZAKEN, loc_x, loc_y, loc_z, heading, false, 0);
|
final GrandBossInstance zaken = (GrandBossInstance) addSpawn(ZAKEN, x, y, z, heading, false, 0);
|
||||||
zaken.setCurrentHpMp(hp, mp);
|
zaken.setCurrentHpMp(hp, mp);
|
||||||
spawnBoss(zaken);
|
spawnBoss(zaken);
|
||||||
}
|
}
|
||||||
@@ -225,7 +226,7 @@ public class Zaken extends Quest
|
|||||||
}
|
}
|
||||||
if (getTimeHour() < 5)
|
if (getTimeHour() < 5)
|
||||||
{
|
{
|
||||||
if (sk4223 == 1) // use night face if zaken have day face
|
if (sk4223 == 1) // Use night face if Zaken have day face.
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
npc.setTarget(npc);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4224, 1));
|
npc.doCast(SkillTable.getInstance().getSkill(4224, 1));
|
||||||
@@ -233,7 +234,7 @@ public class Zaken extends Quest
|
|||||||
_ai2 = npc.getY();
|
_ai2 = npc.getY();
|
||||||
_ai3 = npc.getZ();
|
_ai3 = npc.getZ();
|
||||||
}
|
}
|
||||||
if (sk4227 == 0) // use zaken regeneration
|
if (sk4227 == 0) // Use Zaken regeneration.
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
npc.setTarget(npc);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4227, 1));
|
npc.doCast(SkillTable.getInstance().getSkill(4227, 1));
|
||||||
@@ -405,13 +406,13 @@ public class Zaken extends Quest
|
|||||||
_quest1 = 0;
|
_quest1 = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (sk4223 == 0) // use day face if not night time
|
else if (sk4223 == 0) // Use day face if not night time.
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
npc.setTarget(npc);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4223, 1));
|
npc.doCast(SkillTable.getInstance().getSkill(4223, 1));
|
||||||
_quest2 = 3;
|
_quest2 = 3;
|
||||||
}
|
}
|
||||||
if (sk4227 == 1) // when switching to day time, cancel zaken night regen
|
if (sk4227 == 1) // When switching to day time, cancel zaken night regen.
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
npc.setTarget(npc);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4242, 1));
|
npc.doCast(SkillTable.getInstance().getSkill(4242, 1));
|
||||||
@@ -442,131 +443,131 @@ public class Zaken extends Quest
|
|||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
final int rr = Rnd.get(15);
|
final int rr = Rnd.get(15);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, X_COORDS[rr] + Rnd.get(650), Y_COORDS[rr] + Rnd.get(650), Z_COORDS[rr], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, X_COORDS[rr] + Rnd.get(650), Y_COORDS[rr] + Rnd.get(650), Z_COORDS[rr], Rnd.get(65536), false, 0);
|
||||||
_ai4 = 2;
|
_ai4 = 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
final int rr = Rnd.get(15);
|
final int rr = Rnd.get(15);
|
||||||
addSpawn(DOLL_BLADER_B, X_COORDS[rr] + Rnd.get(650), Y_COORDS[rr] + Rnd.get(650), Z_COORDS[rr], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, X_COORDS[rr] + Rnd.get(650), Y_COORDS[rr] + Rnd.get(650), Z_COORDS[rr], Rnd.get(65536), false, 0);
|
||||||
_ai4 = 3;
|
_ai4 = 3;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
addSpawn(VALE_MASTER_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0);
|
||||||
_ai4 = 4;
|
_ai4 = 4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0);
|
||||||
_ai4 = 5;
|
_ai4 = 5;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 5:
|
case 5:
|
||||||
{
|
{
|
||||||
addSpawn(DOLL_BLADER_B, 52675, 219371, -3290, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 52675, 219371, -3290, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 52687, 219596, -3368, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 52687, 219596, -3368, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 52672, 219740, -3418, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 52672, 219740, -3418, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 52857, 219992, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 52857, 219992, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 52959, 219997, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 52959, 219997, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 53381, 220151, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 53381, 220151, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54236, 220948, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54236, 220948, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54885, 220144, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54885, 220144, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55264, 219860, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55264, 219860, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55399, 220263, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55399, 220263, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55679, 220129, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55679, 220129, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 56276, 220783, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 56276, 220783, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 57173, 220234, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 57173, 220234, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 56267, 218826, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 56267, 218826, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 56294, 219482, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 56294, 219482, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56094, 219113, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56094, 219113, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 56364, 218967, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 56364, 218967, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 57113, 218079, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 57113, 218079, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 56186, 217153, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 56186, 217153, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55440, 218081, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55440, 218081, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55202, 217940, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55202, 217940, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55225, 218236, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55225, 218236, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54973, 218075, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54973, 218075, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 53412, 218077, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 53412, 218077, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54226, 218797, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54226, 218797, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54394, 219067, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54394, 219067, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54139, 219253, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54139, 219253, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 54262, 219480, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 54262, 219480, -3488, Rnd.get(65536), false, 0);
|
||||||
_ai4 = 6;
|
_ai4 = 6;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 6:
|
case 6:
|
||||||
{
|
{
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 53412, 218077, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 53412, 218077, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54413, 217132, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54413, 217132, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 54841, 217132, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 54841, 217132, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 55372, 217128, -3343, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 55372, 217128, -3343, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 55893, 217122, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 55893, 217122, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56282, 217237, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56282, 217237, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 56963, 218080, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 56963, 218080, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 56267, 218826, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 56267, 218826, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 56294, 219482, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 56294, 219482, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56094, 219113, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56094, 219113, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 56364, 218967, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 56364, 218967, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 56276, 220783, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 56276, 220783, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 57173, 220234, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 57173, 220234, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54885, 220144, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54885, 220144, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55264, 219860, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55264, 219860, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55399, 220263, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55399, 220263, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55679, 220129, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55679, 220129, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54236, 220948, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54236, 220948, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54464, 219095, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54464, 219095, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54226, 218797, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54226, 218797, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54394, 219067, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54394, 219067, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54139, 219253, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54139, 219253, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 54262, 219480, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 54262, 219480, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 53412, 218077, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 53412, 218077, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55440, 218081, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55440, 218081, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55202, 217940, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55202, 217940, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55225, 218236, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55225, 218236, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54973, 218075, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54973, 218075, -3216, Rnd.get(65536), false, 0);
|
||||||
_ai4 = 7;
|
_ai4 = 7;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 7:
|
case 7:
|
||||||
{
|
{
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54228, 217504, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54228, 217504, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54181, 217168, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54181, 217168, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 54714, 217123, -3168, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 54714, 217123, -3168, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 55298, 217127, -3073, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 55298, 217127, -3073, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 55787, 217130, -2993, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 55787, 217130, -2993, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56284, 217216, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56284, 217216, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 56963, 218080, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 56963, 218080, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 56267, 218826, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 56267, 218826, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 56294, 219482, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 56294, 219482, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56094, 219113, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56094, 219113, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 56364, 218967, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 56364, 218967, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 56276, 220783, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 56276, 220783, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 57173, 220234, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 57173, 220234, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54885, 220144, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54885, 220144, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55264, 219860, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55264, 219860, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55399, 220263, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55399, 220263, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55679, 220129, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55679, 220129, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54236, 220948, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54236, 220948, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54464, 219095, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54464, 219095, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54226, 218797, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54226, 218797, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54394, 219067, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54394, 219067, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54139, 219253, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54139, 219253, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 54262, 219480, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 54262, 219480, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 53412, 218077, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 53412, 218077, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54280, 217200, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54280, 217200, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55440, 218081, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55440, 218081, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55202, 217940, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55202, 217940, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55225, 218236, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55225, 218236, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54973, 218075, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54973, 218075, -2944, Rnd.get(65536), false, 0);
|
||||||
_ai4 = 8;
|
_ai4 = 8;
|
||||||
cancelQuestTimer("1003", null, null);
|
cancelQuestTimer("1003", null, null);
|
||||||
break;
|
break;
|
||||||
@@ -586,7 +587,7 @@ public class Zaken extends Quest
|
|||||||
}
|
}
|
||||||
case "CreateOnePrivateEx":
|
case "CreateOnePrivateEx":
|
||||||
{
|
{
|
||||||
addSpawn(npc.getNpcId(), npc.getX(), npc.getY(), npc.getZ(), 0, false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(npc.getNpcId(), npc.getX(), npc.getY(), npc.getZ(), 0, false, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -605,7 +606,7 @@ public class Zaken extends Quest
|
|||||||
final int callerId = caller.getNpcId();
|
final int callerId = caller.getNpcId();
|
||||||
if ((getTimeHour() < 5) && (callerId != ZAKEN) && (npcId == ZAKEN))
|
if ((getTimeHour() < 5) && (callerId != ZAKEN) && (npcId == ZAKEN))
|
||||||
{
|
{
|
||||||
final int damage = 0; // well damage required :x
|
final int damage = 0;
|
||||||
if ((npc.getAI().getIntention() == CtrlIntention.AI_INTENTION_IDLE) && (_ai0 == 0) && (damage < 10) && (Rnd.get((30 * 15)) < 1))// todo - damage missing
|
if ((npc.getAI().getIntention() == CtrlIntention.AI_INTENTION_IDLE) && (_ai0 == 0) && (damage < 10) && (Rnd.get((30 * 15)) < 1))// todo - damage missing
|
||||||
{
|
{
|
||||||
_ai0 = 1;
|
_ai0 = 1;
|
||||||
@@ -833,12 +834,12 @@ public class Zaken extends Quest
|
|||||||
{
|
{
|
||||||
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
||||||
GrandBossManager.getInstance().setBossStatus(ZAKEN, DEAD);
|
GrandBossManager.getInstance().setBossStatus(ZAKEN, DEAD);
|
||||||
// time is 36hour +/- 17hour
|
// Time is 36hour +/- 17hour.
|
||||||
final long respawnTime = (Config.ZAKEN_RESP_FIRST + Rnd.get(Config.ZAKEN_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.ZAKEN_RESP_FIRST + Rnd.get(Config.ZAKEN_RESP_SECOND)) * 3600000;
|
||||||
startQuestTimer("zaken_unlock", respawnTime, null, null);
|
startQuestTimer("zaken_unlock", respawnTime, null, null);
|
||||||
cancelQuestTimer("1001", npc, null);
|
cancelQuestTimer("1001", npc, null);
|
||||||
cancelQuestTimer("1003", npc, null);
|
cancelQuestTimer("1003", npc, null);
|
||||||
// also save the respawn time so that the info is maintained past reboots
|
// Also save the respawn time so that the info is maintained past reboots.
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(ZAKEN);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(ZAKEN);
|
||||||
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
||||||
GrandBossManager.getInstance().setStatSet(ZAKEN, info);
|
GrandBossManager.getInstance().setStatSet(ZAKEN, info);
|
||||||
@@ -964,7 +965,7 @@ public class Zaken extends Quest
|
|||||||
startQuestTimer("1003", 1700, null, null);
|
startQuestTimer("1003", 1700, null, null);
|
||||||
}
|
}
|
||||||
_1001 = 1;
|
_1001 = 1;
|
||||||
startQuestTimer("1001", 1000, npc, null); // buffs,random teleports
|
startQuestTimer("1001", 1000, npc, null); // Buffs, random teleports.
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTimeHour()
|
public int getTimeHour()
|
||||||
|
@@ -1733,7 +1733,7 @@ public class Quest extends ManagedScript
|
|||||||
* @param mobs
|
* @param mobs
|
||||||
* @see #registerMobs(int[], EventType...)
|
* @see #registerMobs(int[], EventType...)
|
||||||
*/
|
*/
|
||||||
public void registerMobs(int[] mobs)
|
public void registerMobs(int... mobs)
|
||||||
{
|
{
|
||||||
for (int id : mobs)
|
for (int id : mobs)
|
||||||
{
|
{
|
||||||
|
@@ -57,18 +57,24 @@ public class Antharas extends Quest
|
|||||||
{
|
{
|
||||||
protected static final Logger LOGGER = Logger.getLogger(Antharas.class.getName());
|
protected static final Logger LOGGER = Logger.getLogger(Antharas.class.getName());
|
||||||
|
|
||||||
// Config
|
// Antharas status.
|
||||||
|
private static final int DORMANT = 0; // Antharas is spawned and no one has entered yet. Entry is unlocked
|
||||||
|
private static final int WAITING = 1; // Antharas is spawend and someone has entered, triggering a 30 minute window for additional people to enter before he unleashes his attack. Entry is unlocked.
|
||||||
|
private static final int FIGHTING = 2; // Antharas is engaged in battle, annihilating his foes. Entry is locked
|
||||||
|
private static final int DEAD = 3; // Antharas has been killed. Entry is locked
|
||||||
|
// Monsters.
|
||||||
|
private static final int ANTHARAS_OLD = 29019;
|
||||||
|
private static final int ANTHARAS_WEAK = 29066;
|
||||||
|
private static final int ANTHARAS_NORMAL = 29067;
|
||||||
|
private static final int ANTHARAS_STRONG = 29068;
|
||||||
|
// Configs.
|
||||||
private static final int FWA_ACTIVITYTIMEOFANTHARAS = 120;
|
private static final int FWA_ACTIVITYTIMEOFANTHARAS = 120;
|
||||||
// private static final int FWA_APPTIMEOFANTHARAS = 1800000;
|
protected static final boolean FWA_OLDANTHARAS = Config.ANTHARAS_OLD; // Use antharas Interlude with minions.
|
||||||
// private static final int FWA_INACTIVITYTIME = 900000;
|
|
||||||
// private static final boolean FWA_OLDANTHARAS = true; // use antharas interlude with minions
|
|
||||||
protected static final boolean FWA_OLDANTHARAS = Config.ANTHARAS_OLD; // use antharas interlude with minions
|
|
||||||
private static final boolean FWA_MOVEATRANDOM = true;
|
private static final boolean FWA_MOVEATRANDOM = true;
|
||||||
private static final boolean FWA_DOSERVEREARTHQUAKE = true;
|
private static final boolean FWA_DOSERVEREARTHQUAKE = true;
|
||||||
private static final int FWA_LIMITOFWEAK = 45;
|
private static final int FWA_LIMITOFWEAK = 45;
|
||||||
private static final int FWA_LIMITOFNORMAL = 63;
|
private static final int FWA_LIMITOFNORMAL = 63;
|
||||||
|
private static final int FWA_MAXMOBS = 10; // This includes Antharas.
|
||||||
private static final int FWA_MAXMOBS = 10; // this includes Antharas itself
|
|
||||||
private static final int FWA_INTERVALOFMOBSWEAK = 180000;
|
private static final int FWA_INTERVALOFMOBSWEAK = 180000;
|
||||||
private static final int FWA_INTERVALOFMOBSNORMAL = 150000;
|
private static final int FWA_INTERVALOFMOBSNORMAL = 150000;
|
||||||
private static final int FWA_INTERVALOFMOBSSTRONG = 120000;
|
private static final int FWA_INTERVALOFMOBSSTRONG = 120000;
|
||||||
@@ -83,23 +89,6 @@ public class Antharas extends Quest
|
|||||||
-7709,
|
-7709,
|
||||||
0
|
0
|
||||||
};
|
};
|
||||||
|
|
||||||
protected Collection<Spawn> _teleportCubeSpawn = ConcurrentHashMap.newKeySet();
|
|
||||||
protected Collection<NpcInstance> _teleportCube = ConcurrentHashMap.newKeySet();
|
|
||||||
|
|
||||||
// Spawn data of monsters.
|
|
||||||
protected Map<Integer, Spawn> _monsterSpawn = new ConcurrentHashMap<>();
|
|
||||||
|
|
||||||
// Instance of monsters.
|
|
||||||
protected Collection<NpcInstance> _monsters = ConcurrentHashMap.newKeySet();
|
|
||||||
protected GrandBossInstance _antharas = null;
|
|
||||||
|
|
||||||
// monstersId
|
|
||||||
private static final int ANTHARASOLDID = 29019;
|
|
||||||
private static final int ANTHARASWEAKID = 29066;
|
|
||||||
private static final int ANTHARASNORMALID = 29067;
|
|
||||||
private static final int ANTHARASSTRONGID = 29068;
|
|
||||||
|
|
||||||
// Tasks.
|
// Tasks.
|
||||||
protected ScheduledFuture<?> _cubeSpawnTask = null;
|
protected ScheduledFuture<?> _cubeSpawnTask = null;
|
||||||
protected ScheduledFuture<?> _monsterSpawnTask = null;
|
protected ScheduledFuture<?> _monsterSpawnTask = null;
|
||||||
@@ -110,38 +99,19 @@ public class Antharas extends Quest
|
|||||||
protected ScheduledFuture<?> _selfDestructionTask = null;
|
protected ScheduledFuture<?> _selfDestructionTask = null;
|
||||||
protected ScheduledFuture<?> _moveAtRandomTask = null;
|
protected ScheduledFuture<?> _moveAtRandomTask = null;
|
||||||
protected ScheduledFuture<?> _movieTask = null;
|
protected ScheduledFuture<?> _movieTask = null;
|
||||||
|
// Misc.
|
||||||
// Antharas Status Tracking :
|
protected Collection<Spawn> _teleportCubeSpawn = ConcurrentHashMap.newKeySet();
|
||||||
private static final int DORMANT = 0; // Antharas is spawned and no one has entered yet. Entry is unlocked
|
protected Collection<NpcInstance> _teleportCube = ConcurrentHashMap.newKeySet();
|
||||||
private static final int WAITING = 1; // Antharas is spawend and someone has entered, triggering a 30 minute window for additional people to enter
|
protected Map<Integer, Spawn> _monsterSpawn = new ConcurrentHashMap<>();
|
||||||
// before he unleashes his attack. Entry is unlocked
|
protected Collection<NpcInstance> _monsters = ConcurrentHashMap.newKeySet();
|
||||||
private static final int FIGHTING = 2; // Antharas is engaged in battle, annihilating his foes. Entry is locked
|
protected GrandBossInstance _antharas = null;
|
||||||
private static final int DEAD = 3; // Antharas has been killed. Entry is locked
|
protected static long _lastAction = 0;
|
||||||
|
|
||||||
protected static long _LastAction = 0;
|
|
||||||
|
|
||||||
protected static BossZone _zone;
|
protected static BossZone _zone;
|
||||||
|
|
||||||
// Boss: Antharas
|
|
||||||
public Antharas()
|
public Antharas()
|
||||||
{
|
{
|
||||||
super(-1, "ai/bosses");
|
super(-1, "ai/bosses");
|
||||||
final int[] mob =
|
registerMobs(ANTHARAS_OLD, ANTHARAS_WEAK, ANTHARAS_NORMAL, ANTHARAS_STRONG, 29069, 29070, 29071, 29072, 29073, 29074, 29075, 29076);
|
||||||
{
|
|
||||||
ANTHARASOLDID,
|
|
||||||
ANTHARASWEAKID,
|
|
||||||
ANTHARASNORMALID,
|
|
||||||
ANTHARASSTRONGID,
|
|
||||||
29069,
|
|
||||||
29070,
|
|
||||||
29071,
|
|
||||||
29072,
|
|
||||||
29073,
|
|
||||||
29074,
|
|
||||||
29075,
|
|
||||||
29076
|
|
||||||
};
|
|
||||||
registerMobs(mob);
|
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -155,19 +125,18 @@ public class Antharas extends Quest
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize
|
|
||||||
private void init()
|
private void init()
|
||||||
{
|
{
|
||||||
// Setting spawn data of monsters.
|
// Setting spawn data of monsters.
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
_zone = GrandBossManager.getInstance().getZone(179700, 113800, -7709);
|
_zone = GrandBossManager.getInstance().getZone(179700, 113800, -7709);
|
||||||
NpcTemplate template1;
|
NpcTemplate template;
|
||||||
Spawn tempSpawn;
|
Spawn tempSpawn;
|
||||||
|
|
||||||
// Old Antharas
|
// Old Antharas.
|
||||||
template1 = NpcTable.getInstance().getTemplate(ANTHARASOLDID);
|
template = NpcTable.getInstance().getTemplate(ANTHARAS_OLD);
|
||||||
tempSpawn = new Spawn(template1);
|
tempSpawn = new Spawn(template);
|
||||||
tempSpawn.setX(181323);
|
tempSpawn.setX(181323);
|
||||||
tempSpawn.setY(114850);
|
tempSpawn.setY(114850);
|
||||||
tempSpawn.setZ(-7623);
|
tempSpawn.setZ(-7623);
|
||||||
@@ -175,11 +144,11 @@ public class Antharas extends Quest
|
|||||||
tempSpawn.setAmount(1);
|
tempSpawn.setAmount(1);
|
||||||
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
||||||
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
||||||
_monsterSpawn.put(29019, tempSpawn);
|
_monsterSpawn.put(ANTHARAS_OLD, tempSpawn);
|
||||||
|
|
||||||
// Weak Antharas
|
// Weak Antharas.
|
||||||
template1 = NpcTable.getInstance().getTemplate(ANTHARASWEAKID);
|
template = NpcTable.getInstance().getTemplate(ANTHARAS_WEAK);
|
||||||
tempSpawn = new Spawn(template1);
|
tempSpawn = new Spawn(template);
|
||||||
tempSpawn.setX(181323);
|
tempSpawn.setX(181323);
|
||||||
tempSpawn.setY(114850);
|
tempSpawn.setY(114850);
|
||||||
tempSpawn.setZ(-7623);
|
tempSpawn.setZ(-7623);
|
||||||
@@ -187,11 +156,11 @@ public class Antharas extends Quest
|
|||||||
tempSpawn.setAmount(1);
|
tempSpawn.setAmount(1);
|
||||||
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
||||||
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
||||||
_monsterSpawn.put(29066, tempSpawn);
|
_monsterSpawn.put(ANTHARAS_WEAK, tempSpawn);
|
||||||
|
|
||||||
// Normal Antharas
|
// Normal Antharas.
|
||||||
template1 = NpcTable.getInstance().getTemplate(ANTHARASNORMALID);
|
template = NpcTable.getInstance().getTemplate(ANTHARAS_NORMAL);
|
||||||
tempSpawn = new Spawn(template1);
|
tempSpawn = new Spawn(template);
|
||||||
tempSpawn.setX(181323);
|
tempSpawn.setX(181323);
|
||||||
tempSpawn.setY(114850);
|
tempSpawn.setY(114850);
|
||||||
tempSpawn.setZ(-7623);
|
tempSpawn.setZ(-7623);
|
||||||
@@ -199,11 +168,11 @@ public class Antharas extends Quest
|
|||||||
tempSpawn.setAmount(1);
|
tempSpawn.setAmount(1);
|
||||||
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
||||||
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
||||||
_monsterSpawn.put(29067, tempSpawn);
|
_monsterSpawn.put(ANTHARAS_NORMAL, tempSpawn);
|
||||||
|
|
||||||
// Strong Antharas
|
// Strong Antharas.
|
||||||
template1 = NpcTable.getInstance().getTemplate(ANTHARASSTRONGID);
|
template = NpcTable.getInstance().getTemplate(ANTHARAS_STRONG);
|
||||||
tempSpawn = new Spawn(template1);
|
tempSpawn = new Spawn(template);
|
||||||
tempSpawn.setX(181323);
|
tempSpawn.setX(181323);
|
||||||
tempSpawn.setY(114850);
|
tempSpawn.setY(114850);
|
||||||
tempSpawn.setZ(-7623);
|
tempSpawn.setZ(-7623);
|
||||||
@@ -211,7 +180,7 @@ public class Antharas extends Quest
|
|||||||
tempSpawn.setAmount(1);
|
tempSpawn.setAmount(1);
|
||||||
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
tempSpawn.setRespawnDelay(FWA_ACTIVITYTIMEOFANTHARAS * 2);
|
||||||
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
||||||
_monsterSpawn.put(29068, tempSpawn);
|
_monsterSpawn.put(ANTHARAS_STRONG, tempSpawn);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
@@ -239,40 +208,40 @@ public class Antharas extends Quest
|
|||||||
LOGGER.warning(e.getMessage());
|
LOGGER.warning(e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
Integer status = GrandBossManager.getInstance().getBossStatus(ANTHARASOLDID);
|
Integer status = GrandBossManager.getInstance().getBossStatus(ANTHARAS_OLD);
|
||||||
if (FWA_OLDANTHARAS || (status == WAITING))
|
if (FWA_OLDANTHARAS || (status == WAITING))
|
||||||
{
|
{
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(ANTHARASOLDID);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(ANTHARAS_OLD);
|
||||||
final Long respawnTime = info.getLong("respawn_time");
|
final Long respawnTime = info.getLong("respawn_time");
|
||||||
if ((status == DEAD) && (respawnTime <= Chronos.currentTimeMillis()))
|
if ((status == DEAD) && (respawnTime <= Chronos.currentTimeMillis()))
|
||||||
{
|
{
|
||||||
// the time has already expired while the server was offline. Immediately spawn antharas in his cave.
|
// The time has already expired while the server was offline. Immediately spawn antharas in his cave.
|
||||||
// also, the status needs to be changed to DORMANT
|
// Also, the status needs to be changed to DORMANT.
|
||||||
GrandBossManager.getInstance().setBossStatus(ANTHARASOLDID, DORMANT);
|
GrandBossManager.getInstance().setBossStatus(ANTHARAS_OLD, DORMANT);
|
||||||
status = DORMANT;
|
status = DORMANT;
|
||||||
}
|
}
|
||||||
else if (status == FIGHTING)
|
else if (status == FIGHTING)
|
||||||
{
|
{
|
||||||
final int loc_x = info.getInt("loc_x");
|
final int x = info.getInt("loc_x");
|
||||||
final int loc_y = info.getInt("loc_y");
|
final int y = info.getInt("loc_y");
|
||||||
final int loc_z = info.getInt("loc_z");
|
final int z = info.getInt("loc_z");
|
||||||
final int heading = info.getInt("heading");
|
final int heading = info.getInt("heading");
|
||||||
final int hp = info.getInt("currentHP");
|
final int hp = info.getInt("currentHP");
|
||||||
final int mp = info.getInt("currentMP");
|
final int mp = info.getInt("currentMP");
|
||||||
_antharas = (GrandBossInstance) addSpawn(ANTHARASOLDID, loc_x, loc_y, loc_z, heading, false, 0);
|
_antharas = (GrandBossInstance) addSpawn(ANTHARAS_OLD, x, y, z, heading, false, 0);
|
||||||
GrandBossManager.getInstance().addBoss(_antharas);
|
GrandBossManager.getInstance().addBoss(_antharas);
|
||||||
_antharas.setCurrentHpMp(hp, mp);
|
_antharas.setCurrentHpMp(hp, mp);
|
||||||
_LastAction = Chronos.currentTimeMillis();
|
_lastAction = Chronos.currentTimeMillis();
|
||||||
// Start repeating timer to check for inactivity
|
// Start repeating timer to check for inactivity.
|
||||||
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
||||||
}
|
}
|
||||||
else if (status == DEAD)
|
else if (status == DEAD)
|
||||||
{
|
{
|
||||||
ThreadPool.schedule(new UnlockAntharas(ANTHARASOLDID), respawnTime - Chronos.currentTimeMillis());
|
ThreadPool.schedule(new UnlockAntharas(ANTHARAS_OLD), respawnTime - Chronos.currentTimeMillis());
|
||||||
}
|
}
|
||||||
else if (status == DORMANT)
|
else if (status == DORMANT)
|
||||||
{
|
{
|
||||||
// Here status is 0 on Database, dont do nothing
|
// Here status is 0 on Database, don't do anything.
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -281,23 +250,23 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
final Integer statusWeak = GrandBossManager.getInstance().getBossStatus(ANTHARASWEAKID);
|
final Integer statusWeak = GrandBossManager.getInstance().getBossStatus(ANTHARAS_WEAK);
|
||||||
final Integer statusNormal = GrandBossManager.getInstance().getBossStatus(ANTHARASNORMALID);
|
final Integer statusNormal = GrandBossManager.getInstance().getBossStatus(ANTHARAS_NORMAL);
|
||||||
final Integer statusStrong = GrandBossManager.getInstance().getBossStatus(ANTHARASSTRONGID);
|
final Integer statusStrong = GrandBossManager.getInstance().getBossStatus(ANTHARAS_STRONG);
|
||||||
int antharasId = 0;
|
int antharasId = 0;
|
||||||
if ((statusWeak == FIGHTING) || (statusWeak == DEAD))
|
if ((statusWeak == FIGHTING) || (statusWeak == DEAD))
|
||||||
{
|
{
|
||||||
antharasId = ANTHARASWEAKID;
|
antharasId = ANTHARAS_WEAK;
|
||||||
status = statusWeak;
|
status = statusWeak;
|
||||||
}
|
}
|
||||||
else if ((statusNormal == FIGHTING) || (statusNormal == DEAD))
|
else if ((statusNormal == FIGHTING) || (statusNormal == DEAD))
|
||||||
{
|
{
|
||||||
antharasId = ANTHARASNORMALID;
|
antharasId = ANTHARAS_NORMAL;
|
||||||
status = statusNormal;
|
status = statusNormal;
|
||||||
}
|
}
|
||||||
else if ((statusStrong == FIGHTING) || (statusStrong == DEAD))
|
else if ((statusStrong == FIGHTING) || (statusStrong == DEAD))
|
||||||
{
|
{
|
||||||
antharasId = ANTHARASSTRONGID;
|
antharasId = ANTHARAS_STRONG;
|
||||||
status = statusStrong;
|
status = statusStrong;
|
||||||
}
|
}
|
||||||
if ((antharasId != 0) && (status == FIGHTING))
|
if ((antharasId != 0) && (status == FIGHTING))
|
||||||
@@ -312,8 +281,8 @@ public class Antharas extends Quest
|
|||||||
_antharas = (GrandBossInstance) addSpawn(antharasId, loc_x, loc_y, loc_z, heading, false, 0);
|
_antharas = (GrandBossInstance) addSpawn(antharasId, loc_x, loc_y, loc_z, heading, false, 0);
|
||||||
GrandBossManager.getInstance().addBoss(_antharas);
|
GrandBossManager.getInstance().addBoss(_antharas);
|
||||||
_antharas.setCurrentHpMp(hp, mp);
|
_antharas.setCurrentHpMp(hp, mp);
|
||||||
_LastAction = Chronos.currentTimeMillis();
|
_lastAction = Chronos.currentTimeMillis();
|
||||||
// Start repeating timer to check for inactivity
|
// Start repeating timer to check for inactivity.
|
||||||
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
||||||
}
|
}
|
||||||
else if ((antharasId != 0) && (status == DEAD))
|
else if ((antharasId != 0) && (status == DEAD))
|
||||||
@@ -322,8 +291,8 @@ public class Antharas extends Quest
|
|||||||
final Long respawnTime = info.getLong("respawn_time");
|
final Long respawnTime = info.getLong("respawn_time");
|
||||||
if (respawnTime <= Chronos.currentTimeMillis())
|
if (respawnTime <= Chronos.currentTimeMillis())
|
||||||
{
|
{
|
||||||
// the time has already expired while the server was offline. Immediately spawn antharas in his cave.
|
// The time has already expired while the server was offline. Immediately spawn antharas in his cave.
|
||||||
// also, the status needs to be changed to DORMANT
|
// Also, the status needs to be changed to DORMANT.
|
||||||
GrandBossManager.getInstance().setBossStatus(antharasId, DORMANT);
|
GrandBossManager.getInstance().setBossStatus(antharasId, DORMANT);
|
||||||
status = DORMANT;
|
status = DORMANT;
|
||||||
}
|
}
|
||||||
@@ -335,7 +304,6 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do spawn teleport cube.
|
|
||||||
public void spawnCube()
|
public void spawnCube()
|
||||||
{
|
{
|
||||||
if (_mobsSpawnTask != null)
|
if (_mobsSpawnTask != null)
|
||||||
@@ -360,7 +328,6 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setting Antharas spawn task.
|
|
||||||
public void setAntharasSpawnTask()
|
public void setAntharasSpawnTask()
|
||||||
{
|
{
|
||||||
if (_monsterSpawnTask == null)
|
if (_monsterSpawnTask == null)
|
||||||
@@ -369,7 +336,7 @@ public class Antharas extends Quest
|
|||||||
{
|
{
|
||||||
if (_monsterSpawnTask == null)
|
if (_monsterSpawnTask == null)
|
||||||
{
|
{
|
||||||
GrandBossManager.getInstance().setBossStatus(ANTHARASOLDID, WAITING);
|
GrandBossManager.getInstance().setBossStatus(ANTHARAS_OLD, WAITING);
|
||||||
_monsterSpawnTask = ThreadPool.schedule(new AntharasSpawn(1), 60000 * Config.ANTHARAS_WAIT_TIME);
|
_monsterSpawnTask = ThreadPool.schedule(new AntharasSpawn(1), 60000 * Config.ANTHARAS_WAIT_TIME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -380,16 +347,15 @@ public class Antharas extends Quest
|
|||||||
{
|
{
|
||||||
int intervalOfMobs;
|
int intervalOfMobs;
|
||||||
|
|
||||||
// Interval of minions is decided by the type of Antharas
|
// Interval of minions is decided by the type of Antharas that invaded the lair.
|
||||||
// that invaded the lair.
|
|
||||||
switch (antharasId)
|
switch (antharasId)
|
||||||
{
|
{
|
||||||
case ANTHARASWEAKID:
|
case ANTHARAS_WEAK:
|
||||||
{
|
{
|
||||||
intervalOfMobs = FWA_INTERVALOFMOBSWEAK;
|
intervalOfMobs = FWA_INTERVALOFMOBSWEAK;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case ANTHARASNORMALID:
|
case ANTHARAS_NORMAL:
|
||||||
{
|
{
|
||||||
intervalOfMobs = FWA_INTERVALOFMOBSNORMAL;
|
intervalOfMobs = FWA_INTERVALOFMOBSNORMAL;
|
||||||
break;
|
break;
|
||||||
@@ -402,10 +368,9 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Spawn mobs.
|
// Spawn mobs.
|
||||||
_mobsSpawnTask = ThreadPool.scheduleAtFixedRate(new MobsSpawn(), intervalOfMobs, intervalOfMobs);
|
_mobsSpawnTask = ThreadPool.scheduleAtFixedRate(new MinionsSpawn(), intervalOfMobs, intervalOfMobs);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do spawn Antharas.
|
|
||||||
private class AntharasSpawn implements Runnable
|
private class AntharasSpawn implements Runnable
|
||||||
{
|
{
|
||||||
private int _taskId = 0;
|
private int _taskId = 0;
|
||||||
@@ -430,25 +395,24 @@ public class Antharas extends Quest
|
|||||||
{
|
{
|
||||||
case 1: // Spawn.
|
case 1: // Spawn.
|
||||||
{
|
{
|
||||||
// Strength of Antharas is decided by the number of players that
|
// Strength of Antharas is decided by the number of players that invaded the lair.
|
||||||
// invaded the lair.
|
|
||||||
_monsterSpawnTask.cancel(false);
|
_monsterSpawnTask.cancel(false);
|
||||||
_monsterSpawnTask = null;
|
_monsterSpawnTask = null;
|
||||||
if (FWA_OLDANTHARAS)
|
if (FWA_OLDANTHARAS)
|
||||||
{
|
{
|
||||||
npcId = 29019; // old
|
npcId = ANTHARAS_OLD;
|
||||||
}
|
}
|
||||||
else if ((_players == null) || (_players.size() <= FWA_LIMITOFWEAK))
|
else if ((_players == null) || (_players.size() <= FWA_LIMITOFWEAK))
|
||||||
{
|
{
|
||||||
npcId = 29066; // weak
|
npcId = ANTHARAS_WEAK;
|
||||||
}
|
}
|
||||||
else if (_players.size() > FWA_LIMITOFNORMAL)
|
else if (_players.size() > FWA_LIMITOFNORMAL)
|
||||||
{
|
{
|
||||||
npcId = 29068; // strong
|
npcId = ANTHARAS_STRONG;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
npcId = 29067; // normal
|
npcId = ANTHARAS_NORMAL;
|
||||||
}
|
}
|
||||||
// Do spawn.
|
// Do spawn.
|
||||||
antharasSpawn = _monsterSpawn.get(npcId);
|
antharasSpawn = _monsterSpawn.get(npcId);
|
||||||
@@ -456,10 +420,10 @@ public class Antharas extends Quest
|
|||||||
GrandBossManager.getInstance().addBoss(_antharas);
|
GrandBossManager.getInstance().addBoss(_antharas);
|
||||||
_monsters.add(_antharas);
|
_monsters.add(_antharas);
|
||||||
_antharas.setImmobilized(true);
|
_antharas.setImmobilized(true);
|
||||||
GrandBossManager.getInstance().setBossStatus(ANTHARASOLDID, DORMANT);
|
GrandBossManager.getInstance().setBossStatus(ANTHARAS_OLD, DORMANT);
|
||||||
GrandBossManager.getInstance().setBossStatus(npcId, FIGHTING);
|
GrandBossManager.getInstance().setBossStatus(npcId, FIGHTING);
|
||||||
_LastAction = Chronos.currentTimeMillis();
|
_lastAction = Chronos.currentTimeMillis();
|
||||||
// Start repeating timer to check for inactivity
|
// Start repeating timer to check for inactivity.
|
||||||
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
_activityCheckTask = ThreadPool.scheduleAtFixedRate(new CheckActivity(), 60000, 60000);
|
||||||
// Setting 1st time of minions spawn task.
|
// Setting 1st time of minions spawn task.
|
||||||
if (!FWA_OLDANTHARAS)
|
if (!FWA_OLDANTHARAS)
|
||||||
@@ -574,10 +538,9 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do spawn Behemoth or Bomber.
|
private class MinionsSpawn implements Runnable
|
||||||
private class MobsSpawn implements Runnable
|
|
||||||
{
|
{
|
||||||
public MobsSpawn()
|
public MinionsSpawn()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -608,7 +571,7 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
template1 = NpcTable.getInstance().getTemplate(npcId);
|
template1 = NpcTable.getInstance().getTemplate(npcId);
|
||||||
tempSpawn = new Spawn(template1);
|
tempSpawn = new Spawn(template1);
|
||||||
// allocates it at random in the lair of Antharas.
|
// Allocates it at random in the lair of Antharas.
|
||||||
int tried = 0;
|
int tried = 0;
|
||||||
boolean notFound = true;
|
boolean notFound = true;
|
||||||
int x = 175000;
|
int x = 175000;
|
||||||
@@ -672,7 +635,6 @@ public class Antharas extends Quest
|
|||||||
return super.onAggroRangeEnter(npc, player, isPet);
|
return super.onAggroRangeEnter(npc, player, isPet);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do self destruction.
|
|
||||||
private class SelfDestructionOfBomber implements Runnable
|
private class SelfDestructionOfBomber implements Runnable
|
||||||
{
|
{
|
||||||
private final NpcInstance _bomber;
|
private final NpcInstance _bomber;
|
||||||
@@ -742,23 +704,21 @@ public class Antharas extends Quest
|
|||||||
return super.onSpellFinished(npc, player, skill);
|
return super.onSpellFinished(npc, player, skill);
|
||||||
}
|
}
|
||||||
|
|
||||||
// At end of activity time.
|
|
||||||
protected class CheckActivity implements Runnable
|
protected class CheckActivity implements Runnable
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public void run()
|
public void run()
|
||||||
{
|
{
|
||||||
final Long temp = (Chronos.currentTimeMillis() - _LastAction);
|
final Long temp = (Chronos.currentTimeMillis() - _lastAction);
|
||||||
if (temp > (Config.ANTHARAS_DESPAWN_TIME * 60000))
|
if (temp > (Config.ANTHARAS_DESPAWN_TIME * 60000))
|
||||||
{
|
{
|
||||||
GrandBossManager.getInstance().setBossStatus(_antharas.getNpcId(), DORMANT);
|
GrandBossManager.getInstance().setBossStatus(_antharas.getNpcId(), DORMANT);
|
||||||
setUnspawn();
|
finishRaid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Clean Antharas's lair.
|
public void finishRaid()
|
||||||
public void setUnspawn()
|
|
||||||
{
|
{
|
||||||
// Eliminate players.
|
// Eliminate players.
|
||||||
_zone.oustAllPlayers();
|
_zone.oustAllPlayers();
|
||||||
@@ -822,7 +782,6 @@ public class Antharas extends Quest
|
|||||||
_teleportCube.clear();
|
_teleportCube.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do spawn teleport cube.
|
|
||||||
private class CubeSpawn implements Runnable
|
private class CubeSpawn implements Runnable
|
||||||
{
|
{
|
||||||
private final int _type;
|
private final int _type;
|
||||||
@@ -842,12 +801,11 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
setUnspawn();
|
finishRaid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// UnLock Antharas.
|
|
||||||
private static class UnlockAntharas implements Runnable
|
private static class UnlockAntharas implements Runnable
|
||||||
{
|
{
|
||||||
private final int _bossId;
|
private final int _bossId;
|
||||||
@@ -871,7 +829,6 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Action is enabled the boss.
|
|
||||||
private class SetMobilised implements Runnable
|
private class SetMobilised implements Runnable
|
||||||
{
|
{
|
||||||
private final GrandBossInstance _boss;
|
private final GrandBossInstance _boss;
|
||||||
@@ -895,7 +852,6 @@ public class Antharas extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move at random on after Antharas appears.
|
|
||||||
private static class MoveAtRandom implements Runnable
|
private static class MoveAtRandom implements Runnable
|
||||||
{
|
{
|
||||||
private final NpcInstance _npc;
|
private final NpcInstance _npc;
|
||||||
@@ -917,9 +873,9 @@ public class Antharas extends Quest
|
|||||||
@Override
|
@Override
|
||||||
public String onAttack(NpcInstance npc, PlayerInstance attacker, int damage, boolean isPet)
|
public String onAttack(NpcInstance npc, PlayerInstance attacker, int damage, boolean isPet)
|
||||||
{
|
{
|
||||||
if ((npc.getNpcId() == 29019) || (npc.getNpcId() == 29066) || (npc.getNpcId() == 29067) || (npc.getNpcId() == 29068))
|
if ((npc.getNpcId() == ANTHARAS_OLD) || (npc.getNpcId() == ANTHARAS_WEAK) || (npc.getNpcId() == ANTHARAS_NORMAL) || (npc.getNpcId() == ANTHARAS_STRONG))
|
||||||
{
|
{
|
||||||
_LastAction = Chronos.currentTimeMillis();
|
_lastAction = Chronos.currentTimeMillis();
|
||||||
if (!FWA_OLDANTHARAS && (_mobsSpawnTask == null))
|
if (!FWA_OLDANTHARAS && (_mobsSpawnTask == null))
|
||||||
{
|
{
|
||||||
startMinionSpawns(npc.getNpcId());
|
startMinionSpawns(npc.getNpcId());
|
||||||
@@ -946,7 +902,6 @@ public class Antharas extends Quest
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
npc.doCast(skill);
|
npc.doCast(skill);
|
||||||
}
|
}
|
||||||
return super.onAttack(npc, attacker, damage, isPet);
|
return super.onAttack(npc, attacker, damage, isPet);
|
||||||
@@ -955,27 +910,27 @@ public class Antharas extends Quest
|
|||||||
@Override
|
@Override
|
||||||
public String onKill(NpcInstance npc, PlayerInstance killer, boolean isPet)
|
public String onKill(NpcInstance npc, PlayerInstance killer, boolean isPet)
|
||||||
{
|
{
|
||||||
if ((npc.getNpcId() == 29019) || (npc.getNpcId() == 29066) || (npc.getNpcId() == 29067) || (npc.getNpcId() == 29068))
|
if ((npc.getNpcId() == ANTHARAS_OLD) || (npc.getNpcId() == ANTHARAS_WEAK) || (npc.getNpcId() == ANTHARAS_NORMAL) || (npc.getNpcId() == ANTHARAS_STRONG))
|
||||||
{
|
{
|
||||||
npc.broadcastPacket(new PlaySound(1, "BS01_D", npc));
|
npc.broadcastPacket(new PlaySound(1, "BS01_D", npc));
|
||||||
_cubeSpawnTask = ThreadPool.schedule(new CubeSpawn(0), 10000);
|
_cubeSpawnTask = ThreadPool.schedule(new CubeSpawn(0), 10000);
|
||||||
GrandBossManager.getInstance().setBossStatus(npc.getNpcId(), DEAD);
|
GrandBossManager.getInstance().setBossStatus(npc.getNpcId(), DEAD);
|
||||||
final long respawnTime = (Config.ANTHARAS_RESP_FIRST + Rnd.get(Config.ANTHARAS_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.ANTHARAS_RESP_FIRST + Rnd.get(Config.ANTHARAS_RESP_SECOND)) * 3600000;
|
||||||
ThreadPool.schedule(new UnlockAntharas(npc.getNpcId()), respawnTime);
|
ThreadPool.schedule(new UnlockAntharas(npc.getNpcId()), respawnTime);
|
||||||
// also save the respawn time so that the info is maintained past reboots
|
// Also save the respawn time so that the info is maintained past restarts.
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(npc.getNpcId());
|
final StatSet info = GrandBossManager.getInstance().getStatSet(npc.getNpcId());
|
||||||
info.set("respawn_time", (Chronos.currentTimeMillis() + respawnTime));
|
info.set("respawn_time", (Chronos.currentTimeMillis() + respawnTime));
|
||||||
GrandBossManager.getInstance().setStatSet(npc.getNpcId(), info);
|
GrandBossManager.getInstance().setStatSet(npc.getNpcId(), info);
|
||||||
}
|
}
|
||||||
else if (npc.getNpcId() == 29069)
|
else if (npc.getNpcId() == 29069)
|
||||||
{
|
{
|
||||||
final int countHPHerb = Rnd.get(6, 18);
|
final int hpHerbCount = Rnd.get(6, 18);
|
||||||
final int countMPHerb = Rnd.get(6, 18);
|
final int mpHerbCount = Rnd.get(6, 18);
|
||||||
for (int i = 0; i < countHPHerb; i++)
|
for (int i = 0; i < hpHerbCount; i++)
|
||||||
{
|
{
|
||||||
((MonsterInstance) npc).dropItem(killer, 8602, 1);
|
((MonsterInstance) npc).dropItem(killer, 8602, 1);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < countMPHerb; i++)
|
for (int i = 0; i < mpHerbCount; i++)
|
||||||
{
|
{
|
||||||
((MonsterInstance) npc).dropItem(killer, 8605, 1);
|
((MonsterInstance) npc).dropItem(killer, 8605, 1);
|
||||||
}
|
}
|
||||||
|
@@ -66,19 +66,14 @@ public class Baium extends Quest
|
|||||||
{
|
{
|
||||||
protected static final Logger LOGGER = Logger.getLogger(Baium.class.getName());
|
protected static final Logger LOGGER = Logger.getLogger(Baium.class.getName());
|
||||||
|
|
||||||
private Creature _target;
|
// Baium status.
|
||||||
private Skill _skill;
|
private static final byte ASLEEP = 0; // Baium is in the stone version, waiting to be woken up. Entry is unlocked.
|
||||||
|
private static final byte AWAKE = 1; // Baium is awake and fighting. Entry is locked.
|
||||||
|
private static final byte DEAD = 2; // Baium has been killed and has not yet spawned. Entry is locked.
|
||||||
private static final int STONE_BAIUM = 29025;
|
private static final int STONE_BAIUM = 29025;
|
||||||
private static final int ANGELIC_VORTEX = 31862;
|
private static final int ANGELIC_VORTEX = 31862;
|
||||||
private static final int LIVE_BAIUM = 29020;
|
private static final int LIVE_BAIUM = 29020;
|
||||||
private static final int ARCHANGEL = 29021;
|
private static final int ARCHANGEL = 29021;
|
||||||
|
|
||||||
// Baium status tracking,
|
|
||||||
private static final byte ASLEEP = 0; // baium is in the stone version, waiting to be woken up. Entry is unlocked,
|
|
||||||
private static final byte AWAKE = 1; // baium is awake and fighting. Entry is locked.
|
|
||||||
private static final byte DEAD = 2; // baium has been killed and has not yet spawned. Entry is locked,
|
|
||||||
|
|
||||||
// Archangel locations.
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
private static final int[][] ANGEL_LOCATION =
|
private static final int[][] ANGEL_LOCATION =
|
||||||
{
|
{
|
||||||
@@ -89,44 +84,42 @@ public class Baium extends Quest
|
|||||||
{115792, 16608, 10080, 0},
|
{115792, 16608, 10080, 0},
|
||||||
};
|
};
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
|
// Misc.
|
||||||
private long _lastAttackVsBaiumTime = 0;
|
private long _lastAttackVsBaiumTime = 0;
|
||||||
private final List<NpcInstance> _minions = new CopyOnWriteArrayList<>();
|
private final List<NpcInstance> _minions = new CopyOnWriteArrayList<>();
|
||||||
protected BossZone _zone;
|
private BossZone _zone;
|
||||||
|
private Creature _target;
|
||||||
|
private Skill _skill;
|
||||||
|
|
||||||
public Baium()
|
public Baium()
|
||||||
{
|
{
|
||||||
super(-1, "ai/bosses");
|
super(-1, "ai/bosses");
|
||||||
|
|
||||||
final int[] mob =
|
registerMobs(LIVE_BAIUM);
|
||||||
{
|
|
||||||
LIVE_BAIUM
|
|
||||||
};
|
|
||||||
registerMobs(mob);
|
|
||||||
|
|
||||||
// Quest NPC starter initialization
|
// Quest NPC starter initialization
|
||||||
addStartNpc(STONE_BAIUM);
|
addStartNpc(STONE_BAIUM);
|
||||||
addStartNpc(ANGELIC_VORTEX);
|
addStartNpc(ANGELIC_VORTEX);
|
||||||
addTalkId(STONE_BAIUM);
|
addTalkId(STONE_BAIUM);
|
||||||
addTalkId(ANGELIC_VORTEX);
|
addTalkId(ANGELIC_VORTEX);
|
||||||
|
|
||||||
_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
|
_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
|
||||||
|
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(LIVE_BAIUM);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(LIVE_BAIUM);
|
||||||
final Integer status = GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM);
|
final Integer status = GrandBossManager.getInstance().getBossStatus(LIVE_BAIUM);
|
||||||
if (status == DEAD)
|
if (status == DEAD)
|
||||||
{
|
{
|
||||||
// load the unlock date and time for baium from DB
|
// Load the unlock date and time for baium from DB.
|
||||||
final long temp = (info.getLong("respawn_time") - Chronos.currentTimeMillis());
|
final long temp = (info.getLong("respawn_time") - Chronos.currentTimeMillis());
|
||||||
if (temp > 0)
|
if (temp > 0)
|
||||||
{
|
{
|
||||||
// the unlock time has not yet expired. Mark Baium as currently locked (dead). Setup a timer
|
// The unlock time has not yet expired. Mark Baium as currently locked (dead).
|
||||||
// to fire at the correct time (calculate the time between now and the unlock time,
|
// Setup a timer to fire at the correct time (calculate the time between now and the unlock time, setup a timer to fire after that many msec).
|
||||||
// setup a timer to fire after that many msec)
|
|
||||||
startQuestTimer("baium_unlock", temp, null, null);
|
startQuestTimer("baium_unlock", temp, null, null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// the time has already expired while the server was offline. Delete the saved time and
|
// The time has already expired while the server was offline. Delete the saved time and immediately spawn the stone-baium. Also the state need not be changed from ASLEEP.
|
||||||
// immediately spawn the stone-baium. Also the state need not be changed from ASLEEP
|
|
||||||
addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0);
|
addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0);
|
||||||
if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
|
if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
|
||||||
{
|
{
|
||||||
@@ -137,13 +130,13 @@ public class Baium extends Quest
|
|||||||
}
|
}
|
||||||
else if (status == AWAKE)
|
else if (status == AWAKE)
|
||||||
{
|
{
|
||||||
final int loc_x = info.getInt("loc_x");
|
final int x = info.getInt("loc_x");
|
||||||
final int loc_y = info.getInt("loc_y");
|
final int y = info.getInt("loc_y");
|
||||||
final int loc_z = info.getInt("loc_z");
|
final int z = info.getInt("loc_z");
|
||||||
final int heading = info.getInt("heading");
|
final int heading = info.getInt("heading");
|
||||||
final int hp = info.getInt("currentHP");
|
final int hp = info.getInt("currentHP");
|
||||||
final int mp = info.getInt("currentMP");
|
final int mp = info.getInt("currentMP");
|
||||||
final GrandBossInstance baium = (GrandBossInstance) addSpawn(LIVE_BAIUM, loc_x, loc_y, loc_z, heading, false, 0);
|
final GrandBossInstance baium = (GrandBossInstance) addSpawn(LIVE_BAIUM, x, y, z, heading, false, 0);
|
||||||
if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
|
if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
|
||||||
{
|
{
|
||||||
AnnouncementsTable.getInstance().announceToAll("Raid boss " + baium.getName() + " spawned in world.");
|
AnnouncementsTable.getInstance().announceToAll("Raid boss " + baium.getName() + " spawned in world.");
|
||||||
@@ -163,7 +156,7 @@ public class Baium extends Quest
|
|||||||
{
|
{
|
||||||
LOGGER.warning(e.getMessage());
|
LOGGER.warning(e.getMessage());
|
||||||
}
|
}
|
||||||
}, 100L);
|
}, 100);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -201,7 +194,8 @@ public class Baium extends Quest
|
|||||||
{
|
{
|
||||||
npc.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
|
npc.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
|
||||||
npc.broadcastPacket(new Earthquake(npc.getX(), npc.getY(), npc.getZ(), 40, 5));
|
npc.broadcastPacket(new Earthquake(npc.getX(), npc.getY(), npc.getZ(), 40, 5));
|
||||||
// start monitoring baium's inactivity
|
|
||||||
|
// Start monitoring baium's inactivity.
|
||||||
_lastAttackVsBaiumTime = Chronos.currentTimeMillis();
|
_lastAttackVsBaiumTime = Chronos.currentTimeMillis();
|
||||||
startQuestTimer("baium_despawn", 60000, npc, null, true);
|
startQuestTimer("baium_despawn", 60000, npc, null, true);
|
||||||
if (player != null)
|
if (player != null)
|
||||||
@@ -227,9 +221,8 @@ public class Baium extends Quest
|
|||||||
{
|
{
|
||||||
LOGGER.warning(e.getMessage());
|
LOGGER.warning(e.getMessage());
|
||||||
}
|
}
|
||||||
}, 11100L);
|
}, 11100);
|
||||||
// TODO: the person who woke baium up should be knocked across the room, onto a wall, and
|
// TODO: the person who woke baium up should be knocked across the room, onto a wall, and lose massive amounts of HP.
|
||||||
// lose massive amounts of HP.
|
|
||||||
for (int[] element : ANGEL_LOCATION)
|
for (int[] element : ANGEL_LOCATION)
|
||||||
{
|
{
|
||||||
final MonsterInstance angel = (MonsterInstance) addSpawn(ARCHANGEL, element[0], element[1], element[2], element[3], false, 0);
|
final MonsterInstance angel = (MonsterInstance) addSpawn(ARCHANGEL, element[0], element[1], element[2], element[3], false, 0);
|
||||||
@@ -239,21 +232,20 @@ public class Baium extends Quest
|
|||||||
angel.isAggressive();
|
angel.isAggressive();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// despawn the live baium after 30 minutes of inactivity
|
|
||||||
// also check if the players are cheating, having pulled Baium outside his zone...
|
|
||||||
}
|
}
|
||||||
else if (event.equals("baium_despawn") && (npc != null))
|
else if (event.equals("baium_despawn") && (npc != null))
|
||||||
{
|
{
|
||||||
|
// Despawn the live baium after 30 minutes of inactivity also check if the players are cheating, having pulled Baium outside his zone...
|
||||||
if (npc.getNpcId() == LIVE_BAIUM)
|
if (npc.getNpcId() == LIVE_BAIUM)
|
||||||
{
|
{
|
||||||
// just in case the zone reference has been lost (somehow...), restore the reference
|
// Just in case the zone reference has been lost (somehow...), restore the reference.
|
||||||
if (_zone == null)
|
if (_zone == null)
|
||||||
{
|
{
|
||||||
_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
|
_zone = GrandBossManager.getInstance().getZone(113100, 14500, 10077);
|
||||||
}
|
}
|
||||||
if ((_lastAttackVsBaiumTime + (Config.BAIUM_SLEEP * 1000)) < Chronos.currentTimeMillis())
|
if ((_lastAttackVsBaiumTime + (Config.BAIUM_SLEEP * 1000)) < Chronos.currentTimeMillis())
|
||||||
{
|
{
|
||||||
npc.deleteMe(); // despawn the live-baium
|
npc.deleteMe(); // Despawn the live-baium.
|
||||||
for (NpcInstance minion : _minions)
|
for (NpcInstance minion : _minions)
|
||||||
{
|
{
|
||||||
if (minion != null)
|
if (minion != null)
|
||||||
@@ -263,8 +255,8 @@ public class Baium extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
_minions.clear();
|
_minions.clear();
|
||||||
addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0); // spawn stone-baium
|
addSpawn(STONE_BAIUM, 116033, 17447, 10104, 40188, false, 0); // Spawn stone-baium.
|
||||||
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP); // mark that Baium is not awake any more
|
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, ASLEEP); // Mark that Baium is not awake any more.
|
||||||
_zone.oustAllPlayers();
|
_zone.oustAllPlayers();
|
||||||
cancelQuestTimer("baium_despawn", npc, null);
|
cancelQuestTimer("baium_despawn", npc, null);
|
||||||
}
|
}
|
||||||
@@ -301,8 +293,7 @@ public class Baium extends Quest
|
|||||||
{
|
{
|
||||||
if (Config.ALLOW_DIRECT_TP_TO_BOSS_ROOM || _zone.isPlayerAllowed(player))
|
if (Config.ALLOW_DIRECT_TP_TO_BOSS_ROOM || _zone.isPlayerAllowed(player))
|
||||||
{
|
{
|
||||||
// once Baium is awaken, no more people may enter until he dies, the server reboots, or
|
// Once Baium is awaken, no more people may enter until he dies, the server reboots, or 30 minutes pass with no attacks made against Baium.
|
||||||
// 30 minutes pass with no attacks made against Baium.
|
|
||||||
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, AWAKE);
|
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, AWAKE);
|
||||||
npc.deleteMe();
|
npc.deleteMe();
|
||||||
final GrandBossInstance baium = (GrandBossInstance) addSpawn(LIVE_BAIUM, npc);
|
final GrandBossInstance baium = (GrandBossInstance) addSpawn(LIVE_BAIUM, npc);
|
||||||
@@ -325,21 +316,20 @@ public class Baium extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
htmltext = "Conditions are not right to wake up Baium";
|
htmltext = "Conditions are not right to wake up Baium.";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (npcId == ANGELIC_VORTEX)
|
else if (npcId == ANGELIC_VORTEX)
|
||||||
{
|
{
|
||||||
if (player.isFlying())
|
if (player.isFlying())
|
||||||
{
|
{
|
||||||
// print "Player "+player.getName()+" attempted to enter Baium's lair while flying!";
|
return "<html><body>Angelic Vortex:<br>You may not enter while flying a wyvern.</body></html>";
|
||||||
return "<html><body>Angelic Vortex:<br>You may not enter while flying a wyvern</body></html>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((status == ASLEEP) && (player.getQuestState(getName()).getQuestItemsCount(4295) > 0)) // bloody fabric
|
if ((status == ASLEEP) && (player.getQuestState(getName()).getQuestItemsCount(4295) > 0)) // Bloody fabric.
|
||||||
{
|
{
|
||||||
player.getQuestState(getName()).takeItems(4295, 1);
|
player.getQuestState(getName()).takeItems(4295, 1);
|
||||||
// allow entry for the player for the next 30 secs (more than enough time for the TP to happen)
|
// Allow entry for the player for the next 30 secs (more than enough time for the TP to happen).
|
||||||
// Note: this just means 30secs to get in, no limits on how long it takes before we get out.
|
// Note: this just means 30secs to get in, no limits on how long it takes before we get out.
|
||||||
_zone.allowPlayerEntry(player, 30);
|
_zone.allowPlayerEntry(player, 30);
|
||||||
player.teleToLocation(113100, 14500, 10077);
|
player.teleToLocation(113100, 14500, 10077);
|
||||||
@@ -398,7 +388,7 @@ public class Baium extends Quest
|
|||||||
npc.doCast(SkillTable.getInstance().getSkill(4258, 1));
|
npc.doCast(SkillTable.getInstance().getSkill(4258, 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// update a variable with the last action against baium
|
// Update a variable with the last action against Baium.
|
||||||
_lastAttackVsBaiumTime = Chronos.currentTimeMillis();
|
_lastAttackVsBaiumTime = Chronos.currentTimeMillis();
|
||||||
callSkillAI(npc);
|
callSkillAI(npc);
|
||||||
}
|
}
|
||||||
@@ -410,13 +400,13 @@ public class Baium extends Quest
|
|||||||
{
|
{
|
||||||
npc.broadcastPacket(new PlaySound(1, "BS01_D", npc));
|
npc.broadcastPacket(new PlaySound(1, "BS01_D", npc));
|
||||||
cancelQuestTimer("baium_despawn", npc, null);
|
cancelQuestTimer("baium_despawn", npc, null);
|
||||||
// spawn the "Teleportation Cubic" for 15 minutes (to allow players to exit the lair)
|
// Spawn the "Teleportation Cubic" for 15 minutes (to allow players to exit the lair).
|
||||||
addSpawn(29055, 115203, 16620, 10078, 0, false, 900000); // //should we teleport everyone out if the cubic despawns??
|
addSpawn(29055, 115203, 16620, 10078, 0, false, 900000); // Should we teleport everyone out if the cubic despawns??
|
||||||
// "lock" baium for 5 days and 1 to 8 hours [i.e. 432,000,000 + 1*3,600,000 + random-less-than(8*3,600,000) millisecs]
|
// Lock baium for 5 days and 1 to 8 hours [i.e. 432,000,000 + 1*3,600,000 + random-less-than(8*3,600,000) millisecs]
|
||||||
final long respawnTime = (Config.BAIUM_RESP_FIRST + Rnd.get(Config.BAIUM_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.BAIUM_RESP_FIRST + Rnd.get(Config.BAIUM_RESP_SECOND)) * 3600000;
|
||||||
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, DEAD);
|
GrandBossManager.getInstance().setBossStatus(LIVE_BAIUM, DEAD);
|
||||||
startQuestTimer("baium_unlock", respawnTime, null, null);
|
startQuestTimer("baium_unlock", respawnTime, null, null);
|
||||||
// also save the respawn time so that the info is maintained past reboots
|
// Also save the respawn time so that the info is maintained past reboots.
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(LIVE_BAIUM);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(LIVE_BAIUM);
|
||||||
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
||||||
GrandBossManager.getInstance().setStatSet(LIVE_BAIUM, info);
|
GrandBossManager.getInstance().setStatSet(LIVE_BAIUM, info);
|
||||||
@@ -482,7 +472,7 @@ public class Baium extends Quest
|
|||||||
}
|
}
|
||||||
startQuestTimer("clean_player", 20000, npc, null);
|
startQuestTimer("clean_player", 20000, npc, null);
|
||||||
|
|
||||||
return result.get(Rnd.get(result.size()));
|
return getRandomEntry(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
public synchronized void callSkillAI(NpcInstance npc)
|
public synchronized void callSkillAI(NpcInstance npc)
|
||||||
|
@@ -75,12 +75,11 @@ public class Core extends Quest
|
|||||||
MINNION_SPAWNS.put(SUSCEPTOR, new Location(17706, 109423, -6488));
|
MINNION_SPAWNS.put(SUSCEPTOR, new Location(17706, 109423, -6488));
|
||||||
MINNION_SPAWNS.put(SUSCEPTOR, new Location(17849, 109388, -6480));
|
MINNION_SPAWNS.put(SUSCEPTOR, new Location(17849, 109388, -6480));
|
||||||
}
|
}
|
||||||
// Misc
|
// Status.
|
||||||
private static final byte ALIVE = 0;
|
private static final byte ALIVE = 0;
|
||||||
private static final byte DEAD = 1;
|
private static final byte DEAD = 1;
|
||||||
|
// Misc.
|
||||||
private static boolean _firstAttacked;
|
private static boolean _firstAttacked;
|
||||||
|
|
||||||
private static final Collection<Attackable> _minions = ConcurrentHashMap.newKeySet();
|
private static final Collection<Attackable> _minions = ConcurrentHashMap.newKeySet();
|
||||||
|
|
||||||
public Core()
|
public Core()
|
||||||
@@ -149,7 +148,7 @@ public class Core extends Quest
|
|||||||
{
|
{
|
||||||
GrandBossManager.getInstance().addBoss(npc);
|
GrandBossManager.getInstance().addBoss(npc);
|
||||||
npc.broadcastPacket(new PlaySound(1, "BS01_A", npc));
|
npc.broadcastPacket(new PlaySound(1, "BS01_A", npc));
|
||||||
// Spawn minions
|
// Spawn minions.
|
||||||
Attackable mob;
|
Attackable mob;
|
||||||
Location spawnLocation;
|
Location spawnLocation;
|
||||||
for (Entry<Integer, Location> spawn : MINNION_SPAWNS.entrySet())
|
for (Entry<Integer, Location> spawn : MINNION_SPAWNS.entrySet())
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -36,11 +36,6 @@ import org.l2jmobius.gameserver.model.spawn.Spawn;
|
|||||||
public class Gordon extends Quest
|
public class Gordon extends Quest
|
||||||
{
|
{
|
||||||
private static final int GORDON = 29095;
|
private static final int GORDON = 29095;
|
||||||
private static int _npcMoveX = 0;
|
|
||||||
private static int _npcMoveY = 0;
|
|
||||||
private static int _isWalkTo = 0;
|
|
||||||
private static int _npcBlock = 0;
|
|
||||||
|
|
||||||
// @formatter:off
|
// @formatter:off
|
||||||
private static final int[][] WALKS =
|
private static final int[][] WALKS =
|
||||||
{
|
{
|
||||||
@@ -101,9 +96,13 @@ public class Gordon extends Quest
|
|||||||
{141569, -45908, -2387}
|
{141569, -45908, -2387}
|
||||||
};
|
};
|
||||||
// @formatter:on
|
// @formatter:on
|
||||||
|
// Misc.
|
||||||
private static boolean _isAttacked = false;
|
private static boolean _isAttacked = false;
|
||||||
private static boolean _isSpawned = false;
|
private static boolean _isSpawned = false;
|
||||||
|
private static int _npcMoveX = 0;
|
||||||
|
private static int _npcMoveY = 0;
|
||||||
|
private static int _isWalkTo = 0;
|
||||||
|
private static int _npcBlock = 0;
|
||||||
|
|
||||||
public Gordon()
|
public Gordon()
|
||||||
{
|
{
|
||||||
@@ -113,7 +112,7 @@ public class Gordon extends Quest
|
|||||||
addEventId(GORDON, EventType.ON_ATTACK);
|
addEventId(GORDON, EventType.ON_ATTACK);
|
||||||
addEventId(GORDON, EventType.ON_SPAWN);
|
addEventId(GORDON, EventType.ON_SPAWN);
|
||||||
|
|
||||||
// wait 2 minutes after Start AI
|
// Wait 2 minutes after Start AI.
|
||||||
startQuestTimer("check_ai", 120000, null, null, true);
|
startQuestTimer("check_ai", 120000, null, null, true);
|
||||||
|
|
||||||
_isSpawned = false;
|
_isSpawned = false;
|
||||||
@@ -163,7 +162,7 @@ public class Gordon extends Quest
|
|||||||
// startQuestTimer("Start", 1000, npc, null);
|
// startQuestTimer("Start", 1000, npc, null);
|
||||||
if ((npc != null) && _isSpawned)
|
if ((npc != null) && _isSpawned)
|
||||||
{
|
{
|
||||||
// check if player have Cursed Weapon and in radius
|
// Check if player have Cursed Weapon and in radius.
|
||||||
if (npc.getNpcId() == GORDON)
|
if (npc.getNpcId() == GORDON)
|
||||||
{
|
{
|
||||||
final Collection<PlayerInstance> chars = npc.getKnownList().getKnownPlayers().values();
|
final Collection<PlayerInstance> chars = npc.getKnownList().getKnownPlayers().values();
|
||||||
@@ -184,7 +183,7 @@ public class Gordon extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// end check
|
|
||||||
if (_isAttacked)
|
if (_isAttacked)
|
||||||
{
|
{
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
@@ -201,13 +200,15 @@ public class Gordon extends Quest
|
|||||||
y = WALKS[_isWalkTo - 1][1];
|
y = WALKS[_isWalkTo - 1][1];
|
||||||
z = WALKS[_isWalkTo - 1][2];
|
z = WALKS[_isWalkTo - 1][2];
|
||||||
npc.setWalking();
|
npc.setWalking();
|
||||||
// TODO: find better way to prevent teleporting to the home location
|
|
||||||
|
// TODO: Find better way to prevent teleporting to home location.
|
||||||
npc.getSpawn().setX(x);
|
npc.getSpawn().setX(x);
|
||||||
npc.getSpawn().setY(y);
|
npc.getSpawn().setY(y);
|
||||||
npc.getSpawn().setZ(z);
|
npc.getSpawn().setZ(z);
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(x, y, z, 0));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(x, y, z, 0));
|
||||||
}
|
}
|
||||||
// Test for unblock Npc
|
|
||||||
|
// Test for unblock NPC.
|
||||||
if ((npc.getX() != _npcMoveX) && (npc.getY() != _npcMoveY))
|
if ((npc.getX() != _npcMoveX) && (npc.getY() != _npcMoveY))
|
||||||
{
|
{
|
||||||
_npcMoveX = npc.getX();
|
_npcMoveX = npc.getX();
|
||||||
@@ -224,14 +225,13 @@ public class Gordon extends Quest
|
|||||||
}
|
}
|
||||||
if (_npcBlock > 0)
|
if (_npcBlock > 0)
|
||||||
{
|
{
|
||||||
// TODO: find better way to prevent teleporting to the home location
|
// TODO: Find better way to prevent teleporting to home location.
|
||||||
npc.getSpawn().setX(x);
|
npc.getSpawn().setX(x);
|
||||||
npc.getSpawn().setY(y);
|
npc.getSpawn().setY(y);
|
||||||
npc.getSpawn().setZ(z);
|
npc.getSpawn().setZ(z);
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(x, y, z, 0));
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new Location(x, y, z, 0));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// End Test unblock Npc
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -45,8 +45,22 @@ import org.l2jmobius.gameserver.network.serverpackets.NpcHtmlMessage;
|
|||||||
*/
|
*/
|
||||||
public class IceFairySirra extends Quest
|
public class IceFairySirra extends Quest
|
||||||
{
|
{
|
||||||
|
// NPC
|
||||||
private static final int STEWARD = 32029;
|
private static final int STEWARD = 32029;
|
||||||
|
// Item
|
||||||
private static final int SILVER_HEMOCYTE = 8057;
|
private static final int SILVER_HEMOCYTE = 8057;
|
||||||
|
// Spawns
|
||||||
|
// @formatter:off
|
||||||
|
private static final int[][] MONSTER_SPAWNS =
|
||||||
|
{
|
||||||
|
{29060, 105546, -127892, -2768},
|
||||||
|
{29056, 102779, -125920, -2840},
|
||||||
|
{22100, 111719, -126646, -2992},
|
||||||
|
{22102, 109509, -128946, -3216},
|
||||||
|
{22104, 109680, -125756, -3136}
|
||||||
|
};
|
||||||
|
// @formatter:on
|
||||||
|
// Misc.
|
||||||
private static BossZone _freyasZone;
|
private static BossZone _freyasZone;
|
||||||
private static PlayerInstance _player = null;
|
private static PlayerInstance _player = null;
|
||||||
protected Collection<NpcInstance> _allMobs = ConcurrentHashMap.newKeySet();
|
protected Collection<NpcInstance> _allMobs = ConcurrentHashMap.newKeySet();
|
||||||
@@ -55,6 +69,7 @@ public class IceFairySirra extends Quest
|
|||||||
public IceFairySirra()
|
public IceFairySirra()
|
||||||
{
|
{
|
||||||
super(-1, "ai/bosses");
|
super(-1, "ai/bosses");
|
||||||
|
|
||||||
final int[] mobs =
|
final int[] mobs =
|
||||||
{
|
{
|
||||||
STEWARD,
|
STEWARD,
|
||||||
@@ -65,7 +80,6 @@ public class IceFairySirra extends Quest
|
|||||||
|
|
||||||
for (int mob : mobs)
|
for (int mob : mobs)
|
||||||
{
|
{
|
||||||
// TODO:
|
|
||||||
addEventId(mob, EventType.QUEST_START);
|
addEventId(mob, EventType.QUEST_START);
|
||||||
addEventId(mob, EventType.QUEST_TALK);
|
addEventId(mob, EventType.QUEST_TALK);
|
||||||
addEventId(mob, EventType.NPC_FIRST_TALK);
|
addEventId(mob, EventType.NPC_FIRST_TALK);
|
||||||
@@ -98,75 +112,84 @@ public class IceFairySirra extends Quest
|
|||||||
@Override
|
@Override
|
||||||
public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
|
public String onAdvEvent(String event, NpcInstance npc, PlayerInstance player)
|
||||||
{
|
{
|
||||||
if (event.equals("check_condition"))
|
switch (event)
|
||||||
{
|
{
|
||||||
if (npc.isBusy())
|
case "check_condition":
|
||||||
{
|
{
|
||||||
return super.onAdvEvent(event, npc, player);
|
if (npc.isBusy())
|
||||||
}
|
|
||||||
|
|
||||||
String filename = "";
|
|
||||||
if (player.isInParty() && (player.getParty().getPartyLeaderOID() == player.getObjectId()))
|
|
||||||
{
|
|
||||||
if (checkItems(player))
|
|
||||||
{
|
{
|
||||||
startQuestTimer("start", 100000, null, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
_player = player;
|
}
|
||||||
destroyItems(player);
|
String filename = "";
|
||||||
player.getInventory().addItem("Scroll", 8379, 3, player, null);
|
if (player.isInParty() && (player.getParty().getPartyLeaderOID() == player.getObjectId()))
|
||||||
npc.setBusy(true);
|
{
|
||||||
screenMessage(player, "Steward: Please wait a moment.", 100000);
|
if (checkItems(player))
|
||||||
filename = getHtmlPath(3);
|
{
|
||||||
|
startQuestTimer("start", 100000, null, player);
|
||||||
|
_player = player;
|
||||||
|
destroyItems(player);
|
||||||
|
player.getInventory().addItem("Scroll", 8379, 3, player, null);
|
||||||
|
npc.setBusy(true);
|
||||||
|
screenMessage(player, "Steward: Please wait a moment.", 100000);
|
||||||
|
filename = getHtmlPath(3);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
filename = getHtmlPath(2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
filename = getHtmlPath(2);
|
filename = getHtmlPath(1);
|
||||||
}
|
}
|
||||||
|
sendHtml(npc, player, filename);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else
|
case "start":
|
||||||
{
|
{
|
||||||
filename = getHtmlPath(1);
|
if (_freyasZone == null)
|
||||||
|
{
|
||||||
|
LOGGER.warning("IceFairySirraManager: Failed to load zone");
|
||||||
|
cleanUp();
|
||||||
|
return super.onAdvEvent(event, npc, player);
|
||||||
|
}
|
||||||
|
_freyasZone.setZoneEnabled(true);
|
||||||
|
closeGates();
|
||||||
|
doSpawns();
|
||||||
|
startQuestTimer("Party_Port", 2000, null, player);
|
||||||
|
startQuestTimer("End", 1802000, null, player);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
sendHtml(npc, player, filename);
|
case "Party_Port":
|
||||||
}
|
|
||||||
else if (event.equals("start"))
|
|
||||||
{
|
|
||||||
if (_freyasZone == null)
|
|
||||||
{
|
{
|
||||||
LOGGER.warning("IceFairySirraManager: Failed to load zone");
|
teleportInside(player);
|
||||||
|
screenMessage(player, "Steward: Please restore the Queen's appearance!", 10000);
|
||||||
|
startQuestTimer("30MinutesRemaining", 300000, null, player);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "30MinutesRemaining":
|
||||||
|
{
|
||||||
|
screenMessage(player, "30 minute(s) are remaining.", 10000);
|
||||||
|
startQuestTimer("20minutesremaining", 600000, null, player);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "20MinutesRemaining":
|
||||||
|
{
|
||||||
|
screenMessage(player, "20 minute(s) are remaining.", 10000);
|
||||||
|
startQuestTimer("10minutesremaining", 600000, null, player);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "10MinutesRemaining":
|
||||||
|
{
|
||||||
|
screenMessage(player, "Steward: Waste no time! Please hurry!", 10000);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "End":
|
||||||
|
{
|
||||||
|
screenMessage(player, "Steward: Was it indeed too much to ask.", 10000);
|
||||||
cleanUp();
|
cleanUp();
|
||||||
return super.onAdvEvent(event, npc, player);
|
break;
|
||||||
}
|
}
|
||||||
_freyasZone.setZoneEnabled(true);
|
|
||||||
closeGates();
|
|
||||||
doSpawns();
|
|
||||||
startQuestTimer("Party_Port", 2000, null, player);
|
|
||||||
startQuestTimer("End", 1802000, null, player);
|
|
||||||
}
|
|
||||||
else if (event.equals("Party_Port"))
|
|
||||||
{
|
|
||||||
teleportInside(player);
|
|
||||||
screenMessage(player, "Steward: Please restore the Queen's appearance!", 10000);
|
|
||||||
startQuestTimer("30MinutesRemaining", 300000, null, player);
|
|
||||||
}
|
|
||||||
else if (event.equals("30MinutesRemaining"))
|
|
||||||
{
|
|
||||||
screenMessage(player, "30 minute(s) are remaining.", 10000);
|
|
||||||
startQuestTimer("20minutesremaining", 600000, null, player);
|
|
||||||
}
|
|
||||||
else if (event.equals("20MinutesRemaining"))
|
|
||||||
{
|
|
||||||
screenMessage(player, "20 minute(s) are remaining.", 10000);
|
|
||||||
startQuestTimer("10minutesremaining", 600000, null, player);
|
|
||||||
}
|
|
||||||
else if (event.equals("10MinutesRemaining"))
|
|
||||||
{
|
|
||||||
screenMessage(player, "Steward: Waste no time! Please hurry!", 10000);
|
|
||||||
}
|
|
||||||
else if (event.equals("End"))
|
|
||||||
{
|
|
||||||
screenMessage(player, "Steward: Was it indeed too much to ask.", 10000);
|
|
||||||
cleanUp();
|
|
||||||
}
|
}
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
@@ -345,53 +368,20 @@ public class IceFairySirra extends Quest
|
|||||||
|
|
||||||
public void doSpawns()
|
public void doSpawns()
|
||||||
{
|
{
|
||||||
final int[][] mobs =
|
|
||||||
{
|
|
||||||
{
|
|
||||||
29060,
|
|
||||||
105546,
|
|
||||||
-127892,
|
|
||||||
-2768
|
|
||||||
},
|
|
||||||
{
|
|
||||||
29056,
|
|
||||||
102779,
|
|
||||||
-125920,
|
|
||||||
-2840
|
|
||||||
},
|
|
||||||
{
|
|
||||||
22100,
|
|
||||||
111719,
|
|
||||||
-126646,
|
|
||||||
-2992
|
|
||||||
},
|
|
||||||
{
|
|
||||||
22102,
|
|
||||||
109509,
|
|
||||||
-128946,
|
|
||||||
-3216
|
|
||||||
},
|
|
||||||
{
|
|
||||||
22104,
|
|
||||||
109680,
|
|
||||||
-125756,
|
|
||||||
-3136
|
|
||||||
}
|
|
||||||
};
|
|
||||||
Spawn spawnDat;
|
Spawn spawnDat;
|
||||||
NpcTemplate template;
|
NpcTemplate template;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
for (int i = 0; i < 5; i++)
|
for (int i = 0; i < 5; i++)
|
||||||
{
|
{
|
||||||
template = NpcTable.getInstance().getTemplate(mobs[i][0]);
|
template = NpcTable.getInstance().getTemplate(MONSTER_SPAWNS[i][0]);
|
||||||
if (template != null)
|
if (template != null)
|
||||||
{
|
{
|
||||||
spawnDat = new Spawn(template);
|
spawnDat = new Spawn(template);
|
||||||
spawnDat.setAmount(1);
|
spawnDat.setAmount(1);
|
||||||
spawnDat.setX(mobs[i][1]);
|
spawnDat.setX(MONSTER_SPAWNS[i][1]);
|
||||||
spawnDat.setY(mobs[i][2]);
|
spawnDat.setY(MONSTER_SPAWNS[i][2]);
|
||||||
spawnDat.setZ(mobs[i][3]);
|
spawnDat.setZ(MONSTER_SPAWNS[i][3]);
|
||||||
spawnDat.setHeading(0);
|
spawnDat.setHeading(0);
|
||||||
spawnDat.setRespawnDelay(60);
|
spawnDat.setRespawnDelay(60);
|
||||||
SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
SpawnTable.getInstance().addNewSpawn(spawnDat, false);
|
||||||
@@ -400,7 +390,7 @@ public class IceFairySirra extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("IceFairySirraManager: Data missing in NPC table for ID: " + mobs[i][0]);
|
LOGGER.warning("IceFairySirraManager: Data missing in NPC table for ID: " + MONSTER_SPAWNS[i][0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -422,7 +412,7 @@ public class IceFairySirra extends Quest
|
|||||||
final String temp = "data/html/default/" + pom + ".htm";
|
final String temp = "data/html/default/" + pom + ".htm";
|
||||||
if (!Config.LAZY_CACHE)
|
if (!Config.LAZY_CACHE)
|
||||||
{
|
{
|
||||||
// If not running lazy cache the file must be in the cache or it doesnt exist
|
// If not running lazy cache the file must be in the cache or it does not exist.
|
||||||
if (HtmCache.getInstance().contains(temp))
|
if (HtmCache.getInstance().contains(temp))
|
||||||
{
|
{
|
||||||
return temp;
|
return temp;
|
||||||
@@ -433,7 +423,7 @@ public class IceFairySirra extends Quest
|
|||||||
return temp;
|
return temp;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the file is not found, the standard message "I have nothing to say to you" is returned
|
// If the file is not found, the standard message "I have nothing to say to you" is returned.
|
||||||
return "data/html/npcdefault.htm";
|
return "data/html/npcdefault.htm";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -85,16 +85,9 @@ public class Orfen extends Quest
|
|||||||
}
|
}
|
||||||
case LIVE:
|
case LIVE:
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* int loc_x = info.getInteger("loc_x"); int loc_y = info.getInteger("loc_y"); int loc_z = info.getInteger("loc_z"); int heading = info.getInteger("heading");
|
|
||||||
*/
|
|
||||||
final int loc_x = 55024;
|
|
||||||
final int loc_y = 17368;
|
|
||||||
final int loc_z = -5412;
|
|
||||||
final int heading = 0;
|
|
||||||
final int hp = info.getInt("currentHP");
|
final int hp = info.getInt("currentHP");
|
||||||
final int mp = info.getInt("currentMP");
|
final int mp = info.getInt("currentMP");
|
||||||
_orfen = (GrandBossInstance) addSpawn(ORFEN, loc_x, loc_y, loc_z, heading, false, 0);
|
_orfen = (GrandBossInstance) addSpawn(ORFEN, 55024, 17368, -5412, 0, false, 0);
|
||||||
if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
|
if (Config.ANNOUNCE_TO_ALL_SPAWN_RB)
|
||||||
{
|
{
|
||||||
AnnouncementsTable.getInstance().announceToAll("Raid boss " + _orfen.getName() + " spawned in world.");
|
AnnouncementsTable.getInstance().announceToAll("Raid boss " + _orfen.getName() + " spawned in world.");
|
||||||
@@ -166,7 +159,8 @@ public class Orfen extends Quest
|
|||||||
startQuestTimer("ORFEN_RETURN", 10000, npc, null);
|
startQuestTimer("ORFEN_RETURN", 10000, npc, null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ // restart the refresh scheduling
|
{
|
||||||
|
// Restart the refresh scheduling.
|
||||||
startQuestTimer("ORFEN_REFRESH", 10000, npc, null);
|
startQuestTimer("ORFEN_REFRESH", 10000, npc, null);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -236,11 +230,11 @@ public class Orfen extends Quest
|
|||||||
{
|
{
|
||||||
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
||||||
GrandBossManager.getInstance().setBossStatus(ORFEN, DEAD);
|
GrandBossManager.getInstance().setBossStatus(ORFEN, DEAD);
|
||||||
// time is 48hour +/- 20hour
|
// Time is 48hour +/- 20hour.
|
||||||
final long respawnTime = (Config.ORFEN_RESP_FIRST + Rnd.get(Config.ORFEN_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.ORFEN_RESP_FIRST + Rnd.get(Config.ORFEN_RESP_SECOND)) * 3600000;
|
||||||
cancelQuestTimer("ORFEN_REFRESH", npc, null);
|
cancelQuestTimer("ORFEN_REFRESH", npc, null);
|
||||||
startQuestTimer("ORFEN_SPAWN", respawnTime, null, null);
|
startQuestTimer("ORFEN_SPAWN", respawnTime, null, null);
|
||||||
// also save the respawn time so that the info is maintained past reboots
|
// Also save the respawn time so that the info is maintained past restarts.
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(ORFEN);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(ORFEN);
|
||||||
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
||||||
GrandBossManager.getInstance().setStatSet(ORFEN, info);
|
GrandBossManager.getInstance().setStatSet(ORFEN, info);
|
||||||
|
@@ -34,24 +34,21 @@ import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
|||||||
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
import org.l2jmobius.gameserver.model.actor.instance.PlayerInstance;
|
||||||
import org.l2jmobius.gameserver.model.quest.EventType;
|
import org.l2jmobius.gameserver.model.quest.EventType;
|
||||||
import org.l2jmobius.gameserver.model.quest.Quest;
|
import org.l2jmobius.gameserver.model.quest.Quest;
|
||||||
import org.l2jmobius.gameserver.model.zone.type.BossZone;
|
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
import org.l2jmobius.gameserver.network.serverpackets.PlaySound;
|
||||||
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
import org.l2jmobius.gameserver.network.serverpackets.SocialAction;
|
||||||
|
|
||||||
public class QueenAnt extends Quest
|
public class QueenAnt extends Quest
|
||||||
{
|
{
|
||||||
|
// Queen Ant status
|
||||||
|
private static final int LIVE = 0; // Queen Ant is spawned.
|
||||||
|
private static final int DEAD = 1; // Queen Ant has been killed.
|
||||||
|
// NPCs
|
||||||
private static final int QUEEN = 29001;
|
private static final int QUEEN = 29001;
|
||||||
private static final int LARVA = 29002;
|
private static final int LARVA = 29002;
|
||||||
private static final int NURSE = 29003;
|
private static final int NURSE = 29003;
|
||||||
private static final int GUARD = 29004;
|
private static final int GUARD = 29004;
|
||||||
private static final int ROYAL = 29005;
|
private static final int ROYAL = 29005;
|
||||||
|
// Misc
|
||||||
// QUEEN Status Tracking :
|
|
||||||
private static final int LIVE = 0; // Queen Ant is spawned.
|
|
||||||
private static final int DEAD = 1; // Queen Ant has been killed.
|
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
|
||||||
private static BossZone _zone;
|
|
||||||
private MonsterInstance _larva = null;
|
private MonsterInstance _larva = null;
|
||||||
private MonsterInstance _queen = null;
|
private MonsterInstance _queen = null;
|
||||||
private final List<MonsterInstance> _minions = new CopyOnWriteArrayList<>();
|
private final List<MonsterInstance> _minions = new CopyOnWriteArrayList<>();
|
||||||
@@ -59,7 +56,7 @@ public class QueenAnt extends Quest
|
|||||||
|
|
||||||
enum Event
|
enum Event
|
||||||
{
|
{
|
||||||
QUEEN_SPAWN, /* CHECK_QA_ZONE, */
|
QUEEN_SPAWN,
|
||||||
CHECK_MINIONS_ZONE,
|
CHECK_MINIONS_ZONE,
|
||||||
CHECK_NURSE_ALIVE,
|
CHECK_NURSE_ALIVE,
|
||||||
ACTION,
|
ACTION,
|
||||||
@@ -90,8 +87,6 @@ public class QueenAnt extends Quest
|
|||||||
addEventId(mob, EventType.ON_ATTACK);
|
addEventId(mob, EventType.ON_ATTACK);
|
||||||
}
|
}
|
||||||
|
|
||||||
_zone = GrandBossManager.getInstance().getZone(-21610, 181594, -5734);
|
|
||||||
|
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(QUEEN);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(QUEEN);
|
||||||
final Integer status = GrandBossManager.getInstance().getBossStatus(QUEEN);
|
final Integer status = GrandBossManager.getInstance().getBossStatus(QUEEN);
|
||||||
|
|
||||||
@@ -115,13 +110,10 @@ public class QueenAnt extends Quest
|
|||||||
GrandBossManager.getInstance().addBoss(queen);
|
GrandBossManager.getInstance().addBoss(queen);
|
||||||
spawnBoss(queen);
|
spawnBoss(queen);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case LIVE:
|
case LIVE:
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
* int loc_x = info.getInteger("loc_x"); int loc_y = info.getInteger("loc_y"); int loc_z = info.getInteger("loc_z"); int heading = info.getInteger("heading");
|
|
||||||
*/
|
|
||||||
final int hp = info.getInt("currentHP");
|
final int hp = info.getInt("currentHP");
|
||||||
final int mp = info.getInt("currentMP");
|
final int mp = info.getInt("currentMP");
|
||||||
final GrandBossInstance queen = (GrandBossInstance) addSpawn(QUEEN, -21610, 181594, -5734, 0, false, 0);
|
final GrandBossInstance queen = (GrandBossInstance) addSpawn(QUEEN, -21610, 181594, -5734, 0, false, 0);
|
||||||
@@ -132,8 +124,8 @@ public class QueenAnt extends Quest
|
|||||||
GrandBossManager.getInstance().addBoss(queen);
|
GrandBossManager.getInstance().addBoss(queen);
|
||||||
queen.setCurrentHpMp(hp, mp);
|
queen.setCurrentHpMp(hp, mp);
|
||||||
spawnBoss(queen);
|
spawnBoss(queen);
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
final GrandBossInstance queen = (GrandBossInstance) addSpawn(QUEEN, -21610, 181594, -5734, 0, false, 0);
|
final GrandBossInstance queen = (GrandBossInstance) addSpawn(QUEEN, -21610, 181594, -5734, 0, false, 0);
|
||||||
@@ -144,6 +136,7 @@ public class QueenAnt extends Quest
|
|||||||
GrandBossManager.getInstance().setBossStatus(QUEEN, LIVE);
|
GrandBossManager.getInstance().setBossStatus(QUEEN, LIVE);
|
||||||
GrandBossManager.getInstance().addBoss(queen);
|
GrandBossManager.getInstance().addBoss(queen);
|
||||||
spawnBoss(queen);
|
spawnBoss(queen);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -365,7 +358,7 @@ public class QueenAnt extends Quest
|
|||||||
{
|
{
|
||||||
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
||||||
GrandBossManager.getInstance().setBossStatus(QUEEN, DEAD);
|
GrandBossManager.getInstance().setBossStatus(QUEEN, DEAD);
|
||||||
// time is 36hour +/- 17hour
|
// Time is 36hour +/- 17hour.
|
||||||
final long respawnTime = (Config.QA_RESP_FIRST + Rnd.get(Config.QA_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.QA_RESP_FIRST + Rnd.get(Config.QA_RESP_SECOND)) * 3600000;
|
||||||
startQuestTimer("QUEEN_SPAWN", respawnTime, null, null);
|
startQuestTimer("QUEEN_SPAWN", respawnTime, null, null);
|
||||||
startQuestTimer("LARVA_DESPAWN", 4 * 60 * 60 * 1000, null, null);
|
startQuestTimer("LARVA_DESPAWN", 4 * 60 * 60 * 1000, null, null);
|
||||||
@@ -375,7 +368,7 @@ public class QueenAnt extends Quest
|
|||||||
cancelQuestTimer("CHECK_NURSE_ALIVE", npc, null);
|
cancelQuestTimer("CHECK_NURSE_ALIVE", npc, null);
|
||||||
cancelQuestTimer("HEAL", null, null);
|
cancelQuestTimer("HEAL", null, null);
|
||||||
// cancelQuestTimer("CHECK_QA_ZONE", npc, null);
|
// cancelQuestTimer("CHECK_QA_ZONE", npc, null);
|
||||||
// also save the respawn time so that the info is maintained past reboots
|
// Also save the respawn time so that the info is maintained past restarts.
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(QUEEN);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(QUEEN);
|
||||||
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
||||||
GrandBossManager.getInstance().setStatSet(QUEEN, info);
|
GrandBossManager.getInstance().setStatSet(QUEEN, info);
|
||||||
|
@@ -50,40 +50,35 @@ import org.l2jmobius.gameserver.util.Util;
|
|||||||
*/
|
*/
|
||||||
public class Valakas extends Quest
|
public class Valakas extends Quest
|
||||||
{
|
{
|
||||||
|
// Valakas status
|
||||||
|
private static final byte DORMANT = 0; // Valakas is spawned and no one has entered yet. Entry is unlocked.
|
||||||
|
private static final byte WAITING = 1; // Valakas is spawend and someone has entered, triggering a 30 minute window for additional people to enter before he unleashes his attack. Entry is unlocked.
|
||||||
|
private static final byte FIGHTING = 2; // Valakas is engaged in battle, annihilating his foes. Entry is locked.
|
||||||
|
private static final byte DEAD = 3; // Valakas has been killed. Entry is locked.
|
||||||
|
// NPC
|
||||||
|
private static final int VALAKAS = 29028;
|
||||||
|
// Misc
|
||||||
private int i_ai0 = 0;
|
private int i_ai0 = 0;
|
||||||
private int i_ai1 = 0;
|
private int i_ai1 = 0;
|
||||||
private int i_ai2 = 0;
|
private int i_ai2 = 0;
|
||||||
private int i_ai3 = 0;
|
private int i_ai3 = 0;
|
||||||
private int i_ai4 = 0;
|
private int i_ai4 = 0;
|
||||||
private int i_quest0 = 0;
|
private int i_quest0 = 0;
|
||||||
private long lastAttackTime = 0; // time to tracking valakas when was last time attacked
|
private long lastAttackTime = 0; // Time to tracking valakas when was last time attacked.
|
||||||
private int i_quest2 = 0; // hate value for 1st player
|
private int i_quest2 = 0; // Hate value for 1st player.
|
||||||
private int i_quest3 = 0; // hate value for 2nd player
|
private int i_quest3 = 0; // Hate value for 2nd player.
|
||||||
private int i_quest4 = 0; // hate value for 3rd player
|
private int i_quest4 = 0; // Hate value for 3rd player.
|
||||||
private Creature c_quest2 = null; // 1st most hated target
|
private Creature c_quest2 = null; // 1st most hated target.
|
||||||
private Creature c_quest3 = null; // 2nd most hated target
|
private Creature c_quest3 = null; // 2nd most hated target.
|
||||||
private Creature c_quest4 = null; // 3rd most hated target
|
private Creature c_quest4 = null; // 3rd most hated target.
|
||||||
|
private static BossZone _zone;
|
||||||
|
|
||||||
private static final int VALAKAS = 29028;
|
|
||||||
|
|
||||||
// Valakas Status Tracking :
|
|
||||||
private static final byte DORMANT = 0; // Valakas is spawned and no one has entered yet. Entry is unlocked
|
|
||||||
private static final byte WAITING = 1; // Valakas is spawend and someone has entered, triggering a 30 minute window for additional people to enter
|
|
||||||
// before he unleashes his attack. Entry is unlocked
|
|
||||||
private static final byte FIGHTING = 2; // Valakas is engaged in battle, annihilating his foes. Entry is locked
|
|
||||||
private static final byte DEAD = 3; // Valakas has been killed. Entry is locked
|
|
||||||
|
|
||||||
private static BossZone _Zone;
|
|
||||||
|
|
||||||
// Boss: Valakas
|
|
||||||
public Valakas()
|
public Valakas()
|
||||||
{
|
{
|
||||||
super(-1, "ai/bosses");
|
super(-1, "ai/bosses");
|
||||||
final int[] mob =
|
|
||||||
{
|
registerMobs(VALAKAS);
|
||||||
VALAKAS
|
|
||||||
};
|
|
||||||
registerMobs(mob);
|
|
||||||
i_ai0 = 0;
|
i_ai0 = 0;
|
||||||
i_ai1 = 0;
|
i_ai1 = 0;
|
||||||
i_ai2 = 0;
|
i_ai2 = 0;
|
||||||
@@ -91,38 +86,33 @@ public class Valakas extends Quest
|
|||||||
i_ai4 = 0;
|
i_ai4 = 0;
|
||||||
i_quest0 = 0;
|
i_quest0 = 0;
|
||||||
lastAttackTime = Chronos.currentTimeMillis();
|
lastAttackTime = Chronos.currentTimeMillis();
|
||||||
_Zone = GrandBossManager.getInstance().getZone(212852, -114842, -1632);
|
_zone = GrandBossManager.getInstance().getZone(212852, -114842, -1632);
|
||||||
|
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(VALAKAS);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(VALAKAS);
|
||||||
final Integer status = GrandBossManager.getInstance().getBossStatus(VALAKAS);
|
final Integer status = GrandBossManager.getInstance().getBossStatus(VALAKAS);
|
||||||
if (status == DEAD)
|
if (status == DEAD)
|
||||||
{
|
{
|
||||||
// load the unlock date and time for valakas from DB
|
// Load the unlock date and time for valakas from DB.
|
||||||
final long temp = (info.getLong("respawn_time") - Chronos.currentTimeMillis());
|
final long temp = (info.getLong("respawn_time") - Chronos.currentTimeMillis());
|
||||||
// if valakas is locked until a certain time, mark it so and start the unlock timer
|
// If valakas is locked until a certain time, mark it so and start the unlock timer the unlock time has not yet expired.
|
||||||
// the unlock time has not yet expired. Mark valakas as currently locked. Setup a timer
|
// Mark valakas as currently locked. Setup a timer to fire at the correct time (calculate the time between now and the unlock time, setup a timer to fire after that many msec).
|
||||||
// to fire at the correct time (calculate the time between now and the unlock time,
|
|
||||||
// setup a timer to fire after that many msec)
|
|
||||||
if (temp > 0)
|
if (temp > 0)
|
||||||
{
|
{
|
||||||
startQuestTimer("valakas_unlock", temp, null, null);
|
startQuestTimer("valakas_unlock", temp, null, null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// the time has already expired while the server was offline.
|
// The time has already expired while the server was offline.
|
||||||
// the status needs to be changed to DORMANT
|
// The status needs to be changed to DORMANT.
|
||||||
GrandBossManager.getInstance().setBossStatus(VALAKAS, DORMANT);
|
GrandBossManager.getInstance().setBossStatus(VALAKAS, DORMANT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (status == FIGHTING)
|
else if (status == FIGHTING)
|
||||||
{
|
{
|
||||||
// respawn to original location
|
// Respawn to original location.
|
||||||
final int loc_x = 213004;
|
|
||||||
final int loc_y = -114890;
|
|
||||||
final int loc_z = -1595;
|
|
||||||
final int heading = 0;
|
|
||||||
final int hp = info.getInt("currentHP");
|
final int hp = info.getInt("currentHP");
|
||||||
final int mp = info.getInt("currentMP");
|
final int mp = info.getInt("currentMP");
|
||||||
final GrandBossInstance valakas = (GrandBossInstance) addSpawn(VALAKAS, loc_x, loc_y, loc_z, heading, false, 0);
|
final GrandBossInstance valakas = (GrandBossInstance) addSpawn(VALAKAS, 213004, -114890, -1595, 0, false, 0);
|
||||||
GrandBossManager.getInstance().addBoss(valakas);
|
GrandBossManager.getInstance().addBoss(valakas);
|
||||||
ThreadPool.schedule(() ->
|
ThreadPool.schedule(() ->
|
||||||
{
|
{
|
||||||
@@ -134,18 +124,18 @@ public class Valakas extends Quest
|
|||||||
catch (Throwable e)
|
catch (Throwable e)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
}, 100L);
|
}, 100);
|
||||||
|
|
||||||
startQuestTimer("launch_random_skill", 60000, valakas, null, true);
|
startQuestTimer("launch_random_skill", 60000, valakas, null, true);
|
||||||
// Start repeating timer to check for inactivity
|
// Start repeating timer to check for inactivity.
|
||||||
startQuestTimer("check_activity_and_do_actions", 60000, valakas, null, true);
|
startQuestTimer("check_activity_and_do_actions", 60000, valakas, null, true);
|
||||||
}
|
}
|
||||||
else if (status == WAITING)
|
else if (status == WAITING)
|
||||||
{
|
{
|
||||||
// Start timer to lock entry after 30 minutes and spawn valakas
|
// Start timer to lock entry after 30 minutes and spawn Valakas.
|
||||||
startQuestTimer("lock_entry_and_spawn_valakas", (Config.VALAKAS_WAIT_TIME * 60000), null, null);
|
startQuestTimer("lock_entry_and_spawn_valakas", (Config.VALAKAS_WAIT_TIME * 60000), null, null);
|
||||||
} // if it was dormant, just leave it as it was:
|
}
|
||||||
// the valakas NPC is not spawned yet and his instance is not loaded
|
// If it was dormant, just leave it as it was. The valakas NPC is not spawned yet and his instance is not loaded.
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -153,174 +143,193 @@ public class Valakas extends Quest
|
|||||||
{
|
{
|
||||||
if (npc != null)
|
if (npc != null)
|
||||||
{
|
{
|
||||||
long temp = 0;
|
switch (event)
|
||||||
if (event.equals("check_activity_and_do_actions"))
|
|
||||||
{
|
{
|
||||||
int level = 0;
|
case "check_activity_and_do_actions":
|
||||||
int sk4691 = 0;
|
|
||||||
for (Effect e : npc.getAllEffects())
|
|
||||||
{
|
{
|
||||||
if (e.getSkill().getId() == 4629)
|
int level = 0;
|
||||||
|
int sk4691 = 0;
|
||||||
|
for (Effect e : npc.getAllEffects())
|
||||||
{
|
{
|
||||||
sk4691 = 1;
|
if (e.getSkill().getId() == 4629)
|
||||||
level = e.getSkill().getLevel();
|
{
|
||||||
break;
|
sk4691 = 1;
|
||||||
|
level = e.getSkill().getLevel();
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
final Integer status = GrandBossManager.getInstance().getBossStatus(VALAKAS);
|
||||||
|
if ((status == FIGHTING) && ((Chronos.currentTimeMillis() - lastAttackTime) > (Config.VALAKAS_DESPAWN_TIME * 60000))) // 15 mins by default.
|
||||||
final Integer status = GrandBossManager.getInstance().getBossStatus(VALAKAS);
|
{
|
||||||
temp = (Chronos.currentTimeMillis() - lastAttackTime);
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||||
if ((status == FIGHTING) && (temp > (Config.VALAKAS_DESPAWN_TIME * 60000))) // 15 mins by default
|
|
||||||
{
|
// delete the actual boss
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
final GrandBossInstance boss = GrandBossManager.getInstance().deleteBoss(VALAKAS);
|
||||||
|
boss.decayMe();
|
||||||
// delete the actual boss
|
GrandBossManager.getInstance().setBossStatus(VALAKAS, DORMANT);
|
||||||
final GrandBossInstance boss = GrandBossManager.getInstance().deleteBoss(VALAKAS);
|
// npc.setCurrentHpMp(npc.getMaxHp(), npc.getMaxMp());
|
||||||
boss.decayMe();
|
_zone.oustAllPlayers();
|
||||||
GrandBossManager.getInstance().setBossStatus(VALAKAS, DORMANT);
|
cancelQuestTimer("check_activity_and_do_actions", npc, null);
|
||||||
// npc.setCurrentHpMp(npc.getMaxHp(), npc.getMaxMp());
|
i_quest2 = 0;
|
||||||
_Zone.oustAllPlayers();
|
i_quest3 = 0;
|
||||||
cancelQuestTimer("check_activity_and_do_actions", npc, null);
|
i_quest4 = 0;
|
||||||
i_quest2 = 0;
|
}
|
||||||
i_quest3 = 0;
|
else if (npc.getCurrentHp() > ((npc.getMaxHp() * 1) / 4))
|
||||||
i_quest4 = 0;
|
{
|
||||||
}
|
if ((sk4691 == 0) || ((sk4691 == 1) && (level != 4)))
|
||||||
else if (npc.getCurrentHp() > ((npc.getMaxHp() * 1) / 4))
|
{
|
||||||
{
|
npc.setTarget(npc);
|
||||||
if ((sk4691 == 0) || ((sk4691 == 1) && (level != 4)))
|
npc.doCast(SkillTable.getInstance().getSkill(4691, 4));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (npc.getCurrentHp() > ((npc.getMaxHp() * 2) / 4.0))
|
||||||
|
{
|
||||||
|
if ((sk4691 == 0) || ((sk4691 == 1) && (level != 3)))
|
||||||
|
{
|
||||||
|
npc.setTarget(npc);
|
||||||
|
npc.doCast(SkillTable.getInstance().getSkill(4691, 3));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (npc.getCurrentHp() > ((npc.getMaxHp() * 3) / 4.0))
|
||||||
|
{
|
||||||
|
if ((sk4691 == 0) || ((sk4691 == 1) && (level != 2)))
|
||||||
|
{
|
||||||
|
npc.setTarget(npc);
|
||||||
|
npc.doCast(SkillTable.getInstance().getSkill(4691, 2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ((sk4691 == 0) || ((sk4691 == 1) && (level != 1)))
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
npc.setTarget(npc);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4691, 4));
|
npc.doCast(SkillTable.getInstance().getSkill(4691, 1));
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if (npc.getCurrentHp() > ((npc.getMaxHp() * 2) / 4.0))
|
case "launch_random_skill":
|
||||||
{
|
{
|
||||||
if ((sk4691 == 0) || ((sk4691 == 1) && (level != 3)))
|
if (!npc.isInvul())
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
getRandomSkill(npc);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4691, 3));
|
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
else if (npc.getCurrentHp() > ((npc.getMaxHp() * 3) / 4.0))
|
|
||||||
{
|
|
||||||
if ((sk4691 == 0) || ((sk4691 == 1) && (level != 2)))
|
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4691, 2));
|
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else if ((sk4691 == 0) || ((sk4691 == 1) && (level != 1)))
|
case "1004":
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
startQuestTimer("1102", 1500, npc, null);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4691, 1));
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1300, 180, -5, 3000, 15000));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
case "1102":
|
||||||
else if (event.equals("launch_random_skill"))
|
|
||||||
{
|
|
||||||
if (!npc.isInvul())
|
|
||||||
{
|
{
|
||||||
|
startQuestTimer("1103", 3300, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 500, 180, -8, 600, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1103":
|
||||||
|
{
|
||||||
|
startQuestTimer("1104", 2900, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 800, 180, -8, 2700, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1104":
|
||||||
|
{
|
||||||
|
startQuestTimer("1105", 2700, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 200, 250, 70, 0, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1105":
|
||||||
|
{
|
||||||
|
startQuestTimer("1106", 1, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1100, 250, 70, 2500, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1106":
|
||||||
|
{
|
||||||
|
startQuestTimer("1107", 3200, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 700, 150, 30, 0, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1107":
|
||||||
|
{
|
||||||
|
startQuestTimer("1108", 1400, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1200, 150, 20, 2900, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1108":
|
||||||
|
{
|
||||||
|
startQuestTimer("1109", 6700, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 750, 170, 15, 3400, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1109":
|
||||||
|
{
|
||||||
|
startQuestTimer("1110", 5700, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 750, 170, -10, 3400, 15000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1110":
|
||||||
|
{
|
||||||
|
GrandBossManager.getInstance().setBossStatus(VALAKAS, FIGHTING);
|
||||||
|
startQuestTimer("check_activity_and_do_actions", 60000, npc, null, true);
|
||||||
|
npc.setInvul(false);
|
||||||
getRandomSkill(npc);
|
getRandomSkill(npc);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
else
|
case "1111":
|
||||||
{
|
{
|
||||||
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE);
|
startQuestTimer("1112", 3500, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1100, 210, -5, 3000, 10000));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
case "1112":
|
||||||
else if (event.equals("1004"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1102", 1500, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1300, 180, -5, 3000, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1102"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1103", 3300, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 500, 180, -8, 600, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1103"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1104", 2900, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 800, 180, -8, 2700, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1104"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1105", 2700, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 200, 250, 70, 0, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1105"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1106", 1, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1100, 250, 70, 2500, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1106"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1107", 3200, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 700, 150, 30, 0, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1107"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1108", 1400, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1200, 150, 20, 2900, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1108"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1109", 6700, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 750, 170, 15, 3400, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1109"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1110", 5700, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 750, 170, -10, 3400, 15000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1110"))
|
|
||||||
{
|
|
||||||
GrandBossManager.getInstance().setBossStatus(VALAKAS, FIGHTING);
|
|
||||||
startQuestTimer("check_activity_and_do_actions", 60000, npc, null, true);
|
|
||||||
npc.setInvul(false);
|
|
||||||
getRandomSkill(npc);
|
|
||||||
}
|
|
||||||
else if (event.equals("1111"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1112", 3500, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1100, 210, -5, 3000, 10000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1112"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1113", 4500, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1300, 200, -8, 3000, 10000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1113"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1114", 500, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1000, 190, 0, 3000, 10000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1114"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1115", 4600, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 120, 0, 2500, 10000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1115"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1116", 750, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 20, 0, 3000, 10000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1116"))
|
|
||||||
{
|
|
||||||
startQuestTimer("1117", 2500, npc, null);
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 10, 0, 3000, 10000));
|
|
||||||
}
|
|
||||||
else if (event.equals("1117"))
|
|
||||||
{
|
|
||||||
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 10, 0, 3000, 250));
|
|
||||||
addSpawn(31759, 212852, -114842, -1632, 0, false, 900000);
|
|
||||||
final int radius = 1500;
|
|
||||||
for (int i = 0; i < 20; i++)
|
|
||||||
{
|
{
|
||||||
final int x = (int) (radius * Math.cos(i * .331)); // .331~2pi/19
|
startQuestTimer("1113", 4500, npc, null);
|
||||||
final int y = (int) (radius * Math.sin(i * .331));
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1300, 200, -8, 3000, 10000));
|
||||||
addSpawn(31759, 212852 + x, -114842 + y, -1632, 0, false, 900000);
|
break;
|
||||||
|
}
|
||||||
|
case "1113":
|
||||||
|
{
|
||||||
|
startQuestTimer("1114", 500, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1000, 190, 0, 3000, 10000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1114":
|
||||||
|
{
|
||||||
|
startQuestTimer("1115", 4600, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 120, 0, 2500, 10000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1115":
|
||||||
|
{
|
||||||
|
startQuestTimer("1116", 750, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 20, 0, 3000, 10000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1116":
|
||||||
|
{
|
||||||
|
startQuestTimer("1117", 2500, npc, null);
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 10, 0, 3000, 10000));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "1117":
|
||||||
|
{
|
||||||
|
npc.broadcastPacket(new SpecialCamera(npc.getObjectId(), 1700, 10, 0, 3000, 250));
|
||||||
|
addSpawn(31759, 212852, -114842, -1632, 0, false, 900000);
|
||||||
|
final int radius = 1500;
|
||||||
|
for (int i = 0; i < 20; i++)
|
||||||
|
{
|
||||||
|
final int x = (int) (radius * Math.cos(i * .331)); // .331~2pi/19
|
||||||
|
final int y = (int) (radius * Math.sin(i * .331));
|
||||||
|
addSpawn(31759, 212852 + x, -114842 + y, -1632, 0, false, 900000);
|
||||||
|
}
|
||||||
|
startQuestTimer("remove_players", 900000, null, null);
|
||||||
|
cancelQuestTimer("check_activity_and_do_actions", npc, null);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
startQuestTimer("remove_players", 900000, null, null);
|
|
||||||
cancelQuestTimer("check_activity_and_do_actions", npc, null);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (event.equals("lock_entry_and_spawn_valakas"))
|
else if (event.equals("lock_entry_and_spawn_valakas"))
|
||||||
@@ -353,8 +362,9 @@ public class Valakas extends Quest
|
|||||||
}
|
}
|
||||||
else if (event.equals("remove_players"))
|
else if (event.equals("remove_players"))
|
||||||
{
|
{
|
||||||
_Zone.oustAllPlayers();
|
_zone.oustAllPlayers();
|
||||||
}
|
}
|
||||||
|
|
||||||
return super.onAdvEvent(event, npc, player);
|
return super.onAdvEvent(event, npc, player);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -365,10 +375,9 @@ public class Valakas extends Quest
|
|||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
lastAttackTime = Chronos.currentTimeMillis();
|
lastAttackTime = Chronos.currentTimeMillis();
|
||||||
/*
|
// if (!Config.ALLOW_DIRECT_TP_TO_BOSS_ROOM && GrandBossManager.getInstance().getBossStatus(VALAKAS) != FIGHTING && !npc.getSpawn().isCustomBossInstance()) { attacker.teleToLocation(150037, -57255, -2976); }
|
||||||
* if (!Config.ALLOW_DIRECT_TP_TO_BOSS_ROOM && GrandBossManager.getInstance().getBossStatus(VALAKAS) != FIGHTING && !npc.getSpawn().isCustomBossInstance()) { attacker.teleToLocation(150037, -57255, -2976); }
|
|
||||||
*/
|
|
||||||
if (attacker.getMountType() == 1)
|
if (attacker.getMountType() == 1)
|
||||||
{
|
{
|
||||||
int sk4258 = 0;
|
int sk4258 = 0;
|
||||||
@@ -583,10 +592,9 @@ public class Valakas extends Quest
|
|||||||
npc.broadcastPacket(new PlaySound(1, "B03_D", npc));
|
npc.broadcastPacket(new PlaySound(1, "B03_D", npc));
|
||||||
startQuestTimer("1111", 500, npc, null);
|
startQuestTimer("1111", 500, npc, null);
|
||||||
GrandBossManager.getInstance().setBossStatus(VALAKAS, DEAD);
|
GrandBossManager.getInstance().setBossStatus(VALAKAS, DEAD);
|
||||||
|
|
||||||
final long respawnTime = (Config.VALAKAS_RESP_FIRST + Rnd.get(Config.VALAKAS_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.VALAKAS_RESP_FIRST + Rnd.get(Config.VALAKAS_RESP_SECOND)) * 3600000;
|
||||||
startQuestTimer("valakas_unlock", respawnTime, null, null);
|
startQuestTimer("valakas_unlock", respawnTime, null, null);
|
||||||
// also save the respawn time so that the info is maintained past reboots
|
// Also save the respawn time so that the info is maintained past restarts.
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(VALAKAS);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(VALAKAS);
|
||||||
info.set("respawn_time", (Chronos.currentTimeMillis() + respawnTime));
|
info.set("respawn_time", (Chronos.currentTimeMillis() + respawnTime));
|
||||||
GrandBossManager.getInstance().setStatSet(VALAKAS, info);
|
GrandBossManager.getInstance().setStatSet(VALAKAS, info);
|
||||||
|
@@ -61,9 +61,12 @@ public class VanHalter extends Quest
|
|||||||
{
|
{
|
||||||
private static final Logger LOGGER = Logger.getLogger(VanHalter.class.getName());
|
private static final Logger LOGGER = Logger.getLogger(VanHalter.class.getName());
|
||||||
|
|
||||||
|
// VanHalter status.
|
||||||
|
private static final byte INTERVAL = 0;
|
||||||
|
private static final byte NOTSPAWN = 1;
|
||||||
|
private static final byte ALIVE = 2;
|
||||||
// List of intruders.
|
// List of intruders.
|
||||||
protected Map<Integer, List<PlayerInstance>> _bleedingPlayers = new HashMap<>();
|
protected Map<Integer, List<PlayerInstance>> _bleedingPlayers = new HashMap<>();
|
||||||
|
|
||||||
// Spawn data of monsters.
|
// Spawn data of monsters.
|
||||||
protected Map<Integer, Spawn> _monsterSpawn = new ConcurrentHashMap<>();
|
protected Map<Integer, Spawn> _monsterSpawn = new ConcurrentHashMap<>();
|
||||||
protected Collection<Spawn> _royalGuardSpawn = ConcurrentHashMap.newKeySet();
|
protected Collection<Spawn> _royalGuardSpawn = ConcurrentHashMap.newKeySet();
|
||||||
@@ -76,7 +79,6 @@ public class VanHalter extends Quest
|
|||||||
protected Spawn _ritualOfferingSpawn = null;
|
protected Spawn _ritualOfferingSpawn = null;
|
||||||
protected Spawn _ritualSacrificeSpawn = null;
|
protected Spawn _ritualSacrificeSpawn = null;
|
||||||
protected Spawn _vanHalterSpawn = null;
|
protected Spawn _vanHalterSpawn = null;
|
||||||
|
|
||||||
// Instance of monsters.
|
// Instance of monsters.
|
||||||
protected Collection<NpcInstance> _monsters = ConcurrentHashMap.newKeySet();
|
protected Collection<NpcInstance> _monsters = ConcurrentHashMap.newKeySet();
|
||||||
protected Collection<NpcInstance> _royalGuard = ConcurrentHashMap.newKeySet();
|
protected Collection<NpcInstance> _royalGuard = ConcurrentHashMap.newKeySet();
|
||||||
@@ -90,8 +92,7 @@ public class VanHalter extends Quest
|
|||||||
protected NpcInstance _ritualOffering = null;
|
protected NpcInstance _ritualOffering = null;
|
||||||
protected NpcInstance _ritualSacrifice = null;
|
protected NpcInstance _ritualSacrifice = null;
|
||||||
protected RaidBossInstance _vanHalter = null;
|
protected RaidBossInstance _vanHalter = null;
|
||||||
|
// Tasks.
|
||||||
// Task
|
|
||||||
protected ScheduledFuture<?> _movieTask = null;
|
protected ScheduledFuture<?> _movieTask = null;
|
||||||
protected ScheduledFuture<?> _closeDoorOfAltarTask = null;
|
protected ScheduledFuture<?> _closeDoorOfAltarTask = null;
|
||||||
protected ScheduledFuture<?> _openDoorOfAltarTask = null;
|
protected ScheduledFuture<?> _openDoorOfAltarTask = null;
|
||||||
@@ -101,7 +102,6 @@ public class VanHalter extends Quest
|
|||||||
protected ScheduledFuture<?> _intervalTask = null;
|
protected ScheduledFuture<?> _intervalTask = null;
|
||||||
protected ScheduledFuture<?> _halterEscapeTask = null;
|
protected ScheduledFuture<?> _halterEscapeTask = null;
|
||||||
protected ScheduledFuture<?> _setBleedTask = null;
|
protected ScheduledFuture<?> _setBleedTask = null;
|
||||||
|
|
||||||
// State of High Priestess van Halter
|
// State of High Priestess van Halter
|
||||||
boolean _isLocked = false;
|
boolean _isLocked = false;
|
||||||
boolean _isHalterSpawned = false;
|
boolean _isHalterSpawned = false;
|
||||||
@@ -109,12 +109,6 @@ public class VanHalter extends Quest
|
|||||||
boolean _isCaptainSpawned = false;
|
boolean _isCaptainSpawned = false;
|
||||||
boolean _isHelperCalled = false;
|
boolean _isHelperCalled = false;
|
||||||
|
|
||||||
// VanHalter Status Tracking :
|
|
||||||
private static final byte INTERVAL = 0;
|
|
||||||
private static final byte NOTSPAWN = 1;
|
|
||||||
private static final byte ALIVE = 2;
|
|
||||||
|
|
||||||
// Initialize
|
|
||||||
public VanHalter()
|
public VanHalter()
|
||||||
{
|
{
|
||||||
super(-1, "ai/bosses");
|
super(-1, "ai/bosses");
|
||||||
@@ -140,7 +134,6 @@ public class VanHalter extends Quest
|
|||||||
addEventId(mob, EventType.ON_KILL);
|
addEventId(mob, EventType.ON_KILL);
|
||||||
}
|
}
|
||||||
|
|
||||||
// GrandBossManager.getInstance().addBoss(29062);
|
|
||||||
// Clear flag.
|
// Clear flag.
|
||||||
_isLocked = false;
|
_isLocked = false;
|
||||||
_isCaptainSpawned = false;
|
_isCaptainSpawned = false;
|
||||||
@@ -175,11 +168,11 @@ public class VanHalter extends Quest
|
|||||||
_cameraMarkerSpawn.clear();
|
_cameraMarkerSpawn.clear();
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
final NpcTemplate template1 = NpcTable.getInstance().getTemplate(13014); // Dummy npc
|
final NpcTemplate template = NpcTable.getInstance().getTemplate(13014); // Dummy npc
|
||||||
Spawn tempSpawn;
|
Spawn tempSpawn;
|
||||||
|
|
||||||
// Dummy camera marker.
|
// Dummy camera marker.
|
||||||
tempSpawn = new Spawn(template1);
|
tempSpawn = new Spawn(template);
|
||||||
tempSpawn.setX(-16397);
|
tempSpawn.setX(-16397);
|
||||||
tempSpawn.setY(-55200);
|
tempSpawn.setY(-55200);
|
||||||
tempSpawn.setZ(-10449);
|
tempSpawn.setZ(-10449);
|
||||||
@@ -189,7 +182,7 @@ public class VanHalter extends Quest
|
|||||||
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
||||||
_cameraMarkerSpawn.put(1, tempSpawn);
|
_cameraMarkerSpawn.put(1, tempSpawn);
|
||||||
|
|
||||||
tempSpawn = new Spawn(template1);
|
tempSpawn = new Spawn(template);
|
||||||
tempSpawn.setX(-16397);
|
tempSpawn.setX(-16397);
|
||||||
tempSpawn.setY(-55200);
|
tempSpawn.setY(-55200);
|
||||||
tempSpawn.setZ(-10051);
|
tempSpawn.setZ(-10051);
|
||||||
@@ -199,7 +192,7 @@ public class VanHalter extends Quest
|
|||||||
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
||||||
_cameraMarkerSpawn.put(2, tempSpawn);
|
_cameraMarkerSpawn.put(2, tempSpawn);
|
||||||
|
|
||||||
tempSpawn = new Spawn(template1);
|
tempSpawn = new Spawn(template);
|
||||||
tempSpawn.setX(-16397);
|
tempSpawn.setX(-16397);
|
||||||
tempSpawn.setY(-55200);
|
tempSpawn.setY(-55200);
|
||||||
tempSpawn.setZ(-9741);
|
tempSpawn.setZ(-9741);
|
||||||
@@ -209,7 +202,7 @@ public class VanHalter extends Quest
|
|||||||
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
||||||
_cameraMarkerSpawn.put(3, tempSpawn);
|
_cameraMarkerSpawn.put(3, tempSpawn);
|
||||||
|
|
||||||
tempSpawn = new Spawn(template1);
|
tempSpawn = new Spawn(template);
|
||||||
tempSpawn.setX(-16397);
|
tempSpawn.setX(-16397);
|
||||||
tempSpawn.setY(-55200);
|
tempSpawn.setY(-55200);
|
||||||
tempSpawn.setZ(-9394);
|
tempSpawn.setZ(-9394);
|
||||||
@@ -219,7 +212,7 @@ public class VanHalter extends Quest
|
|||||||
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
SpawnTable.getInstance().addNewSpawn(tempSpawn, false);
|
||||||
_cameraMarkerSpawn.put(4, tempSpawn);
|
_cameraMarkerSpawn.put(4, tempSpawn);
|
||||||
|
|
||||||
tempSpawn = new Spawn(template1);
|
tempSpawn = new Spawn(template);
|
||||||
tempSpawn.setX(-16397);
|
tempSpawn.setX(-16397);
|
||||||
tempSpawn.setY(-55197);
|
tempSpawn.setY(-55197);
|
||||||
tempSpawn.setZ(-8739);
|
tempSpawn.setZ(-8739);
|
||||||
@@ -231,7 +224,7 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
LOGGER.warning("VanHalterManager : " + e.getMessage() + " :" + e);
|
LOGGER.warning("VanHalter : " + e.getMessage() + " :" + e);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set time up.
|
// Set time up.
|
||||||
@@ -241,7 +234,7 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
_timeUpTask = ThreadPool.schedule(new TimeUp(), Config.HPH_ACTIVITYTIMEOFHALTER);
|
_timeUpTask = ThreadPool.schedule(new TimeUp(), Config.HPH_ACTIVITYTIMEOFHALTER);
|
||||||
|
|
||||||
// Set bleeding to palyers.
|
// Set bleeding to players.
|
||||||
if (_setBleedTask != null)
|
if (_setBleedTask != null)
|
||||||
{
|
{
|
||||||
_setBleedTask.cancel(false);
|
_setBleedTask.cancel(false);
|
||||||
@@ -289,7 +282,6 @@ public class VanHalter extends Quest
|
|||||||
return super.onKill(npc, killer, isPet);
|
return super.onKill(npc, killer, isPet);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load Royal Guard.
|
|
||||||
protected void loadRoyalGuard()
|
protected void loadRoyalGuard()
|
||||||
{
|
{
|
||||||
_royalGuardSpawn.clear();
|
_royalGuardSpawn.clear();
|
||||||
@@ -321,7 +313,7 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("VanHalterManager.loadRoyalGuard: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
LOGGER.warning("VanHalter.loadRoyalGuard: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -330,8 +322,8 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
// Problem with initializing spawn, go to next one
|
// Problem with initializing spawn, go to next one.
|
||||||
LOGGER.warning("VanHalterManager.loadRoyalGuard: Spawn could not be initialized: " + e);
|
LOGGER.warning("VanHalter.loadRoyalGuard: Spawn could not be initialized: " + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -360,7 +352,6 @@ public class VanHalter extends Quest
|
|||||||
_royalGuard.clear();
|
_royalGuard.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load Triol's Revelation.
|
|
||||||
protected void loadTriolRevelation()
|
protected void loadTriolRevelation()
|
||||||
{
|
{
|
||||||
_triolRevelationSpawn.clear();
|
_triolRevelationSpawn.clear();
|
||||||
@@ -392,7 +383,7 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("VanHalterManager.loadTriolRevelation: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
LOGGER.warning("VanHalter.loadTriolRevelation: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -401,8 +392,8 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
// Problem with initializing spawn, go to next one
|
// Problem with initializing spawn, go to next one.
|
||||||
LOGGER.warning("VanHalterManager.loadTriolRevelation: Spawn could not be initialized: " + e);
|
LOGGER.warning("VanHalter.loadTriolRevelation: Spawn could not be initialized: " + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -435,7 +426,6 @@ public class VanHalter extends Quest
|
|||||||
_bleedingPlayers.clear();
|
_bleedingPlayers.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load Royal Guard Captain.
|
|
||||||
protected void loadRoyalGuardCaptain()
|
protected void loadRoyalGuardCaptain()
|
||||||
{
|
{
|
||||||
_royalGuardCaptainSpawn.clear();
|
_royalGuardCaptainSpawn.clear();
|
||||||
@@ -466,7 +456,7 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("VanHalterManager.loadRoyalGuardCaptain: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
LOGGER.warning("VanHalter.loadRoyalGuardCaptain: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -475,8 +465,8 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
// Problem with initializing spawn, go to next one
|
// Problem with initializing spawn, go to next one.
|
||||||
LOGGER.warning("VanHalterManager.loadRoyalGuardCaptain: Spawn could not be initialized: " + e);
|
LOGGER.warning("VanHalter.loadRoyalGuardCaptain: Spawn could not be initialized: " + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -505,7 +495,6 @@ public class VanHalter extends Quest
|
|||||||
_royalGuardCaptain.clear();
|
_royalGuardCaptain.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load Royal Guard Helper.
|
|
||||||
protected void loadRoyalGuardHelper()
|
protected void loadRoyalGuardHelper()
|
||||||
{
|
{
|
||||||
_royalGuardHelperSpawn.clear();
|
_royalGuardHelperSpawn.clear();
|
||||||
@@ -536,7 +525,7 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("VanHalterManager.loadRoyalGuardHelper: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
LOGGER.warning("VanHalter.loadRoyalGuardHelper: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -545,8 +534,8 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
// Problem with initializing spawn, go to next one
|
// Problem with initializing spawn, go to next one.
|
||||||
LOGGER.warning("VanHalterManager.loadRoyalGuardHelper: Spawn could not be initialized: " + e);
|
LOGGER.warning("VanHalter.loadRoyalGuardHelper: Spawn could not be initialized: " + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -569,7 +558,6 @@ public class VanHalter extends Quest
|
|||||||
_royalGuardHepler.clear();
|
_royalGuardHepler.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load Guard Of Altar
|
|
||||||
protected void loadGuardOfAltar()
|
protected void loadGuardOfAltar()
|
||||||
{
|
{
|
||||||
_guardOfAltarSpawn.clear();
|
_guardOfAltarSpawn.clear();
|
||||||
@@ -600,7 +588,7 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("VanHalterManager.loadGuardOfAltar: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
LOGGER.warning("VanHalter.loadGuardOfAltar: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -609,8 +597,8 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
// Problem with initializing spawn, go to next one
|
// Problem with initializing spawn, go to next one.
|
||||||
LOGGER.warning("VanHalterManager.loadGuardOfAltar: Spawn could not be initialized: " + e);
|
LOGGER.warning("VanHalter.loadGuardOfAltar: Spawn could not be initialized: " + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -639,7 +627,6 @@ public class VanHalter extends Quest
|
|||||||
_guardOfAltar.clear();
|
_guardOfAltar.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load High Priestess van Halter.
|
|
||||||
protected void loadVanHalter()
|
protected void loadVanHalter()
|
||||||
{
|
{
|
||||||
_vanHalterSpawn = null;
|
_vanHalterSpawn = null;
|
||||||
@@ -670,7 +657,7 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("VanHalterManager.loadVanHalter: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
LOGGER.warning("VanHalter.loadVanHalter: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -679,8 +666,8 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
// Problem with initializing spawn, go to next one
|
// Problem with initializing spawn, go to next one.
|
||||||
LOGGER.warning("VanHalterManager.loadVanHalter: Spawn could not be initialized: " + e);
|
LOGGER.warning("VanHalter.loadVanHalter: Spawn could not be initialized: " + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -700,7 +687,6 @@ public class VanHalter extends Quest
|
|||||||
_vanHalter.deleteMe();
|
_vanHalter.deleteMe();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load Ritual Offering.
|
|
||||||
protected void loadRitualOffering()
|
protected void loadRitualOffering()
|
||||||
{
|
{
|
||||||
_ritualOfferingSpawn = null;
|
_ritualOfferingSpawn = null;
|
||||||
@@ -731,7 +717,7 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("VanHalterManager.loadRitualOffering: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
LOGGER.warning("VanHalter.loadRitualOffering: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -740,8 +726,8 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
// Problem with initializing spawn, go to next one
|
// Problem with initializing spawn, go to next one.
|
||||||
LOGGER.warning("VanHalterManager.loadRitualOffering: Spawn could not be initialized: " + e);
|
LOGGER.warning("VanHalter.loadRitualOffering: Spawn could not be initialized: " + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -762,7 +748,6 @@ public class VanHalter extends Quest
|
|||||||
_ritualOffering.deleteMe();
|
_ritualOffering.deleteMe();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Load Ritual Sacrifice.
|
|
||||||
protected void loadRitualSacrifice()
|
protected void loadRitualSacrifice()
|
||||||
{
|
{
|
||||||
_ritualSacrificeSpawn = null;
|
_ritualSacrificeSpawn = null;
|
||||||
@@ -793,7 +778,7 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
LOGGER.warning("VanHalterManager.loadRitualSacrifice: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
LOGGER.warning("VanHalter.loadRitualSacrifice: Data missing in NPC table for ID: " + rset.getInt("npc_templateid") + ".");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -802,8 +787,8 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
// Problem with initializing spawn, go to next one
|
// Problem with initializing spawn, go to next one.
|
||||||
LOGGER.warning("VanHalterManager.loadRitualSacrifice: Spawn could not be initialized: " + e);
|
LOGGER.warning("VanHalter.loadRitualSacrifice: Spawn could not be initialized: " + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -971,7 +956,6 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// event
|
|
||||||
public void checkTriolRevelationDestroy()
|
public void checkTriolRevelationDestroy()
|
||||||
{
|
{
|
||||||
if (_isCaptainSpawned)
|
if (_isCaptainSpawned)
|
||||||
@@ -1018,7 +1002,6 @@ public class VanHalter extends Quest
|
|||||||
_movieTask = ThreadPool.schedule(new Movie(1), Config.HPH_APPTIMEOFHALTER);
|
_movieTask = ThreadPool.schedule(new Movie(1), Config.HPH_APPTIMEOFHALTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start fight against High Priestess van Halter.
|
|
||||||
protected void combatBeginning()
|
protected void combatBeginning()
|
||||||
{
|
{
|
||||||
if (_timeUpTask != null)
|
if (_timeUpTask != null)
|
||||||
@@ -1038,7 +1021,6 @@ public class VanHalter extends Quest
|
|||||||
_vanHalter.reduceCurrentHp(1, targets.get(Rnd.get(1, i)));
|
_vanHalter.reduceCurrentHp(1, targets.get(Rnd.get(1, i)));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Call Royal Guard Helper and escape from player.
|
|
||||||
public void callRoyalGuardHelper()
|
public void callRoyalGuardHelper()
|
||||||
{
|
{
|
||||||
if (!_isHelperCalled)
|
if (!_isHelperCalled)
|
||||||
@@ -1136,7 +1118,6 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check bleeding player.
|
|
||||||
protected void addBleeding()
|
protected void addBleeding()
|
||||||
{
|
{
|
||||||
final Skill bleed = SkillTable.getInstance().getSkill(4615, 12);
|
final Skill bleed = SkillTable.getInstance().getSkill(4615, 12);
|
||||||
@@ -1194,10 +1175,9 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// High Priestess van Halter dead or time up.
|
|
||||||
public void enterInterval()
|
public void enterInterval()
|
||||||
{
|
{
|
||||||
// Cancel all task
|
// Cancel all task.
|
||||||
if (_callRoyalGuardHelperTask != null)
|
if (_callRoyalGuardHelperTask != null)
|
||||||
{
|
{
|
||||||
_callRoyalGuardHelperTask.cancel(false);
|
_callRoyalGuardHelperTask.cancel(false);
|
||||||
@@ -1246,7 +1226,7 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
_timeUpTask = null;
|
_timeUpTask = null;
|
||||||
|
|
||||||
// Delete monsters
|
// Delete monsters.
|
||||||
if (_vanHalter.isDead())
|
if (_vanHalter.isDead())
|
||||||
{
|
{
|
||||||
_vanHalter.getSpawn().stopRespawn();
|
_vanHalter.getSpawn().stopRespawn();
|
||||||
@@ -1283,7 +1263,6 @@ public class VanHalter extends Quest
|
|||||||
_intervalTask = ThreadPool.schedule(new Interval(), temp);
|
_intervalTask = ThreadPool.schedule(new Interval(), temp);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Interval.
|
|
||||||
protected class Interval implements Runnable
|
protected class Interval implements Runnable
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@@ -1293,10 +1272,9 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Interval end.
|
|
||||||
public void setupAltar()
|
public void setupAltar()
|
||||||
{
|
{
|
||||||
// Cancel all task
|
// Cancel all tasks.
|
||||||
if (_callRoyalGuardHelperTask != null)
|
if (_callRoyalGuardHelperTask != null)
|
||||||
{
|
{
|
||||||
_callRoyalGuardHelperTask.cancel(false);
|
_callRoyalGuardHelperTask.cancel(false);
|
||||||
@@ -1345,7 +1323,7 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
_timeUpTask = null;
|
_timeUpTask = null;
|
||||||
|
|
||||||
// Delete all monsters
|
// Delete all monsters.
|
||||||
deleteVanHalter();
|
deleteVanHalter();
|
||||||
deleteTriolRevelation();
|
deleteTriolRevelation();
|
||||||
deleteRoyalGuardHepler();
|
deleteRoyalGuardHepler();
|
||||||
@@ -1362,7 +1340,7 @@ public class VanHalter extends Quest
|
|||||||
_isHelperCalled = false;
|
_isHelperCalled = false;
|
||||||
_isHalterSpawned = false;
|
_isHalterSpawned = false;
|
||||||
|
|
||||||
// Set door state
|
// Set door state.
|
||||||
closeDoorOfSacrifice();
|
closeDoorOfSacrifice();
|
||||||
openDoorOfAltar(true);
|
openDoorOfAltar(true);
|
||||||
|
|
||||||
@@ -1382,7 +1360,6 @@ public class VanHalter extends Quest
|
|||||||
_timeUpTask = ThreadPool.schedule(new TimeUp(), Config.HPH_ACTIVITYTIMEOFHALTER);
|
_timeUpTask = ThreadPool.schedule(new TimeUp(), Config.HPH_ACTIVITYTIMEOFHALTER);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Time up.
|
|
||||||
protected class TimeUp implements Runnable
|
protected class TimeUp implements Runnable
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
@@ -1392,7 +1369,6 @@ public class VanHalter extends Quest
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Appearance movie.
|
|
||||||
private class Movie implements Runnable
|
private class Movie implements Runnable
|
||||||
{
|
{
|
||||||
private static final int DISTANCE = 6502500;
|
private static final int DISTANCE = 6502500;
|
||||||
|
@@ -47,6 +47,10 @@ public class Zaken extends Quest
|
|||||||
{
|
{
|
||||||
protected static final Logger LOGGER = Logger.getLogger(Zaken.class.getName());
|
protected static final Logger LOGGER = Logger.getLogger(Zaken.class.getName());
|
||||||
|
|
||||||
|
// Zaken status
|
||||||
|
private static final byte ALIVE = 0; // Zaken is spawned.
|
||||||
|
private static final byte DEAD = 1; // Zaken has been killed.
|
||||||
|
// NPCs
|
||||||
private static final int ZAKEN = 29022;
|
private static final int ZAKEN = 29022;
|
||||||
private static final int DOLL_BLADER_B = 29023;
|
private static final int DOLL_BLADER_B = 29023;
|
||||||
private static final int VALE_MASTER_B = 29024;
|
private static final int VALE_MASTER_B = 29024;
|
||||||
@@ -106,31 +110,28 @@ public class Zaken extends Quest
|
|||||||
-2944,
|
-2944,
|
||||||
-2944
|
-2944
|
||||||
};
|
};
|
||||||
// Zaken status tracking
|
|
||||||
private static final byte ALIVE = 0; // Zaken is spawned.
|
|
||||||
private static final byte DEAD = 1; // Zaken has been killed.
|
|
||||||
// Misc
|
// Misc
|
||||||
private static BossZone _zone;
|
private static BossZone _zone;
|
||||||
private int _1001 = 0; // used for first cancel of QuestTimer "1001"
|
private int _1001 = 0; // Used for first cancel of QuestTimer "1001".
|
||||||
private int _ai0 = 0; // used for zaken coords updater
|
private int _ai0 = 0; // Used for zaken coords updater.
|
||||||
private int _ai1 = 0; // used for X coord tracking for non-random teleporting in zaken's self teleport skill
|
private int _ai1 = 0; // Used for X coord tracking for non-random teleporting in zaken's self teleport skill.
|
||||||
private int _ai2 = 0; // used for Y coord tracking for non-random teleporting in zaken's self teleport skill
|
private int _ai2 = 0; // Used for Y coord tracking for non-random teleporting in zaken's self teleport skill.
|
||||||
private int _ai3 = 0; // used for Z coord tracking for non-random teleporting in zaken's self teleport skill
|
private int _ai3 = 0; // Used for Z coord tracking for non-random teleporting in zaken's self teleport skill.
|
||||||
private int _ai4 = 0; // used for spawning minions cycles
|
private int _ai4 = 0; // Used for spawning minions cycles.
|
||||||
private int _quest0 = 0; // used for teleporting progress
|
private int _quest0 = 0; // Used for teleporting progress.
|
||||||
private int _quest1 = 0; // used for most hated players progress
|
private int _quest1 = 0; // Used for most hated players progress.
|
||||||
private int _quest2 = 0; // used for zaken HP check for teleport
|
private int _quest2 = 0; // Used for zaken HP check for teleport.
|
||||||
private PlayerInstance c_quest0 = null; // 1st player used for area teleport
|
private PlayerInstance c_quest0 = null; // 1st player used for area teleport.
|
||||||
private PlayerInstance c_quest1 = null; // 2nd player used for area teleport
|
private PlayerInstance c_quest1 = null; // 2nd player used for area teleport.
|
||||||
private PlayerInstance c_quest2 = null; // 3rd player used for area teleport
|
private PlayerInstance c_quest2 = null; // 3rd player used for area teleport.
|
||||||
private PlayerInstance c_quest3 = null; // 4th player used for area teleport
|
private PlayerInstance c_quest3 = null; // 4th player used for area teleport.
|
||||||
private PlayerInstance c_quest4 = null; // 5th player used for area teleport
|
private PlayerInstance c_quest4 = null; // 5th player used for area teleport.
|
||||||
|
|
||||||
public Zaken()
|
public Zaken()
|
||||||
{
|
{
|
||||||
super(-1, "ai/bosses");
|
super(-1, "ai/bosses");
|
||||||
|
|
||||||
// Zaken doors handling
|
// Zaken doors handling.
|
||||||
ThreadPool.scheduleAtFixedRate(() ->
|
ThreadPool.scheduleAtFixedRate(() ->
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
@@ -168,17 +169,17 @@ public class Zaken extends Quest
|
|||||||
final Integer status = GrandBossManager.getInstance().getBossStatus(ZAKEN);
|
final Integer status = GrandBossManager.getInstance().getBossStatus(ZAKEN);
|
||||||
if (status == DEAD)
|
if (status == DEAD)
|
||||||
{
|
{
|
||||||
// load the unlock date and time for zaken from DB
|
// Load the unlock date and time for zaken from DB.
|
||||||
final long temp = info.getLong("respawn_time") - Chronos.currentTimeMillis();
|
final long temp = info.getLong("respawn_time") - Chronos.currentTimeMillis();
|
||||||
// if zaken is locked until a certain time, mark it so and start the unlock timer
|
// If Zaken is locked until a certain time, mark it so and start the unlock timer.
|
||||||
// the unlock time has not yet expired.
|
// The unlock time has not yet expired.
|
||||||
if (temp > 0)
|
if (temp > 0)
|
||||||
{
|
{
|
||||||
startQuestTimer("zaken_unlock", temp, null, null);
|
startQuestTimer("zaken_unlock", temp, null, null);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// the time has already expired while the server was offline. Immediately spawn zaken.
|
// The time has already expired while the server was offline. Immediately spawn Zaken.
|
||||||
final GrandBossInstance zaken = (GrandBossInstance) addSpawn(ZAKEN, 55312, 219168, -3223, 0, false, 0);
|
final GrandBossInstance zaken = (GrandBossInstance) addSpawn(ZAKEN, 55312, 219168, -3223, 0, false, 0);
|
||||||
GrandBossManager.getInstance().setBossStatus(ZAKEN, ALIVE);
|
GrandBossManager.getInstance().setBossStatus(ZAKEN, ALIVE);
|
||||||
spawnBoss(zaken);
|
spawnBoss(zaken);
|
||||||
@@ -186,13 +187,13 @@ public class Zaken extends Quest
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
final int loc_x = info.getInt("loc_x");
|
final int x = info.getInt("loc_x");
|
||||||
final int loc_y = info.getInt("loc_y");
|
final int y = info.getInt("loc_y");
|
||||||
final int loc_z = info.getInt("loc_z");
|
final int z = info.getInt("loc_z");
|
||||||
final int heading = info.getInt("heading");
|
final int heading = info.getInt("heading");
|
||||||
final int hp = info.getInt("currentHP");
|
final int hp = info.getInt("currentHP");
|
||||||
final int mp = info.getInt("currentMP");
|
final int mp = info.getInt("currentMP");
|
||||||
final GrandBossInstance zaken = (GrandBossInstance) addSpawn(ZAKEN, loc_x, loc_y, loc_z, heading, false, 0);
|
final GrandBossInstance zaken = (GrandBossInstance) addSpawn(ZAKEN, x, y, z, heading, false, 0);
|
||||||
zaken.setCurrentHpMp(hp, mp);
|
zaken.setCurrentHpMp(hp, mp);
|
||||||
spawnBoss(zaken);
|
spawnBoss(zaken);
|
||||||
}
|
}
|
||||||
@@ -225,7 +226,7 @@ public class Zaken extends Quest
|
|||||||
}
|
}
|
||||||
if (getTimeHour() < 5)
|
if (getTimeHour() < 5)
|
||||||
{
|
{
|
||||||
if (sk4223 == 1) // use night face if zaken have day face
|
if (sk4223 == 1) // Use night face if Zaken have day face.
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
npc.setTarget(npc);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4224, 1));
|
npc.doCast(SkillTable.getInstance().getSkill(4224, 1));
|
||||||
@@ -233,7 +234,7 @@ public class Zaken extends Quest
|
|||||||
_ai2 = npc.getY();
|
_ai2 = npc.getY();
|
||||||
_ai3 = npc.getZ();
|
_ai3 = npc.getZ();
|
||||||
}
|
}
|
||||||
if (sk4227 == 0) // use zaken regeneration
|
if (sk4227 == 0) // Use Zaken regeneration.
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
npc.setTarget(npc);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4227, 1));
|
npc.doCast(SkillTable.getInstance().getSkill(4227, 1));
|
||||||
@@ -405,13 +406,13 @@ public class Zaken extends Quest
|
|||||||
_quest1 = 0;
|
_quest1 = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (sk4223 == 0) // use day face if not night time
|
else if (sk4223 == 0) // Use day face if not night time.
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
npc.setTarget(npc);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4223, 1));
|
npc.doCast(SkillTable.getInstance().getSkill(4223, 1));
|
||||||
_quest2 = 3;
|
_quest2 = 3;
|
||||||
}
|
}
|
||||||
if (sk4227 == 1) // when switching to day time, cancel zaken night regen
|
if (sk4227 == 1) // When switching to day time, cancel zaken night regen.
|
||||||
{
|
{
|
||||||
npc.setTarget(npc);
|
npc.setTarget(npc);
|
||||||
npc.doCast(SkillTable.getInstance().getSkill(4242, 1));
|
npc.doCast(SkillTable.getInstance().getSkill(4242, 1));
|
||||||
@@ -442,131 +443,131 @@ public class Zaken extends Quest
|
|||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
final int rr = Rnd.get(15);
|
final int rr = Rnd.get(15);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, X_COORDS[rr] + Rnd.get(650), Y_COORDS[rr] + Rnd.get(650), Z_COORDS[rr], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, X_COORDS[rr] + Rnd.get(650), Y_COORDS[rr] + Rnd.get(650), Z_COORDS[rr], Rnd.get(65536), false, 0);
|
||||||
_ai4 = 2;
|
_ai4 = 2;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
final int rr = Rnd.get(15);
|
final int rr = Rnd.get(15);
|
||||||
addSpawn(DOLL_BLADER_B, X_COORDS[rr] + Rnd.get(650), Y_COORDS[rr] + Rnd.get(650), Z_COORDS[rr], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, X_COORDS[rr] + Rnd.get(650), Y_COORDS[rr] + Rnd.get(650), Z_COORDS[rr], Rnd.get(65536), false, 0);
|
||||||
_ai4 = 3;
|
_ai4 = 3;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 3:
|
case 3:
|
||||||
{
|
{
|
||||||
addSpawn(VALE_MASTER_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0);
|
||||||
_ai4 = 4;
|
_ai4 = 4;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 4:
|
case 4:
|
||||||
{
|
{
|
||||||
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, X_COORDS[Rnd.get(15)] + Rnd.get(650), Y_COORDS[Rnd.get(15)] + Rnd.get(650), Z_COORDS[Rnd.get(15)], Rnd.get(65536), false, 0);
|
||||||
_ai4 = 5;
|
_ai4 = 5;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 5:
|
case 5:
|
||||||
{
|
{
|
||||||
addSpawn(DOLL_BLADER_B, 52675, 219371, -3290, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 52675, 219371, -3290, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 52687, 219596, -3368, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 52687, 219596, -3368, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 52672, 219740, -3418, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 52672, 219740, -3418, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 52857, 219992, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 52857, 219992, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 52959, 219997, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 52959, 219997, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 53381, 220151, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 53381, 220151, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54236, 220948, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54236, 220948, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54885, 220144, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54885, 220144, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55264, 219860, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55264, 219860, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55399, 220263, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55399, 220263, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55679, 220129, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55679, 220129, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 56276, 220783, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 56276, 220783, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 57173, 220234, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 57173, 220234, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 56267, 218826, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 56267, 218826, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 56294, 219482, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 56294, 219482, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56094, 219113, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56094, 219113, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 56364, 218967, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 56364, 218967, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 57113, 218079, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 57113, 218079, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 56186, 217153, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 56186, 217153, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55440, 218081, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55440, 218081, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55202, 217940, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55202, 217940, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55225, 218236, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55225, 218236, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54973, 218075, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54973, 218075, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 53412, 218077, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 53412, 218077, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54226, 218797, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54226, 218797, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54394, 219067, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54394, 219067, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54139, 219253, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54139, 219253, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 54262, 219480, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 54262, 219480, -3488, Rnd.get(65536), false, 0);
|
||||||
_ai4 = 6;
|
_ai4 = 6;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 6:
|
case 6:
|
||||||
{
|
{
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 53412, 218077, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 53412, 218077, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54413, 217132, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54413, 217132, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 54841, 217132, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 54841, 217132, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 55372, 217128, -3343, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 55372, 217128, -3343, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 55893, 217122, -3488, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 55893, 217122, -3488, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56282, 217237, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56282, 217237, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 56963, 218080, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 56963, 218080, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 56267, 218826, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 56267, 218826, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 56294, 219482, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 56294, 219482, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56094, 219113, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56094, 219113, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 56364, 218967, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 56364, 218967, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 56276, 220783, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 56276, 220783, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 57173, 220234, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 57173, 220234, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54885, 220144, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54885, 220144, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55264, 219860, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55264, 219860, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55399, 220263, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55399, 220263, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55679, 220129, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55679, 220129, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54236, 220948, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54236, 220948, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54464, 219095, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54464, 219095, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54226, 218797, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54226, 218797, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54394, 219067, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54394, 219067, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54139, 219253, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54139, 219253, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 54262, 219480, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 54262, 219480, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 53412, 218077, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 53412, 218077, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55440, 218081, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55440, 218081, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55202, 217940, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55202, 217940, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55225, 218236, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55225, 218236, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54973, 218075, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54973, 218075, -3216, Rnd.get(65536), false, 0);
|
||||||
_ai4 = 7;
|
_ai4 = 7;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 7:
|
case 7:
|
||||||
{
|
{
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54228, 217504, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54228, 217504, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54181, 217168, -3216, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54181, 217168, -3216, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 54714, 217123, -3168, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 54714, 217123, -3168, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 55298, 217127, -3073, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 55298, 217127, -3073, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 55787, 217130, -2993, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 55787, 217130, -2993, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56284, 217216, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56284, 217216, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 56963, 218080, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 56963, 218080, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 56267, 218826, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 56267, 218826, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 56294, 219482, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 56294, 219482, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56094, 219113, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 56094, 219113, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 56364, 218967, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 56364, 218967, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 56276, 220783, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 56276, 220783, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 57173, 220234, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 57173, 220234, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54885, 220144, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54885, 220144, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55264, 219860, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55264, 219860, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55399, 220263, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55399, 220263, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55679, 220129, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55679, 220129, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54236, 220948, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54236, 220948, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54464, 219095, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54464, 219095, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54226, 218797, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54226, 218797, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(VALE_MASTER_B, 54394, 219067, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(VALE_MASTER_B, 54394, 219067, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54139, 219253, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54139, 219253, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(DOLL_BLADER_B, 54262, 219480, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(DOLL_BLADER_B, 54262, 219480, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 53412, 218077, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 53412, 218077, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54280, 217200, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 54280, 217200, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55440, 218081, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55440, 218081, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55202, 217940, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_CAPTAIN_B, 55202, 217940, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 55225, 218236, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 55225, 218236, -2944, Rnd.get(65536), false, 0);
|
||||||
addSpawn(PIRATES_ZOMBIE_B, 54973, 218075, -2944, Rnd.get(65536), false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(PIRATES_ZOMBIE_B, 54973, 218075, -2944, Rnd.get(65536), false, 0);
|
||||||
_ai4 = 8;
|
_ai4 = 8;
|
||||||
cancelQuestTimer("1003", null, null);
|
cancelQuestTimer("1003", null, null);
|
||||||
break;
|
break;
|
||||||
@@ -586,7 +587,7 @@ public class Zaken extends Quest
|
|||||||
}
|
}
|
||||||
case "CreateOnePrivateEx":
|
case "CreateOnePrivateEx":
|
||||||
{
|
{
|
||||||
addSpawn(npc.getNpcId(), npc.getX(), npc.getY(), npc.getZ(), 0, false, 0)/* .setIsRaidMinion(true) */;
|
addSpawn(npc.getNpcId(), npc.getX(), npc.getY(), npc.getZ(), 0, false, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -605,7 +606,7 @@ public class Zaken extends Quest
|
|||||||
final int callerId = caller.getNpcId();
|
final int callerId = caller.getNpcId();
|
||||||
if ((getTimeHour() < 5) && (callerId != ZAKEN) && (npcId == ZAKEN))
|
if ((getTimeHour() < 5) && (callerId != ZAKEN) && (npcId == ZAKEN))
|
||||||
{
|
{
|
||||||
final int damage = 0; // well damage required :x
|
final int damage = 0;
|
||||||
if ((npc.getAI().getIntention() == CtrlIntention.AI_INTENTION_IDLE) && (_ai0 == 0) && (damage < 10) && (Rnd.get((30 * 15)) < 1))// todo - damage missing
|
if ((npc.getAI().getIntention() == CtrlIntention.AI_INTENTION_IDLE) && (_ai0 == 0) && (damage < 10) && (Rnd.get((30 * 15)) < 1))// todo - damage missing
|
||||||
{
|
{
|
||||||
_ai0 = 1;
|
_ai0 = 1;
|
||||||
@@ -833,12 +834,12 @@ public class Zaken extends Quest
|
|||||||
{
|
{
|
||||||
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
npc.broadcastPacket(new PlaySound(1, "BS02_D", npc));
|
||||||
GrandBossManager.getInstance().setBossStatus(ZAKEN, DEAD);
|
GrandBossManager.getInstance().setBossStatus(ZAKEN, DEAD);
|
||||||
// time is 36hour +/- 17hour
|
// Time is 36hour +/- 17hour.
|
||||||
final long respawnTime = (Config.ZAKEN_RESP_FIRST + Rnd.get(Config.ZAKEN_RESP_SECOND)) * 3600000;
|
final long respawnTime = (Config.ZAKEN_RESP_FIRST + Rnd.get(Config.ZAKEN_RESP_SECOND)) * 3600000;
|
||||||
startQuestTimer("zaken_unlock", respawnTime, null, null);
|
startQuestTimer("zaken_unlock", respawnTime, null, null);
|
||||||
cancelQuestTimer("1001", npc, null);
|
cancelQuestTimer("1001", npc, null);
|
||||||
cancelQuestTimer("1003", npc, null);
|
cancelQuestTimer("1003", npc, null);
|
||||||
// also save the respawn time so that the info is maintained past reboots
|
// Also save the respawn time so that the info is maintained past reboots.
|
||||||
final StatSet info = GrandBossManager.getInstance().getStatSet(ZAKEN);
|
final StatSet info = GrandBossManager.getInstance().getStatSet(ZAKEN);
|
||||||
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
info.set("respawn_time", Chronos.currentTimeMillis() + respawnTime);
|
||||||
GrandBossManager.getInstance().setStatSet(ZAKEN, info);
|
GrandBossManager.getInstance().setStatSet(ZAKEN, info);
|
||||||
@@ -964,7 +965,7 @@ public class Zaken extends Quest
|
|||||||
startQuestTimer("1003", 1700, null, null);
|
startQuestTimer("1003", 1700, null, null);
|
||||||
}
|
}
|
||||||
_1001 = 1;
|
_1001 = 1;
|
||||||
startQuestTimer("1001", 1000, npc, null); // buffs,random teleports
|
startQuestTimer("1001", 1000, npc, null); // Buffs, random teleports.
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTimeHour()
|
public int getTimeHour()
|
||||||
|
@@ -1733,7 +1733,7 @@ public class Quest extends ManagedScript
|
|||||||
* @param mobs
|
* @param mobs
|
||||||
* @see #registerMobs(int[], EventType...)
|
* @see #registerMobs(int[], EventType...)
|
||||||
*/
|
*/
|
||||||
public void registerMobs(int[] mobs)
|
public void registerMobs(int... mobs)
|
||||||
{
|
{
|
||||||
for (int id : mobs)
|
for (int id : mobs)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user