aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/857_world_scripts.sql1
-rw-r--r--src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp123
-rw-r--r--src/bindings/scripts/scripts/zone/undercity/undercity.cpp2
3 files changed, 124 insertions, 2 deletions
diff --git a/sql/updates/857_world_scripts.sql b/sql/updates/857_world_scripts.sql
new file mode 100644
index 00000000000..3a34d80ee76
--- /dev/null
+++ b/sql/updates/857_world_scripts.sql
@@ -0,0 +1 @@
+update creature_template set scriptname='npc_kaya_flathoof' where entry=11856; \ No newline at end of file
diff --git a/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp b/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp
index 28f0c644726..a5ea8dd2226 100644
--- a/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp
+++ b/src/bindings/scripts/scripts/zone/stonetalon_mountains/stonetalon_mountains.cpp
@@ -17,11 +17,17 @@
/* ScriptData
SDName: Stonetalon_Mountains
SD%Complete: 95
-SDComment: Quest support: 6627 (Braug Dimspirits questions/'answers' might have more to it, need more info)
+SDComment: Quest support: 6627, 6523
SDCategory: Stonetalon Mountains
EndScriptData */
+/* ContentData
+npc_braug_dimspirit
+npc_kaya_flathoof
+EndContentData */
+
#include "precompiled.h"
+#include "../../npc/npc_escortAI.h"
/*######
## npc_braug_dimspirit
@@ -65,6 +71,115 @@ bool GossipSelect_npc_braug_dimspirit(Player *player, Creature *_Creature, uint3
}
/*######
+## npc_kaya_flathoof
+######*/
+
+#define SAY_START "Let's go before they find out I'm free!"
+#define SAY_AMBUSH "Look out! We're under attack!"
+#define SAY_END "Thank you for helping me. I know my way back from here."
+
+#define QUEST_PK 6523
+#define MOB_GB 11912
+#define MOB_GR 11910
+#define MOB_GS 11913
+
+struct TRINITY_DLL_DECL npc_kaya_flathoofAI : public npc_escortAI
+{
+ npc_kaya_flathoofAI(Creature* c) : npc_escortAI(c) {Reset();}
+
+ void WaypointReached(uint32 i)
+ {
+ Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
+
+ if(!player)
+ return;
+
+ switch(i)
+ {
+ case 22:
+ DoSay(SAY_AMBUSH, LANG_UNIVERSAL, NULL);
+ m_creature->SummonCreature(MOB_GB, -48.53, -503.34, -46.31, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ m_creature->SummonCreature(MOB_GR, -38.85, -503.77, -45.90, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ m_creature->SummonCreature(MOB_GS, -36.37, -496.23, -45.71, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000);
+ break;
+ case 23: m_creature->SetInFront(player);
+ DoSay(SAY_END, LANG_UNIVERSAL, player, true);
+ if (player && player->GetTypeId() == TYPEID_PLAYER)
+ ((Player*)player)->GroupEventHappens(QUEST_PK, m_creature);
+ break;
+ }
+ }
+
+ void JustSummoned(Creature* summoned)
+ {
+ summoned->AI()->AttackStart(m_creature);
+ }
+
+ void Reset(){}
+
+ void Aggro(Unit* who){}
+
+ void JustDied(Unit* killer)
+ {
+ if (PlayerGUID)
+ {
+ Unit* player = Unit::GetUnit((*m_creature), PlayerGUID);
+ if (player)
+ ((Player*)player)->FailQuest(QUEST_PK);
+ }
+ }
+
+ void UpdateAI(const uint32 diff)
+ {
+ npc_escortAI::UpdateAI(diff);
+ }
+};
+
+bool QuestAccept_npc_kaya_flathoof(Player* player, Creature* creature, Quest const* quest)
+{
+ if (quest->GetQuestId() == QUEST_PK)
+ {
+ ((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID());
+ creature->Say(SAY_START, LANG_UNIVERSAL, NULL);
+ creature->setFaction(113);
+ creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_2);
+ }
+ return true;
+}
+
+CreatureAI* GetAI_npc_kaya_flathoofAI(Creature *_Creature)
+{
+ npc_kaya_flathoofAI* thisAI = new npc_kaya_flathoofAI(_Creature);
+
+ thisAI->AddWaypoint(0, 122.37, -345.80, 3.59);
+ thisAI->AddWaypoint(1, 113.69, -350.01, 4.54);
+ thisAI->AddWaypoint(2, 107.32, -353.09, 3.33);
+ thisAI->AddWaypoint(3, 99.25, -342.43, 2.87);
+ thisAI->AddWaypoint(4, 111.19, -315.60, 3.71);
+ thisAI->AddWaypoint(5, 109.99, -293.92, 5.16);
+ thisAI->AddWaypoint(6, 104.59, -268.27, 4.78);
+ thisAI->AddWaypoint(7, 82.80, -247.28, 5.73);
+ thisAI->AddWaypoint(8, 66.44, -245.99, 5.85);
+ thisAI->AddWaypoint(9, 34.36, -246.01, 5.97);
+ thisAI->AddWaypoint(10, 13.24, -245.61, 5.25);
+ thisAI->AddWaypoint(11, -10.27, -248.66, 4.69);
+ thisAI->AddWaypoint(12, -26.07, -262.76, 0.01);
+ thisAI->AddWaypoint(13, -33.15, -282.03, -4.12);
+ thisAI->AddWaypoint(14, -28.42, -315.52, -8.56);
+ thisAI->AddWaypoint(15, -32.05, -339.34, -10.84);
+ thisAI->AddWaypoint(16, -35.22, -358.11, -16.20);
+ thisAI->AddWaypoint(17, -51.57, -391.63, -24.85);
+ thisAI->AddWaypoint(18, -58.58, -409.08, -29.97);
+ thisAI->AddWaypoint(19, -60.37, -441.23, -36.80);
+ thisAI->AddWaypoint(20, -59.03, -476.39, -44.98);
+ thisAI->AddWaypoint(21, -53.18, -490.31, -46.11);
+ thisAI->AddWaypoint(22, -43.77, -497.99, -46.13, 3000);// summon
+ thisAI->AddWaypoint(23, -41.77, -518.15, -46.13, 5000);//end
+
+ return (CreatureAI*)thisAI;
+}
+
+/*######
## AddSC
######*/
@@ -77,4 +192,10 @@ void AddSC_stonetalon_mountains()
newscript->pGossipHello = &GossipHello_npc_braug_dimspirit;
newscript->pGossipSelect = &GossipSelect_npc_braug_dimspirit;
newscript->RegisterSelf();
+
+ newscript = new Script;
+ newscript->Name="npc_kaya_flathoof";
+ newscript->GetAI = &GetAI_npc_kaya_flathoofAI;
+ newscript->pQuestAccept = &QuestAccept_npc_kaya_flathoof;
+ newscript->RegisterSelf();
}
diff --git a/src/bindings/scripts/scripts/zone/undercity/undercity.cpp b/src/bindings/scripts/scripts/zone/undercity/undercity.cpp
index 9b2dc13ac20..a5ba4abfd9a 100644
--- a/src/bindings/scripts/scripts/zone/undercity/undercity.cpp
+++ b/src/bindings/scripts/scripts/zone/undercity/undercity.cpp
@@ -17,7 +17,7 @@
/* ScriptData
SDName: Undercity
SD%Complete: 95
-SDComment: Quest support: 6628(Parqual Fintallas questions/'answers' might have more to it, need more info), 9180(post-event).
+SDComment: Quest support: 6628, 9180(post-event).
SDCategory: Undercity
EndScriptData */