What about this ?
It is not so beautifull but when you login you move and walk a little bit it should trigger :-)
Lua Code:
local frame_cleu = CreateFrame("FRAME", "remgankframe_cleu");
-- Don't register CLEU here!
frame_cleu:RegisterEvent("ZONE_CHANGED_NEW_AREA")
frame_cleu:RegisterEvent("ZONE_CHANGED")
frame_cleu:SetScript("OnEvent", function(self, event, ...)
print ( prgname .. " : " .. event)
if event == "ZONE_CHANGED_NEW_AREA" or event == "ZONE_CHANGED" then
local _, instanceType = IsInInstance()
if instanceType == "arena" or instanceType == "pvp" or (instanceType == "none" and GetZonePVPInfo() == "combat") then
--- code continues as above
If you login and don't move it doesn't trigger but in this case you want stress the poor programmer :-)
P.s
I have also add the line:
local string_format = string.format
|
to "upvalued" also the declared string_format (local of string.format) function I presume.