View Single Post
06-20-17, 01:10 PM   #2
pas06
A Theradrim Guardian
Join Date: Apr 2009
Posts: 62
First thing i notice: UnitDebuff is not an event. Events are written in all capital letters. The event you are looking for is UNIT_AURA.

this should do it:
Lua Code:
  1. local Blinding_Peck = GetSpellInfo(195561)
  2.  
  3. local frame = CreateFrame("FRAME")
  4.  
  5. frame:RegisterUnitEvent("UNIT_AURA", "player", "party1", "party2", "party3", "party4")
  6.  
  7. frame:SetScript("OnEvent", function(self, event, unitID)
  8.    
  9.     if UnitDebuff(unitID, Blinding_Peck) then
  10.         PlaySoundFile("Interface\\AddOns\\Segullspeck\\media\\Seagullspeck.ogg", "Master")
  11.     end
  12. end)

Last edited by pas06 : 06-20-17 at 01:12 PM.
  Reply With Quote