Skip to content

Commit

Permalink
New pit of saron with Event Intro and Outro
Browse files Browse the repository at this point in the history
  • Loading branch information
Eze authored and Eze committed Apr 4, 2012
1 parent 0cf30e1 commit 6544fe3
Show file tree
Hide file tree
Showing 8 changed files with 930 additions and 248 deletions.
85 changes: 85 additions & 0 deletions sql/avalon/93 - Pit_of_saron_intro2.sql
@@ -0,0 +1,85 @@
/*New Intro and Outro*/

update gameobject_template set ScriptName = '' where entry = 201969;
update creature_template set ScriptName = '' where entry IN (36765, 36771);

UPDATE creature_template SET scriptname = "pos_intro" WHERE entry IN (36990, 36993);

INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES
(5578,'at_ymirjar_flamebearer_pos');

DELETE FROM `areatrigger_scripts` where `entry`= 5579;
INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES
(5579,'at_fallen_warrior_pos');

DELETE FROM `areatrigger_scripts` where `entry`= 5580;
INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES
(5580,'at_ice_cicle_pos');

DELETE FROM `areatrigger_scripts` where `entry`= 5573;
INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES
(5573,'at_pos_intro');

DELETE FROM `areatrigger_scripts` where `entry`= 5598;
INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES
(5598,'at_slave_rescued_pos');

DELETE FROM `areatrigger_scripts` where `entry`= 5599;
INSERT INTO `areatrigger_scripts` (`entry`,`ScriptName`) VALUES
(5599,'at_geist_ambusher_pos');

UPDATE creature_template SET Scriptname = 'pos_outro' WHERE entry IN (38189, 38188)

UPDATE creature_template set Scriptname = '' where entry = 36886;

SET @ENTRY1=36840;
SET @ENTRY2=36892;
SET @ENTRY3=36893;
SET @ENTRY4=36841;
SET @ENTRY5=36842;
SET @ENTRY6=37584;
SET @ENTRY7=37588;
SET @ENTRY8=37587;
SET @ENTRY9=37496;
SET @ENTRY10=37497;
SET @ENTRY11=37729;
SET @ENTRY12=37728;
SET @ENTRY13=36877;
DELETE FROM creature WHERE id IN (@ENTRY1, @ENTRY2, @ENTRY3, @ENTRY4, @ENTRY5, @ENTRY6, @ENTRY7, @ENTRY8, @ENTRY9, @ENTRY10, @ENTRY11, @ENTRY12, @ENTRY13);

/*
SET @GUID1=201888;
SET @GUID2=202281;
SET @GUID3=201965;
DELETE FROM creature WHERE guid IN (@GUID1, @GUID2, @GUID3);
SET @GUID1=202141;
SET @GUID2=201909;
SET @GUID3=201840;
SET @GUID4=202222;
SET @GUID5=124338;
SET @GUID6=202018;
SET @GUID7=202022;
SET @GUID8=202050;
SET @GUID9=202097;
DELETE FROM creature WHERE guid IN (@GUID1, @GUID2, @GUID3, @GUID4, @GUID5, @GUID6, @GUID7, @GUID8, @GUID9);
DELETE FROM creature_addon where guid IN(@GUID5);
*/


DELETE FROM script_texts WHERE entry IN(-1658022, -1658023);
INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES
(-1658022,'%s lance un rocher saronite massive sur vous !',0,5,0,0,'garfrost EMOTE_THROW_SARONITE'), -- TODO emote only displayed to target
(-1658023,'%s jette Deep Freeze sur $N.',0,3,0,0,'garfrost EMOTE_DEEP_FREEZE');

DELETE FROM `script_texts` WHERE entry = -1658071;
INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES
(36888,-1658071,'Par Ici ! Nous sommes sur le point de monter à l\'assaut de l\'antre du Seigneur du Fléau Tyrannus',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'SAY_RESCOUD_HORDE_ALLIANCE');

update creature_template set unit_flags = 32832, faction_A = 21, faction_H = 21 where entryIN(36830, 36892);

UPDATE gameobject_template set flags = 1, faction = 1375 WHERE entry = 201848;

UPDATE creature_template SET scriptname = '' WHERE entry IN (36794);

UPDATE creature_template SET MovementType = 2 where entry IN (36788, 367880);
Expand Up @@ -146,7 +146,4 @@ replace into `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid
replace into `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) values('125738','36771','658','3','64','30385','0','586.727','6.61111','512.674','3.35103','7200','0','0','63000','3994','0','0','0','0');
replace into `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) values('125698','36771','658','3','64','30384','0','548.403','89.5608','525.462','2.75762','7200','0','0','63000','3994','0','0','0','0');
replace into `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) values('125711','36771','658','3','64','30384','0','754.168','-95.066','512.83','0.069813','7200','0','0','63000','3994','0','0','0','0');
replace into `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) values('118210','36771','658','3','64','30385','0','647.373','-112.151','513.411','2.70526','7200','0','0','63000','3994','0','0','0','0');

update gameobject_template set ScriptName = 'ball_and_chain' where entry = 201969;
update creature_template set ScriptName = 'npc_slave_p' where entry IN (36765, 36771);
replace into `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) values('118210','36771','658','3','64','30385','0','647.373','-112.151','513.411','2.70526','7200','0','0','63000','3994','0','0','0','0');
Expand Up @@ -26,6 +26,9 @@ enum Yells
SAY_DEATH = -1658004,
SAY_PHASE2 = -1658005,
SAY_PHASE3 = -1658006,

EMOTE_THROW_SARONITE = -1658022,
EMOTE_DEEP_FREEZE = -1658023,

SAY_TYRANNUS_DEATH = -1658007,
};
Expand Down Expand Up @@ -199,7 +202,10 @@ class boss_garfrost : public CreatureScript
{
case EVENT_THROW_SARONITE:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
DoScriptText(EMOTE_THROW_SARONITE, me, target);
DoCast(target, SPELL_THROW_SARONITE);
}
events.ScheduleEvent(EVENT_THROW_SARONITE, urand(12500, 20000));
break;
case EVENT_CHILLING_WAVE:
Expand All @@ -208,7 +214,10 @@ class boss_garfrost : public CreatureScript
break;
case EVENT_DEEP_FREEZE:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0))
{
DoScriptText(EMOTE_DEEP_FREEZE, me, target);
DoCast(target, SPELL_DEEP_FREEZE);
}
events.ScheduleEvent(EVENT_DEEP_FREEZE, 35000, 0, PHASE_THREE);
break;
case EVENT_JUMP:
Expand Down
Expand Up @@ -347,7 +347,7 @@ class boss_krick : public CreatureScript
else
tyrannusPtr = me->SummonCreature(NPC_TYRANNUS_EVENTS, outroPos[1], TEMPSUMMON_MANUAL_DESPAWN);

tyrannusPtr->SetFlying(true);
tyrannusPtr->SetCanFly(true);
me->GetMotionMaster()->MovePoint(POINT_KRICK_INTRO, outroPos[0].GetPositionX(), outroPos[0].GetPositionY(), outroPos[0].GetPositionZ());
tyrannusPtr->SetFacingToObject(me);
}
Expand All @@ -368,7 +368,10 @@ class boss_krick : public CreatureScript
{
if (_phase != PHASE_OUTRO)
return;


if(_instanceScript->GetData(DATA_TYRANNUS_START) != DONE)
_instanceScript->SetData(DATA_TYRANNUS_START, DONE);

_events.Update(diff);

while (uint32 eventId = _events.ExecuteEvent())
Expand Down Expand Up @@ -439,6 +442,7 @@ class boss_krick : public CreatureScript
_events.ScheduleEvent(EVENT_OUTRO_8, 5000);
break;
case EVENT_OUTRO_8:
//! HACK: Creature's can't have MOVEMENTFLAG_FLYING
me->AddUnitMovementFlag(MOVEMENTFLAG_FLYING);
me->GetMotionMaster()->MovePoint(0, outroPos[5]);
DoCast(me, SPELL_STRANGULATING);
Expand All @@ -453,8 +457,9 @@ class boss_krick : public CreatureScript
_events.ScheduleEvent(EVENT_OUTRO_10, 1000);
break;
case EVENT_OUTRO_10:
//! HACK: Creature's can't have MOVEMENTFLAG_FLYING
me->RemoveUnitMovementFlag(MOVEMENTFLAG_FLYING);
me->AddUnitMovementFlag(MOVEMENTFLAG_FALLING);
me->AddUnitMovementFlag(MOVEMENTFLAG_FALLING_FAR);
me->GetMotionMaster()->MovePoint(0, outroPos[6]);
_events.ScheduleEvent(EVENT_OUTRO_11, 2000);
break;
Expand All @@ -473,9 +478,17 @@ class boss_krick : public CreatureScript
if (Creature* jainaOrSylvanas = ObjectAccessor::GetCreature(*me, _outroNpcGUID))
{
if (_instanceScript->GetData(DATA_TEAM_IN_INSTANCE) == ALLIANCE)
{
DoScriptText(SAY_JAYNA_OUTRO_10, jainaOrSylvanas);
jainaOrSylvanas->SetSpeed(MOVE_WALK, 0.5f, true);
jainaOrSylvanas->GetMotionMaster()->MovePoint(0, 847.737610f, -6.079165f, 509.911835f);
}
else
{
DoScriptText(SAY_SYLVANAS_OUTRO_10, jainaOrSylvanas);
jainaOrSylvanas->SetSpeed(MOVE_WALK, 0.5f, true);
jainaOrSylvanas->GetMotionMaster()->MovePoint(0, 847.737610f, -6.079165f, 509.911835f);
}
}
// End of OUTRO. for now...
_events.ScheduleEvent(EVENT_OUTRO_END, 3000);
Expand Down
Expand Up @@ -99,6 +99,33 @@ enum Actions

#define GUID_HOARFROST 1

static const Position MoveLocations1[9] =
{
{1064.217896f, 118.629662f, 628.156311f, 0.000000f},
{1065.733276f, 126.342400f, 628.156128f, 0.000000f},
{1060.914185f, 130.460403f, 628.156128f, 0.000000f},
{1059.328003f, 120.532974f, 628.156128f, 0.000000f},
{1052.488647f, 122.232979f, 628.156128f, 0.000000f},
{1047.673950f, 121.389717f, 628.156128f, 0.000000f},
{1043.781250f, 113.463493f, 628.156128f, 0.000000f},
{1044.634521f, 109.196129f, 628.518188f, 0.000000f},
{1052.443726f, 110.813431f, 628.156250f, 0.000000f},
};

static const Position MoveLocations2[9] =
{
{1068.739624f, 103.664474f, 630.880005f, 0.000000f},
{1062.253784f, 101.495079f, 630.683533f, 0.000000f},
{1057.972168f, 100.040573f, 630.238525f, 0.000000f},
{1053.684204f, 98.358513f, 629.913330f, 0.000000f},
{1060.612793f, 87.334480f, 631.050354f, 0.000000f},
{1068.163208f, 90.051262f, 631.533752f, 0.000000f},
{1046.957642f, 108.734108f, 628.526245f, 0.000000f},
{1044.634521f, 109.196129f, 628.518188f, 0.000000f},
{1052.443726f, 110.813431f, 628.156250f, 0.000000f},
};

static const Position leaderPosOutro1 = {1064.217896f, 118.629662f, 628.156311f, 0.000000f};
static const Position rimefangPos[10] =
{
{1017.299f, 168.9740f, 642.9259f, 0.000000f},
Expand Down Expand Up @@ -204,6 +231,33 @@ class boss_tyrannus : public CreatureScript
events.ScheduleEvent(EVENT_INTRO_3, 34000, 0, PHASE_INTRO);
events.ScheduleEvent(EVENT_COMBAT_START, 36000, 0, PHASE_INTRO);
instance->SetBossState(DATA_TYRANNUS, IN_PROGRESS);

if(Creature *pSlave = me->SummonCreature(NPC_GORKUN_IRONSKULL_1, 1075.489868f, 20.001131f, 632.835938f, 1.659531f, TEMPSUMMON_DEAD_DESPAWN, 10000))
{
pSlave->GetMotionMaster()->MovePoint(0, leaderPosOutro1);
pSlave->SetHomePosition(leaderPosOutro1);
}

for(uint8 i = 0; i < 9; ++i)
{
if(Creature *pSlave = me->SummonCreature(NPC_FREED_SLAVE_1_HORDE, 1086.112061f, 21.060266f, 631.892273f, 1.995682f, TEMPSUMMON_DEAD_DESPAWN, 30000))
{
pSlave->GetMotionMaster()->MovePoint(0, MoveLocations1[i]);
pSlave->SetHomePosition(MoveLocations1[i]);
}
++i;
if(Creature *pSlave = me->SummonCreature(NPC_FREED_SLAVE_2_HORDE, 1069.121582f, 18.495785f, 634.020203f, 1.573138f, TEMPSUMMON_DEAD_DESPAWN, 30000))
{
pSlave->GetMotionMaster()->MovePoint(0, MoveLocations1[i]);
pSlave->SetHomePosition(MoveLocations1[i]);
}
++i;
if(Creature *pSlave = me->SummonCreature(NPC_FREED_SLAVE_3_HORDE, 1075.489868f, 20.001131f, 632.835938f, 1.659531f, TEMPSUMMON_DEAD_DESPAWN, 30000))
{
pSlave->GetMotionMaster()->MovePoint(0, MoveLocations1[i]);
pSlave->SetHomePosition(MoveLocations1[i]);
}
}
}
}

Expand All @@ -219,7 +273,8 @@ class boss_tyrannus : public CreatureScript
switch (eventId)
{
case EVENT_INTRO_1:
//DoScriptText(SAY_GORKUN_INTRO_2, pGorkunOrVictus);
if (Creature* GorkunOrVictus = me->GetCreature(*me, instance->GetData64(DATA_VICTUS_OR_GORKUN_FREED)))
DoScriptText(SAY_GORKUN_INTRO_2, GorkunOrVictus);
break;
case EVENT_INTRO_2:
DoScriptText(SAY_TYRANNUS_INTRO_3, me);
Expand All @@ -239,6 +294,51 @@ class boss_tyrannus : public CreatureScript
events.ScheduleEvent(EVENT_OVERLORD_BRAND, urand(5000, 7000));
events.ScheduleEvent(EVENT_FORCEFUL_SMASH, urand(14000, 16000));
events.ScheduleEvent(EVENT_MARK_OF_RIMEFANG, urand(25000, 27000));

for(uint8 i = 0; i < 9; ++i)
{
if(Creature *pReaver = me->SummonCreature(NPC_WRATHBONE_REAVER, 1069.934082f, 49.015617f, 630.590210f, 1.657956f, TEMPSUMMON_DEAD_DESPAWN, 30000))
{
if (pReaver->isAlive())
{
if (Creature* pSlave = me->FindNearestCreature(NPC_FREED_SLAVE_1_HORDE, 150.0f, true))
{
pReaver->GetMotionMaster()->MovePoint(0, MoveLocations2[i]);
pReaver->SetHomePosition(MoveLocations2[i]);
pReaver->Attack(pSlave, true);
pReaver->GetMotionMaster()->MoveChase(pSlave);
}
}
}
++i;
if(Creature *pSorcerer = me->SummonCreature(NPC_WRATHBONE_SORCERER, 1069.934082f, 49.015617f, 630.590210f, 1.657956f, TEMPSUMMON_DEAD_DESPAWN, 30000))
{
if (pSorcerer->isAlive())
{
if (Creature* pSlave = me->FindNearestCreature(NPC_FREED_SLAVE_2_HORDE, 150.0f, true))
{
pSorcerer->GetMotionMaster()->MovePoint(0, MoveLocations2[i]);
pSorcerer->SetHomePosition(MoveLocations2[i]);
pSorcerer->Attack(pSlave, true);
pSorcerer->GetMotionMaster()->MoveChase(pSlave);
}
}
}
++i;
if(Creature *pFallen = me->SummonCreature(NPC_FALLEN_WARRIOR, 1069.934082f, 49.015617f, 630.590210f, 1.657956f, TEMPSUMMON_DEAD_DESPAWN, 30000))
{
if (pFallen->isAlive())
{
if (Creature* pSlave = me->FindNearestCreature(NPC_FREED_SLAVE_3_HORDE, 150.0f, true))
{
pFallen->GetMotionMaster()->MovePoint(0, MoveLocations2[i]);
pFallen->SetHomePosition(MoveLocations2[i]);
pFallen->Attack(pSlave, true);
pFallen->GetMotionMaster()->MoveChase(pSlave);
}
}
}
}
break;
case EVENT_OVERLORD_BRAND:
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 1, 0.0f, true))
Expand Down Expand Up @@ -295,7 +395,7 @@ class boss_rimefang : public CreatureScript
_events.SetPhase(PHASE_NONE);
_currentWaypoint = 0;
_hoarfrostTargetGUID = 0;
me->SetFlying(true);
me->SetCanFly(true);
me->SetReactState(REACT_PASSIVE);
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
}
Expand Down

5 comments on commit 6544fe3

@avalonfr
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cemak credit

Eze

@Expecto
Copy link

@Expecto Expecto commented on 6544fe3 Apr 4, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

script_texts entry 1658071 Need english locales

@avalonfr
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+(36888,-1658071,'This way! We're about to mount an assault on the Scourgelord's location!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'SAY_RESCOUD_HORDE_ALLIANCE');

Eze

@cemak
Copy link

@cemak cemak commented on 6544fe3 Apr 5, 2012

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

script work only on base TDB.

@avalonfr
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oO you ve delete your repo ?
thx for the precision
i need test we encounter crash on sChampions->Respawn() but don t have time yet for testing it
s@m

Please sign in to comment.