aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts/Kalimdor
diff options
context:
space:
mode:
authorBrian <runningnak3d@gmail.com>2010-07-08 02:22:20 -0600
committerBrian <runningnak3d@gmail.com>2010-07-08 02:22:20 -0600
commite761d578dadabd4514867764a2ceec61928bf902 (patch)
treee73dae86574f372be3dc37492c480e30f1b55ed7 /src/server/scripts/Kalimdor
parent668de35042674b95474965847227d9f26f8ca412 (diff)
* Implement proper script support for quest "The Prophecy of Akida" (9544)
* Script by antihrist --HG-- branch : trunk
Diffstat (limited to 'src/server/scripts/Kalimdor')
-rwxr-xr-xsrc/server/scripts/Kalimdor/azuremyst_isle.cpp71
1 files changed, 71 insertions, 0 deletions
diff --git a/src/server/scripts/Kalimdor/azuremyst_isle.cpp b/src/server/scripts/Kalimdor/azuremyst_isle.cpp
index 131e91b65b3..ca35b48b970 100755
--- a/src/server/scripts/Kalimdor/azuremyst_isle.cpp
+++ b/src/server/scripts/Kalimdor/azuremyst_isle.cpp
@@ -669,6 +669,67 @@ CreatureAI* GetAI_npc_death_ravagerAI(Creature* pCreature)
return new npc_death_ravagerAI(pCreature);
}
+/*########
+## Quest: The Prophecy of Akida
+########*/
+enum BristlelimbCage
+{
+ QUEST_THE_PROPHECY_OF_AKIDA = 9544,
+ NPC_STILLPINE_CAPITIVE = 17375,
+ GO_BRISTELIMB_CAGE = 181714,
+ CAPITIVE_SAY_1 = -1000474,
+ CAPITIVE_SAY_2 = -1000475,
+ CAPITIVE_SAY_3 = -1000476
+};
+
+
+struct npc_stillpine_capitiveAI : public ScriptedAI
+{
+ npc_stillpine_capitiveAI(Creature *c) : ScriptedAI(c){}
+
+ uint32 FleeTimer;
+
+ void Reset()
+ {
+ FleeTimer = 0;
+ GameObject* cage = me->FindNearestGameObject(GO_BRISTELIMB_CAGE, 5.0f);
+ if(cage)
+ cage->ResetDoorOrButton();
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ if(FleeTimer)
+ {
+ if(FleeTimer <= diff)
+ me->ForcedDespawn();
+ else FleeTimer -= diff;
+ }
+ }
+};
+
+CreatureAI* GetAI_npc_stillpine_capitiveAI(Creature* pCreature)
+{
+ return new npc_stillpine_capitiveAI(pCreature);
+}
+
+bool go_bristlelimb_cage(Player* pPlayer, GameObject* pGo)
+{
+ if(pPlayer->GetQuestStatus(QUEST_THE_PROPHECY_OF_AKIDA) == QUEST_STATUS_INCOMPLETE)
+ {
+ Creature* pCreature = pGo->FindNearestCreature(NPC_STILLPINE_CAPITIVE, 5.0f, true);
+ if(pCreature)
+ {
+ DoScriptText(RAND(CAPITIVE_SAY_1, CAPITIVE_SAY_2, CAPITIVE_SAY_3), pCreature, pPlayer);
+ pCreature->GetMotionMaster()->MoveFleeing(pPlayer, 3500);
+ pPlayer->KilledMonsterCredit(pCreature->GetEntry(), pCreature->GetGUID());
+ CAST_AI(npc_stillpine_capitiveAI, pCreature->AI())->FleeTimer = 3500;
+ return false;
+ }
+ }
+ return true;
+}
+
void AddSC_azuremyst_isle()
{
Script *newscript;
@@ -716,5 +777,15 @@ void AddSC_azuremyst_isle()
newscript->Name="go_ravager_cage";
newscript->pGOHello = &go_ravager_cage;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="npc_stillpine_capitive";
+ newscript->GetAI = &GetAI_npc_stillpine_capitiveAI;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="go_bristlelimb_cage";
+ newscript->pGOHello = &go_bristlelimb_cage;
+ newscript->RegisterSelf();
}