P

PlayMUD.online

Variables

Variables

Use named placeholders such as {target}.

Variables are stored in the profile settings and expanded after aliases.

Syntax

Variable names must start with a letter or underscore and may contain letters, numbers, and underscores.

Variable: target = orc
Command: kill {target}
Sent: kill orc

If a placeholder has no matching variable, PlayMUD.online leaves it unchanged. That makes missing variables visible instead of silently deleting important command text.

Where Variables Work

  • Commands typed into the input box.
  • Alias output commands.
  • Trigger output commands.
  • Hotkey commands.

Lua Direction

Persistent variables are edited in the Variables tab or assigned as Lua globals. Temporary values such as HP, SP, and EP belong in the shared Lua state table, where status widgets can monitor them without causing database saves.

vars.target = "orc"
send("kill " .. vars.target)

Lua function and table globals are kept inside the sandbox instead of becoming saved Variables. The Variables tab hides legacy function-looking values and summarizes table-like values as <table>.

See the Lua roadmap.