// Sayto - talk to a targeted npc
// Script no: 1051
function CommandRegistration()
{
RegisterCommand( "sayto", 2, true ); //Talk to a targeted character or item
}
function command_SAYTO( pSock, execString )
{
var pUser = pSock.currentChar;
if( execString )
{
pSock.xText = execString;
pUser.CustomTarget( 0, "Select who you wish to speak to." );
}
else
pUser.SysMessage( "You forgot to write what you want to say!" );
}
function onCallback0( pSock, myTarget, myString )
{
var pUser = pSock.currentChar;
if( !pSock.GetWord( 1 ) && ( myTarget.isChar || myTarget.isItem ))
{
pUser.TurnToward( myTarget );
pUser.TextMessage( pSock.xText );
}
else
pUser.SysMessage( "You must target either a character or a dynamic item." );
}
// Script no: 1051
function CommandRegistration()
{
RegisterCommand( "sayto", 2, true ); //Talk to a targeted character or item
}
function command_SAYTO( pSock, execString )
{
var pUser = pSock.currentChar;
if( execString )
{
pSock.xText = execString;
pUser.CustomTarget( 0, "Select who you wish to speak to." );
}
else
pUser.SysMessage( "You forgot to write what you want to say!" );
}
function onCallback0( pSock, myTarget, myString )
{
var pUser = pSock.currentChar;
if( !pSock.GetWord( 1 ) && ( myTarget.isChar || myTarget.isItem ))
{
pUser.TurnToward( myTarget );
pUser.TextMessage( pSock.xText );
}
else
pUser.SysMessage( "You must target either a character or a dynamic item." );
}