mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
*Merge SD2.
*r993: Added support for quest 2078 *r994: Added missing SQL update files in rev 993 *r995: Added support for quest 731 *r996: Use CombatStartPosition as return point for escortAI instead of script generated location. - Skip. *r997: Added gossip to obtain scarlet illusion related to quest 5862/5944 --HG-- branch : trunk
This commit is contained in:
@@ -324,7 +324,22 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content
|
||||
(-1000405, 'We\'ve done it! We won!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'stilwell SAY_DS_DOWN_3'),
|
||||
(-1000406, 'Meet me down by the orchard--I just need to put my gun away.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'stilwell SAY_DS_PROLOGUE'),
|
||||
(-1000411, 'Mist! I feared I would never see you again! Yes, I am well, do not worry for me. You must rest and recover your health.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'mist SAY_AT_HOME'),
|
||||
(-1000412, 'growls in acknowledgement before straightening and making her way off into the forest.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'mist EMOTE_AT_HOME');
|
||||
(-1000412, 'growls in acknowledgement before straightening and making her way off into the forest.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'mist EMOTE_AT_HOME'),
|
||||
(-1000413, 'Threshwackonator First Mate unit prepared to follow', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 0, 0, 'threshwackonator EMOTE_START'),
|
||||
(-1000414, 'YARRR! Swabie, what have ye done?! He\'s gone mad! Baton him down the hatches! Hoist the mast! ARRRR! Every man for hi\'self!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'threshwackonator SAY_AT_CLOSE'),
|
||||
(-1000415, 'Ok, $n, let\'s go find where I left that mysterious fossil. Follow me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_START'),
|
||||
(-1000416, 'Now where did I put that mysterious fossil? Ah, maybe up there...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_RAMP1_1'),
|
||||
(-1000417, 'Hrm, nothing up here.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_RAMP1_2'),
|
||||
(-1000418, 'No mysterious fossil here... Ah, but my copy of Green Hills of Stranglethorn. What a good book!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_BOOK'),
|
||||
(-1000419, 'I bet you I left it in the tent!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_TENT1_1'),
|
||||
(-1000420, 'Oh wait, that\'s Hollee\'s tent... and it\'s empty.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_TENT1_2'),
|
||||
(-1000421, 'Interesting... I hadn\'t noticed this earlier...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_MOSS'),
|
||||
(-1000422, '%s inspects the ancient, mossy stone.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 7, 0, 'remtravel EMOTE_REM_MOSS'),
|
||||
(-1000423, 'Oh wait! I\'m supposed to be looking for that mysterious fossil!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_MOSS_PROGRESS'),
|
||||
(-1000424, 'Nope. didn\'t leave the fossil back here!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_PROGRESS'),
|
||||
(-1000425, 'Ah. I remember now! I gave the mysterious fossil to Hollee! Check with her.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_REMEMBER'),
|
||||
(-1000426, '%s goes back to work, oblivious to everything around him.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 2, 7, 0, 'remtravel EMOTE_REM_END'),
|
||||
(-1000427, 'Something tells me this $r wants the mysterious fossil too. Help!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 7, 0, 'remtravel SAY_REM_AGGRO');
|
||||
|
||||
-- -1 033 000 SHADOWFANG KEEP
|
||||
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
|
||||
|
||||
72
sql/updates/3910_world.sql
Normal file
72
sql/updates/3910_world.sql
Normal file
@@ -0,0 +1,72 @@
|
||||
UPDATE `creature_template` SET `ScriptName` = 'npc_threshwackonator' WHERE `entry` = 6669;
|
||||
|
||||
DELETE FROM `script_texts` WHERE `entry` IN (-1000411, -1000412);
|
||||
INSERT INTO script_texts (entry, content_default, sound, type, language, emote, comment) VALUES
|
||||
(-1000413, 'Threshwackonator First Mate unit prepared to follow', 0, 2, 0, 0, 'threshwackonator EMOTE_START'),
|
||||
(-1000414, 'YARRR! Swabie, what have ye done?! He\'s gone mad! Baton him down the hatches! Hoist the mast! ARRRR! Every man for hi\'self!', 0, 0, 7, 0, 'threshwackonator SAY_AT_CLOSE');
|
||||
|
||||
UPDATE `creature_template` SET `ScriptName` = 'npc_prospector_remtravel' WHERE `entry` = 2917;
|
||||
|
||||
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000427 AND -1000415;
|
||||
INSERT INTO `script_texts` (`entry`, `content_default`, `sound`, `type`, `language`, `emote`, `comment`) VALUES
|
||||
(-1000415, 'Ok, $n, let\'s go find where I left that mysterious fossil. Follow me!', 0, 0, 7, 0, 'remtravel SAY_REM_START'),
|
||||
(-1000416, 'Now where did I put that mysterious fossil? Ah, maybe up there...', 0, 0, 7, 0, 'remtravel SAY_REM_RAMP1_1'),
|
||||
(-1000417, 'Hrm, nothing up here.', 0, 0, 7, 0, 'remtravel SAY_REM_RAMP1_2'),
|
||||
(-1000418, 'No mysterious fossil here... Ah, but my copy of Green Hills of Stranglethorn. What a good book!', 0, 0, 7, 0, 'remtravel SAY_REM_BOOK'),
|
||||
(-1000419, 'I bet you I left it in the tent!', 0, 0, 7, 0, 'remtravel SAY_REM_TENT1_1'),
|
||||
(-1000420, 'Oh wait, that\'s Hollee\'s tent... and it\'s empty.', 0, 0, 7, 0, 'remtravel SAY_REM_TENT1_2'),
|
||||
(-1000421, 'Interesting... I hadn\'t noticed this earlier...', 0, 0, 7, 0, 'remtravel SAY_REM_MOSS'),
|
||||
(-1000422, '%s inspects the ancient, mossy stone.', 0, 2, 7, 0, 'remtravel EMOTE_REM_MOSS'),
|
||||
(-1000423, 'Oh wait! I\'m supposed to be looking for that mysterious fossil!', 0, 0, 7, 0, 'remtravel SAY_REM_MOSS_PROGRESS'),
|
||||
(-1000424, 'Nope. didn\'t leave the fossil back here!', 0, 0, 7, 0, 'remtravel SAY_REM_PROGRESS'),
|
||||
(-1000425, 'Ah. I remember now! I gave the mysterious fossil to Hollee! Check with her.', 0, 0, 7, 0, 'remtravel SAY_REM_REMEMBER'),
|
||||
(-1000426, '%s goes back to work, oblivious to everything around him.', 0, 2, 7, 0, 'remtravel EMOTE_REM_END'),
|
||||
(-1000427, 'Something tells me this $r wants the mysterious fossil too. Help!', 0, 0, 7, 0, 'remtravel SAY_REM_AGGRO');
|
||||
|
||||
DELETE FROM `script_waypoint` WHERE `entry` = 2917;
|
||||
INSERT INTO `script_waypoint` VALUES
|
||||
(2917, 0, 4675.812500, 598.614563, 17.645658, 0, 'SAY_REM_START'),
|
||||
(2917, 1, 4672.844238, 599.325378, 16.417622, 0, ''),
|
||||
(2917, 2, 4663.449707, 607.430176, 10.494752, 0, ''),
|
||||
(2917, 3, 4655.969238, 613.761353, 8.523270, 0, ''),
|
||||
(2917, 4, 4640.804688, 623.999329, 8.377054, 0, ''),
|
||||
(2917, 5, 4631.678711, 630.801086, 6.414999, 5000, 'SAY_REM_RAMP1_1'),
|
||||
(2917, 6, 4633.533203, 632.476440, 6.509831, 0, 'ambush'),
|
||||
(2917, 7, 4639.413574, 637.120789, 13.338119, 0, ''),
|
||||
(2917, 8, 4642.352051, 637.668152, 13.437444, 0, ''),
|
||||
(2917, 9, 4645.082031, 634.463989, 13.437208, 5000, 'SAY_REM_RAMP1_2'),
|
||||
(2917, 10, 4642.345215, 637.584839, 13.435211, 0, ''),
|
||||
(2917, 11, 4639.630859, 637.233765, 13.339752, 0, ''),
|
||||
(2917, 12, 4633.363281, 632.462280, 6.488438, 0, ''),
|
||||
(2917, 13, 4624.714844, 631.723511, 6.264030, 0, ''),
|
||||
(2917, 14, 4623.525879, 629.718506, 6.201339, 5000, 'SAY_REM_BOOK'),
|
||||
(2917, 15, 4623.452148, 630.369629, 6.218942, 0, 'SAY_REM_TENT1_1'),
|
||||
(2917, 16, 4622.622070, 637.221558, 6.312845, 0, 'ambush'),
|
||||
(2917, 17, 4619.755371, 637.386230, 6.312050, 5000, 'SAY_REM_TENT1_2'),
|
||||
(2917, 18, 4620.027832, 637.367676, 6.312050, 0, ''),
|
||||
(2917, 19, 4624.154785, 637.560303, 6.313898, 0, ''),
|
||||
(2917, 20, 4622.967773, 634.016479, 6.294979, 0, ''),
|
||||
(2917, 21, 4616.926758, 630.303284, 6.239193, 0, ''),
|
||||
(2917, 22, 4614.546387, 616.983337, 5.687642, 0, ''),
|
||||
(2917, 23, 4610.279297, 610.029419, 5.442539, 0, ''),
|
||||
(2917, 24, 4601.149902, 604.111694, 2.054856, 0, ''),
|
||||
(2917, 25, 4589.618164, 597.685730, 1.057147, 0, ''),
|
||||
(2917, 26, 4577.588379, 592.145813, 1.120190, 0, 'SAY_REM_MOSS (?)'),
|
||||
(2917, 27, 4569.848145, 592.177490, 1.260874, 5000, 'EMOTE_REM_MOSS (?)'),
|
||||
(2917, 28, 4568.791992, 590.870911, 1.211338, 3000, 'SAY_REM_MOSS_PROGRESS (?)'),
|
||||
(2917, 29, 4566.722656, 564.077881, 1.343084, 0, 'ambush'),
|
||||
(2917, 30, 4568.269531, 551.958435, 5.004200, 0, ''),
|
||||
(2917, 31, 4566.731934, 551.557861, 5.426314, 5000, 'SAY_REM_PROGRESS'),
|
||||
(2917, 32, 4566.741699, 560.767639, 1.703257, 0, ''),
|
||||
(2917, 33, 4573.916016, 582.566101, 0.749801, 0, ''),
|
||||
(2917, 34, 4594.206055, 598.533020, 1.034056, 0, ''),
|
||||
(2917, 35, 4601.194824, 604.283081, 2.060146, 0, ''),
|
||||
(2917, 36, 4609.539551, 610.844727, 5.402220, 0, ''),
|
||||
(2917, 37, 4624.800293, 618.076477, 5.851541, 0, ''),
|
||||
(2917, 38, 4632.414063, 623.778442, 7.286243, 0, ''),
|
||||
(2917, 39, 4645.915039, 621.983765, 8.579967, 0, ''),
|
||||
(2917, 40, 4658.669922, 611.092651, 8.891747, 0, ''),
|
||||
(2917, 41, 4671.924316, 599.752197, 16.01242, 5000, 'SAY_REM_REMEMBER'),
|
||||
(2917, 42, 4676.976074, 600.649780, 17.82566, 5000, 'EMOTE_REM_END');
|
||||
|
||||
UPDATE `creature_template` SET `ScriptName` = 'npc_myranda_the_hag' WHERE `entry` = 11872;
|
||||
@@ -406,6 +406,8 @@ UPDATE `creature_template` SET `ScriptName`='mob_toxic_sporebat' WHERE `entry`=2
|
||||
UPDATE `creature_template` SET `ScriptName`='mob_shield_generator_channel' WHERE `entry`=19870;
|
||||
|
||||
/* DARKSHORE */
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_threshwackonator' WHERE `entry`=6669;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_prospector_remtravel' WHERE `entry`=2917;
|
||||
|
||||
/* DEADMINES */
|
||||
UPDATE `instance_template` SET `script`='instance_deadmines' WHERE `map`=36;
|
||||
@@ -999,6 +1001,7 @@ UPDATE `creature_template` SET `ScriptName`='mob_archavon_warder' WHERE `entry`=
|
||||
/* WESTERN PLAGUELANDS */
|
||||
UPDATE `creature_template` SET `ScriptName`='npcs_dithers_and_arbington' WHERE `entry` IN (11056,11057);
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_the_scourge_cauldron' WHERE `entry`=11152;
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_myranda_the_hag' WHERE `entry`=11872;
|
||||
|
||||
/* WESTFALL */
|
||||
UPDATE `creature_template` SET `ScriptName`='npc_defias_traitor' WHERE `entry`=467;
|
||||
|
||||
@@ -247,6 +247,8 @@ extern void AddSC_boss_hungarfen();
|
||||
extern void AddSC_boss_the_black_stalker();
|
||||
|
||||
//Darkshore
|
||||
extern void AddSC_darkshore();
|
||||
|
||||
//Darnassus
|
||||
//Deadmines
|
||||
extern void AddSC_instance_deadmines();
|
||||
@@ -1139,6 +1141,8 @@ void ScriptsInit(char const* cfg_file = "trinitycore.conf")
|
||||
AddSC_boss_the_black_stalker();
|
||||
|
||||
//Darkshore
|
||||
AddSC_darkshore();
|
||||
|
||||
//Darnassus
|
||||
//Deadmines
|
||||
AddSC_instance_deadmines();
|
||||
|
||||
@@ -16,10 +16,330 @@
|
||||
|
||||
/* ScriptData
|
||||
SDName: Darkshore
|
||||
SD%Complete: 0
|
||||
SDComment: Placeholder
|
||||
SD%Complete: 100
|
||||
SDComment: Quest support: 731, 2078
|
||||
SDCategory: Darkshore
|
||||
EndScriptData */
|
||||
|
||||
#include "precompiled.h"
|
||||
/* ContentData
|
||||
npc_prospector_remtravel
|
||||
npc_threshwackonator
|
||||
EndContentData */
|
||||
|
||||
#include "precompiled.h"
|
||||
#include "../../npc/npc_escortAI.h"
|
||||
|
||||
/*####
|
||||
# npc_prospector_remtravel
|
||||
####*/
|
||||
|
||||
enum
|
||||
{
|
||||
SAY_REM_START = -1000415,
|
||||
SAY_REM_AGGRO = -1000427,
|
||||
SAY_REM_RAMP1_1 = -1000416,
|
||||
SAY_REM_RAMP1_2 = -1000417,
|
||||
SAY_REM_BOOK = -1000418,
|
||||
SAY_REM_TENT1_1 = -1000419,
|
||||
SAY_REM_TENT1_2 = -1000420,
|
||||
SAY_REM_MOSS = -1000421,
|
||||
EMOTE_REM_MOSS = -1000422,
|
||||
SAY_REM_MOSS_PROGRESS = -1000423,
|
||||
SAY_REM_PROGRESS = -1000424,
|
||||
SAY_REM_REMEMBER = -1000425,
|
||||
EMOTE_REM_END = -1000426,
|
||||
|
||||
FACTION_ESCORTEE = 10,
|
||||
QUEST_ABSENT_MINDED_PT2 = 731,
|
||||
NPC_GRAVEL_SCOUT = 2158,
|
||||
NPC_GRAVEL_BONE = 2159,
|
||||
NPC_GRAVEL_GEO = 2160
|
||||
};
|
||||
|
||||
struct TRINITY_DLL_DECL npc_prospector_remtravelAI : public npc_escortAI
|
||||
{
|
||||
npc_prospector_remtravelAI(Creature* pCreature) : npc_escortAI(pCreature) {}
|
||||
|
||||
void WaypointReached(uint32 i)
|
||||
{
|
||||
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
|
||||
|
||||
if(!pPlayer)
|
||||
return;
|
||||
|
||||
switch(i)
|
||||
{
|
||||
case 0:
|
||||
DoScriptText(SAY_REM_START, me, pPlayer);
|
||||
break;
|
||||
case 5:
|
||||
DoScriptText(SAY_REM_RAMP1_1, me, pPlayer);
|
||||
break;
|
||||
case 6:
|
||||
DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
break;
|
||||
case 9:
|
||||
DoScriptText(SAY_REM_RAMP1_2, me, pPlayer);
|
||||
break;
|
||||
case 14:
|
||||
//depend quest rewarded?
|
||||
DoScriptText(SAY_REM_BOOK, me, pPlayer);
|
||||
break;
|
||||
case 15:
|
||||
DoScriptText(SAY_REM_TENT1_1, me, pPlayer);
|
||||
break;
|
||||
case 16:
|
||||
DoSpawnCreature(NPC_GRAVEL_SCOUT, -10.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
DoSpawnCreature(NPC_GRAVEL_BONE, -10.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
break;
|
||||
case 17:
|
||||
DoScriptText(SAY_REM_TENT1_2, me, pPlayer);
|
||||
break;
|
||||
case 26:
|
||||
DoScriptText(SAY_REM_MOSS, me, pPlayer);
|
||||
break;
|
||||
case 27:
|
||||
DoScriptText(EMOTE_REM_MOSS, me, pPlayer);
|
||||
break;
|
||||
case 28:
|
||||
DoScriptText(SAY_REM_MOSS_PROGRESS, me, pPlayer);
|
||||
break;
|
||||
case 29:
|
||||
DoSpawnCreature(NPC_GRAVEL_SCOUT, -15.0f, 3.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
DoSpawnCreature(NPC_GRAVEL_BONE, -15.0f, 5.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
DoSpawnCreature(NPC_GRAVEL_GEO, -15.0f, 7.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000);
|
||||
break;
|
||||
case 31:
|
||||
DoScriptText(SAY_REM_PROGRESS, me, pPlayer);
|
||||
break;
|
||||
case 41:
|
||||
DoScriptText(SAY_REM_REMEMBER, me, pPlayer);
|
||||
break;
|
||||
case 42:
|
||||
DoScriptText(EMOTE_REM_END, me, pPlayer);
|
||||
pPlayer->GroupEventHappens(QUEST_ABSENT_MINDED_PT2, me);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void Reset() {}
|
||||
|
||||
void EnterCombat(Unit* who)
|
||||
{
|
||||
if(rand()%2)
|
||||
DoScriptText(SAY_REM_AGGRO, me, who);
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* pSummoned)
|
||||
{
|
||||
//unsure if it should be any
|
||||
//pSummoned->AI()->AttackStart(m_creature);
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
npc_escortAI::UpdateAI(diff);
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_prospector_remtravel(Creature* pCreature)
|
||||
{
|
||||
npc_prospector_remtravelAI* tempAI = new npc_prospector_remtravelAI(pCreature);
|
||||
|
||||
tempAI->FillPointMovementListForCreature();
|
||||
|
||||
return tempAI;
|
||||
}
|
||||
|
||||
bool QuestAccept_npc_prospector_remtravel(Player* pPlayer, Creature* pCreature, const Quest* pQuest)
|
||||
{
|
||||
if(pQuest->GetQuestId() == QUEST_ABSENT_MINDED_PT2)
|
||||
{
|
||||
CAST_AI(npc_escortAI, pCreature->AI())->Start(false, true, false, pPlayer->GetGUID());
|
||||
pCreature->setFaction(FACTION_ESCORTEE);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/*####
|
||||
# npc_threshwackonator
|
||||
####*/
|
||||
|
||||
enum
|
||||
{
|
||||
EMOTE_START = -1000413,
|
||||
SAY_AT_CLOSE = -1000414,
|
||||
QUEST_GYROMAST_REV = 2078,
|
||||
NPC_GELKAK = 6667,
|
||||
FACTION_HOSTILE = 14
|
||||
};
|
||||
|
||||
#define GOSSIP_ITEM_INSERT_KEY "[PH] Insert key"
|
||||
|
||||
struct TRINITY_DLL_DECL npc_threshwackonatorAI : public ScriptedAI
|
||||
{
|
||||
npc_threshwackonatorAI(Creature* pCreature) : ScriptedAI(pCreature)
|
||||
{
|
||||
Faction = pCreature->getFaction();
|
||||
NpcFlags = pCreature->GetUInt32Value(UNIT_NPC_FLAGS);
|
||||
PlayerGUID = 0;
|
||||
}
|
||||
|
||||
uint64 PlayerGUID;
|
||||
uint32 Faction;
|
||||
uint32 NpcFlags;
|
||||
uint32 CheckPlayerTimer;
|
||||
|
||||
void Reset()
|
||||
{
|
||||
CheckPlayerTimer = 2500;
|
||||
|
||||
if(!PlayerGUID)
|
||||
{
|
||||
me->setFaction(Faction);
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, NpcFlags);
|
||||
}
|
||||
}
|
||||
|
||||
void MoveInLineOfSight(Unit* who)
|
||||
{
|
||||
if(who->GetEntry() == NPC_GELKAK)
|
||||
{
|
||||
if(PlayerGUID && me->IsWithinDistInMap(who, 10.0f))
|
||||
{
|
||||
DoScriptText(SAY_AT_CLOSE, who);
|
||||
DoAtEnd();
|
||||
}
|
||||
}
|
||||
|
||||
ScriptedAI::MoveInLineOfSight(who);
|
||||
}
|
||||
|
||||
void EnterEvadeMode()
|
||||
{
|
||||
me->RemoveAllAuras();
|
||||
me->DeleteThreatList();
|
||||
me->CombatStop(true);
|
||||
me->LoadCreaturesAddon();
|
||||
|
||||
if(me->isAlive())
|
||||
{
|
||||
if(Player* pPlayer = Unit::GetPlayer(PlayerGUID))
|
||||
me->GetMotionMaster()->MoveFollow(pPlayer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
|
||||
else
|
||||
{
|
||||
me->GetMotionMaster()->MovementExpired();
|
||||
me->GetMotionMaster()->MoveTargetedHome();
|
||||
}
|
||||
}
|
||||
|
||||
me->SetLootRecipient(NULL);
|
||||
|
||||
Reset();
|
||||
}
|
||||
|
||||
void DoStart(uint64 Starter)
|
||||
{
|
||||
PlayerGUID = Starter;
|
||||
me->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
|
||||
|
||||
if(Player* pPlayer = Unit::GetPlayer(PlayerGUID))
|
||||
me->GetMotionMaster()->MoveFollow(pPlayer, PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
|
||||
|
||||
DoScriptText(EMOTE_START, me);
|
||||
}
|
||||
|
||||
void DoAtEnd()
|
||||
{
|
||||
me->setFaction(FACTION_HOSTILE);
|
||||
|
||||
if(Player* pHolder = Unit::GetPlayer(PlayerGUID))
|
||||
me->AI()->AttackStart(pHolder);
|
||||
|
||||
PlayerGUID = 0;
|
||||
}
|
||||
|
||||
void JustDied(Unit* pKiller)
|
||||
{
|
||||
if(PlayerGUID)
|
||||
{
|
||||
PlayerGUID = 0;
|
||||
me->GetMotionMaster()->MovementExpired();
|
||||
}
|
||||
}
|
||||
|
||||
void UpdateAI(const uint32 diff)
|
||||
{
|
||||
if(PlayerGUID)
|
||||
{
|
||||
if(!me->isInCombat())
|
||||
{
|
||||
if(CheckPlayerTimer < diff)
|
||||
{
|
||||
CheckPlayerTimer = 5000;
|
||||
|
||||
Player* pPlayer = Unit::GetPlayer(PlayerGUID);
|
||||
|
||||
if(pPlayer && !pPlayer->isAlive())
|
||||
{
|
||||
PlayerGUID = 0;
|
||||
EnterEvadeMode();
|
||||
return;
|
||||
}
|
||||
}else CheckPlayerTimer -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
if(!UpdateVictim())
|
||||
return;
|
||||
|
||||
DoMeleeAttackIfReady();
|
||||
}
|
||||
};
|
||||
|
||||
CreatureAI* GetAI_npc_threshwackonator(Creature* pCreature)
|
||||
{
|
||||
return new npc_threshwackonatorAI(pCreature);
|
||||
}
|
||||
|
||||
bool GossipHello_npc_threshwackonator(Player* pPlayer, Creature* pCreature)
|
||||
{
|
||||
if(pPlayer->GetQuestStatus(QUEST_GYROMAST_REV) == QUEST_STATUS_INCOMPLETE)
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_INSERT_KEY, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
|
||||
|
||||
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_threshwackonator(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 action)
|
||||
{
|
||||
if(action == GOSSIP_ACTION_INFO_DEF+1)
|
||||
{
|
||||
CAST_AI(npc_threshwackonatorAI, pCreature->AI())->DoStart(pPlayer->GetGUID());
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void AddSC_darkshore()
|
||||
{
|
||||
Script *newscript;
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_prospector_remtravel";
|
||||
newscript->GetAI = &GetAI_npc_prospector_remtravel;
|
||||
newscript->pQuestAccept = &QuestAccept_npc_prospector_remtravel;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_threshwackonator";
|
||||
newscript->GetAI = &GetAI_npc_threshwackonator;
|
||||
newscript->pGossipHello = &GossipHello_npc_threshwackonator;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_threshwackonator;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_threshwackonator;
|
||||
newscript->RegisterSelf();
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ EndScriptData */
|
||||
|
||||
/* ContentData
|
||||
npcs_dithers_and_arbington
|
||||
npc_myranda_the_hag
|
||||
npc_the_scourge_cauldron
|
||||
EndContentData */
|
||||
|
||||
@@ -90,6 +91,47 @@ bool GossipSelect_npcs_dithers_and_arbington(Player *player, Creature *_Creature
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_myranda_the_hag
|
||||
######*/
|
||||
|
||||
enum
|
||||
{
|
||||
QUEST_SUBTERFUGE = 5862,
|
||||
QUEST_IN_DREAMS = 5944,
|
||||
SPELL_SCARLET_ILLUSION = 17961
|
||||
};
|
||||
|
||||
#define GOSSIP_ITEM_ILLUSION "I am ready for the illusion, Myranda."
|
||||
|
||||
bool GossipHello_npc_myranda_the_hag(Player* pPlayer, Creature* pCreature)
|
||||
{
|
||||
if(pCreature->isQuestGiver())
|
||||
pPlayer->PrepareQuestMenu(pCreature->GetGUID());
|
||||
|
||||
if(pPlayer->GetQuestStatus(QUEST_SUBTERFUGE) == QUEST_STATUS_COMPLETE &&
|
||||
!pPlayer->GetQuestRewardStatus(QUEST_IN_DREAMS) && !pPlayer->HasAura(SPELL_SCARLET_ILLUSION))
|
||||
{
|
||||
pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_ILLUSION, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
|
||||
pPlayer->SEND_GOSSIP_MENU(4773, pCreature->GetGUID());
|
||||
return true;
|
||||
}
|
||||
else
|
||||
pPlayer->SEND_GOSSIP_MENU(pCreature->GetNpcTextId(), pCreature->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool GossipSelect_npc_myranda_the_hag(Player* pPlayer, Creature* pCreature, uint32 Sender, uint32 Action)
|
||||
{
|
||||
if(Action == GOSSIP_ACTION_INFO_DEF + 1)
|
||||
{
|
||||
pPlayer->CLOSE_GOSSIP_MENU();
|
||||
pCreature->CastSpell(pPlayer, SPELL_SCARLET_ILLUSION, false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
/*######
|
||||
## npc_the_scourge_cauldron
|
||||
######*/
|
||||
@@ -176,6 +218,12 @@ void AddSC_western_plaguelands()
|
||||
newscript->pGossipSelect = &GossipSelect_npcs_dithers_and_arbington;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name = "npc_myranda_the_hag";
|
||||
newscript->pGossipHello = &GossipHello_npc_myranda_the_hag;
|
||||
newscript->pGossipSelect = &GossipSelect_npc_myranda_the_hag;
|
||||
newscript->RegisterSelf();
|
||||
|
||||
newscript = new Script;
|
||||
newscript->Name="npc_the_scourge_cauldron";
|
||||
newscript->GetAI = &GetAI_npc_the_scourge_cauldron;
|
||||
|
||||
Reference in New Issue
Block a user