aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/updates/world/2011_10_23_04_world_sai.sql50
-rw-r--r--src/server/scripts/Outland/nagrand.cpp104
2 files changed, 51 insertions, 103 deletions
diff --git a/sql/updates/world/2011_10_23_04_world_sai.sql b/sql/updates/world/2011_10_23_04_world_sai.sql
new file mode 100644
index 00000000000..27adf09d51a
--- /dev/null
+++ b/sql/updates/world/2011_10_23_04_world_sai.sql
@@ -0,0 +1,50 @@
+-- Altruis the Sufferer SAI
+-- [Q] Survey the Land
+-- [Q] Illidan's Pupil
+SET @ENTRY := 18417;
+SET @GOSSIP := 21304;
+SET @QUEST_SURVEY := 9991;
+SET @QUEST_PUPIL := 10646;
+UPDATE `quest_template` SET `SpecialFlags`=`SpecialFlags`|2 WHERE `entry` IN (@QUEST_SURVEY,@QUEST_PUPIL);
+UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP+0,`AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@ENTRY,@ENTRY*100);
+INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
+-- Survey the Land
+(@ENTRY,0,0,0,62,0,100,0,@GOSSIP+1,0,0,0,52,532,0,0,0,0,0,7,0,0,0,0,0,0,0,"Altruis the Sufferer - On Gossip Select - Activate Taxi Path"),
+(@ENTRY,0,1,0,62,0,100,0,@GOSSIP+1,0,0,0,26,@QUEST_SURVEY,0,0,0,0,0,7,0,0,0,0,0,0,0,"Altruis the Sufferer - On Gossip Select - Quest Credit"),
+-- Illidan's Pupil
+(@ENTRY,0,2,0,62,0,100,0,@GOSSIP+6,0,0,0,26,@QUEST_PUPIL,0,0,0,0,0,7,0,0,0,0,0,0,0,"Altruis the Sufferer - On Gossip Select - Give Quest Credit");
+
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+0 AND `text_id`=9427;
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+1 AND `text_id`=10492;
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+2 AND `text_id`=10493;
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+3 AND `text_id`=10494;
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+4 AND `text_id`=10495;
+DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP+5 AND `text_id`=10497;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
+(@GOSSIP+0,9427), -- Survey the Land
+(@GOSSIP+1,10492), -- Illidan's Pupil
+(@GOSSIP+2,10493), -- Illidan's Pupil
+(@GOSSIP+3,10494), -- Illidan's Pupil
+(@GOSSIP+4,10495), -- Illidan's Pupil
+(@GOSSIP+5,10497); -- Illidan's Pupil
+
+-- Insert menu options
+DELETE FROM `gossip_menu_option` WHERE `menu_id` BETWEEN @GOSSIP+0 AND @GOSSIP+6;
+INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`) VALUES
+-- Survey the Land
+(@GOSSIP+0,0,0,"Well?",1,3,@GOSSIP+1),
+(@GOSSIP+1,0,0,"Ok.",1,3,0),
+-- Illidan's Pupil
+(@GOSSIP+0,1,0,"Tell me about the demon hunter training grounds at the Ruins of Karabor.",1,3,@GOSSIP+2),
+(@GOSSIP+2,0,0,"I'm listening.",1,3,@GOSSIP+3),
+(@GOSSIP+3,0,0,"Go on, please.",1,3,@GOSSIP+4),
+(@GOSSIP+4,0,0,"Interesting.",1,3,@GOSSIP+5),
+(@GOSSIP+5,0,0,"That's quite a story.",1,3,@GOSSIP+6),
+(@GOSSIP+6,0,0,"There was something else I wanted to ask you, Altruis.",1,3,@GOSSIP+0); -- Back to first page
+
+-- Conditions for gossip menu of quest Survey the Land
+DELETE FROM `conditions` WHERE `SourceGroup` IN (@GOSSIP+0,@GOSSIP+10) AND `ConditionValue1` IN (@QUEST_SURVEY,@QUEST_PUPIL);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,@GOSSIP+0,0,0,9,@QUEST_SURVEY,0,0,0,'',"Only show first gossip if player is on quest Survey the Land"),
+(15,@GOSSIP+0,1,0,9,@QUEST_PUPIL,0,0,0,'',"Only show first gossip if player is on quest Illidans Pupil");
diff --git a/src/server/scripts/Outland/nagrand.cpp b/src/server/scripts/Outland/nagrand.cpp
index 6de652e4bed..726edb5efb2 100644
--- a/src/server/scripts/Outland/nagrand.cpp
+++ b/src/server/scripts/Outland/nagrand.cpp
@@ -19,12 +19,11 @@
/* ScriptData
SDName: Nagrand
SD%Complete: 90
-SDComment: Quest support: 9868, 9874, 9991, 10044, 10172, 10646, 10085. TextId's unknown for altruis_the_sufferer and greatmother_geyah (npc_text)
+SDComment: Quest support: 9868, 9874, 10044, 10172, 10085. TextId's unknown for altruis_the_sufferer and greatmother_geyah (npc_text)
SDCategory: Nagrand
EndScriptData */
/* ContentData
-npc_altruis_the_sufferer
npc_greatmother_geyah
npc_maghar_captive
npc_creditmarker_visit_with_ancestors
@@ -34,106 +33,6 @@ EndContentData */
#include "ScriptedEscortAI.h"
/*######
-## npc_altruis_the_sufferer
-######*/
-
-#define GOSSIP_HATS1 "I see twisted steel and smell sundered earth."
-#define GOSSIP_HATS2 "Well...?"
-#define GOSSIP_HATS3 "[PH] Story about Illidan's Pupil"
-
-#define GOSSIP_SATS1 "Legion?"
-#define GOSSIP_SATS2 "And now?"
-#define GOSSIP_SATS3 "How do you see them now?"
-#define GOSSIP_SATS4 "Forge camps?"
-#define GOSSIP_SATS5 "Ok."
-#define GOSSIP_SATS6 "[PH] Story done"
-
-class npc_altruis_the_sufferer : public CreatureScript
-{
-public:
- npc_altruis_the_sufferer() : CreatureScript("npc_altruis_the_sufferer") { }
-
- bool OnQuestAccept(Player* player, Creature* /*creature*/, Quest const* /*quest*/)
- {
- if (!player->GetQuestRewardStatus(9991)) //Survey the Land, q-id 9991
- {
- player->CLOSE_GOSSIP_MENU();
- player->ActivateTaxiPathTo(532); //TaxiPath 532
- }
- return true;
- }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
- {
- player->PlayerTalkClass->ClearMenus();
- switch (uiAction)
- {
- case GOSSIP_ACTION_INFO_DEF+10:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SATS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 11);
- player->SEND_GOSSIP_MENU(9420, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+11:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SATS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 12);
- player->SEND_GOSSIP_MENU(9421, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+12:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SATS3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 13);
- player->SEND_GOSSIP_MENU(9422, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+13:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SATS4, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 14);
- player->SEND_GOSSIP_MENU(9423, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+14:
- player->SEND_GOSSIP_MENU(9424, creature->GetGUID());
- break;
-
- case GOSSIP_ACTION_INFO_DEF+20:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SATS5, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 21);
- player->SEND_GOSSIP_MENU(9427, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+21:
- player->CLOSE_GOSSIP_MENU();
- player->AreaExploredOrEventHappens(9991);
- break;
-
- case GOSSIP_ACTION_INFO_DEF+30:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SATS6, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 31);
- player->SEND_GOSSIP_MENU(384, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+31:
- player->CLOSE_GOSSIP_MENU();
- player->AreaExploredOrEventHappens(10646);
- break;
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (creature->isQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- //gossip before obtaining Survey the Land
- if (player->GetQuestStatus(9991) == QUEST_STATUS_NONE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HATS1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+10);
-
- //gossip when Survey the Land is incomplete (technically, after the flight)
- if (player->GetQuestStatus(9991) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HATS2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+20);
-
- //wowwiki.com/Varedis
- if (player->GetQuestStatus(10646) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HATS3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+30);
-
- player->SEND_GOSSIP_MENU(9419, creature->GetGUID());
-
- return true;
- }
-
-};
-
-/*######
## npc_greatmother_geyah
######*/
@@ -806,7 +705,6 @@ public:
void AddSC_nagrand()
{
- new npc_altruis_the_sufferer();
new npc_greatmother_geyah();
new npc_maghar_captive();
new npc_creditmarker_visit_with_ancestors();