From 89f66acc87ac61e710742b154b3568ad1bf38517 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sat, 27 Dec 2008 21:27:41 +0100 Subject: *Changes in function ScriptedAI::DoSay - by Lightguard --HG-- branch : trunk --- sql/updates/678_world_scripts.sql | 1 - sql/updates/679_world_scripts.sql | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 sql/updates/678_world_scripts.sql create mode 100644 sql/updates/679_world_scripts.sql (limited to 'sql') diff --git a/sql/updates/678_world_scripts.sql b/sql/updates/678_world_scripts.sql deleted file mode 100644 index 15d43204734..00000000000 --- a/sql/updates/678_world_scripts.sql +++ /dev/null @@ -1 +0,0 @@ -update creature_template set scriptname='npc_deathstalker_erland' where entry=1978; \ No newline at end of file diff --git a/sql/updates/679_world_scripts.sql b/sql/updates/679_world_scripts.sql new file mode 100644 index 00000000000..15d43204734 --- /dev/null +++ b/sql/updates/679_world_scripts.sql @@ -0,0 +1 @@ +update creature_template set scriptname='npc_deathstalker_erland' where entry=1978; \ No newline at end of file -- cgit v1.2.3 From b086817814457f53cdcac6c02d9dcd4e1c60a35f Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sat, 27 Dec 2008 21:29:09 +0100 Subject: *Support for quest 665 --HG-- branch : trunk --- sql/updates/683_world_scripts.sql | 2 + src/bindings/scripts/Makefile.am | 1 + src/bindings/scripts/ScriptMgr.cpp | 4 + src/bindings/scripts/VC71/71ScriptDev2.vcproj | 4 + src/bindings/scripts/VC80/80ScriptDev2.vcproj | 4 + src/bindings/scripts/VC90/90ScriptDev2.vcproj | 4 + .../zone/arathi_highlands/arathi_highlands.cpp | 152 +++++++++++++++++++++ 7 files changed, 171 insertions(+) create mode 100644 sql/updates/683_world_scripts.sql create mode 100644 src/bindings/scripts/scripts/zone/arathi_highlands/arathi_highlands.cpp (limited to 'sql') diff --git a/sql/updates/683_world_scripts.sql b/sql/updates/683_world_scripts.sql new file mode 100644 index 00000000000..6463adad08e --- /dev/null +++ b/sql/updates/683_world_scripts.sql @@ -0,0 +1,2 @@ +update quest_template set specialflags=2 where entry=665; +update creature_template set scriptname='npc_professor_phizzlethorpe' where entry=2768; \ No newline at end of file diff --git a/src/bindings/scripts/Makefile.am b/src/bindings/scripts/Makefile.am index 2789b2a51b7..7086664d0ac 100644 --- a/src/bindings/scripts/Makefile.am +++ b/src/bindings/scripts/Makefile.am @@ -69,6 +69,7 @@ scripts/npc/npc_innkeeper.cpp \ scripts/npc/npc_professions.cpp \ scripts/npc/npcs_special.cpp \ scripts/zone/alterac_mountains/alterac_mountains.cpp \ +scripts/zone/arathi_highlands/arathi_highlands.cpp \ scripts/zone/ashenvale_forest/ashenvale.cpp\ scripts/zone/aunchindoun/auchenai_crypts/boss_exarch_maladaar.cpp \ scripts/zone/aunchindoun/mana_tombs/boss_nexusprince_shaffar.cpp \ diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index 76ad10fe6b3..3b29f9ddf8f 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -108,6 +108,8 @@ extern void AddSC_npcs_special(); extern void AddSC_alterac_mountains(); //Arathi Highlands +extern void AddSC_arathi_highlands(); + //Ashenvale Forest extern void AddSC_ashenvale(); @@ -1304,6 +1306,8 @@ void ScriptsInit() AddSC_alterac_mountains(); //Arathi Highlands + AddSC_arathi_highlands(); + //Ashenvale Forest AddSC_ashenvale(); diff --git a/src/bindings/scripts/VC71/71ScriptDev2.vcproj b/src/bindings/scripts/VC71/71ScriptDev2.vcproj index 8eb464b81c8..d0cd6592152 100644 --- a/src/bindings/scripts/VC71/71ScriptDev2.vcproj +++ b/src/bindings/scripts/VC71/71ScriptDev2.vcproj @@ -372,6 +372,10 @@ + + + + + + + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Arathi Highlands +SD%Complete: 100 +SDComment: Quest support: 665 +SDCategory: Arathi Highlands +EndScriptData */ + +/* ContentData +npc_professor_phizzlethorpe +EndContentData */ + +#include "precompiled.h" +#include "../../npc/npc_escortAI.h" + +/*###### +## npc_professor_phizzlethorpe +######*/ + +#define SAY_PROGRESS_1 "Ok, $N. Follow me to the cave where I'll attempt to harness the power of the rune stone into these goggles." +#define SAY_PROGRESS_2 "I discovered this cave on our first day here. I believe the energy in the stone can be used to our advantage." +#define SAY_PROGRESS_3 "I'll begin drawing energy from the stone. Your job, $N, i to defend me. This place is cursed... trust me." +#define EMOTE_PROGRESS_4 "begins tinkering with the goggles before the stone." +#define SAY_AGGRO "Help!!! Get these things off me so I can get my work done!" +#define SAY_PROGRESS_5 "Almost done! Just a little longer!" +#define SAY_PROGRESS_6 "I've done it! I have harnessed the power of the stone into the goggles! Let's get out of here!" +#define SAY_PROGRESS_7 "Phew! Glad to be back from that creepy cave." +#define EMOTE_PROGRESS_8 "hands one glowing goggles over to Doctor Draxlegauge." +#define SAY_PROGRESS_9 "Doctor Draxlegauge will give you further instructions, $N. Many thanks for your help!" + +#define QUEST_SUNKEN_TREASURE 665 +#define MOB_VENGEFUL_SURGE 2776 + +struct TRINITY_DLL_DECL npc_professor_phizzlethorpeAI : public npc_escortAI +{ + npc_professor_phizzlethorpeAI(Creature *c) : npc_escortAI(c) {Reset();} + + void WaypointReached(uint32 i) + { + Unit* player = Unit::GetUnit((*m_creature), PlayerGUID); + + switch(i) + { + case 4:DoSay(SAY_PROGRESS_2, LANG_UNIVERSAL, player, true);break; + case 5:DoSay(SAY_PROGRESS_3, LANG_UNIVERSAL, player, true);break; + case 8:DoTextEmote(EMOTE_PROGRESS_4, NULL);break; + case 9: + { + Creature* sum1 = m_creature->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96, -2142.49, 20.15, 1.0f, TEMPSUMMON_DEAD_DESPAWN, 0); + Creature* sum2 = m_creature->SummonCreature(MOB_VENGEFUL_SURGE, -2052.96, -2142.49, 20.15, 1.0f, TEMPSUMMON_DEAD_DESPAWN, 0); + sum1->Attack(m_creature, true); + sum2->Attack(m_creature, true); + break; + } + case 10:DoSay(SAY_PROGRESS_5, LANG_UNIVERSAL, player, true);break; + case 11:DoSay(SAY_PROGRESS_6, LANG_UNIVERSAL, player, true);break; + case 19:DoSay(SAY_PROGRESS_7, LANG_UNIVERSAL, player, true); break; + case 20: + DoTextEmote(EMOTE_PROGRESS_8, NULL); + DoSay(SAY_PROGRESS_9, LANG_UNIVERSAL, player, true); + ((Player*)player)->GroupEventHappens(QUEST_SUNKEN_TREASURE, m_creature); + break; + } + } + + void Reset(){} + + void Aggro(Unit* who) + { + DoSay(SAY_AGGRO, LANG_UNIVERSAL, NULL); + } + + void JustDied(Unit* killer) + { + if (PlayerGUID) + { + Unit* player = Unit::GetUnit((*m_creature), PlayerGUID); + if (player) + ((Player*)player)->FailQuest(QUEST_SUNKEN_TREASURE); + } + } + + void UpdateAI(const uint32 diff) + { + npc_escortAI::UpdateAI(diff); + } +}; + +bool QuestAccept_npc_professor_phizzlethorpe(Player* player, Creature* creature, Quest const* quest) +{ + if (quest->GetQuestId() == QUEST_SUNKEN_TREASURE) + { + creature->Say(SAY_PROGRESS_1, LANG_UNIVERSAL, player->GetGUID()); + ((npc_escortAI*)(creature->AI()))->Start(false, false, false, player->GetGUID()); + } + return true; +} + +CreatureAI* GetAI_npc_professor_phizzlethorpeAI(Creature *_Creature) +{ + npc_professor_phizzlethorpeAI* professor_phizzlethorpeAI = new npc_professor_phizzlethorpeAI(_Creature); + + professor_phizzlethorpeAI->AddWaypoint(0, -2066.45, -2085.96, 9.08); + professor_phizzlethorpeAI->AddWaypoint(1, -2077.99, -2105.33, 13.24); + professor_phizzlethorpeAI->AddWaypoint(2, -2074.60, -2109.67, 14.24); + professor_phizzlethorpeAI->AddWaypoint(3, -2076.60, -2117.46, 16.67); + professor_phizzlethorpeAI->AddWaypoint(4, -2073.51, -2123.46, 18.42, 2000); + professor_phizzlethorpeAI->AddWaypoint(5, -2073.51, -2123.46, 18.42, 4000); + professor_phizzlethorpeAI->AddWaypoint(6, -2066.60, -2131.85, 21.56); + professor_phizzlethorpeAI->AddWaypoint(7, -2053.85, -2143.19, 20.31); + professor_phizzlethorpeAI->AddWaypoint(8, -2043.49, -2153.73, 20.20, 12000); + professor_phizzlethorpeAI->AddWaypoint(9, -2043.49, -2153.73, 20.20, 14000); + professor_phizzlethorpeAI->AddWaypoint(10, -2043.49, -2153.73, 20.20, 10000); + professor_phizzlethorpeAI->AddWaypoint(11, -2043.49, -2153.73, 20.20, 2000); + professor_phizzlethorpeAI->AddWaypoint(12, -2053.85, -2143.19, 20.31); + professor_phizzlethorpeAI->AddWaypoint(13, -2066.60, -2131.85, 21.56); + professor_phizzlethorpeAI->AddWaypoint(14, -2073.51, -2123.46, 18.42); + professor_phizzlethorpeAI->AddWaypoint(15, -2076.60, -2117.46, 16.67); + professor_phizzlethorpeAI->AddWaypoint(16, -2074.60, -2109.67, 14.24); + professor_phizzlethorpeAI->AddWaypoint(17, -2077.99, -2105.33, 13.24); + professor_phizzlethorpeAI->AddWaypoint(18, -2066.45, -2085.96, 9.08); + professor_phizzlethorpeAI->AddWaypoint(19, -2066.41, -2086.21, 8.97, 6000); + professor_phizzlethorpeAI->AddWaypoint(20, -2066.41, -2086.21, 8.97, 2000); + + return (CreatureAI*)professor_phizzlethorpeAI; +} + +void AddSC_arathi_highlands() +{ + Script * newscript; + + newscript = new Script; + newscript->Name = "npc_professor_phizzlethorpe"; + newscript->GetAI = &GetAI_npc_professor_phizzlethorpeAI; + newscript->pQuestAccept = &QuestAccept_npc_professor_phizzlethorpe; + newscript->RegisterSelf(); +} \ No newline at end of file -- cgit v1.2.3 From 27f770a40a72cb1d4e269a142e854e921c88e2bc Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sat, 27 Dec 2008 22:46:01 +0100 Subject: *Support for quest 1144 - by guenex *Changed in midnight - by Anubisss --HG-- branch : trunk --- sql/updates/686_world_scripts.sql | 16 ++++++++++++++++ src/bindings/scripts/Makefile.am | 1 + src/bindings/scripts/ScriptMgr.cpp | 6 ++++++ src/bindings/scripts/VC71/71ScriptDev2.vcproj | 4 ++++ src/bindings/scripts/VC80/80ScriptDev2.vcproj | 4 ++++ src/bindings/scripts/VC90/90ScriptDev2.vcproj | 4 ++++ .../scripts/scripts/zone/karazhan/boss_midnight.cpp | 1 + 7 files changed, 36 insertions(+) create mode 100644 sql/updates/686_world_scripts.sql (limited to 'sql') diff --git a/sql/updates/686_world_scripts.sql b/sql/updates/686_world_scripts.sql new file mode 100644 index 00000000000..b09691841b8 --- /dev/null +++ b/sql/updates/686_world_scripts.sql @@ -0,0 +1,16 @@ +UPDATE `quest_template` SET `SpecialFlags` = 2 WHERE `entry` = 1144; +UPDATE `creature_template` SET `Scriptname`='npc_willix' WHERE entry=4508; + +DELETE FROM script_texts WHERE entry BETWEEN -1047000 and -1047010; +INSERT INTO script_texts (entry, content_default, sound, type, language, comment) VALUES +(-1047000, 'Phew! Finally,out here. However, it will not become easy. Detain your eyes after annoyance.', 0, 0, 0, 'Willix'), +(-1047001, 'There on top resides Charlga Razorflank. The damned old Crone.', 0, 0, 0, 'Willix'), +(-1047002, 'Help! Get this Raging Agam\'ar from me!', 0, 0, 0, 'Willix'), +(-1047003, 'In this ditch there are Blueleaf Tuber! As if the gold waited only to be dug out, I say it you!', 0, 0, 0, 'Willix'), +(-1047004, 'Danger is behind every corner.', 0, 0, 0, 'Willix'), +(-1047005, 'I do not understand how these disgusting animals can live at such a place.... puh as this stinks!', 0, 0, 0, 'Willix'), +(-1047006, 'I think, I see a way how we come out of this damned thorn tangle.', 0, 0, 0, 'Willix'), +(-1047007, 'I am glad that we are out again from this damned ditch. However, up here it is not much better!', 0, 0, 0, 'Willix'), +(-1047008, 'Finally! I am glad that I come, finally out here.', 0, 0, 0, 'Willix'), +(-1047009, 'I will rather rest a moment and come again to breath, before I return to Ratchet.', 0, 0, 0, 'Willix'), +(-1047010, 'Many thanks for your help.', 0, 0, 0, 'Willix'); \ No newline at end of file diff --git a/src/bindings/scripts/Makefile.am b/src/bindings/scripts/Makefile.am index 7086664d0ac..94a01ac23af 100644 --- a/src/bindings/scripts/Makefile.am +++ b/src/bindings/scripts/Makefile.am @@ -275,6 +275,7 @@ scripts/zone/netherstorm/netherstorm.cpp \ scripts/zone/onyxias_lair/boss_onyxia.cpp \ scripts/zone/orgrimmar/orgrimmar.cpp \ scripts/zone/razorfen_downs/boss_amnennar_the_coldbringer.cpp \ +scripts/zone/razorfen_kraul/razorfen_kraul.cpp \ scripts/zone/ruins_of_ahnqiraj/boss_ayamiss.cpp \ scripts/zone/ruins_of_ahnqiraj/boss_buru.cpp \ scripts/zone/ruins_of_ahnqiraj/boss_kurinnaxx.cpp \ diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index 3b29f9ddf8f..49a1dc79cc8 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -410,6 +410,9 @@ extern void AddSC_orgrimmar(); //Razorfen Downs extern void AddSC_boss_amnennar_the_coldbringer(); +//Razorfen Kraul +extern void AddSC_razorfen_kraul(); + //Redridge Mountains //Ruins of Ahn'Qiraj //Scarlet Monastery @@ -1608,6 +1611,9 @@ void ScriptsInit() //Razorfen Downs AddSC_boss_amnennar_the_coldbringer(); + //Razorfen Kraul + AddSC_razorfen_kraul(); + //Redridge Mountains //Ruins of Ahn'Qiraj //Scarlet Monastery diff --git a/src/bindings/scripts/VC71/71ScriptDev2.vcproj b/src/bindings/scripts/VC71/71ScriptDev2.vcproj index d0cd6592152..5d8da080d66 100644 --- a/src/bindings/scripts/VC71/71ScriptDev2.vcproj +++ b/src/bindings/scripts/VC71/71ScriptDev2.vcproj @@ -532,6 +532,10 @@ + + + + + + RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_creature->SetVisibility(VISIBILITY_ON); } -- cgit v1.2.3 From 2315eacbd52be4677ec3430911eb6aac2540d579 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 28 Dec 2008 01:18:02 +0100 Subject: *Support for quest 10451 - by Lightguard --HG-- branch : trunk --- sql/updates/691_world_scripts.sql | 1 + .../zone/shadowmoon_valley/shadowmoon_valley.cpp | 249 ++++++++++++++++++++- 2 files changed, 249 insertions(+), 1 deletion(-) create mode 100644 sql/updates/691_world_scripts.sql (limited to 'sql') diff --git a/sql/updates/691_world_scripts.sql b/sql/updates/691_world_scripts.sql new file mode 100644 index 00000000000..6c26e149e8c --- /dev/null +++ b/sql/updates/691_world_scripts.sql @@ -0,0 +1 @@ +update creature_template set scriptname='npc_earthmender_wilda' where entry=21027; \ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp index ee95d5066f3..be29cf79f0e 100644 --- a/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp +++ b/src/bindings/scripts/scripts/zone/shadowmoon_valley/shadowmoon_valley.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Shadowmoon_Valley SD%Complete: 100 -SDComment: Quest support: 10519, 10583, 10601, 10814, 10804, 10854, 11082. Vendor Drake Dealer Hurlunk. +SDComment: Quest support: 10519, 10583, 10601, 10814, 10804, 10854, 11082, 10451. Vendor Drake Dealer Hurlunk. SDCategory: Shadowmoon Valley EndScriptData */ @@ -30,9 +30,11 @@ npc_murkblood_overseer npc_neltharaku npc_karynaku npc_oronok_tornheart +npc_earthmender_wilda EndContentData */ #include "precompiled.h" +#include "../../npc/npc_escortAI.h" /*##### # mob_mature_netherwing_drake @@ -1036,6 +1038,245 @@ bool QuestAccept_Overlord_Morghor(Player *player, Creature *_Creature, const Que return false; } +/*#### +# npc_earthmender_wilda +####*/ + +#define SAY_START "I sense the tortured spirits, $N. They are this way, come quickly!" +#define SAY_AGGRO1 "Watch out!" +#define SAY_AGGRO2 "Naga attackers! Defend yourself!" +#define ASSASSIN_SAY_AGGRO1 "Kill them all!" +#define ASSASSIN_SAY_AGGRO2 "You will never essscape Coilssskarrr..." +#define SAY_PROGRESS1 "Grant me protection $N, i must break trough their foul magic!" +#define SAY_PROGRESS2 "The naga of Coilskar are exceptionally cruel to their prisoners. It is a miracle that I survived inside that watery prison for as long as I did. Earthmother be praised." +#define SAY_PROGRESS3 "Now we must find the exit." +#define SAY_PROGRESS4 "Lady Vashj must answer for these atrocities. She must be brought to justice!" +#define SAY_PROGRESS5 "The tumultuous nature of the great waterways of Azeroth and Draenor are a direct result of tormented water spirits." +#define SAY_PROGRESS6 "It shouldn't be much further, $N. The exit is just up ahead." +#define SAY_END "Thank you, $N. Please return to my brethren at the Altar of Damnation, near the Hand of Gul'dan, and tell them that Wilda is safe. May the Earthmother watch over you..." + + +#define QUEST_ESCAPE_FROM_COILSKAR_CISTERN 10451 +#define NPC_COILSKAR_ASSASSIN 21044 + +struct TRINITY_DLL_DECL npc_earthmender_wildaAI : public npc_escortAI +{ + npc_earthmender_wildaAI(Creature *c) : npc_escortAI(c) {Reset();} + + void Aggro(Unit *who) + { + Unit* player = Unit::GetUnit((*m_creature), PlayerGUID); + + if(who->GetTypeId() == TYPEID_UNIT && who->GetEntry() == NPC_COILSKAR_ASSASSIN) + DoSay(SAY_AGGRO2, LANG_UNIVERSAL, player); + else DoSay(SAY_AGGRO1, LANG_UNIVERSAL, player); + } + + void Reset() + { + m_creature->setFaction(1726); + } + + void WaypointReached(uint32 i) + { + Unit* player = Unit::GetUnit((*m_creature), PlayerGUID); + + if (!player) + return; + + switch(i) + { + case 0: + DoSay(SAY_START, LANG_UNIVERSAL, player); + m_creature->HandleEmoteCommand(EMOTE_ONESHOT_TALK); + break; + case 13: + DoSay(SAY_PROGRESS1, LANG_UNIVERSAL, player); + SummonAssassin(); + break; + case 14: + SummonAssassin(); break; + case 15: + DoSay(SAY_PROGRESS3, LANG_UNIVERSAL, player); break; + case 19: + switch(rand()%3) + { + case 0: + DoSay(SAY_PROGRESS2, LANG_UNIVERSAL, player); break; + case 1: + DoSay(SAY_PROGRESS4, LANG_UNIVERSAL, player); break; + case 2: + DoSay(SAY_PROGRESS5, LANG_UNIVERSAL, player); break; + } + break; + case 20: + SummonAssassin(); break; + case 26: + switch(rand()%3) + { + case 0: + DoSay(SAY_PROGRESS2, LANG_UNIVERSAL, player); break; + case 1: + DoSay(SAY_PROGRESS4, LANG_UNIVERSAL, player); break; + case 2: + DoSay(SAY_PROGRESS5, LANG_UNIVERSAL, player); break; + } + break; + case 27: + SummonAssassin(); break; + case 33: + switch(rand()%3) + { + case 0: + DoSay(SAY_PROGRESS2, LANG_UNIVERSAL, player); break; + case 1: + DoSay(SAY_PROGRESS4, LANG_UNIVERSAL, player); break; + case 2: + DoSay(SAY_PROGRESS5, LANG_UNIVERSAL, player); break; + } + break; + case 34: + SummonAssassin(); break; + case 37: + switch(rand()%3) + { + case 0: + DoSay(SAY_PROGRESS2, LANG_UNIVERSAL, player); break; + case 1: + DoSay(SAY_PROGRESS4, LANG_UNIVERSAL, player); break; + case 2: + DoSay(SAY_PROGRESS5, LANG_UNIVERSAL, player); break; + } + break; + case 38: + SummonAssassin(); break; + case 39: + DoSay(SAY_PROGRESS6, LANG_UNIVERSAL, player); break; + case 43: + switch(rand()%3) + { + case 0: + DoSay(SAY_PROGRESS2, LANG_UNIVERSAL, player); break; + case 1: + DoSay(SAY_PROGRESS4, LANG_UNIVERSAL, player); break; + case 2: + DoSay(SAY_PROGRESS5, LANG_UNIVERSAL, player); break; + } + break; + case 44: + SummonAssassin(); break; + case 50: + DoSay(SAY_END, LANG_UNIVERSAL, player); + ((Player*)player)->GroupEventHappens(QUEST_ESCAPE_FROM_COILSKAR_CISTERN, m_creature); + break; + } + } + + void SummonAssassin() + { + Unit* player = Unit::GetUnit((*m_creature), PlayerGUID); + + Creature* CoilskarAssassin = m_creature->SummonCreature(NPC_COILSKAR_ASSASSIN, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), m_creature->GetOrientation(), TEMPSUMMON_DEAD_DESPAWN, 0); + if( CoilskarAssassin ) + { + switch(rand()%2) + { + case 0: + CoilskarAssassin->Say(ASSASSIN_SAY_AGGRO1, LANG_UNIVERSAL, PlayerGUID); break; + case 1: + CoilskarAssassin->Say(ASSASSIN_SAY_AGGRO2, LANG_UNIVERSAL, PlayerGUID); break; + } + CoilskarAssassin->AI()->AttackStart(m_creature); + } + else error_log("SD2 ERROR: Coilskar Assassin couldn't be summmoned"); + } + + void JustDied(Unit* killer) + { + if (PlayerGUID) + { + Unit* player = Unit::GetUnit((*m_creature), PlayerGUID); + if (player) + ((Player*)player)->FailQuest(QUEST_ESCAPE_FROM_COILSKAR_CISTERN); + } + } + + void UpdateAI(const uint32 diff) + { + npc_escortAI::UpdateAI(diff); + } +}; + +CreatureAI* GetAI_npc_earthmender_wildaAI(Creature *_Creature) +{ + npc_earthmender_wildaAI* earthmender_wildaAI = new npc_earthmender_wildaAI(_Creature); + + earthmender_wildaAI->AddWaypoint(0, -2637.466064, 1359.977905, 35.889114, 2000); // SAY_START + earthmender_wildaAI->AddWaypoint(1, -2666.364990, 1348.222656, 34.445557); + earthmender_wildaAI->AddWaypoint(2, -2693.789307, 1336.964966, 34.445557); + earthmender_wildaAI->AddWaypoint(3, -2715.495361, 1328.054443, 34.106014); + earthmender_wildaAI->AddWaypoint(4, -2742.530762, 1314.138550, 33.606144); + earthmender_wildaAI->AddWaypoint(5, -2745.077148, 1311.108765, 33.630898); + earthmender_wildaAI->AddWaypoint(6, -2749.855225, 1302.737915, 33.475632); + earthmender_wildaAI->AddWaypoint(7, -2753.639648, 1294.059448, 33.314930); + earthmender_wildaAI->AddWaypoint(8, -2756.796387, 1285.122192, 33.391262); + earthmender_wildaAI->AddWaypoint(9, -2750.042969, 1273.661987, 33.188259); + earthmender_wildaAI->AddWaypoint(10, -2740.378418, 1258.846680, 33.212521); + earthmender_wildaAI->AddWaypoint(11, -2733.629395, 1248.259766, 33.640598); + earthmender_wildaAI->AddWaypoint(12, -2727.212646, 1238.606445, 33.520847); + earthmender_wildaAI->AddWaypoint(13, -2726.377197, 1237.264526, 33.461823, 4000); // SAY_PROGRESS1 + earthmender_wildaAI->AddWaypoint(14, -2746.383301, 1266.390625, 33.191952, 2000); + earthmender_wildaAI->AddWaypoint(15, -2746.383301, 1266.390625, 33.191952, 4000); // SAY_PROGRESS3 + earthmender_wildaAI->AddWaypoint(16, -2758.927734, 1285.134155, 33.341728); + earthmender_wildaAI->AddWaypoint(17, -2761.845703, 1292.313599, 33.209042); + earthmender_wildaAI->AddWaypoint(18, -2758.871826, 1300.677612, 33.285332); + earthmender_wildaAI->AddWaypoint(19, -2758.871826, 1300.677612, 33.285332); + earthmender_wildaAI->AddWaypoint(20, -2753.928955, 1307.755859, 33.452457); + earthmender_wildaAI->AddWaypoint(20, -2738.612061, 1316.191284, 33.482975); + earthmender_wildaAI->AddWaypoint(21, -2727.897461, 1320.013916, 33.381111); + earthmender_wildaAI->AddWaypoint(22, -2709.458740, 1315.739990, 33.301838); + earthmender_wildaAI->AddWaypoint(23, -2704.658936, 1301.620361, 32.463303); + earthmender_wildaAI->AddWaypoint(24, -2704.120117, 1298.922607, 32.768162); + earthmender_wildaAI->AddWaypoint(25, -2691.798340, 1292.846436, 33.852642); + earthmender_wildaAI->AddWaypoint(26, -2682.879639, 1288.853882, 32.995399); + earthmender_wildaAI->AddWaypoint(27, -2661.869141, 1279.682495, 26.686783); + earthmender_wildaAI->AddWaypoint(28, -2648.943604, 1270.272827, 24.147522); + earthmender_wildaAI->AddWaypoint(29, -2642.506836, 1262.938721, 23.512444); + earthmender_wildaAI->AddWaypoint(20, -2636.984863, 1252.429077, 20.418257); + earthmender_wildaAI->AddWaypoint(31, -2648.113037, 1224.984863, 8.691818); + earthmender_wildaAI->AddWaypoint(32, -2658.393311, 1200.136719, 5.492243); + earthmender_wildaAI->AddWaypoint(33, -2668.504395, 1190.450562, 3.127407); + earthmender_wildaAI->AddWaypoint(34, -2685.930420, 1174.360840, 5.163924); + earthmender_wildaAI->AddWaypoint(35, -2701.613770, 1160.026367, 5.611311); + earthmender_wildaAI->AddWaypoint(36, -2714.659668, 1149.980347, 4.342373); + earthmender_wildaAI->AddWaypoint(37, -2721.443359, 1145.002808, 1.913474); + earthmender_wildaAI->AddWaypoint(38, -2733.962158, 1143.436279, 2.620415); + earthmender_wildaAI->AddWaypoint(39, -2757.876709, 1146.937500, 6.184002, 2000); // SAY_PROGRESS6 + earthmender_wildaAI->AddWaypoint(40, -2772.300537, 1166.052734, 6.331811); + earthmender_wildaAI->AddWaypoint(41, -2790.265381, 1189.941650, 5.207958); + earthmender_wildaAI->AddWaypoint(42, -2805.448975, 1208.663940, 5.557623); + earthmender_wildaAI->AddWaypoint(43, -2820.617676, 1225.870239, 6.266103); + earthmender_wildaAI->AddWaypoint(44, -2831.926758, 1237.725830, 5.808506); + earthmender_wildaAI->AddWaypoint(45, -2842.578369, 1252.869629, 6.807481); + earthmender_wildaAI->AddWaypoint(46, -2846.344971, 1258.727295, 7.386168); + earthmender_wildaAI->AddWaypoint(47, -2847.556396, 1266.771729, 8.208790); + earthmender_wildaAI->AddWaypoint(48, -2841.654541, 1285.809204, 7.933223); + earthmender_wildaAI->AddWaypoint(49, -2841.754883, 1289.832520, 6.990304); + earthmender_wildaAI->AddWaypoint(50, -2871.398438, 1302.348145, 6.807335, 8000); // SAY_END + + return (CreatureAI*)earthmender_wildaAI; +} + +bool QuestAccept_npc_earthmender_wilda(Player* player, Creature* creature, Quest const* quest) +{ + if (quest->GetQuestId() == QUEST_ESCAPE_FROM_COILSKAR_CISTERN) + { + creature->setFaction(1725); + ((npc_escortAI*)(creature->AI()))->Start(true, true, false, player->GetGUID()); + } + return true; +} + void AddSC_shadowmoon_valley() { Script *newscript; @@ -1107,4 +1348,10 @@ void AddSC_shadowmoon_valley() newscript->pGossipHello = &GossipHello_npc_yarzill_fly; newscript->pGossipSelect = &GossipSelect_npc_yarzill_fly; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name = "npc_earthmender_wilda"; + newscript->GetAI = &GetAI_npc_earthmender_wildaAI; + newscript->pQuestAccept = &QuestAccept_npc_earthmender_wilda; + newscript->RegisterSelf(); } -- cgit v1.2.3 From dc29c2d2524e2e1c052506ae17cfc90b37a3bc56 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Sun, 28 Dec 2008 01:23:22 +0100 Subject: *DB data for spell 38164 - bye XTElite1 *DB data for spell 14144, 14148 - bye Disassembler --HG-- branch : trunk --- sql/updates/692_world.sql | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 sql/updates/692_world.sql (limited to 'sql') diff --git a/sql/updates/692_world.sql b/sql/updates/692_world.sql new file mode 100644 index 00000000000..634bf6a7f46 --- /dev/null +++ b/sql/updates/692_world.sql @@ -0,0 +1,7 @@ +DELETE FROM `spell_proc_event` WHERE `entry` IN ('14144','14148'); +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask`, `procFlags`, `procEx`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +('14144','0','0','0','2','0','0','0','0'), +('14148','0','0','0','2','0','0','0','0'); +DELETE FROM `spell_proc_event` WHERE entry = 38164; +INSERT INTO `spell_proc_event` (`entry`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask`,`procFlags`,`procEx`,`ppmRate`,`CustomChance`,`Cooldown`) VALUES + (38164,0,0,0,0,1,0,0,60); \ No newline at end of file -- cgit v1.2.3