kusanagy

NPC Trainer Wep / Riding / Skill Lua

Nov 20th, 2016
671
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 6.24 KB | None | 0 0
  1. --[[
  2.                          ▒█▀▀▀ █▀▄▀█ █░░█ ▒█▀▀▀█ █▀▀ █▀▀█ ▀█░█▀ █▀▀ █▀▀█  
  3.                          ▒█▀▀▀ █░▀░█ █░░█ ░▀▀▀▄▄ █▀▀ █▄▄▀ ░█▄█░ █▀▀ █▄▄▀  
  4.                          ▒█▄▄▄ ▀░░░▀ ░▀▀▀ ▒█▄▄▄█ ▀▀▀ ▀░▀▀ ░░▀░░ ▀▀▀ ▀░▀▀    
  5.                      
  6.                                   ██████╗ ██████╗ ██████╗ ███████╗            
  7.                                  ██╔════╝██╔═══██╗██╔══██╗██╔════╝            
  8.                                  ██║     ██║   ██║██████╔╝█████╗            
  9.                                  ██║     ██║   ██║██╔══██╗██╔══╝            
  10.                                  ╚██████╗╚██████╔╝██║  ██║███████╗            
  11.                                   ╚═════╝ ╚═════╝ ╚═╝  ╚═╝╚══════╝
  12.                      
  13.                           EmuServers ツ Script Made by Kusanagy Azakura*
  14. --]]
  15. print("\n----------------------------")
  16. print("EmuServers Script Staring:")
  17. local NpcEntry = 189995 --Set this to your NPC's entry ID
  18. --Spell Riding Skill --
  19. local ApprenticeRiding = 33388
  20. local JourneymanRiding = 33391
  21. local ExpertRiding = 34090
  22. local ArtisanRiding = 34091
  23. local ColdWeatherRiding = 54197
  24. local SoundGold = 120
  25. --Interface // Icons // Scale 20 // Menú --
  26. local IconMount = "|Tinterface/icons/Ability_Mount_Gyrocoptor:20:20:-13:0|t"
  27. local IconWeapo = "|TInterface/ICONS/Ability_Warrior_OffensiveStance:20:20:-13:0|t"
  28. local IconSkill = "|TInterface/ICONS/Ability_Warrior_Disarm:20:20:-13:0|t"
  29. local Exit      = "|Tinterface/icons/Ability_Vehicle_LoadSelfCatapult:20:20:-13:0|t"
  30. --ConfigColor Text //
  31. local TextColor = "|cFF8B0000"
  32. local ColorReturn = "|cff0d7276"
  33. --Menu Text--
  34. local Text_1 = "Trainer Skill Mount Learn"
  35. local Text_2 = "Learn Weapon Skills."
  36. local Text_3 = "Advance All Weapon Skills"
  37. local Text_4 = "Exit"
  38.  
  39.  
  40. function NPCMount_Gossip(event, player, unit)
  41.         if (player:IsInCombat() == true) then
  42.             else
  43.             NPCMount_Menu(unit, player)
  44.         end
  45. end
  46.  
  47. function NPCMount_Menu(unit, player)
  48.  
  49. player:GossipMenuAddItem(4, ""..IconMount.." "..TextColor..""..Text_1.."", 0, 1)
  50. player:GossipMenuAddItem(3, ""..IconWeapo.." "..TextColor..""..Text_2.."", 0, 2)
  51. player:GossipMenuAddItem(3, ""..IconSkill.." "..TextColor..""..Text_3.."", 0, 3)
  52. player:GossipMenuAddItem(4, ""..Exit.." "..TextColor..""..Text_4.."", 0 , 999)
  53. player:GossipSendMenu(1, unit)
  54. end
  55.  
  56.  
  57. function NPCMount_Events(event, player, unit, sender, intid, code)
  58. if (intid == 100) then
  59. player:GossipClearMenu()
  60. player:GossipMenuAddItem(4, ""..IconMount.." "..TextColor..""..Text_1.."", 0, 1)
  61. player:GossipMenuAddItem(3, ""..IconWeapo.." "..TextColor..""..Text_2.."", 0, 2)
  62. player:GossipMenuAddItem(3, ""..IconSkill.." "..TextColor..""..Text_3.."", 0, 3)
  63. player:GossipMenuAddItem(4, ""..Exit.." "..TextColor..""..Text_4.."", 0 , 999)
  64. player:GossipSendMenu(1, unit)
  65. end
  66.  
  67.     if (intid == 1) then
  68.         if ( player:HasSpell(ColdWeatherRiding) == true) then
  69.         player:GossipClearMenu()
  70.         player:SendBroadcastMessage("You already have these Spell.")
  71.         player:GossipMenuAddItem(7, " Finish \n "..ColorReturn.."[You already have these Spell]", 0, 100)
  72.         player:GossipMenuAddItem(7, " ", 0, 100)
  73.         player:GossipSendMenu(1,unit)
  74.         else
  75.         player:GossipClearMenu()
  76.         player:PlayDirectSound(SoundGold)
  77.         player:CastSpell(player, 61410)
  78.         player:LearnSpell(ApprenticeRiding) --Apprentice Riding Level 20
  79.         player:LearnSpell(JourneymanRiding) --Journeyman Riding Level 40
  80.         player:LearnSpell(ExpertRiding) --Expert Riding Level 60
  81.         player:LearnSpell(ArtisanRiding) --Artisan Riding Level 70
  82.         player:LearnSpell(ColdWeatherRiding) --Cold Weather Flying Level 68
  83.         player:GossipMenuAddItem(7, " Finish", 0, 100)
  84.         player:GossipMenuAddItem(7, " ", 0, 100)
  85.         player:SendBroadcastMessage("Congratulations! You have obtained maximum riding.")
  86.         end
  87.     end
  88.  
  89. if(intid == 2) then
  90.     player:GossipClearMenu()
  91.     player:LearnSpell(201) -- One-Handed Swords
  92.     player:LearnSpell(202) -- Two-Handed Swords
  93.     player:LearnSpell(196) -- One-Handed Axes
  94.     player:LearnSpell(197) -- Two-Handed Axes
  95.     player:LearnSpell(227) -- Staves
  96.     player:LearnSpell(200) -- Polearms
  97.     player:LearnSpell(266) -- Guns
  98.     player:LearnSpell(264) -- Bows
  99.     player:LearnSpell(5011) -- Crossbows
  100.     player:LearnSpell(3018) -- Shoot (Bow, Crossbow or Gun)
  101.     player:LearnSpell(198) -- One-Handed Maces
  102.     player:LearnSpell(199) -- Two-Handed Maces
  103.     player:LearnSpell(1180) -- Daggers
  104.     player:LearnSpell(2567) -- Thrown
  105.     player:LearnSpell(2764) -- Throw (With Thrown)
  106.     player:LearnSpell(5009) -- Wands
  107.     player:LearnSpell(5019) -- Shoot (Wands)
  108.     player:SendBroadcastMessage("Now you have all the weapons skills.") -- Message
  109.     player:GossipMenuAddItem(7, " Finish", 0, 100)
  110.     player:GossipMenuAddItem(7, " ", 0, 100)
  111.     player:GossipSendMenu(1,unit)
  112. end
  113.  
  114. if(intid == 3) then
  115. player:GossipClearMenu()
  116. player:AdvanceSkill (43, 399)
  117. player:AdvanceSkill (44, 399)
  118. player:AdvanceSkill (45, 399)
  119. player:AdvanceSkill (46, 399)
  120. player:AdvanceSkill (54, 399)
  121. player:AdvanceSkill (55, 399)  
  122. player:AdvanceSkill (256, 399)
  123. player:AdvanceSkill (160, 399)
  124. player:AdvanceSkill (172, 399)
  125. player:AdvanceSkill (173, 399)
  126. player:AdvanceSkill (176, 399)
  127. player:AdvanceSkill (226, 399)
  128. player:AdvanceSkill (228, 399)
  129. player:AdvanceSkill (229, 399)
  130. player:AdvanceSkill (473, 399)
  131. player:SendBroadcastMessage("I have advanced all his skills with weapons.!") -- Message
  132. player:GossipMenuAddItem(7, " Finish", 0, 100)
  133. player:GossipMenuAddItem(7, " ", 0, 100)
  134. player:GossipSendMenu(1,unit)
  135. end
  136.  
  137. if (intid == 999) then
  138. player:SendBroadcastMessage("Good bye.")
  139. player:GossipComplete()
  140. end
  141. end
  142.  
  143. RegisterCreatureGossipEvent(NpcEntry, 1, NPCMount_Gossip)
  144. RegisterCreatureGossipEvent(NpcEntry, 2, NPCMount_Events)
  145. print("\n<#> NPC: [Riding - Weapon - Skill ..Loading..].")
  146. print("----------------------------\n")
Advertisement
Add Comment
Please, Sign In to add comment