All pastes #96245 Raw Edit

haste

public lua v1 · immutable
#96245 ·published 2006-07-22 18:50 UTC
rendered paste body
Hitman = AceLibrary("AceAddon-2.0"):new("AceEvent-2.0", "AceConsole-2.0")function Hitman:OnEnable()        self:RegisterEvent("PLAYER_ENTER_COMBAT")        self:RegisterEvent("PLAYER_LEAVE_COMBAT")endlocal framefunction Hitman:OnInitialize()        local frame = CreateFrame("MessageFrame", "HitmanFrame", UIParent)        frame:SetWidth(100)        frame:SetHeight(20)        frame:SetPoint("CENTER", UIParent, "CENTER")        frame:SetFontObject(NumberFontNormal)        frame:SetFrameStrata("LOW")        frame:SetTimeVisible(1)        frame:RegisterForDrag("LeftButton")        frame:SetScript("OnDragStart",function() if(not locked) then this:StartMoving() end end)        frame:SetScript("OnDragStop",function() this:StopMovingOrSizing() end)end function Hitman:PLAYER_ENTER_COMBAT()        if not self.inCombat then                self.inCombat = true        self:Output("|cffff0000+Attack|r")    endend function Hitman:PLAYER_LEAVE_COMBAT()        if self.inCombat then                self.inCombat = false        self:Output("|cffffff00-Attack|r")    endendfunction Hitman:Output(text)        if MikSBT then                MikSBT.DisplayMessage(text, MikSBT.DISPLAYTYPE_NOTIFICATION, false)        elseif SCT_Display then                SCT_Display(text)        else                HitmanFrame:AddMessage(text, 1, 0, 0)        endend