Advertisement
Erictemponi

NPC Buff, Heal, etc.

Apr 28th, 2017
1,627
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.78 KB | None | 0 0
  1. local npcid = 190018
  2.  
  3. function morph_gossip(unit, player, creature)
  4.     player:GossipMenuAddItem(0, "|TInterface\\icons\\Spell_ChargePositive:30:30:-15:0|t Buffs|r", 0, 1)
  5.     player:GossipMenuAddItem(0, "|TInterface\\icons\\Spell_Nature_Rejuvenation:30:30:-15:0|t Me cure|r", 0, 2)
  6.     player:GossipMenuAddItem(0, "|TInterface\\icons\\Spell_Holy_BlessedRecovery:30:30:-15:0|t Remover Enjoo de Ressurreição|r", 0, 3)
  7.     player:GossipMenuAddItem(0, "|TInterface\\icons\\Ability_Parry:30:30:-15:0|t Resetar Combate|r", 0, 4)
  8.     player:GossipMenuAddItem(0, "|TInterface\\icons\\Spell_Arcane_MassDispel:30:30:-15:0|t Resetar Cooldown|r", 0, 5)
  9.     player:GossipMenuAddItem(0, "|TInterface\\icons\\Spell_Arcane_FocusedPower:30:30:-15:0|t Resetar Talentos|r", 0, 6, false, "Tem certeza de que deseja Resetar seus Pontos de Talento?")
  10.     player:GossipMenuAddItem(0, "|TInterface\\icons\\Spell_Shadow_UnstableAffliction_1:30:30:-15:0|t Resetar Instâncias|r", 0, 7, false, "Tem certeza de que deseja descinvular-se de todas as instâncias?")
  11.     player:GossipMenuAddItem(0, "|TInterface\\icons\\Ability_Repair:30:30:-15:0|t Reparar Itens|r", 0, 8)
  12.     player:GossipMenuAddItem(0, "|TInterface\\icons\\achievement_reputation_01:30:30:-15:0|t Deixa pra lá...|r", 0, 999)
  13.     player:GossipSendMenu(1, creature)
  14. end
  15.  
  16. function morph_select(event, player, creature, sender, intid)
  17.     if (intid == 1) then -- Buffs
  18.         player:AddAura(25898, player)
  19.         player:AddAura(48469, player)
  20.         player:AddAura(42995, player)
  21.         player:AddAura(48169, player)
  22.         player:AddAura(48073, player)
  23.         player:AddAura(48161, player)
  24.         player:AddAura(26035, player)
  25.         player:GossipComplete()
  26.     end
  27.    
  28.     if (intid == 2) then -- Heal
  29.         player:SetHealth(player:GetMaxHealth())
  30.         player:SetPower(player:GetMaxPower(0), 0)
  31.         player:GossipComplete()
  32.     end
  33.    
  34.     if (intid == 3) then -- Remove Sickness
  35.         player:RemoveAura(15007)
  36.         player:GossipComplete()
  37.     end
  38.    
  39.     if (intid == 4) then -- Reset Combat
  40.         player:ClearInCombat()
  41.         player:GossipComplete()
  42.     end
  43.    
  44.     if (intid == 5) then -- Reset Cooldown
  45.         player:ResetAllCooldowns()
  46.         player:GossipComplete()
  47.     end
  48.    
  49.     if (intid == 6) then -- Reset Talents
  50.         player:ResetTalents(true)
  51.         player:GossipComplete()
  52.     end
  53.    
  54.     if (intid == 7) then -- Reset Instances
  55.         player:UnbindAllInstances()
  56.         player:GossipComplete()
  57.     end
  58.    
  59.     if (intid == 8) then -- Repair Itens
  60.         player:DurabilityRepairAll(false)
  61.         player:GossipComplete()
  62.     end
  63.    
  64.     if (intid == 999) then -- Nevermind
  65.         player:GossipComplete()
  66.     end
  67. end
  68.  
  69. RegisterCreatureGossipEvent(npcid, 1, morph_gossip)
  70. RegisterCreatureGossipEvent(npcid, 2, morph_select)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement