Jump to content

[9380] and [9382] [fix] Missing commands in 'command' db table


Guest Shin Darth

Recommended Posts

Core rev: 9342

There are some missing commands in db table command, so is not possible to set them the gmlevel required. And by default these commands are set to account level 1.

With this you will get them into command table, and everyone can change the account level required as they want.

Possible fix:

diff --git a/sql/mangos.sql b/sql/mangos.sql
index 6424c8c..8fa478d 100644
--- a/sql/mangos.sql
+++ b/sql/mangos.sql
@@ -651,6 +651,7 @@ INSERT INTO `command` VALUES
('modify drunk',1,'Syntax: .modify drunk #value\\r\\n Set drunk level to #value (0..100). Value 0 remove drunk state, 100 is max drunked state.'),
('modify energy',1,'Syntax: .modify energy #energy\\r\\n\\r\\nModify the energy of the selected player. If no player is selected, modify your energy.'),
('modify faction',1,'Syntax: .modify faction #factionid #flagid #npcflagid #dynamicflagid\\r\\n\\r\\nModify the faction and flags of the selected creature. With
+('modify fly', 1, 'Syntax: .modify fly #rate\\r\\n.fly #rate\\r\\n\\r\\nModify the flying speed of the selected player to \\"normal base fly speed\\"*rate. If no pl
('modify gender',2,'Syntax: .modify gender male/female\\r\\n\\r\\nChange gender of selected player.'),
('modify honor',1,'Syntax: .modify honor $amount\\r\\n\\r\\nAdd $amount honor points to the selected player.'),
('modify hp',1,'Syntax: .modify hp #newhp\\r\\n\\r\\nModify the hp of the selected player. If no player is selected, modify your hp.'),
@@ -688,6 +689,7 @@ INSERT INTO `command` VALUES
('npc move',2,'Syntax: .npc move [#creature_guid]\\r\\n\\r\\nMove the targeted creature spawn point to your coordinates.'),
('npc name',2,'Syntax: .npc name $name\\r\\n\\r\\nChange the name of the selected creature or character to $name.\\r\\n\\r\\nCommand disabled.'),
('npc playemote',3,'Syntax: .npc playemote #emoteid\\r\\n\\r\\nMake the selected creature emote with an emote of id #emoteid.'),
+('npc say', 1, 'Syntax: .npc say #text\\r\\nMake the selected npc says #text.'),
('npc setdeathstate',2,'Syntax: .npc setdeathstate on/off\\r\\n\\r\\nSet default death state (dead/alive) for npc at spawn.'),
('npc setmodel',2,'Syntax: .npc setmodel #displayid\\r\\n\\r\\nChange the model id of the selected creature to #displayid.'),
('npc setmovetype',2,'Syntax: .npc setmovetype [#creature_guid] stay/random/way [NODEL]\\r\\n\\r\\nSet for creature pointed by #creature_guid (or selected if #c
@@ -699,6 +701,7 @@ INSERT INTO `command` VALUES
('npc textemote',1,'Syntax: .npc textemote #emoteid\\r\\n\\r\\nMake the selected creature to do textemote with an emote of id #emoteid.'),
('npc whisper',1,'Syntax: .npc whisper #playerguid #text\\r\\nMake the selected npc whisper #text to  #playerguid.'),
('npc unfollow',2,'Syntax: .npc unfollow\\r\\n\\r\\nSelected creature (non pet) stop follow you.'),
+('npc yell', 1, 'Syntax: .npc yell #text\\r\\nMake the selected npc yells #text.');
('pdump write',3,'Syntax: .pdump write $filename $playerNameOrGUID\\r\\nWrite character dump with name/guid $playerNameOrGUID to file $filename.'),
('pdump load',3,'Syntax: .pdump load $filename $account [$newname] [$newguid]\\r\\nLoad character dump from dump file into character list of $account with sav
('pinfo',2,'Syntax: .pinfo [$player_name]\\r\\n\\r\\nOutput account information for selected player or player find by $player_name.'),

Update:

DELETE FROM command WHERE name in ('modify fly', 'npc say', 'npc yell');
INSERT INTO command VALUES
('modify fly', 1, 'Syntax: .modify fly #rate\\r\\n.fly #rate\\r\\n\\r\\nModify the flying speed of the selected player to \\"normal base fly speed\\"*rate. If no player is selected, modify your fly.\\r\\n\\r\\n #rate may range from 0.1 to 10.'),
('npc say', 1, 'Syntax: .npc say #text\\r\\nMake the selected npc says #text.'),
('npc yell', 1, 'Syntax: .npc yell #text\\r\\nMake the selected npc yells #text.');

Link to comment
Share on other sites

Hi,

I've noticed yesterday that there were many reload commands that weren't in command's db table. They weren't usable by level 1 accounts but anyway they were missing. Here there are. Change security level as you want.

DELETE FROM command WHERE name IN ('reload all_scripts','reload all_achievement','reload all_item','reload all_eventai','reload all_npc');
INSERT INTO command VALUES
('reload all_achievement',1,'Syntax: .reload all_achievement\\r\\n\\r\\nReload all `achievement_*` tables if reload support added for this table and this table can be _safe_ reloaded.'),
('reload all_item',1,'Syntax: .reload all_item\\r\\n\\r\\nReload `item_required_target`, `page_texts` and `item_enchantment_template` tables if reload support added for these tables and these tables can be _safe_ reloaded.'),
('reload all_eventai',1,'Syntax: .reload all_eventai\\r\\n\\r\\nReload `creature_ai_*` tables if reload support added for these tables and these tables can be _safe_ reloaded.'),
('reload all_scripts',1,'Syntax: .reload all_scripts\\r\\n\\r\\nReload `*_scripts` tables if reload support added for these tables and these tables can be _safe_ reloaded.'),
('reload all_npc',1,'Syntax: .reload all_npc\\r\\n\\r\\nReload `points_of_interest` and `npc_*` tables if reload support added for these tables and these tables can be _safe_ reloaded.');

Link to comment
Share on other sites

Just to satisfy my own curiosity, I checked out my 0.16-dev1 r 9310 repo. These commands are also missing in the mangos.sql file. I'd say it's a safe bet all revisions from 9310 to at least 9342 are affected, perhaps even newer revisions.

I compared the commands listed in Chat.h with the mangos.sql file to find if the commands listed above were missing from my server.

Thanks for catching this, Shin Darth and Odyssey! :D

Link to comment
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use