• This is a read only backup of the old Emudevs forum. If you want to have anything removed, please message me on Discord: KittyKaev

Firestorm Mini Boss Fight

Tommy

Founder
Hey guys! Here's another release by me, so lets get started!

.: Features :.


  • [*=1]Mini Boss 'Firestorm'
    [*=1]All needed information is in the script

.: Fight :.


  • [*=1]The mini boss has 3 simple spells. Fireball, Fire spit and Blast Nova. The spells will be casted at random, between 2 - 19 seconds.
    [*=1]Every 30-38 seconds, the Mini Boss will yell, "FLAMES COME FORTH!" -- After he yells that, he will then spawn fire gameobjects. If close to these gameobjects, they will deal damage.

.: Video :.


.: Source :.


EmuDevs:
Code:
/*
 *╔═╦═╦═╦╦╦══╦═╦╗─╔╦══╗ 
 *║╦╣║║║║║╠╗╗║╦╣╚╦╝║══╣
 *║╩╣║║║║║╠╩╝║╩╬╗║╔╬══║
 *╚═╩╩═╩╩═╩══╩═╝╚═╝╚══╝
 *           (http://emudevs.com)
 GameObject: (Burning Tree;191160)
 GameObject: (Burning Blaze;190570) - Deals Damage if near
 NPC DisplayID: 24905
*/
enum SpellIds
{
/*     NAME                       SPELLID    CAST-TIME     DAMAGE   */
    SPELL_FIREBALL               = 70282, //  3 sec       6198-7202
    SPELL_FIRE_SPIT              = 66796, //  1 sec       5088-5912
    SPELL_BLAST_NOVA             = 74392, //  2 sec       5688-7312
};

enum EventIds
{
    EVENT_NONE,
    EVENT_FIREBALL,
    EVENT_FIRE_SPIT,
    EVENT_BLAST_NOVA,
    EVENT_SPAWN_FIRE,
    EVENT_SPAWN_FIRE_CLEANUP
};

class npc_battle : public CreatureScript
{
public:
    npc_battle() : CreatureScript("npc_battle") { }

    struct npc_battleAI : public ScriptedAI
    {
        npc_battleAI(Creature* creature) : ScriptedAI(creature) { }

        void Reset()
        {
            events.Reset();
            events.ScheduleEvent(EVENT_FIREBALL, urand(6000, 11000));
            events.ScheduleEvent(EVENT_FIRE_SPIT, urand(2000, 9000));
            events.ScheduleEvent(EVENT_BLAST_NOVA, urand(10000, 19000));
            events.ScheduleEvent(EVENT_SPAWN_FIRE, urand(30000, 38000));
        }

        void UpdateAI(uint32 diff)
        {
            events.Update(diff);

            while (uint32 eventId = events.ExecuteEvent())
            {
                switch(eventId)
                {
                    case EVENT_FIREBALL:
                        if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM))
                            DoCast(target, SPELL_FIREBALL);
                        events.ScheduleEvent(EVENT_FIREBALL, urand(6000, 11000));
                        break;
                    case EVENT_FIRE_SPIT:
                        DoCast(me->getVictim(), SPELL_FIRE_SPIT, true);
                        events.ScheduleEvent(EVENT_FIRE_SPIT, urand(2000, 9000));
                        break;
                    case EVENT_BLAST_NOVA:
                        DoCast(SPELL_BLAST_NOVA);
                        events.ScheduleEvent(EVENT_BLAST_NOVA, urand(10000, 19000));
                        break;
                    case EVENT_SPAWN_FIRE:
                        me->MonsterYell("FLAMES COME FORTH!", LANG_UNIVERSAL, 0);
                        events.ScheduleEvent(EVENT_SPAWN_FIRE, urand(30000, 38000));
                        events.ScheduleEvent(EVENT_SPAWN_FIRE_CLEANUP, 15000);
                        SpawnFire();
                        break;
                    case EVENT_SPAWN_FIRE_CLEANUP:
                        ClearFire();
                        break;
                }
            }
            DoMeleeAttackIfReady();
        }

        void SpawnFire()
        {
            float x, y, z;
            gameObjectTree = NULL;
            gameObjectFire = NULL;
            gameObjectFire2 = NULL;
            gameObjectFire3 = NULL;
            gameObjectFire4 = NULL;
            // Getting Position
            me->GetPosition(x, y, z);
            // Start Spawning
            gameObjectTree = me->SummonGameObject(191160, x, y, z, 0, 0, 0, 0, 0, 0);
            gameObjectTreeFire = me->SummonGameObject(190570, gameObjectTree->GetPositionX(), gameObjectTree->GetPositionY(), gameObjectTree->GetPositionZ(), 0, 0, 0, 0, 0, 0);
            gameObjectFire = me->SummonGameObject(190570, x, y + 10, z, 0, 0, 0, 0, 0, 0);
            gameObjectFire2 = me->SummonGameObject(190570, x, y -10, z, 0, 0, 0, 0, 0, 0);
            gameObjectFire3 = me->SummonGameObject(190570, x + 10, y, z, 0, 0, 0, 0, 0, 0);
            gameObjectFire4 = me->SummonGameObject(190570, x - 10, y, z, 0, 0, 0, 0, 0, 0);
        }

        void ClearFire()
        {
            if (gameObjectTree && gameObjectTreeFire && gameObjectFire && gameObjectFire2 && gameObjectFire3 && gameObjectFire4)
            {
                gameObjectTree->Delete();
                gameObjectTreeFire->Delete();
                gameObjectFire->Delete();
                gameObjectFire2->Delete();
                gameObjectFire3->Delete();
                gameObjectFire4->Delete();
            }
        }

        void JustDied(Unit* /* victim */)
        {
            events.Reset();
            ClearFire();
        }
    private:
        EventMap events;
        GameObject* gameObjectTree;
        GameObject* gameObjectTreeFire;
        GameObject* gameObjectFire;
        GameObject* gameObjectFire2;
        GameObject* gameObjectFire3;
        GameObject* gameObjectFire4;
    };

    CreatureAI* GetAI(Creature* creature) const
    {
        return new npc_battleAI(creature);
    }
};

void AddSC_mini_fight()
{
    new npc_battle;
}
 

Epicblood

Epic Member
Needs way more fire, Firestorm makes you think "Hot damn, dis nigga gunna be all up in teh flames mufucka" but in reality its more like "wash out! dis nigga got a fireball!! aaaannnndddd.... its gone"
 

Jameyboor

Retired Staff
Needs way more fire, Firestorm makes you think "Hot damn, dis nigga gunna be all up in teh flames mufucka" but in reality its more like "wash out! dis nigga got a fireball!! aaaannnndddd.... its gone"

lol'd..

OT : looks awesome :D

P.S nasty clicker :kiddingme:
 

Tommy

Founder
lol'd..

OT : looks awesome :D

P.S nasty clicker :kiddingme:

Thanks and if you couldn't click with a mouse, you wouldn't be able to create macros, be thankful. I don't see a point in not clicking when on a private server. :/
 

Jameyboor

Retired Staff
Thanks and if you couldn't click with a mouse, you wouldn't be able to create macros, be thankful. I don't see a point in not clicking when on a private server. :/

Got to agree with you there, thing is, if do it on a Private Server, it will become a habit, a bad habit.
 

Ayahne

Enthusiast
More Easyier method to make it in Database

I just made Scripts in DB and it was long time ago there some results
CREATure_ai_scripts
there was 5 boses in the istance but i just found video about just 2 ones

i just create this custom instance for mine server 2.4.3 now im working on 3.3.5a project
 

Tommy

Founder
More Easyier method to make it in Database

I just made Scripts in DB and it was long time ago there some results
CREATure_ai_scripts
there was 5 boses in the istance but i just found video about just 2 ones

i just create this custom instance for mine server 2.4.3 now im working on 3.3.5a project

I don't use the SAI for specific reasons. Better if there was less dependency on the database for TrinityCore anyway, hence why I don't use it. I removed smart_scripts and creature_ai_scripts from my custom core entirely, Eluna is better for such simple tasks; however, my release is a learning experience for vivid users wanting to learn the TrinityCore C++ library and C++ in general.

Thanks for the hint, though it appears as an advertisement more than an entitled opinion.
 
Top