Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local auras = {48074,35912,38734,65075,65077,43223,15366,36880,36880,16609,48073,48469,26035,70233,70234,70235,70244,70242,70243}
- local BUFF_CHECK = {48074,35912,38734,65075,65077,43223,15366,36880,36880,16609,48073,48469,26035,70233,70234,70235,70244,70242,70243}
- local NPC_ID = 60019
- function BuffNPC_Gossip(event, player, unit)
- player:GossipMenuAddItem(0, "Heal me!", 0, 1)
- player:GossipMenuAddItem(0, "Remove sickness!", 0, 2)
- player:GossipSendMenu(1, unit)
- end
- function BuffNPC_Select(event, player, creature, sender, intid, code)
- if (intid == 1) then
- creature:CastSpell(player, 69693, false)
- end
- if (intid == 2) then
- player:RemoveAura(15007)
- end
- function BuffOnSight(event, creature, player)
- if creature:IsInRange(player, 1, 15) then
- local playerGUID = player:GetGUIDLow()
- if (playerGUID > 0) then
- local player = GetPlayerByGUID(playerGUID)
- if (player ~= nil) then
- if not player:HasAura(BUFF_CHECK) then
- for k, v in pairs(auras) do
- player:AddAura(v, player)
- end
- creature:SendChatMessageToPlayer(8, 0, "You have been buffed!", player)
- end
- end
- end
- end
- end
- end
- RegisterCreatureGossipEvent(NPC_ID, 1, BuffNPC_Gossip)
- RegisterCreatureGossipEvent(NPC_ID, 2, BuffNPC_Select)
- RegisterCreatureEvent(NPC_ID, 27, BuffOnSight)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement