Register for your free account! | Forgot your password?

Go Back   elitepvpers > World of Warcraft > WoW Addons
You last visited: Today at 04:46

  • Please register to post and access all features, it's quick, easy and FREE!

Need help with lua script

Discussion on Need help with lua script within the WoW Addons forum part of the World of Warcraft category.

Old   #1
elite*gold: 0
Join Date: Feb 2018
Posts: 1
Received Thanks: 0
Exclamation Need help with lua script

Hello there,

I need help with a lua script, I would like to add color into PlayerFrame aswell same as TargetFrame and FocusFrame.

In the code below it already have class color in health bar and color behind name of target and focus, not player frame.
(red marked text is the code I tried to implement without any success)

local frame = CreateFrame("FRAME")
frame:RegisterEvent("PLAYER_FRAME_CHANGED")<- Not sure about this one, tried many different texts.

local function eventHandler(self, event, ...)
if UnitIsPlayer("target") then
c = RAID_CLASS_COLORS[select(2, UnitClass("target"))]
TargetFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
if UnitIsPlayer("focus") then
c = RAID_CLASS_COLORS[select(2, UnitClass("focus"))]
FocusFrameNameBackground:SetVertexColor(c.r, c.g, c.b)
if UnitIsPlayer("player") then
c = RAID_CLASS_COLORS[select(2, UnitClass("player"))]
PlayerFrameNameBackground:SetVertexColor(c.r, c.g, c.b)


frame:SetScript("OnEvent", eventHandler)

for _, BarTextures in pairs({TargetFrameNameBackground, FocusFrameNameBackground, PlayerFrameNameBackground}) do
BarTextures:SetTexture("Interface\\TargetingFrame\ \UI-StatusBar")

rbkz is offline  

classcolor in playerframe

« WoW addon installer | [Suche] Tukui v11 für 3.3.5 »

Similar Threads
hilfe bei lua script/ need help with lua script
10/06/2014 - General Coding - 2 Replies
Hi leute ich versuche ein script in für mein Iphone zu schreiben und könnte ein bisschen hilfe von einem Experten gebrauchen können also wenn jemand was von lua versteht bitte bei mir per pn melden! Hey guys im trying to write a lua script on my iphone and need some help at some points by an expert so if anybody knows lua better than me pls pn me!
[LUA] need help in decrypting / encrypting lua
08/12/2013 - General Coding - 7 Replies
The title pretty much says it all but ill explain a bit more as to what Im in need, basically I have decompiled a script using this website, i've got the code etc but it contains some really werid stuff like etc , I wanted to decrypt the file simply to change some stuff in it, I did so but then I did not know how to encrypt it back so I messaged my friend and he gave me this local code_to_decode = "script to encrypt" local output = "" for i = 1, #code_to_decode do output = output...
[Realase]Décripteur de fichier lua ressource 7.3 /Décripteur resource file lua 7.3
04/08/2012 - Rappelz Private Server - 5 Replies
Sehr weit geführte locale_.lua (locale_big5.lua)
08/02/2010 - Metin2 PServer Guides & Strategies - 50 Replies
Abend^^ Habe hier mal selber eine locale_.lua übersetzt! Ich habe mich von anderen localen inspirieren lassen habe sie aber bis auf 6 Zeilen selber geschrieben!! Ich werde sie, wenn ihr mir sagt welche quests die von zeile 300 - 900 sind, noch vervollständigen aber erstes Ziel... Website mit allen Quests zum Ansehen und einzelnen Download! Hoffe konnte euch weiterhelfen! Locale_.lua + damit auch die Lehrer deutsch sind! Updatestand: 22.01.2010 Version 1: locale_.lua...

All times are GMT +1. The time now is 04:46.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Abuse
Copyright ©2019 elitepvpers All Rights Reserved.