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

MUSHclient scripting

Description of MUSHclient world function: world.SendPkt


Name SendPkt
Type Method
Summary Sends a low-level packet of data to the MUD
Prototype long SendPkt(BSTR Packet);

View list of data type meanings

Description

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.


Note: Available in 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.
Returns eWorldClosed : The world is closed
eOK: Sent OK

View list of return code meanings

Introduced in version 3.81

See also ...

Function Description
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
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

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]