OSRS Plugin API
    Preparing search index...

    Enumeration ON_GAME_STATE_CHANGED

    Event id for triggering a game state change defined in GameStateTrigger. Calls the OnGameStateChangeCallback

    -- Create a function
    local gameStateChange = function(gameState)
    osrs.print("Game state change to: " .. tostring(gameState))
    end
    -- Subscribe to the function
    osrs.Events.subscribe(gameStateChange, osrs.Events.ON_GAME_STATE_CHANGED)