I've found a way to reliably detect whether the player is ingame, or on the loading, login, char select or char creation screens.
WORLD_LOADING_STATIC = 0xB9EC04
(int) 0x1 if the game world is loading OR loaded, 0x0 if not
WORLD_LOADED_STATIC = 0xB9D94C
(int) 0x1 if the game world is fully loaded, 0x0 if not
LOGIN_STATE_STATIC = 0x1542100
(string) either 'login', 'charselect', or 'charcreate'
TOON_SELECTED_STATIC = 0xBA94F4
TOON_COUNT_STATIC = 0x15AF9E4
(int) these represent the index of the selected toon on char select, and the number of toons on the account, respectively
Let me know if you have any problems. Plenty more to come.