All pastes #978183 Raw Edit

Something

public cpp v1 · immutable
·published 2008-04-09 11:13 UTC
rendered paste body
Index: scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp===================================================================--- scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp    (revision 290)+++ scripts/zone/coilfang_resevoir/serpent_shrine/boss_fathomlord_karathress.cpp    (working copy)@@ -16,8 +16,8 @@  /* ScriptData SDName: Boss_Fathomlord_Karathress-SD%Complete: 50-SDComment: Missing Multishot, pet, Totems, Windfury, Whirlwind+SD%Complete: 65+SDComment: Totems, Windfury, Whirlwind EndScriptData */  #include "../../../sc_defines.h"@@ -31,15 +31,22 @@ #define SPELL_POWER_OF_TIDALVESS   38452 #define SPELL_POWER_OF_CARIBDIS    38451 #define SPELL_ENRAGE               24318+ //Sharkkis spells+#define SPELL_MULITSHOT            29576 #define SPELL_LEECHING_THROW       29436 #define SPELL_THE_BEAST_WITHIN     38373+// Fathom Lurker 22119+// Fathom Sporebat 22120+ //Tidalvess spells #define SPELL_FROST_SHOCK          38234+#define SPELL_WINDFURY             43303 // Flame Shock, WF don't work+ //Caribdis Spells #define SPELL_WATER_BOLT_VOLLEY    38335-#define SPELL_TIDAL_SURGE          38353-#define SPELL_HEAL                 41386+#define SPELL_TIDAL_SURGE          40875 // not working so alternative spell+#define SPELL_HEAL                 24947 // Heal whole hp :)  #define SAY_AGGRO                  "Guards, attention! We have visitors..." #define SAY_SLAY1                  "I am rid of you."@@ -327,6 +334,8 @@      uint32 LeechingThrow_Timer;     uint32 TheBeastWithin_Timer;+    uint32 Multishot_Timer;+    uint32 Summon_Timer;      bool InCombat; @@ -334,6 +343,8 @@     {         LeechingThrow_Timer = 20000;         TheBeastWithin_Timer = 30000;+        Multishot_Timer = 40000;+        Summon_Timer = 2000;           InCombat = false; @@ -344,21 +355,6 @@          if(pInstance)             pInstance->SetData(DATA_KARATHRESSEVENT, 0);--        -        -        -         -        -        -        -        -        -        -        -        -        -             }      void JustDied(Unit *victim)@@ -445,6 +441,27 @@         if(pInstance && !pInstance->GetData(DATA_KARATHRESSEVENT))             EnterEvadeMode(); +        //Summon_Timer+        if(Summon_Timer < diff)+        {+            Unit* spwcreature = NULL;+            switch(rand()%3)+            {+                case 0:+                spwcreature = m_creature->SummonCreature(22119,m_creature->getVictim()->GetPositionX(),m_creature->getVictim()->GetPositionY(),m_creature->getVictim()->GetPositionZ(),0, TEMPSUMMON_DEAD_DESPAWN, 500000);+                break;++                case 1:+                spwcreature = m_creature->SummonCreature(22120,m_creature->getVictim()->GetPositionX(),m_creature->getVictim()->GetPositionY(),m_creature->getVictim()->GetPositionZ(),0, TEMPSUMMON_DEAD_DESPAWN, 500000);+                break;++                case 2:+                spwcreature = m_creature->SummonCreature(22119,m_creature->getVictim()->GetPositionX(),m_creature->getVictim()->GetPositionY(),m_creature->getVictim()->GetPositionZ(),0, TEMPSUMMON_DEAD_DESPAWN, 500000);+                spwcreature = m_creature->SummonCreature(22120,m_creature->getVictim()->GetPositionX(),m_creature->getVictim()->GetPositionY(),m_creature->getVictim()->GetPositionZ(),0, TEMPSUMMON_DEAD_DESPAWN, 500000);+                break;+            }+            Summon_Timer = 600000;+        }else Summon_Timer -=diff;         //LeechingThrow_Timer         if(LeechingThrow_Timer < diff)         {@@ -456,9 +473,17 @@         if(TheBeastWithin_Timer < diff)         {             DoCast(m_creature, SPELL_THE_BEAST_WITHIN);-            TheBeastWithin_Timer = 30000;+            TheBeastWithin_Timer = 31000;         }else TheBeastWithin_Timer -= diff; +        //Mulitshot_Timer+        if(Multishot_Timer < diff)+        {+            DoCast(SelectUnit(SELECT_TARGET_RANDOM, 1), SPELL_MULITSHOT);+            Multishot_Timer = 36000;+        }else Multishot_Timer -= diff;++         DoMeleeAttackIfReady();     } };@@ -475,12 +500,14 @@     ScriptedInstance* pInstance;      uint32 FrostShock_Timer;+    uint32 Windfury_Timer;      bool InCombat;      void Reset()     {         FrostShock_Timer = 25000;+        Windfury_Timer = 20000;          InCombat = false; @@ -491,23 +518,8 @@          if(pInstance)             pInstance->SetData(DATA_KARATHRESSEVENT, 0);+    } -        -        -        -         -        -        -        -        -        -        -        -        -        -        -    }-     void JustDied(Unit *victim)     {         if(pInstance)@@ -599,6 +611,13 @@             FrostShock_Timer = 25000+rand()%5000;         }else FrostShock_Timer -= diff; +        //Windfury_Timer+        if(Windfury_Timer < diff)+        {+            DoCast(SelectUnit(SELECT_TARGET_RANDOM, 1), SPELL_WINDFURY);+            Windfury_Timer = 10000+rand()%10000;+        }else Windfury_Timer -= diff;+         DoMeleeAttackIfReady();     } };@@ -624,7 +643,7 @@     {         WaterBoltVolley_Timer = 35000;         TidalSurge_Timer = 15000+rand()%5000;-        Heal_Timer = 55000;+        Heal_Timer = 120000;          InCombat = false; @@ -635,23 +654,8 @@          if(pInstance)             pInstance->SetData(DATA_KARATHRESSEVENT, 0);+} -        -        -        -         -        -        -        -        -        -        -        -        -        -        -    }-     void JustDied(Unit *victim)     {         if(pInstance)@@ -778,8 +782,8 @@                 }             }else pUnit = m_creature; -            if(pUnit && pUnit->isAlive())-                DoCast(pUnit, SPELL_HEAL);+            if(pUnit && pUnit->isAlive()){DoCast(pUnit, SPELL_HEAL);}+            else { DoCast(m_creature, SPELL_HEAL);}              Heal_Timer = 60000;         }else Heal_Timer -= diff;