I need a mes for another player/character

Domo

New member
Messages
28
Points
0
it's me again 
default_swt3.gif


What do you guys put in a script so that mes opens for another character?

Example:

Player1 whispers Player2's name to an NPC > The NPC now invokes mes onto Player2 but not Player1.

 
You need to use the attachrid script command. Look it up on the wiki : http://herc.ws/wiki/Attachrid

Following the wiki's example :

Code:
mes "[NPC]";mes "Enter a name of a player.";next;input .@playername$;mes "[NPC]";mes "Enter a message.";next;input .@message$;set .@playerid,getcharid(3,.@playername$);  // retrieve rid of another playerset .@invokeid,getcharid(3);                // retrieve rid of the current playerdetachrid;                                  // detaches the current player,                                            // although not necessary before attachridif(.@playerid && attachrid(.@playerid))     // playerid is 0 if player is offline{    dispbottom .@message$";                 // Displays the message to second player}else{    set .@playerid,0;                       // indicate attachrid failure}if(attachrid(.@invokeid))                   // attach back to the first player{    if(.@playerid)    {        mes "I have said " + .@message$ + " to "+.@playername$+".";    }    else    {        mes "I was not able to reach "+.@playername$+".";    }    close;}end;
 
Back
Top