Advertisement
Guest User

Multi NPC V 1.0

a guest
Jun 4th, 2010
717
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.12 KB | None | 0 0
  1. --[[ Multi NPC By Reflexiz ]]--
  2.  
  3. local NPCID = XX --[Replace XX With Your NPC ID]--
  4.  
  5. function Trainer_OnGossip(unit, event, player)
  6. unit:GossipCreateMenu(100, player, 0)
  7. unit:GossipMenuAddItem(0, "|cFF8B0000Learn Weapon Skills.", 0, 0)
  8. unit:GossipMenuAddItem(0, "|cFF8B0000Advance All Weapon Skills", 1, 0)
  9. unit:GossipMenuAddItem(0, "|cFF008000Dual-Wield", 2, 0)
  10. unit:GossipMenuAddItem(0, "|cFF0000FFArtisan Riding", 3, 0)
  11. unit:GossipMenuAddItem(0, "|cFFFF1493Love Is In The Air", 4, 0)
  12. unit:GossipMenuAddItem(0, "Remove Resurrection Sickness", 5, 0)
  13.  
  14. unit:GossipSendMenu(player)
  15. end
  16.  
  17. function Trainer_SubMenus(unit, event, player, id, intid, code)
  18. if(intid == 0) then --[Learn Weapon Skills]--
  19. unit:GossipCreateMenu(101, player, 0)
  20. player:LearnSpell(201) -- One-Handed Swords
  21. player:LearnSpell(202) -- Two-Handed Swords
  22. player:LearnSpell(196) -- One-Handed Axes
  23. player:LearnSpell(197) -- Two-Handed Axes
  24. player:LearnSpell(227) -- Staves
  25. player:LearnSpell(200) -- Polearms
  26. player:LearnSpell(266) -- Guns
  27. player:LearnSpell(264) -- Bows
  28. player:LearnSpell(5011) -- Crossbows
  29. player:LearnSpell(3018) -- Shoot (Bow, Crossbow or Gun)
  30. player:LearnSpell(198) -- One-Handed Maces
  31. player:LearnSpell(199) -- Two-Handed Maces
  32. player:LearnSpell(1180) -- Daggers
  33. player:LearnSpell(2567) -- Thrown
  34. player:LearnSpell(2764) -- Throw (With Thrown)
  35. player:LearnSpell(5009) -- Wands
  36. player:LearnSpell(5019) -- Shoot (Wands)
  37. player:SendBroadcastMessage("Now You Have All The Weapon Skills.") -- Message
  38. player:GossipComplete()
  39. end
  40.  
  41. if(intid == 1) then --[Advance Skills]--
  42. unit:GossipCreateMenu(102, player, 0)
  43. player:AdvanceSkill (43, 399)
  44. player:AdvanceSkill (44, 399)
  45. player:AdvanceSkill (45, 399)
  46. player:AdvanceSkill (46, 399)
  47. player:AdvanceSkill (54, 399)
  48. player:AdvanceSkill (55, 399)  
  49. player:AdvanceSkill (136, 399)
  50. player:AdvanceSkill (160, 399)
  51. player:AdvanceSkill (172, 399)
  52. player:AdvanceSkill (173, 399)
  53. player:AdvanceSkill (176, 399)
  54. player:AdvanceSkill (226, 399)
  55. player:AdvanceSkill (228, 399)
  56. player:AdvanceSkill (229, 399)
  57. player:AdvanceSkill (473, 399)
  58. player:SendBroadcastMessage("I've Advanced All Your Weapon Skills. Now Have Fun!") -- Message
  59. player:GossipComplete()
  60. end
  61.  
  62. if(intid == 2) then --[Dual-Wield]--
  63. unit:GossipCreateMenu(103, player, 0)
  64. player:LearnSpell(674) -- Dual-Wield
  65. player:SendBroadcastMessage("Now You Can Dual-Wield!") -- Message.
  66. player:GossipComplete()
  67. end
  68.  
  69. if(intid == 3) then --[Artisan Riding]--
  70. unit:GossipCreateMenu(104, player, 0)
  71. player:LearnSpell(34091)
  72. player:SendBroadcastMessage("You've Learned Artisan Riding Skill! Please Relog For It To Take Effect!") -- Message
  73. player:GossipComplete()
  74. end
  75.  
  76. if(intid == 4) then --[Love Is In The Air]--
  77. unit:GossipCreateMenu(105, player, 0)
  78. player:LearnSpell(27741) -- Love Is In The Air [The Spell]
  79. player:SendBroadcastMessage("You're In Love!")
  80. player:GossipComplete()
  81. end
  82.  
  83. if(intid == 5) then --[Remove Ress Sickness]--
  84. unit:GossipCreateMenu(106, player, 0)
  85. player:RemoveAura(15007)
  86. player:GossipComplete()
  87. end
  88. end
  89.  
  90. RegisterUnitGossipEvent(NPCID, 1,"Trainer_OnGossip")
  91. RegisterUnitGossipEvent(NPCID, 2,"Trainer_SubMenus")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement