Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[============================================================================
- LOCAL VARIABLES
- ----------------------------------------------------------------------------]]--
- local id, name, description, icon, background, role, primaryStat-- = GetSpecializationInfo(GetSpecialization())
- local currentPriority -- the currently active priority
- local className, classFileName = UnitClass("player")
- --[[============================================================================
- FUNCTIONS
- ----------------------------------------------------------------------------]]--
- function StatPriorityPrint(msg)
- msg = MSG_PREFIX .. msg
- DEFAULT_CHAT_FRAME:AddMessage(msg)
- end
- local PrintMsg = StatPriorityPrint
- function GetPriority()
- id, name, description, icon, background, role, primaryStat = GetSpecializationInfo(GetSpecialization())
- currentPriority = SPECS[id]
- PrintMsg("Prioritizing for: " .. COLORS[className] .. name .. " - " .. className .. COLORS[0])
- end
- --[[============================================================================
- WIDGETS AND FRAMES
- ----------------------------------------------------------------------------]]--
- local LoginFrame = CreateFrame("Frame")
- LoginFrame:RegisterEvent("PLAYER_LOGIN")
- LoginFrame:SetScript("OnEvent",
- function(self, event, ...)
- PrintMsg(LOAD_MSG)
- PrintMsg("Type " .. COLORS[2] .. "/stp help " .. COLORS[0] .. "for a list of commands")
- GetPriority()
- className, classFileName = UnitClass("player")
- end
- )
- local TalentChangedFrame = CreateFrame("Frame") --fires when the player changes their specialization
- TalentChangedFrame:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
- TalentChangedFrame:SetScript("OnEvent",
- function(self, event, ...)
- GetPriority()
- end
- )
- --[[============================================================================
- SLASH COMMANDS
- ----------------------------------------------------------------------------]]--
- SLASH_STATPRIORITY1 = "/stp"
- function SlashCmdList.STATPRIORITY(msg, editbox)
- if msg == "" then
- PrintMsg(COLORS[className] .. name .. " - " .. className .. ":" .. COLORS[0])
- local i = 1
- repeat
- PrintMsg(i .. ". " .. currentPriority[i])
- i = i + 1
- until currentPriority[i] == nil
- elseif msg == "help" then
- PrintMsg(COLORS[2] .. "/stp" .. COLORS[0] .. " Print your current " .. COLORS[1] .. "StatPriority" .. COLORS[0] .. " in chat")
- elseif msg == "same" then
- PrintMsg("imo same tbh")
- else
- PrintMsg(COLORS[2] .. "/stp " .. msg .. COLORS[0] .. " was not recognized. Type " .. COLORS[2] .. "/stp help" .. COLORS[0] .. " for a list of commands.")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement