Dismount Command

Got any custom JavaScript additions/tweaks you think other people would like to see? Post 'em here!
Post Reply
dragon slayer
UOX3 Guru
Posts: 776
Joined: Thu Dec 21, 2006 7:37 am
Has thanked: 4 times
Been thanked: 26 times

Dismount Command

Post by dragon slayer »

Add this command to your custom files or targeting files
This command wikll dismount any character.

Code: Select all

function CommandRegistration()
{
	RegisterCommand( "dismount", 2, true );
}

function command_DISMOUNT( socket, cmdString )
{
	socket.CustomTarget( 0, "Select a character to dismount" );
}

function onCallback0( socket, myTarget ) 
{ 
   var pUser = socket.currentChar;

   if( !socket.GetWord( 1 ) && myTarget.isChar )
   {
      myTarget.Dismount()
   } 
   else
      pUser.SysMessage( "Not a character!" );
}
Post Reply