stoneharry

Untitled

Mar 14th, 2011
317
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.93 KB | None | 0 0
  1. -------------------------------------------------------------------------------------------------
  2. -- By Stoneharry
  3. -------------------------------------------------------------------------------------------------
  4.  
  5. local Boss = 626262
  6.  
  7. function CThunSpawn(pUnit, Event)
  8.     pUnit:Root()
  9. end
  10.  
  11. function CthunCombat(pUnit, Event)
  12.     pUnit:Root()
  13.     pUnit:RegisterEvent("Whisper_Random", 10000, 0)
  14.     pUnit:RegisterEvent("Random_Visuals_On_Players", 5000, 0)
  15.     pUnit:RegisterEvent("Mind_Flay", 8001, 0)
  16.     --pUnit:RegisterEvent("Rain_Of_FIre", 6000, 0)
  17.     pUnit:RegisterEvent("Check_Health", 3000, 0)
  18. end
  19.  
  20. function Mind_Flay(pUnit)
  21.     local plr = pUnit:GetRandomPlayer(0)
  22.     if plr ~= nil then
  23.         pUnit:FullCastSpellOnTarget(2941,plr)
  24.     end
  25. end
  26.  
  27. function Rain_Of_FIre(pUnit)
  28.     local pla = pUnit:GetRandomPlayer(0)
  29.     if pla ~= nil then
  30.         pUnit:CastSpellAoF(pla:GetX(), pla:GetY(), pla:GetZ(), 33972)
  31.     end
  32. end
  33.  
  34. function Whisper_Random(pUnit)
  35.     local choice = math.random(1,7)
  36.     if(choice == 1) then
  37.         pUnit:SendChatMessage(15, 0, "You are already dead.", 0)
  38.         pUnit:PlaySoundToSet(8581)
  39.     elseif(choice == 2) then
  40.         pUnit:SendChatMessage(15, 0, "Your courage will fail.", 0)
  41.         pUnit:PlaySoundToSet(8582)
  42.     elseif(choice == 3) then
  43.         pUnit:SendChatMessage(15, 0, "Your friends will abandon you.", 0)
  44.         pUnit:PlaySoundToSet(8583) 
  45.     elseif(choice == 4) then
  46.         pUnit:SendChatMessage(15, 0, "You will betray your friends.", 0)
  47.         pUnit:PlaySoundToSet(8584)
  48.     elseif(choice == 5) then
  49.         pUnit:SendChatMessage(15, 0, "You... Will... Die...", 0)
  50.         pUnit:PlaySoundToSet(8585)
  51.     elseif(choice == 6) then
  52.         pUnit:SendChatMessage(15, 0, "You are weak.", 0)
  53.         pUnit:PlaySoundToSet(8586)
  54.     elseif(choice == 7) then
  55.         pUnit:SendChatMessage(15, 0, "Your heart will explode.", 0)
  56.         pUnit:PlaySoundToSet(8587)
  57.     end
  58. end
  59.  
  60. function Random_Visuals_On_Players(pUnit)
  61.     local plr = pUnit:GetRandomPlayer(0)
  62.     if plr ~= nil then
  63.         if math.random(1,2) == 1 then
  64.             plr:CastSpell(37964) -- Lightning
  65.         else
  66.             plr:CastSpell(39180) -- explosion
  67.         end
  68.     end
  69. end
  70.  
  71. function Check_Health(pUnit)
  72.     if pUnit:GetHealthPct() < 75 then
  73.         pUnit:RemoveEvents()
  74.         pUnit:RegisterEvent("Spam_Visuals_To_ME", 1000, 0)
  75.         pUnit:RegisterEvent("Spam_Visuals_To_ME_stop", 7500, 1)
  76.     end
  77. end
  78.  
  79. function Spam_Visuals_To_ME(pUnit)
  80.     for a, plrs in pairs(pUnit:GetInRangePlayers()) do
  81.         plrs:CastSpellOnTarget(403, pUnit)
  82.         pUnit:CastSpellOnTarget(403, plrs)
  83.     end
  84. end
  85.  
  86. function Spam_Visuals_To_ME_stop(pUnit)
  87.     pUnit:RemoveEvents()
  88.     pUnit:RegisterEvent("Whisper_Random", 10000, 0)
  89.     pUnit:RegisterEvent("Random_Visuals_On_Players", 5000, 0)
  90.     pUnit:RegisterEvent("Mind_Flay", 12001, 0)
  91.     --pUnit:RegisterEvent("Rain_Of_FIre", 6000, 0)
  92.     pUnit:RegisterEvent("Mind_Controll", 25000, 0)
  93. end
  94.  
  95. function Mind_Controll(pUnit)
  96.     local p = pUnit:GetRandomPlayer(0)
  97.     if p ~= nil then
  98.         p:SetPlayerLock(1)
  99.         pUnit:SendChatMessage(42,0,"C'Thun is mind controlling "..p:GetName().."!")
  100.         local t = pUnit:GetRandomPlayer(0)
  101.         if t ~= nil then
  102.             if math.random(1,2) == 1 then
  103.                 p:FullCastSpellOnTarget(37992, t)
  104.             else
  105.                 p:FullCastSpellOnTarget(2941, t)
  106.             end
  107.         end
  108.         RegisterTimedEvent("Release_Lol", 8000, 1, p, pUnit)
  109.     end
  110. end
  111.  
  112. function Release_Lol(p, pUnit)
  113.     p:SetPlayerLock(0)
  114.     pUnit:SendChatMessageToPlayer(42,0,"You have been released!", p)
  115. end
  116.  
  117. function Check_Health_TWo(pUnit)
  118.     if pUnit:GetHealthPct() < 25 then
  119.         pUnit:RemoveEvents()
  120.         pUnit:RegisterEvent("Whisper_Random", 10000, 0)
  121.         pUnit:RegisterEvent("Random_Visuals_On_Players", 3000, 0)
  122.         pUnit:RegisterEvent("Mind_Flay", 8001, 0)
  123.         --pUnit:RegisterEvent("Rain_Of_FIre", 8000, 0)
  124.         pUnit:RegisterEvent("Mind_Controll", 20000, 0)
  125.     end
  126. end
  127.  
  128. function CthunLeave(pUnit, Event)
  129.     pUnit:RemoveEvents()
  130. end
  131.  
  132. function CthunDead(pUnit, Event)
  133.     pUnit:RemoveEvents()
  134. end
  135.  
  136. RegisterUnitEvent(Boss, 1, "CthunCombat")
  137. RegisterUnitEvent(Boss, 2, "CthunLeave")
  138. RegisterUnitEvent(Boss, 4, "CthunDead")
  139. RegisterUnitEvent(Boss, 18, "CThunSpawn")
Advertisement
Add Comment
Please, Sign In to add comment