diff options
author | Brian <runningnak3d@gmail.com> | 2010-07-08 05:27:51 -0600 |
---|---|---|
committer | Brian <runningnak3d@gmail.com> | 2010-07-08 05:27:51 -0600 |
commit | 2fb100175581a104793e524eab48e445394a9939 (patch) | |
tree | ae777a96110f8e76b5c3833d761b7af59d1255ea | |
parent | f182482c210783a59478610319e3704c34d1b5d1 (diff) | |
parent | 95ce45417115e5fd15a463db661212a560cb6e57 (diff) |
* Merge public repo
--HG--
branch : trunk
-rw-r--r-- | sql/scripts/world_script_texts.sql | 3 | ||||
-rw-r--r-- | sql/scripts/world_scripts_full.sql | 3 | ||||
-rw-r--r-- | sql/updates/8842_world_script_texts.sql | 5 | ||||
-rw-r--r-- | sql/updates/8842_world_scriptname.sql | 2 | ||||
-rw-r--r-- | sql/updates/8843_world_scriptname.sql | 2 | ||||
-rwxr-xr-x | src/server/scripts/Kalimdor/azuremyst_isle.cpp | 71 | ||||
-rwxr-xr-x | src/server/scripts/World/go_scripts.cpp | 27 |
7 files changed, 85 insertions, 28 deletions
diff --git a/sql/scripts/world_script_texts.sql b/sql/scripts/world_script_texts.sql index ea68673c4da..84e05311494 100644 --- a/sql/scripts/world_script_texts.sql +++ b/sql/scripts/world_script_texts.sql @@ -423,6 +423,9 @@ INSERT INTO `script_texts` (`npc_entry`,`entry`,`content_default`,`content_loc1` (23861,-1000471,'It was... terrible... the demon...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0,''), (23864,-1000472,'This land was mine long before your wretched kind set foot here.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''), (23864,-1000473,'All who venture here belong to me, including you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,''), + (17375, -1000474, '[Fulborg] The Stillpine furbolgs will not soon forget your bravery!', 0, 0, 'Stillpine Capitive free say text 1'), + (17375, -1000475, '[Fulborg] Thank you, $N', 0, 0, 'Stillpine Capitive free say text 2'), + (17375, -1000476, '[Fulborg] Those remaining at Stillpine Hold will welcome you as a hero!', 0, 0, 'Stillpine Capitive free say text 3'); (26588,-1800001, 'Um... I think one of those wolves is back...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0, '12027'), (26588,-1800002, 'He''s going for Mr. Floppy! ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0, '12027'), (26588,-1800003, 'Oh, no! Look, it''s another wolf, and it''s a biiiiiig one!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,0,0, '12027'), diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql index 2ec85dd2b47..44a522a1b1a 100644 --- a/sql/scripts/world_scripts_full.sql +++ b/sql/scripts/world_scripts_full.sql @@ -274,8 +274,9 @@ UPDATE `creature_template` SET `ScriptName`='npc_geezle' WHERE `entry`=17318; UPDATE `creature_template` SET `ScriptName`='npc_nestlewood_owlkin' WHERE `entry`=16518; UPDATE `creature_template` SET `ScriptName`='npc_draenei_survivor' WHERE `entry`=16483; UPDATE `creature_template` SET `ScriptName`='npc_death_ravager' WHERE `entry`=17556; +UPDATE `creature_template` SET `ScriptName`='npc_stillpine_capitive' where `entry`=17375; UPDATE `gameobject_template` SET `ScriptName`='go_ravager_cage' WHERE `entry`=181849; -UPDATE `gameobject_template` SET `ScriptName`='go_stillpine_cage' WHERE `entry`=181714; +UPDATE `gameobject_template` SET `ScriptName`='go_bristlelimb_cage' WHERE `entry`=181714; /* BADLANDS */ diff --git a/sql/updates/8842_world_script_texts.sql b/sql/updates/8842_world_script_texts.sql new file mode 100644 index 00000000000..617b61a694f --- /dev/null +++ b/sql/updates/8842_world_script_texts.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts where entry IN (-1000474, -1000475, -1000476); +INSERT INTO script_texts (`npc_entry`, `entry`, `content_default`, `type`, `language`, `comment`) VALUE +(17375, -1000474, '[Fulborg] The Stillpine furbolgs will not soon forget your bravery!', 0, 0, 'Stillpine Capitive free say text 1'), +(17375, -1000475, '[Fulborg] Thank you, $N', 0, 0, 'Stillpine Capitive free say text 2'), +(17375, -1000476, '[Fulborg] Those remaining at Stillpine Hold will welcome you as a hero!', 0, 0, 'Stillpine Capitive free say text 3'); diff --git a/sql/updates/8842_world_scriptname.sql b/sql/updates/8842_world_scriptname.sql new file mode 100644 index 00000000000..5ef8e4b6aa9 --- /dev/null +++ b/sql/updates/8842_world_scriptname.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName`='npc_stillpine_capitive' where `entry`=17375; +UPDATE `gameobject_template` SET `ScriptName`='go_stillpine_cage' WHERE `entry`=181714; diff --git a/sql/updates/8843_world_scriptname.sql b/sql/updates/8843_world_scriptname.sql new file mode 100644 index 00000000000..4517544d99d --- /dev/null +++ b/sql/updates/8843_world_scriptname.sql @@ -0,0 +1,2 @@ +UPDATE `gameobject_template` SET `ScriptName`='go_bristlelimb_cage' WHERE `entry`=181714; + diff --git a/src/server/scripts/Kalimdor/azuremyst_isle.cpp b/src/server/scripts/Kalimdor/azuremyst_isle.cpp index 131e91b65b3..ca35b48b970 100755 --- a/src/server/scripts/Kalimdor/azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/azuremyst_isle.cpp @@ -669,6 +669,67 @@ CreatureAI* GetAI_npc_death_ravagerAI(Creature* pCreature) return new npc_death_ravagerAI(pCreature); } +/*######## +## Quest: The Prophecy of Akida +########*/ +enum BristlelimbCage +{ + QUEST_THE_PROPHECY_OF_AKIDA = 9544, + NPC_STILLPINE_CAPITIVE = 17375, + GO_BRISTELIMB_CAGE = 181714, + CAPITIVE_SAY_1 = -1000474, + CAPITIVE_SAY_2 = -1000475, + CAPITIVE_SAY_3 = -1000476 +}; + + +struct npc_stillpine_capitiveAI : public ScriptedAI +{ + npc_stillpine_capitiveAI(Creature *c) : ScriptedAI(c){} + + uint32 FleeTimer; + + void Reset() + { + FleeTimer = 0; + GameObject* cage = me->FindNearestGameObject(GO_BRISTELIMB_CAGE, 5.0f); + if(cage) + cage->ResetDoorOrButton(); + } + + void UpdateAI(const uint32 diff) + { + if(FleeTimer) + { + if(FleeTimer <= diff) + me->ForcedDespawn(); + else FleeTimer -= diff; + } + } +}; + +CreatureAI* GetAI_npc_stillpine_capitiveAI(Creature* pCreature) +{ + return new npc_stillpine_capitiveAI(pCreature); +} + +bool go_bristlelimb_cage(Player* pPlayer, GameObject* pGo) +{ + if(pPlayer->GetQuestStatus(QUEST_THE_PROPHECY_OF_AKIDA) == QUEST_STATUS_INCOMPLETE) + { + Creature* pCreature = pGo->FindNearestCreature(NPC_STILLPINE_CAPITIVE, 5.0f, true); + if(pCreature) + { + DoScriptText(RAND(CAPITIVE_SAY_1, CAPITIVE_SAY_2, CAPITIVE_SAY_3), pCreature, pPlayer); + pCreature->GetMotionMaster()->MoveFleeing(pPlayer, 3500); + pPlayer->KilledMonsterCredit(pCreature->GetEntry(), pCreature->GetGUID()); + CAST_AI(npc_stillpine_capitiveAI, pCreature->AI())->FleeTimer = 3500; + return false; + } + } + return true; +} + void AddSC_azuremyst_isle() { Script *newscript; @@ -716,5 +777,15 @@ void AddSC_azuremyst_isle() newscript->Name="go_ravager_cage"; newscript->pGOHello = &go_ravager_cage; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_stillpine_capitive"; + newscript->GetAI = &GetAI_npc_stillpine_capitiveAI; + newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="go_bristlelimb_cage"; + newscript->pGOHello = &go_bristlelimb_cage; + newscript->RegisterSelf(); } diff --git a/src/server/scripts/World/go_scripts.cpp b/src/server/scripts/World/go_scripts.cpp index 84ce38dd243..ca7a136c2fb 100755 --- a/src/server/scripts/World/go_scripts.cpp +++ b/src/server/scripts/World/go_scripts.cpp @@ -944,28 +944,6 @@ bool GOSelect_go_amberpine_outhouse(Player *pPlayer, GameObject *pGO, uint32 /*u } /*###### -## Quest 9544: The Prophecy of Akida -######*/ - -enum eProphecy -{ - QUEST_PROPHECY_OF_AKIDA = 9544, - NPC_STILLPINE_CAPTIVE = 17375 -}; - -bool GOHello_go_stillpine_cage(Player *pPlayer, GameObject *pGO) -{ - if (pPlayer->GetQuestStatus(QUEST_PROPHECY_OF_AKIDA) == QUEST_STATUS_INCOMPLETE) - if (Creature *pPrisoner = pGO->FindNearestCreature(NPC_STILLPINE_CAPTIVE,1.0f)) - { - pGO->UseDoorOrButton(); - pPrisoner->DisappearAndDie(); - pPlayer->KilledMonsterCredit(pPrisoner->GetEntry(),0); - } - return true; -} - -/*###### ## Quest 1126: Hive in the Tower ######*/ @@ -1161,11 +1139,6 @@ void AddSC_go_scripts() newscript->RegisterSelf(); newscript = new Script; - newscript->Name = "go_stillpine_cage"; - newscript->pGOHello = &GOHello_go_stillpine_cage; - newscript->RegisterSelf(); - - newscript = new Script; newscript->Name = "go_amberpine_outhouse"; newscript->pGOHello = &GOHello_go_amberpine_outhouse; newscript->pGOSelect = &GOSelect_go_amberpine_outhouse; |