Krinolin

All-In-One NPC

Jan 19th, 2013
234
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.97 KB | None | 0 0
  1. --[[
  2.     This script
  3.     was created
  4.     by Krinolin
  5. --]]
  6.  
  7.  
  8. function On_GossipMenu(unit, event, player)
  9.  
  10.     if (player:IsInCombat() == true) then
  11.     unit:SendChatMessage(12, 0, "You can not do that when in combat!")
  12.     else
  13.     unit:GossipCreateMenu(100, player, 0)
  14.     unit:GossipMenuAddItem(1, "Morph", 1, 0)
  15.     unit:GossipMenuAddItem(2, "Full Heal", 2, 0)
  16.     unit:GossipMenuAddItem(2, "Remove Resurrection Sickness", 3, 0)
  17.     unit:GossipMenuAddItem(3, "Learn weapon skills", 4, 0)
  18.     unit:GossipMenuAddItem(3, "Advance weapon skills", 5, 0)
  19.     unit:GossipMenuAddItem(3, "Artisan Riding", 6, 0)
  20.     unit:GossipSendMenu(player)
  21.     end
  22. end
  23.  
  24.  
  25. function On_GossipSelect(unit, event, player, id, intid, code)
  26.  
  27.  
  28.     if (intid == 1) then
  29.     unit:GossipCreateMenu(100, player, 0)
  30.     unit:GossipMenuAddItem(5, "Taunka", 10, 0)
  31.     unit:GossipMenuAddItem(5, "Human Soldier", 11, 0)
  32.     unit:GossipMenuAddItem(5, "Fel Orc", 12, 0)
  33.     unit:GossipMenuAddItem(5, "Ogre", 13, 0)
  34.     unit:GossipMenuAddItem(5, "Skeleton", 14, 0)
  35.     unit:GossipMenuAddItem(5, "Undead", 15, 0)
  36.     unit:GossipMenuAddItem(5, "Lich King", 18, 0)
  37.     unit:GossipMenuAddItem(5, "Sesu", 19, 0)
  38.     unit:GossipMenuAddItem(3, "Demorph", 16, 0)
  39.     unit:GossipMenuAddItem(2, "Back to Main Menu", 17, 0)
  40.     unit:GossipSendMenu(player)
  41.     end
  42.    
  43.     if (intid == 2) then
  44.     unit:SendChatMessage(12, 0, "There you go!")
  45.     player:CastSpell(69693)
  46.     On_GossipMenu(unit, event, player)
  47.     end
  48.    
  49.     if (intid == 3) then
  50.     unit:SendChatMessage(12, 0, "Resurrection Sickness have been removed!")
  51.     player:RemoveAura(15007)
  52.     On_GossipMenu(unit, event, player)
  53.     end
  54.    
  55.     if (intid == 4) then
  56.     unit:SendChatMessage(12, 0, "You have learned all weapon skills!")
  57.     player:LearnSpell(201)
  58.     player:LearnSpell(202)
  59.     player:LearnSpell(196)
  60.     player:LearnSpell(197)
  61.     player:LearnSpell(227)
  62.     player:LearnSpell(200)
  63.     player:LearnSpell(266)
  64.     player:LearnSpell(264)
  65.     player:LearnSpell(5011)
  66.     player:LearnSpell(3018)
  67.     player:LearnSpell(198)
  68.     player:LearnSpell(199)
  69.     player:LearnSpell(1180)
  70.     player:LearnSpell(2567)
  71.     player:LearnSpell(2764)
  72.     player:LearnSpell(5009)
  73.     player:LearnSpell(5019)
  74.     On_GossipMenu(unit, event, player)
  75.     end
  76.    
  77.     if (intid == 5) then
  78.     unit:SendChatMessage(12, 0, "Your weapon skills are now maxed!")
  79.     player:AdvanceSkill (43, 399)
  80.     player:AdvanceSkill (44, 399)
  81.     player:AdvanceSkill (45, 399)
  82.     player:AdvanceSkill (46, 399)
  83.     player:AdvanceSkill (54, 399)
  84.     player:AdvanceSkill (55, 399)
  85.     player:AdvanceSkill (95, 399)
  86.     player:AdvanceSkill (162, 399)
  87.     player:AdvanceSkill (136, 399)
  88.     player:AdvanceSkill (160, 399)
  89.     player:AdvanceSkill (172, 399)
  90.     player:AdvanceSkill (173, 399)
  91.     player:AdvanceSkill (176, 399)
  92.     player:AdvanceSkill (226, 399)
  93.     player:AdvanceSkill (228, 399)
  94.     player:AdvanceSkill (229, 399)
  95.     player:AdvanceSkill (473, 399)
  96.     On_GossipMenu(unit, event, player)
  97.     end
  98.    
  99.     if (intid == 6) then
  100.     unit:SendChatMessage (12, 0, "You have learned Artisan Riding!")
  101.     player:LearnSpell(33388)
  102.     player:LearnSpell(33391)
  103.     player:LearnSpell(34090)
  104.     player:LearnSpell(34091)
  105.     On_GossipMenu(unit, event, player)
  106.     end
  107.    
  108.     if (intid == 10) then
  109.     player:SetModel(24970)
  110.     player:GossipComplete()
  111.     end
  112.    
  113.         if (intid == 11) then
  114.     player:SetModel(16276)
  115.     player:GossipComplete()
  116.     end
  117.    
  118.         if (intid == 12) then
  119.     player:SetModel(16332)
  120.     player:GossipComplete()
  121.     end
  122.    
  123.         if (intid == 13) then
  124.     player:SetModel(597)
  125.     player:GossipComplete()
  126.     end
  127.    
  128.         if (intid == 14) then
  129.     player:SetModel(7550)
  130.     player:GossipComplete()
  131.     end
  132.    
  133.         if (intid == 15) then
  134.     player:SetModel(28589)
  135.     player:GossipComplete()
  136.     end
  137.    
  138.             if (intid == 18) then
  139.     player:SetModel(24213)
  140.     player:GossipComplete()
  141.     end
  142.    
  143.             if (intid == 19) then
  144.     player:SetModel(21249)
  145.     player:GossipComplete()
  146.     end
  147.    
  148.     if (intid == 16) then
  149.     unit:SendChatMessage(12, 0, "There you go!")
  150.     player:DeMorph()
  151.     player:GossipComplete()
  152.     end
  153.    
  154.     if (intid == 17) then
  155.     On_GossipMenu(unit, event, player)
  156.     end
  157. end
  158.    
  159. RegisterUnitGossipEvent(112112, 1, On_GossipMenu)
  160. RegisterUnitGossipEvent(112112, 2, On_GossipSelect)
Advertisement
Add Comment
Please, Sign In to add comment