Index: scripts/globals/missions.lua =================================================================== --- scripts/globals/missions.lua (revision 4078) +++ scripts/globals/missions.lua (working copy) @@ -91,9 +91,9 @@ MAGICITE = 13; -- ± -- THE_FINAL_SEAL = 14; -- ± -- THE_SHADOW_AWAITS = 15; -- ± -- -FULL_MOON_FOUNTAIN = 16; -SAINTLY_INVITATION = 17; -THE_SIXTH_MINISTRY = 18; +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; @@ -912,7 +912,8 @@ 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)) }; end end Index: scripts/zones/Toraimarai_Canal/mobs/hinge_oil.lua =================================================================== --- scripts/zones/Toraimarai_Canal/mobs/hinge_oil.lua (revision 0) +++ scripts/zones/Toraimarai_Canal/mobs/hinge_oil.lua (working copy) @@ -0,0 +1,36 @@ +----------------------------------- +-- Area: Toraimarai Canal +-- Mob: Hinge Oil +----------------------------------- + +require("scripts/globals/titles"); +require("scripts/globals/status"); +require("scripts/globals/missions"); + +----------------------------------- +-- OnMobInitialise Action +----------------------------------- + +function onMobInitialize(mob) +end; + +----------------------------------- +-- onMobFight Action +----------------------------------- + +function onMobFight(mob,target) +end; + +----------------------------------- +-- onMobDeath +----------------------------------- + +function onMobDeath(mob, killer) +local CurrentMission = killer:getCurrentMission(WINDURST); +local WindyKills = killer:getVar("Windurst_7-1Kills"); + if(CurrentMission == THE_SIXTH_MINISTRY and player:getVar("MissionStatus") == 1) then + if(WindyKills < 4) then + killer:setVar("Windurst_7-1Kills",WindyKills+1); + end + end +end; \ No newline at end of file Index: scripts/zones/Toraimarai_Canal/npcs/_4pc.lua =================================================================== --- scripts/zones/Toraimarai_Canal/npcs/_4pc.lua (revision 0) +++ scripts/zones/Toraimarai_Canal/npcs/_4pc.lua (working copy) @@ -0,0 +1,76 @@ +----------------------------------- +-- Area: Toraimarai Canal +-- NPC: Marble Door +-- Involved In Windurst Mission 7-1 +-- @zone 169 +-- @pos 132 12 -19 169 +----------------------------------- +package.loaded["scripts/zones/Toraimarai_Canal/TextIDs"] = nil; +require("scripts/zones/Toraimarai_Canal/TextIDs"); +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/quests"); +require("scripts/globals/missions"); + + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) +local CurrentMission = player:getCurrentMission(WINDURST); +local MissionStatus = player:getVar("MissionStatus"); +local WindyKills = player:getVar("Windurst_7-1Kills"); + +-- NOTE: MobAction is 25(ACTION_SPAWN) when they're dead/despawned and 16(ACTION_ROAMING) when spawned. +-- Not really sure why but this seems to work. +-- print("HingeOil 1 Action: "..GetMobAction(17469666)); + + if(CurrentMission == THE_SIXTH_MINISTRY and WindyKills == 4) then + if((GetMobAction(17469666) == 25) and + (GetMobAction(17469667) == 25) and + (GetMobAction(17469668) == 25) and + (GetMobAction(17469669) == 25)) then + + GetNPCByID(17469795):openDoor(2.5); + else + player:messageSpecial(3); -- It's sealed shut with incredibly strong magic + end + + end + +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; + + + + Index: scripts/zones/Toraimarai_Canal/npcs/Tome_of_Magic.lua =================================================================== --- scripts/zones/Toraimarai_Canal/npcs/Tome_of_Magic.lua (revision 0) +++ scripts/zones/Toraimarai_Canal/npcs/Tome_of_Magic.lua (working copy) @@ -0,0 +1,68 @@ +----------------------------------- +-- Area: Toraimarai Canal +-- NPC: Tome of Magic ( Needed for Mission ) +-- Involved In Windurst Mission 7-1 +-- @zone 169 +-- @pos 142 13 -13 169 +----------------------------------- +package.loaded["scripts/zones/Toraimarai_Canal/TextIDs"] = nil; +require("scripts/zones/Toraimarai_Canal/TextIDs"); +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/quests"); +require("scripts/globals/missions"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + +local CurrentMission = player:getCurrentMission(WINDURST); +local WindyKills = player:getVar("Windurst_7-1Kills"); +local npcId = npc:getID(); + + if(npcId == 17469825) then + if(CurrentMission == THE_SIXTH_MINISTRY and WindyKills == 4 and MissionStatus == 1) then + player:startEvent(0x0045); + end + + else + local cs = math.random(0x041,0x044); + player:startEvent(cs); + + end +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); + + if (csid == 0x0045) then + player:setVar("MissionStatus",2); + end +end; \ No newline at end of file Index: scripts/zones/Toraimarai_Canal/npcs/Transporter.lua =================================================================== --- scripts/zones/Toraimarai_Canal/npcs/Transporter.lua (revision 0) +++ scripts/zones/Toraimarai_Canal/npcs/Transporter.lua (working copy) @@ -0,0 +1,57 @@ +----------------------------------- +-- Area: Toraimarai Canal +-- NPC: Transporter +-- Involved In Windurst Mission 7-1 +-- @zone 169 +-- @pos 182 11 -60 169 +----------------------------------- +package.loaded["scripts/zones/Toraimarai_Canal/TextIDs"] = nil; +require("scripts/zones/Toraimarai_Canal/TextIDs"); +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/quests"); +require("scripts/globals/missions"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) +player:startEvent(0x0047); +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); + + if(csid == 0x0047 and option == 1) then + player:setPos(0,0,-22,192,242); + end +end; + + + + Index: scripts/zones/Windurst_Waters/npcs/Tosuka-Porika.lua =================================================================== --- scripts/zones/Windurst_Waters/npcs/Tosuka-Porika.lua (revision 4078) +++ scripts/zones/Windurst_Waters/npcs/Tosuka-Porika.lua (working copy) @@ -14,6 +14,7 @@ require("scripts/globals/missions"); require("scripts/globals/quests"); require("scripts/zones/Windurst_Walls/TextIDs"); +require("scripts/globals/keyitems"); ----------------------------------- -- onTrade Action @@ -74,6 +75,13 @@ player:startEvent(0x019c); elseif(chasingStatus == QUEST_ACCEPTED) then player:startEvent(0x0196); -- Add folllow up cutscene + -- Windurst Mission 7-1 -- + elseif(player:getCurrentMission(WINDURST) == THE_SIXTH_MINISTRY and player:getVar("MissionStatus") == 0) then + player:startEvent(0x02cb,0,OPTISTERY_RING); + elseif(player:getCurrentMission(WINDURST) == THE_SIXTH_MINISTRY and player:getVar("MissionStatus") == 1) then + player:startEvent(0x02cc,0,OPTISTERY_RING); + elseif(player:getCurrentMission(WINDURST) == THE_SIXTH_MINISTRY and player:getVar("MissionStatus") == 2) then + player:startEvent(0x02d4); else player:startEvent(0x0172); -- Standard Conversation end @@ -110,6 +118,13 @@ player:addQuest(WINDURST,CHASING_TALES); elseif(csid ==0x036B)then player:setVar("MEMORIES_OF_A_MAIDEN_Status",11); + elseif(csid == 0x02cb) then + player:addKeyItem(OPTISTERY_RING); + player:messageSpecial(KEYITEM_OBTAINED,OPTISTERY_RING); + player:setVar("MissionStatus",1); + elseif(csid == 0x02d4) then + finishMissionTimeline(player,3,csid,option); + player:setVar("Windurst_7-1Kills",0); end end; \ No newline at end of file