world.Simulate

MUSHclient script function (Method) — introduced in version 3.73

Simulate input from the MUD, for debugging purposes

Prototype

void Simulate(BSTR Text);

Data type meanings

Description

The argument to this function is supplied to MUSHclient as if it had been sent from the MUD. This is intended for debugging triggers etc, similar to the Game -> Test Trigger menu option.

This should be used with caution inside scripts. If you simulate input inside a trigger, the input causing another trigger to fire, you are likely to get a stack overflow.

An example of using it would be to bind it to a keystroke (like F11), so that if you are testing a trigger that matches on:

Exits: north

... then you might do this:

Accelerator ("F11", "/Simulate 'Exits: north\n' ")

VBscript example

Simulate "Exits: north" + vbCrLf

Jscript example

Simulate ("Exits: north\n");

Lua example

Simulate ("Exits: north\n")

Lua notes

You can supply multiple arguments, which are concatenated together.

Return value

Nothing.

Related topic

Utilities

See also

FunctionDescription
DebugDisplays debugging information about the world