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

Register forum user name Search FAQ


Script function


Read about scripting




Sends a low-level packet of data to the MUD


long SendPkt(BSTR Packet);

View list of data type meanings


This sends the specified text to the world.

A newline is not appended to it.

If the text contains the IAC character (0xFF) a second IAC character is NOT appended to it (as normally happens).

The text does not go through the OnPluginSend plugin callback, nor through the OnPluginSent callback.

The text is not echoed to the screen.

It is intended only for low-level sending of data for things like telnet negotiation options.

Available in MUSHclient version 3.81 onwards.

VBscript example

SendPkt Chr(255) & Chr (252) & Chr (31)  ' IAC WONT NAWS

Lua example

SendPkt (string.char (255, 252, 31))  -- IAC WONT NAWS

Lua notes

The data may include imbedded null characters (0x00) as the Lua string is not tested for being null-terminated.

Return value

eWorldClosed : The world is closed
eOK: Sent OK

View list of return code meanings

See Also ...


Commented softcode
Sending to the world


(Execute) Executes a command as if you had typed it into the command window
(LogSend) Sends a message to the MUD and logs it
(Note) Sends a note to the output window
(PasteCommand) Pastes text into the command window, replacing the current selection
(Queue) Queues a command for sending at the "speed walk" rate.
(Send) Sends a message to the MUD
(SendImmediate) Sends a message to the MUD immediately, bypassing the speedwalk queue
(SendNoEcho) Sends a message to the MUD without echoing in the output window
(SendPush) Sends a message to the MUD and saves it in the command history buffer
(SendSpecial) Sends a message to the MUD with various options
(SetCommand) Sends text to the command window
(SetCommandSelection) Selects specified columns in the command window

(Help topic: function=SendPkt)

Documentation contents page

Search ...

Enter a search string to find matching documentation.

Search for:   

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.


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 HostDash]