and the addon doesnt do something extraordinary, i dont quite understand why it calls that functions at all...
Code:
RAID_CLASS_COLORS["SHAMAN"] = { r = 0.00, g = 0.86, b = 0.73 };
local function print( msg )
if ( msg ) then
DEFAULT_CHAT_FRAME:AddMessage("|cff00DBBABTweaker: |r"..tostring(msg))
end
end
--Unbindall
function unbindall()
LoadBindings(0)
local a = GetNumBindings()
for i = 1, a do
local b, c = select(2, GetBinding(i)), select(3, GetBinding(i))
SetBinding(tostring(b))
SetBinding(tostring(c))
end
SetBinding("/", "OPENCHATSLASH")
SetBinding(".", "OPENCHATSLASH")
SaveBindings(1)
SaveBindings(2)
print("Unbinding done!")
end
--Macro shizzle
local function remacro()
DeleteMacro("BAL_ALIGN");
CreateMacro("BAL_ALIGN", 46, '/align', nil, 1)
SetBindingMacro("NUMPAD1", "BAL_ALIGN")
DeleteMacro("BAL_DOM1");
CreateMacro("BAL_DOM1", 21, '/dom toggle 4-10', nil, 1)
SetBindingMacro("NUMPAD2", "BAL_DOM1")
DeleteMacro("BAL_SELL****");
CreateMacro("BAL_SELL****", 39, '/script for bag = 0, 4 do for slot = 1, GetContainerNumSlots(bag) do local name = GetContainerItemLink(bag,slot) if name and string.find(name, "ff9d9d9d") then DEFAULT_CHAT_FRAME:AddMessage("Selling "..name) UseContainerItem(bag,slot) end end end', nil, 1)
SetBindingMacro("NUMPAD3", "BAL_SELL****")
DeleteMacro("BAL_NAME");
CreateMacro("BAL_NAME", 56, '/script DEFAULT_CHAT_FRAME:AddMessage(GetMouseFocus():GetName());', nil, 1)
SetBindingMacro("NUMPAD4", "BAL_NAME")
DeleteMacro("BAL_BP");
CreateMacro("BAL_BP", 900, '/bp', nil, 1)
SetBindingMacro("NUMPAD5", "BAL_BP")
DeleteMacro("BAL_FOCUS");
CreateMacro("BAL_FOCUS", 5, '/focus', nil, 1)
SetBindingMacro("`", "BAL_FOCUS")
DeleteMacro("BAL_MARK");
CreateMacro("BAL_MARK", 117, '/target player /script SetRaidTargetIcon("target",1) /target party1 /script SetRaidTargetIcon("target",2) /target party2 /script SetRaidTargetIcon("target",3)', nil, 1)
SetBindingMacro("SHIFT-`", "BAL_MARK")
DeleteMacro("BAL_T1");
CreateMacro("BAL_T1", 1, '/use 13', nil, 1)
SetBindingMacro("SHIFT-1", "BAL_T1")
DeleteMacro("BAL_T2");
CreateMacro("BAL_T2", 1, '/use 14', nil, 1)
SetBindingMacro("SHIFT-2", "BAL_T2")
--Shaman
if (select(2, UnitClass("player")) == "SHAMAN") then
DeleteMacro("BAL_SMN_LHW");
CreateMacro("BAL_SMN_LHW", 818, '/cast [target=mouseover,help,exists] [target=target,help,exists] [target=targettarget,help,exists] [target=player] Lesser Healing Wave', 1, 1)
DeleteMacro("BAL_SMN_HW");
CreateMacro("BAL_SMN_HW", 817, '/cast [target=mouseover,help,exists] [target=target,help,exists] [target=targettarget,help,exists] [target=player] Healing Wave', 1, 1)
DeleteMacro("BAL_SMN_CH");
CreateMacro("BAL_SMN_CH", 819, '/cast [target=mouseover,help,exists] [target=target,help,exists] [target=targettarget,help,exists] [target=player] Chain Heal', 1, 1)
DeleteMacro("BAL_SMN_RPTD");
CreateMacro("BAL_SMN_RPTD", 81, '/cast [target=mouseover,help,exists] [target=target,help,exists] [target=targettarget,help,exists] [target=player] Riptide', 1, 1)
DeleteMacro("BAL_SMN_ES");
CreateMacro("BAL_SMN_ES", 864, '/cast [target=mouseover,help,exists] [target=target,help,exists] [target=targettarget,help,exists] [target=player] Earth Shield', 1, 1)
DeleteMacro("BAL_SMN_SS");
CreateMacro("BAL_SMN_SS", 44, '/castrandom Stormstrike, Lava lash', 1, 1)
DeleteMacro("BAL_SMN_PURGE");
CreateMacro("BAL_SMN_PURGE", 9, '/cast [target=mouseover,harm,exists] [target=target,harm,exists] Purge', 1, 1)
DeleteMacro("BAL_SMN_CLSPI");
CreateMacro("BAL_SMN_CLSPI", 15, '/cast [target=mouseover,help,exists] [target=target,help,exists] [target=player] Cleanse Spirit', 1, 1)
DeleteMacro("BAL_SMN_CLPOI");
CreateMacro("BAL_SMN_CLPOI", 21, '/cast [target=mouseover,help,exists] [target=target,help,exists] [target=player] Cure Poison', 1, 1)
DeleteMacro("BAL_SMN_CLDES");
CreateMacro("BAL_SMN_CLDES", 20, '/cast [target=mouseover,help,exists] [target=target,help,exists] [target=player] Cure Disease', 1, 1)
DeleteMacro("BAL_SMN_TS1");
CreateMacro("BAL_SMN_TS1", 20, '/castsequence reset=20 Flametongue Totem, Mana Spring Totem, Wrath of Air Totem', 1, 1)
DeleteMacro("BAL_SMN_ResT");
CreateMacro("BAL_SMN_ResT", 23, '/cast [modifier:shift] Fire Resistance Totem; [modifier:ctrl] Nature Resistance Totem; Frost Resistance Totem', 1, 1)
end
--Mage
if (select(2, UnitClass("player")) == "MAGE") then
end
print("Rebuilding ur Macros is done!")
end
--Binding shizzle
local function rebind()
--General
SetBinding("W", "MOVEFORWARD")
SetBinding("A", "STRAFELEFT")
SetBinding("S", "MOVEBACKWARD")
SetBinding("D", "STRAFERIGHT")
SetBinding("SPACE", "JUMP")
SetBinding("BUTTON1", "CAMERAORSELECTORMOVE")
SetBinding("BUTTON2", "TURNORACTION")
SetBinding("BUTTON3", "TOGGLEAUTORUN")
SetBinding("MOUSEWHEELUP", "TARGETNEARESTENEMY")
SetBinding("MOUSEWHEELDOWN", "TARGETPREVIOUSENEMY")
SetBinding("ESCAPE", "TOGGLEGAMEMENU")
SetBinding("F5", "TOGGLEQUESTLOG")
SetBinding("F6", "TOGGLEFRIENDSTAB")
SetBinding("F7", "BANKNON_TOGGLE")
SetBinding("F8", "OPENALLBAGS")
SetBinding("F9", "TOGGLECHARACTER0")
SetBinding("F10", "TOGGLESPELLBOOK")
SetBinding("F11", "TOGGLETALENTS")
SetBinding("F12", "TOGGLEWORLDMAP")
SetBinding("ENTER", "OPENCHAT")
SetBinding("/", "OPENCHATSLASH")
SetBinding(".", "OPENCHATSLASH")
SetBindingClick("CTRL-1", "PetActionButton1")
SetBindingClick("CTRL-2", "PetActionButton2")
SetBindingClick("CTRL-3", "PetActionButton3")
SetBindingClick("CTRL-4", "PetActionButton4")
SetBinding("ALT-CTRL-SHIFT-3", "RAIDTARGET1")
SetBinding("ALT-CTRL-SHIFT-4", "RAIDTARGET2")
SetBinding("ALT-CTRL-SHIFT-1", "RAIDTARGET8")
SetBinding("ALT-CTRL-SHIFT-2", "RAIDTARGET7")
SetBinding("INSERT", "CAMERAZOOMIN")
SetBinding("DELETE", "CAMERAZOOMOUT")
SetBinding("END", "SAVEVIEW3")
SetBinding("HOME", "SAVEVIEW2")
SetBinding("PAGEUP", "SETVIEW2")
SetBinding("PAGEDOWN", "SETVIEW3")
SetBinding("NUMPADDIVIDE", "NAMEPLATES")
SetBinding("SHIFT-NUMPADDIVIDE", "ALLNAMEPLATES")
print("Rebuilding ur Bindings is done!")
end
--Slash commands
SlashCmdList["UNBINDALL"] = function() unbindall() end
SLASH_UNBINDALL1 = '/unbindall'
SlashCmdList["REMACRO"] = function() remacro() end
SLASH_REMACRO1 = '/remacro'
SlashCmdList["REBIND"] = function() rebind() end
SLASH_REBIND1 = '/rebind'
-- add slash command for reload ui
SlashCmdList["RELOADUI"] = function() ReloadUI() end
SLASH_RELOADUI1 = '/rl'
--Adding chat's font sizes
CHAT_FONT_HEIGHTS = {
[1] = 7,
[2] = 8,
[3] = 9,
[4] = 10,
[5] = 11,
[6] = 12,
[7] = 13,
[8] = 14,
[9] = 15,
[10] = 16,
[11] = 17,
[12] = 18,
[13] = 19,
[14] = 20,
[15] = 21,
[16] = 22,
[17] = 23,
[18] = 24
}
Thats all it does...