|
|
|
@@ -73,321 +73,373 @@ public class ChamberOfProphecies extends AbstractInstance
|
|
|
|
|
public String onAdvEvent(String event, Npc npc, PlayerInstance player)
|
|
|
|
|
{
|
|
|
|
|
String htmltext = null;
|
|
|
|
|
if (event.equals("enterInstance"))
|
|
|
|
|
switch (event)
|
|
|
|
|
{
|
|
|
|
|
final QuestState qs = player.getQuestState(Q10753_WindsOfFateChoices.class.getSimpleName());
|
|
|
|
|
if (qs != null)
|
|
|
|
|
case "31639-01.html":
|
|
|
|
|
case "33996-01.html":
|
|
|
|
|
case "33980-01.html":
|
|
|
|
|
case "33980-02.html":
|
|
|
|
|
{
|
|
|
|
|
enterInstance(player, npc, TEMPLATE_ID);
|
|
|
|
|
if (hasQuestItems(player, PROPHECY_MACHINE))
|
|
|
|
|
{
|
|
|
|
|
takeItems(player, PROPHECY_MACHINE, 1);
|
|
|
|
|
}
|
|
|
|
|
qs.setCond(16, true);
|
|
|
|
|
htmltext = event;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (player != null)
|
|
|
|
|
{
|
|
|
|
|
final Instance world = player.getInstanceWorld();
|
|
|
|
|
if (!isInInstance(world))
|
|
|
|
|
case "33996-02.html":
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
final Instance world = player.getInstanceWorld();
|
|
|
|
|
if (!isInInstance(world))
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
world.broadcastPacket(ExShowUsm.USM_Q015_E);
|
|
|
|
|
world.despawnGroup("q10753_16_instance_grail");
|
|
|
|
|
world.spawnGroup("q10753_16_instance_wizard");
|
|
|
|
|
giveItems(player, ATELIA, 1);
|
|
|
|
|
showOnScreenMsg(player, NpcStringId.TALK_TO_THE_MYSTERIOUS_WIZARD, ExShowScreenMessage.TOP_CENTER, 6000);
|
|
|
|
|
htmltext = event;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
switch (event)
|
|
|
|
|
case "33980-03.html":
|
|
|
|
|
{
|
|
|
|
|
case "31639-01.html":
|
|
|
|
|
case "33996-01.html":
|
|
|
|
|
case "33980-01.html":
|
|
|
|
|
case "33980-02.html":
|
|
|
|
|
showOnScreenMsg(player, NpcStringId.THIS_CHOICE_CANNOT_BE_REVERSED, ExShowScreenMessage.TOP_CENTER, 6000);
|
|
|
|
|
htmltext = event;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "33980-04.html":
|
|
|
|
|
{
|
|
|
|
|
showOnScreenMsg(player, NpcStringId.THIS_CHOICE_CANNOT_BE_REVERSED, ExShowScreenMessage.TOP_CENTER, 6000);
|
|
|
|
|
htmltext = event;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "33980-05.html":
|
|
|
|
|
{
|
|
|
|
|
final Instance world = player.getInstanceWorld();
|
|
|
|
|
if (!isInInstance(world))
|
|
|
|
|
{
|
|
|
|
|
htmltext = event;
|
|
|
|
|
break;
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
case "33996-02.html":
|
|
|
|
|
world.spawnGroup("q10753_16_instance_halter_2");
|
|
|
|
|
world.setStatus(6);
|
|
|
|
|
startQuestTimer("DESPAWN_WIZARD", 2000, npc, player);
|
|
|
|
|
htmltext = event;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "enterInstance":
|
|
|
|
|
{
|
|
|
|
|
final QuestState qs = player.getQuestState(Q10753_WindsOfFateChoices.class.getSimpleName());
|
|
|
|
|
if (qs != null)
|
|
|
|
|
{
|
|
|
|
|
world.broadcastPacket(ExShowUsm.USM_Q015_E);
|
|
|
|
|
world.despawnGroup("q10753_16_instance_grail");
|
|
|
|
|
world.spawnGroup("q10753_16_instance_wizard");
|
|
|
|
|
giveItems(player, ATELIA, 1);
|
|
|
|
|
showOnScreenMsg(player, NpcStringId.TALK_TO_THE_MYSTERIOUS_WIZARD, ExShowScreenMessage.TOP_CENTER, 6000);
|
|
|
|
|
htmltext = event;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "33980-03.html":
|
|
|
|
|
{
|
|
|
|
|
showOnScreenMsg(player, NpcStringId.THIS_CHOICE_CANNOT_BE_REVERSED, ExShowScreenMessage.TOP_CENTER, 6000);
|
|
|
|
|
htmltext = event;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "33980-04.html":
|
|
|
|
|
{
|
|
|
|
|
showOnScreenMsg(player, NpcStringId.THIS_CHOICE_CANNOT_BE_REVERSED, ExShowScreenMessage.TOP_CENTER, 6000);
|
|
|
|
|
htmltext = event;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "33980-05.html":
|
|
|
|
|
{
|
|
|
|
|
world.spawnGroup("q10753_16_instance_halter_2");
|
|
|
|
|
world.setStatus(6);
|
|
|
|
|
startQuestTimer("DESPAWN_WIZARD", 2000, npc, player);
|
|
|
|
|
htmltext = event;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "status":
|
|
|
|
|
{
|
|
|
|
|
if (world.isStatus(0))
|
|
|
|
|
enterInstance(player, npc, TEMPLATE_ID);
|
|
|
|
|
if (hasQuestItems(player, PROPHECY_MACHINE))
|
|
|
|
|
{
|
|
|
|
|
htmltext = "31639-01.html";
|
|
|
|
|
takeItems(player, PROPHECY_MACHINE, 1);
|
|
|
|
|
}
|
|
|
|
|
qs.setCond(16, true);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "teleport":
|
|
|
|
|
{
|
|
|
|
|
final Instance world = player.getInstanceWorld();
|
|
|
|
|
if (!isInInstance(world))
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
world.getNpc(FERIN).deleteMe(); // probably needs another npc id for initial room
|
|
|
|
|
world.spawnGroup("q10753_16_instance_halter_1_1");
|
|
|
|
|
world.spawnGroup("wof_room1");
|
|
|
|
|
player.teleToLocation(FIRST_ROOM_LOC);
|
|
|
|
|
cancelQuestTimer("CHECK_STATUS", npc, player);
|
|
|
|
|
startQuestTimer("CHECK_STATUS", 7000, world.getNpc(KAIN_VAN_HALTER), player);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "status":
|
|
|
|
|
{
|
|
|
|
|
final Instance world = player.getInstanceWorld();
|
|
|
|
|
if (!isInInstance(world))
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
if (world.isStatus(0))
|
|
|
|
|
{
|
|
|
|
|
htmltext = "31639-01.html";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
htmltext = "31639-02.html";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "CHECK_STATUS":
|
|
|
|
|
{
|
|
|
|
|
final Instance world = player.getInstanceWorld();
|
|
|
|
|
if (!isInInstance(world))
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
switch (world.getStatus())
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
{
|
|
|
|
|
if (world.getAliveNpcs(MonsterInstance.class).isEmpty())
|
|
|
|
|
{
|
|
|
|
|
startQuestTimer("SEY2", 14000, world.getNpc(FERIN), player);
|
|
|
|
|
startQuestTimer("SEY_KAIN", 24000, world.getNpc(VAN_HALTER), player);
|
|
|
|
|
startQuestTimer("OPEN_DOOR1", 5000, npc, player);
|
|
|
|
|
}
|
|
|
|
|
startQuestTimer("CHECK_STATUS", 7000, npc, player);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
htmltext = "31639-02.html";
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "teleport":
|
|
|
|
|
{
|
|
|
|
|
world.getNpc(FERIN).deleteMe(); // probably needs another npc id for initial room
|
|
|
|
|
world.spawnGroup("q10753_16_instance_halter_1_1");
|
|
|
|
|
world.spawnGroup("wof_room1");
|
|
|
|
|
player.teleToLocation(FIRST_ROOM_LOC);
|
|
|
|
|
cancelQuestTimers("CHECK_STATUS");
|
|
|
|
|
startQuestTimer("CHECK_STATUS", 7000, world.getNpc(KAIN_VAN_HALTER), player);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "CHECK_STATUS":
|
|
|
|
|
{
|
|
|
|
|
switch (world.getStatus())
|
|
|
|
|
case 1:
|
|
|
|
|
{
|
|
|
|
|
case 0:
|
|
|
|
|
if (world.getAliveNpcs(MonsterInstance.class).isEmpty())
|
|
|
|
|
{
|
|
|
|
|
if (world.getAliveNpcs(MonsterInstance.class).isEmpty())
|
|
|
|
|
{
|
|
|
|
|
startQuestTimer("SEY2", 14000, world.getNpc(FERIN), player);
|
|
|
|
|
startQuestTimer("SEY_KAIN", 24000, world.getNpc(VAN_HALTER), player);
|
|
|
|
|
startQuestTimer("OPEN_DOOR1", 5000, npc, player);
|
|
|
|
|
}
|
|
|
|
|
startQuestTimer("CHECK_STATUS", 7000, npc, player);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case 1:
|
|
|
|
|
{
|
|
|
|
|
if (world.getAliveNpcs(MonsterInstance.class).isEmpty())
|
|
|
|
|
{
|
|
|
|
|
world.spawnGroup("wof_room2_1");
|
|
|
|
|
world.setStatus(2);
|
|
|
|
|
}
|
|
|
|
|
startQuestTimer("CHECK_STATUS", 7000, npc, player);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case 2:
|
|
|
|
|
{
|
|
|
|
|
if (world.getAliveNpcs(MonsterInstance.class).isEmpty())
|
|
|
|
|
{
|
|
|
|
|
startQuestTimer("SEY3", 8000, world.getNpc(FERIN), player);
|
|
|
|
|
startQuestTimer("OPEN_DOOR2", 5000, npc, player);
|
|
|
|
|
}
|
|
|
|
|
startQuestTimer("CHECK_STATUS", 7000, npc, player);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case 3:
|
|
|
|
|
{
|
|
|
|
|
if (world.getAliveNpcs(MonsterInstance.class).isEmpty())
|
|
|
|
|
{
|
|
|
|
|
world.setStatus(4);
|
|
|
|
|
world.spawnGroup("wof_room3_2");
|
|
|
|
|
world.openCloseDoor(DOOR_3, false);
|
|
|
|
|
startQuestTimer("SEY_KAIN_1", 5000, world.getNpc(VAN_HALTER), player);
|
|
|
|
|
}
|
|
|
|
|
startQuestTimer("CHECK_STATUS", 7000, npc, player);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case 4:
|
|
|
|
|
{
|
|
|
|
|
if (world.getAliveNpcs(MonsterInstance.class).isEmpty())
|
|
|
|
|
{
|
|
|
|
|
world.setStatus(5);
|
|
|
|
|
world.spawnGroup("wof_room4");
|
|
|
|
|
startQuestTimer("SEY_KAIN_2", 3000, world.getNpc(VAN_HALTER), player);
|
|
|
|
|
startQuestTimer("SEY4", 7000, world.getNpc(FERIN), player);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
startQuestTimer("CHECK_STATUS", 7000, npc, player);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
world.spawnGroup("wof_room2_1");
|
|
|
|
|
world.setStatus(2);
|
|
|
|
|
}
|
|
|
|
|
startQuestTimer("CHECK_STATUS", 7000, npc, player);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "ATTACK":
|
|
|
|
|
case "ATTACK1":
|
|
|
|
|
case "ATTACK2":
|
|
|
|
|
{
|
|
|
|
|
npc.setRunning();
|
|
|
|
|
((Attackable) npc).setCanReturnToSpawnPoint(false);
|
|
|
|
|
if (npc.isScriptValue(0) && world.getAliveNpcs(MonsterInstance.class).isEmpty())
|
|
|
|
|
case 2:
|
|
|
|
|
{
|
|
|
|
|
npc.setTarget(player);
|
|
|
|
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
|
|
|
|
|
}
|
|
|
|
|
else if (npc.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK)
|
|
|
|
|
{
|
|
|
|
|
World.getInstance().forEachVisibleObjectInRange(npc, MonsterInstance.class, 3000, monster ->
|
|
|
|
|
if (world.getAliveNpcs(MonsterInstance.class).isEmpty())
|
|
|
|
|
{
|
|
|
|
|
addAttackDesire(npc, monster);
|
|
|
|
|
return;
|
|
|
|
|
});
|
|
|
|
|
startQuestTimer("SEY3", 8000, world.getNpc(FERIN), player);
|
|
|
|
|
startQuestTimer("OPEN_DOOR2", 5000, npc, player);
|
|
|
|
|
}
|
|
|
|
|
startQuestTimer("CHECK_STATUS", 7000, npc, player);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case 3:
|
|
|
|
|
{
|
|
|
|
|
if (world.getAliveNpcs(MonsterInstance.class).isEmpty())
|
|
|
|
|
{
|
|
|
|
|
world.setStatus(4);
|
|
|
|
|
world.spawnGroup("wof_room3_2");
|
|
|
|
|
world.openCloseDoor(DOOR_3, false);
|
|
|
|
|
startQuestTimer("SEY_KAIN_1", 5000, world.getNpc(VAN_HALTER), player);
|
|
|
|
|
}
|
|
|
|
|
startQuestTimer("CHECK_STATUS", 7000, npc, player);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case 4:
|
|
|
|
|
{
|
|
|
|
|
if (world.getAliveNpcs(MonsterInstance.class).isEmpty())
|
|
|
|
|
{
|
|
|
|
|
world.setStatus(5);
|
|
|
|
|
world.spawnGroup("wof_room4");
|
|
|
|
|
startQuestTimer("SEY_KAIN_2", 3000, world.getNpc(VAN_HALTER), player);
|
|
|
|
|
startQuestTimer("SEY4", 7000, world.getNpc(FERIN), player);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
startQuestTimer("CHECK_STATUS", 7000, npc, player);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "OPEN_DOOR1":
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "ATTACK":
|
|
|
|
|
case "ATTACK1":
|
|
|
|
|
case "ATTACK2":
|
|
|
|
|
{
|
|
|
|
|
final Instance world = player.getInstanceWorld();
|
|
|
|
|
if (!isInInstance(world))
|
|
|
|
|
{
|
|
|
|
|
cancelQuestTimers("ATTACK");
|
|
|
|
|
world.setStatus(1);
|
|
|
|
|
world.openCloseDoor(DOOR_2, true);
|
|
|
|
|
world.spawnGroup("wof_room2");
|
|
|
|
|
break;
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
case "OPEN_DOOR2":
|
|
|
|
|
{
|
|
|
|
|
cancelQuestTimers("ATTACK1");
|
|
|
|
|
startQuestTimer("ATTACK2", 200, world.getNpc(VAN_HALTER), player, true);
|
|
|
|
|
world.setStatus(3);
|
|
|
|
|
world.spawnGroup("wof_room3");
|
|
|
|
|
world.openCloseDoor(DOOR_3, true);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "BROADCAST_TEXT":
|
|
|
|
|
npc.setRunning();
|
|
|
|
|
((Attackable) npc).setCanReturnToSpawnPoint(false);
|
|
|
|
|
if (npc.isScriptValue(0) && world.getAliveNpcs(MonsterInstance.class).isEmpty())
|
|
|
|
|
{
|
|
|
|
|
npc.setTarget(player);
|
|
|
|
|
npc.setRunning();
|
|
|
|
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THAT_GUY_KAIN_HAS_A_SMARMY_FACE));
|
|
|
|
|
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_7", 0, 0, 0, 0, 0));
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "SEY2":
|
|
|
|
|
else if (npc.getAI().getIntention() != CtrlIntention.AI_INTENTION_ATTACK)
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == FERIN)
|
|
|
|
|
World.getInstance().forEachVisibleObjectInRange(npc, MonsterInstance.class, 3000, monster ->
|
|
|
|
|
{
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.YOU_CAN_T_DIE_HERE_I_DIDN_T_LEARN_RESURRECT_YET));
|
|
|
|
|
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_4", 0, 0, 0, 0, 0));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
addAttackDesire(npc, monster);
|
|
|
|
|
return;
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
case "SEY_KAIN":
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "OPEN_DOOR1":
|
|
|
|
|
{
|
|
|
|
|
final Instance world = player.getInstanceWorld();
|
|
|
|
|
if (!isInInstance(world))
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == VAN_HALTER)
|
|
|
|
|
{
|
|
|
|
|
startQuestTimer("ATTACK1", 200, npc, player, true);
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GISELLE_WAS_SUCH_A_SWEET_CHILD));
|
|
|
|
|
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_1", 0, 0, 0, 0, 0));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
case "SEY3":
|
|
|
|
|
cancelQuestTimer("ATTACK", npc, player);
|
|
|
|
|
world.setStatus(1);
|
|
|
|
|
world.openCloseDoor(DOOR_2, true);
|
|
|
|
|
world.spawnGroup("wof_room2");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "OPEN_DOOR2":
|
|
|
|
|
{
|
|
|
|
|
final Instance world = player.getInstanceWorld();
|
|
|
|
|
if (!isInInstance(world))
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == FERIN)
|
|
|
|
|
{
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.DO_YOU_THINK_I_LL_GROW_TALLER_IF_I_EAT_LOTS_AND_LOTS));
|
|
|
|
|
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_6", 0, 0, 0, 0, 0));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
case "SEY_KAIN_1":
|
|
|
|
|
cancelQuestTimer("ATTACK1", npc, player);
|
|
|
|
|
startQuestTimer("ATTACK2", 200, world.getNpc(VAN_HALTER), player, true);
|
|
|
|
|
world.setStatus(3);
|
|
|
|
|
world.spawnGroup("wof_room3");
|
|
|
|
|
world.openCloseDoor(DOOR_3, true);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "BROADCAST_TEXT":
|
|
|
|
|
{
|
|
|
|
|
npc.setTarget(player);
|
|
|
|
|
npc.setRunning();
|
|
|
|
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_FOLLOW, player);
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THAT_GUY_KAIN_HAS_A_SMARMY_FACE));
|
|
|
|
|
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_7", 0, 0, 0, 0, 0));
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "SEY2":
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == FERIN)
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == VAN_HALTER)
|
|
|
|
|
{
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.SUCH_MONSTERS_IN_A_PLACE_LIKE_THIS_UNBELIEVABLE));
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.YOU_CAN_T_DIE_HERE_I_DIDN_T_LEARN_RESURRECT_YET));
|
|
|
|
|
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_4", 0, 0, 0, 0, 0));
|
|
|
|
|
}
|
|
|
|
|
case "SEY_KAIN_2":
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "SEY_KAIN":
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == VAN_HALTER)
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == VAN_HALTER)
|
|
|
|
|
{
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THAT_S_THE_MONSTER_THAT_ATTACKED_FAERON_YOU_RE_OUTMATCHED_HERE_GO_AHEAD_I_LL_CATCH_UP));
|
|
|
|
|
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_6", 0, 0, 0, 0, 0));
|
|
|
|
|
startQuestTimer("SEY_KAIN_3", 7000, npc, player);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
startQuestTimer("ATTACK1", 200, npc, player, true);
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GISELLE_WAS_SUCH_A_SWEET_CHILD));
|
|
|
|
|
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_1", 0, 0, 0, 0, 0));
|
|
|
|
|
}
|
|
|
|
|
case "SEY4":
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "SEY3":
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == FERIN)
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == FERIN)
|
|
|
|
|
{
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GO_NOW_KAIN_CAN_HANDLE_THIS));
|
|
|
|
|
startQuestTimer("REST", 5000, npc, player);
|
|
|
|
|
npc.setScriptValue(1);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.DO_YOU_THINK_I_LL_GROW_TALLER_IF_I_EAT_LOTS_AND_LOTS));
|
|
|
|
|
player.sendPacket(new PlaySound(3, "Npcdialog1.apple_quest_6", 0, 0, 0, 0, 0));
|
|
|
|
|
}
|
|
|
|
|
case "SEY_KAIN_3":
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "SEY_KAIN_1":
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == VAN_HALTER)
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == VAN_HALTER)
|
|
|
|
|
{
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LEAVE_THIS_TO_ME_GO));
|
|
|
|
|
startQuestTimer("SEY_KAIN_4", 1000, npc, player);
|
|
|
|
|
npc.setScriptValue(1);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.SUCH_MONSTERS_IN_A_PLACE_LIKE_THIS_UNBELIEVABLE));
|
|
|
|
|
}
|
|
|
|
|
case "REST":
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "SEY_KAIN_2":
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == VAN_HALTER)
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == FERIN)
|
|
|
|
|
{
|
|
|
|
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, player);
|
|
|
|
|
cancelQuestTimers("BROADCAST_TEXT");
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.THAT_S_THE_MONSTER_THAT_ATTACKED_FAERON_YOU_RE_OUTMATCHED_HERE_GO_AHEAD_I_LL_CATCH_UP));
|
|
|
|
|
player.sendPacket(new PlaySound(3, "Npcdialog1.holter_quest_6", 0, 0, 0, 0, 0));
|
|
|
|
|
startQuestTimer("SEY_KAIN_3", 7000, npc, player);
|
|
|
|
|
}
|
|
|
|
|
case "SEY_KAIN_4":
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "SEY4":
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == FERIN)
|
|
|
|
|
{
|
|
|
|
|
world.setStatus(5);
|
|
|
|
|
world.spawnGroup("q10753_16_instance_grail");
|
|
|
|
|
showOnScreenMsg(player, NpcStringId.LEAVE_THIS_PLACE_TO_KAIN_NGO_TO_THE_NEXT_ROOM, ExShowScreenMessage.TOP_CENTER, 6000);
|
|
|
|
|
world.openCloseDoor(DOOR_4, true);
|
|
|
|
|
cancelQuestTimers("ATTACK2");
|
|
|
|
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, player);
|
|
|
|
|
startQuestTimer("CLOSE", 15000, null, player);
|
|
|
|
|
break;
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.GO_NOW_KAIN_CAN_HANDLE_THIS));
|
|
|
|
|
startQuestTimer("REST", 5000, npc, player);
|
|
|
|
|
npc.setScriptValue(1);
|
|
|
|
|
}
|
|
|
|
|
case "CLOSE":
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "SEY_KAIN_3":
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == VAN_HALTER)
|
|
|
|
|
{
|
|
|
|
|
final Npc grail = world.getNpc(GRAIL);
|
|
|
|
|
if ((grail != null) && (player.calculateDistance2D(grail) < 390))
|
|
|
|
|
{
|
|
|
|
|
world.openCloseDoor(DOOR_4, false);
|
|
|
|
|
world.despawnGroup("q10753_16_instance_halter_1_1");
|
|
|
|
|
world.despawnGroup("wof_room4");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
startQuestTimer("CLOSE", 3000, npc, player);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
npc.broadcastPacket(new NpcSay(npc.getObjectId(), ChatType.NPC_GENERAL, npc.getId(), NpcStringId.LEAVE_THIS_TO_ME_GO));
|
|
|
|
|
startQuestTimer("SEY_KAIN_4", 1000, npc, player);
|
|
|
|
|
npc.setScriptValue(1);
|
|
|
|
|
}
|
|
|
|
|
case "DESPAWN_WIZARD":
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "REST":
|
|
|
|
|
{
|
|
|
|
|
if (npc.getId() == FERIN)
|
|
|
|
|
{
|
|
|
|
|
world.despawnGroup("q10753_16_instance_wizard");
|
|
|
|
|
break;
|
|
|
|
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_IDLE, player);
|
|
|
|
|
cancelQuestTimer("BROADCAST_TEXT", npc, player);
|
|
|
|
|
}
|
|
|
|
|
case "exit":
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "SEY_KAIN_4":
|
|
|
|
|
{
|
|
|
|
|
final Instance world = player.getInstanceWorld();
|
|
|
|
|
if (!isInInstance(world))
|
|
|
|
|
{
|
|
|
|
|
startQuestTimer("finish", 3000, npc, player);
|
|
|
|
|
player.sendPacket(new SystemMessage(SystemMessageId.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTE_S_YOU_WILL_BE_FORCED_OUT_OF_THE_DUNGEON_WHEN_THE_TIME_EXPIRES).addInt((int) 1.0D));
|
|
|
|
|
final QuestState qs = player.getQuestState(Q10753_WindsOfFateChoices.class.getSimpleName());
|
|
|
|
|
if (qs != null)
|
|
|
|
|
{
|
|
|
|
|
qs.setCond(17, true);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
case "finish":
|
|
|
|
|
world.setStatus(5);
|
|
|
|
|
world.spawnGroup("q10753_16_instance_grail");
|
|
|
|
|
showOnScreenMsg(player, NpcStringId.LEAVE_THIS_PLACE_TO_KAIN_NGO_TO_THE_NEXT_ROOM, ExShowScreenMessage.TOP_CENTER, 6000);
|
|
|
|
|
world.openCloseDoor(DOOR_4, true);
|
|
|
|
|
cancelQuestTimer("ATTACK2", npc, player);
|
|
|
|
|
npc.getAI().setIntention(CtrlIntention.AI_INTENTION_ACTIVE, player);
|
|
|
|
|
startQuestTimer("CLOSE", 15000, null, player);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "CLOSE":
|
|
|
|
|
{
|
|
|
|
|
final Instance world = player.getInstanceWorld();
|
|
|
|
|
if (!isInInstance(world))
|
|
|
|
|
{
|
|
|
|
|
world.finishInstance(0);
|
|
|
|
|
break;
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
final Npc grail = world.getNpc(GRAIL);
|
|
|
|
|
if ((grail != null) && (player.calculateDistance2D(grail) < 390))
|
|
|
|
|
{
|
|
|
|
|
world.openCloseDoor(DOOR_4, false);
|
|
|
|
|
world.despawnGroup("q10753_16_instance_halter_1_1");
|
|
|
|
|
world.despawnGroup("wof_room4");
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
startQuestTimer("CLOSE", 3000, npc, player);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "DESPAWN_WIZARD":
|
|
|
|
|
{
|
|
|
|
|
final Instance world = player.getInstanceWorld();
|
|
|
|
|
if (!isInInstance(world))
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
world.despawnGroup("q10753_16_instance_wizard");
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "exit":
|
|
|
|
|
{
|
|
|
|
|
startQuestTimer("finish", 3000, npc, player);
|
|
|
|
|
player.sendPacket(new SystemMessage(SystemMessageId.THIS_DUNGEON_WILL_EXPIRE_IN_S1_MINUTE_S_YOU_WILL_BE_FORCED_OUT_OF_THE_DUNGEON_WHEN_THE_TIME_EXPIRES).addInt(1));
|
|
|
|
|
final QuestState qs = player.getQuestState(Q10753_WindsOfFateChoices.class.getSimpleName());
|
|
|
|
|
if (qs != null)
|
|
|
|
|
{
|
|
|
|
|
qs.setCond(17, true);
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
case "finish":
|
|
|
|
|
{
|
|
|
|
|
final Instance world = player.getInstanceWorld();
|
|
|
|
|
if (!isInInstance(world))
|
|
|
|
|
{
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
world.finishInstance(0);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return htmltext;
|
|
|
|
|