AddPlayerMailByCharID(Int32: CharID, String: FromName, String: SubjectName, String: MailBody, Int8: MailType, Int32: Copper, Int32: Silver, Int32: Gold, Int32: Platinum, Int32: ItemID, Int16: StackSize, Int32: ExpireTime, Int32: SentTime)
Pre-Requisite(s)
- None
Parameter(s)
Int32: CharID - Database Character ID of the Player you wish to receive the mail.
String: FromName - Name of the Player/NPC/Spawn this mail came from.
String: SubjectName - Subject of the mail's message.
String: MailBody - Body message of the mail.
Int8: MailType (OPTIONAL) - MailType of mail being sent.
Int32: Copper (OPTIONAL) - Copper attached to the mail.
Int32: Silver (OPTIONAL) - Copper attached to the mail.
Int32: Gold (OPTIONAL) - Copper attached to the mail.
Int32: Platinum (OPTIONAL) - Copper attached to the mail.
Int32: ItemID (OPTIONAL) - Item ID of item attached to the mail.
Int16: StackSize (OPTIONAL) - Amount of quantity for the item if stackable.
Int32: ExpireTime (OPTIONAL) - Time the mail is available before expiring in seconds. Left to 0 will be unlimited (no expiration).
Int32: SentTime (OPTIONAL) - Time the mail was sent. Empty or 0 will use current timestamp.
Return(s)
- None
Example(s)
function hailed(NPC, Spawn)
AddPlayerMailByCharID(GetCharacterID(Spawn), "Mitchell McNolan", "My friend!", "Take this as a token of appreciation", 0, 15, 5, 2, 1, 4563, 20) – Add 20 bread, 15c, 5s, 2g, 1p in coin.
FaceTarget(NPC, Spawn)
end
Result
Additional Notes