void OnCombatStart(Unit* pTarget)
		{
			pDalronn = GetNearestCreature(CN_DALRONN);
			mReplyTimer = AddTimer(2500);

			ParentClass::OnCombatStart(pTarget);
		};
		void OnReachWP(uint32 iWaypointId, bool bForwards)
		{
			if(iWaypointId == uint32(WPCount))   // Reached end
			{
				StopWaypointMovement();
				if(GetNearestCreature(CN_HEADLESS_HORSEMAN_FIRE) == NULL)     // CASE players win
				{
					Emote("My flames have died, left not a spark! I shall send you now to the lifeless dark!", Text_Yell, 11968);
					Despawn(30000, 0); //Despawn after 30 secs
				}
				else // CASE players lost
				{
					Emote("Fire consumes! You've tried and failed. Let there be no doubt, justice prevailed!", Text_Yell, 11967);
					Despawn(12000, 0); //Despawn after 12 secs
				}
			}
			else
			{
				switch(_unit->GetMapMgr()->GetAreaID(_unit->GetPositionX(), _unit->GetPositionY()))
				{
					case 87: // Goldshire
						{
							if(iWaypointId == 6)
							{
								_unit->CastSpell(_unit, 42118, true);
							}
						}
						break;
				}
			}
			ParentClass::OnReachWP(iWaypointId, bForwards);
		}
        void OnDied(Unit* pKiller)
        {
            if (pDalronn != NULL && pDalronn->IsAlive())
            {
                Emote("Not... over... yet.", Text_Yell, 0);
                pDalronn->Emote("Skarvald, you incompetent slug! Return and make yourself useful!", Text_Yell, 13203);
                SpawnCreature(CN_SKARVALD_GHOST, true);
                _unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);

            }
            else if (pDalronn != NULL && !pDalronn->IsAlive())
            {
                Emote("A warrior's death.", Text_Yell, 13231);

                pDalronnGhost = GetNearestCreature(CN_DALRONN_GHOST);

                if (pDalronnGhost != NULL)
                {
                    pDalronnGhost->Despawn(1000, 0);
                    pDalronnGhost = NULL;
                }
            }

            ParentClass::OnDied(pKiller);
        };
Exemple #4
0
	void AIUpdate()
	{
		if(SpawnTimer && IsTimerFinished(SpawnTimer))
		{
			switch(GetPhase())
			{
				case 2: Moccasin(); ResetTimer(SpawnTimer,100000); SetPhase(3); break;
				case 3: Ectoplasm(); ResetTimer(SpawnTimer,100000); SetPhase(4); break;
				case 4: BMutanus(); ResetTimer(SpawnTimer,100000); SetPhase(5); break;
			}
		}
		if(GetPhase() == 5 && (!Mutanus || !Mutanus->GetUnit()->isAlive()))
		{
			MoonScriptCreatureAI* Naralex = GetNearestCreature(3679);
			if(Naralex && Naralex->IsAlive())
			{
				SetDisplayId(17089);
				Naralex->SetDisplayId(17089);
				Naralex->Emote("I am awake... at last", Text_Say, 5789);
				Naralex->GetUnit()->SetStandState(STANDSTATE_STAND);
				SetFlyMode(true);
				Naralex->SetFlyMode(true);
				MoveTo(-6.704030f, 200.308838f, -26.938824f);
				Naralex->MoveTo(-6.704030f, 200.308838f, -26.938824f);
			}
			SetPhase(6);
		}
		ParentClass::AIUpdate();
	}
        void OnCombatStart(Unit* pTarget)
        {
            _unit->SendScriptTextChatMessage(4471);     // Dalronn! See if you can muster the nerve to join my attack!
            pDalronn = GetNearestCreature(CN_DALRONN);
            mReplyTimer = AddTimer(2500);

            ParentClass::OnCombatStart(pTarget);
        };
Exemple #6
0
	void OnCombatStop(Unit* pTarget)
	{
		KJDummyAI* pKjDummy = static_cast<KJDummyAI*>( GetNearestCreature( CN_KIL_JADEN_DUMMY ) );
		if( pKjDummy )
			pKjDummy->RestartEncounter();

		ParentClass::OnCombatStop(pTarget);
	};
Exemple #7
0
	void OnDied(Unit* mKiller)
	{
		KJDummyAI* pKjDummy = static_cast<KJDummyAI*>( GetNearestCreature( CN_KIL_JADEN_DUMMY ) );
		if( pKjDummy )
			pKjDummy->UpdateCount();

		ParentClass::OnDied(mKiller);
	};
	void OnDied(Unit* pKiller)
	{
		MoonScriptCreatureAI* mLadySacrolash = GetNearestCreature(CN_LADY_SACROLASH);
		if( mLadySacrolash != NULL && mLadySacrolash->IsAlive() )
		{
			mLadySacrolash->Emote("Alythess! Your fire burns within me!", Text_Yell, 12488);
		}
		ParentClass::OnDied(pKiller);
	}
	void OnDied(Unit* pKiller)
	{
		MoonScriptCreatureAI* mGrandWarlockAlythess = GetNearestCreature(CN_GRAND_WARLOCK_ALYTHESS);
		if( mGrandWarlockAlythess != NULL && mGrandWarlockAlythess->IsAlive() )
		{
			mGrandWarlockAlythess->Emote("Sacrolash!", Text_Yell, 12492);
		}
		ParentClass::OnDied(pKiller);
	}
	void OnLoad()
	{
		_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_9);
		_unit->GetAIInterface()->SetAllowedToEnterCombat(false);
		SetFlyMode(true);
		_unit->CastSpell(_unit, SPELL_ANVEENA_PRISON, true);
		KilJaedan = GetNearestCreature(CREATURE_KILJAEDEN);
		ParentClass::OnLoad();
	}
    BrutebaneStoutTriggerAI(Creature* pCreature) : MoonScriptCreatureAI(pCreature)
    {
        _unit->SetFaction(35);

        SetCanMove(false);

        plr = _unit->GetMapMgr()->GetInterface()->GetPlayerNearestCoords( _unit->GetPositionX(), _unit->GetPositionY(), _unit->GetPositionZ() );
        Ogre = GetNearestCreature(CN_BLADESPIRE_OGRE_1);
        if(Ogre == NULL)
        {
            Ogre = GetNearestCreature(CN_BLADESPIRE_OGRE_2);
            if(Ogre == NULL)
            {
                Ogre = GetNearestCreature(CN_BLADESPIRE_OGRE_3);
                if(Ogre == NULL) {
                    return;
                }
            }
        }
        Ogre->MoveTo(_unit);
        RegisterAIUpdateEvent(1000);
    }
Exemple #12
0
	void OnCombatStart( Unit* pTarget )
	{
		SetTargetToChannel( NULL, 0 );
		ParentClass::OnCombatStart(pTarget);

		KJDummyAI* pKjDummy = static_cast<KJDummyAI*>( GetNearestCreature( CN_KIL_JADEN_DUMMY ) );
		if( pKjDummy )
		{
			// chain aggro
			for( EncounterArray::iterator itr = pKjDummy->GetEncounterVectorBegin(); itr != pKjDummy->GetEncounterVectorEnd(); ++itr )
			{
				if( (*itr) && (*itr)->GetEntry() == CN_HAND_OF_THE_DECEIVER && (*itr)->isAlive() && pTarget )
					(*itr)->GetAIInterface()->AttackReaction( pTarget, 1 );
			};
		};
	};
		void AIUpdate()
		{
			time_t tiempo;
			struct tm* tmPtr;
			tiempo = UNIXTIME;
			tmPtr = localtime(&tiempo);
			if(tmPtr->tm_min == 0 && (tmPtr->tm_hour % 4) == 0)   // All check for the time
			{
				mHeadlessHorseman = GetNearestCreature(CN_SHADE_OF_THE_HORSEMAN);
				if(mHeadlessHorseman == NULL)
				{
					SpawnCreature(CN_SHADE_OF_THE_HORSEMAN, _unit->GetPositionX(), _unit->GetPositionY(), _unit->GetPositionZ(), _unit->GetOrientation());
					SetAIUpdateFreq(4 * 60 * 1000);
				}
			}
			ParentClass::AIUpdate();
		}
	void OnReachWP(uint32 iWaypointId, bool bForwards)
	{
		if( iWaypointId == 1 )
		{
			switch( RandomUInt(2) )
			{
			case 0: Emote( "Life from the lifelessness... death for you.",			Text_Yell, 13961); break;
			case 1: Emote( "Nothing is wasted in the process. You will see....",	Text_Yell, 13962); break;
			};
			
			MoonScriptCreatureAI* pAnvil = GetNearestCreature( CN_VOLKHANS_ANVIL );
			if( pAnvil )
				_unit->CastSpell( pAnvil->GetUnit(), SPELL_TEMPER, true );
			else
				_unit->CastSpell( GetUnit(), SPELL_TEMPER, true );

			SetCanEnterCombat( true ); 
			_unit->GetAIInterface()->AttackReaction( GetNearestPlayer() , 1 ); // hackfix
		};
	};
	void OnDied(Unit* pKiller)
	{
		if(pSkarvald != NULL && pSkarvald->IsAlive())
		{
			Emote("See... you... soon.", Text_Yell, 0);
			pSkarvald->Emote("Pagh! What sort of necromancer lets death stop him? I knew you were worthless!", Text_Yell, 13233);
			SpawnCreature(CN_DALRONN_GHOST, true);
			_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
		}
		else if(pSkarvald != NULL && !pSkarvald->IsAlive()) 
		{
			Emote("There's no... greater... glory.", Text_Yell, 13201);

			pSkarvaldGhost = (ArcTicScriptBossAI*)GetNearestCreature(CN_SKARVALD_GHOST);

			if(pSkarvaldGhost != NULL)
				pSkarvaldGhost->Despawn(1000, 0);
		}

		ParentClass::OnDied(pKiller);
	};
Exemple #16
0
	KilJaedenAI(Creature* pCreature) : MoonScriptBossAI(pCreature)
	{	
		SetCanEnterCombat( false );

		DelayNextAttack( 11600 );
		SetAllowMelee( false );
		SetAllowSpell( false );
		SetAllowTargeting( false );
		SetCanMove( false );
		TriggerCooldownOnAllSpells(); 

		SetCanMove( false );
		Emote( "The expendible have perished... So be it! Now I shall succeed where Sargeras could not! I will bleed this wretched world and secure my place as the true master of the Burning Legion. The end has come! Let the unraveling of this world commence!", Text_Yell, 12500 );
		mStarted = false;
		RegisterAIUpdateEvent( 100 );

		pKJDummy = static_cast<KJDummyAI*>( GetNearestCreature( CN_KIL_JADEN_DUMMY ) );
		if( pKJDummy )
			pKJDummy->AddEncounterCreature( _unit );

		AddPhaseSpell( 1, AddSpell( SOUL_FLAY, Target_Current, 50, 0, 6 ) );
		AddPhaseSpell( 1, AddSpell( LEGION_LIGHTNING, Target_RandomPlayer, 25, 2.0f, 8 ) );
		AddPhaseSpell( 1, AddSpell( FIRE_BLOOM, Target_RandomPlayer, 20, 0, 10 ) );
	};
	void OnCombatStart(Unit* pTarget)
	{
		mGarr = (AscentScriptBossAI*)GetNearestCreature(CN_GARR);
		ParentClass::OnCombatStart(pTarget);
	}
        void OnCombatStart(Unit* pTarget)
        {
            pSkarvald = GetNearestCreature(CN_SKARVALD);

            ParentClass::OnCombatStart(pTarget);
        };
	void OnCombatStart(Unit* pTarget)
	{
		pSkarvald = (ArcTicScriptBossAI*)GetNearestCreature(CN_SKARVALD); 

		ParentClass::OnCombatStart(pTarget);
	};
	void OnCombatStart(Unit* pTarget)
	{
		mGrandWarlockAlythess = GetNearestCreature(CN_GRAND_WARLOCK_ALYTHESS);
		ParentClass::OnCombatStart(pTarget);
	}
	void OnCombatStart(Unit* pTarget)
	{
		mLadySacrolash = GetNearestCreature(CN_LADY_SACROLASH);
		ParentClass::OnCombatStart(pTarget);
	}
Exemple #22
0
	void OnCombatStart(Unit* pTarget)
	{
		mGarr = (MoonScriptBossAI*)GetNearestCreature(12057);
		ParentClass::OnCombatStart(pTarget);
	}
	void OnCombatStart(UnitPointer pTarget)
	{
		mGarr = (MoonScriptBossAI*)GetNearestCreature(CN_GARR);
		ParentClass::OnCombatStart(pTarget);
	}
Exemple #24
0
        void AIUpdate()
        {
            SetCanEnterCombat(false);
            SetCanMove(false);
            SetAllowMelee(false);
            SetAllowSpell(false);

            // ORB ONE
            if (IsTimerFinished(Phase_Timer) && GetPhase() == 0)
            {
                if (Phasepart == 0)
                {
                    Spawncounter = 0;
                    orb1 = _unit->GetMapMgr()->GetInterface()->GetGameObjectNearestCoords(482.929f, -151.114f, 43.654f, 183961);
                    if (orb1)
                        orb1->SetState(GAMEOBJECT_STATE_OPEN);

                    switch (RandomUInt(1))
                    {
                        NPC_ID_Spawn = 0;
                        case 0:
                            NPC_ID_Spawn = CN_BLAZING_TRICKSTER;
                            break;
                        case 1:
                            NPC_ID_Spawn = CN_WARP_STALKER;
                            break;
                    }
                    ResetTimer(Phase_Timer, 8000);
                    Phasepart = 1;
                    return;
                }

                else if (Phasepart == 1)
                {
                    if (!NPC_orb1 && NPC_ID_Spawn != 0 && Spawncounter == 0)
                    {
                        ++Spawncounter;
                        NPC_orb1 = SpawnCreature(NPC_ID_Spawn, 475.672f, -147.086f, 42.567f, 3.184015f);
                        return;
                    }
                    else if (NPC_orb1 && !NPC_orb1->IsAlive())
                    {
                        _unit->SendScriptTextChatMessage(SAY_MELLICHAR_03);
                        SetPhase(1);
                        Phasepart = 0;
                        ResetTimer(Phase_Timer, 6000);
                        return;
                    }
                    else
                    {
                        return;
                    }
                    return;
                }
                //return;
            }

            // ORB TWO
            else if (IsTimerFinished(Phase_Timer) && GetPhase() == 1)
            {
                if (Phasepart == 0)
                {
                    Spawncounter = 0;
                    orb2 = _unit->GetMapMgr()->GetInterface()->GetGameObjectNearestCoords(409.062f, -152.161f, 43.653f, 183963);
                    if (orb2)
                        orb2->SetState(GAMEOBJECT_STATE_OPEN);

                    ResetTimer(Phase_Timer, 8000);
                    Phasepart = 1;
                    return;
                }

                else if (Phasepart == 1)
                {
                    if (!NPC_orb2 && Spawncounter == 0)
                    {
                        ++Spawncounter;
                        NPC_orb2 = SpawnCreature(CN_MILLHOUSE_MANASTORM, 413.192f, -148.586f, 42.569f, 0.024347f);
                        return;
                    }
                    else if (NPC_orb2 && NPC_orb2->IsAlive())
                    {
                        Creature* millhouse = static_cast<Creature*>(ForceCreatureFind(CN_MILLHOUSE_MANASTORM));
                        if (millhouse)
                        {
                            millhouse->SendTimedScriptTextChatMessage(SAY_MILLHOUS_01, 2000);

                            _unit->SendTimedScriptTextChatMessage(SAY_MELLICHAR_04, 13000);

                            millhouse->SendTimedScriptTextChatMessage(SAY_MILLHOUS_02, 22000);
                        }
                        SetPhase(2);
                        Phasepart = 0;
                        ResetTimer(Phase_Timer, 25000);
                        return;
                    }
                    else
                    {
                        return;
                    }
                    return;

                }
                //return;
            }

            // ORB THREE
            else if (IsTimerFinished(Phase_Timer) && GetPhase() == 2)
            {
                if (Phasepart == 0)
                {
                    Spawncounter = 0;
                    orb3 = _unit->GetMapMgr()->GetInterface()->GetGameObjectNearestCoords(415.167f, -174.338f, 43.654f, 183964);
                    if (orb3)
                        orb3->SetState(GAMEOBJECT_STATE_OPEN);

                    switch (RandomUInt(1))
                    {
                        NPC_ID_Spawn = 0;
                        case 0:
                            NPC_ID_Spawn = CN_SULFURON_MAGMA_THROWER;
                            break;
                        case 1:
                            NPC_ID_Spawn = CN_AKKIRIS_LIGHTNING_WAKER;
                            break;
                    }
                    ResetTimer(Phase_Timer, 8000);
                    Phasepart = 1;
                    return;
                }

                else if (Phasepart == 1)
                {
                    if (!NPC_orb3 && NPC_ID_Spawn != 0 && Spawncounter == 0)
                    {
                        /// \todo investigate.... saying "1"... really?
                        _unit->SendChatMessage(CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, "1");
                        ++Spawncounter;
                        NPC_orb3 = SpawnCreature(NPC_ID_Spawn, 420.050f, -173.500f, 42.580f, 6.110f);
                        return;
                    }
                    else if (!NPC_orb3)
                    {
                        /// \todo investigate.... saying "2"... really?
                        _unit->SendChatMessage(CHAT_MSG_MONSTER_YELL, LANG_UNIVERSAL, "2");
                        NPC_orb3 = GetNearestCreature(NPC_ID_Spawn);
                    }
                    else if (NPC_orb3 && !NPC_orb3->IsAlive())
                    {
                        _unit->SendScriptTextChatMessage(SAY_MELLICHAR_05);
                        SetPhase(3);
                        Phasepart = 0;
                        ResetTimer(Phase_Timer, 8000);
                        return;
                    }
                    else
                    {
                        return;
                    }
                    return;
                }
                //return;
            }

            // ORB FOUR
            else if (IsTimerFinished(Phase_Timer) && GetPhase() == 3)
            {
                if (Phasepart == 0)
                {
                    Spawncounter = 0;
                    orb4 = _unit->GetMapMgr()->GetInterface()->GetGameObjectNearestCoords(476.422f, -174.517f, 42.748f, 183962);
                    if (orb4)
                        orb4->SetState(GAMEOBJECT_STATE_OPEN);

                    switch (RandomUInt(1))
                    {
                        NPC_ID_Spawn = 0;
                        case 0:
                            NPC_ID_Spawn = CN_TWILIGHT_DRAKONAAR;
                            break;
                        case 1:
                            NPC_ID_Spawn = CN_BLACKWING_DRAKONAAR;
                            break;
                    }
                    ResetTimer(Phase_Timer, 8000);
                    Phasepart = 1;
                    return;
                }

                else if (Phasepart == 1)
                {
                    if (!NPC_orb4 && NPC_ID_Spawn != 0 && Spawncounter == 0)
                    {
                        ++Spawncounter;
                        NPC_orb4 = SpawnCreature(NPC_ID_Spawn, 471.153f, -174.715f, 42.589f, 3.097f);
                        return;
                    }
                    else if (!NPC_orb4)
                    {
                        NPC_orb4 = GetNearestCreature(NPC_ID_Spawn);
                    }
                    else if (NPC_orb4 && !NPC_orb4->IsAlive())
                    {
                        _unit->SendScriptTextChatMessage(SAY_MELLICHAR_06);
                        SetPhase(4);
                        Phasepart = 0;
                        ResetTimer(Phase_Timer, 6000);
                        return;
                    }
                    else
                    {
                        return;
                    }
                    return;
                }
                //return;
            }

            else if (IsTimerFinished(Phase_Timer) && GetPhase() == 4)
            {}

            ParentClass::AIUpdate();
            SetCanMove(false);
            SetAllowMelee(false);
            SetAllowSpell(false);
        }
Exemple #25
0
 void OnCombatStart(Unit* pTarget)
 {
     mGarr = static_cast< MoonScriptBossAI* >(GetNearestCreature(CN_GARR));
     ParentClass::OnCombatStart(pTarget);
 }