Welcome to the MMOtop - Arcemu, Mangos, Trinity.
+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Jerry's Avatar
    Status : Jerry is offline
    Join Date : Mar 2009
    Location : Serbia
    Posts : 2,321
    Thanks: 223
    Thanked 501 Times in 286 Posts
    Rep Power : 10
    Reputation:2077Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute Jerry has a reputation beyond repute

    Default [C++] Ulduar Razorscale boss script

    CREDITS: Epsik

    Hi all, this is basic C++ script for trinitycore2, boss Razorscale, its only non scripted boss so i decided to share it, this script have 2 phases ( flying and ground ) with all spells/summons, like i sad its basic but didn`t had to much time to make it, i`ll update post when i end script.


    Code:
    /* ScriptData
    Name: razorscale
    %Complete: 90
    Comment:Made by Epsik from WoW Arthas wow.dsl.net.pk
    Category: 
    EndScriptData */
    
    #include "precompiled.h"
    
    #define SAY_AGGRO                        -2000000
    #define SAY_KILL                            -2000001
    #define SAY_PHASE_2_TRANS           -2000002
    #define SAY_PHASE_3_TRANS           -2000003
    #define EMOTE_BREATH                   -2000004
    
    
    #define SPELL_FLAMEBUFFET            64016
    #define SPELL_FIREBALL                   62796
    
    #define SPELL_WINGBUFFET               62666    
    #define SPELL_FLAMEBREATH             63317    
    #define SPELL_FUSEARMOR                64771
    #define SPELL_DEVOURINGFLAME        63014
    #define SPELL_KNOCK_AWAY             19633
    
    #define SPELL_BELLOWINGROAR          18431     
    #define SPELL_HEATED_GROUND         22191      
    
    #define SPELL_SUMMONADDS            17646
    
    #define CREATURE_ADDS                  33846
    
    static float MovementLocations[4][3]=
    {
        {607.7, -281.9, 408.6},
        {602.0, -245.5, 424.7},
        {612.3, -230.8, 409.1},
        {624.1, -251.8, 426.1}
    };
    
    static float SpawnLocations[4][3]=
    {
        {602.0, -248.1, 391.2},
        {624.4, -232-4, 391.1},
        {643.3, -256.4, 391.4},
        {626.6, -271.5, 391.4},
    };
    
    struct TRINITY_DLL_DECL boss_razorscaleAI : public ScriptedAI
    {
        boss_razorscaleAI(Creature* c) : ScriptedAI(c) {}
    
        uint32 Phase;
    
        uint32 FlameBreathTimer;
        uint32 FUSEARMORTimer;
        uint32 DEVOURINGFLAMETimer;
        uint32 MovementTimer;
        uint32 SummonAddsTimer;
        uint32 BellowingRoarTimer;
        uint32 WingBuffetTimer;
        uint32 KnockAwayTimer;
        uint32 FireballTimer;
    
        bool InitialSpawn;
    
        void Reset()
        {
            Phase = 1;
    
            FlameBreathTimer = 20000;
            DEVOURINGFLAMETimer = 2000;
            FUSEARMORTimer = 15000;
            MovementTimer = 3000;
            SummonAddsTimer = 45000;
            BellowingRoarTimer = 30000;
            WingBuffetTimer = 17000;
            KnockAwayTimer = 15000;
            FireballTimer = 18000;
    
            InitialSpawn = true;
    
            m_creature->ApplySpellImmune(0, IMMUNITY_STATE, SPELL_AURA_MOD_TAUNT, true);
            m_creature->ApplySpellImmune(1, IMMUNITY_EFFECT,SPELL_EFFECT_ATTACK_ME, true);
        }
    
        void EnterCombat(Unit* who)
        {
            DoScriptText(SAY_AGGRO, m_creature);
            DoZoneInCombat();
        }
    
        void JustDied(Unit* Killer)
        {
        }
    
        void KilledUnit(Unit *victim)
        {
            DoScriptText(SAY_KILL, m_creature);
        }
    
        void UpdateAI(const uint32 diff)
        {
            if(!UpdateVictim())
                return;
    
            if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 99) && (Phase == 1))
            {
                Phase = 2;
                m_creature->AddUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
                m_creature->SetHover(true);
                m_creature->GetMotionMaster()->Clear(false);
                m_creature->GetMotionMaster()->MoveIdle();
                DoScriptText(SAY_PHASE_2_TRANS, m_creature);
            }
    
            if(((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) && (Phase == 2))
            {
                Phase = 3;
                m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING);
                m_creature->SetHover(false);
                m_creature->GetMotionMaster()->MovePoint(0, 619.6, -261.1, 391.471832);
                DoStartMovement(m_creature->getVictim());
                m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
                DoScriptText(SAY_PHASE_3_TRANS, m_creature);
                m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());
            }
    
            if(Phase == 1 || Phase == 3)
            {
                if(FlameBreathTimer < diff)
                {
                    DoCast(m_creature->getVictim(), SPELL_FLAMEBREATH);
                    FlameBreathTimer = 15000;
                }else FlameBreathTimer -= diff;
    
                if(DEVOURINGFLAMETimer < diff)
                {
                    Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1);
                    if(target && !m_creature->HasInArc(M_PI, target))
                        DoCast(target, SPELL_DEVOURINGFLAME);
    
                    DEVOURINGFLAMETimer = 10000;
                }else DEVOURINGFLAMETimer -= diff;
    
                if(FUSEARMORTimer < diff)
                {
                    DoCast(m_creature->getVictim(), SPELL_FUSEARMOR);
                    FUSEARMORTimer = 10000;
                }else FUSEARMORTimer -= diff;
    
                if(WingBuffetTimer < diff)
                {
                    DoCast(m_creature->getVictim(), SPELL_WINGBUFFET);
                    WingBuffetTimer = 7000 + ((rand()%8)*1000);
                }else WingBuffetTimer -= diff;
    
                if(KnockAwayTimer < diff)
                {
                    if(rand() <= 30)
                    {
                        DoCast(m_creature->getVictim(), SPELL_KNOCK_AWAY);
                    }
                    KnockAwayTimer = 15000;
                }else KnockAwayTimer -= diff;
    
                if(Phase == 3)
                {
                    if(BellowingRoarTimer < diff)
                    {
                        DoCast(m_creature->getVictim(), SPELL_BELLOWINGROAR);
    
                        BellowingRoarTimer = 30000;
                    }else BellowingRoarTimer -= diff;
    
                    if(SummonAddsTimer < diff)
                    {
                        SummonAdds(Phase);
    
                        SummonAddsTimer = 45000;
                    }else SummonAddsTimer -= diff;
                }
    
                DoMeleeAttackIfReady();
            }
    
            if(Phase == 2)
            {
                if(InitialSpawn)
                {
                    InitialSpawn = false;
    
                    for(uint32 i = 0; i < 4; ++i)
                    {
                        uint32 random = rand()%4;
    Creature* Add = m_creature->SummonCreature(CREATURE_ADDS, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
                        if(Add)
                            Add->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
                    }
                }
    
    
                if(FireballTimer < diff)
                {
                    DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_FIREBALL);
    
                    FireballTimer = 18000;
                }
                else FireballTimer -= diff;
    
                if(MovementTimer < diff)
                {
                    if(rand()%100 < 30)
                    {
                        DoScriptText(EMOTE_BREATH, m_creature);
                        DoCast(m_creature->getVictim(), SPELL_FLAMEBUFFET);
                    }
                    else ChangePosition();
    
                    MovementTimer = 25000;
                }else MovementTimer -= diff;
    
                if(SummonAddsTimer < diff)
                {
                    SummonAdds(Phase);
    
                    SummonAddsTimer = 45000;
                }
                else SummonAddsTimer -= diff;
            }
        }
    
        void ChangePosition()
        {
            uint32 random = rand() % 4;
            if(random<4){
    m_creature->GetMotionMaster()->MovePoint(0, MovementLocations[random][0], MovementLocations[random][1], MovementLocations[random][2]);}
        }
    
        void SummonAdds(uint32 Phase)
        {
            if(Phase == 2)
            {
                uint32 max = rand()%10;
                for(uint32 i = 0; i < 4; ++i)
                {
                    uint32 random = rand()%3;
    Creature* Add = m_creature->SummonCreature(CREATURE_ADDS, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
                    if(Add)
                        Add->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
                }
            }
    
            if(Phase == 3)
            {
                uint32 max = rand() % 10 +1;
                if(max < 1)
                {
                    for(uint32 i = 0; i < max; ++i)
                    {
                        uint32 random = rand()%4;
    Creature* Add = m_creature->SummonCreature(CREATURE_ADDS, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
                        if(Add)
                            Add->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
                    }
                }
            }
        }
    };
    
    CreatureAI* GetAI_boss_razorscaleAI(Creature *_Creature)
    {
        return new boss_razorscaleAI (_Creature);
    }
    
    void AddSC_boss_razorscale()
    {
        Script *newscript;
        newscript = new Script;
        newscript->Name="boss_razorscale";
        newscript->GetAI = &GetAI_boss_razorscaleAI;
        newscript->RegisterSelf();
    }
    Hope some1 find it usefull

  2. #2
    Status : i3ringit is offline
    Join Date : Mar 2010
    Posts : 3
    Thanks: 0
    Thanked 0 Times in 0 Posts
    Rep Power : 0
    Reputation:10i3ringit is on a distinguished road

    Default

    Can't wait to use this. Thank you :)

  3. #3
    Status : AusAndrew is offline
    Join Date : Jan 2011
    Location : In Your Hardware
    Posts : 184
    Thanks: 8
    Thanked 9 Times in 7 Posts
    Rep Power : 2
    Reputation:12AusAndrew is on a distinguished road

    Default

    wow mate :) thanks so much :)

  4. #4
    Dreadkiller's Avatar
    Status : Dreadkiller is offline
    Join Date : Oct 2010
    Location : Germany
    Posts : 279
    Thanks: 1
    Thanked 12 Times in 10 Posts
    Rep Power : 2
    Reputation:26Dreadkiller is on a distinguished road

    Default

    trinitycore has scriptet that boss allready leviathan, ignis, razorscale, xt-002, kolgarn, assembly of iron, hodir and freya are allready scripted


 

Similar Threads

  1. [C++] Guild Housing Script V.3.0
    By Jerry in forum LUA / C++ Scripts
    Replies: 7
    Last Post: 04-08-2011, 01:11 PM
  2. Script to Manage Latency
    By jfernandoz in forum TrinityCore Guides
    Replies: 5
    Last Post: 02-10-2011, 10:28 AM
  3. Ulduar Spawns for TrinityCore2
    By Jerry in forum SQL Querys
    Replies: 11
    Last Post: 10-13-2009, 04:16 AM
  4. c++ Script COMMANDS!!!!
    By Jerry in forum LUA / C++ Guides
    Replies: 0
    Last Post: 08-26-2009, 05:49 PM
  5. [Release] [ArcEmu] Hodir Ulduar Boss
    By Jerry in forum SQL Querys
    Replies: 0
    Last Post: 07-27-2009, 12:15 AM

Visitors found this page by searching for:

mangos script ulduar

wow c mango

trinity boss script

script mangos boss

mangos ulduar

arcemu ulduar scripts

mangos boss script

ulduar trinitycore

mangos boss scripts

lua script ulduar

script ulduar mangos

ulduar bosses trinity

Script boss wow mangos

Scripted Ulduar

wow boss sql

Ulduar MaNGOS script

mangos boss scripten

wow ulduar scripts arc emu

mangos script boss

mangos script c

trinity boss scripts

ulduar c

mangos boss sql

ulduar script for mangos

Arcemu razorscale

SEO Blog

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts