Index: scripts/globals/missions.lua =================================================================== --- scripts/globals/missions.lua (revision 4080) +++ scripts/globals/missions.lua (working copy) @@ -91,10 +91,10 @@ MAGICITE = 13; -- ± -- THE_FINAL_SEAL = 14; -- ± -- THE_SHADOW_AWAITS = 15; -- ± -- -FULL_MOON_FOUNTAIN = 16; -SAINTLY_INVITATION = 17; -THE_SIXTH_MINISTRY = 18; -AWAKENING_OF_THE_GODS = 19; +FULL_MOON_FOUNTAIN = 16; -- ± -- +SAINTLY_INVITATION = 17; -- ± -- +THE_SIXTH_MINISTRY = 18; -- ± -- +AWAKENING_OF_THE_GODS = 19; -- ± -- VAIN = 20; THE_JESTER_WHO_D_BE_KING = 21; DOLL_OF_THE_DEAD = 22; @@ -912,7 +912,9 @@ 14,{0x00C0,0},{0,0}, {0,0}, {0,0}, {{14,0},{9,73},{5,600},{12}}, -- MISSION 5-1 (Finish (Star Sibyl)) 15,{0x00D8,0},{0,0}, {0,0}, {0,0}, {{11,6},{14,0},{9,74},{8,20000},{6},{12}}, -- MISSION 5-2 (Finish (Star Sibyl)) 16,{0,0}, {0,0}, {0x0032,0},{0,0}, {{14,0},{5,650},{0,0},{0,0},{0,0},{12}}, -- MISSION 6-1 (Finish (Zone: Full Moon Fountain)) - 17,{0,0}, {0,0}, {0x0138,0},{0,0}, {{14,0},{11,7},{8,40000},{6},{0,0},{12}} -- MISSION 6-2 (Finish (Star Sibyl)) + 17,{0,0}, {0,0}, {0x0138,0},{0,0}, {{14,0},{11,7},{8,40000},{6},{0,0},{12}}, -- MISSION 6-2 (Finish (Star Sibyl)) + 18,{0,0}, {0,0}, {0x02d4,0},{0,0}, {{14,0},{5,700},{10,251},{0,0},{0,0},{12}}, -- MISSION 7-1 (Finish (Tosuka-Porika)) + 19,{0,0}, {0,0}, {0x02E6,0},{0,0}, {{14,0},{11,8},{8,60000},{6},{0,0},{12}} -- MISSION 7-2 (Finish (Leepe-Hoppe)) }; end end Index: scripts/zones/Kazham/npcs/Jakoh_Wahcondalo.lua =================================================================== --- scripts/zones/Kazham/npcs/Jakoh_Wahcondalo.lua (revision 4080) +++ scripts/zones/Kazham/npcs/Jakoh_Wahcondalo.lua (working copy) @@ -26,6 +26,8 @@ player:startEvent(0x0072); elseif(player:getCurrentMission(ZILART) == THE_TEMPLE_OF_UGGALEPIH) then player:startEvent(0x0073); + elseif(player:getCurrentMission(WINDURST) == AWAKENING_OF_THE_GODS and player:getVar("MissionStatus") == 2) then + player:startEvent(0x0109); else player:startEvent(0x0071); end Index: scripts/zones/Kazham/npcs/Romaa_Mihgo.lua =================================================================== --- scripts/zones/Kazham/npcs/Romaa_Mihgo.lua (revision 4080) +++ scripts/zones/Kazham/npcs/Romaa_Mihgo.lua (working copy) @@ -9,7 +9,7 @@ ----------------------------------- package.loaded["scripts/zones/Kazham/TextIDs"] = nil; ----------------------------------- - +require("scripts/globals/missions"); ----------------------------------- -- onTrade Action ----------------------------------- @@ -22,7 +22,15 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x0107); + + if(player:getCurrentMission(WINDURST) == AWAKENING_OF_THE_GODS and player:getVar("MissionStatus") == 2) then + player:startEvent(0x010A); + elseif(player:getCurrentMission(WINDURST) == AWAKENING_OF_THE_GODS and player:getVar("MissionStatus") == 3) then + player:startEvent(0x010B); + else + player:startEvent(0x0107); + end + end; ----------------------------------- @@ -41,5 +49,10 @@ function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); + + if(csid == 0x010A) then + player:setVar("MissionStatus",3) + end + end; Index: scripts/zones/Kazham/npcs/Vanono.lua =================================================================== --- scripts/zones/Kazham/npcs/Vanono.lua (revision 4080) +++ scripts/zones/Kazham/npcs/Vanono.lua (working copy) @@ -9,7 +9,7 @@ ----------------------------------- package.loaded["scripts/zones/Kazham/TextIDs"] = nil; ----------------------------------- - +require("scripts/globals/missions"); ----------------------------------- -- onTrade Action ----------------------------------- @@ -22,7 +22,15 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x0106); + + if(player:getCurrentMission(WINDURST) == AWAKENING_OF_THE_GODS and player:getVar("MissionStatus") == 3) then + player:startEvent(0x0108); + elseif(player:getCurrentMission(WINDURST) == AWAKENING_OF_THE_GODS and player:getVar("MissionStatus") > 3) then + player:startEvent(0x010C); + else + player:startEvent(0x0106); + end + end; ----------------------------------- @@ -41,5 +49,10 @@ function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); + + if(csid == 0x0108) then + player:setVar("MissionStatus",4); + end + end; Index: scripts/zones/Temple_of_Uggalepih/npcs/_4fx.lua =================================================================== --- scripts/zones/Temple_of_Uggalepih/npcs/_4fx.lua (revision 0) +++ scripts/zones/Temple_of_Uggalepih/npcs/_4fx.lua (working copy) @@ -0,0 +1,72 @@ +----------------------------------- +-- Area: Temple of Uggalepih +-- NPC: Granite Door +-- @zone 159 +-- @pos 340 0 329 159 +----------------------------------- +package.loaded["scripts/zones/Temple_of_Uggalepih/TextIDs"] = nil; +----------------------------------- +require("scripts/globals/missions"); +require("scripts/globals/keyitems"); +require("scripts/zones/Temple_of_Uggalepih/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + + if(trade:hasItemQty(1143,1) and trade:getItemCount() == 1) then + if(player:getCurrentMission(WINDURST) == AWAKENING_OF_THE_GODS and player:getVar("MissionStatus") == 4) then + player:startEvent(0x0017); + else + player:messageSpecial(NOTHING_HAPPENS); + end + end + +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + + if(player:getZPos() < 332) then + player:messageSpecial(DOOR_LOCKED); + else + local npc = npc:getID(); + GetNPCByID(npc):openDoor(2); + player:setPos(340,0,333,191); + end + +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + + if(csid == 0x0017) then + player:tradeComplete(); + player:messageSpecial(YOUR_KEY_BREAKS,0,1143); + player:delKeyItem(BLANK_BOOK_OF_THE_GODS); + player:addKeyItem(BOOK_OF_THE_GODS); + player:messageSpecial(KEYITEM_OBTAINED,BOOK_OF_THE_GODS); + player:setVar("MissionStatus",5); + end + +end; \ No newline at end of file Index: scripts/zones/Temple_of_Uggalepih/npcs/Tome_of_Magic.lua =================================================================== --- scripts/zones/Temple_of_Uggalepih/npcs/Tome_of_Magic.lua (revision 0) +++ scripts/zones/Temple_of_Uggalepih/npcs/Tome_of_Magic.lua (working copy) @@ -0,0 +1,49 @@ +----------------------------------- +-- Area: Temple of Uggalepih +-- NPC: Tome of Magic +-- Involved In Windurst Mission 7-2 (Optional Dialogue) +-- @zone 159 +-- @pos 346 0 343 159 +----------------------------------- +package.loaded["scripts/zones/Temple_of_Uggalepih/TextIDs"] = nil; +require("scripts/zones/Temple_of_Uggalepih/TextIDs"); +----------------------------------- + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + + local cs = math.random(0x014,0x016) + player:startEvent(cs); + +end; + +----------------------------------- +-- onEventUpdate +----------------------------------- + +function onEventUpdate(player,csid,option) +--printf("CSID2: %u",csid); +--printf("RESULT2: %u",option); + +end; + +----------------------------------- +-- onEventFinish +----------------------------------- + +function onEventFinish(player,csid,option) +--printf("CSID: %u",csid); +--printf("RESULT: %u",option); + +end; \ No newline at end of file Index: scripts/zones/Windurst_Waters/npcs/Kerutoto.lua =================================================================== --- scripts/zones/Windurst_Waters/npcs/Kerutoto.lua (revision 4080) +++ scripts/zones/Windurst_Waters/npcs/Kerutoto.lua (working copy) @@ -8,7 +8,7 @@ ----------------------------------- package.loaded["scripts/zones/Windurst_Waters/TextIDs"] = nil; ----------------------------------- - +require("scripts/globals/missions"); require("scripts/globals/settings"); require("scripts/globals/titles"); require("scripts/globals/keyitems"); @@ -60,11 +60,24 @@ local needZone = player:needToZone(); local realday = tonumber(os.date("%j")); -- %M for next minute, %j for next day local waking_dreams = player:getQuestStatus(WINDURST,WAKING_DREAMS) - if(player:getCurrentMission(COP) == THREE_PATHS and player:getVar("COP_Ulmia_s_Path") == 3)then + + -- Awakening of the Gods -- + if(player:getCurrentMission(WINDURST) == AWAKENING_OF_THE_GODS and player:getVar("MissionStatus") == 0) then + player:startEvent(0x02E1); + elseif(player:getCurrentMission(WINDURST) == AWAKENING_OF_THE_GODS and player:getVar("MissionStatus") == 1) then + player:startEvent(0x02E0); + elseif(player:getCurrentMission(WINDURST) == AWAKENING_OF_THE_GODS and player:getVar("MissionStatus") == 2) then + player:startEvent(0x02E2); + + -- Three Paths -- + elseif(player:getCurrentMission(COP) == THREE_PATHS and player:getVar("COP_Ulmia_s_Path") == 3)then player:startEvent(0x036c); + + -- Waking Dreams -- elseif(player:hasKeyItem(VIAL_OF_DREAM_INCENSE)==false and ((player:hasCompletedMission(COP,DARKNESS_NAMED) and waking_dreams == QUEST_AVAILABLE ) or(waking_dreams == QUEST_COMPLETED and realday ~= player:getVar("Darkness_Named_date"))))then player:addQuest(WINDURST,WAKING_DREAMS); player:startEvent(0x0396);--918 + elseif(player:hasKeyItem(WHISPER_OF_DREAMS)==true)then local availRewards = 0 if(player:hasItem(17599)) then availRewards = availRewards + 1; end -- Diabolos's Pole @@ -75,6 +88,8 @@ else availRewards = availRewards + 16 -- Gil end player:startEvent(0x0398,17599,14814,15557,15516,0,0,0,availRewards); + + -- Blue Ribbon Blues -- elseif(BlueRibbonBlues == QUEST_COMPLETED and needZone) then player:startEvent(0x016b);--363 elseif(BlueRibbonBlues == QUEST_ACCEPTED) then @@ -109,7 +124,7 @@ elseif(BlueRibbonBlues == QUEST_AVAILABLE and player:getQuestStatus(WINDURST,WATER_WAY_TO_GO) == QUEST_COMPLETED and player:getFameLevel(WINDURST) >= 5) then player:startEvent(0x0165); - + -- Food for Thought -- elseif(FoodForThought == QUEST_AVAILABLE) then if(OhbiruFood == 1 and KerutotoFood ~= 256) then -- Player knows the researchers are hungry and quest not refused player:startEvent(0x0139,0,4371); -- Offered Quest 1 (Including Order ifYES) @@ -126,6 +141,7 @@ end elseif(FoodForThought == QUEST_COMPLETED and needZone) then player:startEvent(0x0130); -- NPC is sleeping but feels full (post Food for Thought) + else player:startEvent(0x0132); -- Standard Conversation end @@ -240,17 +256,9 @@ elseif ( option ~= 5 and (( item == 0 and addspell==0 ) or (item > 0 and player:getFreeSlotsCount()==0) ) )then player:messageSpecial(ITEM_CANNOT_BE_OBTAINED,item); end - + elseif(csid == 0x02E0) then + player:setVar("MissionStatus",2); end -end; - - - - - - - - - \ No newline at end of file +end; \ No newline at end of file Index: scripts/zones/Windurst_Waters/npcs/Leepe-Hoppe.lua =================================================================== --- scripts/zones/Windurst_Waters/npcs/Leepe-Hoppe.lua (revision 4080) +++ scripts/zones/Windurst_Waters/npcs/Leepe-Hoppe.lua (working copy) @@ -1,7 +1,7 @@ ----------------------------------- -- Area: Windurst Waters -- NPC: Leepe-Hoppe --- Involved in Mission 1-3 +-- Involved in Mission 1-3, Mission 7-2 -- @pos 13 -9 -197 238 ----------------------------------- package.loaded["scripts/zones/Windurst_Waters/TextIDs"] = nil; @@ -76,7 +76,14 @@ player:startEvent(0x034f,0,1125); -- Yes, this will indefinitely replace his standard dialogue! end --------------------------- - + elseif(player:getCurrentMission(WINDURST) == AWAKENING_OF_THE_GODS and player:getVar("MissionStatus") == 0) then + player:startEvent(0x02DE); + elseif(player:getCurrentMission(WINDURST) == AWAKENING_OF_THE_GODS and player:getVar("MissionStatus") == 1) then + player:startEvent(0x02DF); + elseif(player:getCurrentMission(WINDURST) == AWAKENING_OF_THE_GODS and player:getVar("MissionStatus") == 2) then + player:startEvent(0x02E3); + elseif(player:getCurrentMission(WINDURST) == AWAKENING_OF_THE_GODS and player:getVar("MissionStatus") == 5 and player:hasKeyItem(BOOK_OF_THE_GODS)) then + player:startEvent(0x02E6); else player:startEvent(0x0159); -- Standard Dialogue? end @@ -192,6 +199,10 @@ elseif(csid == 0x0350) then player:addKeyItem(MOON_BAUBLE); player:messageSpecial(KEYITEM_OBTAINED,MOON_BAUBLE); + elseif(csid == 0x02DE) then + player:setVar("MissionStatus",1); + elseif(csid == 0x02E6) then + finishMissionTimeline(player,3,csid,option); end end; \ No newline at end of file