Download
(3Kb)
Download
Updated: 01-12-11 01:21 PM
Pictures
File Info
Updated:01-12-11 01:21 PM
Created:11-08-10 11:58 AM
Downloads:7,052
Favorites:10
MD5:

interrupt bar (hobbykirurg mod.)  Popular! (More than 5000 hits)

Version: 1.6
by: hobbykirur [More]

*update: dark simulation (death knight copy spell)*
so if u felt like these where missing u can DL v1.2


some of you probably had the problem with interrupt bar with 4.0.1 that you couldnt modify it. so i lookd into some lua's and littlebit copy paste and some rewriting to make it work

all credits goes to the original designer (kollektiv)

im open for critesism and tips for new spells / remove spells

hope you other pvpers enjoi it as much as i do ;D

take care and have a nice day yall ^^

i think omnicc is required to show the secounds timer for the spell - havent tryed without yet so you probably want to go with that one aswell


finally i relized that this was to many unseless spells here.. so came to my sences and delited alot of them - most of the 2min+ cds and also other stupid cds so its more like an interruptbar again :P

Optional Files (0)


Post A Reply Comment Options
Unread 02-12-11, 04:02 PM  
lance616
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
96231 replace 85285 in 4.06
Report comment to moderator  
Reply With Quote
Unread 01-01-11, 05:31 PM  
hobbykirur
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 7
Uploads: 1
Originally posted by nzo82
hey im trying to change the cd of the interrupt from feral since if they talent it become only 12 sec cd and if its possible to remove certan cds like spell reflect or inervate...
Thanks! Great job anyway!!!
sorry for late rply - been sort of afk this christmas :P
merry christmas and happy new year btw!

yeah if u go to the config and look at local spellids and find the one for skull bash and change the numbers from 60 to 12 or W/E

and then u look for the spell reflect spell ID and just remove it from local spellids and local order

(local spellids is over the list of spells and the local order is under, im sure ull find it if u look for it ^^)
Report comment to moderator  
Reply With Quote
Unread 12-31-10, 03:42 PM  
nzo82
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
hey im trying to change the cd of the interrupt from feral since if they talent it become only 12 sec cd and if its possible to remove certan cds like spell reflect or inervate...
Thanks! Great job anyway!!!
Report comment to moderator  
Reply With Quote
Unread 12-19-10, 04:27 AM  
oozic
A Kobold Labourer
 
oozic's Avatar

Forum posts: 0
File comments: 10
Uploads: 0
here there is a 2 row interruptbar:
Code:
----------------------------------------------------
-- Interrupt Bar by Kollektiv
--
--	Modded by Andrew Kutta
----------------------------------------------------

InterruptBarDB = InterruptBarDB or { scale = 1, hidden = false, lock = false, }
local abilities = {}
local order
local band = bit.band
local abilityCount = 0

local spellids = {[16166] = 180, [16188] = 120, [49039] = 120, [49576] = 25, [6552] = 10, [2139] = 24, [19647] = 24, [1766] = 10, [47528] = 10, [46924] = 90, [29166] = 180, [57994] = 5, [10890] = 23, [31224] = 90, [49916] = 120, [54428] = 60 }
for spellid,time in pairs(spellids) do
	local name,_,spellicon = GetSpellInfo(spellid)	
	abilities[name] = { icon = spellicon, duration = time }
	abilityCount = abilityCount + 1
end

-----------------------------------------------------
-- Edit this table to change the order
-----------------------------------------------------
-- 16166 Elemental Mastery
-- 16188 Nature's Swiftness
-- 49039 Lichborn
-- 49576 Death Grip
-- 6552  Pummel
-- 2139  Counterspell
-- 19647 Spell Lock
-- 16979 Feral Charge 
-- 1766  Kick
-- 47528 Mind Freeze
-- 46924 Bladestorm
-- 29166 Innervate
-- 57994 Windshear
-- 10890 Psychic Scream
-- 31224 Cloak of Shadows
-- 49916 Strangulate
-- 54428 Divine Plea
-----------------------------------------------------

local order = {16166, 16188, 49039, 49576, 6552, 2139, 19647, 1766, 47528, 57994, 46924, 29166, 54428, 31224, 10890, 49916}

-----------------------------------------------------
-----------------------------------------------------

for k,v in ipairs(order) do order[k] = GetSpellInfo(v) end

local frame
local bar

local GetTime = GetTime
local ipairs = ipairs
local pairs = pairs
local select = select
local floor = floor
local band = bit.band
local GetSpellInfo = GetSpellInfo

local GROUP_UNITS = bit.bor(0x00000010, 0x00000400)

local activetimers = {}

local size = 0
local function getsize()
	size = 0
	for k in pairs(activetimers) do
		size = size + 1
	end
end

local function InterruptBar_AddIcons()
	local x = -45
	local y = 0
	--local curAbility = 0
	for curAbility,ability in ipairs(order) do
		local btn = CreateFrame("Frame",nil,bar)
		btn:SetWidth(30)
		btn:SetHeight(30)
		btn:SetPoint("CENTER",bar,"CENTER",x,y)
		btn:SetFrameStrata("LOW")
		
		local cd = CreateFrame("Cooldown",nil,btn)
		cd.noomnicc = true
		cd.noCooldownCount = true
		cd:SetAllPoints(true)
		cd:SetFrameStrata("MEDIUM")
		cd:Hide()
		
		local texture = btn:CreateTexture(nil,"BACKGROUND")
		texture:SetAllPoints(true)
		texture:SetTexture(abilities[ability].icon)
		texture:SetTexCoord(0.07,0.9,0.07,0.90)
	
		local text = cd:CreateFontString(nil,"ARTWORK")
		text:SetFont(STANDARD_TEXT_FONT,18,"OUTLINE")
		text:SetTextColor(1,1,0,1)
		text:SetPoint("LEFT",btn,"LEFT",2,0)
		
		btn.texture = texture
		btn.text = text
		btn.duration = abilities[ability].duration
		btn.cd = cd
		
		bar[ability] = btn

		--
		--	Originally curAbility < AbilityCount / 2
		--	Which was counted early on when adding 
		--  	The abilities to a table
		--	
		--  	This method ensures we only use the number of
		--	Abilities that are going to be displayed
		--  	Given in the order table.
		--
		if curAbility < #(order) / 2 then
			x = x + 30
		else
			if curAbility > #(order) / 2 then
				x = x + 30
			else
				y = y - 30
				x = -45
			end
		end
	end
end

local function InterruptBar_SavePosition()
	local point, _, relativePoint, xOfs, yOfs = bar:GetPoint()
	if not InterruptBarDB.Position then 
		InterruptBarDB.Position = {}
	end
	InterruptBarDB.Position.point = point
	InterruptBarDB.Position.relativePoint = relativePoint
	InterruptBarDB.Position.xOfs = xOfs
	InterruptBarDB.Position.yOfs = yOfs
end

local function InterruptBar_LoadPosition()
	if InterruptBarDB.Position then
		bar:SetPoint(InterruptBarDB.Position.point,UIParent,InterruptBarDB.Position.relativePoint,InterruptBarDB.Position.xOfs,InterruptBarDB.Position.yOfs)
	else
		bar:SetPoint("CENTER", UIParent, "CENTER")
	end
end

local function InterruptBar_UpdateBar()
	bar:SetScale(InterruptBarDB.scale)
	if InterruptBarDB.hidden then
		for _,v in ipairs(order) do bar[v]:Hide() end
	else
		for _,v in ipairs(order) do bar[v]:Show() end
	end
	if InterruptBarDB.lock then
		bar:EnableMouse(false)
	else
		bar:EnableMouse(true)
	end
end

local function InterruptBar_CreateBar()
	bar = CreateFrame("Frame", nil, UIParent)
	bar:SetMovable(true)
	bar:SetWidth(120)
	bar:SetHeight(30)
	bar:SetClampedToScreen(true) 
	bar:SetScript("OnMouseDown",function(self,button) if button == "LeftButton" then self:StartMoving() end end)
	bar:SetScript("OnMouseUp",function(self,button) if button == "LeftButton" then self:StopMovingOrSizing() InterruptBar_SavePosition() end end)
	bar:Show()
	
	InterruptBar_AddIcons()
	InterruptBar_UpdateBar()
	InterruptBar_LoadPosition()
end

local function InterruptBar_UpdateText(text,cooldown)
	if cooldown < 10 then 
		if cooldown <= 0.5 then
			text:SetText("")
		else
			text:SetFormattedText(" %d",cooldown)
		end
	else
		text:SetFormattedText("%d",cooldown)
	end
	if cooldown < 6 then 
		text:SetTextColor(1,0,0,1)
	else 
		text:SetTextColor(1,1,0,1) 
	end
end

local function InterruptBar_StopAbility(ref,ability)
	if InterruptBarDB.hidden then ref:Hide() end
	if activetimers[ability] then activetimers[ability] = nil end
	ref.text:SetText("")
	ref.cd:Hide()
end

local time = 0
local function InterruptBar_OnUpdate(self, elapsed)
	time = time + elapsed
	if time > 0.25 then
		getsize()
		for ability,ref in pairs(activetimers) do
			ref.cooldown = ref.start + ref.duration - GetTime()
			if ref.cooldown <= 0 then
				InterruptBar_StopAbility(ref,ability)
			else 
				InterruptBar_UpdateText(ref.text,floor(ref.cooldown+0.5))
			end
		end
		if size == 0 then frame:SetScript("OnUpdate",nil) end
		time = time - 0.25
	end
end

local function InterruptBar_StartTimer(ref,ability)
	if InterruptBarDB.hidden then
		ref:Show()
	end
	if not activetimers[ability] then
		local duration
		activetimers[ability] = ref
		ref.cd:Show()
		ref.cd:SetCooldown(GetTime()-0.40,ref.duration)
		ref.start = GetTime()
		InterruptBar_UpdateText(ref.text,ref.duration)
	end
	frame:SetScript("OnUpdate",InterruptBar_OnUpdate)
end

local function InterruptBar_COMBAT_LOG_EVENT_UNFILTERED(...)
	local spellID, ability, useSecondDuration
	return function(_, eventtype, _, srcName, srcFlags, _, dstName, dstFlags, id)
		if (band(srcFlags, 0x00000040) == 0x00000040 and eventtype == "SPELL_CAST_SUCCESS") then 
			spellID = id
		else
			return
		end
		useSecondDuration = false
		if spellID == 49376 then spellID = 16979; useSecondDuration = true end -- Feral Charge - Cat -> Feral Charge - Bear
		ability = GetSpellInfo(spellID)
		if abilities[ability] then			
			if useSecondDuration and spellID == 16979 then
				bar[ability].duration = 30
			elseif spellID == 16979 then
				bar[ability].duration = 15
			end
			InterruptBar_StartTimer(bar[ability],ability)
		end
	end
end

InterruptBar_COMBAT_LOG_EVENT_UNFILTERED = InterruptBar_COMBAT_LOG_EVENT_UNFILTERED()

local function InterruptBar_ResetAllTimers()
	for _,ability in ipairs(order) do
		InterruptBar_StopAbility(bar[ability])
	end
	active = 0
end

local function InterruptBar_PLAYER_ENTERING_WORLD(self)
	InterruptBar_ResetAllTimers()
end

local function InterruptBar_Reset()
	InterruptBarDB = { scale = 1, hidden = false, lock = false }
	InterruptBar_UpdateBar()
	InterruptBar_LoadPosition()
end

local function InterruptBar_Test()
	for _,ability in ipairs(order) do
		InterruptBar_StartTimer(bar[ability],ability)
	end
end

local cmdfuncs = {
	scale = function(v) InterruptBarDB.scale = v; InterruptBar_UpdateBar() end,
	hidden = function() InterruptBarDB.hidden = not InterruptBarDB.hidden; InterruptBar_UpdateBar() end,
	lock = function() InterruptBarDB.lock = not InterruptBarDB.lock; InterruptBar_UpdateBar() end,
	reset = function() InterruptBar_Reset() end,
	test = function() InterruptBar_Test() end,
}

local cmdtbl = {}
function InterruptBar_Command(cmd)
	for k in ipairs(cmdtbl) do
		cmdtbl[k] = nil
	end
	for v in gmatch(cmd, "[^ ]+") do
  	tinsert(cmdtbl, v)
  end
  local cb = cmdfuncs[cmdtbl[1]] 
  if cb then
  	local s = tonumber(cmdtbl[2])
  	cb(s)
  else
  	ChatFrame1:AddMessage("InterruptBar Options | /ib <option>",0,1,0)  	
  	ChatFrame1:AddMessage("-- scale <number> | value: " .. InterruptBarDB.scale,0,1,0)
  	ChatFrame1:AddMessage("-- hidden (toggle) | value: " .. tostring(InterruptBarDB.hidden),0,1,0)
  	ChatFrame1:AddMessage("-- lock (toggle) | value: " .. tostring(InterruptBarDB.lock),0,1,0)
  	ChatFrame1:AddMessage("-- test (execute)",0,1,0)
  	ChatFrame1:AddMessage("-- reset (execute)",0,1,0)
  end
end

local function InterruptBar_OnLoad(self)
	self:RegisterEvent("PLAYER_ENTERING_WORLD")
	self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
	if not InterruptBarDB.scale then InterruptBarDB.scale = 1 end
	if not InterruptBarDB.hidden then InterruptBarDB.hidden = false end
	if not InterruptBarDB.lock then InterruptBarDB.lock = false end
	InterruptBar_CreateBar()
	
	SlashCmdList["InterruptBar"] = InterruptBar_Command
	SLASH_InterruptBar1 = "/ib"
	
	ChatFrame1:AddMessage("Interrupt Bar by Kollektiv. Type /ib for options.",0,1,0)
end

local eventhandler = {
	["VARIABLES_LOADED"] = function(self) InterruptBar_OnLoad(self) end,
	["PLAYER_ENTERING_WORLD"] = function(self) InterruptBar_PLAYER_ENTERING_WORLD(self) end,
	["COMBAT_LOG_EVENT_UNFILTERED"] = function(self,...) InterruptBar_COMBAT_LOG_EVENT_UNFILTERED(...) end,
}

local function InterruptBar_OnEvent(self,event,...)
	eventhandler[event](self,...)
end

frame = CreateFrame("Frame",nil,UIParent)
frame:SetScript("OnEvent",InterruptBar_OnEvent)
frame:RegisterEvent("VARIABLES_LOADED")
what you have to do is change spellid and update for cataclysm.
it should work

original discussion:
http://www.arenajunkies.com/showthread.php?t=187752
Report comment to moderator  
Reply With Quote
Unread 12-17-10, 09:59 AM  
hobbykirur
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 7
Uploads: 1
Originally posted by groin
it's possible to split the bar to make

icon icon icon icon
icon icon icon icon


?
im sorry - been trying to do that since i started but cant seem to figure out how :S what iv red it "its imposible" tryed to make 2 different addons with half of the bar on each addon but that just makes the first one to disapair so ur stuck with half of what u allrdy had ... sorry i cant help u with this
Report comment to moderator  
Reply With Quote
Unread 12-17-10, 04:11 AM  
groin
A Cyclonian
AddOn Compiler - Click to view compilations

Forum posts: 45
File comments: 86
Uploads: 3
it's possible to split the bar to make

icon icon icon icon
icon icon icon icon


?
Report comment to moderator  
Reply With Quote
Unread 11-28-10, 03:18 AM  
hobbykirur
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 7
Uploads: 1
..

Originally posted by Phanx
Did you type the description with your toes on a cell phone while you were drunk?
no comment :P neh just tryed to fill in as much info as posible - i apolegise if the english was incorrect but im not from an english speaking country so cant rly blame me ...
Report comment to moderator  
Reply With Quote
Unread 11-27-10, 02:53 PM  
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view AddOns

Forum posts: 5617
File comments: 2321
Uploads: 54
Did you type the description with your toes on a cell phone while you were drunk?
Report comment to moderator  
Reply With Quote
Unread 11-08-10, 02:07 PM  
hobbykirur
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 7
Uploads: 1
Originally posted by manatic
Thats hell of the bar... However its more of a cd tracker, cuz i dont see how interrupting for e.g. PS, AP, or Shadowfiend can be
i know its basicly for the cds yeah but called it interrupt bar since thats the name of the lua i modifyed - it has more or less every major cd from the different classes like cloack of shadows and anti magick shell - basicly tells u to now is the time to survive and when is the next time u need to worry about it - had smaller cds like shadowfury and dragons breath but the bar was so big it woldnt fit to most screens and just a mess keeping track of everything so this is just a smaller verson of all major cd trackings - hope u like it tho ^^
Report comment to moderator  
Reply With Quote
Unread 11-08-10, 02:00 PM  
manatic
A Kobold Labourer

Forum posts: 0
File comments: 3
Uploads: 0
Thats hell of the bar... However its more of a cd tracker, cuz i dont see how interrupting for e.g. PS, AP, or Shadowfiend can be
Report comment to moderator  
Reply With Quote
Unread 11-08-10, 01:29 PM  
hobbykirur
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 0
File comments: 7
Uploads: 1
Originally posted by Opaque
Yoyo - what is it?
sup man ?
this is a simple addon that keep track of ur enemys cooldowns - as u can see if ur a caster and fighting a dk u will see if he uses anti magic shell and how long till its ready to use again - like a cooldown timer for your enemys spell
i think u need omnicc to see timers - havent tryed without it so i cant tell for sure
Report comment to moderator  
Reply With Quote
Unread 11-08-10, 01:23 PM  
Opaque
A Fallenroot Satyr
 
Opaque's Avatar

Forum posts: 23
File comments: 138
Uploads: 0
Yoyo - what is it?
__________________
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: