Displaying group number when in raid on pitbull
trying to display my group number when im in a raid in lua texts!! :banana:
|
Your question is a little unclear, if this doesn't cover it, could you be a bit more specific?
I looked for a pre-made API for this, but didn't find one so this should do it. Code:
function GetSubGroupID() |
basically i just want to display my group number when im in a raid.
if im in group #3, it will display "3" if im in group #4, it will display "4" if im not in a raid group at all, it wont display anything |
The function I posted should do that. Didn't it work for you? How do you want it displayed? You could try:
/run print(GetSubGroupID()) |
See this page for some usefull info about lua texts: http://www.wowace.com/addons/pitbull4/pages/lua-texts/
This, along with PARTY_MEMBERS_CHANGED as event might be all that is needed. Code:
if not UnitInRaid("player") then return |
WOW i completely skipped over mrruben5's post. -_-
|
*bump*
Does this work with pitbull 4 ? I can't find the event PARTY_MEMBER_CHANGED. |
This thread was about PitBull4 to begin with. ;)
|
If you want to display the group number for every raid member, you can use this code:
Code:
if not UnitInRaid("PLAYER") then return end |
Code:
UpdateIn(0.25) Enjoy All |
I was just researching this event and was glad to find this thread.
Thanks for all the code, but the Event PARTY_MEMBERS_CHANGED is not showing in the selector box. This is in PitBull -> Layout -> Texts. I find plenty of UNIT events in the list but not the above mentioned one. The event itself is in the LuaTexts.lua file in the PitBull4_LuaText folder. Any pointer is appreciated |
You should really use the local keyword when defining variables. Otherwise you're putting crap into the global namespace with generic names like "name" and "class".
Bad: Code:
name, rank, subgroup, level, class, fileName, zone, online, isDead, role, isML = GetRaidRosterInfo(i) Code:
local name, rank, subgroup, level, class, fileName, zone, online, isDead, role, isML = GetRaidRosterInfo(i) |
Quote:
|
Sorry to resurrect an old thread but this code has ceased working due to changes in 5.x , specifically this bit:
Quote:
|
Quote:
Code:
for i = 1 , GetNumGroupMembers() do Edit: Ah, if there's any PARTY_MEMBERS_CHANGED, RAID_ROSTER_UPDATE events they should both be replaced with GROUP_ROSTER_UPDATE. |
Quote:
Code:
for i = 1, GetNumGroupMembers() do |
All times are GMT -6. The time now is 07:06 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI