Krinolin

Untitled

Jan 3rd, 2014
160
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.42 KB | None | 0 0
  1. local NPC_ID = 90022
  2.  
  3.  
  4. function hirador_OnCombat(event, creature, target)
  5.     creature:SendUnitSay("Do you also want to feel the wrath of the dragons!?", 0)
  6.     creature:RegisterEvent(hirador_flame_breath, 15000, 0)
  7.     creature:RegisterEvent(spawn_dragonspawn1, 3000, 0)
  8.     creature:RegisterEvent(spawn_dragonspawn2, 3000, 0)
  9.     creature:RegisterEvent(hirador_frenzy, 10000, 0)
  10. end
  11.  
  12. function spawn_dragonspawn1(eventID, delay, pCall, creature)
  13. if creature:GetHealthPct() <= 70 then
  14.     creature:SendUnitSay("You're stronger than I thought, I guess I should get serious!", 0)
  15.     x = creature:GetX()
  16.     y = creature:GetY()
  17.     z = creature:GetZ()
  18.     o = creature:GetO()
  19.     creature:SpawnCreature(90024, x+5, y, z, o, 6, 10000)
  20.     creature:SpawnCreature(90024, x+10, y, z, o, 6, 10000)
  21.     creature:SpawnCreature(90024, x-5, y, z, o, 6, 10000)
  22.     creature:SpawnCreature(90024, x-10, y, z, o, 6, 10000)
  23.     end
  24. end
  25.  
  26. function hirador_flame_breath(eventID, delay, pCall, creature)
  27.     creature:CastSpell(creature:GetVictim(), 74528)
  28. end
  29.  
  30. function spawn_dragonspawn2(eventID, delay, pCall, creature)
  31. if creature:GetHealthPct() <= 40 then
  32.     x = creature:GetX()
  33.     y = creature:GetY()
  34.     z = creature:GetZ()
  35.     o = creature:GetO()
  36.     creature:SpawnCreature(90024, x+5, y, z, o, 6, 10000)
  37.     creature:SpawnCreature(90024, x+10, y, z, o, 6, 10000)
  38.     creature:SpawnCreature(90024, x-5, y, z, o, 6, 10000)
  39.     creature:SpawnCreature(90024, x-10, y, z, o, 6, 10000)
  40.     end
  41. end
  42.  
  43. function hirador_frenzy(eventID, delay, pCall, creature)
  44. if creature:GetHealthPct() <= 25 then
  45. if (hiradorsay25) then
  46.     creature:SendUnitSay("You are getting on my nerves!", 0)
  47.     hiradorsay25 = false
  48.     creature:CastSpell(28131)
  49.     creature:SetDisplayId(25015)
  50.         end
  51.     end
  52. end
  53.  
  54. function hirador_OnDeath(event, creature, killer)
  55.     creature:RemoveEvents()
  56.     creature:SendUnitSay("W-wha-what have I done?...", 0)
  57. end
  58.  
  59. function hirador_OnKilledTarget(event, creature, victim)
  60.     creature:SendUnitSay("Hah! So weak!", 0)
  61. end
  62.  
  63. function hirador_OnLeave(event, creature)
  64.     creature:RemoveEvents()
  65.     creature:SendUnitSay("You can't beat me!", 0)
  66. end
  67.  
  68. function hirador_OnReset(event, creature)
  69.     creature:SendUnitSay("Death, it's all around us!", 0)
  70. end
  71.  
  72. RegisterCreatureEvent(NPC_ID, 1, hirador_OnCombat)
  73. RegisterCreatureEvent(NPC_ID, 2, hirador_OnLeave)
  74. RegisterCreatureEvent(NPC_ID, 3, hirador_OnKilledTarget)
  75. RegisterCreatureEvent(NPC_ID, 4, hirador_OnDeath)
  76. RegisterCreatureEvent(NPC_ID, 32, hirador_OnReset)
Advertisement
Add Comment
Please, Sign In to add comment