Jump to content

Arena Junkies was shut down on July 1st, 2018. You're viewing an archive of this page from 2018-06-25 at 17:01. Thank you all for your support! Please get in touch via the Curse help desk if you need any support using this archive.

Photo

InterruptBar


  • Please log in to reply
26 replies to this topic

#21 Mantraz

Mantraz
  • Junkies
  • Undeadclass_name
  • EU-Al'Akir
  • Blackout
  • Posts: 633
  • Talents: Fire

Posted 15 February 2010 - 09:09 PM

i'm having same issues as mantraz. ib2 doesnt' work.

could verb or ickz post code for interruptbar2.lua and .toc?


was a bit puzzled myself. Glad im not alone:)
  • 0
Spoiler

#22 sauronjag

sauronjag
  • Members
  • Blood Elfclass_name
  • US-Tichondrius
  • Bloodlust
  • Posts: 15
  • Talents: Discipline

Posted 16 February 2010 - 01:25 AM

my interrupt bar seems to be busted anyway even before trying this.

for whatever reason my interrupt bar only works - sometimes - in bgs. never has worked in arenas.

from a fresh install, options are unlocked, hidden. no icon shows up with a kick, charge, cs, etc.
  • 0

#23 travuhohh

travuhohh

Posted 16 February 2010 - 02:06 AM

thanks heaps i managed to get mine working fine, only problem i had when adding new spells was accounting for people who -might- have glyphs / talents which reduce the cooldown of the spell, but should still be pretty awesome + helpful
  • 0

#24 Dunc

Dunc
  • Junkies
  • Goblinclass_name
  • EU-Kazzak
  • Misery
  • Posts: 9,711
  • Talents: Shadow 1/1/2/0/2/1/2
  • LocationEngland

Posted 16 February 2010 - 06:36 AM

For the people wanting a second bar code that works, this works fine for me so

SecondBar.lua:
----------------------------------------------------
-- Interrupt Bar by Kollektiv
----------------------------------------------------

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

local spellids = {[6552] = 10, [72] = 12, [23920] = 10, [2139] = 24, [19647] = 24, [57994] = 6, [16979] = 15, [1766] = 10, [47528] = 10, [18499] = 30, [49039] = 120, [8643] = 20}
for spellid,time in pairs(spellids) do
	local name,_,spellicon = GetSpellInfo(spellid)	
	abilities[name] = { icon = spellicon, duration = time }
end

-----------------------------------------------------
-- Edit this table to change the order
-----------------------------------------------------
-- 6552  Pummel
-- 72	 Shield Bash
-- 23920 Spell Reflect
-- 2139  Counterspell
-- 19647 Spell Lock
-- 57994 Wind Shear
-- 16979 Feral Charge 
-- 1766  Kick
-- 47528 Mind Freeze
-- 49039 Lichborne
-- 8643  Kidney Shot
-- 18499 Berserker Rage
-----------------------------------------------------

local order = {6552, 72, 23920, 2139, 19647, 57994, 1766, 18499, 47528, 16979, 8643, 49039}

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

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 SecondBar_AddIcons()
	local x = -45
	for _,ability in ipairs(order) do
		local btn = CreateFrame("Frame",nil,bar)
		btn:SetWidth(30)
		btn:SetHeight(30)
		btn:SetPoint("CENTER",bar,"CENTER",x,0)
		btn:SetFrameStrata("LOW")
		
		local cd = CreateFrame("Cooldown",nil,btn)
		cd.noomnicc = 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
		
		x = x + 30
	end
end

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

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

local function SecondBar_UpdateBar()
	bar:SetScale(SecondBarDB.scale)
	if SecondBarDB.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 SecondBarDB.lock then
		bar:EnableMouse(false)
	else
		bar:EnableMouse(true)
	end
end

local function SecondBar_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() SecondBar_SavePosition() end end)
	bar:Show()
	
	SecondBar_AddIcons()
	SecondBar_UpdateBar()
	SecondBar_LoadPosition()
end

local function SecondBar_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 SecondBar_StopAbility(ref,ability)
	if SecondBarDB.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 SecondBar_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
				SecondBar_StopAbility(ref,ability)
			else 
				SecondBar_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 SecondBar_StartTimer(ref,ability)
	if SecondBarDB.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()
		SecondBar_UpdateText(ref.text,ref.duration)
	end
	frame:SetScript("OnUpdate",SecondBar_OnUpdate)
end

local function SecondBar_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
			SecondBar_StartTimer(bar[ability],ability)
		end
	end
end

SecondBar_COMBAT_LOG_EVENT_UNFILTERED = SecondBar_COMBAT_LOG_EVENT_UNFILTERED()

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

local function SecondBar_PLAYER_ENTERING_WORLD(self)
	SecondBar_ResetAllTimers()
end

local function SecondBar_Reset()
	SecondBarDB = { scale = 1, hidden = false, lock = false }
	SecondBar_UpdateBar()
	SecondBar_LoadPosition()
end

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

local cmdfuncs = {
	scale = function(v) SecondBarDB.scale = v; SecondBar_UpdateBar() end,
	hidden = function() SecondBarDB.hidden = not SecondBarDB.hidden; SecondBar_UpdateBar() end,
	lock = function() SecondBarDB.lock = not SecondBarDB.lock; SecondBar_UpdateBar() end,
	reset = function() SecondBar_Reset() end,
	test = function() SecondBar_Test() end,
}

local cmdtbl = {}
function SecondBar_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("SecondBar Options | /sb <option>",0,1,0)  	
  	ChatFrame1:AddMessage("-- scale <number> | value: " .. SecondBarDB.scale,0,1,0)
  	ChatFrame1:AddMessage("-- hidden (toggle) | value: " .. tostring(SecondBarDB.hidden),0,1,0)
  	ChatFrame1:AddMessage("-- lock (toggle) | value: " .. tostring(SecondBarDB.lock),0,1,0)
  	ChatFrame1:AddMessage("-- test (execute)",0,1,0)
  	ChatFrame1:AddMessage("-- reset (execute)",0,1,0)
  end
end

local function SecondBar_OnLoad(self)
	self:RegisterEvent("PLAYER_ENTERING_WORLD")
	self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")
	if not SecondBarDB.scale then SecondBarDB.scale = 1 end
	if not SecondBarDB.hidden then SecondBarDB.hidden = false end
	if not SecondBarDB.lock then SecondBarDB.lock = false end
	SecondBar_CreateBar()
	
	SlashCmdList["SecondBar"] = SecondBar_Command
	SLASH_SecondBar1 = "/sb"
	
	ChatFrame1:AddMessage("Second Bar by Kollektiv. Type /sb for options.",0,1,0)
end

local eventhandler = {
	["VARIABLES_LOADED"] = function(self) SecondBar_OnLoad(self) end,
	["PLAYER_ENTERING_WORLD"] = function(self) SecondBar_PLAYER_ENTERING_WORLD(self) end,
	["COMBAT_LOG_EVENT_UNFILTERED"] = function(self,...) SecondBar_COMBAT_LOG_EVENT_UNFILTERED(...) end,
}

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

frame = CreateFrame("Frame",nil,UIParent)
frame:SetScript("OnEvent",SecondBar_OnEvent)
frame:RegisterEvent("VARIABLES_LOADED")

SecondBar.toc
## Interface: 30000
## Title: Interrupt Bar
## Notes: Tracks interrupts
## Version: 1.15
## Author: Kollektiv
## DefaultState: Enabled
## SavedVariables: SecondBarDB

SecondBar.lua

command is /sb
  • 0
that's all we'll have when the world is through

#25 sauronjag

sauronjag
  • Members
  • Blood Elfclass_name
  • US-Tichondrius
  • Bloodlust
  • Posts: 15
  • Talents: Discipline

Posted 16 February 2010 - 08:26 AM

thanks dulosam
  • 0

#26 Levaro

Levaro
  • Members
  • Humanclass_name
  • EU-Tarren Mill
  • Misery
  • Posts: 59
  • Talents: Frost

Posted 02 July 2010 - 10:44 AM

Thanks :D
  • 0

#27 AvitoR77Gaft

AvitoR77Gaft
  • Members
  • Posts: 5

Posted 17 December 2017 - 09:54 AM

Пополение баланса Авито (Avito) за 50% | Телеграмм @a556677 Старый Телеграмм @a1garant НЕДЕЙСТВИТЕЛЕН

Здравствуйте, дорогие друзья!

Всегда рады предоставить Всем вам услуги по пополнению баланса на действующие активные аккаунты Avito (а также, абсолютно новые). Если Вам нужны определенные балансы - пишите, будем решать. Потратить можно на турбо продажи, любые платные услуги Авито (Avito).

Аккаунты не Брут. Живут долго.

Процент пополнения в нашу сторону и стоимость готовых аккаунтов: 50% от баланса на аккаунте.
Если требуется залив на ваш аккаунт, в этом случае требуются логин и пароль Вашего акка для доступа к форме оплаты, пополнения баланса.
Для постоянных заказчиков гибкая система бонусов и скидок!

Гарантия:

И, конечно же ничто не укрепляет доверие, как - Постоплата!!! Вперед денег не просим...

Рады сотрудничеству!

Заливы на балансы Авито
________

удалить аккаунт на авито если он заблокирован
как отвязать номер телефона от авито если аккаунт удален
своровали деньги на авито
как восстановить аккаунт на авито если забыл логин
каталоги магазинов аккаунтов авито

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users