Index: zones/Inner_Horutoto_Ruins/npcs/_5ca.lua =================================================================== --- zones/Inner_Horutoto_Ruins/npcs/_5ca.lua (revision 2644) +++ zones/Inner_Horutoto_Ruins/npcs/_5ca.lua (working copy) @@ -26,31 +26,29 @@ function onTrigger(player,npc) + local MakingHeadlines = player:getQuestStatus(WINDURST,MAKING_HEADLINES); + local CurrentMission = player:getCurrentMission(WINDURST) + local MissionStatus = player:getVar("MissionStatus"); + -- Check for Missions first (priority?) - if(player:getCurrentMission(WINDURST) == LOST_FOR_WORDS) then - MissionStatus = player:getVar("MissionStatus"); - if(MissionStatus == 4) then - player:startEvent(0x002e); - else - player:startEvent(0x002c); -- "The door is firmly shut" - end - else + -- We should allow both missions and quests to activate + if(CurrentMission == LOST_FOR_WORDS and MissionStatus == 4) then + player:startEvent(0x002e); + elseif(MakingHeadlines == 1) then function testflag(set,flag) return (set % (2*flag) >= flag) end - MakingHeadlines = player:getQuestStatus(WINDURST,MAKING_HEADLINES); - if (MakingHeadlines == 1) then - prog = player:getVar("QuestMakingHeadlines_var"); - if (testflag(tonumber(prog),16) == false and testflag(tonumber(prog),8) == true) then - player:messageSpecial(7208,1,WINDURST_WOODS_SCOOP); -- Confirm Story - player:setVar("QuestMakingHeadlines_var",prog+16); - else - player:startEvent(0x002c); -- "The door is firmly shut" - end + + local prog = player:getVar("QuestMakingHeadlines_var"); + if (testflag(tonumber(prog),16) == false and testflag(tonumber(prog),8) == true) then + player:messageSpecial(7208,1,WINDURST_WOODS_SCOOP); -- Confirm Story + player:setVar("QuestMakingHeadlines_var",prog+16); else player:startEvent(0x002c); -- "The door is firmly shut" end - end + else + player:startEvent(0x002c); -- "The door is firmly shut" + end; return 1;