script

Calls any of the game’s 661 script commands by name and returns its result (value). Use it when no other tool fits, for example GetCreatureProperty, GetRemainingCooldown or SetCreatureProperty. action:

  • call (the default): run command with args.
  • find: list the commands whose name contains command (any case).
  • describe: show one command’s parameters, their types and defaults.

Pass arguments in order (args: […]) or by parameter name (args: {“oCreature”: “0x7d9”}); any left out take their defaults. Objects are ids, and null is OBJECT_INVALID. Commands that take or return a location, effect, event or command cannot be called by name.

Arguments

Name Type Required What
action "call" | "find" | "describe"   What to do. Default call.
command string yes The command’s name as the game’s scripts spell it, or with find part of one.
args any   With call: the arguments, as an array in parameter order or an object by parameter name. Default none.

Call it as script over MCP, or POST /api/tool/script with the arguments as JSON.