*Merge SD2.

*r973: Added support for quest 2767
*r974: Start MoveChase when boss reach phase 3.
*r975: Added support for quest 863 - Skip this patch because its already scripted. Just use enum instead of #define
*r976: Added support for quest 435 - Skip this patch because its already scripted. Just use enum instead of #define
*977: Remove one needless grid search and use new functions for SetRun in one script. - Skip this patch because TrinityCore2 has use another way for it.

--HG--
branch : trunk
This commit is contained in:
Anubisss
2009-05-19 23:48:48 +02:00
parent d8ce14c66a
commit 5854d17783
9 changed files with 328 additions and 54 deletions

View File

@@ -361,12 +361,12 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content
-- -1 060 000 863_world_scripts.sql
INSERT INTO `script_texts` (`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
(-1060000, 'Emergency power activated! Initializing ambulatory motor! CLUCK!', NULL, NULL, 'Notfallenergie aktiviert! Ambulatorenantrieb wird gestartet! GLUCK!', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL),
(-1060001, 'Physical threat detected! Evasive action! CLUCK!', NULL, NULL, 'Körperliche Bedrohung entdeckt! Ausweichmanöver! GLUCK!', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL),
(-1060002, 'Threat analyzed! Activating combat plan beta! CLUCK!', NULL, NULL, 'Bedrohung analysiert! Gefechtsplan Beta wird aktiviert! GLUCK!', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL),
(-1060003, 'CLUCK! Sensors detect spatial anomaly -- danger imminent! CLUCK', NULL, NULL, 'GLUCK! Sensoren haben räumliche Anomalie entdeckt - Gefahr im Verzug! GLUCK!', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL),
(-1060004, 'No one challenges the wastevander nomads -- not even robotic chickens! ATTACK!', NULL, NULL, 'Niemand fordert die Wüsenläufernomaden heraus - auch keine Robothühner! ANGRIFF!', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL),
(-1060005, 'Cloaking systems online! CLUCK! Engaging cloak for transport to Booty Bay!', NULL, NULL, 'Tarnsysteme online! GLUCK! Tarnung für Transport nach Beutebucht wird aktiviert.', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, NULL);
(-1060005, 'Cloaking systems online! CLUCK! Engaging cloak for transport to Booty Bay!', NULL, NULL, 'Tarnsysteme online! GLUCK! Tarnung für Transport nach Beutebucht wird aktiviert.', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox17 SAY_END'),
(-1060004, 'No one challenges the wastevander nomads -- not even robotic chickens! ATTACK!', NULL, NULL, 'Niemand fordert die Wüsenläufernomaden heraus - auch keine Robothühner! ANGRIFF!', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox17 SAY_AMBUSH_REPLY'),
(-1060003, 'CLUCK! Sensors detect spatial anomaly -- danger imminent! CLUCK', NULL, NULL, 'GLUCK! Sensoren haben räumliche Anomalie entdeckt - Gefahr im Verzug! GLUCK!', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox17 SAY_AMBUSH'),
(-1060002, 'Threat analyzed! Activating combat plan beta! CLUCK!', NULL, NULL, 'Bedrohung analysiert! Gefechtsplan Beta wird aktiviert! GLUCK!', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox17 SAY_AGGRO2'),
(-1060001, 'Physical threat detected! Evasive action! CLUCK!', NULL, NULL, 'Körperliche Bedrohung entdeckt! Ausweichmanöver! GLUCK!', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox17 SAY_AGGRO1'),
(-1060000, 'Emergency power activated! Initializing ambulatory motor! CLUCK!', NULL, NULL, 'Notfallenergie aktiviert! Ambulatorenantrieb wird gestartet! GLUCK!', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox17 SAY_START');
-- -1 070 000 ULDAMAN
INSERT INTO `script_texts` (`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

View File

@@ -0,0 +1,51 @@
UPDATE `creature_template` SET `ScriptName` = 'npc_oox22fe' WHERE `entry` = 7807;
DELETE FROM `script_waypoint` WHERE `entry` = 7807;
INSERT INTO `script_waypoint` VALUES
(7807, 0, -4943.74, 1715.74, 62.74, 0, 'SAY_START'),
(7807, 1, -4944.93, 1706.66, 63.16, 0, ''),
(7807, 2, -4942.82, 1690.22, 64.25, 0, ''),
(7807, 3, -4946.47, 1669.62, 63.84, 0, ''),
(7807, 4, -4955.93, 1651.88, 63.00, 0, ''),
(7807, 5, -4967.58, 1643.86, 64.31, 0, ''),
(7807, 6, -4978.12, 1607.90, 64.30, 0, ''),
(7807, 7, -4975.38, 1596.16, 64.70, 0, ''),
(7807, 8, -4972.82, 1581.89, 61.75, 0, ''),
(7807, 9, -4958.65, 1581.05, 61.81, 0, ''),
(7807, 10, -4936.72, 1594.89, 65.96, 0, ''),
(7807, 11, -4885.69, 1598.10, 67.45, 4000, 'first ambush SAY_AMBUSH'),
(7807, 12, -4874.20, 1601.73, 68.54, 0, ''),
(7807, 13, -4816.64, 1594.47, 78.20, 0, ''),
(7807, 14, -4802.20, 1571.92, 87.01, 0, ''),
(7807, 15, -4746.40, 1576.11, 84.59, 0, ''),
(7807, 16, -4739.72, 1707.16, 94.04, 0, ''),
(7807, 17, -4674.03, 1840.44, 89.17, 0, ''),
(7807, 18, -4667.94, 1864.11, 85.18, 0, ''),
(7807, 19, -4668.08, 1886.39, 81.14, 0, ''),
(7807, 20, -4679.43, 1932.32, 73.76, 0, ''),
(7807, 21, -4674.17, 1946.66, 70.83, 5000, 'second ambush SAY_AMBUSH'),
(7807, 22, -4643.94, 1967.45, 65.27, 0, ''),
(7807, 23, -4595.60, 2010.75, 52.10, 0, ''),
(7807, 24, -4562.65, 2029.28, 45.41, 0, ''),
(7807, 25, -4538.56, 2032.65, 45.28, 0, ''),
(7807, 26, -4531.96, 2034.15, 48.34, 0, ''),
(7807, 27, -4507.75, 2039.32, 51.57, 0, ''),
(7807, 28, -4482.74, 2045.67, 48.15, 0, ''),
(7807, 29, -4460.87, 2051.54, 45.55, 0, ''),
(7807, 30, -4449.97, 2060.03, 45.51, 10000, 'third ambush SAY_AMBUSH'),
(7807, 31, -4448.99, 2079.05, 44.64, 0, ''),
(7807, 32, -4436.64, 2134.48, 28.83, 0, ''),
(7807, 33, -4429.25, 2170.20, 15.44, 0, ''),
(7807, 34, -4424.83, 2186.11, 11.48, 0, ''),
(7807, 35, -4416.71, 2209.76, 7.36, 0, ''),
(7807, 36, -4405.25, 2231.77, 5.94, 0, ''),
(7807, 37, -4377.61, 2265.45, 06.71, 15000, 'complete quest SAY_END');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1060005 AND -1060000;
INSERT INTO `script_texts` (`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
(-1060005, 'Cloaking systems online! CLUCK! Engaging cloak for transport to Booty Bay!', NULL, NULL, 'Tarnsysteme online! GLUCK! Tarnung für Transport nach Beutebucht wird aktiviert.', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox17 SAY_END'),
(-1060004, 'No one challenges the wastevander nomads -- not even robotic chickens! ATTACK!', NULL, NULL, 'Niemand fordert die Wüsenläufernomaden heraus - auch keine Robothühner! ANGRIFF!', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox17 SAY_AMBUSH_REPLY'),
(-1060003, 'CLUCK! Sensors detect spatial anomaly -- danger imminent! CLUCK', NULL, NULL, 'GLUCK! Sensoren haben räumliche Anomalie entdeckt - Gefahr im Verzug! GLUCK!', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox17 SAY_AMBUSH'),
(-1060002, 'Threat analyzed! Activating combat plan beta! CLUCK!', NULL, NULL, 'Bedrohung analysiert! Gefechtsplan Beta wird aktiviert! GLUCK!', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox17 SAY_AGGRO2'),
(-1060001, 'Physical threat detected! Evasive action! CLUCK!', NULL, NULL, 'Körperliche Bedrohung entdeckt! Ausweichmanöver! GLUCK!', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox17 SAY_AGGRO1'),
(-1060000, 'Emergency power activated! Initializing ambulatory motor! CLUCK!', NULL, NULL, 'Notfallenergie aktiviert! Ambulatorenantrieb wird gestartet! GLUCK!', NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'oox17 SAY_START');

View File

@@ -594,4 +594,45 @@ INSERT INTO `script_waypoint` VALUES
(6182, 17, -11475.581055, 1548.678833, 50.184380, 0, 'complete quest'),
(6182, 18, -11482.299805, 1557.410034, 48.624519, 0, '');
DELETE FROM `script_waypoint` WHERE `entry` = 7807;
INSERT INTO `script_waypoint` VALUES
(7807, 0, -4943.74, 1715.74, 62.74, 0, 'SAY_START'),
(7807, 1, -4944.93, 1706.66, 63.16, 0, ''),
(7807, 2, -4942.82, 1690.22, 64.25, 0, ''),
(7807, 3, -4946.47, 1669.62, 63.84, 0, ''),
(7807, 4, -4955.93, 1651.88, 63.00, 0, ''),
(7807, 5, -4967.58, 1643.86, 64.31, 0, ''),
(7807, 6, -4978.12, 1607.90, 64.30, 0, ''),
(7807, 7, -4975.38, 1596.16, 64.70, 0, ''),
(7807, 8, -4972.82, 1581.89, 61.75, 0, ''),
(7807, 9, -4958.65, 1581.05, 61.81, 0, ''),
(7807, 10, -4936.72, 1594.89, 65.96, 0, ''),
(7807, 11, -4885.69, 1598.10, 67.45, 4000, 'first ambush SAY_AMBUSH'),
(7807, 12, -4874.20, 1601.73, 68.54, 0, ''),
(7807, 13, -4816.64, 1594.47, 78.20, 0, ''),
(7807, 14, -4802.20, 1571.92, 87.01, 0, ''),
(7807, 15, -4746.40, 1576.11, 84.59, 0, ''),
(7807, 16, -4739.72, 1707.16, 94.04, 0, ''),
(7807, 17, -4674.03, 1840.44, 89.17, 0, ''),
(7807, 18, -4667.94, 1864.11, 85.18, 0, ''),
(7807, 19, -4668.08, 1886.39, 81.14, 0, ''),
(7807, 20, -4679.43, 1932.32, 73.76, 0, ''),
(7807, 21, -4674.17, 1946.66, 70.83, 5000, 'second ambush SAY_AMBUSH'),
(7807, 22, -4643.94, 1967.45, 65.27, 0, ''),
(7807, 23, -4595.60, 2010.75, 52.10, 0, ''),
(7807, 24, -4562.65, 2029.28, 45.41, 0, ''),
(7807, 25, -4538.56, 2032.65, 45.28, 0, ''),
(7807, 26, -4531.96, 2034.15, 48.34, 0, ''),
(7807, 27, -4507.75, 2039.32, 51.57, 0, ''),
(7807, 28, -4482.74, 2045.67, 48.15, 0, ''),
(7807, 29, -4460.87, 2051.54, 45.55, 0, ''),
(7807, 30, -4449.97, 2060.03, 45.51, 10000, 'third ambush SAY_AMBUSH'),
(7807, 31, -4448.99, 2079.05, 44.64, 0, ''),
(7807, 32, -4436.64, 2134.48, 28.83, 0, ''),
(7807, 33, -4429.25, 2170.20, 15.44, 0, ''),
(7807, 34, -4424.83, 2186.11, 11.48, 0, ''),
(7807, 35, -4416.71, 2209.76, 7.36, 0, ''),
(7807, 36, -4405.25, 2231.77, 5.94, 0, ''),
(7807, 37, -4377.61, 2265.45, 06.71, 15000, 'complete quest SAY_END');
/* EOF */

View File

@@ -448,6 +448,7 @@ UPDATE `creature_template` SET `ScriptName`='npcs_riverbreeze_and_silversky' WHE
/* FERALAS */
UPDATE `creature_template` SET `ScriptName`='npc_gregan_brewspewer' WHERE `entry`=7775;
UPDATE `creature_template` SET `ScriptName`='npc_screecher_spirit' WHERE `entry`=8612;
UPDATE `creature_template` SET `ScriptName`='npc_oox22fe' WHERE `entry`=7807;
/* GHOSTLANDS */
UPDATE `creature_template` SET `ScriptName`='npc_blood_knight_dawnstar' WHERE `entry`=17832;

View File

@@ -31,9 +31,17 @@ void npc_escortAI::AttackStart(Unit *who)
if (IsBeingEscorted && !Defend)
return;
if ( m_creature->Attack(who, true) )
if(m_creature->Attack(who, true) )
{
m_creature->GetMotionMaster()->MoveChase(who);
m_creature->AddThreat(who, 0.0f);
m_creature->SetInCombatWith(who);
who->SetInCombatWith(m_creature);
if(CombatMovement)
{
m_creature->GetMotionMaster()->MovementExpired();
m_creature->GetMotionMaster()->MoveChase(who);
}
}
}
@@ -63,6 +71,7 @@ void npc_escortAI::JustRespawned()
{
IsBeingEscorted = false;
IsOnHold = false;
CombatMovement = true;
//Re-Enable questgiver flag
m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER);
@@ -82,8 +91,12 @@ void npc_escortAI::EnterEvadeMode()
debug_log("TSCR: EscortAI has left combat and is now returning to last point.");
Returning = true;
m_creature->GetMotionMaster()->MovementExpired();
m_creature->GetMotionMaster()->MovePoint(WP_LAST_POINT, LastPos.x, LastPos.y, LastPos.z);
//if default is WAYPOINT_MOTION_TYPE, must MoveIdle to prevent from using
if(m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
m_creature->GetMotionMaster()->MoveIdle();
m_creature->GetMotionMaster()->MovePoint(WP_LAST_POINT, LastPos.x, LastPos.y, LastPos.z);
}
else
{
@@ -224,15 +237,16 @@ void npc_escortAI::MovementInform(uint32 type, uint32 id)
debug_log("TSCR: EscortAI has returned to original position before combat");
ReconnectWP = true;
Returning = false;
WaitTimer = 1;
if(!WaitTimer)
WaitTimer = 1;
}
else
{
//Make sure that we are still on the right waypoint
if (CurrentWP->id != id)
{
debug_log("SD2 ERROR: EscortAI reached waypoint out of order %d, expected %d", id, CurrentWP->id);
debug_log("TSCR ERROR: EscortAI reached waypoint out of order %d, expected %d", id, CurrentWP->id);
return;
}
@@ -294,30 +308,25 @@ void npc_escortAI::SetRun(bool bRun)
if (bRun)
{
if (!bIsRunning)
{
m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
bIsRunning = true;
}
else
debug_log("TSCR: EscortAI attempt to set run mode, but is already running.");
}
else
{
if (bIsRunning)
{
m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
bIsRunning = false;
}
else
debug_log("TSCR: EscortAI attempt to set walk mode, but is already walking.");
}
bIsRunning = bRun;
}
void npc_escortAI::Start(bool bAttack, bool bDefend, bool bRun, uint64 pGUID)
{
if (m_creature->isInCombat())
{
debug_log("SD2 ERROR: EscortAI attempt to Start while in combat");
debug_log("TSCR ERROR: EscortAI attempt to Start while in combat");
return;
}
@@ -333,6 +342,13 @@ void npc_escortAI::Start(bool bAttack, bool bDefend, bool bRun, uint64 pGUID)
return;
}
if(m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE)
{
m_creature->GetMotionMaster()->MovementExpired();
m_creature->GetMotionMaster()->MoveIdle();
debug_log("TSCR: EscortAI start with WAYPOINT_MOTION_TYPE, changed to MoveIdle.");
}
Attack = bAttack;
Defend = bDefend;
bIsRunning = bRun;
@@ -362,6 +378,6 @@ void npc_escortAI::Start(bool bAttack, bool bDefend, bool bRun, uint64 pGUID)
ReconnectWP = false;
Returning = false;
IsOnHold = false;
CombatMovement = true;
}

View File

@@ -398,24 +398,33 @@ CreatureAI* GetAI_npc_twiggy_flathead(Creature *_Creature)
## npc_wizzlecrank_shredder
#####*/
#define SAY_PROGRESS_1 -1000272
#define SAY_PROGRESS_2 -1000273
#define SAY_PROGRESS_3 -1000274
enum
{
SAY_PROGRESS_1 = -1000272,
SAY_PROGRESS_2 = -1000273,
SAY_PROGRESS_3 = -1000274,
#define SAY_MERCENARY_4 -1000275
SAY_MERCENARY_4 = -1000275,
#define SAY_PROGRESS_5 -1000276
#define SAY_PROGRESS_6 -1000277
#define SAY_PROGRESS_7 -1000278
#define SAY_PROGRESS_8 -1000279
SAY_PROGRESS_5 = -1000276,
SAY_PROGRESS_6 = -1000277,
SAY_PROGRESS_7 = -1000278,
SAY_PROGRESS_8 = -1000279,
#define QUEST_ESCAPE 863
#define NPC_PILOT 3451
#define MOB_MERCENARY 3282
QUEST_ESCAPE = 863,
FACTION_RATCHET = 637,
NPC_PILOT = 3451,
MOB_MERCENARY = 3282,
};
struct TRINITY_DLL_DECL npc_wizzlecrank_shredderAI : public npc_escortAI
{
npc_wizzlecrank_shredderAI(Creature* c) : npc_escortAI(c) {}
npc_wizzlecrank_shredderAI(Creature* c) : npc_escortAI(c)
{
uiNormFaction = c->getFaction();
}
uint32 uiNormFaction;
bool Completed;
@@ -450,8 +459,7 @@ struct TRINITY_DLL_DECL npc_wizzlecrank_shredderAI : public npc_escortAI
case 31: m_creature->SummonCreature(NPC_PILOT, 1088.77, -2985.39, 91.84, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000);
m_creature->setDeathState(JUST_DIED);
Completed = true;
if (player && player->GetTypeId() == TYPEID_PLAYER)
((Player*)player)->GroupEventHappens(QUEST_ESCAPE, m_creature);
player->GroupEventHappens(QUEST_ESCAPE, m_creature);
break;
}
}
@@ -460,7 +468,12 @@ struct TRINITY_DLL_DECL npc_wizzlecrank_shredderAI : public npc_escortAI
{
m_creature->setDeathState(ALIVE);
Completed = false;
m_creature->setFaction(69);
if(!IsBeingEscorted)
{
m_creature->setFaction(uiNormFaction);
if (m_creature->getStandState() == UNIT_STAND_STATE_DEAD)
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
}
}
void EnterCombat(Unit* who){}
@@ -471,7 +484,7 @@ struct TRINITY_DLL_DECL npc_wizzlecrank_shredderAI : public npc_escortAI
{
Player* player = Unit::GetPlayer(PlayerGUID);
if (player)
((Player*)player)->FailQuest(QUEST_ESCAPE);
player->FailQuest(QUEST_ESCAPE);
}
}
@@ -485,8 +498,8 @@ bool QuestAccept_npc_wizzlecrank_shredder(Player* player, Creature* creature, Qu
{
if (quest->GetQuestId() == QUEST_ESCAPE)
{
creature->setFaction(FACTION_RATCHET);
((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
creature->setFaction(113);
}
return true;
}

View File

@@ -17,11 +17,12 @@
/* ScriptData
SDName: Feralas
SD%Complete: 100
SDComment: Quest support: 3520. Special vendor Gregan Brewspewer
SDComment: Quest support: 3520, 2767, Special vendor Gregan Brewspewer
SDCategory: Feralas
EndScriptData */
#include "precompiled.h"
#include "../../npc/npc_escortAI.h"
/*######
## npc_gregan_brewspewer
@@ -53,6 +54,148 @@ bool GossipSelect_npc_gregan_brewspewer(Player *player, Creature *_Creature, uin
return true;
}
/*######
## npc_oox22fe
######*/
enum
{
SAY_START = -1060000,
SAY_AGGRO = -1060001,
SAY_AGGRO2 = -1060002,
SAY_AMBUSH = -1060003,
SAY_END = -1060005,
NPC_YETI = 7848,
NPC_GORILLA = 5260,
NPC_WOODPAW_REAVER = 5255,
NPC_WOODPAW_BRUTE = 5253,
NPC_WOODPAW_ALPHA = 5258,
NPC_WOODPAW_MYSTIC = 5254,
QUEST_RESCUE_OOX22FE = 2767,
FACTION_ESCORTEE_A = 774,
FACTION_ESCORTEE_H = 775
};
struct TRINITY_DLL_DECL npc_oox22feAI : public npc_escortAI
{
npc_oox22feAI(Creature* pCreature) : npc_escortAI(pCreature)
{
normFaction = pCreature->getFaction();
}
uint32 normFaction;
void WaypointReached(uint32 i)
{
switch (i)
{
// First Ambush(3 Yetis)
case 11:
DoScriptText(SAY_AMBUSH,m_creature);
m_creature->SummonCreature(NPC_YETI, -4841.01, 1593.91, 73.42, 3.98, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
m_creature->SummonCreature(NPC_YETI, -4837.61, 1568.58, 78.21, 3.13, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
m_creature->SummonCreature(NPC_YETI, -4841.89, 1569.95, 76.53, 0.68, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
break;
//Second Ambush(3 Gorillas)
case 21:
DoScriptText(SAY_AMBUSH,m_creature);
m_creature->SummonCreature(NPC_GORILLA, -4595.81, 2005.99, 53.08, 3.74, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
m_creature->SummonCreature(NPC_GORILLA, -4597.53, 2008.31, 52.70, 3.78, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
m_creature->SummonCreature(NPC_GORILLA, -4599.37, 2010.59, 52.77, 3.84, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
break;
//Third Ambush(4 Gnolls)
case 30:
DoScriptText(SAY_AMBUSH,m_creature);
m_creature->SummonCreature(NPC_WOODPAW_REAVER, -4425.14, 2075.87, 47.77, 3.77, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
m_creature->SummonCreature(NPC_WOODPAW_BRUTE , -4426.68, 2077.98, 47.57, 3.77, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
m_creature->SummonCreature(NPC_WOODPAW_MYSTIC, -4428.33, 2080.24, 47.43, 3.87, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
m_creature->SummonCreature(NPC_WOODPAW_ALPHA , -4430.04, 2075.54, 46.83, 3.81, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
break;
case 37:
DoScriptText(SAY_END,m_creature);
// Award quest credit
if(Player* pPlayer = Unit::GetPlayer( PlayerGUID))
{
pPlayer->GroupEventHappens(QUEST_RESCUE_OOX22FE, m_creature);
}
break;
}
}
void Reset()
{
if (!IsBeingEscorted)
{
m_creature->setFaction(normFaction);
m_creature->SetStandState(UNIT_STAND_STATE_DEAD);
}
}
void Aggro(Unit* who)
{
//For an small probability the npc says something when he get aggro
switch(rand()%10)
{
case 0: DoScriptText(SAY_AGGRO,m_creature); break;
case 1: DoScriptText(SAY_AGGRO2,m_creature); break;
}
}
void JustSummoned(Creature* summoned)
{
summoned->AI()->AttackStart(m_creature);
}
void JustDied(Unit* killer)
{
if (!IsBeingEscorted)
return;
if(Player* pPlayer = Unit::GetPlayer(PlayerGUID))
{
// If NPC dies, player fails the quest
if(pPlayer->GetQuestStatus(QUEST_RESCUE_OOX22FE) != QUEST_STATUS_COMPLETE)
pPlayer->FailQuest(QUEST_RESCUE_OOX22FE);
}
}
void UpdateAI(const uint32 diff)
{
npc_escortAI::UpdateAI(diff);
}
};
CreatureAI* GetAI_npc_oox22fe(Creature* pCreature)
{
npc_oox22feAI* oox22AI = new npc_oox22feAI(pCreature);
oox22AI->FillPointMovementListForCreature();
return (CreatureAI*)oox22AI;
}
bool QuestAccept_npc_oox22fe(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
{
if (pQuest->GetQuestId() == QUEST_RESCUE_OOX22FE)
{
DoScriptText(SAY_START, pCreature);
//change that the npc is not lying dead on the ground
pCreature->SetStandState(UNIT_STAND_STATE_STAND);
if (pPlayer->GetTeam() == ALLIANCE)
pCreature->setFaction(FACTION_ESCORTEE_A);
if (pPlayer->GetTeam() == HORDE)
pCreature->setFaction(FACTION_ESCORTEE_H);
((npc_escortAI*)(pCreature->AI()))->Start(true, true, false, pPlayer->GetGUID());
}
return true;
}
/*######
## npc_screecher_spirit
######*/
@@ -80,6 +223,12 @@ void AddSC_feralas()
newscript->pGossipSelect = &GossipSelect_npc_gregan_brewspewer;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name = "npc_oox22fe";
newscript->GetAI = &GetAI_npc_oox22fe;
newscript->pQuestAccept = &QuestAccept_npc_oox22fe;
newscript->RegisterSelf();
newscript = new Script;
newscript->Name="npc_screecher_spirit";
newscript->pGossipHello = &GossipHello_npc_screecher_spirit;

View File

@@ -141,6 +141,7 @@ struct TRINITY_DLL_DECL boss_onyxiaAI : public ScriptedAI
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)

View File

@@ -91,24 +91,27 @@ bool GossipSelect_npc_astor_hadren(Player *player, Creature *_Creature, uint32 s
## npc_deathstalker_erland
######*/
#define SAY_QUESTACCEPT -1000335
#define SAY_START -1000336
#define SAY_AGGRO_1 -1000337
#define SAY_AGGRO_2 -1000338
#define SAY_LAST -1000339
enum
{
SAY_QUESTACCEPT = -1000335,
SAY_START = -1000336,
SAY_AGGRO_1 = -1000337,
SAY_AGGRO_2 = -1000338,
SAY_LAST = -1000339,
#define SAY_THANKS -1000340
#define SAY_RANE -1000341
#define SAY_ANSWER -1000342
#define SAY_MOVE_QUINN -1000343
SAY_THANKS = -1000340,
SAY_RANE = -1000341,
SAY_ANSWER = -1000342,
SAY_MOVE_QUINN = -1000343,
#define SAY_GREETINGS -1000344
#define SAY_QUINN -1000345
#define SAY_ON_BYE -1000346
SAY_GREETINGS = -1000344,
SAY_QUINN = -1000345,
SAY_ON_BYE = -1000346,
#define QUEST_ESCORTING 435
#define NPC_RANE 1950
#define NPC_QUINN 1951
QUEST_ESCORTING = 435,
NPC_RANE = 1950,
NPC_QUINN = 1951
};
struct TRINITY_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI
{
@@ -126,8 +129,7 @@ struct TRINITY_DLL_DECL npc_deathstalker_erlandAI : public npc_escortAI
case 1: DoScriptText(SAY_START, m_creature, player);break;
case 13:
DoScriptText(SAY_LAST, m_creature, player);
if(player)
((Player*)player)->GroupEventHappens(QUEST_ESCORTING, m_creature);break;
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);