Index: npcs/Answald.lua =================================================================== --- npcs/Answald.lua (revision 3602) +++ npcs/Answald.lua (working copy) @@ -12,7 +12,18 @@ ----------------------------------- function onTrade(player,npc,trade) -end; +if(player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE) ==QUEST_ACCEPTED)then +if(trade:hasItemQty(532,1) and trade:getItemCount() == 1 and player:getVar("tradeAnswald") == 0)then +player:messageSpecial(7121); +player:tradeComplete(); +player:setVar("FFR",player:getVar("FFR") - 1); +player:setVar("tradeAnswald",1); +player:messageSpecial(7122,player:getVar("FFR")); +elseif(player:getVar("tradeAnswald") ==1)then +player:messageSpecial(7120); +end +end +end; ----------------------------------- -- onTrigger Action @@ -38,6 +49,7 @@ function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); + end; Index: npcs/Auvare.lua =================================================================== --- npcs/Auvare.lua (revision 3602) +++ npcs/Auvare.lua (working copy) @@ -12,8 +12,19 @@ ----------------------------------- function onTrade(player,npc,trade) -end; +if(player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE) ==QUEST_ACCEPTED)then +if(trade:hasItemQty(532,1) and trade:getItemCount() == 1 and player:getVar("tradeAuvare") == 0)then +player:messageSpecial(7121); +player:setVar("FFR",player:getVar("FFR") - 1); +player:setVar("tradeAuvare",1); +player:messageSpecial(7122,player:getVar("FFR")); +elseif(player:getVar("tradeAuvare") ==1)then +player:messageSpecial(7120); +end +end +end; + ----------------------------------- -- onTrigger Action ----------------------------------- Index: npcs/Miene.lua =================================================================== --- npcs/Miene.lua (revision 3602) +++ npcs/Miene.lua (working copy) @@ -16,18 +16,18 @@ ----------------------------------- function onTrade(player,npc,trade) --- "Flyers for Regine" conditional script -FlyerForRegine = player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE); +if(player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE) ==QUEST_ACCEPTED)then +if(trade:hasItemQty(532,1) and trade:getItemCount() == 1 and player:getVar("tradeMiene") == 0)then +player:messageSpecial(7121); +player:setVar("FFR",player:getVar("FFR") - 1); +player:setVar("tradeMiene",1); +player:messageSpecial(7122,player:getVar("FFR")); +elseif(player:getVar("tradeMiene") ==1)then +player:messageSpecial(7120); +end +end +end; - if (FlyerForRegine == 1) then - count = trade:getItemCount(); - MagicFlyer = trade:hasItemQty(532,1); - if (MagicFlyer == true and count == 1) then - player:messageSpecial(FLYER_REFUSED); - end - end -end; - ----------------------------------- -- onTrigger Action ----------------------------------- Index: npcs/Portaure.lua =================================================================== --- npcs/Portaure.lua (revision 3602) +++ npcs/Portaure.lua (working copy) @@ -12,8 +12,19 @@ ----------------------------------- function onTrade(player,npc,trade) -end; +if(player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE) ==QUEST_ACCEPTED)then +if(trade:hasItemQty(532,1) and trade:getItemCount() == 1 and player:getVar("tradeAnswald") == 0)then +player:messageSpecial(7121); +player:setVar("FFR",player:getVar("FFR") - 1); +player:setVar("tradeAnswald",1); +player:messageSpecial(7122,player:getVar("FFR")); +elseif(player:getVar("tradeAnswald") ==1)then +player:messageSpecial(7120); +end +end +end; + ----------------------------------- -- onTrigger Action ----------------------------------- Index: npcs/Prietta.lua =================================================================== --- npcs/Prietta.lua (revision 3602) +++ npcs/Prietta.lua (working copy) @@ -12,8 +12,20 @@ ----------------------------------- function onTrade(player,npc,trade) -end; +if(player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE) ==QUEST_ACCEPTED)then +if(trade:hasItemQty(532,1) and trade:getItemCount() == 1 and player:getVar("tradePrietta") == 0)then +player:messageSpecial(7121); +player:setVar("FFR",player:getVar("FFR") - 1); +player:setVar("tradePrietta",1); +player:messageSpecial(7122,player:getVar("FFR")); +elseif(player:getVar("tradePrietta") ==1)then +player:messageSpecial(7120); +end +end +end; + + ----------------------------------- -- onTrigger Action ----------------------------------- Index: npcs/Regine.lua =================================================================== --- npcs/Regine.lua (revision 3602) +++ npcs/Regine.lua (working copy) @@ -16,20 +16,56 @@ function onTrade(player,npc,trade) -- "Flyers for Regine" conditional script - local count = trade:getItemCount(); +if(player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE) == QUEST_ACCEPTED and not(player:hasItem(532)))then +if(trade:getGil() == 100 and trade:getItemCount() == 1)then +player:addItem(532,10); +player:tradeComplete(); +player:messageSpecial(ITEM_OBTAINED,532); +elseif(trade:getGil() == 90 and trade:getItemCount() == 1)then +player:addItem(532,9); +player:tradeComplete(); +player:messageSpecial(ITEM_OBTAINED,532); +elseif(trade:getGil() == 80 and trade:getItemCount() == 1)then +player:addItem(532,8); +player:tradeComplete(); +player:messageSpecial(ITEM_OBTAINED,532); +elseif(trade:getGil() == 70 and trade:getItemCount() == 1)then +player:addItem(532,7); +player:tradeComplete(); +player:messageSpecial(ITEM_OBTAINED,532); +elseif(trade:getGil() == 60 and trade:getItemCount() == 1)then +player:addItem(532,6); +player:tradeComplete(); +player:messageSpecial(ITEM_OBTAINED,532); +elseif(trade:getGil() == 50 and trade:getItemCount() == 1)then +player:addItem(532,5); +player:tradeComplete(); +player:messageSpecial(ITEM_OBTAINED,532); +elseif(trade:getGil() == 40 and trade:getItemCount() == 1)then +player:addItem(532,4); +player:tradeComplete(); +player:messageSpecial(ITEM_OBTAINED,532); +elseif(trade:getGil() == 30 and trade:getItemCount() == 1)then +player:addItem(532,3); +player:tradeComplete(); +player:messageSpecial(ITEM_OBTAINED,532); +elseif(trade:getGil() == 20 and trade:getItemCount() == 1)then +player:addItem(532,2); +player:tradeComplete(); +player:messageSpecial(ITEM_OBTAINED,532); +elseif(trade:getGil() == 10 and trade:getItemCount() == 1)then +player:addItem(532,1); +player:tradeComplete(); +player:messageSpecial(ITEM_OBTAINED,532); +end +elseif (trade:hasItemQty(593,1) == true and count == 1) then + if(player:getQuestStatus(SANDORIA,THE_BRUGAIRE_CONSORTIUM) == 1) then + player:tradeComplete(); + player:startEvent(0x0217); + player:setVar("TheBrugaireConsortium-Parcels", 11); + end +end - if (trade:hasItemQty(532,1) == true and count == 1) then - if (player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE) == QUEST_ACCEPTED) then - player:messageSpecial(FLYER_REFUSED); - end - elseif (trade:hasItemQty(593,1) == true and count == 1) then - if (player:getQuestStatus(SANDORIA,THE_BRUGAIRE_CONSORTIUM) == QUEST_ACCEPTED) then - player:tradeComplete(); - player:startEvent(0x0217); - player:setVar("TheBrugaireConsortium-Parcels", 11); - end - end - end; ----------------------------------- @@ -37,7 +73,18 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x1fe); +if(player:getVar("FFR") ==1)then + player:startEvent(0x1fe,2); +elseif(player:getVar("FFR") ==2)then + player:startEvent(0x25B); + +elseif(player:getVar("FFR") >2 and not(player:hasItem(532)))then + player:startEvent(0x1fe,3); +elseif(player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE) == QUEST_AVAILABLE and player:getVar("FFR") == 0)then +player:startEvent(0x0259); +else +player:startEvent(0x1fe); +end end; ----------------------------------- @@ -54,12 +101,40 @@ ----------------------------------- function onEventFinish(player,csid,option) ---printf("CSID: %u",csid); ---printf("RESULT: %u",option); +printf("CSID: %u",csid); +printf("RESULT: %u",option); - if (csid == 0x1fe) then - if (option == 0) then - stock = {0x1221,1165,1, --Scroll of Diaga + +if(csid == 0x1fe and option == 2) then +player:addQuest(SANDORIA,FLYERS_FOR_REGINE); +player:setVar("FFR",17); +player:addItem(532,12); +player:addItem(532,3); +player:messageSpecial(ITEM_OBTAINED,532); +elseif(csid == 0x025b)then +player:completeQuest(SANDORIA,FLYERS_FOR_REGINE); +player:addGil(GIL_RATE*440) +player:messageSpecial(GIL_OBTAINED,GIL_RATE*440); +player:addTitle(ADVERTISING_EXECUTIVE); +player:setVar("tradeAnswald",0); +player:setVar("tradePrietta",0); +player:setVar("tradeMiene",0); +player:setVar("tradePortaure",0); +player:setVar("tradeAuvare",0); +player:setVar("tradeGuilberdrier",0); +player:setVar("tradeVilion",0); +player:setVar("tradeCapiria",0); +player:setVar("tradeBoncort",0); +player:setVar("tradeCoullene",0); +player:setVar("tradeLeuveret",0); +player:setVar("tradeBlendare",0); +player:setVar("tradeMaugie",0); +player:setVar("tradeAdaunel",0); +player:setVar("tradeRosel",0); + +elseif (csid == 0x1fe) then + if (option == 0) then + stock = {0x1221,1165,1, --Scroll of Diaga 0x1238,837,1, --Scroll of Slow 0x1236,7025,1, --Scroll of Stoneskin @@ -79,7 +154,7 @@ 0x1230,1584,3} --Scroll of Shell showNationShop(player, SANDORIA, stock); - elseif (option == 1) then + elseif (option == 1) then stock = {0x12fe,111,1, --Scroll of Blind 0x12e6,360,2, --Scroll of Bio @@ -100,9 +175,8 @@ 0x12a9,140,3} --Scroll of Water showNationShop(player, SANDORIA, stock); - end end - +end end; Index: npcs/Rugiette.lua =================================================================== --- npcs/Rugiette.lua (revision 3602) +++ npcs/Rugiette.lua (working copy) @@ -1,72 +1,75 @@ ------------------------------------ --- Area: Port San d'Oria --- NPC: Rugiette --- Involved in Quests: Riding on the Clouds, Lure of the Wildcat (San d'Oria) --- @pos 71 -9 -73 232 ------------------------------------ -package.loaded["scripts/zones/Port_San_dOria/TextIDs"] = nil; ------------------------------------ - -require("scripts/globals/keyitems"); -require("scripts/globals/quests"); -require("scripts/zones/Port_San_dOria/TextIDs"); - ------------------------------------ --- onTrade Action ------------------------------------ - -function onTrade(player,npc,trade) - - if(player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE) == QUEST_ACCEPTED) then - if(trade:hasItemQty(532,1) and trade:getItemCount() == 1) then -- Trade Magicmart Flyer - player:messageSpecial(FLYER_REFUSED); - end - end - - if(player:getQuestStatus(JEUNO,RIDING_ON_THE_CLOUDS) == QUEST_ACCEPTED and player:getVar("ridingOnTheClouds_1") == 8) then - if(trade:hasItemQty(1127,1) and trade:getItemCount() == 1) then -- Trade Kindred seal - player:setVar("ridingOnTheClouds_1",0); - player:tradeComplete(); - player:addKeyItem(SCOWLING_STONE); - player:messageSpecial(KEYITEM_OBTAINED,SCOWLING_STONE); - end - end - -end; - ------------------------------------ --- onTrigger Action ------------------------------------ - -function onTrigger(player,npc) - - if(player:getQuestStatus(SANDORIA,LURE_OF_THE_WILDCAT_SAN_D_ORIA) == QUEST_ACCEPTED and player:getMaskBit(player:getVar("wildcatSandy_var"),15) == false) then - player:startEvent(0x02ea); - else - player:startEvent(0x0259); - 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 == 0x02ea) then - player:setMaskBit(player:getVar("wildcatSandy_var"),"wildcatSandy_var",15,true); - end - -end; \ No newline at end of file +----------------------------------- +-- Area: Port San d'Oria +-- NPC: Rugiette +-- Involved in Quests: Riding on the Clouds, Lure of the Wildcat (San d'Oria) +-- @pos 71 -9 -73 232 +----------------------------------- +package.loaded["scripts/zones/Port_San_dOria/TextIDs"] = nil; +----------------------------------- + +require("scripts/globals/keyitems"); +require("scripts/globals/quests"); +require("scripts/zones/Port_San_dOria/TextIDs"); + +----------------------------------- +-- onTrade Action +----------------------------------- + +function onTrade(player,npc,trade) + + if(player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE) == QUEST_ACCEPTED) then + if(trade:hasItemQty(532,1) and trade:getItemCount() == 1) then -- Trade Magicmart Flyer + player:messageSpecial(FLYER_REFUSED); + end + end + + if(player:getQuestStatus(JEUNO,RIDING_ON_THE_CLOUDS) == QUEST_ACCEPTED and player:getVar("ridingOnTheClouds_1") == 8) then + if(trade:hasItemQty(1127,1) and trade:getItemCount() == 1) then -- Trade Kindred seal + player:setVar("ridingOnTheClouds_1",0); + player:tradeComplete(); + player:addKeyItem(SCOWLING_STONE); + player:messageSpecial(KEYITEM_OBTAINED,SCOWLING_STONE); + end + end + +end; + +----------------------------------- +-- onTrigger Action +----------------------------------- + +function onTrigger(player,npc) + +if(player:getQuestStatus(SANDORIA,LURE_OF_THE_WILDCAT_SAN_D_ORIA) == QUEST_ACCEPTED and player:getMaskBit(player:getVar("wildcatSandy_var"),15) == false) then +player:startEvent(0x02ea); +elseif(player:getQuestStatus(SANDORIA,FLYERS_FOR_REGINE) == QUEST_AVAILABLE and player:getVar("FFR") == 0)then +player:startEvent(0x0259); +else +player:startEvent(0x1fe); +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 == 0x02ea) then + player:setMaskBit(player:getVar("wildcatSandy_var"),"wildcatSandy_var",15,true); + elseif(csid == 0x0259)then + player:setVar("FFR",1); + end + end; \ No newline at end of file Index: TextIDs.lua =================================================================== --- TextIDs.lua (revision 3602) +++ TextIDs.lua (working copy) @@ -8,55 +8,57 @@ ITEM_OBTAINED = 6403; -- Obtained: GIL_OBTAINED = 6404; -- Obtained gil KEYITEM_OBTAINED = 6406; -- Obtained key item: - HOMEPOINT_SET = 24; -- Home point set! - FISHING_MESSAGE_OFFSET = 6795; -- You can't fish here + HOMEPOINT_SET = 24; -- Home point set! -ITEM_DELIVERY_DIALOG = 7507; -- Now delivering parcels to rooms everywhere! - - -- Dialogs - FLYER_REFUSED = 7119; -- This person isn't interested. - FLYER_ALREADY = 7120; -- This person already has a flyer. - FLYER_ACCEPTED = 7121; -- Your flyer is accepted! - FLYERS_HANDED = 7122; -- You've handed out flyer(s). + FLYER_REFUSED = 7102; -- This person isn't interested. + FLYER_ALREADY = 7103; -- This person already has a flyer. + FLYER_ACCEPTED = 7104; -- Your flyer is accepted! + FLYERS_HANDED = 7105; -- You've handed out flyer(s). - PORTAURE_DIALOG = 7384; -- What's this? A magic shop? Hmm...I could use a new line of work, and magic just might be the ticket! - ANSWALD_DIALOG = 7404; -- A magic shop? Oh, it's right near here. I'll go check it out sometime. - - PRIETTA_DIALOG = 7428; -- This is the first I've heard of a magic shop here in San d'Oria. Such arts have never been popular in the Kingdom. - - AUVARE_DIALOG = 7435; -- What have I got here? Look, I can't read, but I takes what I gets, and you ain't getting it back! - - MIENE_DIALOG = 7488; -- Oh, a magic shop... Here in San d'Oria? I'd take a look if I got more allowance. + PORTAURE_DIALOG = 7367; -- What's this? A magic shop? Hmm...I could use a new line of work, and magic just might be the ticket! + ANSWALD_DIALOG = 7387; -- A magic shop? Oh, it's right near here. I'll go check it out sometime. + PRIETTA_DIALOG = 7411; -- This is the first I've heard of a magic shop here in San d'Oria. Such arts have never been popular in the Kingdom. + AUVARE_DIALOG = 7418; -- What have I got here? Look, I can't read, but I takes what I gets, and you ain't getting it back! + MIENE_DIALOG = 7471; -- Oh, a magic shop... Here in San d'Oria? I'd take a look if I got more allowance. - ANSWALD_MESSAGE = 7981; -- Answald looks over curiously for a moment. - PRIETTA_MESSAGE = 7982; -- Prietta looks over curiously for a moment. - MIENE_MESSAGE = 7983; -- Miene looks over curiously for a moment. -PORTAURE_MESSAGE = 7984; -- Portaure looks over curiously for a moment. - AUVARE_MESSAGE = 7985; -- Auvare looks over curiously for a moment. + ANSWALD_MESSAGE = 7961; -- Answald looks over curiously for a moment. + PRIETTA_MESSAGE = 7962; -- Prietta looks over curiously for a moment. + MIENE_MESSAGE = 7963; -- Miene looks over curiously for a moment. +PORTAURE_MESSAGE = 7964; -- Portaure looks over curiously for a moment. + AUVARE_MESSAGE = 7965; -- Auvare looks over curiously for a moment. -- Shop Texts - ALBINIE_SHOP_DIALOG = 7448; -- Welcome to my simple shop. + ALBINIE_SHOP_DIALOG = 7431; -- Welcome to my simple shop. + COULLAVE_SHOP_DIALOG = 7477; -- Can I help you? + CROUMANGUE_SHOP_DIALOG = 7478; -- Can't fight on an empty stomach. How about some nourishment? - COULLAVE_SHOP_DIALOG = 7494; -- Can I help you? - CROUMANGUE_SHOP_DIALOG = 7495; -- Can't fight on an empty stomach. How about some nourishment? + VENDAVOQ_OPEN_DIALOG = 7485; -- Vandoolin! Vendavoq vring voods vack vrom Vovalpolos! Vuy! Vuy! + VENDAVOQ_CLOSED_DIALOG = 7486; -- Vandoolin... Vendavoq's vream vo vell voods vrom vometown vf Vovalpolos... - VENDAVOQ_OPEN_DIALOG = 7502; -- Vandoolin! Vendavoq vring voods vack vrom Vovalpolos! Vuy! Vuy! - VENDAVOQ_CLOSED_DIALOG = 7503; -- Vandoolin... Vendavoq's vream vo vell voods vrom vometown vf Vovalpolos... - - FIVA_OPEN_DIALOG = 7496; -- I've got imports from Kolshushu! - MILVA_OPEN_DIALOG = 7497; -- How about some produce from Sarutabaruta? - FIVA_CLOSED_DIALOG = 7498; -- I'm trying to sell goods from Kolshushu. But I can't because we don't have enough influence there. - MILVA_CLOSED_DIALOG = 7499; -- I want to import produce from Sarutabaruta... But I can't do anything until we control that region! - NIMIA_CLOSED_DIALOG = 7500; -- I can't sell goods from the lowlands of Elshimo because it's under foreign control. - PATOLLE_CLOSED_DIALOG = 7501; -- I'm trying to find goods from Kuzotz. But how can I when it's under foreign control? + BONMAURIEUT_OPEN_DIALOG = 7824; -- My shipment is in! Would you like to see what has just arrived from the Elshimo Uplands? + BONMAURIEUT_CLOSED_DIALOG = 7821; -- I would like to sell goods from the Elshimo Uplands, but I cannot, as it's under foreign control. - DEGUERENDARS_OPEN_DIALOG = 7504; -- Welcome! Have a look at these rare goods from Tavnazia! - DEGUERENDARS_CLOSED_DIALOG = 7505; -- With that other nation in control of the region, there is no way for me to import goods from Tavnazia... -DEGUERENDARS_COP_NOT_COMPLETED = 7506; -- Why must I wait for the Kingdom to issue a permit allowing me to set up shop? How am I to feed my children in the meantime!? + MILVA_OPEN_DIALOG = 7480; -- How about some produce from Sarutabaruta? + MILVA_CLOSED_DIALOG = 7482; -- I want to import produce from Sarutabaruta... But I can't do anything until we control that region! - BONMAURIEUT_CLOSED_DIALOG = 7841; -- I would like to sell goods from the Elshimo Uplands, but I cannot, as it's under foreign control. - NIMIA_OPEN_DIALOG = 7842; -- Hello, friend! Can I interest you in specialty goods from the Elshimo Lowlands? - PATOLLE_OPEN_DIALOG = 7843; -- Hey, ≺Multiple Choice (Player Gender)≻[mister/miss]! How about some specialty goods from Kuzotz? - BONMAURIEUT_OPEN_DIALOG = 7844; -- My shipment is in! Would you like to see what has just arrived from the Elshimo Uplands? \ No newline at end of file + FIVA_OPEN_DIALOG = 7479; -- I've got imports from Kolshushu! + FIVA_CLOSED_DIALOG = 7481; -- I'm trying to sell goods from Kolshushu. But I can't because we don't have enough influence there. + + DEGUERENDARS_OPEN_DIALOG = 7487; -- Welcome! Have a look at these rare goods from Tavnazia! + DEGUERENDARS_CLOSED_DIALOG = 7488; -- With that other nation in control of the region, there is no way for me to import goods from Tavnazia... +DEGUERENDARS_COP_NOT_COMPLETED = 7489; -- Why must I wait for the Kingdom to issue a permit allowing me to set up shop? How am I to feed my children in the meantime!? + + PATOLLE_OPEN_DIALOG = 7823; -- Hey, ≺Multiple Choice (Player Gender)≻[mister/miss]! How about some specialty goods from Kuzotz? + PATOLLE_CLOSED_DIALOG = 7484; -- I'm trying to find goods from Kuzotz. But how can I when it's under foreign control? + + NIMIA_OPEN_DIALOG = 7822; -- Hello, friend! Can I interest you in specialty goods from the Elshimo Lowlands? + NIMIA_CLOSED_DIALOG = 7483; -- I can't sell goods from the lowlands of Elshimo because it's under foreign control. + + +-- perdiouvilet - Lure of the Wildcat (San d'Oria) +-- event 22e Vous ne pouvez pas transporter plus de gil + + +