Hello,
I'm trying the lua from this thread
http://www.wowinterface.com/forums/s...ad.php?t=53501
but only does the script work when i use it ingame everytime i log in.
I tried to make it into an addon with http://addon.bool.no/ but it didn't work.
Hello,
I'm trying the lua from this thread
http://www.wowinterface.com/forums/s...ad.php?t=53501
but only does the script work when i use it ingame everytime i log in.
I tried to make it into an addon with http://addon.bool.no/ but it didn't work.
Someone else can advise better, but the reason it doesn't run from an addon is that it needs to respond to something.
Running it from the chat, or from a macro doesn't need a trigger.
This "might" work as a basis.
https://wow.gamepedia.com/Handling_events#Hello_World - Using Lua example.
Replace the Print line.Code:local frame = CreateFrame("FRAME", "FooAddonFrame"); frame:RegisterEvent("PLAYER_ENTERING_WORLD"); local function eventHandler(self, event, ...) print("Hello World! Hello " .. event); end frame:SetScript("OnEvent", eventHandler);
Fired when the player enters the world, reloads the UI, enters/leaves an instance or battleground, or respawns at a graveyard. Also fires any other time the player sees a loading screen.
If repeating it is an issue, then you could try the PLAYER_LOGIN event instead, only firing at login/reload.
Not tested this myself, and my knowledge is very limited. Going by what i'm reading.
You just need to remove the /script command. Hooking a function like that will automatically call it when the achievement UI is loaded, no need to register events or do anything else.
That website doesn't do much, you can simply do it yourself.
1. Create a folder in your <WOW>/Interface/Addons directory, e.g. named AchievementButtonShield_NoTooltip
2. Create a .toc file with the same name in that directory, e.g. named AchievementButtonShield_NoTooltip.toc
Contents:
Code:## Interface: 70300 ## Title: AchievementButtonShield_NoTooltip code.lua
3. Create the actual addon file, named as mentioned in the .toc file, e.g. code.lua
Contents:
Code:-- This file is loaded from "AchievementButtonShield_NoTooltip.toc" hooksecurefunc("AchievementFrame_LoadUI", function() for _, v in pairs(AchievementFrameAchievementsContainer.buttons) do v.shield:SetScript("OnEnter", nil) end end)