LUA:AddPlayerMail
- Last edited 4 years ago by Vlash Nytefall
LUA:AllFunctions - AddPlayerMail
Return to: LUA:AllFunctions | Tutorials | Portal | Forum | Project Manager | Bug Tracker
Adds mail to the players inbox
Syntax
AddPlayerMail(param1, param2, param3, param4, param5, param6, param7, param8, param9, param10)
Parameters
- Required - param1 (Spawn), param2 (string), param3 (string), param4 (string), param5 (int8), param6 (int32), param7 (int32), param8 (int32), param9 (int32), param10 (int32)
- param1 is the spawn getting the mail
- param2 is the person the mail is from
- param3 is the subject of the mail
- param4 is the body of the mail
- param5 is the type of mail being sent
- param6 is the copper to send
- param7 is the silver to send
- param8 is the fold to send
- param9 is the platinum to send
- param10 is the id of the item to send
Example
function hailed(NPC, Spawn) AddPlayerMail(Spawn, "Neatz", "You Got Mail", "This buds for you!", 1, 2, 3, 4, 5, 420, 10, 0, 0) end
a NPC with this function will send the player mail from Neatz with a subject of You Got Mail and the mail saying This buds for you! in the form of spam. The player will also receive 2 copper, 3 silver, 4 gold, and 5 platinum along with the item associated with item id 420 and a 10 stack of that item. The mail will never expire and sets the sent time as the current time it was sent.
Notes
Mail Type
0 = Regular 1 = Spam 2 = GM
expire time is in seconds for expiration, leave 0 for unlimited.
'sent time is in unix timestamp or left as 0 for default time of now
DOES NOT WORK
item id
stack size