|
For learning purposes, I'm implementing slash commands into Auto Repair to toggle the use of guild funds for repair.
The code that is part of this is...
local UseGuild = 1
function ar() if UseGuild == 1 then UseGuild = nil; DEFAULT_CHAT_FRAME:AddMessage("Not using guild repair!",100,50,0); else UseGuild = 1; DEFAULT_CHAT_FRAME:AddMessage("Using guild repair!",100,50,0); end end
SlashCmdList["ar"] = ar() SLASH_ar1, SLASH_ar2 = "/ar", "/autorepair";
RepairAllItems(UseGuild);
I wasn't sure if I should or was allowed to post the whole code but I'd appreciate it if someone could take a look. If I'm allowed to post the whole thing, please say so.
Quixx - 80 DK on Frostwolf
|