Events / System _ _ NOEDITSECTION _ _ System related events . Fires when an AddOn tries use actions that are always forbidden ( movement , targeting , etc . ) . If called from an AddOn If called from the chat prompt ( / script CastSpellByName ( " Attack " ) ) This event fires whenever an AddOn is loaded ( fires once for each AddOn loaded if multiple AddOns are being loaded ) , whether that is during the inital Loading Phase or when an AddOn is loaded using the LoadAddOn ( " addonname " ) or UIParentLoadAddon ( " addonname " ) function . This event always fires after SavedVariables of the AddOn have been loaded from disk and its OnLoad function has been executed . Fired when a CVar is changed Sent when a macro tries use actions that are always forbidden ( movement , targeting , etc . ) . Fired when the player enters the world , enters / leaves an instance , or respawns at a graveyard . Also fires any other time the player sees a loading screen . To check if the player is entering an instance , check GetPlayerMapPosition to see if both X and Y are zero . Correction on the above comment : When PLAYER _ ENTERING _ WORLD fires , you ' ll notice that WORLD _ MAP _ UPDATE fires just before it . My instincts tell that leaving an instance puts the player in void space momentarily . So for the case that you are entering AND leaving an instance , GetPlayerMapPosition always returns the coordinates < nowiki > [ 0 , 0 ] < / nowiki > and hence there is no way to determine using the event PLAYER _ ENTERING _ WORLD if the player is entering an instance or not . When leaving an instance the following events fire ( ignoring party / raid events ) . Instances do have coordinates for units once the second WORLD _ MAP _ UPDATE event has fired . For the case of entering a battleground such as WSG , WORLD _ MAP _ UPDATE won ' t fire until you leave Silverwing Hold or Warsong Lumber Mill and you are outside . - - Fired when a player logs out and possibly at other situations as well Triggered immediately before PLAYER _ ENTERING _ WORLD on login and UI Reload , but NOT when entering / leaving instances . Note : Player skills such as those available through GetNumSkillLines ( ) and relatives does not appear to be available when this event or PLAYER _ ENTERING _ WORLD fires during an actual player login from character - selection , as all the GetNumSkillLines ( ) - function returns is 0 in those cases . When these events trigger from other reasons , such as zoning , the skill - related functions appear to work normally . Sent when the player logs out or the UI is reloaded , just before SavedVariables are saved . The event fires after PLAYER _ LEAVING _ WORLD . Fired when the player tries to quit , as opposed to logout , while outside an inn . This event does not indicate that the " " player has quit " " , but instead that the " " player has the quitting option " " . The dialog which appears after this event , has choices of " Exit Now " or " Cancel " . The dialog which appears when you try to logout outside an inn , only has a " Cancel " choice , and the event is not fired . Fired when a screenshot fails . Fired when a screenshot is successfully taken . Added in 4 . 0 for the Streaming Launcher Fired when the client received a time played message . Fired when the interface creates an error message . These are the red messages that show in the top middle of the screen . " Your inventory is full . " is one example . Fired when the interface generates a message . These are the yellow messages in the top middle of the window . " No fish are hooked . " is one example . Fired when the keybindings are changed . Fired after completion of LoadBindings ( ) , SaveBindings ( ) , and SetBinding ( ) ( and its derivatives ) . Fired in response to the CVars , Keybindings and other associated " Blizzard " variables being loaded . Since key bindings and macros in particular may be stored on the server they event may be delayed a bit beyond the original loading sequence . Previously ( prior to 3 . 0 . 1 ) the VARIABLES _ LOADED event was part of the loading sequence . Although it still occurs within the same general timeframe as the other events , it no longer has a guaranteed order that can be relied on . This may be problematic to addons that relied on the order of VARIABLES _ LOADED , specifically that it would fire before PLAYER _ ENTERING _ WORLD . Addons should not use this event to check if their addon ' s saved variables have loaded . They can use ADDON _ LOADED ( testing for arg1 being the name of the addon ) or another appropriate event to initialize , ensuring that the addon works when loaded on demand .