Difference between revisions of "LObjectID"

From Wiki
Jump to: navigation, search
m
Line 1: Line 1:
 
{{header|Last Action|rw|The #lObjectID system variable contains the ID of the last used object. You can also write to this variable and use it in conjuction with [[event Macro|event Macro]] 17 (LastObject), which will use the object as if it was double-clicked with the mouse.}}
 
{{header|Last Action|rw|The #lObjectID system variable contains the ID of the last used object. You can also write to this variable and use it in conjuction with [[event Macro|event Macro]] 17 (LastObject), which will use the object as if it was double-clicked with the mouse.}}
 +
 +
{{note|This variable is UO client dependent. Setting #LOBJECTID in one instance of EasyUO will affect the variable as it is seen by all other instances of EasyUO bound to that client. It is recommended to sanitize the variable by saving the existing value before overwriting it, then restoring the original value when the function is complete.}}
  
 
==== Example ====
 
==== Example ====
Line 8: Line 10:
 
...
 
...
  
 +
</pre>
 +
 +
<pre>
 +
set !_orig.lobjectid #LOBJECTID
 +
set #LOBJECTID %BandageID
 +
event macro 17
 +
set #LOBJECTID !_orig.lobjectid
 +
target 2s
 +
...
 
</pre>
 
</pre>
 
{{footer}}
 
{{footer}}

Revision as of 17:48, 31 August 2007

The #lObjectID system variable contains the ID of the last used object. You can also write to this variable and use it in conjuction with event Macro 17 (LastObject), which will use the object as if it was double-clicked with the mouse.
Note: This variable is UO client dependent. Setting #LOBJECTID in one instance of EasyUO will affect the variable as it is seen by all other instances of EasyUO bound to that client. It is recommended to sanitize the variable by saving the existing value before overwriting it, then restoring the original value when the function is complete.

Example

set #lObjectID %carpentryTool
event macro 17
; crafting menu is now open
...

set !_orig.lobjectid #LOBJECTID
set #LOBJECTID %BandageID
event macro 17
set #LOBJECTID !_orig.lobjectid
target 2s
...

See also

Main Page Documentation