Advertisement
WIXXZI

Untitled

Jan 5th, 2023
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.44 KB | None | 0 0
  1. local auras = {48074,35912,38734,65075,65077,43223,15366,36880,36880,16609,48073,48469,26035,70233,70234,70235,70244,70242,70243}
  2. local BUFF_CHECK = {48074,35912,38734,65075,65077,43223,15366,36880,36880,16609,48073,48469,26035,70233,70234,70235,70244,70242,70243}
  3. local NPC_ID = 60019
  4. function BuffNPC_Gossip(event, player, unit)
  5.  
  6. player:GossipMenuAddItem(0, "Heal me!", 0, 1)
  7. player:GossipMenuAddItem(0, "Remove sickness!", 0, 2)
  8. player:GossipSendMenu(1, unit)
  9. end
  10.  
  11. function BuffNPC_Select(event, player, creature, sender, intid, code)
  12. if (intid == 1) then
  13. creature:CastSpell(player, 69693, false)
  14. end
  15.  
  16. if (intid == 2) then
  17. player:RemoveAura(15007)
  18. end
  19.  
  20. function BuffOnSight(event, creature, player)
  21. if creature:IsInRange(player, 1, 15) then
  22. local playerGUID = player:GetGUIDLow()
  23. if (playerGUID > 0) then
  24. local player = GetPlayerByGUID(playerGUID)
  25. if (player ~= nil) then
  26. if not player:HasAura(BUFF_CHECK) then
  27. for k, v in pairs(auras) do
  28. player:AddAura(v, player)
  29. end
  30. creature:SendChatMessageToPlayer(8, 0, "You have been buffed!", player)
  31. end
  32. end
  33. end
  34. end
  35. end
  36. end
  37.  
  38. RegisterCreatureGossipEvent(NPC_ID, 1, BuffNPC_Gossip)
  39. RegisterCreatureGossipEvent(NPC_ID, 2, BuffNPC_Select)
  40. RegisterCreatureEvent(NPC_ID, 27, BuffOnSight)
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement