aslain.dev
0%
01 Hizmetler 02 Hakkımda 03 Projeler 04 Stack 05 Blog 06 İletişim
← Tüm makaleler Metin2

Metin2 GM Commands List and Authority Levels

When you run a Metin2 server, the tool that makes your life easiest is the set of commands you type into the chat box. Metin2 GM commands let you do almost anything in a single line: handing out items, spawning monsters, teleporting players, or reloading proto files. But that power can wreck your economy in the wrong hands, so learning the commands matters just as much as setting up authority correctly. In this guide I cover the most common commands, the authority levels, and how to grant GM rights to an account safely.

How GM commands work

In the standard Metin2 server source, commands are registered in a table inside the game core (the game process). When a player types text starting with / into the chat box, the input layer captures it, resolves the command name, and calls the matching function. The key point is that every command requires a specific minimum authority level. Even if a player without sufficient rights types the command, the core silently rejects it. Conceptually the command table looks like this:

// registration logic inside cmd_general / cmd_gm
{ "item",        do_item,        GM_IMPLEMENTOR },
{ "advance",     do_advance,     GM_HIGH_WIZARD },
{ "notice",      do_notice,      GM_LOW_WIZARD },
{ "warp",        do_warp,        GM_LOW_WIZARD },

So it is not the existence of the command that matters, but the player's authority. That is why it pays to understand the authority levels well.

Authority levels (GM authority)

In the Metin2 source, authority is defined by an enum in gm.h. From lowest to highest, the tiers are:

  • GM_PLAYER — a normal player; no GM command works.
  • GM_LOW_WIZARD — limited support rights (notices, teleporting, and so on).
  • GM_WIZARD — mid-level event rights.
  • GM_HIGH_WIZARD — advanced management (leveling players, mob handling).
  • GM_GOD — almost unlimited rights.
  • GM_IMPLEMENTOR — the top tier; dangerous commands such as item creation and reload live here.

The logic is simple: if a command requires GM_HIGH_WIZARD, everyone at that level and above can use it. Giving a support team the lowest possible authority and reserving the top tier for yourself is the healthiest approach.

The most common Metin2 GM commands

The commands below exist on almost every standard server. When testing, never start on the live server — try them in a closed test environment first.

  • /item <vnum> [count] — adds the item with the given vnum to your inventory.
  • /give <name> <vnum> [count] — gives an item to a target player.
  • /mob <vnum> — spawns a single monster at your location.
  • /group <vnum> — spawns a monster group (a pack).
  • /purge — removes the NPC or mob you are targeting from the map.
  • /advance <name> <level> — raises a player to the desired level.
  • /transfer <name> — teleports a player to you.
  • /warp <x> <y> — teleports yourself to the given coordinates.
  • /notice <message> — sends a yellow system notice to the whole server.
  • /restart_here / /restart_town — respawn on the spot or in town when you die.
  • /reload <flag> — reloads configuration; for example /reload p refreshes the item/mob proto.

An example flow: when rewarding players during an event, you first select the target, then send the item:

/notice An event starts at the central square in 30 minutes!
/transfer WinningPlayer
/give WinningPlayer 71001 5

The /reload command is very powerful: it lets you apply changes you made to item_proto or mob_proto without shutting the server down. Even so, for large schema changes a full restart is safer.

Granting GM rights to an account

For commands to work you need to know where authority is read from. Metin2 loads rights from the gmlist table in the player database. Adding a row to that table turns the relevant account into a GM. The typical columns are:

  • mID — the primary key.
  • mAccount — the login name of the account to be granted rights.
  • mName — the character name to grant (often * for all characters).
  • mContactIP — a restriction so commands only work from this IP.
  • mAuthority — the authority level (IMPLEMENTOR, GOD, HIGH_WIZARD ...).

An example record:

INSERT INTO player.gmlist (mAccount, mName, mContactIP, mServerIP, mAuthority)
VALUES ('adminaccount', '*', '85.100.20.10', 'ALL', 'IMPLEMENTOR');

After adding the row, you must restart the server (or, if your source supports it, reload the GM list) for the change to take effect. In most setups, leaving mContactIP empty opens the command from anywhere; for security, put your own static IP there.

Security: don't leak GM rights

GM commands are a server's most sensitive surface. A single /item leak can collapse the whole economy. A few basic rules:

  • Least privilege: give your support team the lowest level that does the job, not GM_IMPLEMENTOR.
  • IP restriction: always fill in mContactIP so even a stolen account cannot run GM commands from a foreign IP.
  • Logging: Metin2 writes GM commands to the command_log table in the log database. Review this log regularly; track who gave what and when.
  • Separate account: do not be a GM on the character you play daily; keep a separate account just for administration.
  • Test environment: try new commands and /reload experiments on a closed test server first.

Apply these rules and you get the benefit of the commands' power while keeping the risk to a minimum.

Frequently Asked Questions

I typed a GM command but nothing happens — why?

The most common cause is that your authority level is insufficient or your gmlist record has not been read yet. Check your account's mAuthority value and restart the server after the change. Also, if mContactIP is not the same as the IP you connect from, the commands silently fail.

Where do I find the full list of all commands?

The exact list depends on the source you use. The most reliable method is to read the registration table in your server source's cmd.cpp / cmd_general.cpp / cmd_gm.cpp files; each command's name and the required authority level are written there explicitly.

Does /reload crash the server?

Used correctly, no — it is designed to refresh proto and configuration. Still, running it with a broken item_proto or a missing file can cause errors. That is why you should validate large changes in a test environment before going live.

Want to set up your Metin2 server safely? If you need help with GM authority, log infrastructure and command security, get in touch with me — let's harden your server together.

Bu kategorideki tüm yazılar →

Devamı için