I made the LUA file and TOC fiel and don't intend to make XML part cuz I will do all of it in LUA but slash cmds don't work. I have been trying to make slash cmds through WoWWiki tutorial.
Here is LUA file:
Code:
SLASH_LAKIBUFFBARS = '/lbb';|||I got something on my mind. Maybe WoW doesn't load the LUA file, only TOC. I've had similar problem before, but it was that WoW didn't load any part of addon.
function SlashCmdList.LAKIBUFFBARS(msg, editbox)
local command, rest = command:match("^(%S*)%s*(.-)$");
if command == 'top' and rest ~= "" then
BuffFrame:ClearAllPoints();
BuffFrame:SetPoint("TOP", "UIParent", "TOP", 0, 0);
elseif command == 'bottom' and rest ~= "" then
BuffFrame:ClearAllPoints();
BuffFrame:SetPoint("BOTTOM", "UIParent", "BOTTOM", 0, 0);
elseif command == 'left' and rest ~= "" then
BuffFrame:ClearAllPoints();
BuffFrame:SetPoint("LEFT", "UIParent", "LEFT", 0, 0);
elseif command == 'right' and rest ~= "" then
BuffFrame:ClearAllPoints();
BuffFrame:SetPoint("RIGHT", "UIParent", "RIGHT", 0, 0);
elseif command == 'bleft' and rest ~= "" then
BuffFrame:ClearAllPoints();
BuffFrame:SetPoint("BOTTOMLEFT", "UIParent", "BOTTOMRIGHT", 0, 0);
elseif command == 'tleft' and rest ~= "" then
BuffFrame:ClearAllPoints();
BuffFrame:SetPoint("TOPLEFT", "UIParent", "TOPLEFT", 0, 0);
elseif command == 'bright' and rest ~= "" then
BuffFrame:ClearAllPoints();
BuffFrame:SetPoint("BOTTOMRIGHT", "UIParent", "BOTTOMRIGHT", 0, 0);
elseif command == 'tright' and rest ~= "" then
BuffFrame:ClearAllPoints();
BuffFrame:SetPoint("TOPRIGHT", "UIParent", "TOPRIGHT", 0, 0);
elseif command == 'center' and rest ~= "" then
BuffFrame:ClearAllPoints();
BuffFrame:SetPoint("CENTER", "UIParent", "CENTER", 0, 0);
elseif command == 'def' and rest ~= "" then
BuffFrame:ClearAllPoints();
BuffFrame:SetPoint("TOPRIGHT", "UIParent", "TOPRIGHT", 0, 0);
elseif command == move and rest ~= "" then
BuffFrame:SetMovable(true);
BuffFrame:SetBorderVisible(true);
elseif command == nomove and rest ~= "" then
BuffFrame:SetMovable(false);
BuffFrame:SetBorderVisible(false);
else
print("Use the following syntax: /lbb position. Valid positions are top, bottom, left, right, tright, tleft, bright, bleft, or you can use /lbb move to start make frame movable and /lbb nomove to stop moving the frame.")
end
end
TOC File:
Code:
## Interface: 30200|||NVM I solved it
## Title: LakiBuffBars
## Version: 1.0
## DefaultState: enabled
## LoadOnDemand: 0
## Notes: Moves buff and debuff bars around your screen with simple slash commands.
LakiBuffBars.lua
No comments:
Post a Comment