aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalcrom <malcromdev@gmail.com>2012-02-21 20:03:12 -0330
committerMalcrom <malcromdev@gmail.com>2012-02-21 20:03:12 -0330
commit74fc13596c6552a984295670dbd1ca3190643dd5 (patch)
treecbeae690bed473a2d69cdbc8a179cb5096af0c05
parentffa4cad293f9904e0573febee672f28626108f19 (diff)
DB/Scripts: Remove 2 cpp scripts in Searing Gorge and replace with SAI.
-rw-r--r--sql/updates/world/2012_02_21_05_world_Gossip_SAI.sql38
-rw-r--r--src/server/scripts/EasternKingdoms/searing_gorge.cpp95
2 files changed, 40 insertions, 93 deletions
diff --git a/sql/updates/world/2012_02_21_05_world_Gossip_SAI.sql b/sql/updates/world/2012_02_21_05_world_Gossip_SAI.sql
new file mode 100644
index 00000000000..f1ad253fd81
--- /dev/null
+++ b/sql/updates/world/2012_02_21_05_world_Gossip_SAI.sql
@@ -0,0 +1,38 @@
+-- SAI for Lothos Riftwaker
+SET @ENTRY=14387;
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE (`entryorguid`=@ENTRY AND `source_type`=0);
+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
+(@ENTRY,0,0,1,62,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Lothos Riftwaker - On Gossip Option select - close gossip'),
+(@ENTRY,0,1,0,61,0,100,0,5750,0,0,0,62,409,0,0,0,0,0,7,0,0,0,1096,-467,-104.6,3.64,'Lothos Riftwaker - On Gossip Option select - teleport player');
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (5750);
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(5750,0,0,'Teleport me to the Molten Core, Lothos.',1,1,0,0,0,0,'');
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (5750);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,5750,0,0,0,8,7848,0,0,0,0,'','Show gossip option if player has quest 7848 completed');
+
+-- SAI for Zamael Lunthistle
+SET @ENTRY=8436;
+UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@ENTRY;
+DELETE FROM `smart_scripts` WHERE (`entryorguid`=@ENTRY AND `source_type`=0);
+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
+(@ENTRY,0,0,1,62,0,100,0,1285,0,0,0,26,3377,0,0,0,0,0,7,0,0,0,0,0,0,0,'Zamael Lunthistle - On Gossip Option select - quest credit'),
+
+DELETE FROM `gossip_menu` WHERE `entry`=1285 AND `text_id`=1920;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1285,1920);
+DELETE FROM `gossip_menu` WHERE `entry`=1286 AND `text_id`=1922;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1286,1922);
+DELETE FROM `gossip_menu` WHERE `entry`=1287 AND `text_id`=1921;
+INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (1287,1921);
+
+DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (1285,1286,1287);
+INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`)VALUES
+(1285,0,0,'I wish to hear your tale.',1,1,1287,0,0,0,''),
+(1286,0,0,'Let me think about it, Zamael.',1,1,1285,0,0,0,''),
+(1287,0,0,'Please continue, Zamael.',1,1,1286,0,0,0,'');
+
+DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (1285);
+INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
+(15,1285,0,0,0,9,3377,0,0,0,0,'','Show gossip option if player has quest 3377 but not complete');
diff --git a/src/server/scripts/EasternKingdoms/searing_gorge.cpp b/src/server/scripts/EasternKingdoms/searing_gorge.cpp
index 74172dda743..ebe2aae0d46 100644
--- a/src/server/scripts/EasternKingdoms/searing_gorge.cpp
+++ b/src/server/scripts/EasternKingdoms/searing_gorge.cpp
@@ -19,14 +19,12 @@
/* ScriptData
SDName: Searing_Gorge
SD%Complete: 80
-SDComment: Quest support: 3377, 3441 (More accurate info on Kalaran needed). Lothos Riftwaker teleport to Molten Core.
+SDComment: Quest support: 3441 (More accurate info on Kalaran needed).
SDCategory: Searing Gorge
EndScriptData */
/* ContentData
npc_kalaran_windblade
-npc_lothos_riftwaker
-npc_zamael_lunthistle
EndContentData */
#include "ScriptPCH.h"
@@ -81,99 +79,10 @@ public:
};
/*######
-## npc_lothos_riftwaker
-######*/
-
-#define GOSSIP_HELLO_LR "Teleport me to the Molten Core"
-
-class npc_lothos_riftwaker : public CreatureScript
-{
-public:
- npc_lothos_riftwaker() : CreatureScript("npc_lothos_riftwaker") { }
-
- bool OnGossipSelect(Player* player, Creature* /*creature*/, uint32 /*uiSender*/, uint32 uiAction)
- {
- player->PlayerTalkClass->ClearMenus();
- if (uiAction == GOSSIP_ACTION_INFO_DEF + 1)
- {
- player->CLOSE_GOSSIP_MENU();
- player->TeleportTo(409, 1096, -467, -104.6f, 3.64f);
- }
-
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (creature->isQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- if (player->GetQuestRewardStatus(7487) || player->GetQuestRewardStatus(7848))
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_LR, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
-
- player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID());
-
- return true;
- }
-
-};
-
-/*######
-## npc_zamael_lunthistle
-######*/
-
-#define GOSSIP_HELLO_ZL "Tell me your story"
-#define GOSSIP_SELECT_ZL1 "Please continue..."
-#define GOSSIP_SELECT_ZL2 "Goodbye"
-
-class npc_zamael_lunthistle : public CreatureScript
-{
-public:
- npc_zamael_lunthistle() : CreatureScript("npc_zamael_lunthistle") { }
-
- bool OnGossipSelect(Player* player, Creature* creature, uint32 /*uiSender*/, uint32 uiAction)
- {
- player->PlayerTalkClass->ClearMenus();
- switch (uiAction)
- {
- case GOSSIP_ACTION_INFO_DEF:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_ZL1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 1);
- player->SEND_GOSSIP_MENU(1921, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+1:
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_SELECT_ZL2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2);
- player->SEND_GOSSIP_MENU(1922, creature->GetGUID());
- break;
- case GOSSIP_ACTION_INFO_DEF+2:
- player->CLOSE_GOSSIP_MENU();
- player->AreaExploredOrEventHappens(3377);
- break;
- }
- return true;
- }
-
- bool OnGossipHello(Player* player, Creature* creature)
- {
- if (creature->isQuestGiver())
- player->PrepareQuestMenu(creature->GetGUID());
-
- if (player->GetQuestStatus(3377) == QUEST_STATUS_INCOMPLETE)
- player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_HELLO_ZL, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF);
-
- player->SEND_GOSSIP_MENU(1920, creature->GetGUID());
-
- return true;
- }
-
-};
-
-/*######
##
######*/
void AddSC_searing_gorge()
{
new npc_kalaran_windblade();
- new npc_lothos_riftwaker();
- new npc_zamael_lunthistle();
-}
+} \ No newline at end of file