Advertisement
Guest User

boss_gluth

a guest
Oct 28th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 5.29 KB | None | 0 0
  1. /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
  2.  * This program is free software; you can redistribute it and/or modify
  3.  * it under the terms of the GNU General Public License as published by
  4.  * the Free Software Foundation; either version 2 of the License, or
  5.  * (at your option) any later version.
  6.  *
  7.  * This program is distributed in the hope that it will be useful,
  8.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10.  * GNU General Public License for more details.
  11.  *
  12.  * You should have received a copy of the GNU General Public License
  13.  * along with this program; if not, write to the Free Software
  14.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  15.  */
  16.  
  17. /* ScriptData
  18. SDName: Boss_Gluth
  19. SD%Complete: 100
  20. SDComment:
  21. SDCategory: Naxxramas
  22. EndScriptData */
  23.  
  24. #include "ScriptPCH.h"
  25.  
  26. #define SPELL_MORTALWOUND       25646
  27. #define SPELL_DECIMATE          28374
  28. #define SPELL_TERRIFYINGROAR    29685
  29. #define SPELL_FRENZY            19812
  30. #define SPELL_ENRAGE            28747
  31.  
  32. #define ADD_1X 3269.590f
  33. #define ADD_1Y -3161.287f
  34. #define ADD_1Z 297.423f
  35.  
  36. #define ADD_2X 3277.797f
  37. #define ADD_2Y -3170.352f
  38. #define ADD_2Z 297.423f
  39.  
  40. #define ADD_3X 3267.049f
  41. #define ADD_3Y -3172.820f
  42. #define ADD_3Z 297.423f
  43.  
  44. #define ADD_4X 3252.157f
  45. #define ADD_4Y -3132.135f
  46. #define ADD_4Z 297.423f
  47.  
  48. #define ADD_5X 3259.990f
  49. #define ADD_5Y -3126.590f
  50. #define ADD_5Z 297.423f
  51.  
  52. #define ADD_6X 3259.815f
  53. #define ADD_6Y -3137.576f
  54. #define ADD_6Z 297.423f
  55.  
  56. #define ADD_7X 3308.030f
  57. #define ADD_7Y -3132.135f
  58. #define ADD_7Z 297.423f
  59.  
  60. #define ADD_8X 3303.046f
  61. #define ADD_8Y -3180.682f
  62. #define ADD_8Z 297.423f
  63.  
  64. #define ADD_9X 3313.283f
  65. #define ADD_9Y -3180.766f
  66. #define ADD_9Z 297.423f
  67.  
  68. struct boss_gluthAI : public ScriptedAI
  69. {
  70.     boss_gluthAI(Creature *c) : ScriptedAI(c) {}
  71.  
  72.     uint32 MortalWound_Timer;
  73.     uint32 Decimate_Timer;
  74.     uint32 TerrifyingRoar_Timer;
  75.     uint32 Frenzy_Timer;
  76.     uint32 Enrage_Timer;
  77.     uint32 Summon_Timer;
  78.  
  79.     void Reset()
  80.     {
  81.         MortalWound_Timer = 8000;
  82.         Decimate_Timer = 100000;
  83.         TerrifyingRoar_Timer = 21000;
  84.         Frenzy_Timer = 15000;
  85.         Enrage_Timer = 304000;
  86.         Summon_Timer = 10000;
  87.     }
  88.  
  89.     void EnterCombat(Unit *who)
  90.     {
  91.     }
  92.  
  93.     void UpdateAI(const uint32 diff)
  94.     {
  95.         if (!UpdateVictim())
  96.             return;
  97.  
  98.         //MortalWound_Timer
  99.         if (MortalWound_Timer <= diff)
  100.         {
  101.             DoCast(me->getVictim(),SPELL_MORTALWOUND);
  102.             MortalWound_Timer = 10000;
  103.         } else MortalWound_Timer -= diff;
  104.  
  105.         //Decimate_Timer
  106.         if (Decimate_Timer <= diff)
  107.         {
  108.             DoCast(me->getVictim(),SPELL_DECIMATE);
  109.             Decimate_Timer = 100000;
  110.         } else Decimate_Timer -= diff;
  111.  
  112.         //TerrifyingRoar_Timer
  113.         if (TerrifyingRoar_Timer <= diff)
  114.         {
  115.             DoCast(me->getVictim(),SPELL_TERRIFYINGROAR);
  116.             TerrifyingRoar_Timer = 20000;
  117.         } else TerrifyingRoar_Timer -= diff;
  118.  
  119.         //Frenzy_Timer
  120.         if (Frenzy_Timer <= diff)
  121.         {
  122.             DoCast(me,SPELL_FRENZY);
  123.             Frenzy_Timer = 10500;
  124.         } else Frenzy_Timer -= diff;
  125.  
  126.         //Enrage_Timer
  127.         if (Enrage_Timer <= diff)
  128.         {
  129.             DoCast(me,SPELL_ENRAGE);
  130.             Enrage_Timer = 61000;
  131.         } else Enrage_Timer -= diff;
  132.  
  133.         //Summon_Timer
  134.         if (Summon_Timer <= diff)
  135.         {
  136.             Unit *pTarget = NULL;
  137.             Unit* SummonedZombies = NULL;
  138.  
  139.             SummonedZombies = me->SummonCreature(16360,ADD_1X,ADD_1Y,ADD_1Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
  140.             SummonedZombies = me->SummonCreature(16360,ADD_2X,ADD_2Y,ADD_2Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
  141.             SummonedZombies = me->SummonCreature(16360,ADD_3X,ADD_3Y,ADD_3Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
  142.             SummonedZombies = me->SummonCreature(16360,ADD_4X,ADD_4Y,ADD_4Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
  143.             SummonedZombies = me->SummonCreature(16360,ADD_5X,ADD_5Y,ADD_5Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
  144.             SummonedZombies = me->SummonCreature(16360,ADD_6X,ADD_6Y,ADD_6Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
  145.             SummonedZombies = me->SummonCreature(16360,ADD_7X,ADD_7Y,ADD_7Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
  146.             SummonedZombies = me->SummonCreature(16360,ADD_8X,ADD_8Y,ADD_8Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
  147.             SummonedZombies = me->SummonCreature(16360,ADD_9X,ADD_9Y,ADD_9Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
  148.  
  149.             if (SummonedZombies)
  150.             {
  151.                 pTarget = SelectUnit(SELECT_TARGET_RANDOM,0);
  152.                 if (pTarget)
  153.                     SummonedZombies->AddThreat(pTarget,1.0f);
  154.             }
  155.  
  156.             Summon_Timer = 28000;
  157.         } else Summon_Timer -= diff;
  158.  
  159.         DoMeleeAttackIfReady();
  160.     }
  161. };
  162. CreatureAI* GetAI_boss_gluth(Creature* pCreature)
  163. {
  164.     return new boss_gluthAI (pCreature);
  165. }
  166.  
  167. void AddSC_boss_gluth()
  168. {
  169.     Script *newscript;
  170.     newscript = new Script;
  171.     newscript->Name = "boss_gluth";
  172.     newscript->GetAI = &GetAI_boss_gluth;
  173.     newscript->RegisterSelf();
  174. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement