String htmltext = event;
if (st == null)
{
return htmltext;
}
Player player = st.getPlayer();
if (player == null)
{
return htmltext;
}
if (event.equalsIgnoreCase("MemoryOfDisaster"))
{
Reflection r = player.getActiveReflection();
if (r != null)
{
if (player.canReenterInstance(MEMORY_OF_DISASTER_ID))
{
player.teleToLocation(r.getTeleportLoc(), r);
}
}
else if (player.canEnterInstance(MEMORY_OF_DISASTER_ID))
{
ReflectionUtils.enterReflection(player, new MemoryOfDisaster(player), MEMORY_OF_DISASTER_ID);
}
htmltext = null;
}
if (npc == null)
{
return htmltext;
}
switch (npc.getNpcId())
{
case CELLPHINE_ID:
if (event.equalsIgnoreCase("quest_ac"))
{
st.setState(STARTED);
st.setCond(1);
st.playSound(SOUND_ACCEPT);
htmltext = "0-2.htm";
}
break;
case HADEL_ID:
if (event.equalsIgnoreCase("1-5.htm"))
{
st.setCond(2);
st.playSound(SOUND_MIDDLE);
}
else if (event.equalsIgnoreCase("EnterInstance"))
{
Reflection r = player.getActiveReflection();
if (r != null)
{
if (player.canReenterInstance(INSTANCE_ID))
{
player.teleToLocation(r.getTeleportLoc(), r);
}
}
else if (player.canEnterInstance(INSTANCE_ID))
{
if (st.getCond() < 3)
{
ReflectionUtils.enterReflection(player, new HarnakUndergroundRuins(1), INSTANCE_ID);
}
else
{
ReflectionUtils.enterReflection(player, new HarnakUndergroundRuins(2), INSTANCE_ID);
}
}
htmltext = null;
}
break;
case HERMUNKUS_ID:
if (event.equalsIgnoreCase("accept_scroll"))
{
player.sendPacket(new ExShowScreenMessage(NpcString.YOU_MAY_USE_SCROLL_OF_AFTERLIFE_FROM_HERMUNCUS_TO_AWAKEN, 10000, ExShowScreenMessage.ScreenMessageAlign.TOP_CENTER, true, ExShowScreenMessage.STRING_TYPE, 0, false, 0));
st.playSound(SOUND_FINISH);
st.giveItems(SCROLL_OF_AFTERLIFE, 1);
st.exitCurrentQuest(false);
htmltext = "2-3.htm";
}