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

-Global.lua is no longer a catch-all dumping ground for registering actions and events Instead, Global.lua will actually contain useful global constants and functions -Init.lua will take over the role of being the initial script run when doing reloads or booting the servers -Actions.lua will take over registering all actions -Items.lua will take over registering all items -Commands.lua will take over registering all text commands -Events.lua will take over registering all warps, openings/quests, aetherytes, etc. To this end, event ids now live in organized tables to reduce error-prone copy paste clutter If we get enough actions, items or commands, we can move those to tables too.
24 lines
585 B
Lua
24 lines
585 B
Lua
--- load defines from Opening Excel sheet, which has this and we don't need to hardcode it'
|
|
POS_START = 4101669
|
|
|
|
function Scene00000(player)
|
|
player:play_scene(EVENT_ID, 00000, 4959237, 1)
|
|
end
|
|
|
|
function Scene00001(player)
|
|
player:play_scene(EVENT_ID, 00001, 4959237, 1)
|
|
end
|
|
|
|
function onEnterTerritory(player, zone)
|
|
--- move the player into the starting position
|
|
start_pos = zone:get_pop_range(POS_START)
|
|
player:set_position(start_pos)
|
|
|
|
Scene00000(player);
|
|
end
|
|
|
|
function onSceneFinished(player, scene)
|
|
if scene == 0 then
|
|
Scene00001(player)
|
|
end
|
|
end
|