local was_full = false local last_play = 0 local sound_fp = "Interface\\AddOns\\nswa\\assets\\okletsgo.ogg" local frame = CreateFrame("Frame") frame:RegisterEvent("GROUP_ROSTER_UPDATE") frame:RegisterEvent("PLAYER_ENTERING_WORLD") local function play_sound() local now = GetTime() if now - last_play > 3 then PlaySoundFile(sound_fp, "Master") last_play = now end end frame:SetScript("OnEvent", function() if IsInGroup() and not IsInRaid() then local num = GetNumGroupMembers() local is_full = (num == 5) if is_full and not was_full then print("Full House!") play_sound() end was_full = is_full else was_full = false end end)