Welcome to PenUltima Online. Click to login or register.


Target( by_character, options := TGTOPT_CHECK_LOS+TGTOPT_NEUTRAL)
Name Type
by_character Character Reference
options Integer (Optional)
Sends a target cursor to "by_character"'s client, and waits for the player to target something.
Notes: Options control Line-of-sight checking.
0 is returned if the character does not have line-of-sight to the object.
uo.em constants for options, just add together non-mutually exclusive options.
const TGTOPT_CHECK_LOS   := 0x0001;
const TGTOPT_NOCHECK_LOS := 0x0000;	// to be explicit
const TGTOPT_HARMFUL     := 0x0002;
const TGTOPT_NEUTRAL     := 0x0000;	// to be explicit
const TGTOPT_HELPFUL     := 0x0004;
The first 2 options specify if Line-of-sight to the targetting obejct should be checked or not. The last 3 options are involved with the reputation system. Use TGTOPT_HARMFUL if the effect that uses the target is a hostile action (like casting fireball), use _HELPFUL for things like healing and use _NEUTRAL for reputation-neutral actions.
Return values
0 if user cancelled, or nothing targetted, or no LOS to target (if option is selected)
UObject Reference on success (item or character or multi)
"Invalid parameter type"
"No client connected"
"Client busy with another target cursor"