Skip to content

#LTargetKind

VariableLast actionRead / writeNumberNeeds client
uo.dll
LTargetKind

Also searchable as: #LTargetKind · LTargetKind · target kind

#LTargetKind is what kind of thing was targeted last, and what event Macro 22 (Last Target) will target:

Value Target Uses
1 An object #LTargetID
2 The ground, mountains, caves #LTargetX, #LTargetY, #LTargetZ
3 A resource on the map: tree, water The position, and #LTargetTile

Set it every time before event Macro 22. Leaving it as it was is one of the most common causes of targeting going wrong now and then.

The value lives in the client, not in the script: setting it changes it for every script attached to that client, and the client changes it too as you play. Save the old value and put it back if other scripts may rely on it.

; teleport to a spot on the ground
event Macro 15 21 ; cast Teleport
target 5s
set #LTargetX 1000
set #LTargetY 1000
set #LTargetZ 0
set #LTargetKind 2
event Macro 22 0
halt

See also

Based on the EasyUO wiki, edited for EasyUO Reforged. This text is available under the GNU Free Documentation License 1.2.