diff --git a/scripts/enum/item.lua b/scripts/enum/item.lua index b53b20b6264..cee2a727c6f 100644 --- a/scripts/enum/item.lua +++ b/scripts/enum/item.lua @@ -396,6 +396,7 @@ xi.item = SET_OF_GIANT_FISH_BONES = 904, WYVERN_SKULL = 905, STARMITE_SHELL = 906, + COLD_BONE = 907, ADAMANTOISE_SHELL = 908, LUMBERING_HORN = 910, RAMPAGING_HORN = 911, @@ -1977,6 +1978,7 @@ xi.item = COPY_OF_REMS_TALE_CHAPTER_10 = 4073, BONANZA_PEARL = 4089, BOWL_OF_GOBLIN_STEW_880 = 4094, + BISMUTH_SHEET = 4095, FIRE_CRYSTAL = 4096, ICE_CRYSTAL = 4097, WIND_CRYSTAL = 4098, @@ -2224,6 +2226,7 @@ xi.item = WILD_PINEAPPLE = 4598, BLACKENED_TOAD = 4599, LUCKY_EGG = 4600, + WARM_EGG = 4602, SCROLL_OF_DIA_EX = 4606, SCROLL_OF_STONE_EX = 4607, SCROLL_OF_CURE_EX = 4608, @@ -5769,6 +5772,7 @@ xi.item = MITHRAN_FISHING_ROD = 17380, CARBON_FISHING_ROD = 17384, LU_SHANGS_FISHING_ROD = 17386, + TARUTARU_FISHING_ROD = 17387, BAMBOO_FISHING_ROD = 17389, YEW_FISHING_ROD = 17390, WILLOW_FISHING_ROD = 17391, diff --git a/scripts/globals/quests.lua b/scripts/globals/quests.lua index cbb004a997f..5a7b07010e5 100644 --- a/scripts/globals/quests.lua +++ b/scripts/globals/quests.lua @@ -337,7 +337,7 @@ xi.quest.id = CRYING_OVER_ONIONS = 76, -- + Converted WILD_CARD = 77, -- + Converted THE_PROMISE = 78, -- + Converted - NOTHING_MATTERS = 79, + NOTHING_MATTERS = 79, -- + Converted TORAIMARAI_TURMOIL = 80, -- + THE_PUPPET_MASTER = 81, -- + Converted CLASS_REUNION = 82, -- + diff --git a/scripts/quests/windurst/Nothing_Matters.lua b/scripts/quests/windurst/Nothing_Matters.lua new file mode 100644 index 00000000000..e0d64b99691 --- /dev/null +++ b/scripts/quests/windurst/Nothing_Matters.lua @@ -0,0 +1,306 @@ +----------------------------------- +-- Nothing Matters +----------------------------------- +-- Log ID: 2, Quest ID: 79 +-- Koru-Moru : !pos -120 -6 124 239 +-- Bonchacha : !gotoid 17756196 +-- Maan-Pokuun : !gotoid 17756195 +-- Yoran-Oran : !pos -110 -14 203 239 +-- Shantotto : !pos 122 -2 112 239 +-- Fuepepe : !pos 161 -2 161 238 +-- Acolyte Hostel : !gotoid 17752275 +----------------------------------- +-- !addquest 2 79 +-- !additem 4602 +-- !additem 907 +----------------------------------- +local windurstWatersID = zones[xi.zone.WINDURST_WATERS] +----------------------------------- + +local quest = Quest:new(xi.quest.log_id.WINDURST, xi.quest.id.windurst.NOTHING_MATTERS) + +quest.reward = +{ + title = xi.title.SEEKER_OF_TRUTH, + gil = 10000 +} + +quest.sections = +{ + { + check = function(player, status, vars) + return status == QUEST_AVAILABLE and + player:hasCompletedQuest(xi.quest.log_id.WINDURST, xi.quest.id.windurst.BLAST_FROM_THE_PAST) and + not xi.quest.getMustZone(player, xi.quest.log_id.WINDURST, xi.quest.id.windurst.NOTHING_MATTERS) and + player:getFameLevel(xi.quest.fame_area.WINDURST) >= 8 + end, + + [xi.zone.WINDURST_WALLS] = + { + ['Koru-Moru'] = + { + onTrigger = function(player, npc) + return quest:event(227):importantOnce() -- start quest non-blocking + end, + }, + + onEventFinish = + { + [227] = function(player, csid, option, npc) + if option == 0 then + quest:begin(player) + end + end + }, + }, + }, + + { + check = function(player, status, vars) + return status == QUEST_ACCEPTED + end, + + [xi.zone.WINDURST_WALLS] = + { + ['Koru-Moru'] = + { + onTrigger = function(player, npc) + local prog = quest:getVar(player, 'Prog') + if prog <= 1 then + return quest:event(228):importantOnce() -- reminder to find an alchemist + elseif + prog == 2 and + player:hasKeyItem(xi.ki.THESIS_ON_ALCHEMY) + then + return quest:progressEvent(237) -- turn in paper, Koru-Moru asks adventurer to find lifeforce and power of death + elseif prog == 3 then + return quest:event(238):importantOnce() -- reminder to find lifeforce and power of death + elseif prog == 4 then + if os.time() > quest:getVar(player, 'Wait') then + return quest:progressEvent(242) -- complete quest + else + return quest:event(241):importantOnce() -- impatient adventurer check before time gate + end + end + end, + + onTrade = function(player, npc, trade) + if + npcUtil.tradeHas(trade, { xi.item.WARM_EGG, xi.item.COLD_BONE }) and + quest:getVar(player, 'Prog') == 3 + then + return quest:progressEvent(239, 0, xi.item.WARM_EGG, xi.item.COLD_BONE) + end + end, + }, + + ['Bonchacha'] = + { + onTrigger = function(player, npc) + if quest:getVar(player, 'Prog') <= 3 then + return quest:event(229):importantOnce() -- optional dialogue pre item turnin + end + end + }, + + ['Maan-Pokuun'] = + { + onTrigger = function(player, npc) + if quest:getVar(player, 'Prog') <= 3 then + return quest:event(230):importantOnce() -- optional dialogue pre item turnin + end + end + }, + + ['Shantotto'] = + { + onTrigger = function(player, npc) + return quest:event(231):importantOnce() -- optional dialogue School of Magic student hint until quest finish + end, + }, + + ['Yoran-Oran'] = + { + onTrigger = function(player, npc) + return quest:event(232):importantOnce() -- optional dialogue until quest finish + end + }, + + onEventFinish = + { + [237] = function(player, csid, option, npc) + player:delKeyItem(xi.ki.THESIS_ON_ALCHEMY) + quest:setVar(player, 'Prog', 3) + end, + + [239] = function(player, csid, option, npc) + quest:setVar(player, 'Prog', 4) + player:confirmTrade() + quest:setVar(player, 'Wait', getMidnight()) + end, + + [242] = function(player, csid, option, npc) + quest:complete(player) + end, + }, + }, + + [xi.zone.WINDURST_WATERS] = + { + ['Fuepepe'] = + { + onTrigger = function(player, npc) + local prog = quest:getVar(player, 'Prog') + if prog == 0 then + return quest:progressEvent(545) -- tells player to find Katzun-Nattzun at the Acolyte Hostel + elseif prog == 1 then + return quest:event(546):importantOnce() -- reminds player to find Katzun-Nattzun at the Acolyte Hostel + end + end + }, + + ['Moreno-Toeno'] = + { + onTrigger = function(player, npc) + if quest:getVar(player, 'Prog') <= 3 then + return quest:event(544):importantOnce() -- optional dialogue pre item turnin + end + end + }, + + ['Pechiru-Mashiru'] = + { + onTrigger = function(player, npc) + if quest:getVar(player, 'Prog') <= 3 then + return quest:event(541):importantOnce() -- optional dialogue pre item turnin + end + end + }, + + ['Door_Acolyte_Hostel'] = + { + onTrigger = function(player, npc) + if quest:getVar(player, 'Prog') == 1 then + if npc:getID() == windurstWatersID.npc.ACOLYTE_HOSTEL_DOOR_OFFSET then + if not quest:isVarBitsSet(player, 'Doors', 1) then -- question set 1 + return quest:progressEvent(804, 0, xi.ki.AIRSHIP_PASS, 500000, 0, 0, 0, 0, xi.ki.THESIS_ON_ALCHEMY) -- airship cost based on Derrick.lua for airship + end + elseif npc:getID() == windurstWatersID.npc.ACOLYTE_HOSTEL_DOOR_OFFSET + 1 then + if not quest:isVarBitsSet(player, 'Doors', 2) then -- question set 2 + return quest:progressEvent(805, 0, 0, xi.item.TARUTARU_FISHING_ROD, xi.item.WILLOW_FISHING_ROD, xi.item.LU_SHANGS_FISHING_ROD, 0, 0, xi.ki.THESIS_ON_ALCHEMY) + end + elseif npc:getID() == windurstWatersID.npc.ACOLYTE_HOSTEL_DOOR_OFFSET + 2 then + if not quest:isVarBitsSet(player, 'Doors', 3) then -- question set 3 + return quest:progressEvent(806, 0, 0, 0, 0, 0, 0, 0, xi.ki.THESIS_ON_ALCHEMY) + end + elseif npc:getID() == windurstWatersID.npc.ACOLYTE_HOSTEL_DOOR_OFFSET + 7 then + if not quest:isVarBitsSet(player, 'Doors', 4) then -- question set 4 + return quest:progressEvent(811, 0, 0, 0, 0, 0, 0, 0, xi.ki.THESIS_ON_ALCHEMY) + end + elseif npc:getID() == windurstWatersID.npc.ACOLYTE_HOSTEL_DOOR_OFFSET + 8 then + if not quest:isVarBitsSet(player, 'Doors', 5) then -- question set 5 + return quest:progressEvent(812, 0, 0, 0, 0, xi.item.CRYSTAL_BASS, 0, 0, xi.ki.THESIS_ON_ALCHEMY) + end + elseif npc:getID() == windurstWatersID.npc.ACOLYTE_HOSTEL_DOOR_OFFSET + 9 then + if not quest:isVarBitsSet(player, 'Doors', 6) then -- question set 6 + return quest:progressEvent(813, 0, xi.item.BAG_OF_HERB_SEEDS, xi.item.CARNATION, xi.item.DEATHBALL, xi.item.MARGUERITE, xi.item.BISMUTH_SHEET, 0, xi.ki.THESIS_ON_ALCHEMY) + end + end + end + end + }, + + ['Door_Acolyte_Hostel_F'] = + { + onTrigger = function(player, npc) + if + quest:getVar(player, 'Prog') == 1 and + quest:isVarBitsSet(player, 'Doors', 1) and + quest:isVarBitsSet(player, 'Doors', 2) and + quest:isVarBitsSet(player, 'Doors', 3) and + quest:isVarBitsSet(player, 'Doors', 4) and + quest:isVarBitsSet(player, 'Doors', 5) and + quest:isVarBitsSet(player, 'Doors', 6) -- check all questions have been answered + then + if quest:getVar(player, 'correctProg') >= 4 then -- check at least 4 correct answers to progress + if quest:getVar(player, 'correctProg') == 6 then -- if player has 6 correct they get additional reward + return quest:progressCutscene(814, 0, 0, 1, 0, 0, 0, 0, xi.ki.THESIS_ON_ALCHEMY) -- additional reward + else -- regular cs for 6 > correctProg >= 4 + return quest:progressCutscene(814, 0, 0, 0, 0, 0, 0, 0, xi.ki.THESIS_ON_ALCHEMY) + end + else -- all questions have been answered but < 4 were correct + for i = 1, 6 do + quest:unsetVarBit(player, 'Doors', i) + end + + quest:setVar(player, 'correctProg', 0) + end + end + end + }, + + onEventFinish = + { + [545] = function(player, csid, option, npc) + quest:setVar(player, 'Prog', 1) + end, + + [804] = function(player, csid, option, npc) + quest:setVarBit(player, 'Doors', 1) + if option == 100 then + quest:setVar(player, 'correctProg', quest:getVar(player, 'correctProg') + 1) + end + end, + + [805] = function(player, csid, option, npc) + quest:setVarBit(player, 'Doors', 2) + if option == 100 then + quest:setVar(player, 'correctProg', quest:getVar(player, 'correctProg') + 1) + end + end, + + [806] = function(player, csid, option, npc) + quest:setVarBit(player, 'Doors', 3) + if option == 100 then + quest:setVar(player, 'correctProg', quest:getVar(player, 'correctProg') + 1) + end + end, + + [811] = function(player, csid, option, npc) + quest:setVarBit(player, 'Doors', 4) + if option == 100 then + quest:setVar(player, 'correctProg', quest:getVar(player, 'correctProg') + 1) + end + end, + + [812] = function(player, csid, option, npc) + quest:setVarBit(player, 'Doors', 5) + if option == 100 then + quest:setVar(player, 'correctProg', quest:getVar(player, 'correctProg') + 1) + end + end, + + [813] = function(player, csid, option, npc) + quest:setVarBit(player, 'Doors', 6) + if option == 100 then + quest:setVar(player, 'correctProg', quest:getVar(player, 'correctProg') + 1) + end + end, + + [814] = function(player, csid, option, npc) + if quest:getVar(player, 'correctProg') == 6 then -- if player answered 6 correctly reward with vile elixir + if npcUtil.giveItem(player, xi.item.VILE_ELIXIR) then + quest:setVar(player, 'Prog', 2) + npcUtil.giveKeyItem(player, xi.ki.THESIS_ON_ALCHEMY) + end + else + quest:setVar(player, 'Prog', 2) + npcUtil.giveKeyItem(player, xi.ki.THESIS_ON_ALCHEMY) + end + end, + }, + } + }, +} + +return quest diff --git a/scripts/zones/Lower_Jeuno/npcs/Derrick.lua b/scripts/zones/Lower_Jeuno/npcs/Derrick.lua index bad7b9456a5..341d56c58c5 100644 --- a/scripts/zones/Lower_Jeuno/npcs/Derrick.lua +++ b/scripts/zones/Lower_Jeuno/npcs/Derrick.lua @@ -21,7 +21,7 @@ end entity.onEventUpdate = function(player, csid, option, npc) if csid == 230 and option == 10 then - if player:delGil(500000) then + if player:delGil(500000) then -- this value is tied to a question in Nothing_Matters.lua player:addKeyItem(xi.ki.AIRSHIP_PASS) player:updateEvent(0, 1) else diff --git a/scripts/zones/Windurst_Waters/DefaultActions.lua b/scripts/zones/Windurst_Waters/DefaultActions.lua index 5698f9d81f9..78d802838c2 100644 --- a/scripts/zones/Windurst_Waters/DefaultActions.lua +++ b/scripts/zones/Windurst_Waters/DefaultActions.lua @@ -1,29 +1,31 @@ --- local ID = zones[xi.zone.WINDURST_WATERS] +local ID = zones[xi.zone.WINDURST_WATERS] return { - ['Akkeke'] = { event = 427 }, - ['Chomoro-Kyotoro'] = { event = 432 }, - ['Cochal-Monchal'] = { event = 696 }, - ['Foi-Mui'] = { event = 430 }, - ['Fuepepe'] = { event = 423 }, - ['Furakku-Norakku'] = { event = 371 }, - ['Gantineux'] = { event = 10018 }, - ['Hariga-Origa'] = { event = 372 }, - ['Kerutoto'] = { event = 306 }, - ['Kirarara'] = { event = 425 }, - ['Koko_Lihzeh'] = { event = 428 }, - ['Leepe-Hoppe'] = { event = 345 }, - ['Library_book1'] = { event = 367 }, - ['Library_book2'] = { event = 368 }, - ['Mashuu-Ajuu'] = { event = 429 }, - ['Mimomo'] = { event = 436 }, - ['Ohbiru-Dohbiru'] = { event = 344 }, - ['Orn'] = { event = 652 }, - ['Paku-Nakku'] = { event = 431 }, - ['Pechiru-Mashiru'] = { event = 421 }, - ['Rukuku'] = { event = 426 }, - ['Sahgi_Konchumih'] = { event = 596 }, - ['Serukoko'] = { event = 373 }, - ['Sohdede'] = { event = 374 }, - ['Tauwawa'] = { event = 424 }, + ['Akkeke'] = { event = 427 }, + ['Chomoro-Kyotoro'] = { event = 432 }, + ['Cochal-Monchal'] = { event = 696 }, + ['Foi-Mui'] = { event = 430 }, + ['Fuepepe'] = { event = 423 }, + ['Furakku-Norakku'] = { event = 371 }, + ['Gantineux'] = { event = 10018 }, + ['Hariga-Origa'] = { event = 372 }, + ['Kerutoto'] = { event = 306 }, + ['Kirarara'] = { event = 425 }, + ['Koko_Lihzeh'] = { event = 428 }, + ['Leepe-Hoppe'] = { event = 345 }, + ['Library_book1'] = { event = 367 }, + ['Library_book2'] = { event = 368 }, + ['Mashuu-Ajuu'] = { event = 429 }, + ['Mimomo'] = { event = 436 }, + ['Ohbiru-Dohbiru'] = { event = 344 }, + ['Orn'] = { event = 652 }, + ['Paku-Nakku'] = { event = 431 }, + ['Pechiru-Mashiru'] = { event = 421 }, + ['Rukuku'] = { event = 426 }, + ['Sahgi_Konchumih'] = { event = 596 }, + ['Serukoko'] = { event = 373 }, + ['Sohdede'] = { event = 374 }, + ['Tauwawa'] = { event = 424 }, + ['Door_Acolyte_Hostel'] = { messageSpecial = ID.text.FIRMLY_SHUT }, + ['Door_Acolyte_Hostel_F'] = { messageSpecial = ID.text.KNOCKING }, } diff --git a/scripts/zones/Windurst_Waters/IDs.lua b/scripts/zones/Windurst_Waters/IDs.lua index 6b61140ae83..bf56f2c85d2 100644 --- a/scripts/zones/Windurst_Waters/IDs.lua +++ b/scripts/zones/Windurst_Waters/IDs.lua @@ -53,6 +53,10 @@ zones[xi.zone.WINDURST_WATERS] = JOURILLE_CLOSED_DIALOG = 8962, -- Greetings! I am Jourille, your friendly neighborhood traveling merchant. I would most like to sell you something from Ronfaure right now, but I regret that I am waiting on my next shipment. Please call by later! YOU_SHOW_OFF_THE = 9138, -- You show off the . CONQUEST = 9248, -- You've earned conquest points! + FIRMLY_SHUT = 9601, -- The door is firmly shut... + KNOCKING = 10024, -- ...You try knocking, but there is no response. + HOSTEL_CHEAT = 10029, -- But that was a wong, wong time ago... Wait a minute. You anshered all the queshtions in QUIZ DE VANA'DIEW correctwy. + HOSTEL_PRIZE = 10030, -- You weren't cheat-sheetin' now, were you? Well, no matter. Here's your prize. You earned it. TRICK_OR_TREAT = 10197, -- Trick or treat... THANK_YOU_TREAT = 10198, -- Thank you... And now for your treat... HERE_TAKE_THIS = 10199, -- Here, take this... @@ -80,6 +84,7 @@ zones[xi.zone.WINDURST_WATERS] = [17752103] = 62, -- Ahyeekih }, + ACOLYTE_HOSTEL_DOOR_OFFSET = GetFirstID('Door_Acolyte_Hostel'), LELEROON_GREEN_DOOR = 17752333, }, } diff --git a/sql/npc_list.sql b/sql/npc_list.sql index 8cc4bcccb2b..70db5cfe52b 100644 --- a/sql/npc_list.sql +++ b/sql/npc_list.sql @@ -28570,7 +28570,7 @@ INSERT INTO `npc_list` VALUES (17752281,'Door_Acolyte_Hostel','Door:Acolyte Host INSERT INTO `npc_list` VALUES (17752282,'Door_Acolyte_Hostel','Door:Acolyte Hostel',0,174.987,-2.601,238.860,32769,40,40,0,0,0,0,3,0x0000320000000000000000000000000000000000,0,NULL,0); INSERT INTO `npc_list` VALUES (17752283,'Door_Acolyte_Hostel','Door:Acolyte Hostel',0,174.987,-2.601,230.860,32769,40,40,0,0,0,0,3,0x0000320000000000000000000000000000000000,0,NULL,0); INSERT INTO `npc_list` VALUES (17752284,'Door_Acolyte_Hostel','Door:Acolyte Hostel',0,174.987,-2.601,222.860,32769,40,40,0,0,0,0,3,0x0000320000000000000000000000000000000000,0,NULL,0); -INSERT INTO `npc_list` VALUES (17752285,'Door_Acolyte_Hostel','Door:Acolyte Hostel',0,124.000,-3.000,222.215,32769,40,40,0,0,0,0,3,0x0000320000000000000000000000000000000000,0,NULL,0); +INSERT INTO `npc_list` VALUES (17752285,'Door_Acolyte_Hostel_F','Door:Acolyte Hostel',0,124.000,-3.000,222.215,32769,40,40,0,0,0,0,3,0x0000320000000000000000000000000000000000,0,NULL,0); INSERT INTO `npc_list` VALUES (17752286,'Katzun-Nattzun','Katzun-Nattzun',64,124.000,-2.500,221.215,0,40,40,0,1,0,6,27,0x0100010500100820083008400850006000700000,32,NULL,1); INSERT INTO `npc_list` VALUES (17752287,'Talking_Doll','Talking Doll',253,152.888,-2.500,222.860,0,40,40,0,1,0,6,27,0x0000CA0300000000000000000000000000000000,32,NULL,1); INSERT INTO `npc_list` VALUES (17752288,'Dienger','Dienger',201,-46.448,-5.312,212.384,21,40,40,34,0,0,0,27,0x0000CE0300000000000000000000000000000000,32,NULL,1);