void WaypointReached(uint32 i) { Player* player = GetPlayerForEscort(); if (!player) return; switch(i) { case 1: DoScriptText(SAY_START, m_creature, player);break; case 13: DoScriptText(SAY_LAST, m_creature, player); player->GroupEventHappens(QUEST_ESCORTING, m_creature);break; case 14: DoScriptText(SAY_THANKS, m_creature, player);break; case 15: { Unit* Rane = FindCreature(NPC_RANE, 20, m_creature); if(Rane) DoScriptText(SAY_RANE, Rane); break;} case 16: DoScriptText(SAY_ANSWER, m_creature);break; case 17: DoScriptText(SAY_MOVE_QUINN, m_creature); break; case 24: DoScriptText(SAY_GREETINGS, m_creature);break; case 25: { Unit* Quinn = FindCreature(NPC_QUINN, 20, m_creature); if(Quinn) DoScriptText(SAY_QUINN, Quinn); break;} case 26: DoScriptText(SAY_ON_BYE, m_creature, NULL);break; } }
void EnterCombat(Unit *who) { DoScriptText(YELL_SCOUT_AGGRO, me); Unit *drums = FindCreature(22515, 50, me); if(drums) me->GetMotionMaster()->MovePoint(1, drums->GetPositionX(), drums->GetPositionY(), drums->GetPositionZ()); }
void JustDied(Unit*) { Unit* moira=FindCreature(8929,300,me); if (moira && moira->isAlive()) { moira->setFaction(35); moira->ToCreature()->AI()->_EnterEvadeMode(); } }
void EnterCombat(Unit* who) { if(Creature *Kelidan = (Creature *)FindCreature(ENTRY_KELIDAN, 100, m_creature)) ((boss_kelidan_the_breakerAI*)Kelidan->AI())->ChannelerEngaged(who); if (m_creature->IsNonMeleeSpellCasted(false)) m_creature->InterruptNonMeleeSpells(true); DoStartMovement(who); }
void WaypointReached(uint32 i) { Player* player = GetPlayerForEscort(); if (!player) return; switch(i) { case 0: { m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); GameObject* Cage = FindGameObject(GO_CAGE, 20, m_creature); if(Cage) Cage->SetGoState(GO_STATE_ACTIVE); DoScriptText(SAY_START, m_creature, player); break; } case 5: DoScriptText(SAY_PROGRESS1, m_creature, player); case 11: DoScriptText(SAY_PROGRESS2, m_creature, player); m_creature->SetOrientation(4.762841); break; case 18: { DoScriptText(SAY_PROGRESS3, m_creature, player); Creature* Summ1 = m_creature->SummonCreature(16342, 7627.083984, -7532.538086, 152.128616, 1.082733, TEMPSUMMON_DEAD_DESPAWN, 0); Creature* Summ2 = m_creature->SummonCreature(16343, 7620.432129, -7532.550293, 152.454865, 0.827478, TEMPSUMMON_DEAD_DESPAWN, 0); if(Summ1 && Summ2) { Summ1->Attack(m_creature, true); Summ2->Attack(player, true); } m_creature->AI()->AttackStart(Summ1); break; } case 19: m_creature->SetWalk(false); break; case 25: m_creature->SetWalk(true); break; case 30: player->GroupEventHappens(QUEST_ESCAPE_FROM_THE_CATACOMBS,m_creature); break; case 32: m_creature->SetOrientation(2.978281); DoScriptText(SAY_END1, m_creature, player); break; case 33: m_creature->SetOrientation(5.858011); DoScriptText(SAY_END2, m_creature, player); Unit* CaptainHelios = FindCreature(NPC_CAPTAIN_HELIOS, 50, m_creature); if(CaptainHelios) DoScriptText(SAY_CAPTAIN_ANSWER, CaptainHelios, player); break; } }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) return; if (Recharge_Timer < diff) { if(Unit* target = FindCreature(20040, 100, m_creature)) { DoCast(target,SPELL_RECHARGE); Recharge_Timer = 30000+rand()%10000; } else if(Unit* target = FindCreature(20041, 100, m_creature)) { DoCast(target,SPELL_RECHARGE); Recharge_Timer = 30000+rand()%10000; } } else Recharge_Timer -= diff; if(Sawblade_Timer < diff) { if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 30, true, 0)) DoCast(target,SPELL_SAWBLADE); Saw_count++; if(Saw_count < 3) Sawblade_Timer = 2000; else { Saw_count = 0; Sawblade_Timer = 6000+rand()%4000; } } else Sawblade_Timer -= diff; DoMeleeAttackIfReady(); }
void WaypointReached(uint32 i) { if (i == 13) { DoScriptText(BELNISTRASZ_SAY_IDOL,m_creature); Unit* bunny = FindCreature(OVEN_TARGET,50,m_creature); if (bunny) DoCast(bunny,SPELL_BELNISTRASZ_VISUAL); onplace = true; wavetimer = 10000; SetCanAttack(false); } }
void UpdateAI(const uint32 diff) { if(!UpdateVictim()) return; if (!elemental && elemental_timer <= diff) { me->CastSpell(me, 39027, false); elemental = true; } else elemental_timer -= diff; if (!totem && totem_timer <= diff) { me->CastSpell(me->getVictim(), 38624, false); totem = true; } else totem_timer -= diff; if (check_timer <= diff) { if (!FindCreature(22236, 50, me) && FindCreature(22238, 50, me)) if (Creature *Ele = (Creature *)FindCreature(22238, 50, me)) Ele->DisappearAndDie(); if (FindCreature(22236, 50, me) && FindCreature(22238, 50, me)) if (Creature *Totem = (Creature *)FindCreature(22236, 50, me)) if (Totem->isDead()) if (Creature *Ele = (Creature *)FindCreature(22238, 50, me)) Ele->DisappearAndDie(); if (Creature *Ele = (Creature *)FindCreature(22238, 50, me)) { Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0, 30.0f, true); Ele->Attack(target, false); } check_timer = 1000; } else check_timer -= diff; DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if (!UpdateVictim()) { if(check_Timer < diff) { if (!m_creature->IsNonMeleeSpellCasted(false)) if(Creature *Kelidan = (Creature *)FindCreature(ENTRY_KELIDAN, 100, m_creature)) { uint64 channeler = ((boss_kelidan_the_breakerAI*)Kelidan->AI())->GetChanneled(m_creature); if(Unit *channeled = Unit::GetUnit(*m_creature, channeler)) DoCast(channeled,SPELL_CHANNELING); } check_Timer = 5000; } else check_Timer -= diff; return; } if (MarkOfShadow_Timer < diff) { if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) AddSpellToCast(target,SPELL_MARK_OF_SHADOW); MarkOfShadow_Timer = 15000+rand()%5000; } else MarkOfShadow_Timer -=diff; if (ShadowBolt_Timer < diff) { AddSpellToCast(me->getVictim(), SPELL_SHADOW_BOLT); ShadowBolt_Timer = urand(5000, 6000); } else ShadowBolt_Timer -=diff; CastNextSpellIfAnyAndReady(); DoMeleeAttackIfReady(); }
void UpdateAI(const uint32 diff) { if(!UpdateVictim()) return; if(Fragmentation_Bomb_Timer < diff ) { Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 30, true, 0); if(target) DoCast(target,SPELL_FEAGMENTATIONBOMB); Fragmentation_Bomb_Timer = 5000+rand()%3000; } else Fragmentation_Bomb_Timer -= diff; if(Golem_Repair_Timer < diff) { if(Unit* target = FindCreature(20040, 25, m_creature)) { DoCast(target,SPELL_RECHARGE); Golem_Repair_Timer = 30000+rand()%10000; } else if(Unit* target = FindCreature(20041, 25, m_creature)) { DoCast(target,SPELL_RECHARGE); Golem_Repair_Timer = 30000+rand()%10000; } } else Golem_Repair_Timer -= diff; if(Power_Up_Timer < diff) { if(Unit* target = FindCreature(20040, 25, m_creature)) { DoCast(target,SPELL_POWERUP); Power_Up_Timer = 20000+rand()%5000; } else if(Unit* target = FindCreature(20041, 25, m_creature)) { DoCast(target,SPELL_POWERUP); Power_Up_Timer = 20000+rand()%5000; } } else Power_Up_Timer -= diff; if(Shell_Shock_Timer < diff) { Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0, 30, true, 0); if(target) DoCast(target,SPELL_SHELLSHOCK); Shell_Shock_Timer = 8000+rand()%8000; } else Shell_Shock_Timer -= diff; DoMeleeAttackIfReady(); }
void JustDied(Unit* Killer) { if(Creature *Kelidan = (Creature *)FindCreature(ENTRY_KELIDAN, 100, m_creature)) ((boss_kelidan_the_breakerAI*)Kelidan->AI())->ChannelerDied(Killer); }
void HandleOffCombatEffects() { if(Unit* sentinel = FindCreature(NPC_BROKEN_SENTINEL, 10.0f, me)) DoCast(sentinel, SPELL_FEL_ENERGY_COSMETIC); }