From 3f7d543aba7da29fd27d1275390ccdb5f0b77e35 Mon Sep 17 00:00:00 2001 From: raczman Date: Thu, 25 Dec 2008 13:23:56 +0100 Subject: A little spell_script_target update. --HG-- branch : trunk --- sql/updates/640_world.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/640_world.sql (limited to 'sql/updates') diff --git a/sql/updates/640_world.sql b/sql/updates/640_world.sql new file mode 100644 index 00000000000..89e5f067724 --- /dev/null +++ b/sql/updates/640_world.sql @@ -0,0 +1,4 @@ +INSERT INTO `spell_script_target` VALUES +(33655,0,183350), +(33633,0,183351), +(44374,1,24722); -- cgit v1.2.3 From 5dd0120c66004ce335ce57a1d08640a466ff1ae0 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Thu, 25 Dec 2008 13:38:50 +0100 Subject: *Added DELETE query in 640_world.sql --HG-- branch : trunk --- sql/updates/640_world.sql | 1 + 1 file changed, 1 insertion(+) (limited to 'sql/updates') diff --git a/sql/updates/640_world.sql b/sql/updates/640_world.sql index 89e5f067724..20253029d5b 100644 --- a/sql/updates/640_world.sql +++ b/sql/updates/640_world.sql @@ -1,3 +1,4 @@ +DELETE FROM `spell_script_target` WHERE entry IN (33655, 33633, 44374); INSERT INTO `spell_script_target` VALUES (33655,0,183350), (33633,0,183351), -- cgit v1.2.3 From 3915777c719f53de87d5bf0a7386f46d415187b3 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Thu, 25 Dec 2008 21:27:07 +0100 Subject: *Support for quest 9531 --HG-- branch : trunk --- sql/updates/645_world_scripts.sql | 6 + .../scripts/zone/azuremyst_isle/azuremyst_isle.cpp | 157 ++++++++++++++++++++- 2 files changed, 162 insertions(+), 1 deletion(-) create mode 100644 sql/updates/645_world_scripts.sql (limited to 'sql/updates') diff --git a/sql/updates/645_world_scripts.sql b/sql/updates/645_world_scripts.sql new file mode 100644 index 00000000000..bb4916be082 --- /dev/null +++ b/sql/updates/645_world_scripts.sql @@ -0,0 +1,6 @@ +delete from creature where id=17318; +update creature_template set scriptname='npc_geezle' where entry=17318; +delete from event_scripts where id=10675; +insert into event_scripts () VALUES (10675, 0, 10, 17318, 120000, 0, -5134.3, -11250.3, 5.29568, 6.23554), +(10675, 72, 7, 9531, 0, 0, 0, 0, 0, 0); +update quest_template set specialflags=2, reqcreatureorgoid1=0, reqcreatureorgocount1=0 where entry=9531; \ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp index 59dc502b2f5..cfb87a142b6 100644 --- a/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp +++ b/src/bindings/scripts/scripts/zone/azuremyst_isle/azuremyst_isle.cpp @@ -17,7 +17,7 @@ /* ScriptData SDName: Azuremyst_Isle SD%Complete: 75 -SDComment: Quest support: 9283, 9537, 9582, 9554(special flight path, proper model for mount missing). Injured Draenei cosmetic only +SDComment: Quest support: 9283, 9537, 9582, 9554, 9531(special flight path, proper model for mount missing). Injured Draenei cosmetic only SDCategory: Azuremyst Isle EndScriptData */ @@ -27,6 +27,7 @@ npc_engineer_spark_overgrind npc_injured_draenei npc_magwin npc_susurrus +npc_geezle EndContentData */ #include "precompiled.h" @@ -462,6 +463,154 @@ bool GossipSelect_npc_susurrus(Player *player, Creature *_Creature, uint32 sende return true; } +/*###### +## npc_geezle +######*/ +//delete from creature where id=17318; +//update creature_template set scriptname='npc_geezle' where entry=17318; +//delete from event_scripts where id=10675; +//insert into event_scripts () VALUES (10675, 0, 10, 17318, 120000, 0, -5134.3, -11250.3, 5.29568, 6.23554), (10675, 72, 7, 9531, 0, 0, 0, 0, 0, 0); +//update quest_template set specialflags=2, reqcreatureorgoid1=0, reqcreatureorgocount1=0 where entry=9531; +#define GEEZLE_SAY_1 "What's the big idea, Spark?" +#define SPARK_SAY_2 "What's the big idea? You nearly blew my cover, idiot! I told you to put the compass and navigation maps somewhere safe - not out in the open for any fool to discover." +#define SPARK_SAY_3 "The Master has gone to great lengths to secure information about the whereabouts of the Exodar. You could have blown the entire operation, including the cover of our spy on the inside." +#define GEEZLE_SAY_4 "Relax, Spark! I have it all under control. We'll strip mine the Exodar right out from under 'em - making both you and I very, very rich in the process." +#define SPARK_SAY_5 "Relax? Do you know what Kael'thas does to those that fail him, Geezle? Eternal suffering and pain... Do NOT screw this up, fool." +#define SPARK_SAY_6 "Our Bloodmyst scouts have located our contact. The fool, Velen, will soon leave himself open and defenseless -- long enough for us to strike! Now get out of my sight before I vaporize you..." +#define GEEZLE_SAY_7 "Yes, sir. It won't happen again..." + +#define EMOTE_SPARK "picks up the naga flag." +#define MOB_SPARK 17243 +#define GO_NAGA_FLAG 181694 + +static float SparkPos[4] = {-5030.95, -11291.99, 7.97}; + +struct TRINITY_DLL_DECL npc_geezleAI : public ScriptedAI +{ + npc_geezleAI(Creature *c) : ScriptedAI(c) {Reset();} + + std::list FlagList; + + uint64 SparkGUID; + + uint32 Step; + uint32 SayTimer; + + bool EventStarted; + + void Reset() + { + SparkGUID = 0; + Step = 0; + StartEvent(); + } + + void Aggro(Unit* who){} + + void StartEvent() + { + Step = 1; + EventStarted = true; + Creature* Spark = m_creature->SummonCreature(MOB_SPARK, SparkPos[0], SparkPos[1], SparkPos[2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 1000); + SparkGUID = Spark->GetGUID(); + Spark->setActive(true); + Spark->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + m_creature->GetMotionMaster()->MovePoint(0, -5092.26, -11252, 0.71); + Spark->GetMotionMaster()->MovePoint(0, -5080.70, -11253.61, 0.56); + SayTimer = 23000; + } + + uint32 NextStep(uint32 Step) + { + Unit* Spark = Unit::GetUnit((*m_creature), SparkGUID); + + switch(Step) + { + case 0: return 99999; + case 1: + //DespawnNagaFlag(true); + ((Creature*)Spark)->TextEmote(EMOTE_SPARK, NULL, false); + return 1000; + case 2: + DoSay(GEEZLE_SAY_1, LANG_UNIVERSAL, Spark); + Spark->SetInFront(m_creature); + m_creature->SetInFront(Spark); + return 5000; + case 3: + ((Creature*)Spark)->Say(SPARK_SAY_2, LANG_UNIVERSAL, NULL); + return 7000; + case 4: + ((Creature*)Spark)->Say(SPARK_SAY_3, LANG_UNIVERSAL, NULL); + return 8000; + case 5: + DoSay(GEEZLE_SAY_4, LANG_UNIVERSAL, Spark); + return 8000; + case 6: + ((Creature*)Spark)->Say(SPARK_SAY_5, LANG_UNIVERSAL, NULL); + return 9000; + case 7: + ((Creature*)Spark)->Say(SPARK_SAY_6, LANG_UNIVERSAL, NULL); + return 8000; + case 8: + DoSay(GEEZLE_SAY_7, LANG_UNIVERSAL, Spark); + return 2000; + case 9: + m_creature->GetMotionMaster()->MoveTargetedHome(); + Spark->GetMotionMaster()->MovePoint(0, -5030.95, -11291.99, 7.97); + return 20000; + case 10: + Spark->DealDamage(Spark,Spark->GetHealth(),NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + //DespawnNagaFlag(false); + m_creature->SetVisibility(VISIBILITY_OFF); + default: return 99999999; + } + } + + void DespawnNagaFlag(bool despawn) + { + CellPair pair(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); + Cell cell(pair); + cell.data.Part.reserved = ALL_DISTRICT; + cell.SetNoCreate(); + + Trinity::AllGameObjectsWithEntryInGrid go_check(GO_NAGA_FLAG); + Trinity::GameObjectListSearcher go_search(FlagList, go_check); + TypeContainerVisitor + , GridTypeMapContainer> go_visit(go_search); + CellLock cell_lock(cell, pair); + cell_lock->Visit(cell_lock, go_visit, *(m_creature->GetMap())); + + Player* player = NULL; + if (!FlagList.empty()) + { + for(std::list::iterator itr = FlagList.begin(); itr != FlagList.end(); ++itr) + { + //TODO: Found how to despawn and respawn + if(despawn) + (*itr)->RemoveFromWorld(); + else + (*itr)->Respawn(); + } + } else error_log("SD2 ERROR: FlagList is empty!"); + } + + void UpdateAI(const uint32 diff) + { + if(SayTimer < diff) + { + if(EventStarted) + { + SayTimer = NextStep(Step++); + } + }else SayTimer -= diff; + } +}; + +CreatureAI* GetAI_npc_geezleAI(Creature *_Creature) +{ + return new npc_geezleAI(_Creature); +} + /*###### ## ######*/ @@ -498,4 +647,10 @@ void AddSC_azuremyst_isle() newscript->pGossipHello = &GossipHello_npc_susurrus; newscript->pGossipSelect = &GossipSelect_npc_susurrus; newscript->RegisterSelf(); + + newscript = new Script; + newscript->Name="npc_geezle"; + newscript->GetAI = &GetAI_npc_geezleAI; + newscript->RegisterSelf(); + } -- cgit v1.2.3 From f6b2eb4e5b0aea5e29c7220d97c420d5abeca1b8 Mon Sep 17 00:00:00 2001 From: Blaymoira Date: Fri, 26 Dec 2008 20:25:31 +0100 Subject: *Gossips for creature 20907 --HG-- branch : trunk --- sql/updates/667_world_scripts.sql | 1 + .../scripts/zone/netherstorm/netherstorm.cpp | 54 +++++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 sql/updates/667_world_scripts.sql (limited to 'sql/updates') diff --git a/sql/updates/667_world_scripts.sql b/sql/updates/667_world_scripts.sql new file mode 100644 index 00000000000..1da0cea44e1 --- /dev/null +++ b/sql/updates/667_world_scripts.sql @@ -0,0 +1 @@ +update creature_template set scriptname='npc_professor_dabiri' where entry=20907; \ No newline at end of file diff --git a/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp b/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp index 555ffc0b769..8d1c528f7ae 100644 --- a/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp +++ b/src/bindings/scripts/scripts/zone/netherstorm/netherstorm.cpp @@ -670,11 +670,13 @@ bool AreaTrigger_at_commander_dawnforge(Player *player, AreaTriggerEntry *at) ## npc_protectorate_nether_drake ######*/ +#define GOSSIP_ITEM "I'm ready to fly! Take me up, dragon!" + bool GossipHello_npc_protectorate_nether_drake(Player *player, Creature *_Creature) { //On Nethery Wings if (player->GetQuestStatus(10438) == QUEST_STATUS_INCOMPLETE && player->HasItemCount(29778,1) ) - player->ADD_GOSSIP_ITEM(0, "Fly me to Ultris", GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID()); @@ -697,6 +699,49 @@ bool GossipSelect_npc_protectorate_nether_drake(Player *player, Creature *_Creat return true; } +/*###### +## npc_professor_dabiri +######*/ + +#define SPELL_PHASE_DISTRUPTOR 35780 +#define GOSSIP_ITEM "I need a new phase distruptor, Professor" +#define WHISPER_DABIRI "Saeed is currently engaged or awaiting orders to engage. You may check directly east of me and see if Saeed is ready for you. If he is not present then he is off fighting another battle. I recommend that you wait for him to return before attacking Dimensius." + +#define QUEST_DIMENSIUS 10439 +#define QUEST_ON_NETHERY_WINGS 10438 + +bool GossipHello_npc_professor_dabiri(Player *player, Creature *_Creature) +{ + if (_Creature->isQuestGiver()) + player->PrepareQuestMenu( _Creature->GetGUID() ); + + if(player->GetQuestStatus(QUEST_ON_NETHERY_WINGS) == QUEST_STATUS_INCOMPLETE && !player->HasItemCount(29778, 1)) + player->ADD_GOSSIP_ITEM(0, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + + player->SEND_GOSSIP_MENU(_Creature->GetNpcTextId(), _Creature->GetGUID()); + + return true; +} + +bool GossipSelect_npc_professor_dabiri(Player *player, Creature *_Creature, uint32 sender, uint32 action ) +{ + if (action == GOSSIP_ACTION_INFO_DEF+1) + { + _Creature->CastSpell(player, SPELL_PHASE_DISTRUPTOR, false); + player->CLOSE_GOSSIP_MENU(); + } + + return true; +} + +bool QuestAccept_npc_professor_dabiri(Player *player, Creature *creature, Quest const *quest ) +{ + if(quest->GetQuestId() == QUEST_DIMENSIUS) + creature->Whisper(WHISPER_DABIRI, player->GetGUID(), false); + + return true; +} + /*###### ## npc_veronia ######*/ @@ -870,6 +915,13 @@ void AddSC_netherstorm() newscript->pGossipSelect = &GossipSelect_npc_protectorate_nether_drake; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "npc_professor_dabiri"; + newscript->pGossipHello = &GossipHello_npc_professor_dabiri; + newscript->pGossipSelect = &GossipSelect_npc_professor_dabiri; + newscript->pQuestAccept = &QuestAccept_npc_professor_dabiri; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name="npc_veronia"; newscript->pGossipHello = &GossipHello_npc_veronia; -- cgit v1.2.3