CurseForge and Overwolf are joining forces!
Awesome More Information
  • 0

    posted a message on LuaTexts Official Thread
    Quote from Mortus84
    In advance - I'm sorry for possibly duplicating a past post ;[

    Sometime last year I was looking for a piece of lua code that would show the raid group number I'm currently in and would automatically update on every change (shown next to Pitbull4 unit frames). Apart from the code it required declaring a new event withing pitbull itself afair. Back then I found it and it worked like a charm but my HDD got busted a few days ago and I lost my UI (along with other things). So after a few hours of searching (I'm 90% sure I found what I was looking for somewhere in here) i gave up ;[ Can't find the bloody thing.

    If anyone could tell me how to do it (or point me in the direction of an existing topic) I would be very grateful.

    Spent a while but I finally found what I was looking for (was hiding on EJ forums). Copy-pasting for whoever might want it

    Normal version
    if UnitInRaid(unit) then
     local size = GetNumRaidMembers()
     local uname=Name(unit)
     i=1
     while i<=size do
      local name,_,subgroup = GetRaidRosterInfo(i)
      if uname==name then
       return "(%s)", subgroup
      end
      i=i+1
     end
    end


    Class color coded
    if UnitInRaid(unit) then
     local size = GetNumRaidMembers()
     local r,g,b=ClassColor(unit)
     local uname=Name(unit)
     i=1
     while i<=size do
      local name,_,subgroup = GetRaidRosterInfo(i)
      if uname==name then
       return "|cff%02x%02x%02x(%s)|r",r,g,b,subgroup
      end
      i=i+1
     end
    end

    It's also needed to add the event RAID_ROSTER_UPDATE and select Update for All.

    Thanks to Hotan, from who I shamelessly ripped this off.
    Posted in: Unit Frames
  • 0

    posted a message on LuaTexts Official Thread
    In advance - I'm sorry for possibly duplicating a past post ;[

    Sometime last year I was looking for a piece of lua code that would show the raid group number I'm currently in and would automatically update on every change (shown next to Pitbull4 unit frames). Apart from the code it required declaring a new event withing pitbull itself afair. Back then I found it and it worked like a charm but my HDD got busted a few days ago and I lost my UI (along with other things). So after a few hours of searching (I'm 90% sure I found what I was looking for somewhere in here) i gave up ;[ Can't find the bloody thing.

    If anyone could tell me how to do it (or point me in the direction of an existing topic) I would be very grateful.
    Posted in: Unit Frames
  • 0

    posted a message on Raid group number
    Ok, thanks. Will copy it there.
    Posted in: Lua Code Discussion
  • 0

    posted a message on Raid group number
    Sometime last year I was looking for a piece of lua code that would show the raid group number I'm currently in and would automatically update on every change (shown next to Pitbull4 unit frames). Apart from the code it required declaring a new event withing pitbull itself afair. Back then I found it and it worked like a charm but my HDD got busted a few days ago and I lost my UI (along with other things). So after a few hours of searching (I'm 90% sure I found what I was looking for somewhere in here) i gave up ;[ Can't find the bloody thing.

    If anyone could tell me how to do it (or point me in the direction of an existing topic) I would be very grateful.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.