}
@Override
public String onEvent(String event, QuestState st, NpcInstance npc)
{
Player player = st.getPlayer();
String htmltext = event;
if (event.equalsIgnoreCase("30191-02.htm"))
{
st.setCond(1);
st.setState(STARTED);
st.playSound(SOUND_ACCEPT);
st.giveItems(JacobsNecklace, 1);
}
else if (event.equalsIgnoreCase("32569-05.htm"))
{
st.setCond(2);
st.playSound(SOUND_MIDDLE);
}
else if (event.equalsIgnoreCase("32570-02.htm"))
{
st.setCond(3);
st.giveItems(DeadmansHerb, 1);
st.playSound(SOUND_MIDDLE);
}
else if (event.equalsIgnoreCase("30760-02.htm"))
{
if (player.getBaseClassId() == player.getActiveClassId())
{
st.addExpAndSp(10000000, 2500000);
st.setState(COMPLETED);
st.exitCurrentQuest(false);
st.playSound(SOUND_FINISH);
}
else
{
return "subclass_forbidden.htm";
}
}
else if (event.equalsIgnoreCase("close_your_eyes"))
{
st.setCond(4);
st.takeItems(DeadmansHerb, -1);
st.playSound(SOUND_MIDDLE);
player.showQuestMovie(ExStartScenePlayer.SCENE_SSQ_DYING_MASSAGE);
return "";
}
else if (event.equalsIgnoreCase("32569-09.htm"))
{
htmltext = "32569-09.htm";
Functions.npcSay(npc, st.getPlayer().getName() + "! That stranger must be defeated. Here is the ultimate help!");
NpcInstance mob = st.addSpawn(ShilensEvilThoughts, 82425, 47232, -3216, 0, 0, 180000);
spawns.put(player.getObjectId(), mob.getObjectId());
mob.getAI().notifyEvent(CtrlEvent.EVT_AGGRESSION, player, 100000);
}
else if (event.equalsIgnoreCase("32569-13.htm"))
{
st.setCond(6);