Advertisement
WIXXZI

Ultraxion Wow Food & Heal

Jul 6th, 2012
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. function HealNPC_OnGossipTalk(pUnit, event, player, pMisc)
  2. if (player:IsInCombat() == true) then
  3. player:SendAreaTriggerMessage("You can't use this NPC while in combat!")
  4. else
  5. pUnit:GossipCreateMenu(3544, player, 0)
  6. pUnit:GossipMenuAddItem(2, "Heal Me!", 1, 0)
  7. pUnit:GossipMenuAddItem(2, "Give me food", 2, 0)
  8. pUnit:GossipSendMenu(player)
  9. end
  10. end
  11.  
  12. function HealNPC_OnGossipSelect(pUnit, event, player, id, intid, code)
  13. if(intid ==1) then
  14. player:CastSpell(25840)
  15. end
  16.  
  17. if(intid == 2) then
  18. player:AddItem(21215,20)
  19. end
  20. end
  21.  
  22. RegisterUnitGossipEvent(60300, 1, "HealNPC_OnGossipTalk")
  23. RegisterUnitGossipEvent(60300, 2, "HealNPC_OnGossipSelect")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement