Welcome to PenUltima Online. Click to login or register.

Functions:

MoveObjectToLocation( object, x, y, z, realm := _DEFAULT_REALM, flags := MOVEOBJECT_NORMAL )
Parameters:
Name Type
object Object Reference
x,y,z Integer world coordinates
realm String - case-sensitive name of the realm
flags Integer
Explanation
Moves an Object to a location in the world and/or from one realm to another realm.
Function will replace MoveCharacterToLocation(), MoveItemToLocation(), and MoveObjectToRealm().
Currently moves boats, mobiles, and items.
Notes: If MOVEOBJECT_FORCELOCATION is not passed with flags, z-coordinate passed is used as a hint. The object will be placed on the the ground, or on an item, or on a ship. If it is set, the z location of the object is forced.
Notes: If item is equipped, its unequiptest and unequip scripts are run, if any.
Notes: Calls the item's original container's canRemove and onRemove scripts, if any.
uo.em constants for flags:
// Constants for MoveObjectToLocation
//
const MOVEOBJECT_NORMAL		:= 0x0;
const MOVEOBJECT_FORCELOCATION	:= 0x40000000;
Return values
1 on success
Errors
"Invalid parameter"
"Realm not found"
"Invalid Coordinates for Realm"
"Can't handle that object type yet."
Can't move multis at this time.
Mobile:
"Can't go there"
Boat:
"Position indicated is impassable"
Item or Container:
"That is immobile"
"That item is being used."
"Location (x, y, z) is out of bounds"
"Invalid location selected"
"Could not remove item from its container."
"Item was destroyed in CanRemove script"
"Item cannot be unequipped"
"Item was destroyed in Equip script"
"Item was destroyed in OnRemove script"
Related
Boat
Character
Container
Item
UObject