mirror of
https://github.com/redstrate/Kawari.git
synced 2025-06-30 03:37:45 +00:00
Partially implement more actors (#59)
- Summoning bell now tells you you're not authorized - Armoire shows prompt but "remove items" option softlocks - Crystal Bell cutscenes work slightly better but still default to not authorized - Bed now plays cutscenes with proper fade to black, and dreamfitting works when forced in onTalk
This commit is contained in:
parent
d612a95be9
commit
1a5f80482f
10 changed files with 99 additions and 15 deletions
|
@ -291,7 +291,9 @@ registerEvent(721028, "tosort/UnendingJourney.lua")
|
|||
registerEvent(721044, "tosort/CrystalBell.lua")
|
||||
registerEvent(721226, "tosort/Orchestrion.lua")
|
||||
registerEvent(721347, "tosort/GlamourDresser.lua")
|
||||
registerEvent(721440, "tosort/SummoningBell.lua")
|
||||
registerEvent(720935, "tosort/MarketBoard.lua")
|
||||
registerEvent(720978, "tosort/Armoire.lua")
|
||||
registerEvent(1179657, "tosort/Chocobokeep.lua") -- Chocobokeep in Central Shroud
|
||||
registerEvent(1245185, "opening/OpeningLimsaLominsa.lua")
|
||||
registerEvent(1245186, "opening/OpeningGridania.lua")
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
--- scene 02 - aetheryte menu
|
||||
--- scene 03 - "you have aethernet access" message and vfx
|
||||
--- scene 100 - "According to the message engraved in the base, special permission is required to use this aetheryte." (Eulmore-specific)
|
||||
--- scene 200 - "The aetheryte has ceased functioning." (Eulmore-specific)
|
||||
|
||||
function onTalk(target, player)
|
||||
--- param has to be 1 for the menu to even show up
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
-- generic warp, use this for most warps that are just a yes/no option
|
||||
|
||||
-- Scene 1000 - despawns player, angles camera upward, softlocks
|
||||
-- Scene 1001 - same as 1000
|
||||
function onTalk(target, player)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, 0)
|
||||
end
|
||||
|
|
|
@ -1,36 +1,54 @@
|
|||
--- TODO: find a way to hardcode it this way
|
||||
EVENT_ID = 720916
|
||||
|
||||
-- Event flags, courtesy of Sapphire
|
||||
-- https://github.com/SapphireServer/Sapphire/blob/bf3368224a00c180cbb7ba413b52395eba58ec0b/src/world/Event/EventDefs.h#L9
|
||||
FADE_OUT = 0x00000002
|
||||
HIDE_UI = 0x00000800
|
||||
HIDE_HOTBAR = 0x2000 -- 8192
|
||||
CONDITION_CUTSCENE = 0x00000400
|
||||
SET_BASE = 0xF8400EFB
|
||||
|
||||
SHOW_MENU = 00000
|
||||
SLEEP_ANIM = 00001
|
||||
LOG_OUT = 00002
|
||||
DREAMFITTING = 00003
|
||||
EXIT_GAME = 00004
|
||||
WAKE_UP_ANIM = 00100
|
||||
|
||||
-- TODO: in retail, there is a fade in/out between the prompt and the sleep anim?
|
||||
|
||||
|
||||
function onTalk(target, player)
|
||||
--- prompt the bed menu
|
||||
player:play_scene(target, EVENT_ID, 0, 8192, 0)
|
||||
player:play_scene(target, EVENT_ID, SHOW_MENU, HIDE_HOTBAR, 0)
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
if scene == 0 then -- prompt
|
||||
if scene == SHOW_MENU then -- prompt
|
||||
if results[1] == 1 then
|
||||
-- nothing
|
||||
elseif results[1] == 2 then
|
||||
-- dreamfitting not implemented
|
||||
elseif results[1] == 3 then
|
||||
-- play sleep animation
|
||||
player:play_scene(player.id, EVENT_ID, 1, 8192, 0)
|
||||
-- Dreamfitting partially implemented. It works completely when played in onTalk, but does not trigger in onReturn. Unsure why.
|
||||
player:play_scene(player.id, EVENT_ID, DREAMFITTING, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, 0)
|
||||
elseif results[1] == 3 then -- log out
|
||||
player:play_scene(player.id, EVENT_ID, SLEEP_ANIM, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, 0)
|
||||
player:begin_log_out()
|
||||
return
|
||||
elseif results[1] == 4 then
|
||||
-- play sleep animation
|
||||
player:play_scene(player.id, EVENT_ID, 1, 8192, 0)
|
||||
elseif results[1] == 4 then -- exit game
|
||||
player:play_scene(player.id, EVENT_ID, SLEEP_ANIM, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, 0)
|
||||
player:begin_log_out()
|
||||
return
|
||||
end
|
||||
|
||||
player:finish_event(EVENT_ID)
|
||||
elseif scene == 1 then -- sleep anim
|
||||
elseif scene == SLEEP_ANIM then
|
||||
-- play log out scene
|
||||
player:play_scene(player.id, EVENT_ID, 2, 8192, 0)
|
||||
elseif scene == 2 then -- log out
|
||||
player:play_scene(player.id, EVENT_ID, LOG_OUT, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, 0)
|
||||
elseif scene == LOG_OUT then
|
||||
player:finish_event(EVENT_ID)
|
||||
elseif scene == DREAMFITTING then
|
||||
player:play_scene(player.id, EVENT_ID, WAKE_UP_ANIM, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, 0)
|
||||
elseif scene == WAKE_UP_ANIM then -- wake up anim
|
||||
player:finish_event(EVENT_ID)
|
||||
end
|
||||
end
|
||||
|
|
11
resources/scripts/tosort/Armoire.lua
Normal file
11
resources/scripts/tosort/Armoire.lua
Normal file
|
@ -0,0 +1,11 @@
|
|||
-- Internally called CmnDefCabinet:720978
|
||||
|
||||
-- TODO: actually implement this menu, attempting to open the "Remove an item." softlocks for now
|
||||
|
||||
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
|
|
@ -1,10 +1,29 @@
|
|||
-- Internally called CmnDefBeautySalon:721044
|
||||
|
||||
-- Event flags, courtesy of Sapphire
|
||||
-- https://github.com/SapphireServer/Sapphire/blob/bf3368224a00c180cbb7ba413b52395eba58ec0b/src/world/Event/EventDefs.h#L9
|
||||
FADE_OUT = 0x00000002
|
||||
HIDE_UI = 0x00000800
|
||||
HIDE_HOTBAR = 0x2000 -- 8192
|
||||
CONDITION_CUTSCENE = 0x00000400
|
||||
SET_BASE = 0xF8400EFB
|
||||
|
||||
-- TODO: actually implement this menu
|
||||
|
||||
-- Scene 00000: "You are not authorized to summon the aesthetician.", also seems to be the prompt cutscene, but still unsure how to get the prompt to appear
|
||||
-- Scene 00001: Aesthetician appears and speaks, then scene 2 would begin to play, but it probably needs server-side help?
|
||||
-- Scene 00002: Softlocks and does nothing, seems to be where you'd be taken to the makeover menus to actually change your appearance
|
||||
-- Scene 00003: End of using bell where aesthetician has rushed past the player with his scissors animation, then walks off
|
||||
|
||||
function onTalk(target, player)
|
||||
-- you are not authorized to summon the aesthetician
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, 0)
|
||||
player:play_scene(target, EVENT_ID, 00000, HIDE_HOTBAR, 0)
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
if scene == 1 then
|
||||
player:play_scene(player.id, EVENT_ID, 00002, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, 0)
|
||||
elseif scene == 2 then
|
||||
player:play_scene(player.id, EVENT_ID, 00003, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, 0)
|
||||
end
|
||||
player:finish_event(EVENT_ID)
|
||||
end
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
-- Internally called CmnDefPrismBox:721347
|
||||
|
||||
-- TODO: actually implement this menu
|
||||
-- Cutscene 0, flags 247 ("HOW_TO_ID_2", according to Scripter) fades the screen to black for a while, then comes back after closing an invisible dialog box
|
||||
|
||||
function onTalk(target, player)
|
||||
-- You have not yet unlocked the glamour dresser.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
-- Internally called HouFurOrchestrion:721226
|
||||
|
||||
-- Scene 00000 opens the main player
|
||||
-- Scene 00001 opens the playlist editor, but right now, closing it softlocks, and trying to edit anything says you are not authorized to use the estate's orchestrion
|
||||
|
||||
function onTalk(target, player)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, 0)
|
||||
end
|
||||
|
|
20
resources/scripts/tosort/SummoningBell.lua
Normal file
20
resources/scripts/tosort/SummoningBell.lua
Normal file
|
@ -0,0 +1,20 @@
|
|||
-- Internally called CmnDefRetainerBell:721440
|
||||
|
||||
-- TODO: actually implement this menu
|
||||
|
||||
-- Scene 00000 - Unknown, softlocks
|
||||
-- Scene 00001 - Unknown, does nothing right now
|
||||
-- Scene 00002 - Softlocks, but brings up active help for "A Retainer's Many Tasks", so this is probably the bell's menu proper
|
||||
-- Scene 00003 - Unknown, but it's mentioned in Scripter
|
||||
-- Scene 01000 - You have not yet received approval to hire retainers.
|
||||
-- Scene 01001 - You have not yet hired a retainer.
|
||||
-- Scene 01002 - Unknown, does nothing right now
|
||||
-- Scene 01003 - Unknown, does nothing right now
|
||||
|
||||
function onTalk(target, player)
|
||||
player:play_scene(target, EVENT_ID, 01000, 0, 0)
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
player:finish_event(EVENT_ID)
|
||||
end
|
|
@ -1,3 +1,5 @@
|
|||
-- Internally called CmnDefMiniGame:721096
|
||||
|
||||
-- TODO: actually implement this menu
|
||||
|
||||
function onTalk(target, player)
|
||||
|
|
Loading…
Add table
Reference in a new issue