From 908ae08a0aed76c3d6a1a66848c9811ece44a1e7 Mon Sep 17 00:00:00 2001 From: Myran2 Date: Fri, 31 Aug 2012 01:26:21 +0100 Subject: Scripts/Commands: Create a new group of commands, .cheat, and add new and move old commands to it: Changes: - .explorecheat is now .cheat explore - .waterwalk is now .cheat waterwalk - .taxicheat is now .cheat taxi New commands: - .cheat god - .cheat casttime - .cheat cooldown - .cheat power (Descriptions available in the SQL file / in-game) Inspiration on ArcEmu commands Closes #7569 --- sql/updates/world/2012_8_29_00_world_command.sql | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 sql/updates/world/2012_8_29_00_world_command.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2012_8_29_00_world_command.sql b/sql/updates/world/2012_8_29_00_world_command.sql new file mode 100644 index 00000000000..c0686d6d907 --- /dev/null +++ b/sql/updates/world/2012_8_29_00_world_command.sql @@ -0,0 +1,14 @@ +DELETE FROM `command` WHERE `name`='explorecheat'; +DELETE FROM `command` WHERE `name`='taxicheat'; +DELETE FROM `command` WHERE `name`='waterwalk'; + +DELETE FROM `command` WHERE `name`='cheat' OR `name` LIKE 'cheat%'; +INSERT INTO `command` (`name`, `security`, `help`) VALUES +('cheat', 2, 'Syntax: .cheat $subcommand\r\nType .cheat to see the list of possible subcommands or .help cheat $subcommand to see info on subcommands'), +('cheat god', 2, 'Syntax: .cheat god [on/off]\r\nEnables or disables your character''s ability to take damage.'), +('cheat casttime', 2, 'Syntax: .cheat casttime [on/off]\r\nEnables or disables your character''s spell cast times.'), +('cheat cooldown', 2, 'Syntax: .cheat cooldown [on/off]\r\nEnables or disables your character''s spell cooldowns.'), +('cheat power', 2, 'Syntax: .cheat power [on/off]\r\nEnables or disables your character''s spell cost (e.g mana).'), +('cheat waterwalk', 2, 'Syntax: .cheat waterwalk on/off\r\nSet on/off waterwalk state for selected player or self if no player selected.'), +('cheat explore', 2, 'Syntax: .cheat explore #flag\r\nReveal or hide all maps for the selected player. If no player is selected, hide or reveal maps to you.\r\nUse a #flag of value 1 to reveal, use a #flag value of 0 to hide all maps.'), +('cheat taxi', 2, 'Syntax: .cheat taxi on/off\r\nTemporary grant access or remove to all taxi routes for the selected character.\r\n If no character is selected, hide or reveal all routes to you.Visited taxi nodes sill accessible after removing access.'); -- cgit v1.2.3 From 1a5df2b72ee92454959ec6f3163493e785c7033d Mon Sep 17 00:00:00 2001 From: Nay Date: Fri, 31 Aug 2012 01:29:18 +0100 Subject: SQL: Rename SQL --- sql/updates/world/2012_08_31_00_world_command.sql | 14 ++++++++++++++ sql/updates/world/2012_8_29_00_world_command.sql | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) create mode 100644 sql/updates/world/2012_08_31_00_world_command.sql delete mode 100644 sql/updates/world/2012_8_29_00_world_command.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2012_08_31_00_world_command.sql b/sql/updates/world/2012_08_31_00_world_command.sql new file mode 100644 index 00000000000..c0686d6d907 --- /dev/null +++ b/sql/updates/world/2012_08_31_00_world_command.sql @@ -0,0 +1,14 @@ +DELETE FROM `command` WHERE `name`='explorecheat'; +DELETE FROM `command` WHERE `name`='taxicheat'; +DELETE FROM `command` WHERE `name`='waterwalk'; + +DELETE FROM `command` WHERE `name`='cheat' OR `name` LIKE 'cheat%'; +INSERT INTO `command` (`name`, `security`, `help`) VALUES +('cheat', 2, 'Syntax: .cheat $subcommand\r\nType .cheat to see the list of possible subcommands or .help cheat $subcommand to see info on subcommands'), +('cheat god', 2, 'Syntax: .cheat god [on/off]\r\nEnables or disables your character''s ability to take damage.'), +('cheat casttime', 2, 'Syntax: .cheat casttime [on/off]\r\nEnables or disables your character''s spell cast times.'), +('cheat cooldown', 2, 'Syntax: .cheat cooldown [on/off]\r\nEnables or disables your character''s spell cooldowns.'), +('cheat power', 2, 'Syntax: .cheat power [on/off]\r\nEnables or disables your character''s spell cost (e.g mana).'), +('cheat waterwalk', 2, 'Syntax: .cheat waterwalk on/off\r\nSet on/off waterwalk state for selected player or self if no player selected.'), +('cheat explore', 2, 'Syntax: .cheat explore #flag\r\nReveal or hide all maps for the selected player. If no player is selected, hide or reveal maps to you.\r\nUse a #flag of value 1 to reveal, use a #flag value of 0 to hide all maps.'), +('cheat taxi', 2, 'Syntax: .cheat taxi on/off\r\nTemporary grant access or remove to all taxi routes for the selected character.\r\n If no character is selected, hide or reveal all routes to you.Visited taxi nodes sill accessible after removing access.'); diff --git a/sql/updates/world/2012_8_29_00_world_command.sql b/sql/updates/world/2012_8_29_00_world_command.sql deleted file mode 100644 index c0686d6d907..00000000000 --- a/sql/updates/world/2012_8_29_00_world_command.sql +++ /dev/null @@ -1,14 +0,0 @@ -DELETE FROM `command` WHERE `name`='explorecheat'; -DELETE FROM `command` WHERE `name`='taxicheat'; -DELETE FROM `command` WHERE `name`='waterwalk'; - -DELETE FROM `command` WHERE `name`='cheat' OR `name` LIKE 'cheat%'; -INSERT INTO `command` (`name`, `security`, `help`) VALUES -('cheat', 2, 'Syntax: .cheat $subcommand\r\nType .cheat to see the list of possible subcommands or .help cheat $subcommand to see info on subcommands'), -('cheat god', 2, 'Syntax: .cheat god [on/off]\r\nEnables or disables your character''s ability to take damage.'), -('cheat casttime', 2, 'Syntax: .cheat casttime [on/off]\r\nEnables or disables your character''s spell cast times.'), -('cheat cooldown', 2, 'Syntax: .cheat cooldown [on/off]\r\nEnables or disables your character''s spell cooldowns.'), -('cheat power', 2, 'Syntax: .cheat power [on/off]\r\nEnables or disables your character''s spell cost (e.g mana).'), -('cheat waterwalk', 2, 'Syntax: .cheat waterwalk on/off\r\nSet on/off waterwalk state for selected player or self if no player selected.'), -('cheat explore', 2, 'Syntax: .cheat explore #flag\r\nReveal or hide all maps for the selected player. If no player is selected, hide or reveal maps to you.\r\nUse a #flag of value 1 to reveal, use a #flag value of 0 to hide all maps.'), -('cheat taxi', 2, 'Syntax: .cheat taxi on/off\r\nTemporary grant access or remove to all taxi routes for the selected character.\r\n If no character is selected, hide or reveal all routes to you.Visited taxi nodes sill accessible after removing access.'); -- cgit v1.2.3 From 20e629d038923a3d71567df3124d2d4ad52b1880 Mon Sep 17 00:00:00 2001 From: w1sht0l1v3 Date: Fri, 31 Aug 2012 04:15:04 +0300 Subject: DB/SAI: Taking on All Challengers & Defending Your Title --- sql/updates/world/2012_08_31_00_world_sai.sql | 50 ++++++++++++++ src/server/scripts/Northrend/storm_peaks.cpp | 98 --------------------------- 2 files changed, 50 insertions(+), 98 deletions(-) create mode 100644 sql/updates/world/2012_08_31_00_world_sai.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2012_08_31_00_world_sai.sql b/sql/updates/world/2012_08_31_00_world_sai.sql new file mode 100644 index 00000000000..fd7e0d7810f --- /dev/null +++ b/sql/updates/world/2012_08_31_00_world_sai.sql @@ -0,0 +1,50 @@ +-- Defending Your Title (13423) +-- Taking on All Challengers (12971) + +SET @NPC_CHALLENGER := 30012; -- Victorious Challenger +SET @QUEST1 := 12971; +SET @QUEST2 := 13423; +SET @GOSSIP_MENUID := 9865; +SET @SPELL_SUNDER := 11971; -- Sunder Armor +SET @SPELL_REND := 11977; -- Rend + +UPDATE `creature_template` SET `faction_A`=2109,`faction_H`=2109,`unit_flags`=0x8000,`npcflag`=0x1,`gossip_menu_id`=@GOSSIP_MENUID,`AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@NPC_CHALLENGER; + +DELETE FROM `creature_template_addon` WHERE `entry`=@NPC_CHALLENGER; +INSERT INTO `creature_template_addon` (`entry`,`mount`,`bytes1`,`bytes2`,`auras`) VALUES +(@NPC_CHALLENGER,0,0x0,0x1,''); + +DELETE FROM `creature_text` WHERE `entry`=@NPC_CHALLENGER; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@NPC_CHALLENGER,0,0,'You will not defeat me!',12,0,100,0,0,0,'Victorious Challenger'), +(@NPC_CHALLENGER,0,1,'You''re not worthy of Thorim!',12,0,100,0,0,0,'Victorious Challenger'), +(@NPC_CHALLENGER,0,2,'Good luck... You''ll need it!',12,0,100,0,0,0,'Victorious Challenger'), +(@NPC_CHALLENGER,0,3,'May the best win!',12,0,100,0,0,0,'Victorious Challenger'); + +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP_MENUID; +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(@GOSSIP_MENUID,13660); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP_MENUID; +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 +(@GOSSIP_MENUID,0,0,'Let''s do this, sister.',1,1,0,0,0,0,''); + +DELETE FROM `creature_equip_template` WHERE `entry`=@NPC_CHALLENGER; +INSERT INTO `creature_equip_template` (`entry`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES +(@NPC_CHALLENGER,40542,39288,0); + +DELETE FROM `smart_scripts` WHERE (`source_type`=0 AND `entryorguid`=@NPC_CHALLENGER) OR (`source_type`=9 AND `entryorguid`=@NPC_CHALLENGER*100); +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 +(@NPC_CHALLENGER,0,0,0,25,0,100,0,0,0,0,0,2,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Victorious Challenger - On Reset - Set Default Faction'), +(@NPC_CHALLENGER,0,1,2,62,0,100,0,@GOSSIP_MENUID,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Victorious Challenger - On Gossip - Close Gossip'), +(@NPC_CHALLENGER,0,2,0,61,0,100,0,0,0,0,0,80,@NPC_CHALLENGER*100,0,0,0,0,0,1,0,0,0,0,0,0,0,'Victorious Challenger - On Gossip - Run Timed Script'), +(@NPC_CHALLENGER,0,3,0,9,0,100,0,0,5,5000,10000,11,@SPELL_SUNDER,0,0,0,0,0,2,0,0,0,0,0,0,0,'Victorious Challenger - On Range - Cast Sunder Armor'), +(@NPC_CHALLENGER,0,4,0,0,0,100,0,10000,15000,15000,20000,11,@SPELL_REND,0,0,0,0,0,2,0,0,0,0,0,0,0,'Victorious Challenger - IC - Cast Rend'), +(@NPC_CHALLENGER*100,9,0,0,0,0,100,0,1000,1000,1000,1000,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Victorious Challenger - Timed - Talk'), +(@NPC_CHALLENGER*100,9,1,0,0,0,100,0,3000,3000,3000,3000,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,'Victorious Challenger - Timed - Set Faction Hostile'), +(@NPC_CHALLENGER*100,9,2,0,0,0,100,0,0,0,0,0,49,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Victorious Challenger - Timed - Attack Invoker'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=@GOSSIP_MENUID; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES +(15,@GOSSIP_MENUID,0,0,0,9,0,@QUEST1,0,0,0,0,'','Show gossip option 0 if player has quest Taking on All Challengers'), +(15,@GOSSIP_MENUID,0,0,1,9,0,@QUEST2,0,0,0,0,'','Show gossip option 0 if player has quest Defending Your Title'); diff --git a/src/server/scripts/Northrend/storm_peaks.cpp b/src/server/scripts/Northrend/storm_peaks.cpp index 6bf342e4643..60c289dc8de 100644 --- a/src/server/scripts/Northrend/storm_peaks.cpp +++ b/src/server/scripts/Northrend/storm_peaks.cpp @@ -194,103 +194,6 @@ public: } }; -/*###### -## npc_victorious_challenger -######*/ - -#define GOSSIP_CHALLENGER "Let's do this, sister." - -enum eVictoriousChallenger -{ - QUEST_TAKING_ALL_CHALLENGERS = 12971, - QUEST_DEFENDING_YOUR_TITLE = 13423, - - SPELL_SUNDER_ARMOR = 11971, - SPELL_REND_VC = 11977 -}; - -class npc_victorious_challenger : public CreatureScript -{ -public: - npc_victorious_challenger() : CreatureScript("npc_victorious_challenger") { } - - struct npc_victorious_challengerAI : public ScriptedAI - { - npc_victorious_challengerAI(Creature* creature) : ScriptedAI(creature) {} - - uint32 SunderArmorTimer; - uint32 RendTimer; - - void Reset() - { - me->RestoreFaction(); - - SunderArmorTimer = 10000; - RendTimer = 15000; - } - - void UpdateAI(const uint32 diff) - { - //Return since we have no target - if (!UpdateVictim()) - return; - - if (RendTimer < diff) - { - DoCast(me->getVictim(), SPELL_REND_VC, true); - RendTimer = 15000; - }else RendTimer -= diff; - - if (SunderArmorTimer < diff) - { - DoCast(me->getVictim(), SPELL_SUNDER_ARMOR, true); - SunderArmorTimer = 10000; - }else SunderArmorTimer -= diff; - - DoMeleeAttackIfReady(); - } - - void KilledUnit(Unit* /*victim*/) - { - me->RestoreFaction(); - } - - }; - - bool OnGossipHello(Player* player, Creature* creature) - { - if (creature->isQuestGiver()) - player->PrepareQuestMenu(creature->GetGUID()); - - if (player->GetQuestStatus(QUEST_TAKING_ALL_CHALLENGERS) == QUEST_STATUS_INCOMPLETE || player->GetQuestStatus(QUEST_DEFENDING_YOUR_TITLE) == QUEST_STATUS_INCOMPLETE) - { - player->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_CHALLENGER, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - player->SEND_GOSSIP_MENU(player->GetGossipTextId(creature), creature->GetGUID()); - return true; - } - - return false; - } - - bool OnGossipSelect(Player* player, Creature* creature, uint32 /*sender*/, uint32 action) - { - player->PlayerTalkClass->ClearMenus(); - if (action == GOSSIP_ACTION_INFO_DEF+1) - { - player->CLOSE_GOSSIP_MENU(); - creature->setFaction(14); - creature->AI()->AttackStart(player); - } - - return true; - } - - CreatureAI* GetAI(Creature* creature) const - { - return new npc_victorious_challengerAI(creature); - } -}; - /*###### ## npc_loklira_crone ######*/ @@ -753,7 +656,6 @@ void AddSC_storm_peaks() new npc_agnetta_tyrsdottar(); new npc_frostborn_scout(); new npc_thorim(); - new npc_victorious_challenger(); new npc_loklira_crone(); new npc_injured_goblin(); new npc_roxi_ramrocket(); -- cgit v1.2.3 From 74d4aec49bd6e571c3253922e88ace19fe68bbe1 Mon Sep 17 00:00:00 2001 From: Gacko Date: Sat, 1 Sep 2012 00:21:35 +0200 Subject: Core/Spell: Unlocking zuluhed chains Core/Spell: Unlocking zuluheds chains Core/Spell: Unlocking zuluheds chains Core/Spell: Unlocking zuluheds chains --- .../2012_09_01_00_world_spell_script_names.sql | 4 +++ src/server/scripts/Outland/shadowmoon_valley.cpp | 39 ++++++++++++++++++++-- 2 files changed, 40 insertions(+), 3 deletions(-) create mode 100644 sql/updates/world/2012_09_01_00_world_spell_script_names.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2012_09_01_00_world_spell_script_names.sql b/sql/updates/world/2012_09_01_00_world_spell_script_names.sql new file mode 100644 index 00000000000..888cc15e276 --- /dev/null +++ b/sql/updates/world/2012_09_01_00_world_spell_script_names.sql @@ -0,0 +1,4 @@ +-- Unlocking zuluhed chains +DELETE FROM `spell_script_names` WHERE `spell_id`=38790; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(38790, 'spell_unlocking_zuluheds_chains'); diff --git a/src/server/scripts/Outland/shadowmoon_valley.cpp b/src/server/scripts/Outland/shadowmoon_valley.cpp index c79bf74aab6..d425bf6b857 100644 --- a/src/server/scripts/Outland/shadowmoon_valley.cpp +++ b/src/server/scripts/Outland/shadowmoon_valley.cpp @@ -1868,9 +1868,41 @@ public: }; }; -/*##### -# -######*/ +enum ZuluhedChains +{ + QUEST_ZULUHED = 10866, + NPC_KARYNAKU = 22112, +}; + +class spell_unlocking_zuluheds_chains : public SpellScriptLoader +{ + public: + spell_unlocking_zuluheds_chains() : SpellScriptLoader("spell_unlocking_zuluheds_chains") { } + + class spell_unlocking_zuluheds_chains_SpellScript : public SpellScript + { + PrepareSpellScript(spell_unlocking_zuluheds_chains_SpellScript); + + void HandleOnCast() + { + // FIXME: Hackish solution, a better way to reward killcredit should be found + if (Unit* caster = GetCaster()) + if(Player* player = caster->ToPlayer()) + if (player->GetQuestStatus(QUEST_ZULUHED) == QUEST_STATUS_INCOMPLETE) + player->CastedCreatureOrGO(NPC_KARYNAKU, MAKE_NEW_GUID(0, NPC_KARYNAKU, HIGHGUID_UNIT), 0); + } + + void Register() + { + OnCast += SpellCastFn(spell_unlocking_zuluheds_chains_SpellScript::HandleOnCast); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_unlocking_zuluheds_chains_SpellScript(); + } +}; void AddSC_shadowmoon_valley() { @@ -1889,4 +1921,5 @@ void AddSC_shadowmoon_valley() new mob_illidari_spawn(); new mob_torloth_the_magnificent(); new npc_enraged_spirit(); + new spell_unlocking_zuluheds_chains(); } -- cgit v1.2.3