Created
July 7, 2012 10:26
-
-
Save lithammer/3065785 to your computer and use it in GitHub Desktop.
Script to automatically position Aptechka raid frames bases on role (dps/tank or healer)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Aptechka raid frames: | |
-- https://github.com/rgd87/Aptechka | |
-- Usage: | |
-- Put this script into the AptechkaUserConfig\userconfig.lua file. | |
-- Moves the raid frames according to current spec | |
local Mover = CreateFrame('Frame') | |
Mover:RegisterEvent('PLAYER_ENTERING_WORLD') | |
Mover:RegisterEvent('GROUP_ROSTER_UPDATE') | |
local class = select(2, UnitClass('player')) | |
local function Mover_OnEvent(self, event, ...) | |
if event == 'PLAYER_ENTERING_WORLD' then | |
self:RegisterEvent('ACTIVE_TALENT_GROUP_CHANGED') | |
self:UnregisterEvent('PLAYER_ENTERING_WORLD') | |
end | |
local dps = 'setpos point=CENTER x=480 y=-200' | |
local healer = 'setpos point=CENTER x=180 y=-200' | |
local command = dps | |
-- If in healer spec and a party | |
if GetNumSubgroupMembers() > 0 and GetSpecialization() and GetSpecializationRole(GetSpecialization()) == 'HEALER' then | |
command = healer | |
end | |
Aptechka.SlashCmd(command) | |
end | |
Mover:SetScript('OnEvent', Mover_OnEvent) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment