Index: scripts/globals/quests.lua =================================================================== --- scripts/globals/quests.lua (revision 1603) +++ scripts/globals/quests.lua (working copy) @@ -251,7 +251,7 @@ THE_FANGED_ONE = 31; CURSES_FOILED_AGAIN_1 = 32; -- ± -- CURSES_FOILED_AGAIN_2 = 33; -MANDRAGORA_MAD = 34; +MANDRAGORA_MAD = 34; -- ± -- TO_BEE_OR_NOT_TO_BEE = 35; TRUTH_JUSTICE_AND_THE_ONION_WAY = 36; -- + -- MAKING_HEADLINES = 37; -- + -- Index: scripts/zones/Windurst_Walls/npcs/Yoran-Oran.lua =================================================================== --- scripts/zones/Windurst_Walls/npcs/Yoran-Oran.lua (revision 1603) +++ scripts/zones/Windurst_Walls/npcs/Yoran-Oran.lua (working copy) @@ -7,7 +7,11 @@ -- -- Auto-Script: Requires Verification (Verfied by Brawndo) ----------------------------------- +package.loaded["scripts/globals/quests"] = nil; +require("scripts/globals/quests"); +require("scripts/globals/titles"); package.loaded["scripts/zones/Windurst_Walls/TextIDs"] = nil; +require("scripts/zones/Windurst_Walls/TextIDs"); ----------------------------------- ----------------------------------- @@ -15,6 +19,43 @@ ----------------------------------- function onTrade(player,npc,trade) +MandragoraMad = player:getQuestStatus(WINDURST,MANDRAGORA_MAD); + if(MandragoraMad == 1 or MandragoraMad == 2) then + count = trade:getItemCount(); + Cornette = trade:hasItemQty(17344,1); + Sulfur = trade:hasItemQty(934,1); + ThreeLeafBud = trade:hasItemQty(1154,1); + FourLeafBud = trade:hasItemQty(4369,1); + Letter = trade:hasItemQty(1150,1); + if(Cornette == true and count == 1) then + player:tradeComplete(); + player:addFame(WINDURST,WIN_FAME*10); + player:addGil(GIL_RATE*200); + player:startEvent(0xfb,GIL_RATE*200); + elseif(Sulfur == true and count == 1) then + player:tradeComplete(); + player:addFame(WINDURST,WIN_FAME*25); + player:addGil(GIL_RATE*250); + player:startEvent(0xfc,GIL_RATE*250); + elseif(ThreeLeafBud == true and count == 1) then + player:tradeComplete(); + player:addFame(WINDURST,WIN_FAME*50); + player:addGil(GIL_RATE*1200); + player:startEvent(0xfd,GIL_RATE*1200); + elseif(FourLeafBud == true and count == 1) then + player:tradeComplete(); + player:addFame(WINDURST,WIN_FAME*10); + player:addGil(GIL_RATE*120); + player:startEvent(0xfe,GIL_RATE*120); + elseif(Letter == true and count == 1) then + player:tradeComplete(); + player:addFame(WINDURST,WIN_FAME*100); + player:addGil(GIL_RATE*5500); + player:startEvent(0xff,GIL_RATE*5500); + else + player:startEvent(0xfa); + end + end end; ----------------------------------- @@ -22,7 +63,13 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x00f5); + if(MandragoraMad == 0) then + player:startEvent(0xf9); + elseif(MandragoraMad == 1) then + player:startEvent(0x100); + else + player:startEvent(0xf5); + end end; ----------------------------------- @@ -41,5 +88,10 @@ function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); + if(csid == 0xf9) then + player:addQuest(WINDURST,MANDRAGORA_MAD); + elseif(csid == 0xfb or csid == 0xfc or csid == 0xfd or csid == 0xfe or csid == 0xff) then + player:completeQuest(WINDURST,MANDRAGORA_MAD); + end end;