Caution deleting NPCs with active quest timers.
This commit is contained in:
parent
98e76d2817
commit
3ced75d22f
@ -474,8 +474,7 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
{
|
||||
_feedInfo.remove(npc.getObjectId());
|
||||
}
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
|
||||
// spawn the new mob
|
||||
final Attackable nextNpc = (Attackable) addSpawn(MAD_COW_POLYMORPH.get(npc.getId()), npc);
|
||||
|
||||
@ -484,6 +483,9 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
nextNpc.setRunning();
|
||||
nextNpc.addDamageHate(player, 0, 99999);
|
||||
nextNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
|
@ -169,9 +169,9 @@ public class Alarm extends AbstractNpcAI
|
||||
{
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
npc.deleteMe();
|
||||
setMemoState(player, ART_OF_PERSUASION_ID, 4);
|
||||
htmltext = "32367-184_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -189,9 +189,9 @@ public class Alarm extends AbstractNpcAI
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
|
||||
npc.deleteMe();
|
||||
setMemoState(player, NIKOLAS_COOPERATION_ID, 4);
|
||||
htmltext = "32367-185_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -222,9 +222,9 @@ public class StakatoNest extends AbstractNpcAI
|
||||
if (npcId > 0)
|
||||
{
|
||||
npc.getSpawn().decreaseCount(npc);
|
||||
npc.deleteMe();
|
||||
final Npc spawned = addSpawn(npcId, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, true);
|
||||
addAttackPlayerDesire(spawned, player);
|
||||
npc.deleteMe();
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@ -204,7 +204,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -213,6 +212,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -104,8 +104,8 @@ public class IceQueensCastle extends AbstractInstance
|
||||
if (npc != null)
|
||||
{
|
||||
playMovie(player, Movie.SC_BOSS_FREYA_FORCED_DEFEAT);
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, null, player);
|
||||
npc.deleteMe();
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, npc, player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -483,7 +483,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
disablePlayers(world);
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.abortAttack();
|
||||
@ -492,39 +492,39 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
playRandomSong(world);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_1":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(frintezza.getObjectId(), 4));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_2":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 500, 70, 15, 3000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_3":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 2500, 90, 12, 6000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_4":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final Location scarletLocation = activeScarlet.getLocation();
|
||||
int newHeading = 0;
|
||||
@ -540,30 +540,30 @@ public class LastImperialTomb extends AbstractInstance
|
||||
world.setParameter("newHeading", newHeading);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_5":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
activeScarlet.doDie(activeScarlet);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 14, 8000, 8000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, null, player, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_6":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.deleteMe();
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_7":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
final Location scarletLocation = world.getParameters().getLocation("scarletLocation");
|
||||
final Npc activeScarlet = addSpawn(SCARLET2, scarletLocation, false, 0, false, world.getId());
|
||||
@ -573,24 +573,22 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 12, 500, 14000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, activeScarlet, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_8":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(activeScarlet.getObjectId(), 2));
|
||||
broadcastPacket(world, new SocialAction(npc.getObjectId(), 2));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_9", 9000, npc, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_9":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.setInvul(false);
|
||||
activeScarlet.setImmobilized(false);
|
||||
activeScarlet.enableAllSkills();
|
||||
npc.setInvul(false);
|
||||
npc.setImmobilized(false);
|
||||
npc.enableAllSkills();
|
||||
enablePlayers(world);
|
||||
break;
|
||||
}
|
||||
@ -702,7 +700,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
if (npc.isScriptValue(1) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.20)))
|
||||
{
|
||||
npc.setScriptValue(2);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, null, attacker, false);
|
||||
}
|
||||
}
|
||||
if (skill != null)
|
||||
|
@ -60,8 +60,8 @@ public class QueenShyeed extends AbstractNpcAI
|
||||
{
|
||||
if (!npc.isDead())
|
||||
{
|
||||
npc.deleteMe();
|
||||
startRespawn();
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -258,8 +258,8 @@ public class AltarOfShilen extends AbstractInstance
|
||||
}
|
||||
world.setStatus(7);
|
||||
onStatusChanged(world);
|
||||
npc.deleteMe();
|
||||
cancelQuestTimer("check_player", npc, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -474,8 +474,7 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
{
|
||||
_feedInfo.remove(npc.getObjectId());
|
||||
}
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
|
||||
// spawn the new mob
|
||||
final Attackable nextNpc = (Attackable) addSpawn(MAD_COW_POLYMORPH.get(npc.getId()), npc);
|
||||
|
||||
@ -484,6 +483,9 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
nextNpc.setRunning();
|
||||
nextNpc.addDamageHate(player, 0, 99999);
|
||||
nextNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
|
@ -169,9 +169,9 @@ public class Alarm extends AbstractNpcAI
|
||||
{
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
npc.deleteMe();
|
||||
setMemoState(player, ART_OF_PERSUASION_ID, 4);
|
||||
htmltext = "32367-184_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -189,9 +189,9 @@ public class Alarm extends AbstractNpcAI
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
|
||||
npc.deleteMe();
|
||||
setMemoState(player, NIKOLAS_COOPERATION_ID, 4);
|
||||
htmltext = "32367-185_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -222,9 +222,9 @@ public class StakatoNest extends AbstractNpcAI
|
||||
if (npcId > 0)
|
||||
{
|
||||
npc.getSpawn().decreaseCount(npc);
|
||||
npc.deleteMe();
|
||||
final Npc spawned = addSpawn(npcId, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, true);
|
||||
addAttackPlayerDesire(spawned, player);
|
||||
npc.deleteMe();
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@ -204,7 +204,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -213,6 +212,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -104,8 +104,8 @@ public class IceQueensCastle extends AbstractInstance
|
||||
if (npc != null)
|
||||
{
|
||||
playMovie(player, Movie.SC_BOSS_FREYA_FORCED_DEFEAT);
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, null, player);
|
||||
npc.deleteMe();
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, npc, player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -483,7 +483,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
disablePlayers(world);
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.abortAttack();
|
||||
@ -492,39 +492,39 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
playRandomSong(world);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_1":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(frintezza.getObjectId(), 4));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_2":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 500, 70, 15, 3000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_3":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 2500, 90, 12, 6000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_4":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final Location scarletLocation = activeScarlet.getLocation();
|
||||
int newHeading = 0;
|
||||
@ -540,30 +540,30 @@ public class LastImperialTomb extends AbstractInstance
|
||||
world.setParameter("newHeading", newHeading);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_5":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
activeScarlet.doDie(activeScarlet);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 14, 8000, 8000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, null, player, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_6":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.deleteMe();
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_7":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
final Location scarletLocation = world.getParameters().getLocation("scarletLocation");
|
||||
final Npc activeScarlet = addSpawn(SCARLET2, scarletLocation, false, 0, false, world.getId());
|
||||
@ -573,24 +573,22 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 12, 500, 14000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, activeScarlet, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_8":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(activeScarlet.getObjectId(), 2));
|
||||
broadcastPacket(world, new SocialAction(npc.getObjectId(), 2));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_9", 9000, npc, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_9":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.setInvul(false);
|
||||
activeScarlet.setImmobilized(false);
|
||||
activeScarlet.enableAllSkills();
|
||||
npc.setInvul(false);
|
||||
npc.setImmobilized(false);
|
||||
npc.enableAllSkills();
|
||||
enablePlayers(world);
|
||||
break;
|
||||
}
|
||||
@ -702,7 +700,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
if (npc.isScriptValue(1) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.20)))
|
||||
{
|
||||
npc.setScriptValue(2);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, null, attacker, false);
|
||||
}
|
||||
}
|
||||
if (skill != null)
|
||||
|
@ -60,8 +60,8 @@ public class QueenShyeed extends AbstractNpcAI
|
||||
{
|
||||
if (!npc.isDead())
|
||||
{
|
||||
npc.deleteMe();
|
||||
startRespawn();
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -258,8 +258,8 @@ public class AltarOfShilen extends AbstractInstance
|
||||
}
|
||||
world.setStatus(7);
|
||||
onStatusChanged(world);
|
||||
npc.deleteMe();
|
||||
cancelQuestTimer("check_player", npc, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -474,8 +474,7 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
{
|
||||
_feedInfo.remove(npc.getObjectId());
|
||||
}
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
|
||||
// spawn the new mob
|
||||
final Attackable nextNpc = (Attackable) addSpawn(MAD_COW_POLYMORPH.get(npc.getId()), npc);
|
||||
|
||||
@ -484,6 +483,9 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
nextNpc.setRunning();
|
||||
nextNpc.addDamageHate(player, 0, 99999);
|
||||
nextNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
|
@ -169,9 +169,9 @@ public class Alarm extends AbstractNpcAI
|
||||
{
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
npc.deleteMe();
|
||||
setMemoState(player, ART_OF_PERSUASION_ID, 4);
|
||||
htmltext = "32367-184_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -189,9 +189,9 @@ public class Alarm extends AbstractNpcAI
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
|
||||
npc.deleteMe();
|
||||
setMemoState(player, NIKOLAS_COOPERATION_ID, 4);
|
||||
htmltext = "32367-185_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -222,9 +222,9 @@ public class StakatoNest extends AbstractNpcAI
|
||||
if (npcId > 0)
|
||||
{
|
||||
npc.getSpawn().decreaseCount(npc);
|
||||
npc.deleteMe();
|
||||
final Npc spawned = addSpawn(npcId, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, true);
|
||||
addAttackPlayerDesire(spawned, player);
|
||||
npc.deleteMe();
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@ -204,7 +204,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -213,6 +212,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -104,8 +104,8 @@ public class IceQueensCastle extends AbstractInstance
|
||||
if (npc != null)
|
||||
{
|
||||
playMovie(player, Movie.SC_BOSS_FREYA_FORCED_DEFEAT);
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, null, player);
|
||||
npc.deleteMe();
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, npc, player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -483,7 +483,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
disablePlayers(world);
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.abortAttack();
|
||||
@ -492,39 +492,39 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
playRandomSong(world);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_1":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(frintezza.getObjectId(), 4));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_2":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 500, 70, 15, 3000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_3":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 2500, 90, 12, 6000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_4":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final Location scarletLocation = activeScarlet.getLocation();
|
||||
int newHeading = 0;
|
||||
@ -540,30 +540,30 @@ public class LastImperialTomb extends AbstractInstance
|
||||
world.setParameter("newHeading", newHeading);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_5":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
activeScarlet.doDie(activeScarlet);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 14, 8000, 8000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, null, player, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_6":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.deleteMe();
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_7":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
final Location scarletLocation = world.getParameters().getLocation("scarletLocation");
|
||||
final Npc activeScarlet = addSpawn(SCARLET2, scarletLocation, false, 0, false, world.getId());
|
||||
@ -573,24 +573,22 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 12, 500, 14000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, activeScarlet, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_8":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(activeScarlet.getObjectId(), 2));
|
||||
broadcastPacket(world, new SocialAction(npc.getObjectId(), 2));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_9", 9000, npc, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_9":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.setInvul(false);
|
||||
activeScarlet.setImmobilized(false);
|
||||
activeScarlet.enableAllSkills();
|
||||
npc.setInvul(false);
|
||||
npc.setImmobilized(false);
|
||||
npc.enableAllSkills();
|
||||
enablePlayers(world);
|
||||
break;
|
||||
}
|
||||
@ -702,7 +700,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
if (npc.isScriptValue(1) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.20)))
|
||||
{
|
||||
npc.setScriptValue(2);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, null, attacker, false);
|
||||
}
|
||||
}
|
||||
if (skill != null)
|
||||
|
@ -60,8 +60,8 @@ public class QueenShyeed extends AbstractNpcAI
|
||||
{
|
||||
if (!npc.isDead())
|
||||
{
|
||||
npc.deleteMe();
|
||||
startRespawn();
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -258,8 +258,8 @@ public class AltarOfShilen extends AbstractInstance
|
||||
}
|
||||
world.setStatus(7);
|
||||
onStatusChanged(world);
|
||||
npc.deleteMe();
|
||||
cancelQuestTimer("check_player", npc, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -474,8 +474,7 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
{
|
||||
_feedInfo.remove(npc.getObjectId());
|
||||
}
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
|
||||
// spawn the new mob
|
||||
final Attackable nextNpc = (Attackable) addSpawn(MAD_COW_POLYMORPH.get(npc.getId()), npc);
|
||||
|
||||
@ -484,6 +483,9 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
nextNpc.setRunning();
|
||||
nextNpc.addDamageHate(player, 0, 99999);
|
||||
nextNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
|
@ -169,9 +169,9 @@ public class Alarm extends AbstractNpcAI
|
||||
{
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
npc.deleteMe();
|
||||
setMemoState(player, ART_OF_PERSUASION_ID, 4);
|
||||
htmltext = "32367-184_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -189,9 +189,9 @@ public class Alarm extends AbstractNpcAI
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
|
||||
npc.deleteMe();
|
||||
setMemoState(player, NIKOLAS_COOPERATION_ID, 4);
|
||||
htmltext = "32367-185_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -222,9 +222,9 @@ public class StakatoNest extends AbstractNpcAI
|
||||
if (npcId > 0)
|
||||
{
|
||||
npc.getSpawn().decreaseCount(npc);
|
||||
npc.deleteMe();
|
||||
final Npc spawned = addSpawn(npcId, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, true);
|
||||
addAttackPlayerDesire(spawned, player);
|
||||
npc.deleteMe();
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@ -204,7 +204,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -213,6 +212,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -104,8 +104,8 @@ public class IceQueensCastle extends AbstractInstance
|
||||
if (npc != null)
|
||||
{
|
||||
playMovie(player, Movie.SC_BOSS_FREYA_FORCED_DEFEAT);
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, null, player);
|
||||
npc.deleteMe();
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, npc, player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -483,7 +483,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
disablePlayers(world);
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.abortAttack();
|
||||
@ -492,39 +492,39 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
playRandomSong(world);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_1":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(frintezza.getObjectId(), 4));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_2":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 500, 70, 15, 3000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_3":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 2500, 90, 12, 6000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_4":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final Location scarletLocation = activeScarlet.getLocation();
|
||||
int newHeading = 0;
|
||||
@ -540,30 +540,30 @@ public class LastImperialTomb extends AbstractInstance
|
||||
world.setParameter("newHeading", newHeading);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_5":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
activeScarlet.doDie(activeScarlet);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 14, 8000, 8000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, null, player, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_6":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.deleteMe();
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_7":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
final Location scarletLocation = world.getParameters().getLocation("scarletLocation");
|
||||
final Npc activeScarlet = addSpawn(SCARLET2, scarletLocation, false, 0, false, world.getId());
|
||||
@ -573,24 +573,22 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 12, 500, 14000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, activeScarlet, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_8":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(activeScarlet.getObjectId(), 2));
|
||||
broadcastPacket(world, new SocialAction(npc.getObjectId(), 2));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_9", 9000, npc, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_9":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.setInvul(false);
|
||||
activeScarlet.setImmobilized(false);
|
||||
activeScarlet.enableAllSkills();
|
||||
npc.setInvul(false);
|
||||
npc.setImmobilized(false);
|
||||
npc.enableAllSkills();
|
||||
enablePlayers(world);
|
||||
break;
|
||||
}
|
||||
@ -702,7 +700,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
if (npc.isScriptValue(1) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.20)))
|
||||
{
|
||||
npc.setScriptValue(2);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, null, attacker, false);
|
||||
}
|
||||
}
|
||||
if (skill != null)
|
||||
|
@ -60,8 +60,8 @@ public class QueenShyeed extends AbstractNpcAI
|
||||
{
|
||||
if (!npc.isDead())
|
||||
{
|
||||
npc.deleteMe();
|
||||
startRespawn();
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -259,8 +259,8 @@ public class AltarOfShilen extends AbstractInstance
|
||||
}
|
||||
world.setStatus(7);
|
||||
onStatusChanged(world);
|
||||
npc.deleteMe();
|
||||
cancelQuestTimer("check_player", npc, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -474,8 +474,7 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
{
|
||||
_feedInfo.remove(npc.getObjectId());
|
||||
}
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
|
||||
// spawn the new mob
|
||||
final Attackable nextNpc = (Attackable) addSpawn(MAD_COW_POLYMORPH.get(npc.getId()), npc);
|
||||
|
||||
@ -484,6 +483,9 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
nextNpc.setRunning();
|
||||
nextNpc.addDamageHate(player, 0, 99999);
|
||||
nextNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
|
@ -169,9 +169,9 @@ public class Alarm extends AbstractNpcAI
|
||||
{
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
npc.deleteMe();
|
||||
setMemoState(player, ART_OF_PERSUASION_ID, 4);
|
||||
htmltext = "32367-184_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -189,9 +189,9 @@ public class Alarm extends AbstractNpcAI
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
|
||||
npc.deleteMe();
|
||||
setMemoState(player, NIKOLAS_COOPERATION_ID, 4);
|
||||
htmltext = "32367-185_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -222,9 +222,9 @@ public class StakatoNest extends AbstractNpcAI
|
||||
if (npcId > 0)
|
||||
{
|
||||
npc.getSpawn().decreaseCount(npc);
|
||||
npc.deleteMe();
|
||||
final Npc spawned = addSpawn(npcId, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, true);
|
||||
addAttackPlayerDesire(spawned, player);
|
||||
npc.deleteMe();
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@ -204,7 +204,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -213,6 +212,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -104,8 +104,8 @@ public class IceQueensCastle extends AbstractInstance
|
||||
if (npc != null)
|
||||
{
|
||||
playMovie(player, Movie.SC_BOSS_FREYA_FORCED_DEFEAT);
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, null, player);
|
||||
npc.deleteMe();
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, npc, player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -483,7 +483,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
disablePlayers(world);
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.abortAttack();
|
||||
@ -492,39 +492,39 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
playRandomSong(world);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_1":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(frintezza.getObjectId(), 4));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_2":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 500, 70, 15, 3000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_3":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 2500, 90, 12, 6000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_4":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final Location scarletLocation = activeScarlet.getLocation();
|
||||
int newHeading = 0;
|
||||
@ -540,30 +540,30 @@ public class LastImperialTomb extends AbstractInstance
|
||||
world.setParameter("newHeading", newHeading);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_5":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
activeScarlet.doDie(activeScarlet);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 14, 8000, 8000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, null, player, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_6":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.deleteMe();
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_7":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
final Location scarletLocation = world.getParameters().getLocation("scarletLocation");
|
||||
final Npc activeScarlet = addSpawn(SCARLET2, scarletLocation, false, 0, false, world.getId());
|
||||
@ -573,24 +573,22 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 12, 500, 14000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, activeScarlet, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_8":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(activeScarlet.getObjectId(), 2));
|
||||
broadcastPacket(world, new SocialAction(npc.getObjectId(), 2));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_9", 9000, npc, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_9":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.setInvul(false);
|
||||
activeScarlet.setImmobilized(false);
|
||||
activeScarlet.enableAllSkills();
|
||||
npc.setInvul(false);
|
||||
npc.setImmobilized(false);
|
||||
npc.enableAllSkills();
|
||||
enablePlayers(world);
|
||||
break;
|
||||
}
|
||||
@ -702,7 +700,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
if (npc.isScriptValue(1) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.20)))
|
||||
{
|
||||
npc.setScriptValue(2);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, null, attacker, false);
|
||||
}
|
||||
}
|
||||
if (skill != null)
|
||||
|
@ -60,8 +60,8 @@ public class QueenShyeed extends AbstractNpcAI
|
||||
{
|
||||
if (!npc.isDead())
|
||||
{
|
||||
npc.deleteMe();
|
||||
startRespawn();
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -259,8 +259,8 @@ public class AltarOfShilen extends AbstractInstance
|
||||
}
|
||||
world.setStatus(7);
|
||||
onStatusChanged(world);
|
||||
npc.deleteMe();
|
||||
cancelQuestTimer("check_player", npc, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -474,8 +474,7 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
{
|
||||
_feedInfo.remove(npc.getObjectId());
|
||||
}
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
|
||||
// spawn the new mob
|
||||
final Attackable nextNpc = (Attackable) addSpawn(MAD_COW_POLYMORPH.get(npc.getId()), npc);
|
||||
|
||||
@ -484,6 +483,9 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
nextNpc.setRunning();
|
||||
nextNpc.addDamageHate(player, 0, 99999);
|
||||
nextNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
|
@ -169,9 +169,9 @@ public class Alarm extends AbstractNpcAI
|
||||
{
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
npc.deleteMe();
|
||||
setMemoState(player, ART_OF_PERSUASION_ID, 4);
|
||||
htmltext = "32367-184_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -189,9 +189,9 @@ public class Alarm extends AbstractNpcAI
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
|
||||
npc.deleteMe();
|
||||
setMemoState(player, NIKOLAS_COOPERATION_ID, 4);
|
||||
htmltext = "32367-185_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -222,9 +222,9 @@ public class StakatoNest extends AbstractNpcAI
|
||||
if (npcId > 0)
|
||||
{
|
||||
npc.getSpawn().decreaseCount(npc);
|
||||
npc.deleteMe();
|
||||
final Npc spawned = addSpawn(npcId, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, true);
|
||||
addAttackPlayerDesire(spawned, player);
|
||||
npc.deleteMe();
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@ -204,7 +204,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -213,6 +212,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -104,8 +104,8 @@ public class IceQueensCastle extends AbstractInstance
|
||||
if (npc != null)
|
||||
{
|
||||
playMovie(player, Movie.SC_BOSS_FREYA_FORCED_DEFEAT);
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, null, player);
|
||||
npc.deleteMe();
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, npc, player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -483,7 +483,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
disablePlayers(world);
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.abortAttack();
|
||||
@ -492,39 +492,39 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
playRandomSong(world);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_1":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(frintezza.getObjectId(), 4));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_2":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 500, 70, 15, 3000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_3":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 2500, 90, 12, 6000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_4":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final Location scarletLocation = activeScarlet.getLocation();
|
||||
int newHeading = 0;
|
||||
@ -540,30 +540,30 @@ public class LastImperialTomb extends AbstractInstance
|
||||
world.setParameter("newHeading", newHeading);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_5":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
activeScarlet.doDie(activeScarlet);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 14, 8000, 8000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, null, player, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_6":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.deleteMe();
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_7":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
final Location scarletLocation = world.getParameters().getLocation("scarletLocation");
|
||||
final Npc activeScarlet = addSpawn(SCARLET2, scarletLocation, false, 0, false, world.getId());
|
||||
@ -573,24 +573,22 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 12, 500, 14000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, activeScarlet, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_8":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(activeScarlet.getObjectId(), 2));
|
||||
broadcastPacket(world, new SocialAction(npc.getObjectId(), 2));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_9", 9000, npc, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_9":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.setInvul(false);
|
||||
activeScarlet.setImmobilized(false);
|
||||
activeScarlet.enableAllSkills();
|
||||
npc.setInvul(false);
|
||||
npc.setImmobilized(false);
|
||||
npc.enableAllSkills();
|
||||
enablePlayers(world);
|
||||
break;
|
||||
}
|
||||
@ -702,7 +700,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
if (npc.isScriptValue(1) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.20)))
|
||||
{
|
||||
npc.setScriptValue(2);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, null, attacker, false);
|
||||
}
|
||||
}
|
||||
if (skill != null)
|
||||
|
@ -60,8 +60,8 @@ public class QueenShyeed extends AbstractNpcAI
|
||||
{
|
||||
if (!npc.isDead())
|
||||
{
|
||||
npc.deleteMe();
|
||||
startRespawn();
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -259,8 +259,8 @@ public class AltarOfShilen extends AbstractInstance
|
||||
}
|
||||
world.setStatus(7);
|
||||
onStatusChanged(world);
|
||||
npc.deleteMe();
|
||||
cancelQuestTimer("check_player", npc, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -474,8 +474,7 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
{
|
||||
_feedInfo.remove(npc.getObjectId());
|
||||
}
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
|
||||
// spawn the new mob
|
||||
final Attackable nextNpc = (Attackable) addSpawn(MAD_COW_POLYMORPH.get(npc.getId()), npc);
|
||||
|
||||
@ -484,6 +483,9 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
nextNpc.setRunning();
|
||||
nextNpc.addDamageHate(player, 0, 99999);
|
||||
nextNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
|
@ -169,9 +169,9 @@ public class Alarm extends AbstractNpcAI
|
||||
{
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
npc.deleteMe();
|
||||
setMemoState(player, ART_OF_PERSUASION_ID, 4);
|
||||
htmltext = "32367-184_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -189,9 +189,9 @@ public class Alarm extends AbstractNpcAI
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
|
||||
npc.deleteMe();
|
||||
setMemoState(player, NIKOLAS_COOPERATION_ID, 4);
|
||||
htmltext = "32367-185_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -222,9 +222,9 @@ public class StakatoNest extends AbstractNpcAI
|
||||
if (npcId > 0)
|
||||
{
|
||||
npc.getSpawn().decreaseCount(npc);
|
||||
npc.deleteMe();
|
||||
final Npc spawned = addSpawn(npcId, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, true);
|
||||
addAttackPlayerDesire(spawned, player);
|
||||
npc.deleteMe();
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@ -204,7 +204,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -213,6 +212,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -104,8 +104,8 @@ public class IceQueensCastle extends AbstractInstance
|
||||
if (npc != null)
|
||||
{
|
||||
playMovie(player, Movie.SC_BOSS_FREYA_FORCED_DEFEAT);
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, null, player);
|
||||
npc.deleteMe();
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, npc, player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -483,7 +483,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
disablePlayers(world);
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.abortAttack();
|
||||
@ -492,39 +492,39 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
playRandomSong(world);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_1":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(frintezza.getObjectId(), 4));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_2":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 500, 70, 15, 3000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_3":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 2500, 90, 12, 6000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_4":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final Location scarletLocation = activeScarlet.getLocation();
|
||||
int newHeading = 0;
|
||||
@ -540,30 +540,30 @@ public class LastImperialTomb extends AbstractInstance
|
||||
world.setParameter("newHeading", newHeading);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_5":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
activeScarlet.doDie(activeScarlet);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 14, 8000, 8000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, null, player, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_6":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.deleteMe();
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_7":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
final Location scarletLocation = world.getParameters().getLocation("scarletLocation");
|
||||
final Npc activeScarlet = addSpawn(SCARLET2, scarletLocation, false, 0, false, world.getId());
|
||||
@ -573,24 +573,22 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 12, 500, 14000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, activeScarlet, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_8":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(activeScarlet.getObjectId(), 2));
|
||||
broadcastPacket(world, new SocialAction(npc.getObjectId(), 2));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_9", 9000, npc, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_9":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.setInvul(false);
|
||||
activeScarlet.setImmobilized(false);
|
||||
activeScarlet.enableAllSkills();
|
||||
npc.setInvul(false);
|
||||
npc.setImmobilized(false);
|
||||
npc.enableAllSkills();
|
||||
enablePlayers(world);
|
||||
break;
|
||||
}
|
||||
@ -702,7 +700,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
if (npc.isScriptValue(1) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.20)))
|
||||
{
|
||||
npc.setScriptValue(2);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, null, attacker, false);
|
||||
}
|
||||
}
|
||||
if (skill != null)
|
||||
|
@ -60,8 +60,8 @@ public class QueenShyeed extends AbstractNpcAI
|
||||
{
|
||||
if (!npc.isDead())
|
||||
{
|
||||
npc.deleteMe();
|
||||
startRespawn();
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -259,8 +259,8 @@ public class AltarOfShilen extends AbstractInstance
|
||||
}
|
||||
world.setStatus(7);
|
||||
onStatusChanged(world);
|
||||
npc.deleteMe();
|
||||
cancelQuestTimer("check_player", npc, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -474,8 +474,7 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
{
|
||||
_feedInfo.remove(npc.getObjectId());
|
||||
}
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
|
||||
// spawn the new mob
|
||||
final Attackable nextNpc = (Attackable) addSpawn(MAD_COW_POLYMORPH.get(npc.getId()), npc);
|
||||
|
||||
@ -484,6 +483,9 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
nextNpc.setRunning();
|
||||
nextNpc.addDamageHate(player, 0, 99999);
|
||||
nextNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
|
@ -222,9 +222,9 @@ public class StakatoNest extends AbstractNpcAI
|
||||
if (npcId > 0)
|
||||
{
|
||||
npc.getSpawn().decreaseCount(npc);
|
||||
npc.deleteMe();
|
||||
final Npc spawned = addSpawn(npcId, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, true);
|
||||
addAttackPlayerDesire(spawned, player);
|
||||
npc.deleteMe();
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@ -197,7 +197,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -206,6 +205,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -104,8 +104,8 @@ public class IceQueensCastle extends AbstractInstance
|
||||
if (npc != null)
|
||||
{
|
||||
playMovie(player, Movie.SC_BOSS_FREYA_FORCED_DEFEAT);
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, null, player);
|
||||
npc.deleteMe();
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, npc, player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -483,7 +483,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
disablePlayers(world);
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.abortAttack();
|
||||
@ -492,39 +492,39 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
playRandomSong(world);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_1":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(frintezza.getObjectId(), 4));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_2":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 500, 70, 15, 3000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_3":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 2500, 90, 12, 6000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_4":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final Location scarletLocation = activeScarlet.getLocation();
|
||||
int newHeading = 0;
|
||||
@ -540,30 +540,30 @@ public class LastImperialTomb extends AbstractInstance
|
||||
world.setParameter("newHeading", newHeading);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_5":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
activeScarlet.doDie(activeScarlet);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 14, 8000, 8000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, null, player, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_6":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.deleteMe();
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_7":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
final Location scarletLocation = world.getParameters().getLocation("scarletLocation");
|
||||
final Npc activeScarlet = addSpawn(SCARLET2, scarletLocation, false, 0, false, world.getId());
|
||||
@ -573,24 +573,22 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 12, 500, 14000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, activeScarlet, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_8":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(activeScarlet.getObjectId(), 2));
|
||||
broadcastPacket(world, new SocialAction(npc.getObjectId(), 2));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_9", 9000, npc, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_9":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.setInvul(false);
|
||||
activeScarlet.setImmobilized(false);
|
||||
activeScarlet.enableAllSkills();
|
||||
npc.setInvul(false);
|
||||
npc.setImmobilized(false);
|
||||
npc.enableAllSkills();
|
||||
enablePlayers(world);
|
||||
break;
|
||||
}
|
||||
@ -702,7 +700,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
if (npc.isScriptValue(1) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.20)))
|
||||
{
|
||||
npc.setScriptValue(2);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, null, attacker, false);
|
||||
}
|
||||
}
|
||||
if (skill != null)
|
||||
|
@ -60,8 +60,8 @@ public class QueenShyeed extends AbstractNpcAI
|
||||
{
|
||||
if (!npc.isDead())
|
||||
{
|
||||
npc.deleteMe();
|
||||
startRespawn();
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -259,8 +259,8 @@ public class AltarOfShilen extends AbstractInstance
|
||||
}
|
||||
world.setStatus(7);
|
||||
onStatusChanged(world);
|
||||
npc.deleteMe();
|
||||
cancelQuestTimer("check_player", npc, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -168,9 +168,9 @@ public class Alarm extends AbstractNpcAI
|
||||
{
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
npc.deleteMe();
|
||||
setMemoState(player, ART_OF_PERSUASION_ID, 4);
|
||||
htmltext = "32367-184_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -186,9 +186,9 @@ public class Alarm extends AbstractNpcAI
|
||||
{
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
npc.deleteMe();
|
||||
setMemoState(player, NIKOLAS_COOPERATION_ID, 4);
|
||||
htmltext = "32367-185_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -168,8 +168,8 @@ public class Natives extends AbstractNpcAI
|
||||
else if (event.equalsIgnoreCase("delete_me"))
|
||||
{
|
||||
npc.setBusy(false); // TODO: Does it really need?
|
||||
npc.deleteMe();
|
||||
npc.getSpawn().decreaseCount(npc);
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
|
@ -120,9 +120,9 @@ public class Quarry extends AbstractNpcAI
|
||||
}
|
||||
}
|
||||
npc.setAutoAttackable(false);
|
||||
npc.deleteMe();
|
||||
npc.getSpawn().decreaseCount(npc);
|
||||
HellboundEngine.getInstance().updateTrust(TRUST, true);
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -466,7 +466,6 @@ public class TowerOfNaia extends AbstractNpcAI
|
||||
{
|
||||
htmltext = null;
|
||||
_sporeSpawn.remove(npc);
|
||||
npc.deleteMe();
|
||||
|
||||
if (npcId == SPORE_BASIC)
|
||||
{
|
||||
@ -488,6 +487,8 @@ public class TowerOfNaia extends AbstractNpcAI
|
||||
startQuestTimer("despawn_total", 60000, null, null);
|
||||
}
|
||||
}
|
||||
|
||||
npc.deleteMe();
|
||||
}
|
||||
else if (event.equalsIgnoreCase("18492-05.htm"))
|
||||
{
|
||||
|
@ -749,8 +749,8 @@ public class TullyWorkshop extends AbstractNpcAI
|
||||
{
|
||||
if ((npc.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK) && (npc.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST) && (npc.getCurrentHp() == npc.getMaxHp()))
|
||||
{
|
||||
npc.deleteMe();
|
||||
allowServantSpawn = true;
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -759,9 +759,9 @@ public class TullyWorkshop extends AbstractNpcAI
|
||||
}
|
||||
else if (event.equalsIgnoreCase("despawn_agent"))
|
||||
{
|
||||
npc.deleteMe();
|
||||
allowServantSpawn = true;
|
||||
allowAgentSpawn = true;
|
||||
npc.deleteMe();
|
||||
}
|
||||
else if (event.equalsIgnoreCase("despawn_agent_7"))
|
||||
{
|
||||
@ -787,8 +787,8 @@ public class TullyWorkshop extends AbstractNpcAI
|
||||
}
|
||||
});
|
||||
|
||||
npc.deleteMe();
|
||||
startQuestTimer("start_7th_floor_spawn", 120000, null, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
|
||||
if (player == null)
|
||||
@ -1000,7 +1000,6 @@ public class TullyWorkshop extends AbstractNpcAI
|
||||
else if (event.equalsIgnoreCase("refuse") && !allowAgentSpawn_7th)
|
||||
{
|
||||
allowAgentSpawn_7th = true;
|
||||
npc.deleteMe();
|
||||
spawnedAgent = null;
|
||||
for (MonsterInstance monster : spawnedFollowers)
|
||||
{
|
||||
@ -1026,6 +1025,8 @@ public class TullyWorkshop extends AbstractNpcAI
|
||||
is7thFloorAttackBegan = true;
|
||||
startQuestTimer("end_7th_floor_attack", 1200000, null, null);
|
||||
}
|
||||
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
else if (event.equalsIgnoreCase("teleport") && (npcId == DWARVEN_GHOST))
|
||||
|
@ -219,9 +219,9 @@ public class StakatoNest extends AbstractNpcAI
|
||||
if (npcId > 0)
|
||||
{
|
||||
npc.getSpawn().decreaseCount(npc);
|
||||
npc.deleteMe();
|
||||
final Npc spawned = addSpawn(npcId, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, true);
|
||||
addAttackDesire(spawned, player);
|
||||
npc.deleteMe();
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@ -202,7 +202,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -212,6 +211,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, null);
|
||||
startQuestTimer("SOCIAL_ACTION", 10000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -120,12 +120,12 @@ public class DrChaos extends AbstractNpcAI
|
||||
{
|
||||
if ((npc.getId() == CHAOS_GOLEM) && ((_lastAttackVsGolem + 1800000) < System.currentTimeMillis()))
|
||||
{
|
||||
final Npc chaos = addSpawn(DOCTOR_CHAOS, 96320, -110912, -3328, 8191, false, 0, false); // spawn Dr. Chaos
|
||||
GrandBossManager.getInstance().setBossStatus(CHAOS_GOLEM, NORMAL); // mark Dr. Chaos is not crazy any more
|
||||
cancelQuestTimer("golem_despawn", chaos, null);
|
||||
|
||||
// Despawn the war golem.
|
||||
npc.deleteMe();
|
||||
|
||||
addSpawn(DOCTOR_CHAOS, 96320, -110912, -3328, 8191, false, 0, false); // spawn Dr. Chaos
|
||||
GrandBossManager.getInstance().setBossStatus(CHAOS_GOLEM, NORMAL); // mark Dr. Chaos is not crazy any more
|
||||
cancelQuestTimer("golem_despawn", npc, null);
|
||||
}
|
||||
}
|
||||
else if (event.equalsIgnoreCase("1"))
|
||||
@ -148,20 +148,19 @@ public class DrChaos extends AbstractNpcAI
|
||||
}
|
||||
else if (event.equalsIgnoreCase("5"))
|
||||
{
|
||||
// Delete Dr. Chaos && spawn the war golem.
|
||||
npc.deleteMe();
|
||||
final GrandBossInstance golem = (GrandBossInstance) addSpawn(CHAOS_GOLEM, 96080, -110822, -3343, 0, false, 0, false);
|
||||
GrandBossManager.getInstance().addBoss(golem);
|
||||
|
||||
// The "npc" variable attribution is now for the golem.
|
||||
npc = golem;
|
||||
npc.broadcastPacket(new SpecialCamera(npc, 30, 200, 20, 6000, 700, 8000, 0, 0, 0, 0, 0));
|
||||
npc.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
|
||||
npc.broadcastPacket(new PlaySound(1, "Rm03_A", 0, 0, 0, 0, 0));
|
||||
golem.broadcastPacket(new SpecialCamera(npc, 30, 200, 20, 6000, 700, 8000, 0, 0, 0, 0, 0));
|
||||
golem.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
|
||||
golem.broadcastPacket(new PlaySound(1, "Rm03_A", 0, 0, 0, 0, 0));
|
||||
|
||||
// start monitoring Dr. Chaos's inactivity
|
||||
_lastAttackVsGolem = System.currentTimeMillis();
|
||||
startQuestTimer("golem_despawn", 60000, npc, null, true);
|
||||
startQuestTimer("golem_despawn", 60000, golem, null, true);
|
||||
|
||||
// Delete Dr. Chaos after spawned the war golem.
|
||||
npc.deleteMe();
|
||||
}
|
||||
// Check every sec if someone is in range, if found, launch one task to decrease the timer.
|
||||
else if (event.equalsIgnoreCase("paranoia_activity") && (GrandBossManager.getInstance().getBossStatus(CHAOS_GOLEM) == NORMAL))
|
||||
|
@ -58,8 +58,8 @@ public class QueenShyeed extends AbstractNpcAI
|
||||
{
|
||||
if (!npc.isDead())
|
||||
{
|
||||
npc.deleteMe();
|
||||
startRespawn();
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -168,9 +168,9 @@ public class Alarm extends AbstractNpcAI
|
||||
{
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
npc.deleteMe();
|
||||
setMemoState(player, ART_OF_PERSUASION_ID, 4);
|
||||
htmltext = "32367-184_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -186,9 +186,9 @@ public class Alarm extends AbstractNpcAI
|
||||
{
|
||||
npc0.getVariables().set("SPAWNED", false);
|
||||
}
|
||||
npc.deleteMe();
|
||||
setMemoState(player, NIKOLAS_COOPERATION_ID, 4);
|
||||
htmltext = "32367-185_09.html";
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -168,8 +168,8 @@ public class Natives extends AbstractNpcAI
|
||||
else if (event.equalsIgnoreCase("delete_me"))
|
||||
{
|
||||
npc.setBusy(false); // TODO: Does it really need?
|
||||
npc.deleteMe();
|
||||
npc.getSpawn().decreaseCount(npc);
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
return htmltext;
|
||||
|
@ -120,9 +120,9 @@ public class Quarry extends AbstractNpcAI
|
||||
}
|
||||
}
|
||||
npc.setAutoAttackable(false);
|
||||
npc.deleteMe();
|
||||
npc.getSpawn().decreaseCount(npc);
|
||||
HellboundEngine.getInstance().updateTrust(TRUST, true);
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -466,7 +466,6 @@ public class TowerOfNaia extends AbstractNpcAI
|
||||
{
|
||||
htmltext = null;
|
||||
_sporeSpawn.remove(npc);
|
||||
npc.deleteMe();
|
||||
|
||||
if (npcId == SPORE_BASIC)
|
||||
{
|
||||
@ -488,6 +487,8 @@ public class TowerOfNaia extends AbstractNpcAI
|
||||
startQuestTimer("despawn_total", 60000, null, null);
|
||||
}
|
||||
}
|
||||
|
||||
npc.deleteMe();
|
||||
}
|
||||
else if (event.equalsIgnoreCase("18492-05.htm"))
|
||||
{
|
||||
|
@ -749,8 +749,8 @@ public class TullyWorkshop extends AbstractNpcAI
|
||||
{
|
||||
if ((npc.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK) && (npc.getAI().getIntention() != CtrlIntention.AI_INTENTION_CAST) && (npc.getCurrentHp() == npc.getMaxHp()))
|
||||
{
|
||||
npc.deleteMe();
|
||||
allowServantSpawn = true;
|
||||
npc.deleteMe();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -759,9 +759,9 @@ public class TullyWorkshop extends AbstractNpcAI
|
||||
}
|
||||
else if (event.equalsIgnoreCase("despawn_agent"))
|
||||
{
|
||||
npc.deleteMe();
|
||||
allowServantSpawn = true;
|
||||
allowAgentSpawn = true;
|
||||
npc.deleteMe();
|
||||
}
|
||||
else if (event.equalsIgnoreCase("despawn_agent_7"))
|
||||
{
|
||||
@ -787,8 +787,8 @@ public class TullyWorkshop extends AbstractNpcAI
|
||||
}
|
||||
});
|
||||
|
||||
npc.deleteMe();
|
||||
startQuestTimer("start_7th_floor_spawn", 120000, null, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
|
||||
if (player == null)
|
||||
@ -1000,7 +1000,6 @@ public class TullyWorkshop extends AbstractNpcAI
|
||||
else if (event.equalsIgnoreCase("refuse") && !allowAgentSpawn_7th)
|
||||
{
|
||||
allowAgentSpawn_7th = true;
|
||||
npc.deleteMe();
|
||||
spawnedAgent = null;
|
||||
for (MonsterInstance monster : spawnedFollowers)
|
||||
{
|
||||
@ -1026,6 +1025,8 @@ public class TullyWorkshop extends AbstractNpcAI
|
||||
is7thFloorAttackBegan = true;
|
||||
startQuestTimer("end_7th_floor_attack", 1200000, null, null);
|
||||
}
|
||||
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
else if (event.equalsIgnoreCase("teleport") && (npcId == DWARVEN_GHOST))
|
||||
|
@ -219,9 +219,9 @@ public class StakatoNest extends AbstractNpcAI
|
||||
if (npcId > 0)
|
||||
{
|
||||
npc.getSpawn().decreaseCount(npc);
|
||||
npc.deleteMe();
|
||||
final Npc spawned = addSpawn(npcId, npc.getX(), npc.getY(), npc.getZ(), npc.getHeading(), false, 0, true);
|
||||
addAttackDesire(spawned, player);
|
||||
npc.deleteMe();
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
}
|
||||
|
@ -202,7 +202,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -212,6 +211,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, null);
|
||||
startQuestTimer("SOCIAL_ACTION", 10000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -120,12 +120,12 @@ public class DrChaos extends AbstractNpcAI
|
||||
{
|
||||
if ((npc.getId() == CHAOS_GOLEM) && ((_lastAttackVsGolem + 1800000) < System.currentTimeMillis()))
|
||||
{
|
||||
final Npc chaos = addSpawn(DOCTOR_CHAOS, 96320, -110912, -3328, 8191, false, 0, false); // spawn Dr. Chaos
|
||||
GrandBossManager.getInstance().setBossStatus(CHAOS_GOLEM, NORMAL); // mark Dr. Chaos is not crazy any more
|
||||
cancelQuestTimer("golem_despawn", chaos, null);
|
||||
|
||||
// Despawn the war golem.
|
||||
npc.deleteMe();
|
||||
|
||||
addSpawn(DOCTOR_CHAOS, 96320, -110912, -3328, 8191, false, 0, false); // spawn Dr. Chaos
|
||||
GrandBossManager.getInstance().setBossStatus(CHAOS_GOLEM, NORMAL); // mark Dr. Chaos is not crazy any more
|
||||
cancelQuestTimer("golem_despawn", npc, null);
|
||||
}
|
||||
}
|
||||
else if (event.equalsIgnoreCase("1"))
|
||||
@ -148,20 +148,19 @@ public class DrChaos extends AbstractNpcAI
|
||||
}
|
||||
else if (event.equalsIgnoreCase("5"))
|
||||
{
|
||||
// Delete Dr. Chaos && spawn the war golem.
|
||||
npc.deleteMe();
|
||||
final GrandBossInstance golem = (GrandBossInstance) addSpawn(CHAOS_GOLEM, 96080, -110822, -3343, 0, false, 0, false);
|
||||
GrandBossManager.getInstance().addBoss(golem);
|
||||
|
||||
// The "npc" variable attribution is now for the golem.
|
||||
npc = golem;
|
||||
npc.broadcastPacket(new SpecialCamera(npc, 30, 200, 20, 6000, 700, 8000, 0, 0, 0, 0, 0));
|
||||
npc.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
|
||||
npc.broadcastPacket(new PlaySound(1, "Rm03_A", 0, 0, 0, 0, 0));
|
||||
golem.broadcastPacket(new SpecialCamera(npc, 30, 200, 20, 6000, 700, 8000, 0, 0, 0, 0, 0));
|
||||
golem.broadcastPacket(new SocialAction(npc.getObjectId(), 1));
|
||||
golem.broadcastPacket(new PlaySound(1, "Rm03_A", 0, 0, 0, 0, 0));
|
||||
|
||||
// start monitoring Dr. Chaos's inactivity
|
||||
_lastAttackVsGolem = System.currentTimeMillis();
|
||||
startQuestTimer("golem_despawn", 60000, npc, null, true);
|
||||
startQuestTimer("golem_despawn", 60000, golem, null, true);
|
||||
|
||||
// Delete Dr. Chaos after spawned the war golem.
|
||||
npc.deleteMe();
|
||||
}
|
||||
// Check every sec if someone is in range, if found, launch one task to decrease the timer.
|
||||
else if (event.equalsIgnoreCase("paranoia_activity") && (GrandBossManager.getInstance().getBossStatus(CHAOS_GOLEM) == NORMAL))
|
||||
|
@ -58,8 +58,8 @@ public class QueenShyeed extends AbstractNpcAI
|
||||
{
|
||||
if (!npc.isDead())
|
||||
{
|
||||
npc.deleteMe();
|
||||
startRespawn();
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -109,8 +109,8 @@ public class IceQueensCastle extends AbstractInstance
|
||||
if (npc != null)
|
||||
{
|
||||
playMovie(player, Movie.SC_BOSS_FREYA_FORCED_DEFEAT);
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, null, player);
|
||||
npc.deleteMe();
|
||||
startQuestTimer("TIMER_PC_LEAVE", 24000, npc, player);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -204,7 +204,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -213,6 +212,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -204,7 +204,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -213,6 +212,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -204,7 +204,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -213,6 +212,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -204,7 +204,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -213,6 +212,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -204,7 +204,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -213,6 +212,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -83,7 +83,6 @@ public class LastImperialTomb extends AbstractInstance
|
||||
18337,
|
||||
18338,
|
||||
18339
|
||||
|
||||
};
|
||||
// Items
|
||||
private static final int FIRST_SCARLET_WEAPON = 8204;
|
||||
@ -485,7 +484,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
disablePlayers(world);
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.abortAttack();
|
||||
@ -494,39 +493,39 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
playRandomSong(world);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_1":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(frintezza.getObjectId(), 4));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_2":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 500, 70, 15, 3000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_3":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 2500, 90, 12, 6000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_4":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final Location scarletLocation = activeScarlet.getLocation();
|
||||
int newHeading = 0;
|
||||
@ -542,30 +541,30 @@ public class LastImperialTomb extends AbstractInstance
|
||||
world.setParameter("newHeading", newHeading);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_5":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
activeScarlet.doDie(activeScarlet);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 14, 8000, 8000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, null, player, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_6":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.deleteMe();
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_7":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
final Location scarletLocation = world.getParameters().getLocation("scarletLocation");
|
||||
final Npc activeScarlet = addSpawn(SCARLET2, scarletLocation, false, 0, false, world.getId());
|
||||
@ -575,24 +574,22 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 12, 500, 14000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, activeScarlet, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_8":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(activeScarlet.getObjectId(), 2));
|
||||
broadcastPacket(world, new SocialAction(npc.getObjectId(), 2));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_9", 9000, npc, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_9":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.setInvul(false);
|
||||
activeScarlet.setImmobilized(false);
|
||||
activeScarlet.enableAllSkills();
|
||||
npc.setInvul(false);
|
||||
npc.setImmobilized(false);
|
||||
npc.enableAllSkills();
|
||||
enablePlayers(world);
|
||||
break;
|
||||
}
|
||||
@ -704,7 +701,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
if (npc.isScriptValue(1) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.20)))
|
||||
{
|
||||
npc.setScriptValue(2);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, null, attacker, false);
|
||||
}
|
||||
}
|
||||
if (skill != null)
|
||||
|
@ -204,7 +204,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -213,6 +212,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -83,7 +83,6 @@ public class LastImperialTomb extends AbstractInstance
|
||||
18337,
|
||||
18338,
|
||||
18339
|
||||
|
||||
};
|
||||
// Items
|
||||
private static final int FIRST_SCARLET_WEAPON = 8204;
|
||||
@ -485,7 +484,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
disablePlayers(world);
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.abortAttack();
|
||||
@ -494,39 +493,39 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
playRandomSong(world);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_1":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(frintezza.getObjectId(), 4));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_2":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 500, 70, 15, 3000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_3":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 2500, 90, 12, 6000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_4":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final Location scarletLocation = activeScarlet.getLocation();
|
||||
int newHeading = 0;
|
||||
@ -542,30 +541,30 @@ public class LastImperialTomb extends AbstractInstance
|
||||
world.setParameter("newHeading", newHeading);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_5":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
activeScarlet.doDie(activeScarlet);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 14, 8000, 8000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, null, player, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_6":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.deleteMe();
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_7":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
final Location scarletLocation = world.getParameters().getLocation("scarletLocation");
|
||||
final Npc activeScarlet = addSpawn(SCARLET2, scarletLocation, false, 0, false, world.getId());
|
||||
@ -575,24 +574,22 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 12, 500, 14000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, activeScarlet, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_8":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(activeScarlet.getObjectId(), 2));
|
||||
broadcastPacket(world, new SocialAction(npc.getObjectId(), 2));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_9", 9000, npc, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_9":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.setInvul(false);
|
||||
activeScarlet.setImmobilized(false);
|
||||
activeScarlet.enableAllSkills();
|
||||
npc.setInvul(false);
|
||||
npc.setImmobilized(false);
|
||||
npc.enableAllSkills();
|
||||
enablePlayers(world);
|
||||
break;
|
||||
}
|
||||
@ -704,7 +701,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
if (npc.isScriptValue(1) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.20)))
|
||||
{
|
||||
npc.setScriptValue(2);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, null, attacker, false);
|
||||
}
|
||||
}
|
||||
if (skill != null)
|
||||
|
@ -469,8 +469,7 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
{
|
||||
_feedInfo.remove(npc.getObjectId());
|
||||
}
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
|
||||
// spawn the new mob
|
||||
final Attackable nextNpc = (Attackable) addSpawn(MAD_COW_POLYMORPH.get(npc.getId()), npc);
|
||||
|
||||
@ -479,6 +478,9 @@ public class FeedableBeasts extends AbstractNpcAI
|
||||
nextNpc.setRunning();
|
||||
nextNpc.addDamageHate(player, 0, 99999);
|
||||
nextNpc.getAI().setIntention(CtrlIntention.AI_INTENTION_ATTACK, player);
|
||||
|
||||
// despawn the mad cow
|
||||
npc.deleteMe();
|
||||
}
|
||||
}
|
||||
return super.onAdvEvent(event, npc, player);
|
||||
|
@ -204,7 +204,6 @@ public class Baium extends AbstractNpcAI
|
||||
{
|
||||
if (getStatus() == ALIVE)
|
||||
{
|
||||
npc.deleteMe();
|
||||
setStatus(IN_FIGHT);
|
||||
_baium = (GrandBossInstance) addSpawn(BAIUM, BAIUM_LOC, false, 0);
|
||||
_baium.disableCoreAI(true);
|
||||
@ -213,6 +212,7 @@ public class Baium extends AbstractNpcAI
|
||||
startQuestTimer("WAKEUP_ACTION", 50, _baium, null);
|
||||
startQuestTimer("MANAGE_EARTHQUAKE", 2000, _baium, player);
|
||||
startQuestTimer("CHECK_ATTACK", 60000, _baium, null);
|
||||
npc.deleteMe();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -483,7 +483,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
disablePlayers(world);
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.abortAttack();
|
||||
@ -492,39 +492,39 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
playRandomSong(world);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_1", 2000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_1":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(frintezza.getObjectId(), 4));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 250, 120, 15, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_2", 7000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_2":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new MagicSkillUse(frintezza, frintezza, 5006, 1, 34000, 0));
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 500, 70, 15, 3000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_3", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_3":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc frintezza = world.getParameters().getObject("frintezza", Npc.class);
|
||||
broadcastPacket(world, new SpecialCamera(frintezza, 2500, 90, 12, 6000, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_4", 3000, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_4":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final Location scarletLocation = activeScarlet.getLocation();
|
||||
int newHeading = 0;
|
||||
@ -540,30 +540,30 @@ public class LastImperialTomb extends AbstractInstance
|
||||
world.setParameter("newHeading", newHeading);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 1000, 0, 0, 1, 0, 0));
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 250, newHeading, 12, 0, 10000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_5", 500, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_5":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
activeScarlet.doDie(activeScarlet);
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 14, 8000, 8000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_6", 6250, null, player, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_7", 7200, null, player, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_6":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.deleteMe();
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_7":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Instance world = player.getInstanceWorld();
|
||||
final int newHeading = world.getParameters().getInt("newHeading");
|
||||
final Location scarletLocation = world.getParameters().getLocation("scarletLocation");
|
||||
final Npc activeScarlet = addSpawn(SCARLET2, scarletLocation, false, 0, false, world.getId());
|
||||
@ -573,24 +573,22 @@ public class LastImperialTomb extends AbstractInstance
|
||||
activeScarlet.setImmobilized(true);
|
||||
activeScarlet.disableAllSkills();
|
||||
broadcastPacket(world, new SpecialCamera(activeScarlet, 450, newHeading, 12, 500, 14000, 0, 0, 1, 0, 0));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_8", 8100, activeScarlet, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_8":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
broadcastPacket(world, new SocialAction(activeScarlet.getObjectId(), 2));
|
||||
broadcastPacket(world, new SocialAction(npc.getObjectId(), 2));
|
||||
startQuestTimer("SCARLET_SECOND_MORPH_CAMERA_9", 9000, npc, null, false);
|
||||
break;
|
||||
}
|
||||
case "SCARLET_SECOND_MORPH_CAMERA_9":
|
||||
{
|
||||
final Instance world = npc.getInstanceWorld();
|
||||
final Npc activeScarlet = world.getParameters().getObject("activeScarlet", Npc.class);
|
||||
activeScarlet.setInvul(false);
|
||||
activeScarlet.setImmobilized(false);
|
||||
activeScarlet.enableAllSkills();
|
||||
npc.setInvul(false);
|
||||
npc.setImmobilized(false);
|
||||
npc.enableAllSkills();
|
||||
enablePlayers(world);
|
||||
break;
|
||||
}
|
||||
@ -702,7 +700,7 @@ public class LastImperialTomb extends AbstractInstance
|
||||
if (npc.isScriptValue(1) && (npc.getCurrentHp() < (npc.getMaxHp() * 0.20)))
|
||||
{
|
||||
npc.setScriptValue(2);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, npc, null, false);
|
||||
startQuestTimer("SCARLET_SECOND_MORPH", 1000, null, attacker, false);
|
||||
}
|
||||
}
|
||||
if (skill != null)
|
||||
|
Loading…
Reference in New Issue
Block a user