1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-06-30 11:47:45 +00:00

Parially implement Gemstone Traders and Hunt currency exchangers (#67)

This commit is contained in:
thedax 2025-06-26 08:04:13 -04:00 committed by GitHub
parent 94e13fa281
commit c5695f5ed7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 67 additions and 0 deletions

View file

@ -265,6 +265,8 @@ to_sort = {
[720898] = "DeliveryMoogle.lua", [720898] = "DeliveryMoogle.lua",
[721096] = "ToyChest.lua", [721096] = "ToyChest.lua",
[721028] = "UnendingJourney.lua", [721028] = "UnendingJourney.lua",
[721044] = "CrystalBell.lua",
[721098] = "HuntBoard.lua",
[721226] = "Orchestrion.lua", [721226] = "Orchestrion.lua",
[721347] = "GlamourDresser.lua", [721347] = "GlamourDresser.lua",
[721440] = "SummoningBell.lua", [721440] = "SummoningBell.lua",
@ -276,6 +278,30 @@ to_sort = {
-- Events in /common that aren't already covered by other tables -- Events in /common that aren't already covered by other tables
common_events = { common_events = {
[720915] = "GenericMender.lua", [720915] = "GenericMender.lua",
[721480] = "GenericGemstoneTrader.lua", -- Generic Shadowbringers in-city gemstone traders
[721479] = "GenericGemstoneTrader.lua", -- Generic Shadowbringers per-zone gemstone traders
-- [721619] = "GenericGemstoneTrader.lua", -- Generic Endwalker & Dawntrail per-zone gemstone traders, but they do nothing when interacted with right now
-- [721620] = "GenericGemstoneTrader.lua", -- Generic Endwalker & Dawntrail in-city gemstone traders, but they do nothing when interacted with right now
}
-- Not all Hunt NPCs are spawning right now, unfortunately.
generic_hunt_exchange = {
1769660, -- Ishgard: Yolaine -> Doman Gear Exchange (DoW, IL 180)
1769661, -- Ishgard: Yolaine -> Doman Gear Exchange (DoM, IL 180)
1769715, -- Ishgard: Yolaine -> Artifact Gear Exchange I (DoW, IL 210)
1769716, -- Ishgard: Yolaine -> Artifact Gear Exchange II (DoW, IL 210)
1769717, -- Ishgard: Yolaine -> Artifact Gear Exchange (DoM, IL 210)
1769783, -- Kugane: Satsuya -> Centurio Seal Exchange II
1769864, -- Kugane: Satsuya -> Ala Mhigan Gear Exchange (DoW, IL 310)
1769865, -- Kugane: Satsuya -> Ala Mhigan Gear Exchange (DoM, IL 310)
1769914, -- Kugane: Satsuya -> Lost Allagan Gear (DoW, IL 340)
1769915, -- Kugane: Satsuya -> Lost Allagan Gear (DoM, IL 340)
1770476, -- Radz-at-Han: Wilmetta -> Sacks of Nuts Exchange
1770619, -- Radz-at-Han: Wilmetta -> Moonward Gear Exchange (DoW, IL 570)
1770620, -- Radz-at-Han: Wilmetta -> Moonward Gear Exchange (DoW, IL 570)
1770704, -- Radz-at-Han: Wilmetta -> Radiant's Gear (DoW, IL 600)
1770705, -- Radz-at-Han: Wilmetta -> Radiant's Gear (DoM, IL 600)
1770761, -- Tuliyollal: Ryubool Ja -> Dawn Hunt Vendor
} }
-- Not custom in the sense of non-SQEX content, just going based off the directory name -- Not custom in the sense of non-SQEX content, just going based off the directory name
@ -317,6 +343,10 @@ for _, event_id in pairs(generic_anetshards) do
registerEvent(event_id, "events/common/GenericAethernetShard.lua") registerEvent(event_id, "events/common/GenericAethernetShard.lua")
end end
for _, event_id in pairs(generic_hunt_exchange) do
registerEvent(event_id, "events/common/GenericHuntCurrencyExchange.lua")
end
for event_id, script_file in pairs(to_sort) do for event_id, script_file in pairs(to_sort) do
registerEvent(event_id, TOSORT_DIR..script_file) registerEvent(event_id, TOSORT_DIR..script_file)
end end

View file

@ -0,0 +1,15 @@
-- TODO: actually implement bicolor gemstones, and present a 'shop' menu (it seems to be different than hunt exchange NPCs)?
--Scene 00000 "Collect bicolor gemstones to trade for a variety of goods" / scene informing the player they can now access the shop
--Scene 00001 softlocks or simply shows a dialog box (depends per vendor), presumably needs shop params sent to it
--Scene 00002 does nothing (for now)
--Scene 00003 "You must progress further through the <expansion name> main scenario in order to access this vendor's wares."
function onTalk(target, player)
-- "You must progress further through the <expansion name> main scenario in order to access this vendor's wares."
player:play_scene(target, EVENT_ID, 00003, 8192, 0)
end
function onReturn(scene, results, player)
player:finish_event(EVENT_ID)
end

View file

@ -0,0 +1,9 @@
-- TODO: actually implement hunt currency and possible opcodes for doing the transactions
function onTalk(target, player)
player:play_scene(target, EVENT_ID, 00000, 8192, 0)
end
function onReturn(scene, results, player)
player:finish_event(EVENT_ID)
end

View file

@ -0,0 +1,13 @@
-- TODO: actually implement this menu
-- Scene 00000 will just say you can't participate or bug out (in the case of ARR hunt boards), and is also the only scene this actor has
function onTalk(target, player)
-- In expansion towns, this will display text such as "The Clan Hunt board is covered in bills showing the details of wanted monsters. However, you are unable to accept any of the bills posted at present."
-- In the ARR capitals it will still open an empty buggy hunt bill list. Presumably they work differently and hide the board entirely when you're unable to participate in The Hunt.
player:play_scene(target, EVENT_ID, 00000, 8192, 0)
end
function onReturn(scene, results, player)
player:finish_event(EVENT_ID)
end