Advertisement
Rochet2

Psykko

May 7th, 2012
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --[[
  2.     SkillNPC
  3.     Scripted by Psykko @ Ms-Crew.net - Bloodhorn Reloaded
  4. ]]--
  5.  
  6. local T =
  7. {
  8.     -- Aufbau: [Klasse] = {SpellID}
  9.     ["Paladin"] = {20773,13819,34767},
  10.     ["Warrior"] = {355,25275,30330,71,2458},
  11.     ["Hunter"] = {1515,883,5149,982,6991},
  12.     ["Druid"] = {6795,26996,5487,9634,1066,33943,40120},
  13.     ["Mage"] = {45438},
  14.     ["Warlock"] = {688,697,712,691,5784,23161},
  15.  
  16.     ["NPCID"] = 70012,
  17. }
  18.  
  19. function Spell_OnGossipTalk(unit, event, pPlayer)
  20.     unit:GossipCreateMenu(3000, pPlayer, 0)
  21.     unit:GossipMenuAddItem(2, "Klassen Skills", 1, 0)
  22.     unit:GossipMenuAddItem(0, "Auf Wiedersehn", 2, 0)
  23.     unit:GossipSendMenu(pPlayer)
  24. end
  25.  
  26. function Spell_OnGossipSelect(unit, event, pPlayer, id, intid, code)
  27.     if (intid == 1) then
  28.         local Class = pPlayer:GetPlayerClass()
  29.         if(Class and T[Class]) then
  30.             for _, SpellID in ipairs(T[Class]) do
  31.                 pPlayer:LearnSpell(SpellID)
  32.             end
  33.         end
  34.     end
  35.     pPlayer:GossipComplete()
  36. end
  37.  
  38. RegisterUnitGossipEvent(T.NPCID, 1, Spell_OnGossipTalk)
  39. RegisterUnitGossipEvent(T.NPCID, 2, Spell_OnGossipSelect)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement