Welcome to PenUltima Online. Click to login or register.

Functions:

TargetMultiPlacement( character, objtype, flags := 0, xoffset := 0, yoffset := 0 )
Parameters:
Name Type
character Character Reference
objtype Integer
flags Integer (optional)
xoffset,yoffset Integer offset to 'ghost' target house
Explanation
Sends character a "ghost" multi to select placement location in the world.
Notes: objtype must be from an itemdesc.cfg entry with a Boat or House type.
boats only constants for flags:
const CRMULTI_FACING_NORTH      := 0x0000;  
const CRMULTI_FACING_EAST       := 0x0100;
const CRMULTI_FACING_SOUTH      := 0x0200;
const CRMULTI_FACING_WEST       := 0x0300;
For House target placement, flags should == 0.
NOTE: the coordinates returned by this are the coordinates of the "target" cursor, not the center of the house if you use x/yoffset! So if you want to have the front steps be under the cursor, you must transform the parameters to CreateMultiAtLocation to include your xoffset and yoffset. Positive offsets move the cursor left/down in relation to the ghost house. An example using the front steps to target:
    var dims := GetMultiDimensions( 0x6071 );
    if(!dims) return; endif
    var loc := TargetMultiPlacement( who, 0x6071, 0, 0, dims.ymax );
    if(!loc) return; endif
    var house := CreateMultiAtLocation( loc.x, loc.y - dims.ymax, loc.z, 0x6071, 0, who.realm );
Return values
A Structure (x,y,z) containing the location targetted on success
Errors
"Invalid parameter type"
"No client attached"
"Client busy with another target cursor"
"Object Type is out of range for Multis"
Related
House
Boat
Character