-- Author : adamz
-- Create Date : 5/20/2017 2:16:57 PM
function OnLoad()
Main:Show();
local line = Main:CreateTexture()
line:SetTexture(.6 ,.6, .6, .4)
line:SetSize(170, 1)
line:SetPoint("TOP", 0,-207.5)
end
function MinimapButton_OnClick()
if not Main:IsVisible() then
Main:Show();
else
Main:Hide();
end
end
SLASH_LFGSHOW1 = '/lfg';
function SlashCmdList.LFGSHOW()
Main:Show();
end
-- RAID SETTINGS --
raids = {'Naxxramas','Vault of Archavon','Obsidian Sanctum','Ulduar','The Eye of Eternity','Trial of the Crusader','Onyxia\'s Lair','Icecrown Citadel','Ruby Sanctum'}
raid_values ={'naxx','voa','os','uldu','eoe','toc','onyxia','icc','rs'}
local raid;
local raidSize =10;
local tank =2;
local heal = 2;
local dps = 6;
local dropDown = CreateFrame("Frame", "raidDrop", Main, "UIDropDownMenuTemplate")
dropDown:SetPoint("TOPLEFT",0,0)
UIDropDownMenu_SetWidth(dropDown, 80)
UIDropDownMenu_SetText(dropDown,raid)
UIDropDownMenu_Initialize(dropDown, function(self, level, menuList)
local info = UIDropDownMenu_CreateInfo()
for i=1,9 do
info.text, info.arg1, info.checked = raids[i], raid_values[i], false
info.func = self.SetValue
UIDropDownMenu_AddButton(info)
end
end)
function dropDown:SetValue(newValue)
raid = newValue
UIDropDownMenu_SetText(dropDown,raid)
CloseDropDownMenus()
end
function updateCount()
tankCount:SetText(tostring(tank));
healCount:SetText(tostring(heal));
dpsCount:SetText(tostring(dps));
end
function Button10_OnClick()
raidSize = 10;
tank = 2;
heal = 2;
dps = 6;
updateCount();
end
function Button25_OnClick()
raidSize = 25;
tank = 2;
heal = 5;
dps = 17;
updateCount();
end
function tankMinus_OnClick()
tank = tank -1;
updateCount();
end
function tankPlus_OnClick()
tank = tank +1;
updateCount();
end
function healMinus_OnClick()
heal = heal -1;
updateCount();
end
function healPlus_OnClick()
heal = heal +1;
updateCount();
end
function dpsMinus_OnClick()
dps = dps -1;
updateCount();
end
function dpsPlus_OnClick()
dps = dps +1;
updateCount();
end
function sendButton_OnClick()
msg = dropDown:GetValue() .. raidSize .. 'need ' .. tank .. 'x tank, ' .. heal .. 'x heal' .. 'x dps' .. '';
SendChatMessage(msg,"CHANNEL", DEFAULT_CHAT_FRAME.editBox.languageID, GetChannelName(channel:GetText()));
end