function onUseChecked( pUser, iUsed )
{
	var socket = pUser.socket;
	if( socket && iUsed && iUsed.isItem )
	{
		socket.tempObj = iUsed;
		var targMsg = GetDictionaryEntry( 445, socket.Language );
		socket.CustomTarget( 1, targMsg );
	}
	return false;
}

function onCallback1( socket, ourObj )
{
	var bItem = socket.tempObj;
	var mChar = socket.currentChar;

	socket.tempObj = null;

	if( mChar && mChar.isChar && bItem && bItem.isItem )
	{
		if( !ourObj || !ourObj.isItem )
		{
			socket.SysMessage( GetDictionaryEntry( 783, socket.Language ) );
			return;
		}

		var resID = ourObj.id;
		if( resID >= 0x1BD7 && resID <= 0x1BE2 ) 	// Is it a valid carpentry resource?
		{
			var ownerObj = GetPackOwner( ourObj, 0 );
			if( ownerObj && mChar.serial == ownerObj.serial )
				socket.MakeMenu( 19, 11 );
			else
				socket.SysMessage( GetDictionaryEntry( 781, socket.Language ) );
		}
		else
			socket.SysMessage( "You can't make anything from that material." );
	}
}

