- -- Defined Guards:
- local NPC_DREADGUARD = 13839
- -- Global Functions:
- -- local SPELL_FACE_TARGET = 6655 -- [PH] Spell used to make the guard target the player. Not working.
- local EMOTE_ACTIVE = 0
- function EMOTE_SALUTE(event, delay, pCall, creature)
- if (creature:IsInCombat() == false) then
- creature:Emote(66)
- creature:RegisterEvent(RESET_POSITION, 4500, 1)
- end
- end
- function RESET_POSITION(event, delay, pCall, creature)
- local D_X, D_Y, D_Z, D_O = creature:GetHomePosition() -- D_ = Default
- creature:SetFacing(D_O)
- EMOTE_ACTIVE = 0
- end
- -- UNDERCITY - Royal Dreadguard
- function DREADGUARD_RecieveEmote(event, creature, player, emoteid)
- if (EMOTE_ACTIVE == 0 and emoteid == 78 and player:IsHorde() == true) then -- TEXTEMOTE_SALUTE
- local P_O = player:GetO() - 3 -- P_ = Player
- EMOTE_ACTIVE = 1
- creature:SetFacing(P_O)
- creature:RegisterEvent(EMOTE_SALUTE, 2000, 1)
- end
- end
- RegisterCreatureEvent(NPC_DREADGUARD, 8, DREADGUARD_RecieveEmote)