mirror of
https://github.com/redstrate/Kawari.git
synced 2025-06-30 11:47:45 +00:00
Update event scripts to use tables, since passing params now gets dropped into a Vec<u32> on the rust side.
This commit is contained in:
parent
53748c33f0
commit
ee3a7c54bb
22 changed files with 33 additions and 34 deletions
|
@ -11,7 +11,7 @@ SCENE_SHOW_MENU = 00002
|
|||
SCENE_HAVE_AETHERNET_ACCESS = 00003
|
||||
|
||||
function onTalk(target, player)
|
||||
player:play_scene(target, EVENT_ID, SCENE_SHOW_MENU, 8192, 0)
|
||||
player:play_scene(target, EVENT_ID, SCENE_SHOW_MENU, 8192, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -11,8 +11,7 @@ SCENE_SHOW_MENU = 00000
|
|||
SCENE_HAVE_AETHERNET_ACCESS = 00003
|
||||
|
||||
function onTalk(target, player)
|
||||
--- param has to be 1 for the menu to even show up
|
||||
player:play_scene(target, EVENT_ID, SCENE_SHOW_MENU, 8192, 1)
|
||||
player:play_scene(target, EVENT_ID, SCENE_SHOW_MENU, 8192, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
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)
|
||||
player:play_scene(target, EVENT_ID, 00003, 8192, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
-- 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)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
-- TODO: actually implement this menu
|
||||
|
||||
function onTalk(target, player)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, 0)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
-- 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)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -20,7 +20,7 @@ WAKE_UP_ANIM = 00100
|
|||
|
||||
|
||||
function onTalk(target, player)
|
||||
player:play_scene(target, EVENT_ID, SHOW_MENU, HIDE_HOTBAR, 0)
|
||||
player:play_scene(target, EVENT_ID, SHOW_MENU, HIDE_HOTBAR, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
@ -29,13 +29,13 @@ function onReturn(scene, results, player)
|
|||
-- nothing
|
||||
elseif results[1] == 2 then
|
||||
-- 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)
|
||||
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: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 -- exit game
|
||||
player:play_scene(player.id, EVENT_ID, SLEEP_ANIM, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, 0)
|
||||
player:play_scene(player.id, EVENT_ID, SLEEP_ANIM, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, {0})
|
||||
player:begin_log_out()
|
||||
return
|
||||
end
|
||||
|
@ -43,11 +43,11 @@ function onReturn(scene, results, player)
|
|||
player:finish_event(EVENT_ID)
|
||||
elseif scene == SLEEP_ANIM then
|
||||
-- play log out scene
|
||||
player:play_scene(player.id, EVENT_ID, LOG_OUT, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, 0)
|
||||
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)
|
||||
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
|
||||
|
|
|
@ -16,21 +16,21 @@ SET_BASE = 0xF8400EFB
|
|||
-- Scene 00003: End of using bell where aesthetician has rushed past the player with his scissors animation, then walks off
|
||||
|
||||
function onTalk(target, player)
|
||||
player:play_scene(target, EVENT_ID, 00000, HIDE_HOTBAR, 0)
|
||||
player:play_scene(target, EVENT_ID, 00000, HIDE_HOTBAR, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
if scene == 0 then
|
||||
-- results[1] is 1 if you want to summon, otherwise 0
|
||||
if results[1] == 1 then
|
||||
player:play_scene(player.id, EVENT_ID, 00001, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, 0)
|
||||
player:play_scene(player.id, EVENT_ID, 00001, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, {0})
|
||||
return
|
||||
end
|
||||
elseif scene == 1 then
|
||||
player:play_scene(player.id, EVENT_ID, 00002, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, 0)
|
||||
player:play_scene(player.id, EVENT_ID, 00002, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, {0})
|
||||
return
|
||||
elseif scene == 2 then
|
||||
player:play_scene(player.id, EVENT_ID, 00003, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, 0)
|
||||
player:play_scene(player.id, EVENT_ID, 00003, FADE_OUT + HIDE_UI + CONDITION_CUTSCENE, {0})
|
||||
return
|
||||
end
|
||||
player:finish_event(EVENT_ID)
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
POS_START = 2299848
|
||||
|
||||
function Scene00000(player)
|
||||
player:play_scene(EVENT_ID, 00000, 4959237, 1)
|
||||
player:play_scene(EVENT_ID, 00000, 4959237, {0})
|
||||
end
|
||||
|
||||
function Scene00001(player)
|
||||
player:play_scene(EVENT_ID, 00001, 4959237, 1)
|
||||
player:play_scene(EVENT_ID, 00001, 4959237, {0})
|
||||
end
|
||||
|
||||
function onEnterTerritory(player, zone)
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
POS_START = 4101800
|
||||
|
||||
function Scene00000(player)
|
||||
player:play_scene(EVENT_ID, 00000, 4959237, 1)
|
||||
player:play_scene(EVENT_ID, 00000, 4959237, {0})
|
||||
end
|
||||
|
||||
function Scene00001(player)
|
||||
player:play_scene(EVENT_ID, 00001, 4959237, 1)
|
||||
player:play_scene(EVENT_ID, 00001, 4959237, {0})
|
||||
end
|
||||
|
||||
function onEnterTerritory(player, zone)
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
POS_START = 4101669
|
||||
|
||||
function Scene00000(player)
|
||||
player:play_scene(EVENT_ID, 00000, 4959237, 1)
|
||||
player:play_scene(EVENT_ID, 00000, 4959237, {0})
|
||||
end
|
||||
|
||||
function Scene00001(player)
|
||||
player:play_scene(EVENT_ID, 00001, 4959237, 1)
|
||||
player:play_scene(EVENT_ID, 00001, 4959237, {0})
|
||||
end
|
||||
|
||||
function onEnterTerritory(player, zone)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
-- 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)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
function onTalk(target, player)
|
||||
-- unable to hire
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, 0)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
function onTalk(target, player)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, 0)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
function onTalk(target, player)
|
||||
-- You have not yet unlocked the glamour dresser.
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, 0)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
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)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
-- TODO: actually implement this menu; you can open it and push buttons but nothing responds, of course
|
||||
|
||||
function onTalk(target, player)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, 0)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
-- 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)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
-- Scene 01003 - Unknown, does nothing right now
|
||||
|
||||
function onTalk(target, player)
|
||||
player:play_scene(target, EVENT_ID, 01000, 0, 0)
|
||||
player:play_scene(target, EVENT_ID, 01000, 0, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
function onTalk(target, player)
|
||||
-- You have not yet unlocked any mini-games.
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, 0)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
function onTalk(target, player)
|
||||
-- you cannot consult, which is good because we don't know how to implement this anyway
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, 0)
|
||||
player:play_scene(target, EVENT_ID, 00000, 8192, {0})
|
||||
end
|
||||
|
||||
function onReturn(scene, results, player)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
function onTalk(target, player)
|
||||
-- has inn access
|
||||
player:play_scene(target, EVENT_ID, 00001, 8192, 0)
|
||||
player:play_scene(target, EVENT_ID, 00001, 8192, {0})
|
||||
|
||||
-- doesn't have inn access
|
||||
--player:play_scene(actorId, EVENT_ID, 00002, 8192, 0)
|
||||
|
|
Loading…
Add table
Reference in a new issue