Index: scripts/zones/Bastok_Markets/npcs/Offa.lua =================================================================== --- scripts/zones/Bastok_Markets/npcs/Offa.lua (revision 3100) +++ scripts/zones/Bastok_Markets/npcs/Offa.lua (working copy) @@ -23,7 +23,12 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x007c); + SmokeOnTheMountain = player:getQuestStatus(BASTOK,SMOKE_ON_THE_MOUNTAIN); + if (SmokeOnTheMountain == QUEST_ACCEPTED) then + player:startEvent(0x00de); + else + player:startEvent(0x007c); + end end; ----------------------------------- Index: scripts/zones/Metalworks/npcs/Hungry_Wolf.lua =================================================================== --- scripts/zones/Metalworks/npcs/Hungry_Wolf.lua (revision 3100) +++ scripts/zones/Metalworks/npcs/Hungry_Wolf.lua (working copy) @@ -6,6 +6,7 @@ -- @pos: -25.861 -11 -30.172 -- -- Auto-Script: Requires Verification (Verified by Brawndo) +-- Updated for "Smoke on the Mountain" by EccentricAnata 03.22.13 ----------------------------------- package.loaded["scripts/zones/Metalworks/TextIDs"] = nil; @@ -16,6 +17,13 @@ ----------------------------------- function onTrade(player,npc,trade) +-- + if(player:getQuestStatus(BASTOK,SMOKE_ON_THE_MOUNTAIN) ~= QUEST_AVAILABLE) then + if(trade:hasItemQty(4395,1) and trade:getItemCount() == 1) then + player:startEvent(0x01ad); + end + end +--]] end; ----------------------------------- @@ -23,7 +31,14 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x01a5); + + SmokeOnTheMountain = player:getQuestStatus(BASTOK,SMOKE_ON_THE_MOUNTAIN); + + if (SmokeOnTheMountain == QUEST_AVAILABLE) then + player:startEvent(0x01ac); + else + player:startEvent(0x01a5); + end end; ----------------------------------- @@ -42,5 +57,18 @@ function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); + if(csid == 0x01ac) then + player:addQuest(BASTOK,SMOKE_ON_THE_MOUNTAIN); + elseif(csid == 0x01ad) then + player:tradeComplete(); + player:addGil(GIL_RATE*300) + player:messageSpecial(GIL_OBTAINED,GIL_RATE*300); + if(player:getQuestStatus(BASTOK,SMOKE_ON_THE_MOUNTAIN) == QUEST_ACCEPTED) then + player:addFame(BASTOK,BAS_FAME*30); + player:completeQuest(BASTOK,SMOKE_ON_THE_MOUNTAIN); + else + player:addFame(BASTOK,BAS_FAME*5); + end + end end; Index: scripts/zones/South_Gustaberg/npcs/qm2.lua =================================================================== --- scripts/zones/South_Gustaberg/npcs/qm2.lua (revision 0) +++ scripts/zones/South_Gustaberg/npcs/qm2.lua (working copy) @@ -0,0 +1,84 @@ +----------------------------------- +-- Area: South Gustaberg +-- NPC: ??? +-- Involved in Quest: Smoke on the Mountain +----------------------------------- + +package.loaded["scripts/zones/South_Gustaberg/TextIDs"] = nil; +require("scripts/zones/South_Gustaberg/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + SmokeOnTheMountain = player:getQuestStatus(BASTOK,SMOKE_ON_THE_MOUNTAIN); + + if(SmokeOnTheMountain == QUEST_ACCEPTED) then + if(trade:hasItemQty(4372,1) and trade:getItemCount() == 1) then + --player trades sheep meat + if (player:getVar("SGusta_Sausage_Timer") == 0) then + player:messageSpecial(FIRE_PUT, 4372); + player:tradeComplete() + player:setVar("SGusta_Sausage_Timer", os.time() + (57*60) + 37) + player:needToZone(true) + --message given if sheep meat is already on the fire + else + player:messageSpecial(MEAT_ALREADY_PUT, 4372) + end + end + end + + +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + if (player:needToZone() == false) then + player:setVar("SGusta_Sausage_Timer", 0) + end + + SmokeOnTheMountain = player:getQuestStatus(BASTOK,SMOKE_ON_THE_MOUNTAIN); + local sausageTimer = player:getVar("SGusta_Sausage_Timer") + + if (SmokeOnTheMountain == QUEST_ACCEPTED and sausageTimer ~= 0) then + + if (sausageTimer - os.time() < 0) then + player:setVar("SGusta_Sausage_Timer", 0) + player:messageSpecial(FIRE_TAKE, 4395); + player:addItem(4395) + + elseif (sausageTimer - os.time() > 0) then + player:messageSpecial(FIRE_LONGER, 4372) + + end + + elseif (SmokeOnTheMountain == QUEST_ACCEPTED and sausageTimer == 0) then + player:messageSpecial(FIRE_GOOD) + + else + player:messageSpecial(NOTHING_OUT_OF_ORDINARY); + 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); +end; \ No newline at end of file Index: scripts/zones/South_Gustaberg/TextIDs.lua =================================================================== --- scripts/zones/South_Gustaberg/TextIDs.lua (revision 3100) +++ scripts/zones/South_Gustaberg/TextIDs.lua (working copy) @@ -8,10 +8,11 @@ FISHING_MESSAGE_OFFSET = 7156; -- You can't fish here -- Standard Text - FIRE_GOOD = 7321; -- The fire seems to be good enough for cooking. - FIRE_PUT = 7322; -- You put on the fire. - FIRE_TAKE = 7323; -- You take off the fire. -FIRE_LONGER = 7324; -- It may take a little while more to cook the . + FIRE_GOOD = 7321; -- The fire seems to be good enough for cooking. + FIRE_PUT = 7322; -- You put on the fire. + FIRE_TAKE = 7323; -- You take off the fire. + FIRE_LONGER = 7324; -- It may take a little while more to cook the . +MEAT_ALREADY_PUT = 7325; -- The is already in the fire. -- Other dialog NOTHING_OUT_OF_ORDINARY = 7421; -- There is nothing out of the ordinary here. \ No newline at end of file