aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKudlaty <none@none>2009-08-20 22:18:41 +0200
committerKudlaty <none@none>2009-08-20 22:18:41 +0200
commita63b457b3cfe5f1ceecd42c1fb15866d9981a6fb (patch)
tree24c02c198026422d6da66dc1d22f6204ca3f8e50
parent2035948f6351c37942f034881dd0cd4c427283bf (diff)
Script for quest 12969. Script by Gyullo
--HG-- branch : trunk
-rw-r--r--sql/FULL/world_script_texts.sql3
-rw-r--r--sql/FULL/world_scripts_full.sql1
-rw-r--r--sql/updates/5234_world_scripts.sql4
-rw-r--r--src/bindings/scripts/scripts/northrend/storm_peaks.cpp58
4 files changed, 65 insertions, 1 deletions
diff --git a/sql/FULL/world_script_texts.sql b/sql/FULL/world_script_texts.sql
index 94b1a054bfc..eb6fd58f6a2 100644
--- a/sql/FULL/world_script_texts.sql
+++ b/sql/FULL/world_script_texts.sql
@@ -1601,7 +1601,8 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content
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
(-1571000,'You save me! We thank you. We going to go back to village now. You come too... you can stay with us! Puppy-men kind of mean anyway. ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0,'npc_injured_rainspeaker_oracle SAY_END_IRO'),
(-1571001,'Let me know when you ready to go, okay?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0,'npc_injured_rainspeaker_oracle SAY_QUEST_ACCEPT_IRO '),
-(-1571002,'Home time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0,'npc_injured_rainspeaker_oracle SAY_START_IRO');
+(-1571002,'Home time!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0,'npc_injured_rainspeaker_oracle SAY_START_IRO'),
+(-1571003, 'I\'m not afraid of anything -- bring it on!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'aggro_Agnetta');
-- -1 574 000 UTGARDE 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
diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql
index 75924a7e060..4cfc2efc2bf 100644
--- a/sql/FULL/world_scripts_full.sql
+++ b/sql/FULL/world_scripts_full.sql
@@ -865,6 +865,7 @@ UPDATE `creature_template` SET `ScriptName`='npc_braug_dimspirit' WHERE `entry`=
UPDATE `creature_template` SET `ScriptName`='npc_kaya_flathoof' WHERE `entry`=11856;
/* Storm Peaks */
+UPDATE `creature_template` SET `ScriptName` = 'npc_agnetta_tyrsdottar' WHERE `entry` = 30154;
UPDATE `creature_template` SET `ScriptName` = 'npc_frostborn_scout' WHERE `entry` = 29811;
/* STORMWIND CITY */
diff --git a/sql/updates/5234_world_scripts.sql b/sql/updates/5234_world_scripts.sql
new file mode 100644
index 00000000000..d7bbfb896be
--- /dev/null
+++ b/sql/updates/5234_world_scripts.sql
@@ -0,0 +1,4 @@
+UPDATE `creature_template` SET `ScriptName` = 'npc_agnetta_tyrsdottar' WHERE `entry` = 30154;
+
+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
+(-1571003, 'I\'m not afraid of anything -- bring it on!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 'aggro_Agnetta');
diff --git a/src/bindings/scripts/scripts/northrend/storm_peaks.cpp b/src/bindings/scripts/scripts/northrend/storm_peaks.cpp
index 698cec1a6f9..f8e4780147a 100644
--- a/src/bindings/scripts/scripts/northrend/storm_peaks.cpp
+++ b/src/bindings/scripts/scripts/northrend/storm_peaks.cpp
@@ -18,6 +18,57 @@
#include "precompiled.h"
/*######
+## npc_agnetta_tyrsdottar
+######*/
+
+#define SAY_AGGRO -1571003
+#define GOSSIP_AGNETTA "Skip the warmup, sister... or are you too scared to face soemeone your own size?"
+
+enum
+{
+ QUEST_ITS_THAT_YOUR_GOBLIN = 12969,
+ FACTION_HOSTILE_AT1 = 45
+};
+
+
+struct TRINITY_DLL_DECL npc_agnetta_tyrsdottarAI : public ScriptedAI
+{
+ npc_agnetta_tyrsdottarAI(Creature* pCreature) : ScriptedAI(pCreature) { }
+
+ void Reset()
+ {
+ me->RestoreFaction();
+ }
+};
+
+CreatureAI* GetAI_npc_agnetta_tyrsdottar(Creature* pCreature)
+{
+ return new npc_agnetta_tyrsdottarAI(pCreature);
+}
+
+bool GossipHello_npc_agnetta_tyrsdottar(Player* pPlayer, Creature* pCreature)
+{
+ if (pPlayer->GetQuestStatus(QUEST_ITS_THAT_YOUR_GOBLIN) == QUEST_STATUS_INCOMPLETE)
+ pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_AGNETTA, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1);
+
+ pPlayer->SEND_GOSSIP_MENU(13691, pCreature->GetGUID());
+ return true;
+}
+
+bool GossipSelect_npc_agnetta_tyrsdottar(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction )
+{
+ if (uiAction == GOSSIP_ACTION_INFO_DEF+1)
+ {
+ DoScriptText(SAY_AGGRO, pCreature);
+ pPlayer->CLOSE_GOSSIP_MENU();
+ pCreature->setFaction(FACTION_HOSTILE_AT1);
+ pCreature->AI()->AttackStart(pPlayer);
+ }
+
+ return true;
+}
+
+/*######
## npc_frostborn_scout
######*/
@@ -69,6 +120,13 @@ void AddSC_storm_peaks()
Script* newscript;
newscript = new Script;
+ newscript->Name = "npc_agnetta_tyrsdottar";
+ newscript->GetAI = &GetAI_npc_agnetta_tyrsdottar;
+ newscript->pGossipHello = &GossipHello_npc_agnetta_tyrsdottar;
+ newscript->pGossipSelect = &GossipSelect_npc_agnetta_tyrsdottar;
+ newscript->RegisterSelf();
+
+ newscript = new Script;
newscript->Name = "npc_frostborn_scout";
newscript->pGossipHello = &GossipHello_npc_frostborn_scout;
newscript->pGossipSelect = &GossipSelect_npc_frostborn_scout;