aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/FULL/world_script_texts.sql9
-rw-r--r--sql/FULL/world_scripts_full.sql1
-rw-r--r--sql/updates/7437_world_script_texts.sql5
-rw-r--r--sql/updates/7437_world_scriptname.sql1
-rw-r--r--src/scripts/northrend/zuldrak.cpp111
5 files changed, 124 insertions, 3 deletions
diff --git a/sql/FULL/world_script_texts.sql b/sql/FULL/world_script_texts.sql
index 51303ce242a..0ca0a2f3aee 100644
--- a/sql/FULL/world_script_texts.sql
+++ b/sql/FULL/world_script_texts.sql
@@ -1,4 +1,4 @@
--- Up to TC2 5408
+-- Up to TC2 5408
--
-- trinityscript_script_texts.sql Contains data for table `script_texts` mainly used in C++ parts.
-- valid entries for table are between -1000000 and -1999999
@@ -1712,8 +1712,11 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1`
(30007,-1571031,'This battle must be seen to be believed! Once a mild-mannered tuskarr fisherman, our next fighter turned to the life of a soulless mercenary when his entire family was wiped out by a vicious pack of lion seals and III-tempered penguins! Now he''s just In It for the gold! Ladies and gentlemen, ORINOKO TUSKBREAKER!!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13363,1,0,0,''),
(30020,-1571032,'Whisker! Where are you? Assist me!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''),
(30007,-1571033,'The champion of the Winterax trolls has challenged you, Treeofdoom! I hope you''re ready!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''),
- (30007,-1571034,'Hailling from the distant mountains of Alterac, one of the fiercest competitors this arena has ever seen: KORRAK THE BLOODRAGER!!!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13363,1,0,0,''),
- (30007,-1571035,'The battle is about to begin! Am I reading this card right It... It''s the nefarious magnataur lord, STINKBEARD! Yes, folks, STINKBEARD! Chitchat dosen''t stand a chance!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13363,1,0,0,''),
+ (30007,-1571034,'Hailling from the distant mountains of Alterac, one of the fiercest competitors this arena has ever seen: KORRAK THE BLOODRAGER!!!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13363,1,0,0,''),
+ (30007,-1571035,'The battle is about to begin! Am I reading this card right It... It''s the nefarious magnataur lord, STINKBEARD! Yes, folks, STINKBEARD! Chitchat dosen''t stand a chance!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13363,1,0,0,''),
+ (28090,-1571036, 'We''ll cleanse this place! Arthas beware!',0,0, 'crusade recruit RECRUIT_SAY1'),
+ (28090,-1571037, 'Your''re right! We can do this!',0,0, 'crusade recruit RECRUIT_SAY2'),
+ (28090,-1571038, 'Your''re right! What was I thinking? Bring on the Scourge!',0,0, 'crusade recruit RECRUIT_SAY3'),
-- -1 574 000 UTGARDE KEEP
(23953,-1574000,'Your blood is mine!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,13221,1,0,0,'keleseth SAY_AGGRO'),
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index 7f1df0508fe..9b851a8c48d 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -1415,6 +1415,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_korrak_bloodrager' WHERE `entry
UPDATE `creature_template` SET `ScriptName`='npc_yggdras' WHERE `entry`=30014;
UPDATE `creature_template` SET `ScriptName`='npc_released_offspring_harkoa' WHERE `entry`=28526;
UPDATE `creature_template` SET `ScriptName`='npc_stinkbeard' WHERE `entry`=30017;
+UPDATE `creature_template` SET `ScriptName`= 'npc_crusade_recruit' WHERE `entry`=28090;
/* ZUL'FARRAK */
UPDATE `creature_template` SET `ScriptName`='npc_sergeant_bly' WHERE `entry`=7604;
diff --git a/sql/updates/7437_world_script_texts.sql b/sql/updates/7437_world_script_texts.sql
new file mode 100644
index 00000000000..75dda3fdcac
--- /dev/null
+++ b/sql/updates/7437_world_script_texts.sql
@@ -0,0 +1,5 @@
+DELETE FROM `script_texts` WHERE `entry` IN (-1571036,-1571037,-1571038);
+INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`type`,`language`,`comment`) VALUES
+(28090,-1571036, 'We''ll cleanse this place! Arthas beware!',0,0, 'crusade recruit RECRUIT_SAY1'),
+(28090,-1571037, 'Your''re right! We can do this!',0,0, 'crusade recruit RECRUIT_SAY2'),
+(28090,-1571038, 'Your''re right! What was I thinking? Bring on the Scourge!',0,0, 'crusade recruit RECRUIT_SAY3'); \ No newline at end of file
diff --git a/sql/updates/7437_world_scriptname.sql b/sql/updates/7437_world_scriptname.sql
new file mode 100644
index 00000000000..4b92598ccdc
--- /dev/null
+++ b/sql/updates/7437_world_scriptname.sql
@@ -0,0 +1 @@
+UPDATE `creature_template` SET `ScriptName`='npc_crusade_recruit' WHERE `entry`=28090; \ No newline at end of file
diff --git a/src/scripts/northrend/zuldrak.cpp b/src/scripts/northrend/zuldrak.cpp
index b7d6ff63e8f..6b43c7bf430 100644
--- a/src/scripts/northrend/zuldrak.cpp
+++ b/src/scripts/northrend/zuldrak.cpp
@@ -891,6 +891,111 @@ CreatureAI* GetAI_npc_released_offspring_harkoa(Creature* pCreature)
return new npc_released_offspring_harkoaAI(pCreature);
}
+/*######
+## npc_crusade_recruit
+######*/
+
+enum eCrusade_recruit
+{
+ SPELL_QUEST_CREDIT = 50633,
+
+ QUEST_TROLL_PATROL_INTESTINAL_FORTITUDE = 12509,
+
+ GOSSIP_CRUSADE_TEXT = 13069,
+
+ SAY_RECRUIT_1 = -1571036,
+ SAY_RECRUIT_2 = -1571037,
+ SAY_RECRUIT_3 = -1571038
+};
+
+#define GOSSIP_ITEM_1 "Get out there and make those Scourge wish they were never reborn!"
+
+struct npc_crusade_recruitAI : public ScriptedAI
+{
+ npc_crusade_recruitAI(Creature* pCreature) : ScriptedAI(pCreature) {}
+
+ uint8 m_uiPhase; //The current phase we are in
+ uint32 m_uiTimer; //Timer until phase transition
+ float m_heading; //Store creature heading
+
+ void Reset()
+ {
+ m_uiTimer = 0;
+ m_uiPhase = 0;
+ m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_COWER);
+ m_heading = m_creature->GetOrientation();
+ }
+
+ void UpdateAI(const uint32 uiDiff)
+ {
+ if (m_uiPhase)
+ {
+ if (m_uiTimer <= uiDiff)
+ {
+ switch(m_uiPhase)
+ {
+ case 1:
+ // say random text
+ m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
+ m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_NONE);
+ DoScriptText(RAND(SAY_RECRUIT_1,SAY_RECRUIT_2,SAY_RECRUIT_3), m_creature);
+ m_uiTimer = 3000;
+ m_uiPhase = 2;
+ break;
+ case 2:
+ // walk forward
+ m_creature->AddUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
+ m_creature->GetMotionMaster()->MovePoint(0,m_creature->GetPositionX() + (cos(m_heading) * 10), m_creature->GetPositionY() + (sin(m_heading) * 10), m_creature->GetPositionZ());
+ m_uiTimer = 5000;
+ m_uiPhase = 3;
+ break;
+ case 3:
+ // despawn
+ m_creature->DisappearAndDie();
+ m_uiTimer = 0;
+ m_uiPhase = 0;
+ break;
+ }
+ }
+ else
+ m_uiTimer -= uiDiff;
+ }
+ ScriptedAI::UpdateAI(uiDiff);
+
+ if (!UpdateVictim())
+ return;
+ }
+};
+
+CreatureAI* GetAI_npc_crusade_recruit(Creature* pCreature)
+{
+ return new npc_crusade_recruitAI (pCreature);
+}
+
+bool GossipHello_npc_crusade_recruit(Player* pPlayer, Creature* pCreature)
+{
+ if (pPlayer->GetQuestStatus(QUEST_TROLL_PATROL_INTESTINAL_FORTITUDE) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
+
+ pPlayer->SEND_GOSSIP_MENU(GOSSIP_CRUSADE_TEXT, pCreature->GetGUID());
+ return true;
+}
+
+bool GossipSelect_npc_crusade_recruit(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction)
+{
+ if (uiAction == GOSSIP_ACTION_INFO_DEF +1)
+ {
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pCreature->CastSpell(pPlayer, SPELL_QUEST_CREDIT, true);
+ CAST_AI(npc_crusade_recruitAI, (pCreature->AI()))->m_uiPhase = 1;
+ pCreature->SetInFront(pPlayer);
+ pCreature->SendMovementFlagUpdate();
+ }
+
+ return true;
+}
+
void AddSC_zuldrak()
{
Script *newscript;
@@ -941,4 +1046,10 @@ void AddSC_zuldrak()
newscript->Name = "npc_released_offspring_harkoa";
newscript->GetAI = &GetAI_npc_released_offspring_harkoa;
newscript->RegisterSelf();
+
+ newscript->Name = "npc_crusade_recruit";
+ newscript->GetAI = &GetAI_npc_crusade_recruit;
+ newscript->pGossipHello = &GossipHello_npc_crusade_recruit;
+ newscript->pGossipSelect = &GossipSelect_npc_crusade_recruit;
+ newscript->RegisterSelf();
}