Index: scripts/globals/quests.lua =================================================================== --- scripts/globals/quests.lua (revision 2115) +++ scripts/globals/quests.lua (working copy) @@ -243,14 +243,14 @@ ALL_AT_SEA = 23; THE_ALL_NEW_C_2000 = 24; -- ± -- MIHGO_S_AMIGO = 25; -- + -- -ROCK_RACKETTER = 26; +ROCK_RACKETTER = 26; -- + -- CHOCOBILIOUS = 27; -- + -- TEACHER_S_PET = 28; -- + -- REAP_WHAT_YOU_SOW = 29; -- + -- GLYPH_HANGER = 30; -- + -- THE_FANGED_ONE = 31; -- + -- CURSES_FOILED_AGAIN_1 = 32; -- + -- -CURSES_FOILED_AGAIN_2 = 33; +CURSES_FOILED_AGAIN_2 = 33; -- + -- MANDRAGORA_MAD = 34; -- + -- TO_BEE_OR_NOT_TO_BEE = 35; -- + -- TRUTH_JUSTICE_AND_THE_ONION_WAY = 36; -- + -- @@ -275,7 +275,7 @@ PAYING_LIP_SERVICE = 60; -- + -- THE_AMAZIN_SCORPIO = 61; -- + -- TWINSTONE_BONDING = 62; -- + -- -CURSES_FOILED_A_GOLEM = 63; +CURSES_FOILED_A_GOLEM = 63; -- + -- ACTING_IN_GOOD_FAITH = 64; -- ± -- FLOWER_CHILD = 65; -- ± -- THE_THREE_MAGI = 66; -- ± -- @@ -404,7 +404,7 @@ SHADOWS_OF_THE_DEPARTED = 88; APOCALYPSE_NIGH = 89; LURE_OF_THE_WILDCAT_JEUNO = 90; -THE_ROAD_TO_AHT_URHGAN = 91; +THE_ROAD_TO_AHT_URHGAN = 91; -- + -- CHOCOBO_ON_THE_LOOSE = 92; THE_GOBBIEBAG_PART_VII = 93; -- + -- THE_GOBBIEBAG_PART_VIII = 94; -- + -- @@ -603,4 +603,4 @@ ----------------------------------- -- Abyssea ------------------------------------ \ No newline at end of file +----------------------------------- Index: scripts/zones/Bastok_Markets/npcs/Ardea.lua =================================================================== --- scripts/zones/Bastok_Markets/npcs/Ardea.lua (revision 2015) +++ scripts/zones/Bastok_Markets/npcs/Ardea.lua (working copy) @@ -1,12 +1,17 @@ ----------------------------------- -- Area: Bastok Markets -- NPC: Ardea +-- @zone 235 +-- @pos -198 -6 -69 +-- Involved in quests: Chasing Quotas, Rock Racketeer -- Standard Info NPC ----------------------------------- package.loaded["scripts/zones/Bastok_Markets/TextIDs"] = nil; require("scripts/zones/Bastok_Markets/TextIDs"); +require("scripts/globals/keyitems"); +require("scripts/globals/quests"); ----------------------------------- -- onTrade Action @@ -20,7 +25,18 @@ ----------------------------------- function onTrigger(player,npc) -player:startEvent(0x104); + +RockRacketeer = player:getQuestStatus(WINDURST,ROCK_RACKETTER); + + -- Rock Racketeer + if (RockRacketeer == QUEST_ACCEPTED and player:hasKeyItem(SHARP_GRAY_STONE)) then + player:startEvent(0x0105); + + + -- Standard dialog + else + player:startEvent(0x104); + end end; ----------------------------------- @@ -39,6 +55,17 @@ function onEventFinish(player,csid,option) --printf("CSID: %u",csid); --printf("RESULT: %u",option); + + -- Rock Racketeer + if (csid == 0x0105 and option ~= 1) then + player:delKeyItem(SHARP_GRAY_STONE); + player:addGil(GIL_RATE*10); + player:setVar("rockracketeer_sold",1); + + elseif (csid == 0x0105 and option ~= 2) then + player:setVar("rockracketeer_sold",2); + end + end; Index: scripts/zones/Palborough_Mines/npcs/Mythril_Seam.lua =================================================================== --- scripts/zones/Palborough_Mines/npcs/Mythril_Seam.lua (revision 2015) +++ scripts/zones/Palborough_Mines/npcs/Mythril_Seam.lua (working copy) @@ -2,8 +2,9 @@ -- Area: Palborough Mines -- NPC: Mythril Seam -- Involved In Mission: Journey Abroad +-- Involved in quest: Rock Racketeer -- @zone 143 --- @pos -68 -7 173 +-- @pos -68 -7 173 // Rock Racketeer @pos 210 -32 -63 ----------------------------------- package.loaded["scripts/zones/Palborough_Mines/TextIDs"] = nil; ----------------------------------- @@ -16,24 +17,50 @@ ----------------------------------- function onTrade(player,npc,trade) + +RRvar = player:getVar("rockracketeer_sold"); - if(trade:hasItemQty(605,1) and trade:getItemCount() == 1) then -- Trade Pickaxe + --Rock Racketeer + if (trade:hasItemQty(605,1) and trade:getItemCount() == 1 and RRvar == 5) then if(player:getFreeSlotsCount() >= 1) then rand = math.random(); rand = math.random(); rand = math.random(); if(rand <= 0.47) then -- 47% - player:startEvent(0x002b,12,0,597); + + + player:startEvent(0x0033,12,598); -- Sharp Stone (598) + else + player:startEvent(0x0034,8,598); -- pickaxe breaks + player:tradeComplete(); + end + else - player:startEvent(0x001f,8,0,597); + player:startEvent(0x0035); -- cannot carry any more + end + + -- Standard + elseif(trade:hasItemQty(605,1) and trade:getItemCount() == 1) then -- Trade Pickaxe + if(player:getFreeSlotsCount() >= 1) then + rand = math.random(); + rand = math.random(); + rand = math.random(); + + if(rand <= 0.47) then -- 47% + + + player:startEvent(0x002b,12,0,597); -- chunk of mine gravel (597) + else + player:startEvent(0x001f,8,0,597); -- pickaxe breaks player:tradeComplete(); + end + else + player:startEvent(0x0021); -- cannot carry any more end + -- need a pickaxe else - player:startEvent(0x0021); - end - else - player:startEvent(0x0020); + player:startEvent(0x0020); end end; @@ -67,6 +94,13 @@ player:tradeComplete(); player:addItem(597); player:messageSpecial(ITEM_OBTAINED,597); -- Mine Gravel + + -- Rock Racketeer + elseif(csid == 0x0033) then + player:tradeComplete(); + player:addItem(598); + player:messageSpecial(ITEM_OBTAINED,598); -- Sharp Stone + player:setVar("rockracketeer_sold",6); -- Advance quest end end; \ No newline at end of file Index: scripts/zones/Windurst_Woods/npcs/Cha_Lebagta.lua =================================================================== --- scripts/zones/Windurst_Woods/npcs/Cha_Lebagta.lua (revision 2015) +++ scripts/zones/Windurst_Woods/npcs/Cha_Lebagta.lua (working copy) @@ -1,11 +1,10 @@ ----------------------------------- -- Area: Windurst Woods --- NPC: Cha Lebagta +-- NPC: Cha Lebagta -- Type: Standard NPC --- @zone: 241 +-- @zone: 241 -- @pos: 58.385 -6.249 216.670 -- --- Auto-Script: Requires Verification (Verfied by Brawndo) ----------------------------------- package.loaded["scripts/zones/Windurst_Woods/TextIDs"] = nil; ----------------------------------- @@ -22,7 +21,19 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x004e); + + MihgosAmigo = player:getQuestStatus(WINDURST,MIHGO_S_AMIGO); + + -- Mihgo's Amigo + if (MihgosAmigo == QUEST_ACCEPTED) then + player:startEvent(0x0055,0,498); -- hint dialog + + -- standard dialog + elseif (MihgosAmigo == QUEST_COMPLETED) then + player:startEvent(0x005B) -- new standard dialog after Mihgo's Amigo + else + player:startEvent(0x004e); -- normal dialog + end end; ----------------------------------- Index: scripts/zones/Windurst_Woods/npcs/Nanaa_Mihgo.lua =================================================================== --- scripts/zones/Windurst_Woods/npcs/Nanaa_Mihgo.lua (revision 2015) +++ scripts/zones/Windurst_Woods/npcs/Nanaa_Mihgo.lua (working copy) @@ -1,10 +1,11 @@ ----------------------------------- -- Area: Windurst Walls -- NPC: Nanaa Mihgo --- Starts and Finishes Quest: Mihgo's Amigo (R), The Tenshodo Showdown (start) +-- Starts and Finishes Quest: Mihgo's Amigo (R), The Tenshodo Showdown (start), Rock Racketeer (start, listed as ROCK_RACKETTER in quests.lua) -- Involved In Quest: Crying Over Onions -- Involved in Mission 2-1 --- @pos 62 -4 240 241 +-- @zone 241 +-- @pos 62 -4 240 ----------------------------------- package.loaded["scripts/zones/Windurst_Woods/TextIDs"] = nil; ----------------------------------- @@ -58,6 +59,8 @@ MihgosAmigo = player:getQuestStatus(WINDURST,MIHGO_S_AMIGO); theTenshodoShowdown = player:getQuestStatus(WINDURST,THE_TENSHODO_SHOWDOWN); theTenshodoShowdownCS = player:getVar("theTenshodoShowdownCS"); + RockRacketeer = player:getQuestStatus(WINDURST,ROCK_RACKETTER); + RRvar = player:getVar("rockracketeer_sold"); LvL = player:getMainLvl(); Job = player:getMainJob(); @@ -68,9 +71,24 @@ if(CryingOverOnionsVar == 1) then player:startEvent(0x0256); + -- Rock Racketeer (listed as ROCK_RACKETTER in quests.lua) + elseif(MihgosAmigo == QUEST_COMPLETED and RockRacketeer == QUEST_AVAILABLE and player:getFameLevel (WINDURST) >= 3) then + if(player:needToZone()) then + player:startEvent(0x0059); -- Mihgos Amigo complete text + else + player:startEvent(0x005D); -- quest start + end + elseif(RockRacketeer == QUEST_ACCEPTED and RRvar == 2) then + player:startEvent(0x005F); -- not sold reminder + elseif(RockRacketeer == QUEST_ACCEPTED and RRvar == 1) then + player:startEvent(0x0062); -- advance quest talk to Varun + elseif(RockRacketeer == QUEST_ACCEPTED) then + player:startEvent(0x005E); -- quest reminder + + -- Quest "Mihgo's Amigo" elseif(MihgosAmigo == QUEST_AVAILABLE) then - player:getQuestStatus(WINDURST,CRYING_OVER_ONIONS); + CryingOverOnions = player:getQuestStatus(WINDURST,CRYING_OVER_ONIONS); if(CryingOverOnions ~= QUEST_AVAILABLE) then player:startEvent(0x0051); -- Start Quest "Mihgo's Amigo" with quest "Crying Over Onions" Activated @@ -90,9 +108,13 @@ elseif(theTenshodoShowdownCS >= 2) then player:startEvent(0x01f2); -- During Quest "The Tenshodo Showdown" (after cs at tensho HQ) elseif(Job == 6 and LvL < 50 and theTenshodoShowdown == QUEST_COMPLETED) then - player:startEvent(0x01f0); -- Standard dialog after "The Tenshodo Showdown" + player:startEvent(0x01f7); -- Standard dialog after "The Tenshodo Showdown" + + + + -- Standard dialog else - player:startEvent(0x004c); -- Standard dialog + player:startEvent(0x004c); end end @@ -122,7 +144,7 @@ player:addGil(GIL_RATE*200); player:addTitle(CAT_BURGLAR_GROUPIE); player:needToZone(true); - player:addFame(NORG,NORG_FAME*60); + player:addFame(NORG,NORG_FAME*50000); player:completeQuest(WINDURST,MIHGO_S_AMIGO); elseif(csid == 0x01ee) then player:tradeComplete(); @@ -150,6 +172,17 @@ player:delKeyItem(LAPIS_CORAL); player:addKeyItem(HIDEOUT_KEY); player:messageSpecial(KEYITEM_OBTAINED,HIDEOUT_KEY); + + -- Rock Racketeer (listed as ROCK_RACKETTER in quests.lua) + + elseif (csid == 0x005D and option ~=1) then -- add quest, KI + player:addQuest(WINDURST,ROCK_RACKETTER); + player:addKeyItem(SHARP_GRAY_STONE); + player:messageSpecial(KEYITEM_OBTAINED,SHARP_GRAY_STONE); + + elseif (csid == 0x0062) then + player:setVar("rockracketeer_sold",3); -- Rock sold talk to Varun + end end; \ No newline at end of file Index: scripts/zones/Windurst_Woods/npcs/Varun.lua =================================================================== --- scripts/zones/Windurst_Woods/npcs/Varun.lua (revision 2015) +++ scripts/zones/Windurst_Woods/npcs/Varun.lua (working copy) @@ -8,6 +8,9 @@ -- Auto-Script: Requires Verification (Verfied by Brawndo) ----------------------------------- package.loaded["scripts/zones/Windurst_Woods/TextIDs"] = nil; +require("scripts/zones/Windurst_Woods/TextIDs"); +require("scripts/globals/settings"); +require("scripts/globals/quests"); ----------------------------------- ----------------------------------- @@ -15,6 +18,17 @@ ----------------------------------- function onTrade(player,npc,trade) + + RRvar = player:getVar("rockracketeer_sold"); + + -- Rock Racketeer + if (RRvar == 6) then + if(trade:hasItemQty(598,1) == true and trade:getItemCount() == 1) then -- Sharp Stone + player:startEvent(0x0066,2100); -- finish quest + end + + + end end; ----------------------------------- @@ -22,7 +36,19 @@ ----------------------------------- function onTrigger(player,npc) - player:startEvent(0x01b0); + + RRvar = player:getVar("rockracketeer_sold"); + + -- Rock Racketeer + if(RockRacketeer == QUEST_ACCEPTED and RRvar == 3) then + player:startEvent(0x0064); -- talk about lost stone + elseif(RockRacketeer == QUEST_ACCEPTED and RRvar == 4) then + player:startEvent(0x0065,0,598); -- send player to Palborough Mines + + -- standard dialog + else + player:startEvent(0x01b0); + end end; ----------------------------------- @@ -41,5 +67,19 @@ function onEventFinish(player,csid,option) -- printf("CSID: %u",csid); -- printf("RESULT: %u",option); + + -- Rock Racketeer + if(csid == 0x0064) then + player:setVar("rockracketeer_sold",4); + elseif(csid == 0x0065) then + player:setVar("rockracketeer_sold",5); + elseif(csid == 0x0066) then + player:tradeComplete(); + player:addFame(WINDURST,WIN_FAME*30); + player:addGil(GIL_RATE*2100); + player:completeQuest(WINDURST,ROCK_RACKETTER); + player:setVar("rockracketeer_sold",0); -- finish cleanup of vars + + end end;