aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiscover- <amort11@hotmail.com>2011-12-25 00:04:26 +0100
committerDiscover- <amort11@hotmail.com>2011-12-25 00:04:26 +0100
commit23b54b8416d0268bc721d3bf879d5a9be45cbe5f (patch)
treed1acf862d4427156b39e267c6563c7610199a0aa
parentc14e7ec385175479811886d8f08650a3775b679f (diff)
Core/Quests: Script quest Missing Friends
Closes #3604
-rw-r--r--sql/updates/world/2011_12_24_00_world_sai.sql10
-rw-r--r--src/server/scripts/World/go_scripts.cpp54
2 files changed, 57 insertions, 7 deletions
diff --git a/sql/updates/world/2011_12_24_00_world_sai.sql b/sql/updates/world/2011_12_24_00_world_sai.sql
new file mode 100644
index 00000000000..fb5816bb737
--- /dev/null
+++ b/sql/updates/world/2011_12_24_00_world_sai.sql
@@ -0,0 +1,10 @@
+-- Scriptname for the cages
+UPDATE `gameobject_template` SET `ScriptName`='go_veil_skith_cage' WHERE `entry` IN (185202,185203,185204,185205);
+
+-- Texts for Captive Child
+DELETE FROM `creature_text` WHERE `entry`=22314;
+INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
+(22314,0,0,"Woot!",12,0,100,0,0,0,"Captive Child"),
+(22314,0,1,"I think those weird bird guys were going to eat us. Gross!",12,0,100,0,0,0,"Captive Child"),
+(22314,0,2,"Yay! We're free!",12,0,100,0,0,0,"Captive Child"),
+(22314,0,3,"Gross!",12,0,100,0,0,0,"Captive Child"); \ No newline at end of file
diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp
index 44c3ab9bdc9..4799b893286 100644
--- a/src/server/scripts/World/go_scripts.cpp
+++ b/src/server/scripts/World/go_scripts.cpp
@@ -16,13 +16,6 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/* ScriptData
-SDName: GO_Scripts
-SD%Complete: 100
-SDComment: Quest support: 4285, 4287, 4288(crystal pylons), 4296, 6481, 10990, 10991, 10992, Field_Repair_Bot->Teaches spell 22704. Barov_journal->Teaches spell 26089, 12843, 12982, 2936. Soulwell
-SDCategory: Game Objects
-EndScriptData */
-
/* ContentData
go_cat_figurine (the "trap" version of GO, two different exist)
go_northern_crystal_pylon
@@ -48,6 +41,15 @@ go_table_theka
go_soulwell
go_bashir_crystalforge
go_ethereal_teleport_pad
+go_soulwell
+go_dragonflayer_cage
+go_tadpole_cage
+go_black_cage
+go_amberpine_outhouse
+go_hive_pod
+go_gjalerbron_cage
+go_large_gjalerbron_cage
+go_veil_skith_cage
EndContentData */
#include "ScriptPCH.h"
@@ -1179,6 +1181,7 @@ public:
/*######
## Quest 1126: Hive in the Tower
+## go_hive_pod
######*/
enum eHives
@@ -1278,6 +1281,42 @@ class go_large_gjalerbron_cage : public GameObjectScript
}
};
+/*########
+#### go_veil_skith_cage
+#####*/
+
+enum MissingFriends
+{
+ QUEST_MISSING_FRIENDS = 10852,
+ NPC_CAPTIVE_CHILD = 22314,
+ SAY_FREE = 0,
+};
+
+class go_veil_skith_cage : public GameObjectScript
+{
+ public:
+ go_veil_skith_cage() : GameObjectScript("go_veil_skith_cage") { }
+
+ bool OnGossipHello(Player* player, GameObject* go)
+ {
+ if (player->GetQuestStatus(QUEST_MISSING_FRIENDS) == QUEST_STATUS_INCOMPLETE)
+ {
+ std::list<Creature*> ChildrenList;
+ GetCreatureListWithEntryInGrid(ChildrenList, go, NPC_CAPTIVE_CHILD, INTERACTION_DISTANCE);
+ for (std::list<Creature*>::const_iterator itr = ChildrenList.begin(); itr != ChildrenList.end(); ++itr)
+ {
+ go->UseDoorOrButton();
+ player->KilledMonsterCredit(NPC_CAPTIVE_CHILD, (*itr)->GetGUID());
+ (*itr)->ForcedDespawn(5000);
+ (*itr)->GetMotionMaster()->MovePoint(1, go->GetPositionX()+5, go->GetPositionY(), go->GetPositionZ());
+ (*itr)->AI()->Talk(SAY_FREE);
+ (*itr)->GetMotionMaster()->Clear();
+ }
+ }
+ return false;
+ }
+};
+
void AddSC_go_scripts()
{
new go_cat_figurine;
@@ -1319,4 +1358,5 @@ void AddSC_go_scripts()
new go_massive_seaforium_charge;
new go_gjalerbron_cage;
new go_large_gjalerbron_cage;
+ new go_veil_skith_cage;
}