*Script for the boss Drakkari Colossus and Drakkari Elemental, by manuel
*Use Kill instead of DealDamage, should fix a crash in boss_svala, thanks Gyullo *Update Naxxramas Worshippers script, by Destalker --HG-- branch : trunk
This commit is contained in:
@@ -537,6 +537,8 @@ UPDATE `creature_template` SET `ScriptName`='mob_slad_ran_constrictor' WHERE `en
|
||||
UPDATE `creature_template` SET `ScriptName`='boss_gal_darah' WHERE `entry`=29306;
|
||||
/* Drakkari Colossus */
|
||||
UPDATE `creature_template` SET `ScriptName`='boss_drakkari_colossus' WHERE `entry`=29307;
|
||||
UPDATE `creature_template` SET `ScriptName`='boss_drakkari_elemental' WHERE `entry`=29573;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_living_mojo' WHERE `entry`=29830;
|
||||
/* Eck the Ferocious */
|
||||
UPDATE `creature_template` SET `ScriptName`='boss_eck' WHERE `entry`=29932;
|
||||
|
||||
@@ -1379,12 +1381,12 @@ INSERT INTO `creature_ai_scripts` VALUES ('2918103', '29181', '0', '0', '100', '
|
||||
INSERT INTO `creature_ai_scripts` VALUES ('2918104', '29181', '0', '0', '100', '3', '10000', '20000', '10000', '20000', '11', '21807', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Rayne - SPELL_WRATH');
|
||||
|
||||
-- spell 30298 tries to start event script 10675 but it doesn't exist. create it & make it spawn Geezle
|
||||
delete from event_scripts where id = 10675;
|
||||
insert into `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `x`, `y`, `z`, `o`) values
|
||||
DELETE FROM `event_scripts` where `id`=10675;
|
||||
INSERT INTO `event_scripts` (`id`, `delay`, `command`, `datalong`, `datalong2`, `x`, `y`, `z`, `o`) values
|
||||
(10675, 0, 10, 17318, 90000, '-5139.79','-11248.27','5.23', '6.27609');
|
||||
|
||||
-- geezle should not spawn by default
|
||||
update creature set spawnMask=0 where guid = 85587;
|
||||
UPDATE `creature` SET `spawnMask`=0 WHERE `id`=17318;
|
||||
|
||||
-- Quest - The Warsong Farms
|
||||
DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (25669,25671,25672);
|
||||
@@ -1392,3 +1394,8 @@ INSERT INTO `creature_ai_scripts`
|
||||
(`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`)
|
||||
VALUES
|
||||
(2566901, 25669, 10, 0, 100, 3, 1, 20, 2000, 2000, 33, 25669, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scout Warsong Granary - Killed Moster at LOS'),(2567101, 25671, 10, 0, 100, 3, 1, 20, 2000, 2000, 33, 25671, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scout Torp''s Farm - Killed Moster at LOS'),(2567201, 25672, 10, 0, 100, 3, 1, 20, 2000, 2000, 33, 25672, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Scout Warsong Slaughterhouse - Killed Moster at LOS');
|
||||
|
||||
-- WOTLK Naxxramas Worshipper update
|
||||
DELETE FROM `creature_ai_scripts` WHERE `id` = 1650612;
|
||||
INSERT INTO `creature_ai_scripts` (`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`) VALUES
|
||||
(1650612, 16506, 6, 0, 100, 0, 0, 0, 0, 0, 11, 28732, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Naxxramas Worshipper - Widow Embrace');
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
|
||||
UPDATE `creature_template` SET `ScriptName`='boss_drakkari_colossus' WHERE `entry`=29307;
|
||||
UPDATE `creature_template` SET `ScriptName`='boss_drakkari_elemental' WHERE `entry`=29573;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_living_mojo' WHERE `entry`=29830;
|
||||
|
||||
DELETE FROM `creature_ai_scripts` WHERE `id` = 1650612;
|
||||
INSERT INTO `creature_ai_scripts` (`id`, `creature_id`, `event_type`, `event_inverse_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action1_type`, `action1_param1`, `action1_param2`, `action1_param3`, `action2_type`, `action2_param1`, `action2_param2`, `action2_param3`, `action3_type`, `action3_param1`, `action3_param2`, `action3_param3`, `comment`) VALUES
|
||||
(1650612, 16506, 6, 0, 100, 0, 0, 0, 0, 0, 11, 28732, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Naxxramas Worshipper - Widow Embrace');
|
||||
@@ -1,21 +1,32 @@
|
||||
/* Script Data Start
|
||||
SDName: Boss Drakkari Colossus
|
||||
SDAuthor: LordVanMartin
|
||||
SD%Complete:
|
||||
SDComment:
|
||||
SDAuthor: Manuel
|
||||
SD%Complete: 95 %
|
||||
SDComment: The event with the Living Mojos is not implemented, just is done that when one of the mojos around the boss take damage will make that the boss enter in combat!
|
||||
SDCategory:
|
||||
Script Data End */
|
||||
|
||||
/*** SQL START ***
|
||||
update creature_template set scriptname = '' where entry = '';
|
||||
*** SQL END ***/
|
||||
#include "precompiled.h"
|
||||
#include "def_gundrak.h"
|
||||
|
||||
//Spells
|
||||
#define SPELL_EMERGE 54850 //to phase2, Colossus unatackable, Elemental emerges
|
||||
#define SPELL_EMERGE_2 54851
|
||||
#define SPELL_MIGHTY_BLOW 54719
|
||||
enum Spells
|
||||
{
|
||||
SPELL_EMERGE = 54850,
|
||||
SPELL_EMERGE_2 = 54851,
|
||||
|
||||
SPELL_MIGHTY_BLOW = 54719,
|
||||
|
||||
SPELL_MERGE = 54878,
|
||||
SPELL_SURGE = 54801,
|
||||
|
||||
SPELL_FREEZE_ANIM = 16245
|
||||
};
|
||||
|
||||
enum Entrys
|
||||
{
|
||||
DRAKKARI_COLOSSUS = 29307,
|
||||
DRAKKARI_ELEMENTAL = 29573
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL boss_drakkari_colossusAI : public ScriptedAI
|
||||
{
|
||||
@@ -23,35 +34,216 @@ struct TRINITY_DLL_DECL boss_drakkari_colossusAI : public ScriptedAI
|
||||
{
|
||||
pInstance = c->GetInstanceData();
|
||||
}
|
||||
|
||||
|
||||
ScriptedInstance* pInstance;
|
||||
|
||||
bool Summoned;
|
||||
|
||||
uint32 Summon_Timer;
|
||||
uint32 MightyBlowTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_DRAKKARI_COLOSSUS_EVENT, NOT_STARTED);
|
||||
|
||||
|
||||
m_creature->clearUnitState(UNIT_STAT_STUNNED);
|
||||
m_creature->SetReactState(REACT_PASSIVE);
|
||||
|
||||
Summoned = false;
|
||||
|
||||
MightyBlowTimer = 10000;
|
||||
}
|
||||
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_DRAKKARI_COLOSSUS_EVENT, IN_PROGRESS);
|
||||
}
|
||||
|
||||
|
||||
void PrepareToSummonElemental()
|
||||
{
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
m_creature->addUnitState(UNIT_STAT_STUNNED);
|
||||
m_creature->CastSpell(m_creature,SPELL_EMERGE,false);
|
||||
}
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if (!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
|
||||
if(Summoned == false && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 50 && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() > 6)
|
||||
{
|
||||
PrepareToSummonElemental();
|
||||
m_creature->CastSpell(m_creature->getVictim(), SPELL_EMERGE_2, true);
|
||||
Summoned = true;
|
||||
}
|
||||
|
||||
if(Summoned == true && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 5)
|
||||
{
|
||||
m_creature->RemoveAllAuras();
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
m_creature->addUnitState(UNIT_STAT_STUNNED);
|
||||
m_creature->RemoveAllAuras();
|
||||
|
||||
Summoned = false;
|
||||
}
|
||||
|
||||
if (MightyBlowTimer < diff)
|
||||
{
|
||||
if(!m_creature->hasUnitState(UNIT_STAT_STUNNED))
|
||||
{
|
||||
m_creature->CastSpell(m_creature->getVictim(),SPELL_MIGHTY_BLOW,true);
|
||||
}
|
||||
|
||||
MightyBlowTimer = 10000;
|
||||
}else MightyBlowTimer -= diff;
|
||||
|
||||
if(!m_creature->hasUnitState(UNIT_STAT_STUNNED))
|
||||
{
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
if (pInstance)
|
||||
pInstance->SetData(DATA_DRAKKARI_COLOSSUS_EVENT, DONE);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summoned)
|
||||
{
|
||||
summoned->AI()->AttackStart(m_creature->getVictim());
|
||||
}
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL boss_drakkari_elementalAI : public ScriptedAI
|
||||
{
|
||||
boss_drakkari_elementalAI(Creature *c) : ScriptedAI(c)
|
||||
{
|
||||
Colossus = c->FindNearestCreature(DRAKKARI_COLOSSUS, 30.0f, true);
|
||||
}
|
||||
|
||||
Creature* Colossus;
|
||||
|
||||
uint32 SurgeTimer;
|
||||
|
||||
bool PreparationDone;
|
||||
bool GoToColossus;
|
||||
bool Checked;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
m_creature->clearUnitState(UNIT_STAT_STUNNED);
|
||||
|
||||
SurgeTimer = 7000;
|
||||
|
||||
GoToColossus = false;
|
||||
PreparationDone = false;
|
||||
Checked = false;
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
if(GoToColossus == false && m_creature->GetHealth()*100 / m_creature->GetMaxHealth() <= 50)
|
||||
{
|
||||
m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
m_creature->CastSpell(Colossus ,SPELL_MERGE,true);
|
||||
|
||||
GoToColossus = true;
|
||||
PreparationDone = true;
|
||||
}
|
||||
|
||||
if(GoToColossus == true && PreparationDone == true)
|
||||
{
|
||||
m_creature->addUnitState(UNIT_STAT_STUNNED);
|
||||
m_creature->SetVisibility(VISIBILITY_OFF);
|
||||
m_creature->CastSpell(Colossus ,SPELL_MERGE,true);
|
||||
|
||||
PreparationDone = false;
|
||||
|
||||
Colossus->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
Colossus->clearUnitState(UNIT_STAT_STUNNED);
|
||||
}
|
||||
|
||||
if (SurgeTimer < diff)
|
||||
{
|
||||
if(m_creature->GetVisibility() == VISIBILITY_ON)
|
||||
{
|
||||
Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0);
|
||||
|
||||
m_creature->CastSpell(target,SPELL_SURGE,false);
|
||||
}
|
||||
|
||||
SurgeTimer = 7000;
|
||||
}else SurgeTimer -= diff;
|
||||
|
||||
if(Checked == false && Colossus->GetHealth()*100 / Colossus->GetMaxHealth() <= 5)
|
||||
{
|
||||
m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
|
||||
m_creature->clearUnitState(UNIT_STAT_STUNNED);
|
||||
m_creature->SetVisibility(VISIBILITY_ON);
|
||||
Checked = true;
|
||||
}
|
||||
|
||||
//prevent do melee if is invisible
|
||||
if(m_creature->GetVisibility() == VISIBILITY_ON)
|
||||
{
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer)
|
||||
{
|
||||
Colossus->Kill(Colossus);
|
||||
}
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL npc_living_mojoAI : public ScriptedAI
|
||||
{
|
||||
npc_living_mojoAI(Creature *c) : ScriptedAI(c) {}
|
||||
|
||||
void Reset()
|
||||
{
|
||||
if(m_creature->IsInRange3d(1672.959,743.487,143.337,0.0f,17.0f))
|
||||
{
|
||||
m_creature->SetReactState(REACT_PASSIVE);
|
||||
|
||||
}else
|
||||
|
||||
m_creature->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
|
||||
void DamageTaken(Unit* pDone_by, uint32& uiDamage)
|
||||
{
|
||||
if(m_creature->HasReactState(REACT_PASSIVE))
|
||||
{
|
||||
if(Creature* Colossus = m_creature->FindNearestCreature(DRAKKARI_COLOSSUS, 30.0f, true))
|
||||
{
|
||||
Colossus->RemoveAura(SPELL_FREEZE_ANIM);
|
||||
Colossus->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE);
|
||||
Colossus->SetReactState(REACT_AGGRESSIVE);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
//Return since we have no target
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_boss_drakkari_colossus(Creature* pCreature)
|
||||
@@ -59,6 +251,16 @@ CreatureAI* GetAI_boss_drakkari_colossus(Creature* pCreature)
|
||||
return new boss_drakkari_colossusAI (pCreature);
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_boss_drakkari_elemental(Creature* pCreature)
|
||||
{
|
||||
return new boss_drakkari_elementalAI (pCreature);
|
||||
}
|
||||
|
||||
CreatureAI* GetAI_npc_living_mojo(Creature* pCreature)
|
||||
{
|
||||
return new npc_living_mojoAI (pCreature);
|
||||
}
|
||||
|
||||
void AddSC_boss_drakkari_colossus()
|
||||
{
|
||||
Script *newscript;
|
||||
@@ -67,4 +269,14 @@ void AddSC_boss_drakkari_colossus()
|
||||
newscript->Name="boss_drakkari_colossus";
|
||||
newscript->GetAI = &GetAI_boss_drakkari_colossus;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="boss_drakkari_elemental";
|
||||
newscript->GetAI = &GetAI_boss_drakkari_elemental;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_living_mojo";
|
||||
newscript->GetAI = &GetAI_npc_living_mojo;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
@@ -312,8 +312,8 @@ struct TRINITY_DLL_DECL boss_svala_sorrowgraveAI : public ScriptedAI
|
||||
}
|
||||
}
|
||||
if (bSacrificed && pSacrificeTarget && pSacrificeTarget->isAlive())
|
||||
m_creature->DealDamage(pSacrificeTarget, pSacrificeTarget->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
|
||||
|
||||
m_creature->Kill(pSacrificeTarget, false);
|
||||
|
||||
//go down
|
||||
Phase = NORMAL;
|
||||
pSacrificeTarget = NULL;
|
||||
|
||||
Reference in New Issue
Block a user