Chat Bubble help
Hello,
I have found a code I'm trying to get to my liking and need some assistance. Below is the current code i'm using I have everything set how I would like it except the Senders name, I can get the "player" names to be class color but I cannot seem to get the NPC's name to change to the reaction they have against me (ie Friendly hated and so on). Current Code: Lua Code:
I have tried: Lua Code:
But I keep getting an error that says unit is nil. Any help on this would be great. Thanks Coke |
Where are you getting a UnitID from? I can't find it anywhere in the code.
|
Quote:
I guess ill just have to stick with the Class color for players and grey for everything else. Thanks Coke |
Have you had a look at BubbleBobble? http://www.wowinterface.com/download...bleBobble.html (I don't remember if it has what you're looking for)
/edit: it's also 5 years old. :) |
|
Ok so I think I'm getting closer..
I know this may seem long and drawn out but seems the only choice I have at the moment... Here is the code I'm trying Code:
local function UpdateFrame(frame, guid, name) Error: Code:
2x cChat\cChat-6.2.3.lua:493: attempt to index local 'color' (a nil value) Any ideas? Coke |
Throwing darts here, but this might help. Or not LOL. :rolleyes:
First, what kind of unit is "UNITZ"? Surely that's a typo... Lua Code:
Next, since NPCs don't have unitIDs unless you are directly interracting with them, but they do have GUIDs, you might want to sort that out. In other words, if you want to keep the reaction color for an NPC that you are indirectly interracting with (IE target of target, where target == tankPlayer and target'starget == boss), you will need to store or cache that. Lua Code:
|
I was browsing the CHAT_MSG_xx events, and nearly all have a GUID as one of their args. You can then convert the GUID into an unitID if necessary, even NPCs.
About using custom colors: you must check for those first before you use built in colors, for logical reasons. Think about this psuedocode logic: Lua Code:
|
Quote:
|
Thanks Everyone for the Help but it seems my coding skills suck so I'm just going to stick with what I have gotten to work.
This works for half of what I'm looking for. Code:
local function UpdateFrame(frame, guid, name) Coke |
All times are GMT -6. The time now is 01:13 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI