Create a free account to remove all ad content.

Author Topic:  Console Command Documentation  (Read 2842 times)

0 Members and 1 Guest are viewing this topic.

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Console Command Documentation
« Reply #10 on: February 09, 2017, 03:50:50 AM »
msg: Send a text message to other players.

msg -a [player] [message]

-a  -- Send message only to players with admin permission.
[player] - Send private message to named player.
[message] - The message text. surround with double quotes for messages that contain spaces.

example:
msg ""Hello everyone""
Send the msg ""Hello everyone"" to all players in the world.

msg -a ""some important secret message""
Send the message only to admins.

example:
msg hellosailor Ahoy!
Send the message ""Ahoy!"" to the gamer named hellosailor.

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Console Command Documentation
« Reply #11 on: February 09, 2017, 03:57:05 AM »
cls: Clear the console screen and output stream.

cls

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Console Command Documentation
« Reply #12 on: February 09, 2017, 03:59:04 AM »
kill: Kill the current player, all NPCs or all NPCs of a type.

kill -a -p [npctype]

-a  -- kill all NPCs.
-p  -- kill the current player
[npctype]  -- kill all NPCs of this type.

Examples:
kill -a  -- this will kill all NPCs.
kill -p  -- this will kill the current player.
kill goblin  -- this will kill all goblins.

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Console Command Documentation
« Reply #13 on: February 09, 2017, 06:03:59 PM »
list: List various game information.

list -i -m -p -pe -s -tp -z [pattern]

-i   -- list all items in the current players inventory.
-m   -- list map markers.
-mg  -- list map grave markers.
-p   -- list all players in the world.
-pe  -- list the current players permissions.
-s   -- list scripts.
-tp  -- list the current players teleport points.
-z   -- list zones.

[pattern] -- any output that does not start with pattern is ignored.
             e.g. list -i sa  -- list all items in inventory that start with 'sa'
                  list -p j  -- list all players whose name starts with 'j'
« Last Edit: February 09, 2017, 08:21:43 PM by Craig »

Craig

  • Developer
  • Extreme Member
  • *
  • Posts: 6655
  • Dig Deep
    • View Profile
    • Twitter
  • Steam: tota1miner
Re: Console Command Documentation
« Reply #14 on: April 07, 2018, 06:27:05 AM »
cmd: Execute all the console commands in a cmd file.

cmd [name] [args]

[name] -- The name of the command file. This will be a *.cmd file residing in the maps save folder on disk. You can create these files using any text editor.
[args] -- Optional arguments that can be passed to the commands inside the command file.

Example:
cmd crates -- This will run all the console commands in the crates.cmd file found in the maps save folder.
crates -- This will also run all the console commands in the crates.cmd file found in the maps save folder.

Note: cmd is only necessary if the name of the .cmd file conflicts with an existing console command name. For crates, because there is no crates console command, you can just type crates without the preceding cmd, and the crates.cmd file will be executed.

Argument substitution is possible with cmd files, similar to MSDOS batch files. If the command in the cmd file uses %n (where n is a number starting from 1) as an argument, then the corresponding argument passed with the cmd command will be substituted for the %n argument in the cmd file.

Example:
If we have a cmd file named welcome.cmd with the following commands:
notify %1
notify %2

Then the following are examples of the output:

cmd welcome hello everyone
notify hello
notify everyone

cmd welcome hello john
notify hello
notify john

cmd welcome sup dawg
notify sup
notify dawg