Advertisement
Guest User

Emudevs help

a guest
Nov 7th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 10.85 KB | None | 0 0
  1. local NPC_ID = 111111
  2. local itemid = 100018
  3. local boostid = 100057
  4.  
  5. function On_Gossip(event, plr, unit)
  6. if(plr:HasItem(itemid, 1) or plr:GetLevel() >= 50) then
  7. plr:GossipMenuAddItem(3, "Cultist", 0, 1)
  8. plr:GossipMenuAddItem(3, "Arcanist", 0, 2)
  9. plr:GossipMenuAddItem(3, "Necromancer", 0, 3)
  10. --plr:GossipMenuAddItem(3, "Iceguard", 0, 4)
  11. plr:GossipMenuAddItem(3, "Gladiator", 0, 5)
  12. plr:GossipMenuAddItem(3, "Primalist", 0, 6)
  13. plr:GossipMenuAddItem(3, "Bandit", 0, 7)
  14. plr:GossipMenuAddItem(3, "Cleric", 0, 8)
  15. plr:GossipMenuAddItem(3, "Alchemist", 0, 9)
  16. plr:GossipMenuAddItem(3, "Engineer", 0, 10)
  17. plr:GossipMenuAddItem(3, "Beastmaster", 0, 11)
  18. --plr:GossipMenuAddItem(3, "Psychic", 0, 12)
  19. end
  20. if(plr:HasItem(boostid, 1)) then
  21.     plr:GossipMenuAddItem(6, "Boost to level 50! [Enlistment Orders]", 0, 15)
  22.     plr:GossipMenuAddItem(0, "Goobye", 0, 16)
  23. end
  24. plr:GossipSendMenu(1, unit)
  25. end
  26.  
  27. function Setpath(playername, guid, path)
  28.     if GetPath(playername) == 0 then
  29.                 WorldDBQuery("INSERT INTO `paths` (`PlayerName`, `Path`, `GUID`) VALUES ('" .. playername .. "', " .. path .. ", " .. guid .. ")")
  30.         else
  31.                 WorldDBQuery("UPDATE paths SET Path='".. path .. "' where PlayerName='".. playername .."'")
  32.         end
  33. end
  34.  
  35. function GetPath(playername)
  36.         local VIPLevel = WorldDBQuery("SELECT Path from paths where PlayerName='" .. playername .. "'")
  37.     local pth = 0
  38.         if(VIPLevel) then
  39.         repeat
  40.             pth = VIPLevel:GetUInt32(0)
  41.         until not VIPLevel:NextRow()
  42.         end
  43.     return pth
  44. end
  45.  
  46. function On_Select(event, player, unit, sender, intid, code)
  47. if(intid == 15 and player:HasItem(boostid, 1)) then
  48.     player:SetLevel(50)
  49.     player:RemoveItem(boostid, 1)
  50.     player:Teleport(571, -169.61, -3575.8396, 1.565889, 90)
  51. end
  52. if(intid==16) then
  53.     player:GossipComplete()
  54. end
  55. local currentPath = GetPath(player:GetName())
  56. if(currentPath>0)then
  57. player:SendAreaTriggerMessage("You have already chosen your path!")
  58. end
  59. if(currentPath==0)then
  60. player:PlayDirectSound(37)
  61. player:AddItem(100020, 1)
  62. player:RemoveItem(itemid, 1)
  63. Setpath(player:GetName(), player:GetGUID(), intid)
  64. if (intid == 1) then --Cultist
  65. player:LearnSpell(60501)
  66. player:LearnSpell(34113)
  67. player:LearnSpell(77558)
  68. player:LearnSpell(40412)
  69. player:LearnSpell(31022)
  70. player:LearnSpell(38540)
  71. player:LearnSpell(36020)
  72. player:LearnSpell(40412)
  73. player:LearnSpell(47241)
  74. player:LearnSpell(54785)
  75. player:LearnSpell(35346)
  76.  
  77. player:LearnSpell(9078) --Cloth
  78. player:LearnSpell(202) --Two-Handed Swords
  79.  
  80. player:AddItem(5614, 1)
  81. player:AddItem(100003, 1)
  82. player:AddItem(100004, 1)
  83. player:AddItem(100005, 1)
  84.  
  85. player:LearnSpell(73313)
  86. end
  87. if (intid == 2) then --Arcanist
  88. player:LearnSpell(38204) --Arcane Bolt main attack
  89. --player:LearnSpell(31595) old arcane bolt
  90. --player:LearnSpell(60903) arcane breath UNBALANCED OVERPOWERED
  91. player:LearnSpell(33527) --Arcane Buffet
  92. player:LearnSpell(227)
  93. player:LearnSpell(9078)
  94. player:LearnSpell(51732) --Arcane Infusion BOMB CHANNEL
  95. --player:LearnSpell(33839) --Vir'Aani TEMP BUFF FORM
  96. player:LearnSpell(53589) -- Nether Shock INTERRUPT
  97. player:LearnSpell(67519) -- Spell Lock INTERRUPT
  98. player:LearnSpell(35158) -- 10sec Reflect Spells
  99. player:LearnSpell(52894) -- Anti-Magic Zone
  100. player:LearnSpell(1090)
  101. player:LearnSpell(781)
  102.  
  103. player:LearnSpell(9078) --Cloth
  104. player:LearnSpell(277) --Staves
  105.  
  106. player:AddItem(100072, 1)
  107. player:AddItem(100073, 1)
  108. player:AddItem(100074, 1)
  109. player:AddItem(2950, 1)
  110.  
  111. player:LearnSpell(42777)
  112. player:GossipComplete()
  113. end
  114. if (intid == 3) then --Necromancer
  115. player:LearnSpell(3106)
  116. player:LearnSpell(28993)
  117. player:LearnSpell(64153)
  118. player:LearnSpell(7297)
  119. player:LearnSpell(227)
  120. player:LearnSpell(1180)
  121. player:LearnSpell(9078) --
  122. player:LearnSpell(46585) --Raise Dead
  123. player:LearnSpell(8853) --Skeleton
  124. player:LearnSpell(50452)
  125. player:LearnSpell(50438)
  126. player:LearnSpell(56707)
  127. player:LearnSpell(69871)
  128.  
  129. player:LearnSpell(9078) --Cloth
  130. player:LearnSpell(277) --Staves
  131.  
  132. player:AddItem(100051, 1)
  133. player:AddItem(100052, 1)
  134. player:AddItem(100053, 1)
  135. player:AddItem(5340, 1)
  136.  
  137. player:LearnSpell(23246)
  138. end
  139. if (intid == 4) then --Iceguard
  140. player:LearnSpell(52088)
  141. player:LearnSpell(79810)
  142. player:LearnSpell(3130)
  143. player:LearnSpell(79865)
  144. player:LearnSpell(33528)
  145. player:LearnSpell(6957)
  146. player:LearnSpell(196)
  147. player:LearnSpell(9116)
  148. player:LearnSpell(107)
  149. player:LearnSpell(119811)
  150. player:LearnSpell(54753)
  151.  
  152. player:LearnSpell(74918)
  153. end
  154. if (intid == 5) then --Gladiator
  155. player:LearnSpell(71961)
  156. player:LearnSpell(9741)
  157. --player:LearnSpell(60030)
  158. player:LearnSpell(46917)
  159. player:LearnSpell(78117)
  160. player:LearnSpell(52027)
  161. player:LearnSpell(61696)
  162. player:LearnSpell(3136)
  163. player:LearnSpell(66407)
  164. player:LearnSpell(17275)
  165. player:LearnSpell(56426)
  166. player:LearnSpell(70150)
  167. player:LearnSpell(781)
  168.  
  169. player:LearnSpell(8737) --Mail
  170. player:LearnSpell(674) --Dual Wield
  171. player:LearnSpell(196) --One-Handed Axes
  172. player:LearnSpell(197) --Two-Handed Axes
  173. player:LearnSpell(198) --One-Handed Maces
  174. player:LearnSpell(199) --Two-Handed Maces
  175. player:LearnSpell(201) --One-Handed Swords
  176. player:LearnSpell(202) --Two-Handed Swords
  177. player:LearnSpell(107) --Block
  178. player:LearnSpell(9116) --Shields
  179. player:SetSkill(44, 200, 200, 200) --Axes
  180. player:SetSkill(43, 200, 200, 200) --Swords
  181. player:SetSkill(54, 200, 200, 200) --Maces
  182. player:SetSkill(55, 200, 200, 200) --2h Swords
  183. player:SetSkill(172, 200, 200, 200) --2h Axes
  184. player:SetSkill(160, 200, 200, 200) --2h Maces
  185.  
  186. player:AddItem(2907, 2)
  187. player:AddItem(100022, 1)
  188. player:AddItem(100023, 1)
  189. player:AddItem(100024, 1)
  190.  
  191. player:LearnSpell(43688)
  192. end
  193. if (intid == 6) then --Primalist
  194. player:LearnSpell(54195)
  195. player:LearnSpell(8045)
  196. --player:LearnSpell(8271) --wind
  197. player:LearnSpell(5186)
  198. --player:LearnSpell(8270) --earth
  199. --player:LearnSpell(42618) --ice
  200. player:LearnSpell(8985) --fire
  201. player:LearnSpell(62344)
  202. player:LearnSpell(32806)
  203. player:LearnSpell(24364) --Free Action (CC Break)
  204. player:LearnSpell(982)
  205.  
  206. player:LearnSpell(9077) --Leather
  207. player:LearnSpell(199) --Two-Handed Maces
  208. player:LearnSpell(197) --Two-Handed Axes
  209. player:LearnSpell(196) --One-Handed Axes
  210. player:LearnSpell(198) --One-Handed Maces
  211.  
  212. player:AddItem(100069, 1)
  213. player:AddItem(100070, 1)
  214. player:AddItem(100071, 1)
  215. player:AddItem(16894, 1)
  216. player:AddItem(6093, 1)
  217.  
  218. player:LearnSpell(96491)
  219. end
  220. if (intid == 7) then --Thief
  221. player:LearnSpell(48873)
  222. player:LearnSpell(52818)
  223. player:LearnSpell(31911)
  224. player:LearnSpell(5597)
  225. player:LearnSpell(51690)
  226. player:LearnSpell(17171)
  227. player:LearnSpell(8806)
  228. player:LearnSpell(11397)
  229. player:LearnSpell(52889)
  230. player:LearnSpell(43414)
  231. player:LearnSpell(921)
  232. player:LearnSpell(1784)
  233. player:LearnSpell(17498)
  234.  
  235. player:LearnSpell(264) --Bows
  236. player:LearnSpell(5011) --Crossbows
  237. player:LearnSpell(1180) --Daggers
  238. player:LearnSpell(201) --One-Handed Swords
  239. player:LearnSpell(674) --Dual Wield
  240. player:LearnSpell(9077) --Leather
  241.  
  242. player:AddItem(100066, 1)
  243. player:AddItem(100067, 1)
  244. player:AddItem(100068, 1)
  245. player:AddItem(2218, 2)
  246. player:AddItem(2903, 1)
  247. player:AddItem(2512, 600)
  248.  
  249. player:LearnSpell(66090)
  250. end
  251. if (intid == 8) then --Cleric
  252. player:LearnSpell(14517)
  253. player:LearnSpell(34346)
  254. player:LearnSpell(29170)
  255. player:LearnSpell(71954)
  256. player:LearnSpell(17)
  257. player:LearnSpell(47788)
  258. player:LearnSpell(81782)
  259. player:LearnSpell(2006)
  260.  
  261. player:LearnSpell(8737) --Mail
  262. player:LearnSpell(107) --Block
  263. player:LearnSpell(9116) --Shields
  264. player:LearnSpell(198) --One-Handed Maces
  265. player:LearnSpell(201) --One-Handed Swords
  266. player:LearnSpell(199) --Two-Handed Maces
  267. player:LearnSpell(202) --Two-Handed Swords
  268. player:LearnSpell(277) --Staves
  269.  
  270. player:AddItem(100048, 1)
  271. player:AddItem(100049, 1)
  272. player:AddItem(100054, 1)
  273. player:AddItem(5757, 1)
  274. player:AddItem(2916, 1)
  275.  
  276. player:LearnSpell(67466)
  277. end
  278. if (intid == 9) then --Alchemist
  279. player:LearnSpell(66954)
  280. player:LearnSpell(6306)
  281. player:LearnSpell(440)
  282. player:LearnSpell(11349)
  283. player:LearnSpell(3593)
  284. player:LearnSpell(11392)
  285. player:LearnSpell(29462)
  286. player:LearnSpell(47257) --Empower CHANNEL BUFF
  287. player:LearnSpell(2825) --Bloodlust GROUP CD BUFF
  288. player:LearnSpell(34379) --Bloodgem Infusion CD BUFF
  289.  
  290. player:LearnSpell(9077) --Leather
  291. player:LearnSpell(674) --Dual Wield
  292. player:LearnSpell(198) --One-Handed Maces
  293. player:LearnSpell(1180) --Daggers
  294. player:LearnSpell(277) --Staves
  295.  
  296. player:AddItem(100013, 1)
  297. player:AddItem(100014, 1)
  298. player:AddItem(100015, 1)
  299. player:AddItem(100016, 1)
  300. player:AddItem(100017, 1)
  301.  
  302. player:LearnSpell(46628)
  303. end
  304. if (intid == 10) then --Engineer
  305. player:LearnSpell(7395)
  306. player:LearnSpell(7896)
  307. player:LearnSpell(60856)
  308. player:LearnSpell(65071)
  309. player:LearnSpell(266)
  310. player:LearnSpell(198)
  311. player:LearnSpell(9116)
  312. player:LearnSpell(60424)
  313.  
  314. player:LearnSpell(9077) --Leather
  315. player:LearnSpell(198) --One-Handed Maces
  316. player:LearnSpell(266) --Guns
  317. player:LearnSpell(107) --Block
  318. player:LearnSpell(9116) --Shields
  319.  
  320. player:AddItem(29200, 1)
  321. player:AddItem(4948, 1)
  322. player:AddItem(100006, 1)
  323. player:AddItem(100007, 1)
  324. player:AddItem(100008, 1)
  325. player:AddItem(100009, 1)
  326. player:AddItem(2516, 600)
  327. end
  328. if (intid == 11) then --Beastmaster
  329. player:LearnSpell(3612)
  330. player:LearnSpell(31566)
  331. player:LearnSpell(4318)
  332. player:LearnSpell(3385)
  333. player:LearnSpell(53559)
  334. player:LearnSpell(8274)
  335. player:LearnSpell(8276)
  336. player:LearnSpell(1002)
  337. player:LearnSpell(982)
  338. player:LearnSpell(67233)
  339. player:LearnSpell(61168)
  340. player:LearnSpell(24450)
  341.  
  342. player:LearnSpell(9077) --Leather
  343. player:LearnSpell(674) --Dual Wield
  344. player:LearnSpell(196) --One-Handed Axes
  345. player:LearnSpell(198) --One-Handed Maces
  346. player:LearnSpell(201) --One-Handed Swords
  347. player:SetSkill(44, 200, 200, 200) --Axes
  348. player:SetSkill(43, 200, 200, 200) --Swords
  349. player:SetSkill(54, 200, 200, 200) --Maces
  350. player:SetSkill(118, 200, 200, 200) --Dual Wield
  351. player:SetSkill(414, 200, 200, 200) --Leather
  352.  
  353. player:AddItem(3154, 2)
  354. player:AddItem(100010, 1)
  355. player:AddItem(100011, 1)
  356. player:AddItem(100012, 1)
  357.  
  358. player:LearnSpell(24252)
  359. end
  360. if (intid == 12) then --Psychic
  361. player:LearnSpell(55342)
  362. player:LearnSpell(9160)
  363. player:LearnSpell(20989)
  364. player:LearnSpell(34089)
  365. player:LearnSpell(17639)
  366. end
  367. player:SetSkill(98, 200, 200, 200)
  368. advanceAllWeaponSkills(player)
  369. player:AdvanceSkillsToMax()
  370. end
  371. end
  372.  
  373. function advanceAllWeaponSkills(player)
  374. player:AdvanceSkill (43, 399)
  375. player:AdvanceSkill (44, 399)
  376. player:AdvanceSkill (45, 399)
  377. player:AdvanceSkill (46, 399)
  378. player:AdvanceSkill (54, 399)
  379. player:AdvanceSkill (55, 399)  
  380. player:AdvanceSkill (136, 399)
  381. player:AdvanceSkill (160, 399)
  382. player:AdvanceSkill (172, 399)
  383. player:AdvanceSkill (173, 399)
  384. player:AdvanceSkill (176, 399)
  385. player:AdvanceSkill (226, 399)
  386. player:AdvanceSkill (228, 399)
  387. player:AdvanceSkill (229, 399)
  388. player:AdvanceSkill (473, 399)
  389. end
  390.  
  391.  
  392. RegisterCreatureGossipEvent(NPC_ID, 1, On_Gossip)
  393. RegisterCreatureGossipEvent(NPC_ID, 2, On_Select)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement