Advertisement
Guest User

Deathbringer Saurfang Horde

a guest
May 25th, 2010
933
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 8.20 KB | None | 0 0
  1. local Saur
  2. local Jr
  3.  
  4.  
  5. function NPCGIA_GJOEAOJG_HXOJ(pUnit, Event)
  6.     Saur = pUnit
  7.     Saur:SetFaction(35)
  8. end
  9.  
  10. RegisterUnitEvent(36939, 18, "NPCGIA_GJOEAOJG_HXOJ")
  11.  
  12. function NPCGIA_GJOEAOJG_HXOJ_Z(pUnit, Event)
  13.     Jr = pUnit
  14.     Jr:SetFaction(35)
  15. end
  16.  
  17. RegisterUnitEvent(37813, 18, "NPCGIA_GJOEAOJG_HXOJ_Z")
  18.                
  19. function On_Gossip(Unit, event, player)
  20. Unit:GossipCreateMenu(1000, player, 86423)
  21. Unit:GossipMenuAddItem(0, "We are ready to enter the inner citadel", 1, 0)
  22. Unit:GossipSendMenu(player)
  23. end
  24.  
  25. function SubMenu_Gossip(Unit, event, player, id, intid, code)
  26. if (intid == 1) then
  27. Saur:RegisterEvent("sar_miscy", 1000, 1)
  28. player:GossipComplete()
  29. end
  30. if (intid == 2) then
  31. player:GossipComplete()
  32. end
  33.  
  34.  
  35. end
  36.  
  37. function sar_miscy(pUnit, Event)
  38. Saur:SendChatMessage(14, 0, "Kor'kron, move out! Champions, watch your backs. The Scourge have been...")
  39. Saur:SetNPCFlags(4)
  40. Saur:PlaySoundToSet(17103)
  41. Saur:RegisterEvent("sar_misc", 7000, 1)
  42. Jr:MoveTo(-493.9, 2211.3, 541.1, 3.1)
  43. Jr:Emote(27, 60000)
  44. end
  45.  
  46. function sar_misc(pUnit, Event)
  47. Jr:SendChatMessage(14, 0, "Join me, father. Join me and we will crush this world in the name of the Scourge -- for the glory of the Lich King!")
  48. Jr:PlaySoundToSet(16704)
  49. Jr:RegisterEvent("sar_miscz", 15000, 1)
  50. end
  51.  
  52. function sar_miscz(pUnit, Event)
  53. Saur:SendChatMessage(12, 0, "My boy died at the Wrath Gate. I am here only to collect his body.")
  54. Saur:PlaySoundToSet(17097)
  55. Saur:RegisterEvent("sar_misczz", 8000, 1)
  56. end
  57.  
  58. function sar_misczz(pUnit, Event)
  59. Jr:SendChatMessage(14, 0, "Stubborn and old. What chance do you have? I am stronger, and more powerful than you ever were.")
  60. Jr:PlaySoundToSet(16705)
  61. Jr:RegisterEvent("sar_misczzz", 9000, 1)
  62. end
  63.  
  64. function sar_misczzz(pUnit, Event)
  65. Saur:SendChatMessage(12, 0, "We named him Dranosh. It means Heart of Draenor in orcish. I would not let the warlocks take him. My boy would be safe, hidden away by the elders of Garadar.")
  66. Saur:PlaySoundToSet(17098)
  67. Saur:RegisterEvent("sar_misczzzx", 15000, 1)
  68. end
  69.  
  70. function sar_misczzzx(pUnit, Event)
  71. Saur:SendChatMessage(12, 0, "I made a promise to his mother before she died; that I would cross the Dark Portal alone - whether I lived or died, my son would be safe. Untainted...")
  72. Saur:PlaySoundToSet(17099)
  73. Saur:RegisterEvent("sar_misczzzxx", 15000, 1)
  74. end
  75.  
  76. function sar_misczzzxx(pUnit, Event)
  77. Saur:SendChatMessage(12, 0, "Today, I fulfill that promise.")
  78. Saur:PlaySoundToSet(17100)
  79. Saur:MoveTo(-505, 2211.7, 539.2, 6.2)
  80. Saur:SetMovementFlags(1)
  81. Saur:RegisterEvent("sar_misczzzxxy", 3500, 1)
  82. end
  83.  
  84. function sar_misczzzxxy(pUnit, Event)
  85. Saur:MoveTo(-505, 2211.7, 639.2, 6.2)
  86. Saur:SetFlying()
  87. Saur:PlaySoundToSet(17104)
  88. Saur:SetMovementFlags(1)
  89. Saur:RegisterEvent("sar_misczzzxxx", 2500, 1)
  90. end
  91.  
  92. function sar_misczzzxxx(pUnit, Event)
  93. Saur:MoveTo(-505, 2211.7, 539.2, 6.2)
  94. Saur:CastSpell(43489)
  95. Saur:CastSpell(43489)
  96. Jr:SendChatMessage(14, 0, "Pathetic old orc. Come then heroes. Come and face the might of the Scourge!")
  97. Jr:PlaySoundToSet(16706)
  98. Jr:RegisterEvent("sar_misczzzxxxa", 5800, 1)
  99. end
  100.  
  101. function sar_misczzzxxxa(pUnit, Event)
  102. Saur:CastSpell(43489)
  103. Jr:SetFaction(16)
  104. end
  105.  
  106.  
  107. function sar_OnCombat(pUnit, Event)
  108. Jr:SendChatMessage(14, 0, "BY THE MIGHT OF THE LICH KING!")
  109. Jr:PlaySoundToSet(16694)
  110. Saur:CastSpell(43489)
  111. Jr:RegisterEvent("sar_blood1", 25000, 0)
  112. Jr:RegisterEvent("sar_blood2", 26000, 0)
  113. Jr:RegisterEvent("sar_boiling", 30000, 0)
  114. Jr:RegisterEvent("sar_nova", 39000, 0)
  115. Jr:RegisterEvent("bloodbeast_spawn", 38000, 0)
  116. Jr:RegisterEvent("sar_mark", 65000, 0)
  117. Jr:RegisterEvent("sar_phase2", 1000, 0)
  118. end
  119.  
  120. function sar_blood1(pUnit, Event)
  121. Jr:CastSpellOnTarget(72410, pUnit:GetMainTank())
  122. end
  123.  
  124. function sar_blood2(pUnit, Event)
  125. Jr:CastSpellOnTarget(72408, pUnit:GetMainTank())
  126. end
  127.  
  128. function sar_boiling(pUnit, Event)
  129. Jr:CastSpellOnTarget(72385, pUnit:GetRandomPlayer(0))
  130. Jr:CastSpellOnTarget(72385, pUnit:GetRandomPlayer(0))
  131. Jr:CastSpellOnTarget(72385, pUnit:GetRandomPlayer(0))
  132. end
  133.  
  134. function sar_nova(pUnit, Event)
  135. Jr:CastSpellOnTarget(72380, pUnit:GetRandomPlayer(0))
  136. end
  137.  
  138. function bloodbeast_spawn(pUnit, Event)
  139. Jr:SendChatMessage(14, 0, "Feast my minions!")
  140. Jr:PlaySoundToSet(16700)
  141. Saur:CastSpell(43489)
  142. local x = Jr:GetX()
  143. local y = Jr:GetY()
  144. local z = Jr:GetZ()
  145. local o = Jr:GetO()
  146. if math.random(1,2) == 1 then
  147. Jr:SpawnCreature(38508, x+math.random(3,3), y+math.random(3,3), z, o, 22, 360000)
  148. Jr:SpawnCreature(38508, x-math.random(1,3), y-math.random(1,3), z, o, 22, 360000)
  149. else
  150. Jr:SpawnCreature(38508, x-math.random(3,3), y-math.random(3,3), z, o, 22, 360000)
  151. Jr:SpawnCreature(38508, x-math.random(1,3), y-math.random(1,3), z, o, 22, 360000)
  152.     end
  153. end
  154.  
  155.  
  156. function sar_mark(pUnit, Event)
  157. Jr:CastSpellOnTarget(72293, pUnit:GetRandomPlayer(0))
  158. Saur:CastSpell(43489)
  159. end
  160.  
  161. function sar_phase2(pUnit, Event)
  162. if Jr:GetHealthPct() < 30 then
  163. Jr:SendChatMessage(14, 0, "I have become...DEATH!")
  164. Jr:CastSpell(72737)
  165. Saur:CastSpell(43489)
  166. Jr:PlaySoundToSet(16698)
  167. Jr:RemoveEvents()
  168. Jr:RegisterEvent("sar_blood1", 25000, 0)
  169. Jr:RegisterEvent("sar_blood2", 26000, 0)
  170. Jr:RegisterEvent("sar_boiling", 30000, 0)
  171. Jr:RegisterEvent("sar_nova", 39000, 0)
  172. Jr:RegisterEvent("bloodbeast_spawn", 38000, 0)
  173. Jr:RegisterEvent("sar_mark", 65000, 0)
  174. end
  175. end
  176.  
  177. function sar_blood1(pUnit, Event)
  178. Jr:CastSpellOnTarget(72410, pUnit:GetMainTank())
  179. end
  180.  
  181. function sar_blood2(pUnit, Event)
  182. Jr:CastSpellOnTarget(72408, pUnit:GetMainTank())
  183. end
  184.  
  185. function sar_boiling(pUnit, Event)
  186. Jr:CastSpellOnTarget(72385, pUnit:GetRandomPlayer(0))
  187. end
  188.  
  189. function sar_nova(pUnit, Event)
  190. Jr:CastSpellOnTarget(72380, pUnit:GetRandomPlayer(0))
  191. end
  192.  
  193. function bloodbeast_spawn(pUnit, Event)
  194. Jr:SendChatMessage(14, 0, "Feast my minions!")
  195. Jr:PlaySoundToSet(16700)
  196. local x = Jr:GetX()
  197. local y = Jr:GetY()
  198. local z = Jr:GetZ()
  199. local o = Jr:GetO()
  200. Saur:CastSpell(43489)
  201. if math.random(1,2) == 1 then
  202. Jr:SpawnCreature(38508, x+math.random(3,3), y+math.random(3,3), z, o, 22, 360000)
  203. Jr:SpawnCreature(38508, x-math.random(1,3), y-math.random(1,3), z, o, 22, 360000)
  204. else
  205. Jr:SpawnCreature(38508, x-math.random(3,3), y-math.random(3,3), z, o, 22, 360000)
  206. Jr:SpawnCreature(38508, x-math.random(1,3), y-math.random(1,3), z, o, 22, 360000)
  207.     end
  208. end
  209.  
  210. function sar_mark(pUnit, Event)
  211. Jr:CastSpellOnTarget(72293, pUnit:GetRandomPlayer(0))
  212. Jr:CastSpellOnPlayer(72293)
  213. Jr:SendChatMessage(14, 0, "The ground runs red with your blood!")
  214. Jr:PlaySoundToSet(16699)
  215. end
  216.  
  217. function sar_OnLeaveCombat(pUnit, Event)
  218. Saur:CastSpell(43489)
  219. Jr:RemoveAura(72737)
  220. Jr:RemoveEvents()
  221. end
  222.  
  223. function sar_OnKilledTarget(pUnit, Event)
  224. Jr:CastSpell(72260)
  225. Jr:SendChatMessage(14, 1, "You are nothing!")
  226. Jr:PlaySoundToSet(16695)
  227. end
  228.  
  229. function sar_OnDied(pUnit, Event)
  230. Jr:RemoveEvents()
  231. Jr:SendChatMessage(14, 1, "I...Am...Released")
  232. Jr:PlaySoundToSet(16697)
  233. Saur:SetMovementFlags(1)
  234. Jr:SpawnGameObject(202239, -497.325, 2175.1, 539.2, 2.5, 360000)
  235. Saur:RemoveAura(43489)
  236. Saur:MoveTo(-544, 2211, 539.2, 0)
  237. Saur:PlaySoundToSet(17105)
  238. Saur:RemoveAura(43489)
  239. Saur:RegisterEvent("sar_End", 1500, 1)
  240.  
  241. end
  242.  
  243. function sar_End(pUnit, Event)
  244. x = Jr:GetX()
  245. y = Jr:GetY()
  246. z = Jr:GetZ()
  247. o = Jr:GetO()
  248. Saur:MoveTo(x,y,z,o,2,0)
  249. Saur:Emote(18, 1000)
  250. Saur:PlaySoundToSet(17106)
  251. Saur:RegisterEvent("sar_Endz", 10000, 1)
  252. end
  253.  
  254. function sar_Endz(pUnit, Event)
  255. Saur:SendChatMessage(12, 1, "You will have a proper ceremony in Nagrand next to the pyres of your mother and ancestors.")
  256. Saur:Emote(16, 1000)
  257. Saur:PlaySoundToSet(17101)
  258. Saur:RegisterEvent("sar_Endzz", 8700, 1)
  259. end
  260.  
  261. function sar_Endzz(pUnit, Event)
  262. Saur:SendChatMessage(12, 1, "Honor, young heroes... no matter how dire the battle... Never forsake it!")
  263. Saur:PlaySoundToSet(17102)
  264. Jr:RemoveFromWorld()
  265. Saur:RegisterEvent("sar_Endzzz", 8500, 1)
  266. end
  267.  
  268. function sar_Endzzz(pUnit, Event)
  269. Saur:MoveTo(-548.8, 2210.8, 539.2, 3.13)
  270. Saur:RegisterEvent("sar_Endzzzx", 9500, 1)
  271. end
  272.  
  273. function sar_Endzzzx(pUnit, Event)
  274. Saur:RemoveFromWorld()
  275. end
  276.  
  277.  
  278.  
  279. RegisterUnitEvent(37813, 1, "sar_OnCombat")
  280. RegisterUnitEvent(37813, 2, "sar_OnLeaveCombat")
  281. RegisterUnitEvent(37813, 3, "sar_OnKilledTarget")
  282. RegisterUnitEvent(37813, 4, "sar_OnDied")
  283.  
  284.  
  285.  
  286. RegisterUnitGossipEvent(36939, 1, "On_Gossip")
  287. RegisterUnitGossipEvent(36939, 2, "SubMenu_Gossip")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement