Changeset 223

Show
Ignore:
Timestamp:
11/19/08 13:47:58 (17 years ago)
Author:
yumileroy
Message:

[svn] * Merged SD2 Rev. 706 & 707

  • Added: Pathaleon the Calculator script. Also added a Mechanar Instance script.
  • Added: Fixed and improved version of High King Maulgar. (Timers, Spells, Adds...)
  • Fixed: Nethermancer Sepethrea encounter. Spawning Adds, timers, spells...
  • Fixed: Lot of timers and spells like for: Doomlord Kazzak, Doomwalker, Gruul, and more.

* Fixed 147_world.sql

Original author: slg
Date: 2008-11-13 17:12:54-06:00

Location:
trunk
Files:
4 added
20 modified

Legend:

Unmodified
Added
Removed
  • trunk/sql/updates/147_world.sql

    r141 r223  
    1010INSERT INTO spell_target_position () VALUES (46020, 580, 1704.34, 928.17, 53.079, 0); 
    1111 
    12 --Magtheridon Earthquake 
     12-- Magtheridon Earthquake 
    1313DELETE FROM spell_script_target WHERE `entry` IN (30657); 
    1414INSERT INTO spell_script_target VALUES ('30657', '1', '24136'); 
  • trunk/sql/world_scripts_full.sql

    r167 r223  
    722722UPDATE `creature_template` SET `ScriptName`='boss_nethermancer_sepethrea' WHERE `entry`=19221; 
    723723UPDATE `creature_template` SET `ScriptName`='mob_ragin_flames' WHERE `entry`=20481; 
     724UPDATE `creature_template` SET `ScriptName`='boss_pathaleon_the_calculator' WHERE `entry`=19220; 
     725UPDATE `creature_template` SET `ScriptName`='mob_nether_wraith' WHERE `entry`=21062; 
     726UPDATE `instance_template` SET `script`='instance_mechanar' WHERE `map`=554; 
    724727 
    725728/* THE BOTANICA */ 
  • trunk/src/bindings/scripts/Makefile.am

    r187 r223  
    349349scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp \ 
    350350scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp \ 
     351scripts/zone/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp \ 
     352scripts/zone/tempest_keep/the_mechanar/def_mechanar.h \ 
     353scripts/zone/tempest_keep/the_mechanar/instance_mechanar.cpp \ 
    351354scripts/zone/temple_of_ahnqiraj/boss_bug_trio.cpp \ 
    352355scripts/zone/temple_of_ahnqiraj/boss_cthun.cpp \ 
  • trunk/src/bindings/scripts/ScriptMgr.cpp

    r206 r223  
    514514extern void AddSC_boss_gatewatcher_iron_hand(); 
    515515extern void AddSC_boss_nethermancer_sepethrea(); 
     516extern void AddSC_boss_pathaleon_the_calculator(); 
     517extern void AddSC_instance_mechanar(); 
    516518 
    517519//Temple of ahn'qiraj 
     
    16971699    AddSC_boss_gatewatcher_iron_hand(); 
    16981700    AddSC_boss_nethermancer_sepethrea(); 
     1701    AddSC_boss_pathaleon_the_calculator(); 
     1702    AddSC_instance_mechanar(); 
    16991703 
    17001704    //Temple of ahn'qiraj 
  • trunk/src/bindings/scripts/VC71/71ScriptDev2.vcproj

    r187 r223  
    15671567                                                <File 
    15681568                                                        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" 
    15691581                                                        > 
    15701582                                                </File> 
  • trunk/src/bindings/scripts/VC80/80ScriptDev2.vcproj

    r187 r223  
    18121812                                                <File 
    18131813                                                        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" 
    18141826                                                        > 
    18151827                                                </File> 
  • trunk/src/bindings/scripts/VC90/90ScriptDev2.vcproj

    r187 r223  
    17981798                                                <File 
    17991799                                                        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" 
    18001812                                                        > 
    18011813                                                </File> 
  • trunk/src/bindings/scripts/scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp

    r115 r223  
    163163        soulclass = 0; 
    164164 
    165         Fear_timer = 20000; 
     165        Fear_timer = 15000 + rand()% 5000; 
    166166        Ribbon_of_Souls_timer = 5000; 
    167         StolenSoul_Timer = 30000; 
     167        StolenSoul_Timer = 25000 + rand()% 10000; 
    168168 
    169169        HasTaunted = false; 
     
    251251            DoCast(m_creature, SPELL_SUMMON_AVATAR); 
    252252            Avatar_summoned = true; 
    253             StolenSoul_Timer = 45000; 
     253            StolenSoul_Timer = 15000 + rand()% 15000; 
    254254        } 
    255255 
     
    276276                    DoSpawnCreature(ENTRY_STOLEN_SOUL,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); 
    277277 
    278                     StolenSoul_Timer = 45000; 
     278                    StolenSoul_Timer = 20000 + rand()% 10000; 
    279279                } else StolenSoul_Timer = 1000; 
    280280            } 
     
    292292        { 
    293293            DoCast(m_creature,SPELL_SOUL_SCREAM); 
    294             Fear_timer = 25000 + rand()% 10000; 
     294            Fear_timer = 15000 + rand()% 15000; 
    295295        }else Fear_timer -= diff; 
    296296 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp

    r166 r223  
    6060    void Reset() 
    6161    { 
    62         LightningCloud_Timer = 28000; 
     62        LightningCloud_Timer = 15000; 
    6363        LungBurst_Timer = 7000; 
    6464        EnvelopingWinds_Timer = 9000; 
     
    112112                if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 
    113113                    DoCast(target, SPELL_LIGHTNING_CLOUD); 
    114             LightningCloud_Timer = 28000; 
     114            LightningCloud_Timer = 15000+rand()%10000; 
    115115        }else LightningCloud_Timer -=diff; 
    116116 
     
    120120            if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 
    121121                DoCast(target, SPELL_LUNG_BURST); 
    122             LungBurst_Timer = 10000+rand()%5000; 
     122            LungBurst_Timer = 7000+rand()%5000; 
    123123        }else LungBurst_Timer -=diff; 
    124124 
     
    165165        { 
    166166            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; 
    168168        }else WaterBoltVolley_Timer -= diff; 
    169169 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp

    r166 r223  
    106106    { 
    107107        Reflection_Timer = 10000; 
    108         Impale_Timer = 30000; 
     108        Impale_Timer = 7000+rand()%7000; 
    109109        Rage_Timer = 45000; 
    110110        CanRage = false; 
     
    187187                ((mob_naga_distillerAI*)distiller->AI())->StartRageGen(m_creature); 
    188188            } 
    189             Rage_Timer = 45000; 
     189            Rage_Timer = 3000+rand()%15000; 
    190190        }else Rage_Timer -= diff; 
    191191 
     
    194194        { 
    195195            DoCast(m_creature, SPELL_SPELL_REFLECTION); 
    196             Reflection_Timer = 20000+rand()%5000; 
     196            Reflection_Timer = 15000+rand()%10000; 
    197197        }else Reflection_Timer -= diff; 
    198198 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/underbog/boss_ghazan.cpp

    r90 r223  
    2323 
    2424#include "../../../creature/simple_ai.h" 
     25#include "precompiled.h" 
    2526 
    2627/* 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp

    r166 r223  
    4242#define SPELL_CORRUPTION            30938 
    4343 
    44 #define SPELL_FIRE_NOVA             33775 
     44#define SPELL_FIRE_NOVA             33132 
    4545#define H_SPELL_FIRE_NOVA           37371 
    4646 
    47 #define SPELL_SHADOW_BOLT_VOLLEY    17228 
     47#define SPELL_SHADOW_BOLT_VOLLEY    28599 
    4848#define H_SPELL_SHADOW_BOLT_VOLLEY  40070 
    4949 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp

    r166 r223  
    4747    void Reset() 
    4848    { 
    49         AcidSpray_Timer = 10000; 
    50         ExplodingBreaker_Timer = 4000; 
     49        AcidSpray_Timer = 15000; 
     50        ExplodingBreaker_Timer = 6000; 
    5151        Domination_Timer = 120000; 
    52         Knockdown_Timer    = 6000; 
     52        Knockdown_Timer    = 10000; 
    5353    } 
    5454 
     
    8585        { 
    8686            DoCast(m_creature->getVictim(),SPELL_ACID_SPRAY); 
    87             AcidSpray_Timer = 16000+rand()%8000; 
     87            AcidSpray_Timer = 15000+rand()%8000; 
    8888        }else AcidSpray_Timer -=diff; 
    8989 
  • trunk/src/bindings/scripts/scripts/zone/onyxias_lair/boss_onyxia.cpp

    r90 r223  
    9393        BellowingRoarTimer = 30000; 
    9494        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); 
    9598    } 
    9699 
     
    98101    { 
    99102        DoYell(SAY_AGGRO, LANG_UNIVERSAL, NULL); 
     103        DoZoneInCombat(); 
    100104    } 
    101105 
     
    148152            { 
    149153                DoCast(m_creature->getVictim(), SPELL_CLEAVE); 
    150                 CleaveTimer = 10000; 
     154                CleaveTimer = 7000; 
    151155            }else CleaveTimer -= diff; 
    152156 
     
    187191            { 
    188192                DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_ENGULFINGFLAMES); 
    189                 EngulfingFlamesTimer = 10000; 
     193                EngulfingFlamesTimer = 8000; 
    190194            }else EngulfingFlamesTimer -= diff; 
    191195 
     
    200204                        Whelp->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0)); 
    201205                } 
    202                 SummonWhelpsTimer = 45000; 
     206                SummonWhelpsTimer = 30000; 
    203207            }else SummonWhelpsTimer -= diff; 
    204208        } 
  • trunk/src/bindings/scripts/scripts/zone/scholomance/boss_jandice_barov.cpp

    r90 r223  
    11/* 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  */ 
     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*/ 
    1616 
    1717/* ScriptData 
    1818SDName: Boss_jandicebarov 
    1919SD%Complete: 100 
    20 SDComment: 
     20SDComment:  
    2121SDCategory: Scholomance 
    2222EndScriptData */ 
     
    6161        switch (rand()%2) 
    6262        { 
    63             case 0: RandX = 0 - Rand; break; 
    64             case 1: RandX = 0 + Rand; break; 
     63        case 0: RandX = 0 - Rand; break; 
     64        case 1: RandX = 0 + Rand; break; 
    6565        } 
    6666        Rand = 0; 
     
    6868        switch (rand()%2) 
    6969        { 
    70             case 0: RandY = 0 - Rand; break; 
    71             case 1: RandY = 0 + Rand; break; 
     70        case 0: RandY = 0 - Rand; break; 
     71        case 1: RandY = 0 + Rand; break; 
    7272        } 
    7373        Rand = 0; 
     
    8181        if (Invisible && Invisible_Timer < diff) 
    8282        { 
    83             //Become visible again 
     83            //Become visible again  
    8484            m_creature->setFaction(14); 
    8585            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 
    8887            Invisible = false; 
    8988        } else if (Invisible) 
     
    101100        if (CurseOfBlood_Timer < diff) 
    102101        { 
     102            //Cast 
    103103            DoCast(m_creature->getVictim(),SPELL_CURSEOFBLOOD); 
     104 
     105            //45 seconds 
    104106            CurseOfBlood_Timer = 30000; 
    105107        }else CurseOfBlood_Timer -= diff; 
     
    108110        if (!Invisible && Illusion_Timer < diff) 
    109111        { 
     112 
    110113            //Inturrupt any spell casting 
    111114            m_creature->InterruptNonMeleeSpells(false); 
    112115            m_creature->setFaction(35); 
    113116            m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); 
    114             // Invisible Model 
    115             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); 
    116119 
    117120            //Summon 10 Illusions attacking random gamers 
     
    125128            Invisible_Timer = 3000; 
    126129 
     130            //25 seconds until we should cast this agian 
    127131            Illusion_Timer = 25000; 
    128132        }else Illusion_Timer -= diff; 
     133 
    129134 
    130135        //            //Illusion_Timer 
     
    133138        //                  //Cast 
    134139        //                DoCast(m_creature->getVictim(),SPELL_ILLUSION); 
    135         // 
     140        //                                 
    136141        //                  //3 Illusion will be summoned 
    137142        //                  if (Illusioncounter < 3) 
     
    141146        //                  } 
    142147        //                  else { 
     148        //                      //15 seconds until we should cast this again 
    143149        //                      Illusion_Timer = 15000; 
    144150        //                      Illusioncounter=0; 
    145151        //                  } 
    146         // 
     152        //                   
    147153        //            }else Illusion_Timer -= diff; 
    148154 
     
    161167    void Reset() 
    162168    { 
    163         Cleave_Timer = 4000; 
     169        Cleave_Timer = 2000 + rand()%6000;        
     170        m_creature->ApplySpellImmune(0, IMMUNITY_DAMAGE, SPELL_SCHOOL_MASK_MAGIC, true); 
    164171    } 
    165172 
     
    170177    void UpdateAI(const uint32 diff) 
    171178    { 
     179        //Return since we have no target 
    172180        if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) 
    173181            return; 
     
    176184        if (Cleave_Timer < diff) 
    177185        { 
     186            //Cast 
    178187            DoCast(m_creature->getVictim(),SPELL_CLEAVE); 
     188 
     189            //5-8 seconds 
    179190            Cleave_Timer = 5000 + rand()%3000; 
    180191        }else Cleave_Timer -= diff; 
     
    182193        DoMeleeAttackIfReady(); 
    183194    } 
    184 }; 
     195};  
     196 
    185197 
    186198CreatureAI* GetAI_boss_jandicebarov(Creature *_Creature) 
     
    193205    return new mob_illusionofjandicebarovAI (_Creature); 
    194206} 
     207 
    195208 
    196209void AddSC_boss_jandicebarov() 
  • trunk/src/bindings/scripts/scripts/zone/shadowmoon_valley/boss_doomwalker.cpp

    r158 r223  
    11/* 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  */ 
     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*/ 
    1616 
    1717/* ScriptData 
    1818SDName: Boss_Doomwalker 
    1919SD%Complete: 100 
    20 SDComment: 
     20SDComment:  
    2121SDCategory: Shadowmoon Valley 
    2222EndScriptData */ 
     
    2626//-------------------------------------- 
    2727//Spells 
    28 #define SPELL_SUNDER_ARMOR          30901 
     28#define SPELL_SUNDER_ARMOR          33661 
    2929 
    3030#define SPELL_CHAIN_LIGHTNING       33665 
     
    3636#define SOUND_OVERRUN_2             11348 
    3737 
    38 #define SPELL_ENRAGE                34624 
     38#define SPELL_ENRAGE                33653 
    3939 
    4040#define SPELL_MARK_DEATH            37128 
     
    4545#define SAY_EARTHQUAKE_2            "Magnitude set. Release." 
    4646#define SOUND_EARTHQUAKE_2          11346 
    47  
     47//--------------------------------------- 
     48//Aggro 
    4849#define SAY_AGGRO                   "Do not proceed. You will be eliminated!" 
    4950#define SOUND_AGGRO                 11344 
    50  
     51//--------------------------------------- 
     52//Slay 
    5153#define SAY_SLAY_1                  "Threat level zero." 
    5254#define SOUND_SLAY_1                11349 
     
    5557#define SAY_SLAY_3                  "Target exterminated." 
    5658#define SOUND_SLAY_3                11351 
    57  
     59//--------------------------------------- 
     60//Death 
    5861#define SAY_DEATH                   "System failure in five... four..." 
    5962#define SOUND_DEATH                 11352 
     
    6366    boss_doomwalkerAI(Creature *c) : ScriptedAI(c) {Reset();} 
    6467 
     68 
    6569    uint32 Chain_Timer; 
    66     uint32 Enrage_Timer; 
     70    uint32 Enrage_Timer;  
    6771    uint32 Overrun_Timer; 
    68     uint32 Quake_Timer; 
     72    uint32 Quake_Timer;  
    6973    uint32 Armor_Timer; 
    7074 
     
    7478    { 
    7579        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;         
    8286    } 
    8387 
     
    8993        switch(rand()%3) 
    9094        { 
    91             case 0: 
    92                 DoYell(SAY_SLAY_1, LANG_UNIVERSAL, NULL); 
    93                 DoPlaySoundToSet(m_creature, SOUND_SLAY_1); 
    94                 break; 
    95             case 1: 
    96                 DoYell(SAY_SLAY_2, LANG_UNIVERSAL, NULL); 
    97                 DoPlaySoundToSet(m_creature, SOUND_SLAY_2); 
    98                 break; 
    99             case 2: 
    100                 DoYell(SAY_SLAY_3, LANG_UNIVERSAL, NULL); 
    101                 DoPlaySoundToSet(m_creature, SOUND_SLAY_3); 
    102                 break; 
     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; 
    103107        } 
    104108    } 
     
    112116    void Aggro(Unit *who) 
    113117    { 
    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); 
    116120    } 
    117121 
    118122    void UpdateAI(const uint32 diff) 
    119123    { 
     124 
    120125        if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) 
    121126            return; 
    122127 
    123         if (m_creature->IsWithinCombatDist(m_creature->getVictim(), ATTACK_DISTANCE)) 
     128        if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) 
    124129        { 
    125             //when hp <= 20% gain enrage 
    126             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            {    
    128133                if(Enrage_Timer < diff) 
    129134                { 
     
    136141            //Spell Overrun 
    137142            if (Overrun_Timer < diff) 
    138             { 
     143            {    
    139144                switch(rand()%2) 
    140145                { 
    141                     case 0: 
    142                         DoYell(SAY_OVERRUN_1, LANG_UNIVERSAL, NULL); 
    143                         DoPlaySoundToSet(m_creature, SOUND_OVERRUN_1); 
    144                         break; 
    145                     case 1: 
    146                         DoYell(SAY_OVERRUN_2, LANG_UNIVERSAL, NULL); 
    147                         DoPlaySoundToSet(m_creature, SOUND_OVERRUN_2); 
    148                         break; 
     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; 
    149154                } 
    150155                DoCast(m_creature->getVictim(),SPELL_OVERRUN); 
    151                 Overrun_Timer = (30 + rand()% 40) * 1000;   //30-70sec cooldown 
     156                Overrun_Timer = 25000 + rand()%15000; 
    152157 
    153158            }else Overrun_Timer -= diff; 
     
    161166                switch(rand()%2) 
    162167                { 
    163                     case 0: 
    164                         DoYell(SAY_EARTHQUAKE_1, LANG_UNIVERSAL, NULL); 
    165                         DoPlaySoundToSet(m_creature, SOUND_EARTHQUAKE_1); 
    166                         break; 
    167                     case 1: 
    168                         DoYell(SAY_EARTHQUAKE_2, LANG_UNIVERSAL, NULL); 
    169                         DoPlaySoundToSet(m_creature, SOUND_EARTHQUAKE_2); 
    170                         break; 
     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; 
    171176                } 
    172177                if(InEnrage) 
     
    175180                } 
    176181                DoCast(m_creature,SPELL_EARTHQUAKE); 
    177                 Quake_Timer = (70 + rand()% 30) * 1000;     //70-100sec cooldown 
     182                Quake_Timer = 30000 + rand()%25000; 
    178183            }else Quake_Timer -= diff; 
    179184 
     
    182187            { 
    183188                DoCast(m_creature->getVictim(),SPELL_CHAIN_LIGHTNING); 
    184                 Chain_Timer = (50 + rand()% 50) * 1000;     //50-100sec cooldown 
     189                Chain_Timer = 15000 + rand()%25000; 
    185190            }else Chain_Timer -= diff; 
    186191 
    187             //Spell Sunder Armor 
     192            //Spell Sunder Armor         
    188193            if (Armor_Timer < diff) 
    189194            { 
    190195                DoCast(m_creature->getVictim(),SPELL_SUNDER_ARMOR); 
    191                 Armor_Timer = (15 + rand()% 7) * 1000;      //15-23sec cooldown about 70 proc to stack 
     196                Armor_Timer = 15000 + rand()%15000; 
    192197            }else Armor_Timer -= diff; 
    193198 
     
    195200        } 
    196201    } 
    197 }; 
     202};  
    198203 
    199204CreatureAI* GetAI_boss_doomwalker(Creature *_Creature) 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/botanica/boss_warp_splinter.cpp

    r90 r223  
    11/* Copyright (C) 2006,2007 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  */ 
     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*/ 
    1616 
    1717/* ScriptData 
     
    7070#define WAR_STOMP           34716 
    7171#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       35059                           //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 ^) 
    7373#define SPELL_HEAL_FATHER   6262 
    7474 
     
    9393#define TREANT_SPAWN_DIST   50                              //50 yards from Warp Splinter's spawn point 
    9494 
    95 float treant_pos[6][3] = 
     95float treant_pos[6][3] =  
    9696{ 
    9797    {24.301233, 427.221100, -27.060635}, 
     
    122122    float Treant_Spawn_Pos_Y; 
    123123 
     124    bool InCombat; 
    124125 
    125126    void Reset() 
    126127    { 
    127         War_Stomp_Timer = 60000; 
     128        InCombat = false; 
     129 
     130        War_Stomp_Timer = 25000 + rand()%15000; 
    128131        Summon_Treants_Timer = 45000; 
    129         Arcane_Volley_Timer = 140000; 
     132        Arcane_Volley_Timer = 8000 + rand()%12000; 
    130133        CheckTreantLOS_Timer = 1000; 
    131134        TreantLife_Timer = 999999; 
     
    141144        DoYell(SAY_COMBAT_START,LANG_UNIVERSAL,NULL); 
    142145        DoPlaySoundToSet(m_creature,SOUND_COMBAT_START); 
     146        InCombat = true; 
    143147    } 
    144148 
     
    148152        switch(rand()%2) 
    149153        { 
    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 
    161166    void JustDied(Unit* Killer) 
    162167    { 
     
    168173    { 
    169174        for(int i = 0; i < 6; ++i) 
    170         { 
     175        {             
    171176            float angle = (M_PI / 3) * i; 
    172177 
     
    186191            } 
    187192        } 
    188  
    189193        switch(rand()%2) 
    190         { 
    191             case 0: 
    192                 DoYell(SAY_SUMMON_1,LANG_UNIVERSAL,NULL); 
    193                 DoPlaySoundToSet(m_creature,SOUND_SUMMON_1); 
    194                 break; 
    195             case 1: 
    196                 DoYell(SAY_SUMMON_2,LANG_UNIVERSAL,NULL); 
    197                 DoPlaySoundToSet(m_creature,SOUND_SUMMON_2); 
    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;  
    199203        } 
    200204    } 
     
    224228    void UpdateAI(const uint32 diff) 
    225229    { 
     230        //Return since we have no target 
    226231        if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) 
    227232            return; 
     
    230235        if(War_Stomp_Timer < diff) 
    231236        { 
     237            //time to cast 
    232238            DoCast(m_creature->getVictim(),WAR_STOMP); 
    233             War_Stomp_Timer = 60000; 
     239 
     240            //Cast again on time 
     241            War_Stomp_Timer = 25000 + rand()%15000;         
    234242        } 
    235243        else War_Stomp_Timer -= diff; 
     
    238246        if(Arcane_Volley_Timer < diff) 
    239247        { 
     248            //time to cast 
    240249            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;  
    242253        } 
    243254        else Arcane_Volley_Timer -= diff; 
     
    247258        { 
    248259            SummonTreants(); 
    249             Summon_Treants_Timer = 45000; 
     260 
     261            //Cast again on time 
     262            Summon_Treants_Timer = 45000;         
    250263        } 
    251264        else Summon_Treants_Timer -= diff; 
     
    255268        { 
    256269            EatTreant(); 
     270 
    257271            CheckTreantLOS_Timer = 1000; 
    258272        } 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp

    r90 r223  
    11/* 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  */ 
     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*/ 
    1616 
    1717/* ScriptData 
    1818SDName: Boss Gatewatcher Ironhand 
    1919SD%Complete: 100 
    20 SDComment: 
     20SDComment:  
    2121SDCategory: Tempest Keep, The Mechanar 
    2222EndScriptData */ 
     
    2424#include "precompiled.h" 
    2525 
    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 
    2930 
    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  
    3438 
    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   
    3747 
    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 
     49struct TRINITY_DLL_DECL boss_gatewatcher_iron_handAI : public ScriptedAI 
     50{     
     51    boss_gatewatcher_iron_handAI(Creature *c) : ScriptedAI(c)    { Reset(); }      
    4252 
    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;         
    4556 
    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;         
    5860        Jackhammer_Timer = 45000; 
    5961        Stream_of_Machine_Fluid_Timer = 55000; 
    60     } 
    6162 
    62     void Aggro(Unit *who) 
    63     { 
    64     } 
     63    }      
     64    void Aggro(Unit *who)     
     65    {         
     66    }      
    6567 
    66     void KilledUnit(Unit* victim) 
     68    // On Killed Unit     
     69    void KilledUnit(Unit* victim)     
    6770    { 
    6871        if (rand()%2) 
     
    7174        switch(rand()%2) 
    7275        { 
    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;         
    8185        } 
     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);     
    8293    } 
    8394 
    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;          
    89100 
    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); 
    94106 
    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;          
    101110 
    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);              
    106116 
    107117            if (rand()%2) 
     
    110120            switch(rand()%2) 
    111121            { 
    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; 
    121126 
    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;           
    124135 
    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;                 
    130144        }else Stream_of_Machine_Fluid_Timer -= diff; 
    131145 
    132146        DoMeleeAttackIfReady(); 
    133     } 
    134 }; 
     147    }  
     148};    
    135149CreatureAI* GetAI_boss_gatewatcher_iron_hand(Creature *_Creature) 
    136 { 
     150{     
    137151    return new boss_gatewatcher_iron_handAI (_Creature); 
    138 } 
     152}  
    139153 
    140154void 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;     
    146160    m_scripts[nrscripts++] = newscript; 
    147161} 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp

    r90 r223  
    11/* 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  */ 
     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*/ 
    1616 
    1717/* ScriptData 
    1818SDName: Boss Nethermancer Sepethrea 
    1919SD%Complete: 100 
    20 SDComment: 
     20SDComment:  
    2121SDCategory: Tempest Keep, The Mechanar 
    2222EndScriptData */ 
    2323 
    2424#include "precompiled.h" 
    25  
     25#include "def_mechanar.h" 
     26 
     27// Spells to be casted 
    2628#define SPELL_SUMMON_RAGIN_FLAMES       35275 
    27 #define SPELL_INFERNO                   19695 
     29#define SPELL_INFERNO                   35268 
    2830#define SPELL_FIRE_TAIL                 35278 
    2931 
     
    3840#define SAY_SPELL_DRAGONS_BREATH_2      "Anar'endal dracon!" 
    3941#define SOUND_SPELL_DRAGONS_BREATH_2    11190 
    40  
     42// On Aggro 
    4143#define SAY_AGGRO                       "Don't value your life very much, do you?" 
    4244#define SOUND_SAY_AGGRO                 11186 
    4345 
     46//On Kill Unit 
    4447#define SAY_SLAY                        "And don't come back!" 
    4548#define SOUND_SLAY                      11187 
    4649 
     50// On Death 
    4751#define SAY_DEATH                       "Anu... bala belore...alon." 
    4852#define SOUND_DEATH                     11192 
     
    5054struct TRINITY_DLL_DECL boss_nethermancer_sepethreaAI : public ScriptedAI 
    5155{ 
    52     boss_nethermancer_sepethreaAI(Creature *c) : ScriptedAI(c) { Reset(); } 
     56    boss_nethermancer_sepethreaAI(Creature *c) : ScriptedAI(c) {Reset();} 
    5357 
    5458    uint32 frost_attack_Timer; 
     
    5862    uint32 solarburn_Timer; 
    5963 
    60     void Reset() 
    61     { 
    62         frost_attack_Timer = 10000; 
    63         arcane_blast_Timer = 15000; 
    64         dragons_breath_Timer = 20000; 
    65         knockback_Timer = 25000; 
     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; 
    6670        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)     
    7483    { 
    7584        DoYell(SAY_SLAY, LANG_UNIVERSAL, NULL); 
     
    7786    } 
    7887 
    79     void JustDied(Unit* Killer) 
    80     { 
     88    // On Death     
     89    void JustDied(Unit* Killer)     
     90    {         
    8191        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); 
    8396    } 
    8497 
    8598    void UpdateAI(const uint32 diff) 
    8699    { 
    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             
    93109            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;                
    95113        }else frost_attack_Timer -= diff; 
    96114 
    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             
    100119            DoCast(m_creature->getVictim(),SPELL_ARCANE_BLAST); 
    101             arcane_blast_Timer = 15000; 
     120 
     121            //Cast again on time             
     122            arcane_blast_Timer = 15000;                 
    102123        }else arcane_blast_Timer -= diff; 
    103124 
    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             
    107129            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 
    114131            { 
     132 
     133                if (rand()%2) 
     134                    return; 
     135 
     136                switch(rand()%2) 
     137                { 
    115138                case 0: 
    116                     DoYell(SAY_SPELL_DRAGONS_BREATH_1, LANG_UNIVERSAL, NULL); 
     139                    DoYell(SAY_SPELL_DRAGONS_BREATH_1, LANG_UNIVERSAL, NULL);                     
    117140                    DoPlaySoundToSet(m_creature,SOUND_SPELL_DRAGONS_BREATH_1); 
    118141                    break; 
     142 
    119143                case 1: 
    120144                    DoYell(SAY_SPELL_DRAGONS_BREATH_2, LANG_UNIVERSAL, NULL); 
    121145                    DoPlaySoundToSet(m_creature,SOUND_SPELL_DRAGONS_BREATH_2); 
    122146                    break; 
     147                } 
    123148            } 
    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 
    131164        }else knockback_Timer -= diff; 
    132165 
    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 
    138177        }else solarburn_Timer -= diff; 
    139178 
    140179        DoMeleeAttackIfReady(); 
    141     } 
     180 
     181    }  
    142182}; 
    143183 
    144184CreatureAI* GetAI_boss_nethermancer_sepethrea(Creature *_Creature) 
    145 { 
     185{     
    146186    return new boss_nethermancer_sepethreaAI (_Creature); 
    147187} 
    148  
    149188struct TRINITY_DLL_DECL mob_ragin_flamesAI : public ScriptedAI 
    150189{ 
    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; 
    152197 
    153198    uint32 inferno_Timer; 
    154199    uint32 flame_timer; 
     200    uint32 Check_Timer; 
    155201 
    156202    bool onlyonce; 
    157203 
    158204    void Reset() 
    159     { 
     205    {    
    160206        inferno_Timer = 10000; 
    161         flame_timer = 200; 
     207        flame_timer = 500; 
     208        Check_Timer = 2000; 
    162209        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); 
    163212    } 
    164213 
     
    185234        if(inferno_Timer < diff) 
    186235        { 
    187             DoCast(m_creature->getVictim(),SPELL_INFERNO); 
     236            DoCast(m_creature->getVictim(),SPELL_INFERNO);  
     237 
     238            m_creature->TauntApply(m_creature->getVictim()); 
     239 
    188240            inferno_Timer = 10000; 
    189  
    190             Unit* target = NULL; 
    191             target = SelectUnit(SELECT_TARGET_RANDOM,0); 
    192  
    193             m_creature->GetMotionMaster()->MoveChase(target); 
    194241        }else inferno_Timer -= diff; 
    195242 
     
    197244        { 
    198245            DoCast(m_creature,SPELL_FIRE_TAIL); 
    199             flame_timer = 200; 
     246            flame_timer = 500; 
     247 
    200248        }else flame_timer -=diff; 
    201249 
     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 
    202266        DoMeleeAttackIfReady(); 
    203267    } 
     268 
    204269}; 
    205270CreatureAI* GetAI_mob_ragin_flames(Creature *_Creature) 
     
    207272    return new mob_ragin_flamesAI (_Creature); 
    208273} 
    209  
    210274void 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;     
    217280    m_scripts[nrscripts++] = newscript; 
    218281 
    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;     
    222285    m_scripts[nrscripts++] = newscript; 
    223286} 
  • trunk/src/bindings/scripts/scripts/zone/temple_of_ahnqiraj/boss_sartura.cpp

    r109 r223  
    77 * This program is distributed in the hope that it will be useful, 
    88 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
     9 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1010 * GNU General Public License for more details. 
    1111 * 
    1212 * You should have received a copy of the GNU General Public License 
    1313 * along with this program; if not, write to the Free Software 
    14  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
     14 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
    1515 */ 
    1616 
    1717/* ScriptData 
    18 SDName: Boss_Sartura 
     18SDName: boss_sartura 
    1919SD%Complete: 99 
    20 SDComment: 
     20SDComment:  
    2121SDCategory: Temple of Ahn'Qiraj 
    2222EndScriptData */ 
     
    2525 
    2626#define SPELL_WHIRLWIND                              26083 
    27 #define SPELL_ENRAGE                                 28747  //Not sure if right ID. 
     27#define SPELL_ENRAGE                                 28747            //Not sure if right ID. 
    2828#define SPELL_ENRAGEHARD                             28798 
    2929 
     
    3131#define SPELL_WHIRLWINDADD                           26038 
    3232#define SPELL_KNOCKBACK                              26027 
     33 
    3334 
    3435struct TRINITY_DLL_DECL boss_sarturaAI : public ScriptedAI 
     
    5960        WhirlWind = false; 
    6061        AggroReset = false; 
    61         Enraged = false; 
     62        Enraged = false;  
    6263        EnragedHard = false; 
     64 
    6365    } 
    6466 
     
    7880            { 
    7981                //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)) 
    8383                    AttackStart(target); 
    8484 
     
    105105            { 
    106106                //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)) 
    110108                    m_creature->TauntApply(target); 
    111109 
    112                 AggroReset = true; 
    113                 AggroReset_Timer = 2000 + rand()%3000; 
     110                    AggroReset = true; 
     111                    AggroReset_Timer = 2000 + rand()%3000; 
    114112            }else AggroReset_Timer -= diff; 
    115113 
     
    120118                    AggroReset = false; 
    121119                    AggroResetEnd_Timer = 5000; 
    122                 }AggroResetEnd_Timer -= diff; 
     120                    AggroReset_Timer = 35000 + rand()%10000; 
     121                } else AggroResetEnd_Timer -= diff; 
    123122            } 
    124123 
     
    131130                    Enraged = true; 
    132131                } 
    133             } 
     132            }  
    134133 
    135134            //After 10 minutes hard enrage 
     
    140139                    DoCast(m_creature, SPELL_ENRAGEHARD); 
    141140                    EnragedHard = true; 
    142                 }EnrageHard_Timer -= diff; 
     141                } else EnrageHard_Timer -= diff; 
    143142            } 
    144143 
     
    146145        } 
    147146    } 
    148 }; 
     147};  
     148 
    149149 
    150150struct TRINITY_DLL_DECL mob_sartura_royal_guardAI : public ScriptedAI 
     
    158158    uint32 AggroResetEnd_Timer; 
    159159    uint32 KnockBack_Timer; 
    160  
     160     
    161161    bool WhirlWind; 
    162162    bool AggroReset; 
     
    170170        AggroResetEnd_Timer = 5000; 
    171171        KnockBack_Timer = 10000; 
    172  
     172         
    173173        WhirlWind = false; 
    174174        AggroReset = false; 
     175 
    175176    } 
    176177 
     
    198199            { 
    199200                //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)) 
    203202                    m_creature->TauntApply(target); 
    204203 
     
    214213        if (!WhirlWind) 
    215214        { 
    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)) 
    222219                    AttackStart(target); 
    223220 
     
    239236                AggroReset = false; 
    240237                AggroResetEnd_Timer = 5000; 
    241             }AggroResetEnd_Timer -= diff; 
     238                AggroReset_Timer = 30000 + rand()%10000; 
     239            } else AggroResetEnd_Timer -= diff; 
    242240        } 
    243241 
     
    259257{ 
    260258    Script *newscript; 
    261  
    262259    newscript = new Script; 
    263260    newscript->Name="boss_sartura";