This actually worked. It sent a message to my second character. However, it stucks on the next part of the script.
so here's my script:
input(.@name$);
if(getcharid(0,.@name$)){
mes "[inviter]";
mes "Invitation has been sent";
close2;
attachrid(getcharid(3,.@name$));
mes "You are invited to join your friend in his journey";
next;
switch(select("Accept","Reject")){
case 1:
warpchar strcharinfo(3),81,63,getcharid(0,.@name$);
case 2:
attachrid(getcharid(3,.@myname$));
dispbottom .@name$+" has rejected your offer.";
end;}}
edit: it seems like it doesn't work if the other player is on another map. the first message works. except for the next part of the script =\
and for the setnpcdisplay:
setnpcdisplay("dog", strcharinfo(0)+"'s Dog");
1@ghd,74,82,4 duplicate(dog) dog#1 81
- script dog -1,{
mes "[" + getarg(0) + "]";
mes "arf arf...";
close;
}