예제 #1
0
    void AIUpdate()
    {
        if (GetHealthPercent() <= 75 && GetPhase() == 1)
        {
            _unit->SendScriptTextChatMessage(7723);     // Lapdogs, all of you!
            SetPhase(2);
        }
        else if (GetHealthPercent() <= 50 && GetPhase() == 2)
        {
            _unit->SendScriptTextChatMessage(7725);     // Fools! Our cause is righteous!

            for (int x = 0; x < 2; x++)
            {
                MoonScriptCreatureAI* Guard = SpawnCreature(636);
                if (Guard != NULL)
                {
                    Guard->SetDespawnWhenInactive(true);
                    Guard->GetUnit()->m_noRespawn = true;
                }
            }

            SetPhase(3);

        }
        else if (GetHealthPercent() <= 25 && GetPhase() == 3)
        {
            _unit->SendScriptTextChatMessage(7727);     // The Brotherhood shall prevail!
            SetPhase(4);
        }
        ParentClass::AIUpdate();
    }
예제 #2
0
	/*
		At <= 50% He will spawn 2 Defias Blackguards
		ToDo: Make them despawn WHEN he dies, also make them unlootable
	*/
	void AIUpdate()
	{
		if(GetHealthPercent() <= 75 && GetPhase() == 1)
		{
			Emote("Lap dogs, all of you.", Text_Yell, 5782);
			SetPhase(2);
		}
		else if(GetHealthPercent() <= 50 && GetPhase() == 2)
		{
			Emote("Fools! Our cause is righteous.", Text_Yell, 5783);
			// Defias Blackguard x 2
			MoonScriptCreatureAI* Guard = NULL;
			for(int x=0; x<2; x++)
			{
				Guard = SpawnCreature(636);
				if(Guard == NULL)
					continue;
				Guard->SetDespawnWhenInactive(true);
				Guard->GetUnit()->m_noRespawn = true;
				Guard = NULL;
			}
			SetPhase(3);
		}
		else if(GetHealthPercent() <= 25 && GetPhase() == 3)
		{
			Emote("The brotherhood shall remain.", Text_Yell, 5784);
			SetPhase(4);
		}
		ParentClass::AIUpdate();
	}
예제 #3
0
    void AIUpdate()
	{	
        ParentClass::AIUpdate();

		if( IsTimerFinished( mSummonTime ) )
		{
			MoonScriptCreatureAI *Eagle = NULL;
			// Spawn 3 Soaring Eagles
			for(int x=0; x<3; x++)
			{
				Eagle = SpawnCreature(CN_SOARING_EAGLE, ( _unit->GetPositionX() + RandomFloat( 12 ) - 10 ), ( _unit->GetPositionY()+ RandomFloat( 12 ) - 15 ),
				_unit->GetPositionZ(), _unit->GetOrientation(), true);
				if(Eagle)
				{
					Eagle->AggroNearestUnit();
					Eagle->SetDespawnWhenInactive(true);
				}
			}
			Eagle = NULL;
			Emote("Feed, me bruddahs!", Text_Yell, 12019);
			// Restart the timer
			ResetTimer( mSummonTime, 120000);
		}
	}