Domo 0 Posted January 2, 2016 it's me again 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. Quote Share this post Link to post Share on other sites
0 maqc1 8 Posted January 3, 2016 You need to use the attachrid script command. Look it up on the wiki : http://herc.ws/wiki/Attachrid Following the wiki's example : 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; 1 Domo reacted to this Quote Share this post Link to post Share on other sites
0 Domo 0 Posted January 7, 2016 Thank you very much, after editing it a bit it really helped out Quote Share this post Link to post Share on other sites
it's me again
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.
Share this post
Link to post
Share on other sites