Index: scripts/zones/Heavens_Tower/npcs/Chumimi.lua =================================================================== --- scripts/zones/Heavens_Tower/npcs/Chumimi.lua (revision 2561) +++ scripts/zones/Heavens_Tower/npcs/Chumimi.lua (working copy) @@ -27,6 +27,10 @@ if(trade:hasItemQty(1105,1) and trade:getItemCount() == 1) then player:startEvent(0x010F); end + elseif (player:getQuestStatus(WINDURST,THE_ROOT_OF_THE_PROBLEM) == QUEST_ACCEPTED and player:getVar("rootProblem") == 1) then + if(trade:hasItemQty(829,1) and trade:getItemCount() == 1) then + player:startEvent(0x0116); + end end end; @@ -39,6 +43,7 @@ theThreeMagi = player:getQuestStatus(WINDURST,THE_THREE_MAGI); recollections = player:getQuestStatus(WINDURST,RECOLLECTIONS); + rootProblem = player:getQuestStatus(WINDURST,THE_ROOT_OF_THE_PROBLEM); mLvl = player:getMainLvl(); mJob = player:getMainJob(); @@ -53,6 +58,16 @@ player:startEvent(0x010E,0,1105); -- Start Quest "Recollections" elseif(recollections == QUEST_ACCEPTED and player:hasKeyItem(FOE_FINDER_MK_I)) then player:startEvent(0x0113); -- Finish Quest "Recollections" + elseif(rootProblem == QUEST_AVAILABLE and mJob == 4 and mLvl >= 50 and player:needToZone() == false) then + player:startEvent(0x114,0,829); -- Start Quest "The Root of The problem" + elseif(rootProblem == QUEST_ACCEPTED) then + if (player:getVar("rootProblem") == 1) then + player:startEvent(0x115,0,829); + elseif(player:getVar("rootProblem") == 2) then + player:startEvent(0x117); + elseif( player:getVar("rootProblem") == 3) then + player:startEvent(0x119); + end else player:startEvent(0x0103); -- Standard dialog end @@ -118,6 +133,21 @@ player:addFame(WINDURST,WIN_FAME*AF2_FAME); player:completeQuest(WINDURST,RECOLLECTIONS); end + elseif(csid == 0x0114) then + player:addQuest(WINDURST,THE_ROOT_OF_THE_PROBLEM); + player:setVar("rootProblem",1); + elseif(csid == 0x117) then + player:addKeyItem(SLUICE_SURVEYOR_MK_I); + player:messageSpecial(KEYITEM_OBTAINED,SLUICE_SURVEYOR_MK_I); + elseif(csid == 0x119) then + if (player:getFreeSlotsCount() == 0) then + player:messageSpecial(ITEM_CANNOT_BE_OBTAINED); + else + player:completeQuest(WINDURST,THE_ROOT_OF_THE_PROBLEM); + player:messageSpecial(ITEM_OBTAINED,13856); + player:addTitle(PARAGON_OF_BLACK_MAGE_EXCELLENCE); + player:delKeyItem(SLUICE_SURVEYOR_MK_I); + end end end; \ No newline at end of file Index: scripts/zones/Toraimarai_Canal/mobs/magic_sludge.lua =================================================================== --- scripts/zones/Toraimarai_Canal/mobs/magic_sludge.lua (revision 0) +++ scripts/zones/Toraimarai_Canal/mobs/magic_sludge.lua (working copy) @@ -0,0 +1,29 @@ +----------------------------------- +-- Area: Toraimarai Canal +-- NM: Magic Sludge +----------------------------------- + +require("scripts/globals/titles"); +require("scripts/globals/status"); + +----------------------------------- +-- OnMobInitialise Action +----------------------------------- + +function onMobInitialize(mob) +end; + +----------------------------------- +-- onMobFight Action +----------------------------------- + +function onMobFight(mob,target) +end; + +----------------------------------- +-- onMobDeath +----------------------------------- + +function onMobDeath(mob, killer) + killer:setVar("rootProblem",3); +end; \ No newline at end of file Index: scripts/zones/Toraimarai_Canal/npcs/qm10.lua =================================================================== --- scripts/zones/Toraimarai_Canal/npcs/qm10.lua (revision 0) +++ scripts/zones/Toraimarai_Canal/npcs/qm10.lua (working copy) @@ -0,0 +1,67 @@ +----------------------------------- +-- Area: Toraimarai Canal +-- NPC: ??? +-- Involved In Quest: Wild Card +-- @zone 169 // not accurate +-- @pos 220 16 -50 // not accurate +----------------------------------- +package.loaded["scripts/zones/Toraimarai_Canal/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/treasure"); +require("scripts/globals/quests"); +require("scripts/zones/Toraimarai_Canal/TextIDs"); + + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if (player:getVar("rootProblem") == 2) then + if(player:getVar("rootProblemQ2") <= 1) then + if(player:hasStatusEffect(EFFECT_MANAFONT) == true) then + player:startEvent(0x2F); + else + player:startEvent(0x2E); + end + 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); + + if (csid == 0x2F) then + player:setVar("rootProblemQ2",2); + end +end; + + + + Index: scripts/zones/Toraimarai_Canal/npcs/qm11.lua =================================================================== --- scripts/zones/Toraimarai_Canal/npcs/qm11.lua (revision 0) +++ scripts/zones/Toraimarai_Canal/npcs/qm11.lua (working copy) @@ -0,0 +1,66 @@ +----------------------------------- +-- Area: Toraimarai Canal +-- NPC: ??? +-- Involved In Quest: Wild Card +-- @zone 169 // not accurate +-- @pos 220 16 -50 // not accurate +----------------------------------- +package.loaded["scripts/zones/Toraimarai_Canal/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/treasure"); +require("scripts/globals/quests"); +require("scripts/zones/Toraimarai_Canal/TextIDs"); + + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if (player:getVar("rootProblem") == 2) then + if (player:getVar("rootProblemQ1") == 2 and player:getVar("rootProblemQ2") == 2) then + player:startEvent(0x30); + end + elseif(player:getVar("rootProblem") == 3) then + player:startEvent(0x37); + 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 == 0x30 and option ~= 0) then + SpawnMob(17469516,180):updateEnmity(player); + end + +end; + + + + Index: scripts/zones/Toraimarai_Canal/npcs/qm9.lua =================================================================== --- scripts/zones/Toraimarai_Canal/npcs/qm9.lua (revision 0) +++ scripts/zones/Toraimarai_Canal/npcs/qm9.lua (working copy) @@ -0,0 +1,63 @@ +----------------------------------- +-- Area: Toraimarai Canal +-- NPC: ??? +-- Involved In Quest: Wild Card +-- @zone 169 // not accurate +-- @pos 220 16 -50 // not accurate +----------------------------------- +package.loaded["scripts/zones/Toraimarai_Canal/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/settings"); +require("scripts/globals/keyitems"); +require("scripts/globals/treasure"); +require("scripts/globals/quests"); +require("scripts/zones/Toraimarai_Canal/TextIDs"); + + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if (player:getVar("rootProblem") == 2) then + if(player:getVar("rootProblemQ1") <= 1) then + player:startEvent(0x2A); + 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); + + if (csid == 0x2A) then + player:setVar("rootProblemQ1",2); + end +end; + + + + Index: scripts/zones/Windurst_Walls/npcs/Koru-Moru.lua =================================================================== --- scripts/zones/Windurst_Walls/npcs/Koru-Moru.lua (revision 2561) +++ scripts/zones/Windurst_Walls/npcs/Koru-Moru.lua (working copy) @@ -58,6 +58,13 @@ else player:startEvent(0x00e1); -- not the shell end + + elseif(player:getQuestStatus(WINDURST,THE_ROOT_OF_THE_PROBLEM) == QUEST_ACCEPTED) then + if (count == 1 and trade:hasItemQty(829,1)) then + player:startEvent(0x15D); + player:tradeComplete(); + player:setVar("rootProblem",2); + end end @@ -72,6 +79,7 @@ local qStarStruck = player:getQuestStatus(WINDURST,STAR_STRUCK); local blastFromPast = player:getQuestStatus(WINDURST,BLAST_FROM_THE_PAST); local blastProg = player:getVar("BlastFromThePast_Prog"); + rootProblem = player:getQuestStatus(WINDURST,THE_ROOT_OF_THE_PROBLEM); if(blastFromPast == QUEST_AVAILABLE and qStarStruck == QUEST_COMPLETED and player:getQuestStatus(WINDURST,CLASS_REUNION) ~= QUEST_ACCEPTED and player:getFameLevel(WINDURST) >= 3 and player:needToZone() == false) then player:startEvent(0x00d6); @@ -97,6 +105,8 @@ player:startEvent(0x00c5); elseif(qStarStruck == QUEST_COMPLETED) then player:startEvent(0x00d5); + elseif(rootProblem == QUEST_ACCEPTED and player:getVar("rootProblem") == 1) then + player:startEvent(0x015C,0,829); else player:startEvent(0x00c1); end