Skip to content

#LTargetID

VariableLast actionRead / writeIDNeeds client
uo.dll
LTargetID

Also searchable as: #LTargetID · LTargetID · last target · target object

#LTargetID is the ID of the object you targeted last. To target any object from a script: wait for the target cursor, set #LTargetID and #LTargetKind 1, then run event Macro 22 (Last Target).

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.

; carve a corpse with a dagger
finditem TSF C_ , #BackpackID ; a dagger
set %dagger #FindID
finditem YFM G_2 ; a corpse next to you
set %corpse #FindID
set #LObjectID %dagger
event Macro 17 0
target 5s
set #LTargetID %corpse
set #LTargetKind 1
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.