Ingame Commands
From WCell
This article covers Commands used on the RealmServer. For Commands that are available using the AuthServer, see: AuthServer Commands.
You can manipulate the ingame world and server-settings by using Commands.
To trigger Commands from within the game, just type the Command into the chatbar, preceeded by one of the Command Prefixes.
Ingame Commands can also be used from the RealmServerConsole. Just type ? (or when ingame: .? or #? etc) to display all available commands.
You can also find an automatically built list of all Commands with explanations, SubCommands etc in the Docs/ folder.
Contents |
[edit] Writing your own Commands
You can have a look at the code in WCell.RealmServer/Commands. They are easy to create or edit.
The topic is further covered in the Dev:Commands Article.
[edit] Command Prefixes
You can configure the Command Prefixes in the config.
[edit] Double Command-Prefix
By preceeding a command with the same prefix twice (eg ##fly), the Command is executed on your current Target (instead of yourself). This is only possible if the Command requires a Unit target (that is any Player Character or Non-Player Character (NPC)).
[edit] Specifying a remote target
You can execute commands on ingame Characters by either targeting them and using a Double Command-Prefix or (especially helpful when using the Console) by preceeding the Command with the -c or -a switch. The -c switch requires the Character's name and the -a switch requires the target's Account name. If the User is logged in, the Command will then be executed on him/her.
Examples:
- #-c evilguy die (lets the Character with name evilguy die)
- #-a GoodGuysAccount level 80 (gives level 80 to the Character that is currently logged in with account GoodGuysAccount)
[edit] Calling methods
The following should be restricted to Administrators only: You can call methods on yourself or your target. (should not be much needed by anyone except for Developers anyway)
To allow access to certain methods to other staff members, simply write a Command to offer that functionality.
You can call methods by using the CallCommandPrefix.
Arguments are followed by the method-name and are seperated by comma. String-parsing has yet to improve.
Example:
''@-c someguy SendSystemMsg hello there!'' (Lets a system-message appear for ''someguy'') ''@AddLanguage common'' (Enables yourself to speak Common, which is not necessary for GMs anyway) ''@@Say I'm not actually saying that'' (Makes your target say something)
[edit] Setting or Getting properties
You can use the Set (Short: S), Mod (Short: M) and Get (Short: G) commands to view or modify an object's properties.
Here is a list of useful properties of Units (NPCs and Characters):
- Health
- MaxHealth
- Power (amount of Power the Unit currently has - Depends on the Race: Mana, Rage etc)
- BasePower (maximum base value of power Power)
- MaxPower (maximum value of Power) (not modifyable, modify BasePower instead)
- Level
- Xp
- FactionId
- Race
- Class
- PlayerFlags (Characters only)
- NPCFlags (NPCs only)
and many more...
You can find all properties and fields by viewing the Code of the Objects in questions in the Entities Folder:
[edit] Some useful Commands
[edit] Config
The Config command allows you to modify the Configuration of the server during runtime.
[edit] List
Short: L
Lists all configurable variables
[edit] Set
Short: S
Parameters: <name> <value>
Changes the variable with the given name to the given value.
[edit] Get
Short: G
Parameters: <name>
Displays the current value of the variable with the given name.
[edit] Save
Short: S
Saves the current configuration, overwriting the old configuration-file. All missing values will be initialized with their default values.
[edit] Examples
The default prefix for commands is # (or . amongst others). For an overview of all available commands, simply type: #?
Some examples:
#gm
-> Toggles the GodMode. The GodMode takes away most of the existing restrictions, such as artificial delays, cooldowns etc
#s basepower 10000
-> Will change your maximum power (mana, energy, rage etc) to the given value and fill it up completely (before modifiers)
#multspeed 10 or: #s mechanics.speedfactor 10
-> Will multiply your movement-speed by 10
#fly
-> Enables you to fly (repeat to toggle it off again)
##fly 0
-> Disables your target's ability to fly
##knockback 100
-> Will send your current target flying (will have bad results when used on NPCs (since their position won't be updated yet))
#hateall, #lovall
-> Gives you very bad/very good reputation with *all* factions
#npc add IllidanStormrage
-> Creates Illidan Stormrage (you can find the entry-ids in WCell.Content/CreatureEntries.xml; ingame lookup shall be improved)
#mod playerflags ^ gm
-> Deactivates the GM flag, thus removing certain GM-related boni (visibility boni etc)
##mod npcflags ^ trainer | banker
-> Deactivates the trainer flag and activates the banker flag
##mod basehealth + 1000
-> Adds 1000 to your target's maxhealth (before modifiers)
Do NOT use: #mod playerflags | ghost
-> This will add the ghost flag and renders you unable to use chat-based commands since the client thinks you are dead
The default prefix for execution is @ - Some examples:
@spells.add stealth
-> Adds stealth to your spellbook
@skills.addmax alchemy
-> Adds alchemy with max value
@mount blackwarsteed
-> Makes you mount a black warsteed (without boni applied though)
@@dismount
-> Dismounts your target (if he/she was mounted)
@@client.disconnect
-> Disconnects the target without a reason (needs to be a player target; It is recommended to use the #kick command over this one)
These examples are only a very small set of all available features.
