@Override
public String onEvent(String event, QuestState st, NpcInstance npc)
{
Player player = st.getPlayer();
String htmltext = event;
Reflection ref = player.getReflection();
if (event.equalsIgnoreCase("claudiaathebaldt_q195_2.htm"))
{
st.setCond(1);
st.setState(STARTED);
st.playSound(SOUND_ACCEPT);
}
else if (event.equalsIgnoreCase("john_q195_2.htm"))
{
st.setCond(2);
st.giveItems(GuardsoftheDawnIdentityCard, 1);
st.playSound(SOUND_MIDDLE);
}
else if (event.equalsIgnoreCase("raymond_q195_3.htm"))
{
if ((player.getTransformation() != 0) || player.isMounted())
{
player.sendPacket(Msg.YOU_ALREADY_POLYMORPHED_AND_CANNOT_POLYMORPH_AGAIN);
return null;
}
st.playSound(SOUND_MIDDLE);
negateSpeedBuffs(player);
SkillTable.getInstance().getInfo(6204, 1).getEffects(player, player, false, false);
st.setCond(3);
}
else if (event.equalsIgnoreCase("transformagain"))
{
if ((player.getTransformation() != 0) || player.isMounted())
{
player.sendPacket(Msg.YOU_ALREADY_POLYMORPHED_AND_CANNOT_POLYMORPH_AGAIN);
return null;
}
negateSpeedBuffs(player);
SkillTable.getInstance().getInfo(6204, 1).getEffects(player, player, false, false);
htmltext = "raymond_q195_4c.htm";
}
else if (event.equalsIgnoreCase("dispel"))
{
if (player.getTransformation() == 113)
{
player.setTransformation(0);
htmltext = "raymond_q195_4d.htm";
}
else
{
htmltext = "raymond_q195_4b.htm";
}
}
else if (event.equalsIgnoreCase("teleout"))
{
if (st.getQuestItemsCount(GuardsoftheDawnIdentityCard) > 0)
{
htmltext = "darknessofdawn_q195_1.htm";
}
else
{
htmltext = "darknessofdawn_q195_2.htm";
}
if (ref != null)
{
ref.collapse();
}
}
else if (event.equalsIgnoreCase("telelater"))
{
return null;
}
else if (event.equalsIgnoreCase("open_door"))
{
if ((ref != null) && (player.getTransformation() == 113) && (st.getQuestItemsCount(GuardsoftheDawnIdentityCard) >= 1))
{
if (npc.getLoc().equals(new Location(-75695, 213537, -7128, 0)))
{
ref.openDoor(door1);
ref.openDoor(door2);
player.sendPacket(new SystemMessage(SystemMessage.BY_USING_THE_INVISIBLE_SKILL_SNEAK_INTO_THE_DAWN_S_DOCUMENT_STORAGE));
player.sendPacket(new SystemMessage(SystemMessage.MALE_GUARDS_CAN_DETECT_THE_CONCEALMENT_BUT_THE_FEMALE_GUARDS_CANNOT));
player.sendPacket(new SystemMessage(SystemMessage.FEMALE_GUARDS_NOTICE_THE_DISGUISES_FROM_FAR_AWAY_BETTER_THAN_THE_MALE_GUARDS_DO_SO_BEWARE));
htmltext = "identityconfirmdevice_q195_1.htm";
}
else
{
ref.openDoor(door3);
ref.openDoor(door4);
player.sendPacket(new SystemMessage(SystemMessage.THE_DOOR_IN_FRONT_OF_US_IS_THE_ENTRANCE_TO_THE_DAWN_S_DOCUMENT_STORAGE_APPROACH_TO_THE_CODE));
player.showQuestMovie(ExStartScenePlayer.SCENE_SSQ_RITUAL_OF_PRIEST);
htmltext = "identityconfirmdevice_q195_1.htm";
}
}
else
{
return "identityconfirmdevice_q195_2.htm";
}
}
else if (event.equalsIgnoreCase("false_code"))
{
htmltext = "passwordentrydevice_q195_2.htm";
}
else if (event.equalsIgnoreCase("correct_code"))
{
if (ref != null)
{
ref.openDoor(door5);
ref.openDoor(door6);
}
htmltext = "passwordentrydevice_q195_1.htm";
}
else if (event.equalsIgnoreCase("bookshelf_q195_2.htm"))
{
st.giveItems(EmperorShunaimansContract, 1);
st.playSound(SOUND_ITEMGET);
}
else if (event.equalsIgnoreCase("bookshelf_q195_3.htm"))
{
if ((ref != null) && !ref.isDefault())
{
ref.collapse();
}
}
else if (event.equalsIgnoreCase("raymond_q195_5.htm"))
{
player.setTransformation(0);