Advertisement
Guest User

Weapon Trainer

a guest
Jun 3rd, 2010
836
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.86 KB | None | 0 0
  1. --[[ Weapon Trainer By Reflexiz ]]--
  2.  
  3. local NPCID = XXX
  4.  
  5. function Trainer_OnGossip(unit, event, player)
  6. unit:GossipCreateMenu(100, player, 0)
  7. unit:GossipMenuAddItem(0, "Learn Weapon Skills.", 0, 0)
  8. unit:GossipMenuAddItem(0, "Advance All Weapon Skills", 1, 0)
  9.  
  10. unit:GossipSendMenu(player)
  11. end
  12.  
  13. function Trainer_SubMenus(unit, event, player, id, intid, code)
  14. if(intid == 0) then --[Learn Weapon Skills]--
  15. unit:GossipCreateMenu(101, player, 0)
  16. player:LearnSpell(201) -- One-Handed Swords
  17. player:LearnSpell(202) -- Two-Handed Swords
  18. player:LearnSpell(196) -- One-Handed Axes
  19. player:LearnSpell(197) -- Two-Handed Axes
  20. player:LearnSpell(227) -- Staves
  21. player:LearnSpell(200) -- Polearms
  22. player:LearnSpell(266) -- Guns
  23. player:LearnSpell(264) -- Bows
  24. player:LearnSpell(5011) -- Crossbows
  25. player:LearnSpell(3018) -- Shoot (Bow, Crossbow or Gun)
  26. player:LearnSpell(198) -- One-Handed Maces
  27. player:LearnSpell(199) -- Two-Handed Maces
  28. player:LearnSpell(1180) -- Daggers
  29. player:LearnSpell(2567) -- Thrown
  30. player:LearnSpell(2764) -- Throw (With Thrown)
  31. player:LearnSpell(5009) -- Wands
  32. player:LearnSpell(5019) -- Shoot (Wands)
  33. player:GossipComplete()
  34. end
  35.  
  36. if(intid == 1) then --[Advance Skills]--
  37. unit:GossipCreateMenu(102, player, 0)
  38. player:AdvanceSkill (43, 399)
  39. player:AdvanceSkill (44, 399)
  40. player:AdvanceSkill (45, 399)
  41. player:AdvanceSkill (46, 399)
  42. player:AdvanceSkill (54, 399)
  43. player:AdvanceSkill (55, 399)  
  44. player:AdvanceSkill (136, 399)
  45. player:AdvanceSkill (160, 399)
  46. player:AdvanceSkill (172, 399)
  47. player:AdvanceSkill (173, 399)
  48. player:AdvanceSkill (176, 399)
  49. player:AdvanceSkill (226, 399)
  50. player:AdvanceSkill (228, 399)
  51. player:AdvanceSkill (229, 399)
  52. player:AdvanceSkill (473, 399)
  53. player:GossipComplete()
  54. end
  55. end
  56.  
  57.  
  58. RegisterUnitGossipEvent(IdOfYourNPC, 1,"Trainer_OnGossip")
  59. RegisterUnitGossipEvent(IdOfYourNPC, 2,"Trainer_SubMenus")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement