Jump to content

Photo

Default UI Scripts


  • Please log in to reply
711 replies to this topic

#701 peezus

peezus
  • Junkies
  • Humanclass_name
  • US-Darkspear
  • Cyclone
  • Posts: 3
  • Talents: Arcane 1/1/0/2/2/1/2
  • 2v2: 1552
  • 3v3: 2453
  • RBG: 1543

Posted 10 October 2016 - 03:48 AM

Is there anyway I can show healthbar and manabar text with percentages and numeric value for for only player, target, and focus frames? I would like to hide them for pet frame, party frames and arena frames.

 

I have this for the Pet Frame but once I hover over the healthbar and manabar with my mouse it will show the text again.

 

PetFrameHealthBarTextLeft:Hide()
PetFrameHealthBarTextRight:Hide()
PetFrameManaBarTextLeft:Hide()
PetFrameManaBarTextRight:Hide()
 

Thank You!


  • 0

#702 kheath812

kheath812
  • Members
  • Blood Elfclass_name
  • US-Ner'zhul
  • Bloodlust
  • Posts: 1
  • Talents: Fire 1/0/1/1/0/1/0

Posted 18 October 2016 - 10:18 PM

Is it possible to have unit frame hp bars have reaction colors for npcs? like yellow red or green depending on hostility? i dont like all npcs having green hp. along with class colored hp for players ofc.

 

edit: i got it to work, however i get an error any time i mouse over something.

 

heres the code:

local function colour(statusbar, unit)
    local _, class, c
    if UnitIsPlayer(unit) and UnitIsConnected(unit) and unit == statusbar.unit and UnitClass(unit) then
        _, class = UnitClass(unit)
        c = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[class] or RAID_CLASS_COLORS[class]
        statusbar:SetStatusBarColor(c.r, c.g, c.b)	
    else
        _, class = UnitClass(unit)
        myred, mygreen, myblue, myalpha = UnitSelectionColor(unit)
        statusbar:SetStatusBarColor(myred, mygreen, myblue)
    end
end

hooksecurefunc("UnitFrameHealthBar_Update", colour)
hooksecurefunc("HealthBar_OnValueChanged", function(self)
    colour(self, self.unit)
end)

and heres the error:

65x CustomScripts\code.lua:70: Usage: UnitClass("unit")
[C]: in function `UnitClass'
CustomScripts\code.lua:70: in function <CustomScripts\code.lua:63>
CustomScripts\code.lua:79: in function <CustomScripts\code.lua:78>
[C]: in function `HealthBar_OnValueChanged'
[string "*:OnValueChanged"]:1: in function <[string "*:OnValueChanged"]:1>

Locals:
(*temporary) = nil

  • 0

#703 salty_s

salty_s
  • Members
  • Orcclass_name
  • EU-Twisting Nether
  • Rampage / Saccage
  • Posts: 2
  • Talents: Unholy 2/1/1/1/1/2/2
  • 5v5: 96

Posted 20 October 2016 - 05:32 PM

Hey guys, i've been using lorti ui for a while, but i recently got myself bartender4. i was wondering is it possible to make lortiUI work on bartender? becouse it doesnt seem to darken the borders around the action bars etc imgur.com/HlnAMOC


  • 0

#704 Wilhelmhegel

Wilhelmhegel
  • Junkies
  • Humanclass_name
  • EU-Emeriss
  • Reckoning / Abrechnung
  • Posts: 21
  • Talents: Frost 1/2/1/2/1/2/2
  • 2v2: 766
  • 3v3: 1751
  • RBG: 1134

Posted 29 October 2016 - 03:48 PM

does anyone know why a lot of script (such as, autosell,autorepair,chat mods, etc ...) stopped working?


  • 0

#705 Wilhelmhegel

Wilhelmhegel
  • Junkies
  • Humanclass_name
  • EU-Emeriss
  • Reckoning / Abrechnung
  • Posts: 21
  • Talents: Frost 1/2/1/2/1/2/2
  • 2v2: 766
  • 3v3: 1751
  • RBG: 1134

Posted 31 October 2016 - 04:21 PM

^up


  • 0

#706 Lighteight

Lighteight
  • Members
  • Humanclass_name
  • EU-Outland
  • Misery
  • Posts: 1
  • Talents: Assassination 0/1/2/1/2/1/0
  • 2v2: 1461
  • 3v3: 1132
  • RBG: 192

Posted 02 December 2016 - 11:21 PM

Help me please with script macro - target, focus combat status check , arena frames scale and move. All what i find work wrong. Also wont see stop watch only with seconds no textures points. Sry for lenguage and if i miss something.


  • 0

#707 Dannycarey2

Dannycarey2
  • Junkies
  • Undeadclass_name
  • US-Tichondrius
  • Bloodlust
  • Posts: 9
  • Talents: Mistweaver 1/0/2/0/0/1
  • 2v2: 2415
  • 3v3: 2909
  • 5v5: 2387
  • RBG: 2393

Posted 03 December 2016 - 10:31 PM

The default nameplates suck, so I made scripts to improve them. These will hide nameplate name text unless it's a totem, and change friendly nameplates' color to black, a color that contrasts with enemy class colors really well. Run the first one before the second one and both only once per login:

 

/run function dan5()for i,frame in ipairs(C_NamePlate.GetNamePlates())do dan6=frame.namePlateUnitToken dan7=UnitClass(dan6)dan8=frame.UnitFrame if type(dan7)=="string"and not string.find(dan7," Totem")then dan8.name:SetAlpha(0)end dan9(dan6)end end

 

/run function dan9(dz)if UnitIsFriend("player",dz)then dan8.healthBar:SetStatusBarColor(0,0,0)end end dan1=0 function dan2(self,dan3)dan1=dan1+dan3 if dan1>=.01 then dan1=0 dan5()end end local dan4=CreateFrame("frame")dan4:SetScript("OnUpdate",dan2)


  • 1

#708 Dannycarey2

Dannycarey2
  • Junkies
  • Undeadclass_name
  • US-Tichondrius
  • Bloodlust
  • Posts: 9
  • Talents: Mistweaver 1/0/2/0/0/1
  • 2v2: 2415
  • 3v3: 2909
  • 5v5: 2387
  • RBG: 2393

Posted 06 December 2016 - 01:09 AM

show raid frame(s) while solo:

/run CompactRaidFrameManager:Show()CompactRaidFrameManager.container:Show()


  • 0

#709 Dannycarey2

Dannycarey2
  • Junkies
  • Undeadclass_name
  • US-Tichondrius
  • Bloodlust
  • Posts: 9
  • Talents: Mistweaver 1/0/2/0/0/1
  • 2v2: 2415
  • 3v3: 2909
  • 5v5: 2387
  • RBG: 2393

Posted 07 December 2016 - 10:24 PM

Reasonably confident these will fix the default raid frames to never get targeting bugs, and added functionality to hide frames of people that leave during combat. I recommend putting them all into macros named zz1-6 and binding this macro to run them all when you log in. I haven't tested these very much so let me know: 
 
/run if not UnitAffectingCombat("player")then local p="zz"for i=1,6 do RunScript(GetMacroBody(p..i))end end
 
 
function CompactRaidFrameContainer_TryUpdate(self)if (not UnitAffectingCombat("player")and CompactRaidFrameContainer_ReadyToUpdate(self))then CompactRaidFrameContainer_LayoutFrames(self)end end
 
bo=false function d1()seterrorhandler(print)bo=true end function CompactRaidFrameContainer_UpdateDisplayedUnits(self)if not UnitAffectingCombat("player")then if (IsInRaid())then self.units=self.raidUnits else self.units=self.partyUnits end end end
 
function danGG()CompactRaidFrameContainer_UpdateDisplayedUnits(CompactRaidFrameContainer)bo=false local i=1 seterrorhandler(d1)while bo==false do local gg="CompactRaidFrame"..i _G[gg]:SetAttribute("unit",tostring(_G[gg].unit))i=i+1 end end
 
function danGG2() bo=false local i=1 seterrorhandler(d1)while bo==false do local gg="CompactRaidFrame"..i _G[gg.."HealthBar"]:SetAlpha(1)if _G[gg].unit==nil then _G[gg.."HealthBar"]:SetAlpha(0)end i=i+1 end end
 
danFrame=CreateFrame("frame")danFrame:RegisterEvent("PLAYER_REGEN_ENABLED")danFrame:RegisterEvent("GROUP_ROSTER_UPDATE")
 
danFrame:SetScript("OnEvent",function(self,event,...)if (event=="PLAYER_REGEN_ENABLED")then CompactRaidFrameContainer_TryUpdate(CompactRaidFrameContainer)danGG()end if (event=="GROUP_ROSTER_UPDATE")then danGG2()end end)

  • 1

#710 Abidalzim

Abidalzim
  • Junkies
  • Orcclass_name
  • EU-Balnazzar
  • Raserei / Frenzy
  • Posts: 831
  • Talents: Mistweaver 2/0/2/2/0/2/1
  • 2v2: 1625
  • 3v3: 2471
  • RBG: 576

Posted 24 December 2016 - 05:23 PM

Hello, I've been messing around with an old addon by Miirkat to display class icons on the portrait, if the target is a druid it should display the form icon instead.

That's mostly working correctly so far, I would like to change something tho - I don't want pets, mobs and npcs to display a class icon, just the regular portrait... is that possible? Also the feral talent "Claws of Shirvallah" isn't being detected properly, can't understand why, I've already added the correct ID. And finally, most likely the code is extremely outdated which might lead to errors/bad performance. If someone could give it a look I would really, really appreciate it!
 

UFP = "UnitFramePortrait_Update"
UICC = "Interface\\TargetingFrame\\UI-Classes-Circles"
CIT = CLASS_ICON_TCOORDS

hooksecurefunc(UFP, function(self)
if self.portrait then
if self.unit == "player" or self.unit == "pet" or self.unit == "partypet1" or self.unit == "partypet2" or self.unit == "partypet3" or self.unit == "partypet4" then return end
if select(2,UnitClass(self.unit)) == "DRUID" then
local i, flag=1, false
while UnitBuff(self.unit, i) do
local id = select(11,UnitBuff(self.unit, i))


--768 (Cat Form) 783 (Travel Form) 5487 (Bear Form) 24858 (Moonkin Form) 33891 (Incarnation: Tree of Life)
--102543 (Incarnation: King of the Jungle) 102558 (Incarnation: Son of Ursoc) 102560 (Incarnation: Chosen of Elune) 165962 (Flight Form) 171745 (Claws of Shirvallah)

if id == 768 or id == 783 or id == 5487 or id == 24858 or id == 33891 or id == 33943 or id == 102543 or id == 102558 or id == 102560 or id == 102560 or id == 165962 or id == 171745 then
SetPortraitToTexture(self.portrait, GetSpellTexture(id));
self.portrait:SetTexCoord(0, 1, 0, 1)
flag = true
end

i = i + 1

end
if not flag then
self.portrait:SetTexture(UICC)
self.portrait:SetTexCoord(unpack(CIT.DRUID))
end

else
local t = CIT[select(2,UnitClass(self.unit))]
if t then self.portrait:SetTexture(UICC)
self.portrait:SetTexCoord(unpack(t))

end
end
end
end)

Is anyone still using this script? Is there a way to reliably add the astral moonkin form id == 197625? It seems to only work if you actually change into it from some other form, but not normal caster form. :o


  • 0
Zaka pa te če naja morš te ne, te pa če pa te ne čuj, kaj te to te je, ne?

#711 salty_s

salty_s
  • Junkies
  • Blood Elfclass_name
  • EU-Stormscale
  • Cyclone / Wirbelsturm
  • Posts: 2
  • Talents: Unholy 1/2/2/0/1/2/2
  • 2v2: 384
  • 3v3: 1863
  • RBG: 192

Posted 27 April 2017 - 03:48 PM

Right so, I've been having a problem with my Unit frames. i'm perfectly happy using percentages for my health but it's a little bit problematic when for instance my DH has 150 fury so i was wondering if there is a script I can use to keep my health percentage wise and recourse numeric

(I don't care about other frames their recourse bar only mine, 
http://imgur.com/a/P4oiK

Any help would be appreciated


  • 0

#712 Tussinwulf

Tussinwulf
  • Junkies
  • Humanclass_name
  • US-Cenarius
  • Whirlwind
  • Posts: 57
  • Talents: Retribution 0/1/2/1/0/0/1

Posted 29 July 2017 - 05:27 PM

Can anyone fix this script? (http://www.arenajunk...nverter-script/) It inverts the focus frame, problem is, it doesn't put the status text in the right place on the frame (the health # and %). Also, in PVP it doesn't move the prestige icon.

local Script = CreateFrame("Frame")

-- xInvert()
-- Inverts the anchor points of a frame horizontally.
-- > Frame: Frame reference
local InvertPoint = {
["TOPLEFT"] = "TOPRIGHT",
["TOPRIGHT"] = "TOPLEFT",
["BOTTOMLEFT"] = "BOTTOMRIGHT",
["BOTTOMRIGHT"] = "BOTTOMLEFT",
["TOP"] = "TOP",
["BOTTOM"] = "BOTTOM",
["LEFT"] = "RIGHT",
["RIGHT"] = "LEFT",
["CENTER"] = "CENTER"
}
local function xInvert(Frame)
local AnchorData = {}
for i = 1, Frame:GetNumPoints() do AnchorData[i] = { Frame:GetPoint(i) } end
Frame:ClearAllPoints()
for _, A in pairs(AnchorData) do Frame:SetPoint(InvertPoint[A[1]], A[2], InvertPoint[A[3]], A[4] * -1, A[5]) end
end

-- FocusCastRepos()
-- Corrects the X-offset of the FocusFrame castbar, to adapt it to the inverted focus.
local function FocusCastRepos()
local FocusRight = FocusFrameManaBar:GetRight() * FocusFrameManaBar:GetEffectiveScale() / FocusFrameSpellBar:GetEffectiveScale()
local CastRight = FocusFrameSpellBar:GetRight()
local P = { FocusFrameSpellBar:GetPoint() }
FocusFrameSpellBar:SetPoint(P[1], P[2], P[3], P[4] + FocusRight - CastRight + 2, P[5])
Script:SetScript("OnUpdate", nil)
end

-- Inverting FocusFrame textures and frames
FocusFrame.borderTexture:SetTexCoord(1.0, 0.09375, 0, 0.78125)
FocusFrameFlash:SetTexCoord(0.9453125, 0, 0, 0.181640625)
FocusFrameFlash.SetTexCoord = function() end
FocusFrame.pvpIcon:SetPoint("TOPRIGHT", -149, -20)
FocusFrame.levelText:SetPoint("CENTER", -61, -17)
for _, v in pairs({FocusFrameFlash, FocusFrameTextureFrameHealthBarText, FocusFrameTextureFrameManaBarText}) do xInvert(v) end
for _, v in pairs({"name", "deadText", "threatNumericIndicator", "portrait", "Background", "healthbar", "manabar", "nameBackground", "questIcon", "petBattleIcon", "leaderIcon", "raidTargetIcon"}) do xInvert(FocusFrame[v]) end
FocusFrameFlash.SetPoint = function() end
FocusFrame.levelText.SetPoint = function() end
FocusFrame.Background.SetPoint = function() end

-- Inverting Focus-target
FocusFrameToTTextureFrameTexture:SetTexCoord(0.7265625, 0.015625, 0, 0.703125)
FocusFrameToT:ClearAllPoints()
FocusFrameToT:SetPoint("BOTTOMRIGHT", FocusFrame, "BOTTOMRIGHT", -135, -18)
FocusFrameToT.name:SetPoint("BOTTOMLEFT", 1, 2)
for _, v in pairs({"portrait", "healthbar", "manabar", "deadText", "background"}) do xInvert(FocusFrameToT[v]) end
for i = 1, 4 do xInvert(_G["FocusFrameToTDebuff"..i]) end -- Mini debuffs

-- Correcting castbar position in the next frame (when the anchor changes will be updated)
hooksecurefunc(FocusFrameSpellBar, "SetPoint", function() Script:SetScript("OnUpdate", FocusCastRepos) end)

-- Adjusting buff/debuff positions
hooksecurefunc("TargetFrame_UpdateAuras", function(s)
if s ~= FocusFrame then return end
for _, Aura in pairs({ FocusFrameBuff1, FocusFrameDebuff1 }) do
if Aura then
local P = { Aura:GetPoint() } -- Anchor point data
if P[2] == FocusFrame then Aura:SetPoint(P[1], P[2], P[3], 105, P[5]) end
end
end
end)

Edited by Seal, 29 July 2017 - 05:33 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

<