Logo

index : nswa

WoW addon which removes annoyances and adds QoL (for me)

  • summary
  • about
  • tree
  • log
  • branches
<< path: root/public/nswa.git/html/nswa_group_is_full.lua blob: e713512e3ee9e369ee5b3a7bf84cd0b71ba876eb [raw] [clear marker]

        
0
1
2local was_full = false
3local last_play = 0
4local sound_fp = "Interface\\AddOns\\nswa\\assets\\okletsgo.ogg"
5
6local frame = CreateFrame("Frame")
7frame:RegisterEvent("GROUP_ROSTER_UPDATE")
8frame:RegisterEvent("PLAYER_ENTERING_WORLD")
9
10
11local function play_sound()
12 local now = GetTime()
13 if now - last_play > 3 then
14 PlaySoundFile(sound_fp, "Master")
15 last_play = now
16 end
17end
18
19frame:SetScript("OnEvent", function()
20 if IsInGroup() and not IsInRaid() then
21 local num = GetNumGroupMembers()
22 local is_full = (num == 5)
23
24 if is_full and not was_full then
25 print("Full House!")
26 play_sound()
27 end
28
29 was_full = is_full
30 else
31 was_full = false
32 end
33end)
34
35
Copyright 2026  E766CB298A6D1E64 | Git-Thing heavily inspired by cgit