Index: scripts/zones/The_Eldieme_Necropolis/npcs/Sarcophagus.lua =================================================================== --- scripts/zones/The_Eldieme_Necropolis/npcs/Sarcophagus.lua (revision 2745) +++ scripts/zones/The_Eldieme_Necropolis/npcs/Sarcophagus.lua (working copy) @@ -61,16 +61,35 @@ ----------------------------------- function onTrigger(player,npc) + aNewDawn = player:getQuestStatus(JEUNO,A_NEW_DAWN); + requiemQuest = player:getQuestStatus(JEUNO,THE_REQUIEM); - if(sarcophagusNumber(npc:getXPos(),npc:getZPos()) == player:getVar("TheRequiemRandom")) then - if(player:getVar("TheRequiemYumKilled") == 1) then - player:startEvent(0x002e); - elseif(player:getVar("TheRequiemAlreadyPoped") == 1) then - player:messageSpecial(SENSE_OF_FOREBODING); - SpawnMob(17576265):updateEnmity(player); -- Spawn Yum Kimil NM @pos -414 8 499 - SpawnMob(17576267):updateEnmity(player); -- Spawn Owl Guardian NM @pos -414 8 501 - SpawnMob(17576266):updateEnmity(player); -- Spawn Dog Guardian NM @pos -414 8 497 + sarcophagus = sarcophagusNumber(npc:getXPos(),npc:getZPos()); + + if (requiemQuest == QUEST_ACCEPTED) then + if(sarcophagus == player:getVar("TheRequiemRandom")) then + if(player:getVar("TheRequiemYumKilled") == 1) then + player:startEvent(0x002e); + elseif(player:getVar("TheRequiemAlreadyPoped") == 1) then + player:messageSpecial(SENSE_OF_FOREBODING); + SpawnMob(17576265):updateEnmity(player); -- Spawn Yum Kimil NM @pos -414 8 499 + SpawnMob(17576267):updateEnmity(player); -- Spawn Owl Guardian NM @pos -414 8 501 + SpawnMob(17576266):updateEnmity(player); -- Spawn Dog Guardian NM @pos -414 8 497 + end end + elseif (aNewDawn == QUEST_ACCEPTED and player:getVar("newDawn") == 2) then + if(sarcophagus == 4) then + SpawnMob(17576268):updateEnmity(player); -- Spawn Sturm + SpawnMob(17576269):updateEnmity(player); -- Spawn Taifun + SpawnMob(17576270):updateEnmity(player); -- Spawn Trombe + end + elseif (aNewDawn == QUEST_ACCEPTED and player:getVar("newDawn") == 3) then + -- CS that needs to be played is missing, and cannot be displayed + player:addItem(14222,1); + player:messageSpecial(ITEM_OBTAINED,14222); + player:completeQuest(JEUNO,A_NEW_DAWN); + player:delKeyItem(TAMERS_WHISTLE); + player:addTitle(PARAGON_OF_BEASTMASTER_EXCELLENCE); else player:messageSpecial(SARCOPHAGUS_CANNOT_BE_OPENED); -- Standard dialog end