Advertisement
randy336

[Eluna] Profession Trainer

Dec 5th, 2013
400
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.48 KB | None | 0 0
  1. --[[
  2. - Developer(s): Ghostcrawler336
  3. - Complete: %15
  4. - ScriptName: 'Profession Trainer'
  5. - Comment: N/A
  6. ]]--
  7.  
  8. local NPC_Entry = 600000
  9.  
  10. function On_Gossip(event, player, unit)
  11. --Menu
  12. player:GossipMenuAddItem(0, "Alchemy", 2, 0)
  13. player:GossipMenuAddItem(0, "Blacksmithing", 3, 0)
  14. player:GossipMenuAddItem(0, "Enchanting", 4, 0)
  15. player:GossipMenuAddItem(0, "Engineering", 5, 0)
  16. player:GossipMenuAddItem(0, "Herbalism", 6, 0)
  17. player:GossipMenuAddItem(0, "Inscription", 7, 0)
  18. player:GossipMenuAddItem(0, "Jewelcrafting", 8, 0)
  19. player:GossipMenuAddItem(0, "Leatherworking", 9, 0)
  20. player:GossipMenuAddItem(0, "Mining", 10, 0)
  21. player:GossipMenuAddItem(0, "Skinning", 11, 0)
  22. player:GossipMenuAddItem(0, "Cooking", 12, 0)
  23. plauer:GossipMenuAddItem(0, "First Aid", 13, 0)
  24. player:GossipMenuAddItem(0, "Fishing", 14, 0)
  25. player:GossipMenuAddItem(0, "Tailoring", 15, 0)
  26. player:GossipSendMenu(1, unit)
  27. end
  28.  
  29. function On_Select(unit, event, player, id, intid, code)
  30. -- Functions to learn professions
  31.  
  32. -- Alchemy
  33. if(intid == 2) then
  34. player:LearnSpell(50301, player)
  35. SendBroadcastMessage("I have trained you Alchemy, enjoy.")
  36. end
  37.  
  38. -- Blacksmithing
  39. if(intid == 3) then
  40. player:LearnSpell(51298, player)
  41. SendBroadcastMessage("I have trained you Blacksmithing, enjoy.")
  42. end
  43.  
  44. if(intid == 4) then
  45. player:LearnSpell(51312, player)
  46. SendBroadcastMessage("I have trained you Enchanting, enjoy.")
  47. end
  48.  
  49.  
  50. RegisterCreatureGossipEvent(NPC_ID, 1, On_Gossip)
  51. RegisterCreatureGossipEvent(NPC_ID, 2, On_Select)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement