Jump to content

  • Curse Sites
Help

Default UI Scripts


  • Please log in to reply
423 replies to this topic

#261 Torapants

Torapants
  • Premium
  • Curse Premium
  • Posts: 50
  • LocationUK

Posted 07 April 2013 - 10:37 AM

View PostRaynor, on 06 April 2013 - 10:41 PM, said:

Your rupture/garrote script causes huge fps drops in arena for some reason.

hm, odd. I don't really know much about lua coding, so someone else would need to figure out why :/
The base script I modified is kinda old, so could be that some of the code needs to be adjusted to be up to date.

I use "weakauras" addon to accomplish the same thing & more now. Pretty lightweight, the addon options loads on-demand so once it's configured it only uses about 1 - 2mb of memory.
:rogue: forever and always.

Quote

Posted by Soltan:
when playing mutilate its pretty important to bind V ..... for vendetta :cool:

#262 Syncrow

Syncrow
  • Premium
  • Curse Premium
  • Posts: 182

Posted 08 April 2013 - 04:27 AM

View Postephemeross, on 07 April 2013 - 10:37 AM, said:

hm, odd. I don't really know much about lua coding, so someone else would need to figure out why :/
The base script I modified is kinda old, so could be that some of the code needs to be adjusted to be up to date.

I use "weakauras" addon to accomplish the same thing & more now. Pretty lightweight, the addon options loads on-demand so once it's configured it only uses about 1 - 2mb of memory.

a different way of coding but it works!
local Rupture = CreateFrame("Frame")
Rupture:SetSize(26,26)
Rupture:SetPoint("BOTTOMLEFT",TargetFrame,29,6)
Rupture.t = Rupture:CreateTexture(nil,"BACKGROUND")
Rupture.t:SetAllPoints()
Rupture.t:SetTexture("Interface\\Icons\\ability_rogue_rupture")
Rupture.time = Rupture:CreateFontString(nil,"ARTWORK")
Rupture.time:SetFont("Fonts\\\ARIALN.ttf", 12, "OUTLINE")
Rupture.time:SetPoint("CENTER",Rupture,0,0)
Rupture:SetAlpha(0)

Rupture:SetScript("OnUpdate", function(self)
	local unit = "target"
	local aura = "Rupture"
	local auraID = 1943
	if UnitExists(unit) then
		local expirationTime = select(7, UnitDebuff(unit, aura))
		local spellID = select(11, UnitDebuff(unit, aura))
		if spellID == auraID then
			local cooldown = expirationTime - GetTime()
			if cooldown > 1 then
				self:SetAlpha(1)
				self.time:SetText(string.format("%.0f",cooldown).."s")
			elseif cooldown > 0 then
				self:SetAlpha(1)
				self.time:SetText(string.format("%.1f",cooldown).."s")
			else
				self:SetAlpha(0)
				self.time:SetText("")
			end
		else
			self:SetAlpha(0)
		end
	else
		self:SetAlpha(0)
	end
end)
it takes about 10-18 KB AddOn Memory!!! (very lightweighted as i guess)

PS: You can take this for example to track every buff/debuff you want!
the only things you have to change is:
Rupture.t:SetTexture("Interface\\Icons\\ability_rogue_rupture")
local unit = "target"
local aura = "Rupture"
local auraID = 1943
and for buff tracking instead of debuff tracking:
local expirationTime = select(7, UnitDebuff(unit, aura))
local spellID = select(11, UnitDebuff(unit, aura))
into
local expirationTime = select(7, UnitBuff(unit, aura))
local spellID = select(11, UnitBuff(unit, aura))


#263 Torapants

Torapants
  • Premium
  • Curse Premium
  • Posts: 50
  • LocationUK

Posted 09 April 2013 - 11:48 AM

View PostSyncrow, on 08 April 2013 - 04:27 AM, said:

a different way of coding but it works!

Thank you!
:rogue: forever and always.

Quote

Posted by Soltan:
when playing mutilate its pretty important to bind V ..... for vendetta :cool:

#264 Ponen

Ponen
  • Junkies
  • Humanclass_name
  • EU-Outland
  • Misery
  • Posts: 485
  • Talents: Beast Mastery 1/0/1/2/1/0
  • RBG: 1936
  • LocationFinland

Posted 14 April 2013 - 09:18 AM

I want to make my player- and target frames bigger by making my own addon but cant seem to make it work.

lua file:

-- playerframe:SetScale(1.3)
-- targetframe:SetScale(1.3)


edit: got it to work

Edited by Ponen, 14 April 2013 - 09:32 AM.


#265 Rytm

Rytm
  • Junkies
  • Humanclass_name
  • EU-Outland
  • Misery
  • Posts: 1
  • Talents: Assassination 2/2/1/1/0/2
  • RBG: 2212

Posted 22 April 2013 - 05:34 PM

Hello there, i've been trying to get this garrote dr script to work forever. I got similar ones for cheap shot and sap which works perfectly. But for some reason I just can't get this one to work.. Anyway here is the script:

GS=RF(FR) GS.c=RF("Cooldown","GARROTE",GS.t) GS:RegisterEvent(USD)
GS.c:SetAllPoints(GS) GS:SetPoint("TOPRIGHT",PlayerFrame,-40,12)GS:SetSize(30,30)GS.t=GS:CreateTexture(nil,RD)GS.t:SetAllPoints()GS.t:SetTexture("Interface\\Icons\\ability_rogue_garrote")
GS:SetScript(OT,function(self,event,...) if UE(select(1,...))==UE("player") and select(5,...)==1330 then GARROTE:SetCooldown(GetTime(), 21)end end)

I know there is another thread about this, but I tried it and unfortunately it didn't work

#266 khanggle

khanggle
  • Members
  • Orcclass_name
  • US-Bleeding Hollow
  • Ruin
  • Posts: 18
  • Talents: Restoration 0/2/1/1/0/0
  • LocationToronto

Posted 22 April 2013 - 05:49 PM

View PostSyncrow, on 08 April 2013 - 04:27 AM, said:

a different way of coding but it works!
local Rupture = CreateFrame("Frame")
Rupture:SetSize(26,26)
Rupture:SetPoint("BOTTOMLEFT",TargetFrame,29,6)
Rupture.t = Rupture:CreateTexture(nil,"BACKGROUND")
Rupture.t:SetAllPoints()
Rupture.t:SetTexture("Interface\\Icons\\ability_rogue_rupture")
Rupture.time = Rupture:CreateFontString(nil,"ARTWORK")
Rupture.time:SetFont("Fonts\\\ARIALN.ttf", 12, "OUTLINE")
Rupture.time:SetPoint("CENTER",Rupture,0,0)
Rupture:SetAlpha(0)

.
.
.

This works perfectly! Is there any way to add a cooldown spiral by any chance?

#267 Syncrow

Syncrow
  • Premium
  • Curse Premium
  • Posts: 182

Posted 23 April 2013 - 03:51 AM

View Postkhanggle, on 22 April 2013 - 05:49 PM, said:

This works perfectly! Is there any way to add a cooldown spiral by any chance?

here is it:

Rupture.c = CreateFrame("Cooldown",nil,Rupture)
Rupture.c:SetAllPoints(Rupture)
Rupture:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED")

Rupture:SetScript("OnEvent", function(self, event, ...)
	local unit = "target"
	local aura = "Rupture"
	local auraID = 1943

	if event == "COMBAT_LOG_EVENT_UNFILTERED" then
		if select(2, ...) == "SPELL_AURA_APPLIED" then
		 if UnitGUID(unit) == select(8, ...) then
				if select(12, ...) == auraID then
					local duration = select(6, UnitDebuff(unit, aura))
					self.c:SetCooldown(GetTime(),duration)
				end
			end
		end

		if select(2, ...) == "SPELL_AURA_REFRESH" then
			if UnitGUID(unit) == select(8, ...) then
				if select(12, ...) == auraID then
					local duration = select(6, UnitDebuff(unit, aura))
					self.c:SetCooldown(GetTime(),duration)
				end
			end
		end
end
end)

it works but the cooldown spiral doesn't resetting by target switch, so if you have ruptured unit 1 and then ruptured unit 2 and target unit 1 before its rupture is expired, you'll see the cooldown spiral from the rupture of target 2 (or the newest rupture applied to someone)

#268 Torapants

Torapants
  • Premium
  • Curse Premium
  • Posts: 50
  • LocationUK

Posted 23 April 2013 - 10:00 AM

View PostRytm, on 22 April 2013 - 05:34 PM, said:

Hello there, i've been trying to get this garrote dr script to work forever. I got similar ones for cheap shot and sap which works perfectly. But for some reason I just can't get this one to work.. Anyway here is the script:

GS=RF(FR) GS.c=RF("Cooldown","GARROTE",GS.t) GS:RegisterEvent(USD)
GS.c:SetAllPoints(GS) GS:SetPoint("TOPRIGHT",PlayerFrame,-40,12)GS:SetSize(30,30)GS.t=GS:CreateTexture(nil,RD)GS.t:SetAllPoints()GS.t:SetTexture("Interface\\Icons\\ability_rogue_garrote")
GS:SetScript(OT,function(self,event,...) if UE(select(1,...))==UE("player") and select(5,...)==1330 then GARROTE:SetCooldown(GetTime(), 21)end end)

I know there is another thread about this, but I tried it and unfortunately it didn't work

Garrote on it's own is a bleed, where-as you want the silence DR, trying using spell id http://www.wowhead.c...garrote-silence
:rogue: forever and always.

Quote

Posted by Soltan:
when playing mutilate its pretty important to bind V ..... for vendetta :cool:

#269 Deadlycuts

Deadlycuts
  • Members
  • Undeadclass_name
  • EU-Al'Akir
  • Blackout
  • Posts: 5
  • Talents: Assassination

Posted 09 May 2013 - 08:40 AM

Hello!
I have some problems with the amount of target's debuffs - when my target have no target it can have 5 debuffs in one row, but as soon as target targets someone, the amount of debuffs changes to 4, and 5th debuff moves on the next row, so it will fit, but i've moved the target of target frame so there is a free space for 1 more debuff per a row. Is there any way to fix the amount of debuffs on target to 5 in one row? i hope you understand what i mean, but if not, i'll provide screens.
thanks!

#270 Torapants

Torapants
  • Premium
  • Curse Premium
  • Posts: 50
  • LocationUK

Posted 09 May 2013 - 10:27 AM

View PostDeadlycuts, on 09 May 2013 - 08:40 AM, said:

Hello!
I have some problems with the amount of target's debuffs - when my target have no target it can have 5 debuffs in one row, but as soon as target targets someone, the amount of debuffs changes to 4, and 5th debuff moves on the next row, so it will fit, but i've moved the target of target frame so there is a free space for 1 more debuff per a row. Is there any way to fix the amount of debuffs on target to 5 in one row? i hope you understand what i mean, but if not, i'll provide screens.
thanks!

http://www.arenajunk...ffdebuff-frame/ Try that, it might be outdated but someone should be able to fix it if needs be :)
maxRowWidth = LARGE_AURA_SIZE
is the part you're wanting to alter I think, you'll be able to resize them with the script as well.
:rogue: forever and always.

Quote

Posted by Soltan:
when playing mutilate its pretty important to bind V ..... for vendetta :cool:

#271 Deadlycuts

Deadlycuts
  • Members
  • Undeadclass_name
  • EU-Al'Akir
  • Blackout
  • Posts: 5
  • Talents: Assassination

Posted 09 May 2013 - 11:24 AM

thanks, Tora.
I've found thread with similar problem, but it seems outdaited now since it's giving me errors
http://www.arenajunk...uto-adjustment/

#272 Spyrö

Spyrö
  • Premium
  • Curse Premium
  • Humanclass_name
  • EU-Dun Modr
  • Cruelty / Crueldad
  • Posts: 140
  • Talents: Subtlety 1/2/2/2/0/1
  • 2v2: 1059
  • RBG: 192
  • LocationSpain

Posted 09 May 2013 - 08:14 PM

View PostDeadlycuts, on 09 May 2013 - 08:40 AM, said:

Hello!
I have some problems with the amount of target's debuffs - when my target have no target it can have 5 debuffs in one row, but as soon as target targets someone, the amount of debuffs changes to 4, and 5th debuff moves on the next row, so it will fit, but i've moved the target of target frame so there is a free space for 1 more debuff per a row. Is there any way to fix the amount of debuffs on target to 5 in one row? i hope you understand what i mean, but if not, i'll provide screens.
thanks!
local UpdateAuraPos = true
hooksecurefunc("TargetFrame_UpdateAuraPositions", function(...)
  if not UpdateAuraPos then return end
  local P = { ... }; P[7] = 122
  UpdateAuraPos = false
  TargetFrame_UpdateAuraPositions(unpack(P))
  UpdateAuraPos = true
end)


#273 Deadlycuts

Deadlycuts
  • Members
  • Undeadclass_name
  • EU-Al'Akir
  • Blackout
  • Posts: 5
  • Talents: Assassination

Posted 10 May 2013 - 05:34 AM

View PostSpyrö, on 09 May 2013 - 08:14 PM, said:

local UpdateAuraPos = true
hooksecurefunc("TargetFrame_UpdateAuraPositions", function(...)
if not UpdateAuraPos then return end
local P = { ... }; P[7] = 122
UpdateAuraPos = false
TargetFrame_UpdateAuraPositions(unpack(P))
UpdateAuraPos = true
end)

Thanks a lot! it works!

#274 Zorfe

Zorfe
  • Members
  • Orcclass_name
  • EU-Quel'Thalas
  • Raserei / Frenzy
  • Posts: 1
  • Talents: Fury 0/2/2/2/1/0

Posted 01 June 2013 - 12:05 AM

Hey,

Ive used the code to change the colors in the hp bars and behind the names to represent the class and I love it. Just wondering if it is possible to change them for the player too?

Thanks in advance

Zorfe

#275 Calixia

Calixia
  • Members
  • Humanclass_name
  • EU-Outland
  • Misery
  • Posts: 16
  • Talents: Unholy 0/1/1/2/0/2
  • RBG: 2277

Posted 10 June 2013 - 11:30 PM

Dont know if its already been posted but

/run MainMenuBarLeftEndCap:Hide(); MainMenuBarRightEndCap:Hide()

removes the eagles from the UI
Posted Image

#276 zenga

zenga
  • Members
  • Posts: 322
  • LocationBelgium

Posted 13 June 2013 - 04:07 AM

Trying to get the arena trinket tracker to work (patch 5.3 obv), but unfortunately to no avail. Tried to debug what was going wrong with turning on/off several addons and stripping other parts of the UI scripts, but to no avail, trinkets just won't show. I literally copy/paste the snippet into an addon that I've set up according to the guide here.

Am I the only one who has this problem or did something change as of 5.3?

View PostThaya, on 17 April 2012 - 08:57 AM, said:

4.3. Arena trinkets tracker:

LoadAddOn("Blizzard_ArenaUI") -- You only need to run this once. You can safely delete any copies of this line.

trinkets = {}
local arenaFrame, trinket
for i = 1, 5 do
arenaFrame = "ArenaEnemyFrame"..i
trinket = CreateFrame("Cooldown", arenaFrame.."Trinket", ArenaEnemyFrames)
trinket:SetPoint("TOPRIGHT", arenaFrame, 30, -6)
trinket:SetSize(24, 24)
trinket.icon = trinket:CreateTexture(nil, "BACKGROUND")
trinket.icon:SetAllPoints()
trinket.icon:SetTexture("Interface\\Icons\\inv_jewelry_trinketpvp_01")
trinket:Hide()
trinkets["arena"..i] = trinket
end

local events = CreateFrame("Frame")
function events:UNIT_SPELLCAST_SUCCEEDED(unitID, spell, rank, lineID, spellID)
if not trinkets[unitID] then
return
end
if spellID == 59752 or spellID == 42292 then
CooldownFrame_SetTimer(trinkets[unitID], GetTime(), 120, 1)
SendChatMessage("Trinket used by: "..GetUnitName(unitID, true), "PARTY")
end
end

function events:PLAYER_ENTERING_WORLD()
local _, instanceType = IsInInstance()
if instanceType == "arena" then
self:RegisterEvent("UNIT_SPELLCAST_SUCCEEDED")
elseif self:IsEventRegistered("UNIT_SPELLCAST_SUCCEEDED") then
self:UnregisterEvent("UNIT_SPELLCAST_SUCCEEDED")
for _, trinket in pairs(trinkets) do
trinket:SetCooldown(0, 0)
trinket:Hide()
end
end
end
events:SetScript("OnEvent", function(self, event, ...) return self[event](self, ...) end)
events:RegisterEvent("PLAYER_ENTERING_WORLD")
This puts icons to the right of the arena frames. Does not track WotF - it now simply shares 30 seconds CD with trinkets, so it's impossible to track with just 1 icon. Only enables in arenas.


#277 Nathangrey1986

Nathangrey1986
  • Members
  • Posts: 6

Posted 13 June 2013 - 05:11 PM

zenga,

"this line" at the very beginning might be the problem.

Ignore if that's just how it looks on aj.

#278 Nathangrey1986

Nathangrey1986
  • Members
  • Posts: 6

Posted 13 June 2013 - 06:46 PM

Does anyone know if it's possible to change the health bar colors by percentage?

Icehud does it by default (color bar by health %
colors the health bar from MaxHealthColor to MinHealthColor based on current health %)

Also FireMageryGuru uses something that does it

/watch?v=y_9mDofnGGY on youtube

#279 Purelol

Purelol
  • Members
  • Posts: 1

Posted 14 June 2013 - 04:52 PM

Is it possible to disable or hide the Health Text and Mana Text of the ArenaEnemy Frames with some scripts?

I use sArena.


Thanks. ;-)

#280 zenga

zenga
  • Members
  • Posts: 322
  • LocationBelgium

Posted 14 June 2013 - 05:01 PM

View PostNathangrey1986, on 13 June 2013 - 05:11 PM, said:

zenga,

"this line" at the very beginning might be the problem.

Ignore if that's just how it looks on aj.

I left the LoadAddOn("Blizzard_ArenaUI") line out, as I call it for another script in the same addon file. But to make sure I removed any other script and tested every scenario, to no avail.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users

<