Guest User

WodaN

a guest
Feb 27th, 2010
1,362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 11.80 KB | None | 0 0
  1. local darion
  2. local arthas
  3. local darionID = 100000
  4. local arthasID = 100001
  5.  
  6. function darion_bla(pUnit, event)
  7.     darion = pUnit
  8. end
  9.  
  10. function arthas_bla(pUnit, event)
  11.     arthas = pUnit
  12. end
  13.  
  14. RegisterUnitEvent(darionID, 18, "darion_bla")
  15. RegisterUnitEvent(arthasID, 18, "arthas_bla")
  16.  
  17. function darion_dead(pUnit, event)
  18.     arthas:SetUInt32Value(58, 2)
  19.     arthas:SendChatMessage(14, 0, "Darion, We could conquer the world, But you have failed!")
  20.     arthas:Despawn(4000, 0)
  21.     darion:Despawn(4000, 0)
  22. end
  23.  
  24. function arthas_dead(pUnit, event)
  25.     darion:SendChatMessage(14, 0, "My work is done... Farewell, Champions")
  26.     darion:Despawn(4000, 0)
  27.     arthas:Despawn(4000, 0)
  28. end
  29.  
  30. RegisterUnitEvent(darionID, 4, "darion_dead")
  31. RegisterUnitEvent(arthasID, 4, "arthas_dead")
  32.  
  33. function Darion_menu(pUnit, event, player)
  34.     pUnit:GossipCreateMenu(100, player, 0)
  35.     pUnit:GossipMenuAddItem(0, "Summon Him!", 1, 0)
  36.     pUnit:GossipSendMenu(player)
  37. end
  38.  
  39. function Darion_onselect(pUnit, event, player, id, intid, code, pMisc)
  40.     if(intid == 1) then
  41.         pUnit:SendChatMessage(14, 0, "Be prepared!")
  42.         pUnit:SetNPCFlags(2)
  43.         RegisterTimedEvent("Darion_summon", 2000, 1, pUnit, event)
  44.         player:GossipComplete()
  45.     end
  46. end
  47.  
  48. function Darion_summon(pUnit, event)
  49.     pUnit:SendChatMessage(14, 0, "Now, I try to summon Arthas...")
  50.     RegisterTimedEvent("Darion_summon2", 30000, 1, pUnit, event)
  51.     pUnit:FullCastSpell(32929)
  52. end
  53.  
  54. function Darion_summon2(pUnit, event)
  55.     darion:SpawnCreature(arthasID, darion:GetX()+5, darion:GetY(), darion:GetZ(), darion:GetO()+2.5, 1882, 24000)
  56.     arthas:SetUInt32Value(58, 0)
  57.     arthas:SetTauntedBy(darion)
  58.     darion:SetTauntedBy(arthas)
  59.     arthas:SetUInt32Value(58, 2)
  60.     RegisterTimedEvent("Arthas_talk1", 3000, 1, pUnit, event)
  61.     pUnit:RemoveEvents()
  62. end
  63.  
  64. RegisterUnitGossipEvent(darionID, 1, "Darion_menu")
  65. RegisterUnitGossipEvent(darionID, 2, "Darion_onselect")
  66.  
  67. function Arthas_talk1(pUnit, event)
  68.     arthas:SendChatMessage(14, 0, "Aaah Darion! What are you doing?!")
  69.     pUnit:RegisterEvent("darion_talk1", 4000, 1)
  70. end
  71.  
  72. function darion_talk1(pUnit, event)
  73.     darion:SendChatMessage(14, 0, "What do you think, Arthas? We want to kill you!")
  74.     pUnit:RegisterEvent("arthas_talk2", 4000, 1)
  75. end
  76.  
  77. function arthas_talk2(pUnit, event)
  78.     arthas:SendChatMessage(14, 0, "HAHAHA, Outrageously funny, Darion! Noone can stop me!")
  79.     pUnit:RegisterEvent("darion_talk2", 4000, 1)
  80. end
  81.  
  82. function darion_talk2(pUnit, event)
  83.     darion:SendChatMessage(14, 0, "We will see...")
  84.     pUnit:RegisterEvent("arthas_mind1", 4000, 1)
  85. end
  86.  
  87. function arthas_mind1(pUnit, event)
  88.     arthas:FullCastSpellOnTarget(60857, darion)
  89.     pUnit:RegisterEvent("darion_mind1", 4000, 1)
  90. end
  91.  
  92. function darion_mind1(pUnit, event)
  93.     darion:SendChatMessage(14, 0, "What?... NOOO!")
  94.     pUnit:RegisterEvent("darion_faction", 2000, 1)
  95. end
  96.  
  97. function darion_faction(pUnit, event)
  98.     darion:SetFaction(14)
  99.     pUnit:RegisterEvent("darion_phase1", 1000, 1)
  100. end
  101.  
  102. function darion_phase1(pUnit, event)
  103.     pUnit:RegisterEvent("dar_burst1", 19000, 0)
  104.     pUnit:RegisterEvent("dar_burst2", 17200, 0)
  105.     pUnit:RegisterEvent("dar_wrath", 19800, 0)
  106.     pUnit:RegisterEvent("dar_bash", 25200, 0)
  107.     pUnit:RegisterEvent("darion_phase2", 1000, 0)
  108. end
  109.  
  110. function dar_burst1(pUnit, event)
  111.     darion:FullCastSpellOnTarget(71468, darion:GetRandomPlayer(0))
  112. end
  113.  
  114. function dar_burst2(pUnit, event)
  115.     darion:FullCastSpellOnTarget(71469, darion:GetRandomPlayer(0))
  116. end
  117.  
  118. function dar_wrath(pUnit, event)
  119.     darion:FullCastSpell(43430)
  120. end
  121.  
  122. function dar_bash(pUnit, event)
  123.     darion:FullCastSpellOnTarget(25515, darion:GetRandomPlayer(0))
  124. end
  125.  
  126. function darion_phase2(pUnit, event)
  127. if pUnit:GetHealthPct() < 85 then
  128.     pUnit:RemoveEvents()
  129.     pUnit:RegisterEvent("dar_deliver", 15000, 0)
  130.     pUnit:RegisterEvent("dar_judgement", 15800, 0)
  131.     pUnit:RegisterEvent("dar_shield", 18000, 0)
  132.     pUnit:RegisterEvent("dar_renew", 8000, 0)
  133.     pUnit:RegisterEvent("darion_phase3", 1000, 0)
  134. end
  135. end
  136.  
  137. function dar_deliver(pUnit, event)
  138.     darion:FullCastSpell(70760)
  139. end
  140.  
  141. function dar_shield(pUnit, event)
  142.     darion:FullCastSpell(68034)
  143. end
  144.  
  145. function dar_renew(pUnit, event)
  146.     darion:FullCastSpell(66177)
  147. end
  148.  
  149. function dar_judgement(pUnit, event)
  150.     darion:FullCastSpellOnTarget(68019, darion:GetRandomPlayer(0))
  151. end
  152.  
  153. function darion_phase3(pUnit, event)
  154. if pUnit:GetHealthPct() < 65 then
  155.     darion:RemoveAura(60857)
  156.     darion:RemoveAura(70760)
  157.     darion:RemoveAura(66177)
  158.     darion:RemoveAura(43430)
  159.     darion:SetFaction(1866)
  160.     darion:RemoveEvents()
  161.     darion:SetCombatCapable(1)
  162.     darion:Root()
  163.     darion:ClearThreatList()
  164.     pUnit:RegisterEvent("darion_summonagain", 3000, 1)
  165. end
  166. end
  167.  
  168. function darion_summonagain(pUnit, event)
  169.     darion:SpawnCreature(arthasID, darion:GetX()+5, darion:GetY(), darion:GetZ(), darion:GetO()+2.5, 1882, 0)
  170.     arthas:SetUInt32Value(58, 0)
  171.     arthas:SetTauntedBy(darion)
  172.     darion:SetTauntedBy(arthas)
  173.     arthas:SetUInt32Value(58, 2)
  174.     darion:SetUInt32Value(58, 2)
  175.     pUnit:RegisterEvent("arthas_talk3", 3000, 1)
  176. end
  177.  
  178. function arthas_talk3(pUnit, event)
  179.     arthas:SendChatMessage(14, 0, "Uhmm, Darion, You're stronger than I thought...")
  180.     pUnit:RegisterEvent("arthas_sword", 2000, 1)
  181. end
  182.  
  183. function arthas_sword(pUnit, event)
  184.     arthas:FullCastSpell(72729)
  185.     pUnit:RegisterEvent("darion_ready", 5000, 1)
  186. end
  187.  
  188. function darion_ready(pUnit, event)
  189.     darion:SendChatMessage(14, 0, "Ok, Arthas, We're ready!")
  190.     darion:SetHealthPct(100)
  191.     pUnit:RegisterEvent("arthas_faction", 2000, 1)
  192. end
  193.  
  194. function arthas_faction(pUnit, event)
  195.     arthas:SetFaction(14)
  196.     darion:SetCombatCapable(0)
  197.     darion:Unroot()
  198.     arthas:SetUInt32Value(58, 0)
  199.     darion:SetUInt32Value(58, 0)
  200.     pUnit:RegisterEvent("arthas_phase1", 1000, 1)
  201.     pUnit:RegisterEvent("darion_aphase1", 1000, 1)
  202. end
  203.  
  204. function arthas_phase1(pUnit, event)
  205. local select = math.random (1, 3)
  206.     if (select == 1) then
  207.         arthas:FullCastSpell(55222)
  208.         arthas:SendChatMessage(14, 0, "Become the part of the scourge or die!")
  209.         pUnit:RegisterEvent("arthas_unholy", 1000, 1)
  210.     elseif (select == 2) then
  211.         arthas:FullCastSpell(50689)
  212.         arthas:SendChatMessage(14, 0, "You shall serve the one, true, king!")
  213.         pUnit:RegisterEvent("arthas_blood", 1000, 1)
  214.     elseif (select == 3) then
  215.         arthas:FullCastSpell(48263)
  216.         arthas:SendChatMessage(14, 0, "The Lich King has given me true power!")
  217.         pUnit:RegisterEvent("arthas_frost", 1000, 0)
  218. end
  219. end
  220.  
  221. function arthas_unholy(pUnit, event)
  222.     pUnit:RegisterEvent("DaD", 19000, 0)
  223.     pUnit:RegisterEvent("death_coil", 23000, 0)
  224.     pUnit:RegisterEvent("death_blast", 15000, 0)
  225.     pUnit:RegisterEvent("arthas_uphase2", 1000, 0)
  226. end
  227.  
  228. function DaD(pUnit, event)
  229.     arthas:FullCastSpell(72109)
  230. end
  231.  
  232. function death_coil(pUnit, event)
  233.     arthas:FullCastSpellOnTarget(68141, darion)
  234. end
  235.  
  236. function death_blast(pUnit, event)
  237.     arthas:FullCastSpellOnTarget(38819, arthas:GetRandomPlayer(0))
  238. end
  239.  
  240. function arthas_uphase2(pUnit, event)
  241. if arthas:GetHealthPct() < 75 then
  242.     pUnit:RemoveAllAuras()
  243.     pUnit:RemoveEvents()
  244.     pUnit:RegisterEvent("death_plague", 16000, 0)
  245.     pUnit:RegisterEvent("deathembrance", 23000, 0)
  246.     pUnit:RegisterEvent("deathchill", 15000, 0)
  247.     pUnit:RegisterEvent("arthas_uphase3", 1000, 0)
  248. end
  249. end
  250.  
  251. function death_plague(pUnit, event)
  252.     arthas:FullCastSpellOnTarget(72865, arthas:GetRandomPlayer(0))
  253. end
  254.  
  255. function deathembrance(pUnit, event)
  256.     arthas:FullCastSpell(53635)
  257. end
  258.  
  259. function deatchchill(pUnit, event)
  260.     arthas:FullCastSpell(72487)
  261. end
  262.  
  263. function arthas_uphase3(pUnit, event)
  264. if arthas:GetHealthPct() < 45 then
  265.     arthas:RemoveAllAuras()
  266.     arthas:RemoveEvents()
  267.     pUnit:RegisterEvent("death_plague", 13000, 0)
  268.     pUnit:RegisterEvent("deathembrance", 23000, 0)
  269.     pUnit:RegisterEvent("deathchill", 16000, 0)
  270.     pUnit:RegisterEvent("DaD", 19000, 0)
  271.     pUnit:RegisterEvent("death_coil", 21000, 0)
  272.     pUnit:RegisterEvent("death_blast", 15000, 0)
  273. end
  274. end
  275.  
  276. function arthas_blood(pUnit, event)
  277.     pUnit:RegisterEvent("bloodbolt", 19000, 0)
  278.     pUnit:RegisterEvent("arm_of_law", 23000, 0)
  279.     pUnit:RegisterEvent("obliterate", 15000, 0)
  280.     pUnit:RegisterEvent("arthas_bphase2", 1000, 0)
  281. end
  282.  
  283. function arthas_bphase2(pUnit, event)
  284.     if arthas:GetHealthPct() < 75 then
  285.         arthas:RemoveEvents()
  286.         arthas:RegisterEvent("bloodbolt", 13000, 0)
  287.         arthas:RegisterEvent("obliterate", 6000, 0)
  288.         arthas:RegisterEvent("rend_flesh", 28000, 0)
  289.         arthas:RegisterEvent("arthas_bphase3", 1000, 0)
  290.     end
  291. end
  292.  
  293. function arthas_bphase3(pUnit, event)
  294.     if arthas:GetHealthPct() < 35 then
  295.         arthas:RemoveEvents()
  296.         arthas:RegisterEvent("rending_throw", 30000, 0)
  297.         arthas:RegisterEvent("valkyr", 13000, 0)
  298.         arthas:RegisterEvent("wound_strike", 17000, 0)
  299.         arthas:RegisterEvent("rend_flesh", 25000, 0)
  300.         arthas:RegisterEvent("arm_of_law", 19000, 0)
  301.     end
  302. end
  303.  
  304. function arthas_frost(pUnit, event)
  305.     arthas:RegisterEvent("freeze_cloud", 18000, 0)
  306.     arthas:RegisterEvent("frost_volley", 13000, 0)
  307.     arthas:RegisterEvent("pene_cold", 9000, 0)
  308.     arthas:RegisterEvent("shadow_lance", 21000, 0)
  309.     arthas:RegisterEvent("arthas_fphase2", 1000, 0)
  310. end
  311.  
  312. function arthas_fphase2(pUnit, event)
  313.     if arthas:GetHealthPct() < 75 then
  314.         arthas:RemoveEvents()
  315.         arthas:RegisterEvent("frost_armor", 1000, 1)
  316.         arthas:RegisterEvent("frost_aura", 13000, 3)
  317.         arthas:RegisterEvent("frost_blast", 10000, 0)
  318.         arthas:RegisterEvent("arthas_fphase3", 1000, 0)
  319.     end
  320. end
  321.  
  322. function arthas_fphase3(pUnit, event)
  323.     if arthas:GetHealthPct() < 35 then
  324.         arthas:RemoveEvents()
  325.         arthas:RegisterEvent("frost_breath", 18000, 0)
  326.         arthas:RegisterEvent("frost_nova", 13000, 0)
  327.         arthas:RegisterEvent("frost_blast", 10000, 0)
  328.         arthas:RegisterEvent("frost_volley", 15000, 0)
  329.         arthas:RegisterEvent("pene_cold", 9000, 0)
  330.     end
  331. end
  332.  
  333. function freeze_cloud(pUnit, event)
  334.     arthas:FullCastSpellOnTarget(60020, arthas:GetRandomPlayer(0))
  335. end
  336.  
  337. function frost_volley(pUnit, event)
  338.     arthas:FullCastSpell(72908, arthas:GetRandomPlayer(0))
  339. end
  340.  
  341. function pene_cold(pUnit, event)
  342.     arthas:FullCastSpellOnTarget(68510, arthas:GetRandomPlayer(0))
  343. end
  344.  
  345. function shadow_lance(pUnit, event)
  346.     arthas:FullCastSpellOnTarget(69058, arthas:GetRandomPlayer(0))
  347. end
  348.  
  349. function frost_armor(pUnit, event)
  350.     arthas:FullCastSpell(31256)
  351. end
  352.  
  353. function frost_aura(pUnit, event)
  354.     arthas:FullCastSpell(70084)
  355. end
  356.  
  357. function frost_blast(pUnit, event)
  358.     arthas:FullCastSpellOnTarget(72123, arthas:GetRandomPlayer(0))
  359. end
  360.  
  361. function frost_breath(pUnit, event)
  362.     arthas:FullCastSpellOnTarget(49111, arthas:GetRandomPlayer(0))
  363. end
  364.  
  365. function frost_nova(pUnit, event)
  366.     arthas:FullCastSpell(62597)
  367. end
  368.  
  369. function bloodbolt(pUnit, event)
  370.     arthas:FullCastSpellOnTarget(71481, arthas:GetRandomPlayer(0))
  371. end
  372.  
  373. function arm_of_law(pUnit, event)
  374.     arthas:FullCastSpellOnTarget(63846, arthas:GetRandomPlayer(0))
  375. end
  376.  
  377. function obliterate(pUnit, event)
  378.     arthas:FullCastSpellOnTarget(72360, arthas:GetClosestPlayer())
  379. end
  380.  
  381. function rend_flesh(pUnit, event)
  382.     arthas:FullCastSpellOnTarget(71154, arthas:GetClosestPlayer())
  383. end
  384.  
  385. function rending_throw(pUnit, event)
  386.     arthas:FullCastSpellOnTarget(70309, arthas:GetRandomPlayer(0))
  387. end
  388.  
  389. function valkyr(pUnit, event)
  390.     arthas:FullCastSpell(71843)
  391.     arthas:FullCastSpell(71844)
  392. end
  393.  
  394. function wound_strike(pUnit, event)
  395.     arthas:FullCastSpellOnTarget(72571, arthas:GetClosestPlayer())
  396. end
  397.  
  398. function darion_aphase1(pUnit, event)
  399.     pUnit:RegisterEvent("dar_burst3", 19000, 0)
  400.     pUnit:RegisterEvent("dar_burst4", 17200, 0)
  401.     pUnit:RegisterEvent("dar_wrath", 19800, 0)
  402.     pUnit:RegisterEvent("dar_bash2", 25200, 0)
  403.     pUnit:RegisterEvent("dar_deliver", 15000, 0)
  404.     pUnit:RegisterEvent("dar_judgement2", 15800, 0)
  405.     pUnit:RegisterEvent("dar_shield", 18000, 0)
  406.     pUnit:RegisterEvent("dar_renew", 8000, 0)
  407. end
  408.  
  409. function dar_burst3(pUnit, event)
  410.     darion:FullCastSpellOnTarget(71468, arthas)
  411. end
  412.  
  413. function dar_burst4(pUnit, event)
  414.     darion:FullCastSpellOnTarget(71469, arthas)
  415. end
  416.  
  417. function dar_bash2(pUnit, event)
  418.     darion:FullCastSpellOnTarget(25515, arthas)
  419. end
  420.  
  421. function dar_judgement2(pUnit, event)
  422.     darion:FullCastSpellOnTarget(68019, arthas)
  423. end
Advertisement
Add Comment
Please, Sign In to add comment