[Home] [Downloads] [Search] [Help/forum]

MUSHclient scripting

Description of MUSHclient world function: world.Simulate


Name Simulate
Type Method
Summary Simulate input from the MUD, for debugging purposes
Prototype void Simulate(BSTR Text);

View list of 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' ")


Note: Available in version 3.73 onwards.


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.
Returns Nothing.
Introduced in version 3.73

See also ...

Function Description
Debug Displays debugging information about the world

Search for script function

Enter a word or phrase in the box below to narrow the list down to those that match.

The function name, prototype, summary, and description are searched.

Search for:   

Leave blank to show all functions.


Return codes

Many functions return a "code" which indicates the success or otherwise of the function.

You can view a list of the return codes


Function prototypes

The "prototype" part of each function description lists exactly how the function is called (what arguments, if any, to pass to it).

You can view a list of the data types used in function prototypes


View all functions

[Back]

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]