Krinolin

Untitled

Jan 3rd, 2014
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.45 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.     creature:RemoveEventById()
  24.     end
  25. end
  26.  
  27. function hirador_flame_breath(eventID, delay, pCall, creature)
  28.     creature:CastSpell(creature:GetVictim(), 74528)
  29. end
  30.  
  31. function spawn_dragonspawn2(eventID, delay, pCall, creature)
  32. if creature:GetHealthPct() <= 40 then
  33.     x = creature:GetX()
  34.     y = creature:GetY()
  35.     z = creature:GetZ()
  36.     o = creature:GetO()
  37.     creature:SpawnCreature(90024, x+5, y, z, o, 6, 10000)
  38.     creature:SpawnCreature(90024, x+10, y, z, o, 6, 10000)
  39.     creature:SpawnCreature(90024, x-5, y, z, o, 6, 10000)
  40.     creature:SpawnCreature(90024, x-10, y, z, o, 6, 10000)
  41.     end
  42. end
  43.  
  44. function hirador_frenzy(eventID, delay, pCall, creature)
  45. if creature:GetHealthPct() <= 25 then
  46. if (hiradorsay25) then
  47.     creature:SendUnitSay("You are getting on my nerves!", 0)
  48.     hiradorsay25 = false
  49.     creature:CastSpell(28131)
  50.     creature:SetDisplayId(25015)
  51.         end
  52.     end
  53. end
  54.  
  55. function hirador_OnDeath(event, creature, killer)
  56.     creature:RemoveEvents()
  57.     creature:SendUnitSay("W-wha-what have I done?...", 0)
  58. end
  59.  
  60. function hirador_OnKilledTarget(event, creature, victim)
  61.     creature:SendUnitSay("Hah! So weak!", 0)
  62. end
  63.  
  64. function hirador_OnLeave(event, creature)
  65.     creature:RemoveEvents()
  66.     creature:SendUnitSay("You can't beat me!", 0)
  67. end
  68.  
  69. function hirador_OnReset(event, creature)
  70.     creature:SendUnitSay("Death, it's all around us!", 0)
  71. end
  72.  
  73. RegisterCreatureEvent(NPC_ID, 1, hirador_OnCombat)
  74. RegisterCreatureEvent(NPC_ID, 2, hirador_OnLeave)
  75. RegisterCreatureEvent(NPC_ID, 3, hirador_OnKilledTarget)
  76. RegisterCreatureEvent(NPC_ID, 4, hirador_OnDeath)
  77. RegisterCreatureEvent(NPC_ID, 32, hirador_OnReset)
Advertisement
Add Comment
Please, Sign In to add comment