Updated code and fixed NPEs on Throne of Heroes instances.

Contributed by CostyKiller.
This commit is contained in:
MobiusDevelopment 2021-04-14 17:32:06 +00:00
parent 1bf1e2e84b
commit 12f45c3805
6 changed files with 338 additions and 142 deletions

View File

@ -26,7 +26,8 @@ import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
/**
* @author CostyKiller // https://www.youtube.com/watch?v=fJWAWU5XpZk
* @author CostyKiller
* @URL: https://www.youtube.com/watch?v=fJWAWU5XpZk
*/
public class ThroneOfHeroesGoldberg extends AbstractInstance
{
@ -44,9 +45,6 @@ public class ThroneOfHeroesGoldberg extends AbstractInstance
// Throne's Treasure Chest Goldberg
private static final int TREASURE_CHEST = 26455;
// World Instance
Instance world = null;
// Misc
private static final int TEMPLATE_ID = 307;
@ -65,7 +63,6 @@ public class ThroneOfHeroesGoldberg extends AbstractInstance
{
activeInstance.setStatus(0);
startQuestTimer("ANNOUNCE_RAID_START", 10000, null, player);
world = activeInstance;
}
@Override
@ -76,7 +73,6 @@ public class ThroneOfHeroesGoldberg extends AbstractInstance
case "enterInstance":
{
enterInstance(player, npc, TEMPLATE_ID);
startQuestTimer("ANNOUNCE_RAID_PREP", 20000, null, player);
break;
}
case "reenterInstance":
@ -86,59 +82,96 @@ public class ThroneOfHeroesGoldberg extends AbstractInstance
{
enterInstance(player, npc, activeInstance.getTemplateId());
}
break;
}
case "ANNOUNCE_RAID_START":
{
showOnScreenMsg(world, NpcStringId.THE_CHALLENGE_FOR_THE_THRONE_OF_HEROES_GOLDBERG_WILL_BEGIN_SHORTLY_PLEASE_GET_READY, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_RAID_PREP", 15000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THE_CHALLENGE_FOR_THE_THRONE_OF_HEROES_GOLDBERG_WILL_BEGIN_SHORTLY_PLEASE_GET_READY, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_RAID_PREP", 15000, null, player);
}
break;
}
case "ANNOUNCE_RAID_PREP":
{
showOnScreenMsg(world, NpcStringId.THE_FIGHTING_AGAINST_GOLDBERG_WILL_BEGIN_IN_10_SECONDS, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_5", 5000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THE_FIGHTING_AGAINST_GOLDBERG_WILL_BEGIN_IN_10_SECONDS, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_5", 5000, null, player);
}
break;
}
case "ANNOUNCE_5":
{
showOnScreenMsg(world, NpcStringId.FIVE_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_4", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.FIVE_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_4", 1000, null, player);
}
break;
}
case "ANNOUNCE_4":
{
showOnScreenMsg(world, NpcStringId.FOUR_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_3", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.FOUR_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_3", 1000, null, player);
}
break;
}
case "ANNOUNCE_3":
{
showOnScreenMsg(world, NpcStringId.THREE_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_2", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THREE_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_2", 1000, null, player);
}
break;
}
case "ANNOUNCE_2":
{
showOnScreenMsg(world, NpcStringId.TWO_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_1", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.TWO_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_1", 1000, null, player);
}
break;
}
case "ANNOUNCE_1":
{
showOnScreenMsg(world, NpcStringId.ONE_SECOND_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("SPAWN_GOLDBERG", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.ONE_SECOND_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("SPAWN_GOLDBERG", 1000, null, player);
}
break;
}
case "SPAWN_GOLDBERG":
{
showOnScreenMsg(world, NpcStringId.GOLDBERG_APPEARS, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("GOLDBERG");
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.GOLDBERG_APPEARS, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("GOLDBERG");
}
break;
}
case "SPAWN_GOLDBERG_MINIONS":
{
showOnScreenMsg(world, NpcStringId.GOLDBERG_SUMMONS_HIS_MINIONS, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("GOLDBERG_MINIONS");
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.GOLDBERG_SUMMONS_HIS_MINIONS, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("GOLDBERG_MINIONS");
}
break;
}
}

View File

@ -40,9 +40,6 @@ public class ThroneOfHeroesMaryReed extends AbstractInstance
// Throne's Treasure Chest Mary Reed
private static final int TREASURE_CHEST = 26456;
// World Instance
Instance world = null;
// Misc
private static final int TEMPLATE_ID = 308;
@ -70,7 +67,6 @@ public class ThroneOfHeroesMaryReed extends AbstractInstance
{
activeInstance.setStatus(0);
startQuestTimer("ANNOUNCE_RAID_START", 10000, null, player);
world = activeInstance;
}
@Override
@ -81,7 +77,6 @@ public class ThroneOfHeroesMaryReed extends AbstractInstance
case "enterInstance":
{
enterInstance(player, npc, TEMPLATE_ID);
startQuestTimer("ANNOUNCE_RAID_PREP", 20000, null, player);
break;
}
case "reenterInstance":
@ -91,65 +86,106 @@ public class ThroneOfHeroesMaryReed extends AbstractInstance
{
enterInstance(player, npc, activeInstance.getTemplateId());
}
break;
}
case "ANNOUNCE_RAID_START":
{
showOnScreenMsg(world, NpcStringId.THE_CHALLENGE_FOR_THE_THRONE_OF_HEROES_MARY_REED_WILL_BEGIN_SHORTLY, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_RAID_PREP", 15000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THE_CHALLENGE_FOR_THE_THRONE_OF_HEROES_MARY_REED_WILL_BEGIN_SHORTLY, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_RAID_PREP", 15000, null, player);
}
break;
}
case "ANNOUNCE_RAID_PREP":
{
showOnScreenMsg(world, NpcStringId.THE_FIGHTING_AGAINST_MARY_REED_WILL_BEGIN_IN_10_SECONDS, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_5", 10000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THE_FIGHTING_AGAINST_MARY_REED_WILL_BEGIN_IN_10_SECONDS, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_5", 10000, null, player);
}
break;
}
case "ANNOUNCE_5":
{
showOnScreenMsg(world, NpcStringId.FIVE_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_4", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.FIVE_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_4", 1000, null, player);
}
break;
}
case "ANNOUNCE_4":
{
showOnScreenMsg(world, NpcStringId.FOUR_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_3", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.FOUR_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_3", 1000, null, player);
}
break;
}
case "ANNOUNCE_3":
{
showOnScreenMsg(world, NpcStringId.THREE_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_2", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THREE_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_2", 1000, null, player);
}
break;
}
case "ANNOUNCE_2":
{
showOnScreenMsg(world, NpcStringId.TWO_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_1", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.TWO_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_1", 1000, null, player);
}
break;
}
case "ANNOUNCE_1":
{
showOnScreenMsg(world, NpcStringId.ONE_SECOND_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("SPAWN_MARY_REED", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.ONE_SECOND_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("SPAWN_MARY_REED", 1000, null, player);
}
break;
}
case "SPAWN_MARY_REED":
{
showOnScreenMsg(world, NpcStringId.MARY_REED_GREETS_HEROES, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("MARY_REED");
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.MARY_REED_GREETS_HEROES, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("MARY_REED");
}
break;
}
case "ANNOUNCE_MARY_REED_SPAWNS_ZAKEN":
{
showOnScreenMsg(world, NpcStringId.MARY_REED_SUMMONS_ZAKEN, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("MARY_REED_SPAWNS_ZAKEN", 10000, null, player);
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.MARY_REED_SUMMONS_ZAKEN, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("MARY_REED_SPAWNS_ZAKEN", 10000, npc, null);
}
break;
}
case "MARY_REED_SPAWNS_ZAKEN":
{
showOnScreenMsg(world, NpcStringId.ZAKEN_YOUR_TIME_HAS_COME, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("MARY_REED_MINION_ZAKEN");
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.ZAKEN_YOUR_TIME_HAS_COME, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("MARY_REED_MINION_ZAKEN");
}
break;
}
}
@ -194,6 +230,7 @@ public class ThroneOfHeroesMaryReed extends AbstractInstance
{
// Despawn minions and stop timer
cancelQuestTimer("ANNOUNCE_MARY_REED_SPAWNS_ZAKEN", npc, killer);
cancelQuestTimer("MARY_REED_SPAWNS_ZAKEN", npc, killer);
world.getAliveNpcs(MARY_REED_MINION_ZAKEN).forEach(beast -> beast.doDie(null));
// Spawn treasure chests

View File

@ -39,9 +39,6 @@ public class ThroneOfHeroesTauti extends AbstractInstance
// Throne's Treasure Chest Tauti
private static final int TREASURE_CHEST = 26457;
// World Instance
Instance world = null;
// Misc
private static final int TEMPLATE_ID = 309;
@ -67,7 +64,6 @@ public class ThroneOfHeroesTauti extends AbstractInstance
{
activeInstance.setStatus(0);
startQuestTimer("ANNOUNCE_RAID_START", 10000, null, player);
world = activeInstance;
}
@Override
@ -78,7 +74,6 @@ public class ThroneOfHeroesTauti extends AbstractInstance
case "enterInstance":
{
enterInstance(player, npc, TEMPLATE_ID);
startQuestTimer("ANNOUNCE_RAID_PREP", 20000, null, player);
break;
}
case "reenterInstance":
@ -88,53 +83,86 @@ public class ThroneOfHeroesTauti extends AbstractInstance
{
enterInstance(player, npc, activeInstance.getTemplateId());
}
break;
}
case "ANNOUNCE_RAID_START":
{
showOnScreenMsg(world, NpcStringId.THE_CHALLENGE_FOR_THE_THRONE_OF_HEROES_TAUTI_WILL_BEGIN_SHORTLY, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_RAID_PREP", 15000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THE_CHALLENGE_FOR_THE_THRONE_OF_HEROES_TAUTI_WILL_BEGIN_SHORTLY, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_RAID_PREP", 15000, null, player);
}
break;
}
case "ANNOUNCE_RAID_PREP":
{
showOnScreenMsg(world, NpcStringId.THE_FIGHTING_AGAINST_TAUTI_WILL_BEGIN_IN_10_SECONDS, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_5", 10000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THE_FIGHTING_AGAINST_TAUTI_WILL_BEGIN_IN_10_SECONDS, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_5", 10000, null, player);
}
break;
}
case "ANNOUNCE_5":
{
showOnScreenMsg(world, NpcStringId.FIVE_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_4", 1000, null, player);
break;
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.FIVE_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_4", 1000, null, player);
break;
}
}
case "ANNOUNCE_4":
{
showOnScreenMsg(world, NpcStringId.FOUR_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_3", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.FOUR_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_3", 1000, null, player);
}
break;
}
case "ANNOUNCE_3":
{
showOnScreenMsg(world, NpcStringId.THREE_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_2", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THREE_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_2", 1000, null, player);
}
break;
}
case "ANNOUNCE_2":
{
showOnScreenMsg(world, NpcStringId.TWO_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_1", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.TWO_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_1", 1000, null, player);
}
break;
}
case "ANNOUNCE_1":
{
showOnScreenMsg(world, NpcStringId.ONE_SECOND_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("SPAWN_TAUTI", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.ONE_SECOND_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("SPAWN_TAUTI", 1000, null, player);
}
break;
}
case "SPAWN_TAUTI":
{
showOnScreenMsg(world, NpcStringId.TAUTI_IS_READY_TO_FIGHT, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("TAUTI");
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.TAUTI_IS_READY_TO_FIGHT, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("TAUTI");
}
break;
}
}

View File

@ -26,7 +26,8 @@ import org.l2jmobius.gameserver.network.serverpackets.ExShowScreenMessage;
import instances.AbstractInstance;
/**
* @author CostyKiller // https://www.youtube.com/watch?v=fJWAWU5XpZk
* @author CostyKiller
* @URL: https://www.youtube.com/watch?v=fJWAWU5XpZk
*/
public class ThroneOfHeroesGoldberg extends AbstractInstance
{
@ -44,9 +45,6 @@ public class ThroneOfHeroesGoldberg extends AbstractInstance
// Throne's Treasure Chest Goldberg
private static final int TREASURE_CHEST = 26455;
// World Instance
Instance world = null;
// Misc
private static final int TEMPLATE_ID = 307;
@ -65,7 +63,6 @@ public class ThroneOfHeroesGoldberg extends AbstractInstance
{
activeInstance.setStatus(0);
startQuestTimer("ANNOUNCE_RAID_START", 10000, null, player);
world = activeInstance;
}
@Override
@ -76,7 +73,6 @@ public class ThroneOfHeroesGoldberg extends AbstractInstance
case "enterInstance":
{
enterInstance(player, npc, TEMPLATE_ID);
startQuestTimer("ANNOUNCE_RAID_PREP", 20000, null, player);
break;
}
case "reenterInstance":
@ -86,59 +82,96 @@ public class ThroneOfHeroesGoldberg extends AbstractInstance
{
enterInstance(player, npc, activeInstance.getTemplateId());
}
break;
}
case "ANNOUNCE_RAID_START":
{
showOnScreenMsg(world, NpcStringId.THE_CHALLENGE_FOR_THE_THRONE_OF_HEROES_GOLDBERG_WILL_BEGIN_SHORTLY_PLEASE_GET_READY, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_RAID_PREP", 15000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THE_CHALLENGE_FOR_THE_THRONE_OF_HEROES_GOLDBERG_WILL_BEGIN_SHORTLY_PLEASE_GET_READY, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_RAID_PREP", 15000, null, player);
}
break;
}
case "ANNOUNCE_RAID_PREP":
{
showOnScreenMsg(world, NpcStringId.THE_FIGHTING_AGAINST_GOLDBERG_WILL_BEGIN_IN_10_SECONDS, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_5", 5000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THE_FIGHTING_AGAINST_GOLDBERG_WILL_BEGIN_IN_10_SECONDS, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_5", 5000, null, player);
}
break;
}
case "ANNOUNCE_5":
{
showOnScreenMsg(world, NpcStringId.FIVE_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_4", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.FIVE_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_4", 1000, null, player);
}
break;
}
case "ANNOUNCE_4":
{
showOnScreenMsg(world, NpcStringId.FOUR_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_3", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.FOUR_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_3", 1000, null, player);
}
break;
}
case "ANNOUNCE_3":
{
showOnScreenMsg(world, NpcStringId.THREE_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_2", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THREE_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_2", 1000, null, player);
}
break;
}
case "ANNOUNCE_2":
{
showOnScreenMsg(world, NpcStringId.TWO_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_1", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.TWO_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_1", 1000, null, player);
}
break;
}
case "ANNOUNCE_1":
{
showOnScreenMsg(world, NpcStringId.ONE_SECOND_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("SPAWN_GOLDBERG", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.ONE_SECOND_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("SPAWN_GOLDBERG", 1000, null, player);
}
break;
}
case "SPAWN_GOLDBERG":
{
showOnScreenMsg(world, NpcStringId.GOLDBERG_APPEARS, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("GOLDBERG");
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.GOLDBERG_APPEARS, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("GOLDBERG");
}
break;
}
case "SPAWN_GOLDBERG_MINIONS":
{
showOnScreenMsg(world, NpcStringId.GOLDBERG_SUMMONS_HIS_MINIONS, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("GOLDBERG_MINIONS");
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.GOLDBERG_SUMMONS_HIS_MINIONS, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("GOLDBERG_MINIONS");
}
break;
}
}

View File

@ -40,9 +40,6 @@ public class ThroneOfHeroesMaryReed extends AbstractInstance
// Throne's Treasure Chest Mary Reed
private static final int TREASURE_CHEST = 26456;
// World Instance
Instance world = null;
// Misc
private static final int TEMPLATE_ID = 308;
@ -70,7 +67,6 @@ public class ThroneOfHeroesMaryReed extends AbstractInstance
{
activeInstance.setStatus(0);
startQuestTimer("ANNOUNCE_RAID_START", 10000, null, player);
world = activeInstance;
}
@Override
@ -81,7 +77,6 @@ public class ThroneOfHeroesMaryReed extends AbstractInstance
case "enterInstance":
{
enterInstance(player, npc, TEMPLATE_ID);
startQuestTimer("ANNOUNCE_RAID_PREP", 20000, null, player);
break;
}
case "reenterInstance":
@ -91,65 +86,106 @@ public class ThroneOfHeroesMaryReed extends AbstractInstance
{
enterInstance(player, npc, activeInstance.getTemplateId());
}
break;
}
case "ANNOUNCE_RAID_START":
{
showOnScreenMsg(world, NpcStringId.THE_CHALLENGE_FOR_THE_THRONE_OF_HEROES_MARY_REED_WILL_BEGIN_SHORTLY, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_RAID_PREP", 15000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THE_CHALLENGE_FOR_THE_THRONE_OF_HEROES_MARY_REED_WILL_BEGIN_SHORTLY, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_RAID_PREP", 15000, null, player);
}
break;
}
case "ANNOUNCE_RAID_PREP":
{
showOnScreenMsg(world, NpcStringId.THE_FIGHTING_AGAINST_MARY_REED_WILL_BEGIN_IN_10_SECONDS, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_5", 10000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THE_FIGHTING_AGAINST_MARY_REED_WILL_BEGIN_IN_10_SECONDS, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_5", 10000, null, player);
}
break;
}
case "ANNOUNCE_5":
{
showOnScreenMsg(world, NpcStringId.FIVE_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_4", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.FIVE_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_4", 1000, null, player);
}
break;
}
case "ANNOUNCE_4":
{
showOnScreenMsg(world, NpcStringId.FOUR_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_3", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.FOUR_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_3", 1000, null, player);
}
break;
}
case "ANNOUNCE_3":
{
showOnScreenMsg(world, NpcStringId.THREE_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_2", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THREE_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_2", 1000, null, player);
}
break;
}
case "ANNOUNCE_2":
{
showOnScreenMsg(world, NpcStringId.TWO_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_1", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.TWO_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_1", 1000, null, player);
}
break;
}
case "ANNOUNCE_1":
{
showOnScreenMsg(world, NpcStringId.ONE_SECOND_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("SPAWN_MARY_REED", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.ONE_SECOND_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("SPAWN_MARY_REED", 1000, null, player);
}
break;
}
case "SPAWN_MARY_REED":
{
showOnScreenMsg(world, NpcStringId.MARY_REED_GREETS_HEROES, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("MARY_REED");
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.MARY_REED_GREETS_HEROES, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("MARY_REED");
}
break;
}
case "ANNOUNCE_MARY_REED_SPAWNS_ZAKEN":
{
showOnScreenMsg(world, NpcStringId.MARY_REED_SUMMONS_ZAKEN, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("MARY_REED_SPAWNS_ZAKEN", 10000, null, player);
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.MARY_REED_SUMMONS_ZAKEN, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("MARY_REED_SPAWNS_ZAKEN", 10000, npc, null);
}
break;
}
case "MARY_REED_SPAWNS_ZAKEN":
{
showOnScreenMsg(world, NpcStringId.ZAKEN_YOUR_TIME_HAS_COME, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("MARY_REED_MINION_ZAKEN");
final Instance world = npc.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.ZAKEN_YOUR_TIME_HAS_COME, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("MARY_REED_MINION_ZAKEN");
}
break;
}
}
@ -194,6 +230,7 @@ public class ThroneOfHeroesMaryReed extends AbstractInstance
{
// Despawn minions and stop timer
cancelQuestTimer("ANNOUNCE_MARY_REED_SPAWNS_ZAKEN", npc, killer);
cancelQuestTimer("MARY_REED_SPAWNS_ZAKEN", npc, killer);
world.getAliveNpcs(MARY_REED_MINION_ZAKEN).forEach(beast -> beast.doDie(null));
// Spawn treasure chests

View File

@ -39,9 +39,6 @@ public class ThroneOfHeroesTauti extends AbstractInstance
// Throne's Treasure Chest Tauti
private static final int TREASURE_CHEST = 26457;
// World Instance
Instance world = null;
// Misc
private static final int TEMPLATE_ID = 309;
@ -67,7 +64,6 @@ public class ThroneOfHeroesTauti extends AbstractInstance
{
activeInstance.setStatus(0);
startQuestTimer("ANNOUNCE_RAID_START", 10000, null, player);
world = activeInstance;
}
@Override
@ -78,7 +74,6 @@ public class ThroneOfHeroesTauti extends AbstractInstance
case "enterInstance":
{
enterInstance(player, npc, TEMPLATE_ID);
startQuestTimer("ANNOUNCE_RAID_PREP", 20000, null, player);
break;
}
case "reenterInstance":
@ -88,53 +83,86 @@ public class ThroneOfHeroesTauti extends AbstractInstance
{
enterInstance(player, npc, activeInstance.getTemplateId());
}
break;
}
case "ANNOUNCE_RAID_START":
{
showOnScreenMsg(world, NpcStringId.THE_CHALLENGE_FOR_THE_THRONE_OF_HEROES_TAUTI_WILL_BEGIN_SHORTLY, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_RAID_PREP", 15000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THE_CHALLENGE_FOR_THE_THRONE_OF_HEROES_TAUTI_WILL_BEGIN_SHORTLY, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_RAID_PREP", 15000, null, player);
}
break;
}
case "ANNOUNCE_RAID_PREP":
{
showOnScreenMsg(world, NpcStringId.THE_FIGHTING_AGAINST_TAUTI_WILL_BEGIN_IN_10_SECONDS, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_5", 10000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THE_FIGHTING_AGAINST_TAUTI_WILL_BEGIN_IN_10_SECONDS, ExShowScreenMessage.TOP_CENTER, 5000, true);
startQuestTimer("ANNOUNCE_5", 10000, null, player);
}
break;
}
case "ANNOUNCE_5":
{
showOnScreenMsg(world, NpcStringId.FIVE_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_4", 1000, null, player);
break;
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.FIVE_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_4", 1000, null, player);
break;
}
}
case "ANNOUNCE_4":
{
showOnScreenMsg(world, NpcStringId.FOUR_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_3", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.FOUR_SECONDS, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_3", 1000, null, player);
}
break;
}
case "ANNOUNCE_3":
{
showOnScreenMsg(world, NpcStringId.THREE_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_2", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.THREE_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_2", 1000, null, player);
}
break;
}
case "ANNOUNCE_2":
{
showOnScreenMsg(world, NpcStringId.TWO_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_1", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.TWO_SECONDS_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("ANNOUNCE_1", 1000, null, player);
}
break;
}
case "ANNOUNCE_1":
{
showOnScreenMsg(world, NpcStringId.ONE_SECOND_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("SPAWN_TAUTI", 1000, null, player);
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.ONE_SECOND_2, ExShowScreenMessage.TOP_CENTER, 1000, true);
startQuestTimer("SPAWN_TAUTI", 1000, null, player);
}
break;
}
case "SPAWN_TAUTI":
{
showOnScreenMsg(world, NpcStringId.TAUTI_IS_READY_TO_FIGHT, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("TAUTI");
final Instance world = player.getInstanceWorld();
if (isInInstance(world))
{
showOnScreenMsg(world, NpcStringId.TAUTI_IS_READY_TO_FIGHT, ExShowScreenMessage.TOP_CENTER, 5000, true);
world.spawnGroup("TAUTI");
}
break;
}
}