Login
Read-only access to the login screen state. Useful from on_login_tick to drive world/channel/character selection automation.
Login Steps
| Step | Meaning |
|---|---|
1 | World / channel select |
2 | Character select |
3 | New character — race / sub-job |
4 | New character — name entry |
Other values may appear during transitions.
Functions
core.login.get_step() -> number | nil
Returns the current login step, or nil if the player is not on the login screen (e.g. already in the field).
lua
function on_login_tick()
local step = core.login.get_step()
if step == 2 then
-- character select is up
end
endcore.login.get_char_count() -> number | nil
Returns the number of characters in the currently selected world's slot list. Only valid during step 2 (character select); returns nil otherwise.
lua
function on_login_tick()
local count = core.login.get_char_count()
if count and count == 0 then
-- empty roster — auto-create flow can take over
end
end