| Previous revision |
— | fuss:mangos [2022/04/19 08:28] (current) – external edit 127.0.0.1 |
---|
| ====== Generate SHA Password ====== |
| |
| This ''PHP'' function creates an uppercase ''SHA'' password, ready to be inserted into the ''realm'' database. |
| |
| <code php> |
| function wow_sha_password($user,$pass){ |
| $user = strtoupper($user); |
| $pass = strtoupper($pass); |
| return strtoupper(SHA1($user.':'.$pass)); |
| } |
| </code> |
| |
| ====== Game Master Commands ====== |
| |
| ^ Command ^ Syntax ^ Description ^ |
| |''.acct''|'' ''| checks the account gm status | |
| |''.commands''|'' ''|shows all available commands for the player's user level| |
| |''.dismount''|'' ''| dismount from a mount (works only when mounted) | |
| |''.gmlist''|'' ''| shows online gms | |
| |''.help''|'' .help [Command] ''| shows help for a specified command | |
| |''.save''|'' ''| saves a character to the database (this is done automatically but issuing this command will save the character at the time it is issued) | |
| |''.start''|'' ''| teleports to hearthstone position | |
| |''.announce''|''.announce [message] ''| broadcast a system message to all players | |
| |''.gmoff''|'' ''| turns gms status off, mobs will attack | |
| |''.gmon''|'' ''| turns gm status on and the player cannot be attacked | |
| |''.goname ''|'' .goname [Char Name] ''|teleport to a player| |
| |''.namego ''|''.namego [Char Name] ''| teleport a player to the gm | |
| |''.gps''|'' ''| display the position for the selected character, creature or gm location - Position information includes X, Y, Z, and orientation, map Id and zone Id | |
| |''.learnsk''|''.learnsk [Skill ID]''|learns a skill for the selected player| |
| |''.lookuptele''|''.lookuptele [Location]''|looks up the coordinates for the location selected| |
| |''.modify''|''.modify [Hp|Energy|Mana|Rage]''|modify the selected players Hp, Energy, Mana, Rage| |
| |''.modify''|''.modify [Speed|Swim|Scale]''|modify speed and swim rate from scale 0-10; modify scale (size) for selected player from scale 0.01-3| |
| |''.money''|''.money [# Amount]''|give money in copper to selected player| |
| |''.recall''|''''|teleport gm or selected player to the place where they have been before last use of a teleportation command; if no player name is given is selected, it will teleport the gm| |
| |''.saveall''|''''|save all players in game| |
| |''.visible''|''.visible [0 or 1]''|output current visibility state or make GM visible(1) and invisible(0) for other players| |
| |''.addmove''|''.addmove [#creature_guid] {#waittime}''|add your current location as a waypoint for creature with guid #creature_guid and optionally add wait time| |
| |''.addspw''|''.addspw [Creature I.D]''|spawns a creature with the given id at the current location| |
| |''.changelevel''|''.changelevel [0-73]''|changes level of selected NPC| |
| |''.del''|''''|delete selected creature from the world| |
| |''.delobject''|''''|delete gameobject with gameobject guid| |
| |''.delticket''|''.delticket [character name]|[all]''| delete tickets from server, [character name] to delete ticket of this character, [#num] to delete ticket [#num]| |
| |''.demorph''|''''|demorph selected player| |
| |''.displayid''|''''|change the model id of the selected creature to| |
| |''.gocreature''|''''|teleport your character to creature with guid| |
| |''.kick''|''.kick [Char Name]''|kick a character from the server| |
| |''.pinfo''|''.pinfo [Char Name]''|get information about a character| |
| |''.prog''|''''|teleports the gm to the programmer island| |
| |''.spawndist''|''.spawndist #dist''|adjust spawn distance of selected creature to dist| |
| |''.targetobject''|''''|locate the nearest game object| |
| |''.ticket''|''.ticket [on|off]''|[on] to show new GM tickets, [off] to hide new tickets| |
| |''.addgo''|''.addgo [Game Object #I.D]''|add a game object from game object templates to the world at the current location using the #I.D.| |
| |''.additem''|''.additem [Item #I.D] [#amount]''|add one or more items from the items template to the bag of the selected player| |
| |''.additemset''|''.additemset [#itemsetid]''|add items from itemset of id #itemsetid to your or selected character inventory. | |
| |''.allowmove''|''''|enable or disable movement for each creature| |
| |''.bank''|''''|show bank| |
| |''.banaccount''|''.banaccount [Account Name]''|ban account name (can be viewed by players by using the .pinfo command) and kick affected players currently logged in| |
| |''.banip''|''.banip [#ip]''|bans logging into the server from computers with the provided IP address, and kicks all affected players| |
| |''.createguild''|''.createguild [Guild Name] [Guild Leader Char Name]''|create a guild named Guild Name with the player Guild Leader Char Name as leader| |
| |''.cshutdown''|''''|cancels shutdown| |
| |''.die''|''''|kills a player or an NPC| |
| |''.gameobject''|''.gameobject [#I.D]''|add a game object from game object templates to the world at your current position using the [#I.D]| |
| |''.go''|''.go [#position_x #position_y #position_z #mapid]''|teleport to the given coordinates on the specified map.| |
| |''.hover''|''''|make the gm hover| |
| |''.idleshutdown''|''.idleshutdown [#delay|cancel]''|shut the server down after #delay seconds if no active connections are present (no players) or cancel the shutdown if cancel value is used.| |
| |''.learn''|''.learn [all]|[all_myclass]|[all_lang]''|all learns all spells for gm's, all_myclass learns all spells for your class, all_lang learns all languages.| |
| |''.levelup''|''.levelup [1-69]''|level up character by number; to down level use negative numbers| |
| |''.lookupcreature''|''.lookupcreature [name of creature]''|looks up a creature by nameofcreature, and returns all matches with their creature ID's| |
| |''.lookupitem''|''.lookupitem [item name]''|looks up an item by Item name, and returns all matches with their Item ID's| |
| |''.lookupobject''|''.lookupobject [object name]''|looks up an gameobject by object name, and returns all matches with their Gameobject ID's| |
| |''.lookupskill''|''.lookupskill [name]''|looks up a skill by name, and returns all matches with their skill ID's| |
| |''.lookupspell''|''.lookupspell name''|looks up a spell by name, and returns all matches with their spell ID's| |
| |''.maxskill''|''''|level up all skils| |
| |''.morph''|''.morph [#display I.D]''|change your current model id to #display I.D.| |
| |''.respawn''|''''|respawns all dead NPCs| |
| |''.revive''|''''|revives the selected player| |
| |''.shutdown''|''.shutdown #seconds''|shuts the server down| |
| |''.security''|''.security [Player name] [#level]''|set the security level of player Player name to a level of #level; #level may range from 0 to 4.| |
| |''.wchange''|''.wchange [#weathertype] [#status]''|Syntax: Set current weather to #weathertype with an intensity of #status.; #weathertype can be 1 for rain, 2 for snow, and 3 for sand. #status can be 0 for disabled, and 1 for enabled.| |
| |''.flymode''|''.flymode [on|off]''|lets the character fly| |
| |
| ====== Cheaper and Earlier Mounts ====== |
| |
| The queries will allow regular mounts at level ''10'' and epic mounts at level ''40'' for ''mangos-zero'' (''1.12.1'' pre-TBC). It will allow training regular mounts with a training cost of ''1g'' and buying the regular mount at level ''10'' (without any faction reduction) with ''4g''. It will also make epic mounts available at level ''40'' with a training cost of ''5g'' and a mount cost of ''5g''. |
| |
| <code sql> |
| UPDATE npc_trainer SET spellcost=10000, reqlevel=10 WHERE spell=33389; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Horn of the Timber Wolf'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Black Stallion Bridle'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Pinto Bridle'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Chestnut Mare Bridle'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Brown Horse Bridle'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Horn of the Dire Wolf'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Horn of the Brown Wolf'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Gray Ram'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Brown Ram'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='White Ram'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Red Mechanostrider'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Whistle of the Emerald Raptor'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Whistle of the Turquoise Raptor'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Whistle of the Violet Raptor'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Blue Mechanostrider'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Reins of the Striped Nightsaber'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Reins of the Striped Frostsaber'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Reins of the Spotted Frostsaber'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Reins of the Primal Leopard'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Reins of the Tawny Sabercat'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Reins of the Golden Sabercat'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Green Mechanostrider'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Unpainted Mechanostrider'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Red Skeletal Horse'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Blue Skeletal Horse'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Brown Skeletal Horse'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Gray Kodo'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Brown Kodo'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Black War Steed Bridle'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Reins of the Black War Tiger'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Black Battlestrider'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Black War Ram'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Horn of the Black War Wolf'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Whistle of the Black War Raptor'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Black War Kodo'; |
| UPDATE item_template SET RequiredLevel=10, ItemLevel=10, BuyPrice=40000 WHERE name='Red Skeletal Warhorse'; |
| |
| UPDATE npc_trainer SET spellcost=50000, reqlevel=40 WHERE spell=33392; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Reins of the Frostsaber'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Reins of the Nightsaber'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Horn of the Red Wolf'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Horn of the Arctic Wolf'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='White Stallion Bridle'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Palomino Bridle'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Reins of the Winterspring Frostsaber'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='White Mechanostrider Mod A'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Icy Blue Mechanostrider Mod A'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Black Ram'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Frost Ram'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Green Skeletal Warhorse'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Deathcharger\'s Reins'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Reins of the Swift Frostsaber'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Reins of the Swift Mistsaber'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Reins of the Swift Dawnsaber'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Swift Green Mechanostrider'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Swift White Mechanostrider'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Swift Yellow Mechanostrider'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Swift Palomino'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Swift Brown Steed'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Swift White Steed'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Swift White Ram'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Swift Brown Ram'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Swift Gray Ram'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Swift Blue Raptor'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Swift Olive Raptor'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Swift Orange Raptor'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Purple Skeletal Warhorse'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Great White Kodo'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Great Brown Kodo'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Great Gray Kodo'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Horn of the Swift Brown Wolf'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Horn of the Swift Timber Wolf'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Horn of the Swift Gray Wolf'; |
| UPDATE item_template SET RequiredLevel=40, ItemLevel=40, BuyPrice=50000 WHERE name='Reins of the Swift Stormsaber'; |
| </code> |
| |
| ====== MySQL Tweaks ====== |
| |
| <file txt mangos.cnf> |
| ########################################################################### |
| ## MaNGOS Optimizations by alexluana @ cmangos.net ## |
| ## and Wizardry and Steamworks ## |
| ########################################################################### |
| #################################### General |
| sort_buffer_size = 4M |
| join_buffer_size = 4M |
| ################## Choose |
| #max_allowed_packet = 1M # Default |
| #max_allowed_packet = 32M # 256 MB RAM |
| max_allowed_packet = 64M # 1 GB RAM |
| #max_allowed_packet = 128M # 2.5+ GB RAM |
| ################## |
| table_cache = 4096 |
| binlog_cache_size = 1M |
| max_heap_table_size = 64M |
| sort_buffer_size = 8M |
| join_buffer_size = 8M |
| thread_cache_size = 24 |
| thread_concurrency = 16 |
| query_cache_limit = 32M |
| query_cache_size = 128M |
| ft_min_word_len = 4 |
| thread_stack = 32M |
| tmp_table_size = 128M |
| key_buffer_size = 128M |
| read_buffer_size = 2M |
| read_rnd_buffer_size = 16M |
| bulk_insert_buffer_size = 32M |
| myisam_sort_buffer_size = 64M |
| #################################### MyISAM |
| [myisamchk] |
| key_buffer_size = 64M |
| sort_buffer_size = 64M |
| read_buffer = 8M |
| write_buffer = 8M |
| #################################### InnoDB |
| # Values between 20M and 50M are enough for character tables and for every innodb database. |
| innodb_additional_mem_pool_size = 32M |
| # 1 To Processors of 1 or 2 cores. |
| # 2 for Quad CoRe. |
| # 4 for i7 / Xeon and 8 for Bi-XEON (2 processors). |
| innodb_thread_concurrency = 1 |
| # Depends on the hardware, can be O_DSYNC or O_DIRECT. |
| innodb_flush_method = O_DSYNC |
| # 0 to reduce the I/O of HDD, but in case of a failure data from the last transaction may be lost. |
| # 1 is recommended for losing nothing. |
| # (More I/O) 2 Mix between one and two. |
| innodb_flush_log_at_trx_commit = 1 |
| # The size of the table of characters plus a margin. |
| # ¡¡¡¡CAREFUL THIS IS RESERVED BY MYSQL!!!! |
| innodb_buffer_pool_size = 256M |
| # Recommended for reduce log file access. |
| innodb_log_files_in_group = 2 |
| # Size of the log. |
| # innodb_log_file_size x innodb_log_files_in_group. |
| innodb_log_file_size = 16M |
| # Buffer needed to process... |
| # 1/4 del log_size total. |
| innodb_log_buffer_size = 8M |
| # Recommended to reduce file access. |
| innodb_file_per_table = 1 |
| # Disable table lock. We do not care that an application crash or MaNGOS crashes too!. |
| innodb_table_locks = 0 |
| |
| </file> |
| |
| |
| ====== Log Rotate for Mangos Logs ====== |
| |
| Assuming that ''mangos'' logs to ''/srv/mangos/logs/*.log'', the following file can be placed in ''/etc/logrotate.d'' in order to rotate the logs on a weekly basis. |
| |
| <file mangos> |
| /srv/mangos/logs/*.log { |
| weekly |
| missingok |
| rotate 52 |
| compress |
| delaycompress |
| notifempty |
| create 640 mangos mangos |
| } |
| |
| </file> |
| |