Hello everyone,
I wish to only print that the addon has been loaded in the chat when the player just had logged in. My current code prints every time the player logs in, /reloadui or changes zone.
As it is right now, it's a bit spammy for my taste. Is it possible to only show the "addon: loaded" message once?
Lua Code:
local addon = ZO_Object:Subclass()
local EM = GetEventManager();
function addon:New()
EM:RegisterForEvent('addon_OnLoad', EVENT_ADD_ON_LOADED, function(...) self:OnLoad(...) end)
EM:RegisterForEvent('addon_OnInit', EVENT_PLAYER_ACTIVATED, function(...) self:OnInit(...) end)
end
function addon:OnLoad(eventCode, addonName)
if ('addon' ~= addonName) then return end
end
function addon:OnInit()
d('addon: loaded')
end
addon:New()