Krinolin

All-In-One NPC 2

Mar 9th, 2013
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.17 KB | None | 0 0
  1. --[[
  2.     This script
  3.     was created
  4.     by Krinolin
  5. --]]
  6.  
  7. local NPC_ID = 112112
  8.      
  9. local function On_GossipMenu(event, player, unit)
  10.  
  11.     if (player:IsInCombat()) then
  12.     player:SendNotification("You can not do that when in combat!")
  13.     else
  14.     if (player:IsGM()) then
  15.     player:GossipMenuAddItem(8, "GM Spells", 0, 1)
  16.     end
  17.     player:GossipMenuAddItem(2, "Max heal", 0, 2)
  18.     player:GossipMenuAddItem(2, "Remove Resurrection Sickness", 0, 3)
  19.     player:GossipMenuAddItem(3, "Learn weapon skills", 0, 4)
  20.     player:GossipMenuAddItem(3, "Advance weapon skills", 0, 5)
  21.     player:GossipMenuAddItem(3, "Artisan Riding", 0, 6)
  22.     player:GossipSendMenu(1, unit)
  23.     end
  24. end
  25.  
  26. local function On_GossipSelect(event, player, unit, sender, intid, code)
  27.     On_GossipMenu(event, player, unit)
  28.     if (intid == 2) then
  29.     player:SendAreaTriggerMessage("You are now fully healed!")
  30.     player:CastSpell(69693)
  31.    
  32.     elseif (intid == 1) then
  33.     player:LearnSpell(69693)
  34.     player:LearnSpell(35874)        -- Here you can add more GM spells
  35.     player:LearnSpell(35912)
  36.     player:LearnSpell(38734)
  37.  
  38.     elseif (intid == 3) then
  39.     player:SendAreaTriggerMessage("Ressurection Sickness is now removed!")
  40.     local aura = player:GetAura(15007)
  41.     if(aura) then
  42.     aura:Remove()
  43.     end
  44.    
  45.     elseif (intid == 4) then
  46.     player:SendAreaTriggerMessage("You have learned all weapon skills!")
  47.     player:LearnSpell(201)
  48.     player:LearnSpell(202)
  49.     player:LearnSpell(196)
  50.     player:LearnSpell(197)
  51.     player:LearnSpell(227)
  52.     player:LearnSpell(200)
  53.     player:LearnSpell(266)
  54.     player:LearnSpell(264)
  55.     player:LearnSpell(5011)
  56.     player:LearnSpell(3018)
  57.     player:LearnSpell(198)
  58.     player:LearnSpell(199)
  59.     player:LearnSpell(1180)
  60.     player:LearnSpell(2567)
  61.     player:LearnSpell(2764)
  62.     player:LearnSpell(5009)
  63.     player:LearnSpell(5019)
  64.    
  65.     elseif (intid == 5) then
  66.     player:SendAreaTriggerMessage("Your weapon skills are now maxed!")
  67.     player:AdvanceAllSkills(450)
  68.     player:AdvanceSkill (176, 450)
  69.    
  70.     elseif (intid == 6) then
  71.     player:SendAreaTriggerMessage ("You have learned Artisan Riding!")
  72.     player:LearnSpell(34091)
  73.     player:Learnspell(54197)
  74.     end
  75. end
  76. RegisterCreatureGossipEvent(NPC_ID, 1, On_GossipMenu)
  77. RegisterCreatureGossipEvent(NPC_ID, 2, On_GossipSelect)
Advertisement
Add Comment
Please, Sign In to add comment