🚪Login & Logout

Tracks player login and logout events for statistics

The LoginScript and LogoutScript handle player connection tracking, updating character online status and login statistics.

Actions

  • login - Player connects to the game

  • logout - Player disconnects from the game

When They're Used

These scripts are triggered automatically when:

  • Login: A player successfully enters the game with a character

  • Logout: A player disconnects from the game (normal or abnormal)

Why Use Them

  • Track online status to know who's currently playing

  • Login statistics for player activity analysis

  • First/last seen timestamps for player history

  • Online player counts for dashboard displays

  • Activity patterns to understand player behavior

Server Configuration

Login and logout tracking is automatic when RagnaSync is connected. No additional configuration is required.

These scripts are not counted toward usage limits as they are triggered by player connections, not user actions.

Data Tracked

On Login

Field
Description

is_online

Set to true

login_count

Incremented by 1

last_login_at

Current timestamp

first_login_at

Set on first ever login

On Logout

Field
Description

is_online

Set to false

last_logout_at

Current timestamp

Data Fields (Both Scripts)

Field
Type
Description

name

string

Character name

account_id

int

Player's account ID

char_id

int

Player's character ID

Use Cases

Online Player Dashboard

Query characters where is_online = true to show current players.

Activity Reports

Analyze login_count and last_login_at to identify:

  • Active players

  • Returning players

  • Inactive accounts

Player History

Track first login dates to identify new players vs veterans.

Notes

  • Login/logout tracking is automatic when RagnaSync is connected

  • No Discord messages are sent by default (data tracking only)

  • Does not count toward RagnaSync usage limits

  • Data can be used for player activity dashboards and reports

Last updated