Главная | Форум | Статьи | Фaйлы| Картинки WoW | Профиль | Регистрация | Вход

[ Новые сообщения · Правила форума · Поиск · RSS ]

WoW-Info — информационный World of Warcraft портал

Boss_onyxia 3.2.2a version - Форум

  • Сторінка 1 з 1
  • 1
Boss_onyxia 3.2.2a version
pro[100]DeadlyДата: Неділя, 05.12.2010, 19:35 | Сообщение # 1



pro[100]Deadly
Группа: Видалені

Замечания:






Код:
Code
/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/>
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */

/* ScriptData
SDName: Boss_Onyxia
Editedby: LordVanLuther
SD%Complete: 90
SDComment: Spell Heated Ground is wrong, flying animation, visual for area effect
SDCategory: Onyxia's Lair
EndScriptData */

#include "precompiled.h"

#define SAY_AGGRO                   -1249000
#define SAY_KILL                    -1249001
#define SAY_PHASE_2_TRANS           -1249002
#define SAY_PHASE_3_TRANS           -1249003
#define EMOTE_BREATH                -1249004

#define SPELL_WINGBUFFET            18500
#define SPELL_FLAMEBREATH           18435
#define SPELL_CLEAVE                19983
#define SPELL_TAILSWEEP             68867
#define SPELL_KNOCK_AWAY            19633

#define SPELL_WINGBUFFET_H          69293
#define SPELL_FLAMEBREATH_H         68970
#define SPELL_CLEAVE_H              68868
#define SPELL_TAILSWEEP_H           69286
#define SPELL_ENGULFINGFLAMES_H     20019
#define SPELL_DEEPBREATH_H          23461
#define SPELL_FIREBALL_H            68926

#define ADD_X                       -126.5728
#define ADD_Y                       -214.6091
#define ADD_Z                       -71.4456

#define SPELL_ENGULFINGFLAMES       20019
#define SPELL_DEEPBREATH            23461
#define SPELL_FIREBALL              18392

#define SPELL_BELLOWINGROAR         18431
#define SPELL_HEATED_GROUND         22191       //Wrong Spell

#define SPELL_SUMMONWHELP           17646

#define CREATURE_WHELP      11262

static float MovementLocations[4][3]=
{
     {-64.0523, -213.0619, -68.2985},
     {12.4636, -220.01490, -68.0548},
     {-38.8391, -182.3220, -68.9457},
     {-37.0390, -244.8760, -68.1278}
};

static float SpawnLocations[4][3]=
{
     {-30.127, -254.463, -89.440},
     {-30.817, -177.106, -89.258},
     {14.480, -241.560, -85.6300},
     {17.372, -190.840, -85.2810},
};

struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
{
     boss_onyxiaAI(Creature* c) : ScriptedAI(c)
     {
     pInstance = pCreature->GetInstanceData();
     }

     uint32 Phase;

     uint32 FlameBreathTimer;
     uint32 CleaveTimer;
     uint32 TailSweepTimer;
     uint32 MovementTimer;
     uint32 EngulfingFlamesTimer;
     uint32 SummonWhelpsTimer;
     uint32 SummonGuardsTimer;
     uint32 BellowingRoarTimer;
     uint32 WingBuffetTimer;
     uint32 KnockAwayTimer;
     uint32 FireballTimer;

     ScriptedInstance* m_pInstance;
     bool RegularMode;

     bool InitialSpawn;

     void Reset()
     {
         Phase = 1;

         FlameBreathTimer = 20000;
         TailSweepTimer = 2000;
         CleaveTimer = 15000;
         MovementTimer = 3000;
         EngulfingFlamesTimer = 15000;
         SummonWhelpsTimer = 90000;
         SummonGuardsTimer = 30000;
         BellowingRoarTimer = 30000;
         WingBuffetTimer = 17000;
         KnockAwayTimer = 15000;
         FireballTimer = 18000;

         InitialSpawn = 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()) < 60) && (Phase == 1))
         {
             Phase = 2;
             m_creature->AddUnitMovementFlag(MOVEMENTFLAG_CAN_FLY + MOVEMENTFLAG_FLYING);
             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()) < 40) && (Phase == 2))
         {
             Phase = 3;
             m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_CAN_FLY + MOVEMENTFLAG_FLYING);
             m_creature->SetHover(false);
             m_creature->GetMotionMaster()->MovePoint(0, -10.6155, -219.357, -87.7344);
             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(), RegularMode ? SPELL_FLAMEBREATH_H : SPELL_FLAMEBREATH);
                 FlameBreathTimer = 15000;
             } else FlameBreathTimer -= diff;

             if (TailSweepTimer <= diff)
             {
                 Unit *pTarget = SelectUnit(SELECT_TARGET_RANDOM, 1);
                 if (pTarget && !m_creature->HasInArc(M_PI, pTarget))
                     DoCast(pTarget, RegularMode ? SPELL_TAILSWEEP_H : SPELL_TAILSWEEP);

                 TailSweepTimer = 10000;
             } else TailSweepTimer -= diff;

             if (CleaveTimer <= diff)
             {
                 DoCast(m_creature->getVictim(), RegularMode ? SPELL_CLEAVE_H : SPELL_CLEAVE);
                 CleaveTimer = 10000;
             } else CleaveTimer -= diff;

             if (WingBuffetTimer <= diff)
             {
                 DoCast(m_creature->getVictim(), RegularMode ? SPELL_WINGBUFFET_H : 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 (SummonWhelpsTimer <= diff)
                 {
                     SummonWhelps(Phase);

                     SummonWhelpsTimer = 45000;
                 } else SummonWhelpsTimer -= diff;
             }

             DoMeleeAttackIfReady();
         }

         if (Phase == 2)
         {
             if (InitialSpawn)
             {
                 InitialSpawn = false;

                 for (uint32 i = 0; i < 10; ++i)
                 {
                     uint32 random = rand()%4;
                     Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
                     if (Whelp)
                         Whelp->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
                 }
             }

             if (EngulfingFlamesTimer <= diff)
             {
                 DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), SPELL_ENGULFINGFLAMES);
                 m_creature->HandleEmoteCommand(ANIM_FLY);

                 EngulfingFlamesTimer = 10000;
             }
             else EngulfingFlamesTimer -= diff;

             if (FireballTimer <= diff)
             {
                 DoCast(SelectUnit(SELECT_TARGET_RANDOM, 0), RegularMode ? SPELL_FIREBALL_H : SPELL_FIREBALL);

                 FireballTimer = 18000;
             }
             else FireballTimer -= diff;

             if (MovementTimer <= diff)
             {
                 if (rand()%100 < 30)
                 {
                     DoScriptText(EMOTE_BREATH, m_creature);
                     DoCast(m_creature->getVictim(), SPELL_DEEPBREATH);
                 }
                 else ChangePosition();

                 MovementTimer = 25000;
             } else MovementTimer -= diff;

             if (SummonWhelpsTimer <= diff)
             {
                 SummonWhelps(Phase);

                 SummonWhelpsTimer = 45000;
             }
             else SummonWhelpsTimer -= diff;
         }
         if (SummonGuardsTimer < diff)
         {
             Unit* target = NULL;
             Unit* SummonedGuards = NULL;

             SummonedGuards = m_creature->SummonCreature(36561,ADD_X,ADD_Y,ADD_Z,0,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,80000);
             if (SummonedGuards)
             {
                 target = SelectUnit(SELECT_TARGET_RANDOM,0);
                 if (target)
                     SummonedGuards->AddThreat(target,1.0f);
             }
             SummonGuardsTimer = 30000;
         } else SummonGuardsTimer -= 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 SummonWhelps(uint32 Phase)
     {
         if (Phase == 2)
         {
             uint32 max = rand()%10;
             for (uint32 i = 0; i < max; ++i)
             {
                 uint32 random = rand()%3;
                 Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
                 if (Whelp)
                     Whelp->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
             }
         }

         if (Phase == 3)
         {
             uint32 max = rand() % 10 +1;
             if (max < 5)
             {
                 for (uint32 i = 0; i < max; ++i)
                 {
                     uint32 random = rand()%4;
                     Creature* Whelp = m_creature->SummonCreature(CREATURE_WHELP, SpawnLocations[random][0], SpawnLocations[random][1], SpawnLocations[random][2], 0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
                     if (Whelp)
                         Whelp->AI()->AttackStart(SelectUnit(SELECT_TARGET_RANDOM, 0));
                 }
             }
         }
     }
};

CreatureAI* GetAI_boss_onyxiaAI(Creature* pCreature)
{
     return new boss_onyxiaAI (pCreature);
}

void AddSC_boss_onyxia()
{
     Script *newscript;
     newscript = new Script;
     newscript->Name = "boss_onyxia";
     newscript->GetAI = &GetAI_boss_onyxiaAI;
     newscript->RegisterSelf();
}

Добавлено (05.12.2010, 19:35)
---------------------------------------------
Новый вариант скрипта:
Большую часть взял из scriptdev2.com

Code
/* ScriptData
SDName: Boss_Onyxia
Editedby LordVanLuther
SD%Complete: 65
SDComment: Phase 3 need additianal code. Phase 2 requires entries in spell_target_position with specific locations. See bottom of file.
SDCategory: Onyxia's Lair
EndScriptData */

#include "precompiled.h"

enum
{
     SAY_AGGRO                   = -1249000,
     SAY_KILL                    = -1249001,
     SAY_PHASE_2_TRANS           = -1249002,
     SAY_PHASE_3_TRANS           = -1249003,
     EMOTE_BREATH                = -1249004,

     SPELL_WINGBUFFET            = 18500,
     SPELL_FLAMEBREATH           = 18435,
     SPELL_CLEAVE                = 19983,
     SPELL_TAILSWEEP             = 15847,
     SPELL_KNOCK_AWAY            = 19633,

     SPELL_ENGULFINGFLAMES       = 20019,
     SPELL_DEEPBREATH            = 23461,
     SPELL_FIREBALL              = 18392,

     //Not much choise about these. We have to make own defintion on the direction/start-end point
     //SPELL_BREATH_NORTH_TO_SOUTH = 17086,                  // 20x in "array"
     //SPELL_BREATH_SOUTH_TO_NORTH = 18351,                  // 11x in "array"

     SPELL_BREATH_EAST_TO_WEST   = 18576,                    // 7x in "array"
     SPELL_BREATH_WEST_TO_EAST   = 18609,                    // 7x in "array"

     SPELL_BREATH_SE_TO_NW       = 18564,                    // 12x in "array"
     SPELL_BREATH_NW_TO_SE       = 18584,                    // 12x in "array"
     SPELL_BREATH_SW_TO_NE       = 18596,                    // 12x in "array"
     SPELL_BREATH_NE_TO_SW       = 18617,                    // 12x in "array"

     //SPELL_BREATH                = 21131,                  // 8x in "array", different initial cast than the other arrays

     SPELL_BELLOWINGROAR         = 18431,
     SPELL_HEATED_GROUND         = 22191,

     SPELL_SUMMONWHELP           = 17646,
     NPC_WHELP                   = 11262,
     MAX_WHELP                   = 16,

     PHASE_START                 = 1,
     PHASE_BREATH                = 2,
     PHASE_END                   = 3
};

struct sOnyxMove
{
     uint32 uiLocId;
     uint32 uiLocIdEnd;
     uint32 uiSpellId;
     float fX, fY, fZ;
};

static sOnyxMove aMoveData[]=
{
     {0, 1, SPELL_BREATH_WEST_TO_EAST,   -33.5561f, -182.682f, -60.9457f},//west
     {1, 0, SPELL_BREATH_EAST_TO_WEST,   -31.4963f, -250.123f, -60.1278f},//east
     {2, 4, SPELL_BREATH_NW_TO_SE,         6.8951f, -180.246f, -60.896f},//north-west
     {3, 5, SPELL_BREATH_NE_TO_SW,        10.2191f, -247.912f, -60.896f},//north-east
     {4, 2, SPELL_BREATH_SE_TO_NW,       -63.5156f, -240.096f, -60.477f},//south-east
     {5, 3, SPELL_BREATH_SW_TO_NE,       -58.2509f, -189.020f, -60.790f},//south-west
     //{6, 7, SPELL_BREATH_SOUTH_TO_NORTH, -65.8444f, -213.809f, -60.2985f},//south
     //{7, 6, SPELL_BREATH_NORTH_TO_SOUTH,  22.8763f, -217.152f, -60.0548f},//north
};

static float afSpawnLocations[2][3]=
{
     {-30.127, -254.463, -89.440},
     {-30.817, -177.106, -89.258}
};

struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
{
     boss_onyxiaAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();}

     uint32 m_uiPhase;

     uint32 m_uiFlameBreathTimer;
     uint32 m_uiCleaveTimer;
     uint32 m_uiTailSweepTimer;
     uint32 m_uiWingBuffetTimer;

     uint32 m_uiMovePoint;
     uint32 m_uiMovementTimer;
     sOnyxMove* m_pPointData;

     uint32 m_uiEngulfingFlamesTimer;
     uint32 m_uiSummonWhelpsTimer;
     uint32 m_uiBellowingRoarTimer;
     uint32 m_uiWhelpTimer;

     uint8 m_uiSummonCount;
     bool m_bIsSummoningWhelps;

     void Reset()
     {
         if (!IsCombatMovement())
             SetCombatMovement(true);

         m_uiPhase = PHASE_START;

         m_uiFlameBreathTimer = urand(10000, 20000);
         m_uiTailSweepTimer = urand(15000, 20000);
         m_uiCleaveTimer = urand(2000, 5000);
         m_uiWingBuffetTimer = urand(10000, 20000);

         m_uiMovePoint = urand(0, 5);
         m_uiMovementTimer = 20000;
         m_pPointData = GetMoveData();

         m_uiEngulfingFlamesTimer = 15000;
         m_uiSummonWhelpsTimer = 45000;
         m_uiBellowingRoarTimer = 30000;
         m_uiWhelpTimer = 1000;

         m_uiSummonCount = 0;
         m_bIsSummoningWhelps = false;
     }

     void Aggro(Unit* pWho)
     {
         DoScriptText(SAY_AGGRO, m_creature);
         m_creature->SetInCombatWithZone();
     }

     void JustSummoned(Creature *pSummoned)
     {
         if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM,0))
             pSummoned->AI()->AttackStart(pTarget);

         ++m_uiSummonCount;
     }

     void KilledUnit(Unit* pVictim)
     {
         DoScriptText(SAY_KILL, m_creature);
     }

     void SpellHit(Unit *pCaster, const SpellEntry* pSpell)
     {
         if (pSpell->Id == SPELL_BREATH_EAST_TO_WEST ||
             pSpell->Id == SPELL_BREATH_WEST_TO_EAST ||
             pSpell->Id == SPELL_BREATH_SE_TO_NW ||
             pSpell->Id == SPELL_BREATH_NW_TO_SE ||
             pSpell->Id == SPELL_BREATH_SW_TO_NE ||
             pSpell->Id == SPELL_BREATH_NE_TO_SW)
         {
             if (m_pPointData)
             {
                 m_creature->GetMap()->CreatureRelocation(m_creature, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ, 0.0f);
                 m_creature->GetMotionMaster()->MovePoint(0, -10.6155, -219.357, -87.7344);
                  
             }
         }
     }

     sOnyxMove* GetMoveData()
     {
         uint32 uiMaxCount = sizeof(aMoveData)/sizeof(sOnyxMove);

         for (uint32 i = 0; i < uiMaxCount; ++i)
         {
             if (aMoveData[i].uiLocId == m_uiMovePoint)
                 return &aMoveData[i];
         }

         return NULL;
     }

     void SetNextRandomPoint()
     {
         uint32 uiMaxCount = sizeof(aMoveData)/sizeof(sOnyxMove);

         int iTemp = rand()%(uiMaxCount-1);

         if (iTemp >= m_uiMovePoint)
             ++iTemp;

         m_uiMovePoint = iTemp;
     }

     void UpdateAI(const uint32 uiDiff)
     {
         if (!UpdateVictim())
             return;

         if (m_uiPhase == PHASE_START || m_uiPhase == PHASE_END)
         {
             if (m_uiFlameBreathTimer < uiDiff)
             {
                 DoCast(m_creature->getVictim(), SPELL_FLAMEBREATH);
                 m_uiFlameBreathTimer = urand(10000, 20000);
             }
             else
                 m_uiFlameBreathTimer -= uiDiff;

             if (m_uiTailSweepTimer < uiDiff)
             {
                 DoCast(m_creature, SPELL_TAILSWEEP);
                 m_uiTailSweepTimer = urand(15000, 20000);
             }
             else
                 m_uiTailSweepTimer -= uiDiff;

             if (m_uiCleaveTimer < uiDiff)
             {
                 DoCast(m_creature->getVictim(), SPELL_CLEAVE);
                 m_uiCleaveTimer = urand(2000, 5000);
             }
             else
                 m_uiCleaveTimer -= uiDiff;

             if (m_uiWingBuffetTimer < uiDiff)
             {
                 DoCast(m_creature->getVictim(), SPELL_WINGBUFFET);
                 m_uiWingBuffetTimer = urand(15000, 30000);
             }
             else
                 m_uiWingBuffetTimer -= uiDiff;

             if (m_uiPhase == PHASE_END)
             {
                 if (m_uiBellowingRoarTimer < uiDiff)
                 {
                     DoCast(m_creature->getVictim(), SPELL_BELLOWINGROAR);
                     m_uiBellowingRoarTimer = 30000;
                 }
                 else
                     m_uiBellowingRoarTimer -= uiDiff;
             }
             else
             {
                 if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 60)
                 {
                     m_uiPhase = PHASE_BREATH;

                     SetCombatMovement(false);

                     m_creature->GetMotionMaster()->Clear(false);
                     m_creature->GetMotionMaster()->MoveIdle();

                     DoScriptText(SAY_PHASE_2_TRANS, m_creature);

                     if (m_pPointData)
                         m_creature->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ);

                     SetNextRandomPoint();
                     return;
                 }
             }

             DoMeleeAttackIfReady();
         }
         else
         {
             if (m_creature->GetHealth()*100 / m_creature->GetMaxHealth() < 40)
             {
                 m_uiPhase = PHASE_END;
                 DoScriptText(SAY_PHASE_3_TRANS, m_creature);

                 SetCombatMovement(true);
                 m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim());

                 return;
             }

             if (m_uiMovementTimer < uiDiff)
             {
                 m_pPointData = GetMoveData();

                 SetNextRandomPoint();

                 m_uiMovementTimer = 25000;

                 if (!m_pPointData)
                     return;

                 if (m_uiMovePoint == m_pPointData->uiLocIdEnd)
                 {
                     if (m_creature->IsNonMeleeSpellCasted(false))
                         m_creature->InterruptNonMeleeSpells(false);

                     DoScriptText(EMOTE_BREATH, m_creature);
                     DoCast(m_creature, m_pPointData->uiSpellId);
                 }
                 else
                 {
                     m_creature->GetMotionMaster()->MovePoint(m_pPointData->uiLocId, m_pPointData->fX, m_pPointData->fY, m_pPointData->fZ);
                 }
             }
             else
                 m_uiMovementTimer -= uiDiff;

             if (m_uiEngulfingFlamesTimer < uiDiff)
             {
                 if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() != POINT_MOTION_TYPE)
                 {
                     if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0))
                         DoCast(pTarget, SPELL_FIREBALL);

                     m_uiEngulfingFlamesTimer = 8000;
                 }
             }
             else
                 m_uiEngulfingFlamesTimer -= uiDiff;           //engulfingflames is supposed to be activated by a fireball but haven't come by

             if (m_bIsSummoningWhelps)
             {
                 if (m_uiSummonCount < MAX_WHELP)
                 {
                     if (m_uiWhelpTimer < uiDiff)
                     {
                         m_creature->SummonCreature(NPC_WHELP, afSpawnLocations[0][0], afSpawnLocations[0][1], afSpawnLocations[0][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
                         m_creature->SummonCreature(NPC_WHELP, afSpawnLocations[1][0], afSpawnLocations[1][1], afSpawnLocations[1][2], 0.0f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 30000);
                         m_uiWhelpTimer = 1000;
                     }
                     else
                         m_uiWhelpTimer -= uiDiff;
                 }
                 else
                 {
                     m_bIsSummoningWhelps = false;
                     m_uiSummonCount = 0;
                     m_uiSummonWhelpsTimer = 30000;
                 }
             }
             else
             {
                 if (m_uiSummonWhelpsTimer < uiDiff)
                     m_bIsSummoningWhelps = true;
                 else
                     m_uiSummonWhelpsTimer -= uiDiff;
             }
         }
     }
};

CreatureAI* GetAI_boss_onyxiaAI(Creature* pCreature)
{
     return new boss_onyxiaAI (pCreature);
}

void AddSC_boss_onyxia()
{
     Script *newscript;
     newscript = new Script;
     newscript->Name = "boss_onyxia";
     newscript->GetAI = &GetAI_boss_onyxiaAI;
     newscript->RegisterSelf();
}

Добавлено (05.12.2010, 19:35)
---------------------------------------------
Также ко второму варианту прилагается запрос в базу мира:

Code
-- SPELL_BREATH_EAST_TO_WEST
DELETE FROM spell_target_position WHERE id IN (18576, 18578, 18579, 18580, 18581, 18582, 18583);
INSERT INTO spell_target_position VALUES (18576, 249, -37.743851, -243.667923, -88.217651, 1.416);
INSERT INTO spell_target_position VALUES (18578, 249, -35.805332, -232.028900, -87.749153, 1.416);
INSERT INTO spell_target_position VALUES (18579, 249, -34.045738, -224.714661, -85.529465, 1.416);
INSERT INTO spell_target_position VALUES (18580, 249, -32.081570, -214.916962, -88.327438, 1.416);
INSERT INTO spell_target_position VALUES (18581, 249, -36.611721, -202.684677, -85.653786, 1.416);
INSERT INTO spell_target_position VALUES (18582, 249, -37.067261, -195.758652, -87.745834, 1.416);
INSERT INTO spell_target_position VALUES (18583, 249, -37.728523, -188.616806, -88.074898, 1.416);
-- SPELL_BREATH_WEST_TO_EAST
DELETE FROM spell_target_position WHERE id IN (18609, 18611, 18612, 18613, 18614, 18615, 18616);
INSERT INTO spell_target_position VALUES (18609, 249, -37.728523, -188.616806, -88.074898, 4.526);
INSERT INTO spell_target_position VALUES (18611, 249, -37.067261, -195.758652, -87.745834, 4.526);
INSERT INTO spell_target_position VALUES (18612, 249, -36.611721, -202.684677, -85.653786, 4.526);
INSERT INTO spell_target_position VALUES (18613, 249, -32.081570, -214.916962, -88.327438, 4.526);
INSERT INTO spell_target_position VALUES (18614, 249, -34.045738, -224.714661, -85.529465, 4.526);
INSERT INTO spell_target_position VALUES (18615, 249, -35.805332, -232.028900, -87.749153, 4.526);
INSERT INTO spell_target_position VALUES (18616, 249, -37.743851, -243.667923, -88.217651, 4.526);
-- SPELL_BREATH_NW_TO_SE
DELETE FROM spell_target_position WHERE id IN (18584, 18585, 18586, 18587, 18588, 18589, 18590, 18591, 18592, 18593, 18594, 18595);
INSERT INTO spell_target_position VALUES (18584, 249, 6.016711, -181.305771, -85.654648, 3.776);
INSERT INTO spell_target_position VALUES (18585, 249,
 
  • Сторінка 1 з 1
  • 1
Пошук:

Новые сообщения в темах
Сдам в аренду сервер и хостинг · (Хост Предложения)
Автор: redlaine
Последнее сообщение в 23:53
хаха :D · (Приколы)
Автор: [N1ke]Medved
Последнее сообщение в 18:40
Autobattle - новый боевой бот ... · (Боты для WoW)
Автор: terrikon
Последнее сообщение в 18:39
PvE руководство для Чернокнижн... · (Чернокнижник)
Автор: Darkensand
Последнее сообщение в 18:38
Пустой свиток (Часть 11) · (Истории WoW)
Автор: R_a_Z_o_R
Последнее сообщение в 18:37
Друиды в Катаклизме: Официальн... · (Друид)
Автор: Darkensand
Последнее сообщение в 18:37
[Баг 3.3.5] Фарм ледяных бадже... · (Читы для WoW)
Автор: Darkensand
Последнее сообщение в 18:35
FarmBot (Бот для фарма руды и ... · (Боты для WoW)
Автор: homma
Последнее сообщение в 18:34
Почему мы сражаемся: ролевая и... · (Воин)
Автор: Darkensand
Последнее сообщение в 18:34
Книги по Wold of Warcraft · (Истории WoW)
Автор: R_a_Z_o_R
Последнее сообщение в 18:33
Маг огня в Cataclysm · (Маг)
Автор: Darkensand
Последнее сообщение в 18:33
Как начать играть в World of W... · (Полезно знать)
Автор: Belkmondesh
Последнее сообщение в 18:32
Характеризация профессий · (Профессии)
Автор: Darkensand
Последнее сообщение в 18:31
Что значит для арканов бета те... · (Маг)
Автор: Darkensand
Последнее сообщение в 18:31

Контакты Контакты Copyright WoW-Info — World of Warcraft портал © 2025 | Условия и правила использования ресурса | Реклама / Услуги
WoW-Info портал.World of Warcraft портал — готовые сервера, сайты, картинки, аддоны, патчи, читы, баги, mangos, ArcEmu, TrinityCore, Warcraft 3, новости, Cataclysm...
Яндекс.Метрика Хостинг від uCoz