Sending PMs
Private Messages#
Send a simple PM:
Send a PM with name and head icon:
Send a PM and react to the reply of the player:
let sender = {name:"Puzzle", isonline:true};
player.showpm("What is 2+2? Tell me the answer!", sender, function(player, msg) {
if (msg == "4")
player.showpm("That's correct!", sender);
else
player.showpm("Sorry that's wrong!", sender);
});
Send a PM with story as invitation (using the optional third data parameter):
Send a PM with map markers:
player.showpm("Hello!", {head:"1", name:"Go here to find food!"}, {mapmarkers:[
{ "x":375, "y":193, "text":"Trash", "icon":"job_trash-bottle.png", "blink":true}
]});
Send a PM on touch which automatically opens, by setting show:true in the data parameter. Additional advantage: the player can easily translate the text: