- Timestamp:
- 11/19/08 13:47:58 (17 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 20 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/sql/updates/147_world.sql
r141 r223 10 10 INSERT INTO spell_target_position () VALUES (46020, 580, 1704.34, 928.17, 53.079, 0); 11 11 12 -- Magtheridon Earthquake12 -- Magtheridon Earthquake 13 13 DELETE FROM spell_script_target WHERE `entry` IN (30657); 14 14 INSERT INTO spell_script_target VALUES ('30657', '1', '24136'); -
trunk/sql/world_scripts_full.sql
r167 r223 722 722 UPDATE `creature_template` SET `ScriptName`='boss_nethermancer_sepethrea' WHERE `entry`=19221; 723 723 UPDATE `creature_template` SET `ScriptName`='mob_ragin_flames' WHERE `entry`=20481; 724 UPDATE `creature_template` SET `ScriptName`='boss_pathaleon_the_calculator' WHERE `entry`=19220; 725 UPDATE `creature_template` SET `ScriptName`='mob_nether_wraith' WHERE `entry`=21062; 726 UPDATE `instance_template` SET `script`='instance_mechanar' WHERE `map`=554; 724 727 725 728 /* THE BOTANICA */ -
trunk/src/bindings/scripts/Makefile.am
r187 r223 349 349 scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp \ 350 350 scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp \ 351 scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp \ 352 scripts/zone/tempest_keep/the_mechanar/def_mechanar.h \ 353 scripts/zone/tempest_keep/the_mechanar/instance_mechanar.cpp \ 351 354 scripts/zone/temple_of_ahnqiraj/boss_bug_trio.cpp \ 352 355 scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp \ -
trunk/src/bindings/scripts/ScriptMgr.cpp
r206 r223 514 514 extern void AddSC_boss_gatewatcher_iron_hand(); 515 515 extern void AddSC_boss_nethermancer_sepethrea(); 516 extern void AddSC_boss_pathaleon_the_calculator(); 517 extern void AddSC_instance_mechanar(); 516 518 517 519 //Temple of ahn'qiraj … … 1697 1699 AddSC_boss_gatewatcher_iron_hand(); 1698 1700 AddSC_boss_nethermancer_sepethrea(); 1701 AddSC_boss_pathaleon_the_calculator(); 1702 AddSC_instance_mechanar(); 1699 1703 1700 1704 //Temple of ahn'qiraj -
trunk/src/bindings/scripts/VC71/71ScriptDev2.vcproj
r187 r223 1567 1567 <File 1568 1568 RelativePath="..\scripts\zone\tempest_keep\the_mechanar\boss_nethermancer_sepethrea.cpp" 1569 > 1570 </File> 1571 <File 1572 RelativePath="..\scripts\zone\tempest_keep\the_mechanar\boss_pathaleon_the_calculator.cpp" 1573 > 1574 </File> 1575 <File 1576 RelativePath="..\scripts\zone\tempest_keep\the_mechanar\instance_mechanar.cpp" 1577 > 1578 </File> 1579 <File 1580 RelativePath="..\scripts\zone\tempest_keep\the_mechanar\def_mechanar.h" 1569 1581 > 1570 1582 </File> -
trunk/src/bindings/scripts/VC80/80ScriptDev2.vcproj
r187 r223 1812 1812 <File 1813 1813 RelativePath="..\scripts\zone\tempest_keep\the_mechanar\boss_nethermancer_sepethrea.cpp" 1814 > 1815 </File> 1816 <File 1817 RelativePath="..\scripts\zone\tempest_keep\the_mechanar\boss_pathaleon_the_calculator.cpp" 1818 > 1819 </File> 1820 <File 1821 RelativePath="..\scripts\zone\tempest_keep\the_mechanar\instance_mechanar.cpp" 1822 > 1823 </File> 1824 <File 1825 RelativePath="..\scripts\zone\tempest_keep\the_mechanar\def_mechanar.h" 1814 1826 > 1815 1827 </File> -
trunk/src/bindings/scripts/VC90/90ScriptDev2.vcproj
r187 r223 1798 1798 <File 1799 1799 RelativePath="..\scripts\zone\tempest_keep\the_mechanar\boss_nethermancer_sepethrea.cpp" 1800 > 1801 </File> 1802 <File 1803 RelativePath="..\scripts\zone\tempest_keep\the_mechanar\boss_pathaleon_the_calculator.cpp" 1804 > 1805 </File> 1806 <File 1807 RelativePath="..\scripts\zone\tempest_keep\the_mechanar\instance_mechanar.cpp" 1808 > 1809 </File> 1810 <File 1811 RelativePath="..\scripts\zone\tempest_keep\the_mechanar\def_mechanar.h" 1800 1812 > 1801 1813 </File> -
trunk/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp
r115 r223 163 163 soulclass = 0; 164 164 165 Fear_timer = 20000;165 Fear_timer = 15000 + rand()% 5000; 166 166 Ribbon_of_Souls_timer = 5000; 167 StolenSoul_Timer = 30000;167 StolenSoul_Timer = 25000 + rand()% 10000; 168 168 169 169 HasTaunted = false; … … 251 251 DoCast(m_creature, SPELL_SUMMON_AVATAR); 252 252 Avatar_summoned = true; 253 StolenSoul_Timer = 45000;253 StolenSoul_Timer = 15000 + rand()% 15000; 254 254 } 255 255 … … 276 276 DoSpawnCreature(ENTRY_STOLEN_SOUL,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); 277 277 278 StolenSoul_Timer = 45000;278 StolenSoul_Timer = 20000 + rand()% 10000; 279 279 } else StolenSoul_Timer = 1000; 280 280 } … … 292 292 { 293 293 DoCast(m_creature,SPELL_SOUL_SCREAM); 294 Fear_timer = 25000 + rand()% 10000;294 Fear_timer = 15000 + rand()% 15000; 295 295 }else Fear_timer -= diff; 296 296 -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp
r166 r223 60 60 void Reset() 61 61 { 62 LightningCloud_Timer = 28000;62 LightningCloud_Timer = 15000; 63 63 LungBurst_Timer = 7000; 64 64 EnvelopingWinds_Timer = 9000; … … 112 112 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 113 113 DoCast(target, SPELL_LIGHTNING_CLOUD); 114 LightningCloud_Timer = 28000;114 LightningCloud_Timer = 15000+rand()%10000; 115 115 }else LightningCloud_Timer -=diff; 116 116 … … 120 120 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 121 121 DoCast(target, SPELL_LUNG_BURST); 122 LungBurst_Timer = 10000+rand()%5000;122 LungBurst_Timer = 7000+rand()%5000; 123 123 }else LungBurst_Timer -=diff; 124 124 … … 165 165 { 166 166 DoCast(m_creature, HeroicMode ? H_SPELL_WATER_BOLT_VOLLEY : SPELL_WATER_BOLT_VOLLEY); 167 WaterBoltVolley_Timer = 10000+rand()%5000;167 WaterBoltVolley_Timer = 7000+rand()%5000; 168 168 }else WaterBoltVolley_Timer -= diff; 169 169 -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp
r166 r223 106 106 { 107 107 Reflection_Timer = 10000; 108 Impale_Timer = 30000;108 Impale_Timer = 7000+rand()%7000; 109 109 Rage_Timer = 45000; 110 110 CanRage = false; … … 187 187 ((mob_naga_distillerAI*)distiller->AI())->StartRageGen(m_creature); 188 188 } 189 Rage_Timer = 45000;189 Rage_Timer = 3000+rand()%15000; 190 190 }else Rage_Timer -= diff; 191 191 … … 194 194 { 195 195 DoCast(m_creature, SPELL_SPELL_REFLECTION); 196 Reflection_Timer = 20000+rand()%5000;196 Reflection_Timer = 15000+rand()%10000; 197 197 }else Reflection_Timer -= diff; 198 198 -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_ghazan.cpp
r90 r223 23 23 24 24 #include "../../../creature/simple_ai.h" 25 #include "precompiled.h" 25 26 26 27 /* -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
r166 r223 42 42 #define SPELL_CORRUPTION 30938 43 43 44 #define SPELL_FIRE_NOVA 33 77544 #define SPELL_FIRE_NOVA 33132 45 45 #define H_SPELL_FIRE_NOVA 37371 46 46 47 #define SPELL_SHADOW_BOLT_VOLLEY 1722847 #define SPELL_SHADOW_BOLT_VOLLEY 28599 48 48 #define H_SPELL_SHADOW_BOLT_VOLLEY 40070 49 49 -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp
r166 r223 47 47 void Reset() 48 48 { 49 AcidSpray_Timer = 1 0000;50 ExplodingBreaker_Timer = 4000;49 AcidSpray_Timer = 15000; 50 ExplodingBreaker_Timer = 6000; 51 51 Domination_Timer = 120000; 52 Knockdown_Timer = 6000;52 Knockdown_Timer = 10000; 53 53 } 54 54 … … 85 85 { 86 86 DoCast(m_creature->getVictim(),SPELL_ACID_SPRAY); 87 AcidSpray_Timer = 1 6000+rand()%8000;87 AcidSpray_Timer = 15000+rand()%8000; 88 88 }else AcidSpray_Timer -=diff; 89 89 -
trunk/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp
r90 r223 93 93 BellowingRoarTimer = 30000; 94 94 WingBuffetTimer = 17000; 95 96 m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true); 97 m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true); 95 98 } 96 99 … … 98 101 { 99 102 DoYell(SAY_AGGRO, LANG_UNIVERSAL, NULL); 103 DoZoneInCombat(); 100 104 } 101 105 … … 148 152 { 149 153 DoCast(m_creature->getVictim(), SPELL_CLEAVE); 150 CleaveTimer = 10000;154 CleaveTimer = 7000; 151 155 }else CleaveTimer -= diff; 152 156 … … 187 191 { 188 192 DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_ENGULFINGFLAMES); 189 EngulfingFlamesTimer = 10000;193 EngulfingFlamesTimer = 8000; 190 194 }else EngulfingFlamesTimer -= diff; 191 195 … … 200 204 Whelp->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0)); 201 205 } 202 SummonWhelpsTimer = 45000;206 SummonWhelpsTimer = 30000; 203 207 }else SummonWhelpsTimer -= diff; 204 208 } -
trunk/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp
r90 r223 1 1 /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> 2 3 4 5 6 7 8 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the10 11 12 13 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA15 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 16 17 17 /* ScriptData 18 18 SDName: Boss_jandicebarov 19 19 SD%Complete: 100 20 SDComment: 20 SDComment: 21 21 SDCategory: Scholomance 22 22 EndScriptData */ … … 61 61 switch (rand()%2) 62 62 { 63 64 63 case 0: RandX = 0 - Rand; break; 64 case 1: RandX = 0 + Rand; break; 65 65 } 66 66 Rand = 0; … … 68 68 switch (rand()%2) 69 69 { 70 71 70 case 0: RandY = 0 - Rand; break; 71 case 1: RandY = 0 + Rand; break; 72 72 } 73 73 Rand = 0; … … 81 81 if (Invisible && Invisible_Timer < diff) 82 82 { 83 //Become visible again 83 //Become visible again 84 84 m_creature->setFaction(14); 85 85 m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); 86 //Jandice Model 87 m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,11073); 86 m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,11073); //Jandice Model 88 87 Invisible = false; 89 88 } else if (Invisible) … … 101 100 if (CurseOfBlood_Timer < diff) 102 101 { 102 //Cast 103 103 DoCast(m_creature->getVictim(),SPELL_CURSEOFBLOOD); 104 105 //45 seconds 104 106 CurseOfBlood_Timer = 30000; 105 107 }else CurseOfBlood_Timer -= diff; … … 108 110 if (!Invisible && Illusion_Timer < diff) 109 111 { 112 110 113 //Inturrupt any spell casting 111 114 m_creature->InterruptNonMeleeSpells(false); 112 115 m_creature->setFaction(35); 113 116 m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); 114 // Invisible Model115 m_creature-> SetUInt32Value(UNIT_FIELD_DISPLAYID,11686);117 m_creature->SetUInt32Value(UNIT_FIELD_DISPLAYID,11686); // Invisible Model 118 m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-99); 116 119 117 120 //Summon 10 Illusions attacking random gamers … … 125 128 Invisible_Timer = 3000; 126 129 130 //25 seconds until we should cast this agian 127 131 Illusion_Timer = 25000; 128 132 }else Illusion_Timer -= diff; 133 129 134 130 135 // //Illusion_Timer … … 133 138 // //Cast 134 139 // DoCast(m_creature->getVictim(),SPELL_ILLUSION); 135 // 140 // 136 141 // //3 Illusion will be summoned 137 142 // if (Illusioncounter < 3) … … 141 146 // } 142 147 // else { 148 // //15 seconds until we should cast this again 143 149 // Illusion_Timer = 15000; 144 150 // Illusioncounter=0; 145 151 // } 146 // 152 // 147 153 // }else Illusion_Timer -= diff; 148 154 … … 161 167 void Reset() 162 168 { 163 Cleave_Timer = 4000; 169 Cleave_Timer = 2000 + rand()%6000; 170 m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); 164 171 } 165 172 … … 170 177 void UpdateAI(const uint32 diff) 171 178 { 179 //Return since we have no target 172 180 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) 173 181 return; … … 176 184 if (Cleave_Timer < diff) 177 185 { 186 //Cast 178 187 DoCast(m_creature->getVictim(),SPELL_CLEAVE); 188 189 //5-8 seconds 179 190 Cleave_Timer = 5000 + rand()%3000; 180 191 }else Cleave_Timer -= diff; … … 182 193 DoMeleeAttackIfReady(); 183 194 } 184 }; 195 }; 196 185 197 186 198 CreatureAI* GetAI_boss_jandicebarov(Creature *_Creature) … … 193 205 return new mob_illusionofjandicebarovAI (_Creature); 194 206 } 207 195 208 196 209 void AddSC_boss_jandicebarov() -
trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp
r158 r223 1 1 /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> 2 3 4 5 6 7 8 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the10 11 12 13 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA15 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 16 17 17 /* ScriptData 18 18 SDName: Boss_Doomwalker 19 19 SD%Complete: 100 20 SDComment: 20 SDComment: 21 21 SDCategory: Shadowmoon Valley 22 22 EndScriptData */ … … 26 26 //-------------------------------------- 27 27 //Spells 28 #define SPELL_SUNDER_ARMOR 3 090128 #define SPELL_SUNDER_ARMOR 33661 29 29 30 30 #define SPELL_CHAIN_LIGHTNING 33665 … … 36 36 #define SOUND_OVERRUN_2 11348 37 37 38 #define SPELL_ENRAGE 3 462438 #define SPELL_ENRAGE 33653 39 39 40 40 #define SPELL_MARK_DEATH 37128 … … 45 45 #define SAY_EARTHQUAKE_2 "Magnitude set. Release." 46 46 #define SOUND_EARTHQUAKE_2 11346 47 47 //--------------------------------------- 48 //Aggro 48 49 #define SAY_AGGRO "Do not proceed. You will be eliminated!" 49 50 #define SOUND_AGGRO 11344 50 51 //--------------------------------------- 52 //Slay 51 53 #define SAY_SLAY_1 "Threat level zero." 52 54 #define SOUND_SLAY_1 11349 … … 55 57 #define SAY_SLAY_3 "Target exterminated." 56 58 #define SOUND_SLAY_3 11351 57 59 //--------------------------------------- 60 //Death 58 61 #define SAY_DEATH "System failure in five... four..." 59 62 #define SOUND_DEATH 11352 … … 63 66 boss_doomwalkerAI(Creature *c) : ScriptedAI(c) {Reset();} 64 67 68 65 69 uint32 Chain_Timer; 66 uint32 Enrage_Timer; 70 uint32 Enrage_Timer; 67 71 uint32 Overrun_Timer; 68 uint32 Quake_Timer; 72 uint32 Quake_Timer; 69 73 uint32 Armor_Timer; 70 74 … … 74 78 { 75 79 Enrage_Timer = 0; 76 Armor_Timer = 10000;77 Chain_Timer = 20000;78 Quake_Timer = 60000;79 Overrun_Timer = 120000;80 81 InEnrage = false; 80 Armor_Timer = 5000 + rand()%8000; 81 Chain_Timer = 10000 + rand()%20000; 82 Quake_Timer = 25000 + rand()%10000; 83 Overrun_Timer = 30000 + rand()%15000; 84 85 InEnrage = false; 82 86 } 83 87 … … 89 93 switch(rand()%3) 90 94 { 91 92 93 94 95 96 97 98 99 100 101 102 95 case 0: 96 DoYell(SAY_SLAY_1, LANG_UNIVERSAL, NULL); 97 DoPlaySoundToSet(m_creature, SOUND_SLAY_1); 98 break; 99 case 1: 100 DoYell(SAY_SLAY_2, LANG_UNIVERSAL, NULL); 101 DoPlaySoundToSet(m_creature, SOUND_SLAY_2); 102 break; 103 case 2: 104 DoYell(SAY_SLAY_3, LANG_UNIVERSAL, NULL); 105 DoPlaySoundToSet(m_creature, SOUND_SLAY_3); 106 break; 103 107 } 104 108 } … … 112 116 void Aggro(Unit *who) 113 117 { 114 DoYell(SAY_AGGRO, LANG_UNIVERSAL, NULL);115 DoPlaySoundToSet(m_creature, SOUND_AGGRO);118 DoYell(SAY_AGGRO, LANG_UNIVERSAL, NULL); 119 DoPlaySoundToSet(m_creature, SOUND_AGGRO); 116 120 } 117 121 118 122 void UpdateAI(const uint32 diff) 119 123 { 124 120 125 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) 121 126 return; 122 127 123 if (m_creature->IsWithin CombatDist(m_creature->getVictim(), ATTACK_DISTANCE))128 if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) 124 129 { 125 // when hp <= 20% gain enrage126 if (((m_creature->GetHealth()*100)/ m_creature->GetMaxHealth()) <= 20) 127 { 130 //Spell Enrage 131 if (((m_creature->GetHealth()*100)/ m_creature->GetMaxHealth()) <= 20)//when hp <= 20% gain enrage 132 { 128 133 if(Enrage_Timer < diff) 129 134 { … … 136 141 //Spell Overrun 137 142 if (Overrun_Timer < diff) 138 { 143 { 139 144 switch(rand()%2) 140 145 { 141 142 143 144 145 146 147 148 146 case 0: 147 DoYell(SAY_OVERRUN_1, LANG_UNIVERSAL, NULL); 148 DoPlaySoundToSet(m_creature, SOUND_OVERRUN_1); 149 break; 150 case 1: 151 DoYell(SAY_OVERRUN_2, LANG_UNIVERSAL, NULL); 152 DoPlaySoundToSet(m_creature, SOUND_OVERRUN_2); 153 break; 149 154 } 150 155 DoCast(m_creature->getVictim(),SPELL_OVERRUN); 151 Overrun_Timer = (30 + rand()% 40) * 1000; //30-70sec cooldown156 Overrun_Timer = 25000 + rand()%15000; 152 157 153 158 }else Overrun_Timer -= diff; … … 161 166 switch(rand()%2) 162 167 { 163 164 165 166 167 168 169 170 168 case 0: 169 DoYell(SAY_EARTHQUAKE_1, LANG_UNIVERSAL, NULL); 170 DoPlaySoundToSet(m_creature, SOUND_EARTHQUAKE_1); 171 break; 172 case 1: 173 DoYell(SAY_EARTHQUAKE_2, LANG_UNIVERSAL, NULL); 174 DoPlaySoundToSet(m_creature, SOUND_EARTHQUAKE_2); 175 break; 171 176 } 172 177 if(InEnrage) … … 175 180 } 176 181 DoCast(m_creature,SPELL_EARTHQUAKE); 177 Quake_Timer = (70 + rand()% 30) * 1000; //70-100sec cooldown182 Quake_Timer = 30000 + rand()%25000; 178 183 }else Quake_Timer -= diff; 179 184 … … 182 187 { 183 188 DoCast(m_creature->getVictim(),SPELL_CHAIN_LIGHTNING); 184 Chain_Timer = (50 + rand()% 50) * 1000; //50-100sec cooldown189 Chain_Timer = 15000 + rand()%25000; 185 190 }else Chain_Timer -= diff; 186 191 187 //Spell Sunder Armor 192 //Spell Sunder Armor 188 193 if (Armor_Timer < diff) 189 194 { 190 195 DoCast(m_creature->getVictim(),SPELL_SUNDER_ARMOR); 191 Armor_Timer = (15 + rand()% 7) * 1000; //15-23sec cooldown about 70 proc to stack196 Armor_Timer = 15000 + rand()%15000; 192 197 }else Armor_Timer -= diff; 193 198 … … 195 200 } 196 201 } 197 }; 202 }; 198 203 199 204 CreatureAI* GetAI_boss_doomwalker(Creature *_Creature) -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_warp_splinter.cpp
r90 r223 1 1 /* Copyright (C) 2006,2007 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> 2 3 4 5 6 7 8 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the10 11 12 13 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA15 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 16 17 17 /* ScriptData … … 70 70 #define WAR_STOMP 34716 71 71 #define SUMMON_TREANTS 34727 // DBC: 34727, 34731, 34733, 34734, 34736, 34739, 34741 (with Ancestral Life spell 34742) // won't work (guardian summon) 72 #define ARCANE_VOLLEY 3 5059//37078, 34785 //must additional script them (because Splinter eats them after 20 sec ^)72 #define ARCANE_VOLLEY 36705 //37078, 34785 //must additional script them (because Splinter eats them after 20 sec ^) 73 73 #define SPELL_HEAL_FATHER 6262 74 74 … … 93 93 #define TREANT_SPAWN_DIST 50 //50 yards from Warp Splinter's spawn point 94 94 95 float treant_pos[6][3] = 95 float treant_pos[6][3] = 96 96 { 97 97 {24.301233, 427.221100, -27.060635}, … … 122 122 float Treant_Spawn_Pos_Y; 123 123 124 bool InCombat; 124 125 125 126 void Reset() 126 127 { 127 War_Stomp_Timer = 60000; 128 InCombat = false; 129 130 War_Stomp_Timer = 25000 + rand()%15000; 128 131 Summon_Treants_Timer = 45000; 129 Arcane_Volley_Timer = 140000;132 Arcane_Volley_Timer = 8000 + rand()%12000; 130 133 CheckTreantLOS_Timer = 1000; 131 134 TreantLife_Timer = 999999; … … 141 144 DoYell(SAY_COMBAT_START,LANG_UNIVERSAL,NULL); 142 145 DoPlaySoundToSet(m_creature,SOUND_COMBAT_START); 146 InCombat = true; 143 147 } 144 148 … … 148 152 switch(rand()%2) 149 153 { 150 case 0: 151 DoYell(SAY_SLAY_1,LANG_UNIVERSAL,NULL); 152 DoPlaySoundToSet(m_creature, SOUND_SLAY_1); 153 break; 154 case 1: 155 DoYell(SAY_SLAY_2,LANG_UNIVERSAL,NULL); 156 DoPlaySoundToSet(m_creature, SOUND_SLAY_2); 157 break; 158 } 159 } 160 154 case 0: 155 DoYell(SAY_SLAY_1,LANG_UNIVERSAL,NULL); 156 DoPlaySoundToSet(m_creature, SOUND_SLAY_1); 157 break; 158 case 1: 159 DoYell(SAY_SLAY_2,LANG_UNIVERSAL,NULL); 160 DoPlaySoundToSet(m_creature, SOUND_SLAY_2); 161 break; 162 } 163 } 164 165 // On Death 161 166 void JustDied(Unit* Killer) 162 167 { … … 168 173 { 169 174 for(int i = 0; i < 6; ++i) 170 { 175 { 171 176 float angle = (M_PI / 3) * i; 172 177 … … 186 191 } 187 192 } 188 189 193 switch(rand()%2) 190 { 191 192 193 194 195 196 197 198 break;194 { 195 case 0: 196 DoYell(SAY_SUMMON_1,LANG_UNIVERSAL,NULL); 197 DoPlaySoundToSet(m_creature,SOUND_SUMMON_1); 198 break; 199 case 1: 200 DoYell(SAY_SUMMON_2,LANG_UNIVERSAL,NULL); 201 DoPlaySoundToSet(m_creature,SOUND_SUMMON_2); 202 break; 199 203 } 200 204 } … … 224 228 void UpdateAI(const uint32 diff) 225 229 { 230 //Return since we have no target 226 231 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) 227 232 return; … … 230 235 if(War_Stomp_Timer < diff) 231 236 { 237 //time to cast 232 238 DoCast(m_creature->getVictim(),WAR_STOMP); 233 War_Stomp_Timer = 60000; 239 240 //Cast again on time 241 War_Stomp_Timer = 25000 + rand()%15000; 234 242 } 235 243 else War_Stomp_Timer -= diff; … … 238 246 if(Arcane_Volley_Timer < diff) 239 247 { 248 //time to cast 240 249 DoCast(m_creature->getVictim(),ARCANE_VOLLEY); 241 Arcane_Volley_Timer = 40000+((rand()%20)*1000); 250 251 //Cast again on time 252 Arcane_Volley_Timer = 20000 + rand()%15000; 242 253 } 243 254 else Arcane_Volley_Timer -= diff; … … 247 258 { 248 259 SummonTreants(); 249 Summon_Treants_Timer = 45000; 260 261 //Cast again on time 262 Summon_Treants_Timer = 45000; 250 263 } 251 264 else Summon_Treants_Timer -= diff; … … 255 268 { 256 269 EatTreant(); 270 257 271 CheckTreantLOS_Timer = 1000; 258 272 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp
r90 r223 1 1 /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> 2 3 4 5 6 7 8 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the10 11 12 13 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA15 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 16 17 17 /* ScriptData 18 18 SDName: Boss Gatewatcher Ironhand 19 19 SD%Complete: 100 20 SDComment: 20 SDComment: 21 21 SDCategory: Tempest Keep, The Mechanar 22 22 EndScriptData */ … … 24 24 #include "precompiled.h" 25 25 26 #define SPELL_SHADOW_POWER 35322 27 #define SPELL_JACKHAMMER 35326 28 #define SPELL_STREAM_OF_MACHINE_FLUID 35311 26 // Spells to be casted 27 #define SPELL_SHADOW_POWER 35322 28 #define SPELL_JACKHAMMER 35326 29 #define SPELL_STREAM_OF_MACHINE_FLUID 35311 29 30 30 #define SAY_SPELL_JACKHAMMER_1 "With the precise angle and velocity... " 31 #define SOUND_SPELL_JACKHAMMER_1 11112 32 #define SAY_SPELL_JACKHAMMER_2 "Low tech yet quiet effective!" 33 #define SOUND_SPELL_JACKHAMMER_2 11113 31 #define SAY_SPELL_JACKHAMMER_1 "With the precise angle and velocity... " 32 #define SOUND_SPELL_JACKHAMMER_1 11112 33 #define SAY_SPELL_JACKHAMMER_2 "Low tech yet quiet effective!" 34 #define SOUND_SPELL_JACKHAMMER_2 11113 35 // On Aggro 36 #define SAY_AGGRO_1 "You have approximately five seconds to live." 37 #define SOUND_SAY_AGGRO_1 11109 34 38 35 #define SAY_AGGRO_1 "You have approximately five seconds to live." 36 #define SOUND_SAY_AGGRO_1 11109 39 //On Kill Unit 40 #define SAY_SLAY_1 "A foregone conclusion." 41 #define SOUND_SLAY_1 11110 42 #define SAY_SLAY_2 "The processing will continue a schedule!" 43 #define SOUND_SLAY_2 11111 44 // On Death 45 #define SAY_DEATH_1 "My calculations did not... " 46 #define SOUND_DEATH_1 11114 37 47 38 #define SAY_SLAY_1 "A foregone conclusion." 39 #define SOUND_SLAY_1 11110 40 #define SAY_SLAY_2 "The processing will continue a schedule!" 41 #define SOUND_SLAY_2 11111 48 // Gatewatcher Iron-Hand AI 49 struct TRINITY_DLL_DECL boss_gatewatcher_iron_handAI : public ScriptedAI 50 { 51 boss_gatewatcher_iron_handAI(Creature *c) : ScriptedAI(c) { Reset(); } 42 52 43 #define SAY_DEATH_1 "My calculations did not... " 44 #define SOUND_DEATH_1 11114 53 uint32 Shadow_Power_Timer; 54 uint32 Jackhammer_Timer; 55 uint32 Stream_of_Machine_Fluid_Timer; 45 56 46 47 struct TRINITY_DLL_DECL boss_gatewatcher_iron_handAI : public ScriptedAI 48 { 49 boss_gatewatcher_iron_handAI(Creature *c) : ScriptedAI(c) { Reset(); } 50 51 uint32 Shadow_Power_Timer; 52 uint32 Jackhammer_Timer; 53 uint32 Stream_of_Machine_Fluid_Timer; 54 55 void Reset() 56 { 57 Shadow_Power_Timer = 25000; 57 void Reset() 58 { 59 Shadow_Power_Timer = 25000; 58 60 Jackhammer_Timer = 45000; 59 61 Stream_of_Machine_Fluid_Timer = 55000; 60 }61 62 62 void Aggro(Unit *who) 63 { 64 } 63 } 64 void Aggro(Unit *who) 65 { 66 } 65 67 66 void KilledUnit(Unit* victim) 68 // On Killed Unit 69 void KilledUnit(Unit* victim) 67 70 { 68 71 if (rand()%2) … … 71 74 switch(rand()%2) 72 75 { 73 case 0: 74 DoYell(SAY_SLAY_1, LANG_UNIVERSAL, NULL); 75 DoPlaySoundToSet(m_creature,SOUND_SLAY_1); 76 break; 77 case 1: 78 DoYell(SAY_SLAY_2, LANG_UNIVERSAL, NULL); 79 DoPlaySoundToSet(m_creature,SOUND_SLAY_2); 80 break; 76 case 0: 77 DoYell(SAY_SLAY_1, LANG_UNIVERSAL, NULL); 78 DoPlaySoundToSet(m_creature,SOUND_SLAY_1); 79 break; 80 81 case 1: 82 DoYell(SAY_SLAY_2, LANG_UNIVERSAL, NULL); 83 DoPlaySoundToSet(m_creature,SOUND_SLAY_2); 84 break; 81 85 } 86 } 87 88 // On Death 89 void JustDied(Unit* Killer) 90 { 91 DoYell(SAY_DEATH_1,LANG_UNIVERSAL,NULL); 92 DoPlaySoundToSet(m_creature, SOUND_DEATH_1); 82 93 } 83 94 84 void JustDied(Unit* Killer)85 { 86 DoYell(SAY_DEATH_1,LANG_UNIVERSAL,NULL);87 DoPlaySoundToSet(m_creature, SOUND_DEATH_1);88 }95 void UpdateAI(const uint32 diff) 96 { 97 //Return since we have no target 98 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) 99 return; 89 100 90 void UpdateAI(const uint32 diff) 91 { 92 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) 93 return; 101 //Check for Shadow Power 102 if(Shadow_Power_Timer < diff) 103 { 104 //time to cast 105 DoCast(m_creature,SPELL_SHADOW_POWER); 94 106 95 //Shadow Power 96 if(Shadow_Power_Timer < diff) 97 { 98 DoCast(m_creature,SPELL_SHADOW_POWER); 99 Shadow_Power_Timer = 25000; 100 }else Shadow_Power_Timer -= diff; 107 //Cast again on time 108 Shadow_Power_Timer = 20000 + rand()%8000; 109 }else Shadow_Power_Timer -= diff; 101 110 102 //Jack Hammer 103 if(Jackhammer_Timer < diff) 104 { 105 DoCast(m_creature->getVictim(),SPELL_JACKHAMMER); 111 //Check for Jack Hammer 112 if(Jackhammer_Timer < diff) 113 { 114 //time to cast 115 DoCast(m_creature->getVictim(),SPELL_JACKHAMMER); 106 116 107 117 if (rand()%2) … … 110 120 switch(rand()%2) 111 121 { 112 case 0: 113 DoYell(SAY_SPELL_JACKHAMMER_1, LANG_UNIVERSAL, NULL); 114 DoPlaySoundToSet(m_creature,SOUND_SPELL_JACKHAMMER_1); 115 break; 116 case 1: 117 DoYell(SAY_SPELL_JACKHAMMER_2, LANG_UNIVERSAL, NULL); 118 DoPlaySoundToSet(m_creature,SOUND_SPELL_JACKHAMMER_2); 119 break; 120 } 122 case 0: 123 DoYell(SAY_SPELL_JACKHAMMER_1, LANG_UNIVERSAL, NULL); 124 DoPlaySoundToSet(m_creature,SOUND_SPELL_JACKHAMMER_1); 125 break; 121 126 122 Jackhammer_Timer = 45000; 123 }else Jackhammer_Timer -= diff; 127 case 1: 128 DoYell(SAY_SPELL_JACKHAMMER_2, LANG_UNIVERSAL, NULL); 129 DoPlaySoundToSet(m_creature,SOUND_SPELL_JACKHAMMER_2); 130 break; 131 } 132 //Cast again on time 133 Jackhammer_Timer = 30000; 134 }else Jackhammer_Timer -= diff; 124 135 125 //Stream of Machine Fluid 126 if(Stream_of_Machine_Fluid_Timer < diff) 127 { 128 DoCast(m_creature->getVictim(),SPELL_STREAM_OF_MACHINE_FLUID); 129 Stream_of_Machine_Fluid_Timer = 55000; 136 //Check for Stream of Machine Fluid 137 if(Stream_of_Machine_Fluid_Timer < diff) 138 { 139 //time to cast 140 DoCast(m_creature->getVictim(),SPELL_STREAM_OF_MACHINE_FLUID); 141 142 //Cast again on time 143 Stream_of_Machine_Fluid_Timer = 35000 + rand()%15000; 130 144 }else Stream_of_Machine_Fluid_Timer -= diff; 131 145 132 146 DoMeleeAttackIfReady(); 133 } 134 }; 147 } 148 }; 135 149 CreatureAI* GetAI_boss_gatewatcher_iron_hand(Creature *_Creature) 136 { 150 { 137 151 return new boss_gatewatcher_iron_handAI (_Creature); 138 } 152 } 139 153 140 154 void AddSC_boss_gatewatcher_iron_hand() 141 { 142 Script *newscript; 143 newscript = new Script; 144 newscript->Name="boss_gatewatcher_iron_hand"; 145 newscript->GetAI = GetAI_boss_gatewatcher_iron_hand; 155 { 156 Script *newscript; 157 newscript = new Script; 158 newscript->Name="boss_gatewatcher_iron_hand"; 159 newscript->GetAI = GetAI_boss_gatewatcher_iron_hand; 146 160 m_scripts[nrscripts++] = newscript; 147 161 } -
trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp
r90 r223 1 1 /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> 2 3 4 5 6 7 8 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.See the10 11 12 13 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA15 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 16 17 17 /* ScriptData 18 18 SDName: Boss Nethermancer Sepethrea 19 19 SD%Complete: 100 20 SDComment: 20 SDComment: 21 21 SDCategory: Tempest Keep, The Mechanar 22 22 EndScriptData */ 23 23 24 24 #include "precompiled.h" 25 25 #include "def_mechanar.h" 26 27 // Spells to be casted 26 28 #define SPELL_SUMMON_RAGIN_FLAMES 35275 27 #define SPELL_INFERNO 1969529 #define SPELL_INFERNO 35268 28 30 #define SPELL_FIRE_TAIL 35278 29 31 … … 38 40 #define SAY_SPELL_DRAGONS_BREATH_2 "Anar'endal dracon!" 39 41 #define SOUND_SPELL_DRAGONS_BREATH_2 11190 40 42 // On Aggro 41 43 #define SAY_AGGRO "Don't value your life very much, do you?" 42 44 #define SOUND_SAY_AGGRO 11186 43 45 46 //On Kill Unit 44 47 #define SAY_SLAY "And don't come back!" 45 48 #define SOUND_SLAY 11187 46 49 50 // On Death 47 51 #define SAY_DEATH "Anu... bala belore...alon." 48 52 #define SOUND_DEATH 11192 … … 50 54 struct TRINITY_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI 51 55 { 52 boss_nethermancer_sepethreaAI(Creature *c) : ScriptedAI(c) { Reset();}56 boss_nethermancer_sepethreaAI(Creature *c) : ScriptedAI(c) {Reset();} 53 57 54 58 uint32 frost_attack_Timer; … … 58 62 uint32 solarburn_Timer; 59 63 60 void Reset() 61 { 62 frost_attack_Timer = 10000;63 arcane_blast_Timer = 1 5000;64 dragons_breath_Timer = 20000;65 knockback_Timer = 2 5000;64 void Reset() 65 { 66 frost_attack_Timer = 7000 + rand()%3000; 67 arcane_blast_Timer = 12000 + rand()%6000; 68 dragons_breath_Timer = 18000 + rand()%4000; 69 knockback_Timer = 22000 + rand()%6000; 66 70 solarburn_Timer = 30000; 67 } 68 69 void Aggro(Unit *who) 70 { 71 } 72 73 void KilledUnit(Unit* victim) 71 } 72 73 void Aggro(Unit *who) 74 { 75 for(int i = 0; i < 1;i++) //Summon two Guards 76 { 77 DoCast(m_creature->getVictim(),SPELL_SUMMON_RAGIN_FLAMES); 78 } 79 } 80 81 // On Killed Unit 82 void KilledUnit(Unit* victim) 74 83 { 75 84 DoYell(SAY_SLAY, LANG_UNIVERSAL, NULL); … … 77 86 } 78 87 79 void JustDied(Unit* Killer) 80 { 88 // On Death 89 void JustDied(Unit* Killer) 90 { 81 91 DoYell(SAY_DEATH, LANG_UNIVERSAL, NULL); 82 DoPlaySoundToSet(m_creature, SOUND_DEATH); 92 DoPlaySoundToSet(m_creature, SOUND_DEATH); 93 ScriptedInstance *pInstance = ((ScriptedInstance*)m_creature->GetInstanceData()); 94 if(pInstance) 95 pInstance->SetData(DATA_SEPETHREA_DEATH, 0); 83 96 } 84 97 85 98 void UpdateAI(const uint32 diff) 86 99 { 87 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) 88 return; 89 90 //Frost Attack 91 if(frost_attack_Timer < diff) 92 { 100 101 //Return since we have no target 102 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) 103 return; 104 105 //Check for Frost Attack 106 if(frost_attack_Timer < diff) 107 { 108 //time to cast 93 109 DoCast(m_creature->getVictim(),SPELL_FROST_ATTACK); 94 frost_attack_Timer = 10000; 110 111 //Cast again on time 112 frost_attack_Timer = 7000 + rand()%30000; 95 113 }else frost_attack_Timer -= diff; 96 114 97 //Arcane Blast 98 if(arcane_blast_Timer < diff) 99 { 115 //Check for Arcane Blast 116 if(arcane_blast_Timer < diff) 117 { 118 //time to cast 100 119 DoCast(m_creature->getVictim(),SPELL_ARCANE_BLAST); 101 arcane_blast_Timer = 15000; 120 121 //Cast again on time 122 arcane_blast_Timer = 15000; 102 123 }else arcane_blast_Timer -= diff; 103 124 104 //Dragons Breath 105 if(dragons_breath_Timer < diff) 106 { 125 //Check for Dragons Breath 126 if(dragons_breath_Timer < diff) 127 { 128 //time to cast 107 129 DoCast(m_creature->getVictim(),SPELL_DRAGONS_BREATH); 108 dragons_breath_Timer = 20000; 109 110 if (rand()%2) 111 return; 112 113 switch(rand()%2) 130 114 131 { 132 133 if (rand()%2) 134 return; 135 136 switch(rand()%2) 137 { 115 138 case 0: 116 DoYell(SAY_SPELL_DRAGONS_BREATH_1, LANG_UNIVERSAL, NULL); 139 DoYell(SAY_SPELL_DRAGONS_BREATH_1, LANG_UNIVERSAL, NULL); 117 140 DoPlaySoundToSet(m_creature,SOUND_SPELL_DRAGONS_BREATH_1); 118 141 break; 142 119 143 case 1: 120 144 DoYell(SAY_SPELL_DRAGONS_BREATH_2, LANG_UNIVERSAL, NULL); 121 145 DoPlaySoundToSet(m_creature,SOUND_SPELL_DRAGONS_BREATH_2); 122 146 break; 147 } 123 148 } 124 }else dragons_breath_Timer -= diff; 125 126 //Knockback 127 if(knockback_Timer < diff) 128 { 129 DoCast(m_creature->getVictim(),SPELL_KNOCKBACK); 130 knockback_Timer = 25000; 149 //Cast again on time 150 dragons_breath_Timer = 12000 + rand()%10000; 151 152 }else dragons_breath_Timer -= diff; 153 154 //Check for Knockback 155 if(knockback_Timer < diff) 156 { 157 158 //time to cast 159 DoCast(m_creature->getVictim(),SPELL_KNOCKBACK); 160 161 //Cast again on time 162 knockback_Timer = 15000 + rand()%10000; 163 131 164 }else knockback_Timer -= diff; 132 165 133 //Solarburn 134 if(solarburn_Timer < diff) 135 { 136 DoCast(m_creature->getVictim(),SPELL_SOLARBURN); 137 solarburn_Timer = 30000; 166 //Check for Solarburn 167 if(solarburn_Timer < diff) 168 169 { 170 171 //time to cast 172 DoCast(m_creature->getVictim(),SPELL_SOLARBURN); 173 174 //Cast again on time 175 solarburn_Timer = 30000; 176 138 177 }else solarburn_Timer -= diff; 139 178 140 179 DoMeleeAttackIfReady(); 141 } 180 181 } 142 182 }; 143 183 144 184 CreatureAI* GetAI_boss_nethermancer_sepethrea(Creature *_Creature) 145 { 185 { 146 186 return new boss_nethermancer_sepethreaAI (_Creature); 147 187 } 148 149 188 struct TRINITY_DLL_DECL mob_ragin_flamesAI : public ScriptedAI 150 189 { 151 mob_ragin_flamesAI(Creature *c) : ScriptedAI(c) {Reset();} 190 mob_ragin_flamesAI(Creature *c) : ScriptedAI(c) 191 { 192 pInstance = ((ScriptedInstance*)c->GetInstanceData()); 193 Reset(); 194 } 195 196 ScriptedInstance *pInstance; 152 197 153 198 uint32 inferno_Timer; 154 199 uint32 flame_timer; 200 uint32 Check_Timer; 155 201 156 202 bool onlyonce; 157 203 158 204 void Reset() 159 { 205 { 160 206 inferno_Timer = 10000; 161 flame_timer = 200; 207 flame_timer = 500; 208 Check_Timer = 2000; 162 209 onlyonce = false; 210 m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); 211 m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, true); 163 212 } 164 213 … … 185 234 if(inferno_Timer < diff) 186 235 { 187 DoCast(m_creature->getVictim(),SPELL_INFERNO); 236 DoCast(m_creature->getVictim(),SPELL_INFERNO); 237 238 m_creature->TauntApply(m_creature->getVictim()); 239 188 240 inferno_Timer = 10000; 189 190 Unit* target = NULL;191 target = SelectUnit(SELECT_TARGET_RANDOM,0);192 193 m_creature->GetMotionMaster()->MoveChase(target);194 241 }else inferno_Timer -= diff; 195 242 … … 197 244 { 198 245 DoCast(m_creature,SPELL_FIRE_TAIL); 199 flame_timer = 200; 246 flame_timer = 500; 247 200 248 }else flame_timer -=diff; 201 249 250 //Check_Timer 251 if(Check_Timer < diff) 252 { 253 if(pInstance) 254 { 255 if(pInstance->GetData(DATA_SEPETHREAISDEAD)) 256 { 257 //remove 258 m_creature->setDeathState(JUST_DIED); 259 m_creature->RemoveCorpse(); 260 } 261 } 262 263 Check_Timer = 1000; 264 }else Check_Timer -= diff; 265 202 266 DoMeleeAttackIfReady(); 203 267 } 268 204 269 }; 205 270 CreatureAI* GetAI_mob_ragin_flames(Creature *_Creature) … … 207 272 return new mob_ragin_flamesAI (_Creature); 208 273 } 209 210 274 void AddSC_boss_nethermancer_sepethrea() 211 { 212 Script *newscript; 213 214 newscript = new Script; 215 newscript->Name="boss_nethermancer_sepethrea"; 216 newscript->GetAI = GetAI_boss_nethermancer_sepethrea; 275 { 276 Script *newscript; 277 newscript = new Script; 278 newscript->Name="boss_nethermancer_sepethrea"; 279 newscript->GetAI = GetAI_boss_nethermancer_sepethrea; 217 280 m_scripts[nrscripts++] = newscript; 218 281 219 newscript = new Script; 220 newscript->Name="mob_ragin_flames"; 221 newscript->GetAI = GetAI_mob_ragin_flames; 282 newscript = new Script; 283 newscript->Name="mob_ragin_flames"; 284 newscript->GetAI = GetAI_mob_ragin_flames; 222 285 m_scripts[nrscripts++] = newscript; 223 286 } -
trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_sartura.cpp
r109 r223 7 7 * This program is distributed in the hope that it will be useful, 8 8 * but WITHOUT ANY WARRANTY; without even the implied warranty of 9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 10 10 * GNU General Public License for more details. 11 11 * 12 12 * You should have received a copy of the GNU General Public License 13 13 * along with this program; if not, write to the Free Software 14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 15 15 */ 16 16 17 17 /* ScriptData 18 SDName: Boss_Sartura18 SDName: boss_sartura 19 19 SD%Complete: 99 20 SDComment: 20 SDComment: 21 21 SDCategory: Temple of Ahn'Qiraj 22 22 EndScriptData */ … … 25 25 26 26 #define SPELL_WHIRLWIND 26083 27 #define SPELL_ENRAGE 28747 //Not sure if right ID.27 #define SPELL_ENRAGE 28747 //Not sure if right ID. 28 28 #define SPELL_ENRAGEHARD 28798 29 29 … … 31 31 #define SPELL_WHIRLWINDADD 26038 32 32 #define SPELL_KNOCKBACK 26027 33 33 34 34 35 struct TRINITY_DLL_DECL boss_sarturaAI : public ScriptedAI … … 59 60 WhirlWind = false; 60 61 AggroReset = false; 61 Enraged = false; 62 Enraged = false; 62 63 EnragedHard = false; 64 63 65 } 64 66 … … 78 80 { 79 81 //Attack random Gamers 80 Unit* target = NULL; 81 target = SelectUnit(SELECT_TARGET_RANDOM,1); 82 if (target) 82 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) 83 83 AttackStart(target); 84 84 … … 105 105 { 106 106 //Attack random Gamers 107 Unit* target = NULL; 108 target = SelectUnit(SELECT_TARGET_RANDOM,1); 109 if (target) 107 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) 110 108 m_creature->TauntApply(target); 111 109 112 AggroReset = true;113 AggroReset_Timer = 2000 + rand()%3000;110 AggroReset = true; 111 AggroReset_Timer = 2000 + rand()%3000; 114 112 }else AggroReset_Timer -= diff; 115 113 … … 120 118 AggroReset = false; 121 119 AggroResetEnd_Timer = 5000; 122 }AggroResetEnd_Timer -= diff; 120 AggroReset_Timer = 35000 + rand()%10000; 121 } else AggroResetEnd_Timer -= diff; 123 122 } 124 123 … … 131 130 Enraged = true; 132 131 } 133 } 132 } 134 133 135 134 //After 10 minutes hard enrage … … 140 139 DoCast(m_creature, SPELL_ENRAGEHARD); 141 140 EnragedHard = true; 142 } EnrageHard_Timer -= diff;141 } else EnrageHard_Timer -= diff; 143 142 } 144 143 … … 146 145 } 147 146 } 148 }; 147 }; 148 149 149 150 150 struct TRINITY_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI … … 158 158 uint32 AggroResetEnd_Timer; 159 159 uint32 KnockBack_Timer; 160 160 161 161 bool WhirlWind; 162 162 bool AggroReset; … … 170 170 AggroResetEnd_Timer = 5000; 171 171 KnockBack_Timer = 10000; 172 172 173 173 WhirlWind = false; 174 174 AggroReset = false; 175 175 176 } 176 177 … … 198 199 { 199 200 //Attack random Gamers 200 Unit* target = NULL; 201 target = SelectUnit(SELECT_TARGET_RANDOM,1); 202 if (target) 201 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) 203 202 m_creature->TauntApply(target); 204 203 … … 214 213 if (!WhirlWind) 215 214 { 216 if(AggroReset_Timer < diff) 217 { 218 //Attack random Gamers 219 Unit* target = NULL; 220 target = SelectUnit(SELECT_TARGET_RANDOM,1); 221 if (target) 215 if (AggroReset_Timer < diff) 216 { 217 //Attack random Gamers 218 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) 222 219 AttackStart(target); 223 220 … … 239 236 AggroReset = false; 240 237 AggroResetEnd_Timer = 5000; 241 }AggroResetEnd_Timer -= diff; 238 AggroReset_Timer = 30000 + rand()%10000; 239 } else AggroResetEnd_Timer -= diff; 242 240 } 243 241 … … 259 257 { 260 258 Script *newscript; 261 262 259 newscript = new Script; 263 260 newscript->Name="boss_sartura";