Name | Type | Deprecated | Secure | Description |
---|---|---|---|---|
Command.Mail.Delete | function | Deletes a mail. | ||
Command.Mail.Open | function | Opens a mail, retrieving detailed information for it. | ||
Command.Mail.Pay | function | Pays the COD fee on a mail. | ||
Command.Mail.Return | function | Returns a mail to its sender. | ||
Command.Mail.Send | function | Sends mail. | ||
Command.Mail.Spam | function | Marks mail as spam. | ||
Command.Mail.Take | function | Takes an attached item from mail. | ||
Event.Mail | Signals a change in the available mail messages. | |||
Inspect.Mail.Detail | function | Returns information about mail. | ||
Inspect.Mail.List | function | Returns a table of valid mail and its status. | ||
Utility.Mail.Cost | function | Returns the amount of silver it will cost to send a given mail. |
Deletes a mail.
Interaction category: mail
Throttled.
Command.Mail.Delete(mail) | |||
Command.Mail.Delete(mail, callback) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
callback | parameter | callbackfunction | A standard command callback, used for detecting success or failure. See the "callbackfunction" documentation for more details. |
parameter | The ID of the mail to be targeted. |
Opens a mail, retrieving detailed information for it.
Interaction category: mail
Throttled.
Command.Mail.Open(mail) | |||
Command.Mail.Open(mail, callback) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
callback | parameter | callbackfunction | A standard command callback, used for detecting success or failure. See the "callbackfunction" documentation for more details. |
parameter | The ID of the mail to be targeted. |
Pays the COD fee on a mail.
Interaction category: mail
Throttled.
Command.Mail.Pay(mail) | |||
Command.Mail.Pay(mail, callback) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
callback | parameter | callbackfunction | A standard command callback, used for detecting success or failure. See the "callbackfunction" documentation for more details. |
parameter | The ID of the mail to be targeted. |
Returns a mail to its sender.
Interaction category: mail
Throttled.
Command.Mail.Return(mail) | |||
Command.Mail.Return(mail, callback) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
callback | parameter | callbackfunction | A standard command callback, used for detecting success or failure. See the "callbackfunction" documentation for more details. |
parameter | The ID of the mail to be targeted. |
Sends mail.
Interaction category: mail
Command.Mail.Send(mail) | |||
Command.Mail.Send(mail, callback) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
callback | parameter | callbackfunction | A standard command callback, used for detecting success or failure. See the "callbackfunction" documentation for more details. |
parameter | table | Table containing data about the mail to send. to: The name of the player to send mail to. Required. subject: The mail's subject. Required. body: The mail's body. cod: The money required for the recipient to remove attachments. Mutually exclusive with "coin", requires non-empty "attachments". coin: The amount of money attached to this message. Mutually exclusive with "cod". attachments: A table listing the item IDs of the items you wish to attach. Maximum of 6. |
Marks mail as spam.
Interaction category: mail
Throttled.
Command.Mail.Spam(mail) | |||
Command.Mail.Spam(mail, callback) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
callback | parameter | callbackfunction | A standard command callback, used for detecting success or failure. See the "callbackfunction" documentation for more details. |
parameter | The ID of the mail to be targeted. |
Takes an attached item from mail.
Interaction category: mail
Throttled.
Command.Mail.Take(mail, item) | |||
Command.Mail.Take(mail, items) | |||
Command.Mail.Take(mail, item, callback) | |||
Command.Mail.Take(mail, items, callback) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
callback | parameter | callbackfunction | A standard command callback, used for detecting success or failure. See the "callbackfunction" documentation for more details. |
item | parameter | item | The ID of the item to be taken. |
items | parameter | table | A table containing a list of the items to be taken. |
parameter | The ID of the mail to be targeted. |
Signals a change in the available mail messages.
Event.Mail(mail) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
parameter | variant | The changed mail messages. Takes the form of a table. The key is the mail ID, the value is "basic" to indicate basic information available about a piece of mail, "detail" to indicate detailed information available, or false to indicate no information available. |
Returns information about mail.
Interaction category: mail
detail = Inspect.Mail.Detail(mail) | |||
details = Inspect.Mail.Detail(mails) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
parameter | The identifier of the mail to retrieve detail for. | ||
mails | parameter | table | A table of identifiers of mail to retrieve detail for. |
detail | result | table | Detail table for a single mail. |
details | result | table | Detail tables for all requested mail. The key is the mail ID, the value is the mail's detail table. |
attachments | The attachments available on this mail. A number if this mail has basic information, or a table of item IDs if this mail has detailed information. |
---|---|
body | The body of this mail. Available only if detailed information on the mail has been retrieved. |
cod | The Cash on Delivery required to retrieve attachments out of this mail message. |
expire | The time this mail will expire, in Unix timestamp form. |
from | The name of the character this mail was sent from. |
id | The ID of the requested element. |
read | "true" if you have already opened this mail. |
spam | "true" if this mail is considered spam. |
subject | The subject line for this mail. |
Returns a table of valid mail and its status.
Interaction category: mail
mails = Inspect.Mail.List() | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
mails | result | table | Valid mail, in {id = "type"} format. The type may be either "basic" or "detail", indicating whether the mail has been opened and its detailed information is available. |
Returns the amount of silver it will cost to send a given mail.
cost = Utility.Mail.Cost(mail) | |||
Parameter | Type | Datatype | Description |
---|---|---|---|
parameter | table | The mail to check. In the same format as the parameter of Command.Mail.Send. | |
cost | result | number | The cost of sending this mail, in silver. |