Advertisement
Bwl-Network

Custom Arena : The Lichking

Jul 4th, 2013
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.86 KB | None | 0 0
  1. local NPC_ID = 600004
  2.  
  3. function Masterofarena_OnSpawn(unit, event)
  4.     are = unit
  5. end
  6.  
  7. RegisterUnitEvent(600000, 18, "Masterofarena_OnSpawn")
  8.  
  9. function TheLichKing_OnSpawn(unit, event)
  10.     tlk = unit
  11. end
  12.  
  13. RegisterUnitEvent(600004, 18, "TheLichKing_OnSpawn")
  14.  
  15. function TheLichKing_OnCombat(unit, event)
  16.     are:SendChatMessage(14, 0, "Next, the leader of the scourge, the Lich King waits for you!")
  17.     are:Emote(1, 50)
  18.     tlk:SendChatMessage(14, 0, "No one can ever stop the scourge!")
  19.     tlk:Root()
  20.     tlk:TeleportCreature(2178.245361, -4766.237305, 55.137955)
  21.     tlk:RegisterEvent("Pain_And_Suffering", 5000, 0)
  22. end
  23.  
  24. function Pain_And_Suffering(unit, event)
  25.     tlk:CastSpellOnTarget(72133, unit:GetMainTank())
  26. end
  27.  
  28. function TheLichKing_OnLeaveCombat(unit, event)
  29.     tlk:Despawn(10, 0)
  30.     tlk:RemoveEvents()
  31.     are:SetNPCFlags(15)
  32. end
  33.  
  34. function TheLichKing_OnKilledPlayer(unit, event, player)
  35.     tlk:SendChatMessage(14, 0, "You have lost "..player:GetName().."!")
  36.     are:SetNPCFlags(15)
  37.     are:Emote(1, 50)
  38.     are:SendChatMessage(14, 0, "You have lost, "..player:GetName().."! Please try later again!")
  39.     player:CastSpell(34776)
  40.     player:Teleport(1, 2214.309326, -4775.207031, 73.038269, 4.438317)
  41. end
  42.  
  43. function TheLichKing_OnDied(unit, event, player)
  44.     are:SetNPCFlags(15)
  45.     are:SendChatMessage(14, 0, "Congratulations you defeat Illidan "..player:GetName().."!")
  46.     are:Emote(1, 50)
  47.     tlk:SendChatMessage(14, 0, "I gave up "..player:GetName().."!")
  48.     tlk:Despawn(10, 0)
  49.     player:AddItem(49623, 1)
  50.     player:Teleport(1, 2209.373291, -4780.540039, 65.416451, 2.655464)
  51.     player:CastSpell(34776)
  52. end
  53.  
  54. RegisterUnitEvent(600004, 1, "TheLichKing_OnCombat")
  55. RegisterUnitEvent(600004, 2, "TheLichKing_OnLeaveCombat")
  56. RegisterUnitEvent(600004, 3, "TheLichKing_OnKilledPlayer")
  57. RegisterUnitEvent(600004, 4, "TheLichKing_OnDied")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement