Core/scripts: core support for escort Stinkys Escape!
Thanks to Kiper --HG-- branch : trunk
This commit is contained in:
@@ -0,0 +1,12 @@
|
|||||||
|
DELETE FROM script_texts WHERE entry BETWEEN -1000516 AND -1000507;
|
||||||
|
INSERT INTO script_texts (npc_entry,entry,content_default,sound,type,language,emote,comment) VALUES
|
||||||
|
(4880, -1000507,'Ok, let''s get started.',0,0,0,0,'stinky - quest accepted'),
|
||||||
|
(4880, -1000508,'Now let''s look for the herb.',0,0,0,0,'stinky - say1'),
|
||||||
|
(4880, -1000509,'Nope, not here...',0,0,0,0,'stinky - say2'),
|
||||||
|
(4880, -1000510,'There must be one around here somewhere...',0,0,0,0,'stinky - say3'),
|
||||||
|
(4880, -1000511,'Ah, there''s one! ',0,0,0,0,'stinky - say4'),
|
||||||
|
(4880, -1000512,'Come, $N! Let''s go over there and collect it!',0,0,0,0,'stinky - say5'),
|
||||||
|
(4880, -1000513,'Ok, now let''s get out of here! ',0,0,0,0,'stinky - say6'),
|
||||||
|
(4880, -1000514,'I can make it from here. Thanks, $N! And talk to my employer about a reward!',0,0,0,0,'stinky - quest complete'),
|
||||||
|
(4880, -1000515,'Help! The beast is on me!',0,0,0,0,'stinky - aggro'),
|
||||||
|
(4880, -1000516,'%s disappears back into the swamp.',0,2,0,0,'stinky - emote disapper');
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
DELETE FROM script_waypoint WHERE entry=4880;
|
||||||
|
INSERT INTO `script_waypoint` VALUES
|
||||||
|
(4880,0,-2646.429932,-3436.070068,35.373199,0, ''),
|
||||||
|
(4880,1,-2650.82617,-3440.15332,35.138092,0, ''),
|
||||||
|
(4880,2,-2662.3147,-3447.67285,35.10891,0, ''),
|
||||||
|
(4880,3,-2680.4834,-3454.59766,34.6538124,0, ''),
|
||||||
|
(4880,4,-2701.01855,-3457.43628,34.26906,0, ''),
|
||||||
|
(4880,5,-2724.063,-3458.63623,33.6734657,0, ''),
|
||||||
|
(4880,6,-2745.0127,-3459.28125,32.53458,0, ''),
|
||||||
|
(4880,7,-2759.419,-3464.78174,32.714283,3000, ''),
|
||||||
|
(4880,8,-2763.63,-3471.50732,33.53883,0, ''),
|
||||||
|
(4880,9,-2771.789,-3480.88721,33.2553253,0, ''),
|
||||||
|
(4880,10,-2780.66455,-3488.76343,31.8750439,0, ''),
|
||||||
|
(4880,11,-2796.144775,-3489.013184,30.858467,3000, ''),
|
||||||
|
(4880,12,-2792.117920,-3495.966797,30.732433,0, ''),
|
||||||
|
(4880,13,-2789.059814,-3502.372559,30.670414,0, ''),
|
||||||
|
(4880,14,-2787.715576,-3515.013428,31.117569,0, ''),
|
||||||
|
(4880,15,-2790.841309,-3523.311768,30.573286,0, ''),
|
||||||
|
(4880,16,-2796.58545,-3520.61963,29.9187489,0, ''),
|
||||||
|
(4880,17,-2798.563,-3518.91064,30.3887444,0, ''),
|
||||||
|
(4880,18,-2801.46875,-3516.745,30.1914845,0, ''),
|
||||||
|
(4880,19,-2804.356201,-3513.899170,29.550812,0, ''),
|
||||||
|
(4880,20,-2807.97559,-3517.99634,29.94883,0, ''),
|
||||||
|
(4880,21,-2815.680664,-3521.739014,29.772268,0, ''),
|
||||||
|
(4880,22,-2823.386230,-3526.234131,31.71944,0, ''),
|
||||||
|
(4880,23,-2836.109619,-3544.695557,32.493855,0, ''),
|
||||||
|
(4880,24,-2830.392578,-3568.862305,30.410404,0, ''),
|
||||||
|
(4880,25,-2824.842285,-3569.516846,31.281128,0, ''),
|
||||||
|
(4880,26,-2818.663818,-3567.801025,30.920368,6000, ''),
|
||||||
|
(4880,27,-2817.663818,-3568.935059,30.431194,6000, ''),
|
||||||
|
(4880,28,-2820.394043,-3592.223389,30.716301,6000, ''),
|
||||||
|
(4880,29,-2820.765625,-3592.497803,30.886147,0, ''),
|
||||||
|
(4880,30,-2829.909424,-3588.730713,30.683064,0, ''),
|
||||||
|
(4880,31,-2842.322021,-3577.498291,36.848869,0, ''),
|
||||||
|
(4880,32,-2851.180420,-3567.579346,38.515850,0, ''),
|
||||||
|
(4880,33,-2865.554932,-3551.582275,41.438988,0, ''),
|
||||||
|
(4880,34,-2871.234863,-3548.145020,40.761391,0, ''),
|
||||||
|
(4880,35,-2877.840332,-3544.147461,38.670235,0, ''),
|
||||||
|
(4880,36,-2890.394775,-3542.388672,34.314426,0, ''),
|
||||||
|
(4880,37,-2898.729980,-3543.635742,34.319958,6000, ''),
|
||||||
|
(4880,38,-2910.064453,-3568.957275,34.250011,0, ''),
|
||||||
|
(4880,39,-2932.509766,-3584.618652,37.238464,0, '');
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
UPDATE creature_template SET ScriptName='npc_stinky' WHERE entry=4880;
|
||||||
@@ -34,6 +34,7 @@ npc_cassa_crimsonwing - handled by npc_taxi
|
|||||||
EndContentData */
|
EndContentData */
|
||||||
|
|
||||||
#include "ScriptPCH.h"
|
#include "ScriptPCH.h"
|
||||||
|
#include "ScriptedEscortAI.h"
|
||||||
|
|
||||||
/*######
|
/*######
|
||||||
## mobs_risen_husk_spirit
|
## mobs_risen_husk_spirit
|
||||||
@@ -438,6 +439,133 @@ public:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/////////////////////
|
||||||
|
/// npc_stinky
|
||||||
|
/////////////////////
|
||||||
|
|
||||||
|
enum eStinky
|
||||||
|
{
|
||||||
|
QUEST_STINKYS_ESCAPE_H = 1270,
|
||||||
|
QUEST_STINKYS_ESCAPE_A = 1222,
|
||||||
|
SAY_QUEST_ACCEPTED = -1000507,
|
||||||
|
SAY_STAY_1 = -1000508,
|
||||||
|
SAY_STAY_2 = -1000509,
|
||||||
|
SAY_STAY_3 = -1000510,
|
||||||
|
SAY_STAY_4 = -1000511,
|
||||||
|
SAY_STAY_5 = -1000512,
|
||||||
|
SAY_STAY_6 = -1000513,
|
||||||
|
SAY_QUEST_COMPLETE = -1000514,
|
||||||
|
SAY_ATTACKED_1 = -1000515,
|
||||||
|
EMOTE_DISAPPEAR = -1000516
|
||||||
|
};
|
||||||
|
|
||||||
|
class npc_stinky : public CreatureScript
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
npc_stinky() : CreatureScript("npc_stinky") { }
|
||||||
|
|
||||||
|
CreatureAI* GetAI(Creature* pCreature) const
|
||||||
|
{
|
||||||
|
return new npc_stinkyAI(pCreature);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool OnQuestAccept(Player* pPlayer, Creature* pCreature, Quest const *quest)
|
||||||
|
{
|
||||||
|
if (quest->GetQuestId() == QUEST_STINKYS_ESCAPE_H || QUEST_STINKYS_ESCAPE_A)
|
||||||
|
{
|
||||||
|
if (npc_stinkyAI* pEscortAI = CAST_AI(npc_stinky::npc_stinkyAI, pCreature->AI()))
|
||||||
|
{
|
||||||
|
pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_ACTIVE);
|
||||||
|
pCreature->SetStandState(UNIT_STAND_STATE_STAND);
|
||||||
|
DoScriptText(SAY_QUEST_ACCEPTED, pCreature);
|
||||||
|
pEscortAI->Start(false, false, pPlayer->GetGUID());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
struct npc_stinkyAI : public npc_escortAI
|
||||||
|
{
|
||||||
|
npc_stinkyAI(Creature* pCreature) : npc_escortAI(pCreature) { }
|
||||||
|
|
||||||
|
|
||||||
|
void WaypointReached(uint32 i)
|
||||||
|
{
|
||||||
|
Player* pPlayer = GetPlayerForEscort();
|
||||||
|
if (!pPlayer)
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch (i)
|
||||||
|
{
|
||||||
|
case 7:
|
||||||
|
DoScriptText(SAY_STAY_1, me, pPlayer);
|
||||||
|
break;
|
||||||
|
case 11:
|
||||||
|
DoScriptText(SAY_STAY_2, me, pPlayer);
|
||||||
|
break;
|
||||||
|
case 25:
|
||||||
|
DoScriptText(SAY_STAY_3, me, pPlayer);
|
||||||
|
break;
|
||||||
|
case 26:
|
||||||
|
DoScriptText(SAY_STAY_4, me, pPlayer);
|
||||||
|
break;
|
||||||
|
case 27:
|
||||||
|
DoScriptText(SAY_STAY_5, me, pPlayer);
|
||||||
|
break;
|
||||||
|
case 28:
|
||||||
|
DoScriptText(SAY_STAY_6, me, pPlayer);
|
||||||
|
me->SetStandState(UNIT_STAND_STATE_KNEEL);
|
||||||
|
break;
|
||||||
|
case 29:
|
||||||
|
me->SetStandState(UNIT_STAND_STATE_STAND);
|
||||||
|
break;
|
||||||
|
case 37:
|
||||||
|
DoScriptText(SAY_QUEST_COMPLETE, me, pPlayer);
|
||||||
|
me->SetSpeed(MOVE_RUN, 1.2f, true);
|
||||||
|
me->RemoveUnitMovementFlag(MOVEMENTFLAG_WALKING);
|
||||||
|
if (pPlayer && pPlayer->GetQuestStatus(QUEST_STINKYS_ESCAPE_H))
|
||||||
|
pPlayer->GroupEventHappens(QUEST_STINKYS_ESCAPE_H, me);
|
||||||
|
if (pPlayer && pPlayer->GetQuestStatus(QUEST_STINKYS_ESCAPE_A))
|
||||||
|
pPlayer->GroupEventHappens(QUEST_STINKYS_ESCAPE_A, me);
|
||||||
|
break;
|
||||||
|
case 39:
|
||||||
|
DoScriptText(EMOTE_DISAPPEAR, me);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void EnterCombat(Unit* pWho)
|
||||||
|
{
|
||||||
|
DoScriptText(SAY_ATTACKED_1, me, pWho);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Reset() {}
|
||||||
|
|
||||||
|
void JustDied(Unit* /*pKiller*/)
|
||||||
|
{
|
||||||
|
Player* pPlayer = GetPlayerForEscort();
|
||||||
|
if (HasEscortState(STATE_ESCORT_ESCORTING) && pPlayer)
|
||||||
|
{
|
||||||
|
if (pPlayer->GetQuestStatus(QUEST_STINKYS_ESCAPE_H))
|
||||||
|
pPlayer->FailQuest(QUEST_STINKYS_ESCAPE_H);
|
||||||
|
if (pPlayer->GetQuestStatus(QUEST_STINKYS_ESCAPE_A))
|
||||||
|
pPlayer->FailQuest(QUEST_STINKYS_ESCAPE_A);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateAI(const uint32 uiDiff)
|
||||||
|
{
|
||||||
|
npc_escortAI::UpdateAI(uiDiff);
|
||||||
|
|
||||||
|
if (!UpdateVictim())
|
||||||
|
return;
|
||||||
|
|
||||||
|
DoMeleeAttackIfReady();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
void AddSC_dustwallow_marsh()
|
void AddSC_dustwallow_marsh()
|
||||||
{
|
{
|
||||||
@@ -448,4 +576,5 @@ void AddSC_dustwallow_marsh()
|
|||||||
new npc_nat_pagle();
|
new npc_nat_pagle();
|
||||||
new npc_private_hendel();
|
new npc_private_hendel();
|
||||||
new npc_zelfrax();
|
new npc_zelfrax();
|
||||||
|
new npc_stinky();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user