1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-04-20 14:47:45 +00:00
kawari/resources/scripts/opening/OpeningUldah.lua
Joshua Goins 2bf9385079 Load the starting position from the LGB
It turns out (amazingly) that this data exists client-side, I guess because the
server and the client share the same planevent LGB file. So instead of
hardcoding the starting location in each city, it's now literally like retail*

* Except for the fact that we don't support rotation yet, and positions in pop
ranges are probably randomized too. But it's close!
2025-03-28 23:00:32 -04:00

27 lines
650 B
Lua

--- TODO: find a way to hardcode it this way
EVENT_ID = 1245187
--- 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