mirror of
https://github.com/UOX3DevTeam/UOX3
synced 2026-08-13 12:27:04 -04:00
33 lines
728 B
JavaScript
33 lines
728 B
JavaScript
/// <reference path="../definitions.d.ts" />
|
|
// @ts-check
|
|
// This command is a shortcut for changing the body ID of user
|
|
|
|
function CommandRegistration()
|
|
{
|
|
RegisterCommand( "poly", 8, true );
|
|
}
|
|
|
|
/** @type { ( socket: Socket, cmdString: string ) => void } */
|
|
function command_POLY( socket, cmdString )
|
|
{
|
|
if( cmdString )
|
|
{
|
|
var pUser = socket.currentChar;
|
|
var newBody = parseInt( cmdString );
|
|
var skinVal = pUser.colour;
|
|
|
|
if( newBody <= 0x7CF && newBody != 0x20 )
|
|
{
|
|
pUser.id = newBody;
|
|
pUser.orgID = newBody;
|
|
if((( skinVal & 0x4000 ) == 0x4000 ) && ( newBody >= 0x0190 && newBody <= 0x03E1 ))
|
|
{
|
|
if( skinVal != 0x8000 )
|
|
{
|
|
pUser.colour = 0xF000;
|
|
pUser.orgSkin = 0xF000;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|