Difference between revisions of "UO.Equip"

From OpenEUO
Jump to: navigation, search
(Add Kal's example)
Line 1: Line 1:
 
   UO.Equip(nid1[,nid2[,...]])
 
   UO.Equip(nid1[,nid2[,...]])
Instantly equips all of the given object id's.  Only available on EA/Mythic shards.  Exclusive to OpenEUO.<br><br>
+
Instantly equips all of the given object id's.  <b>Only available on EA/Mythic shards.</b> Exclusive to OpenEUO.<br><br>
Note that this does not work with strings<br>
+
Note that this does not work with strings. If you want to send multiple IDs to this you may call with a table instead of a string:
If you want to send multiple IDs to this you may use a table instead of a string<br>
+
 
+
 
+
 
<code>...<br>Create a table in nIDs using table commands<br>...<br>
 
<code>...<br>Create a table in nIDs using table commands<br>...<br>
 
UO.Equip(unpack(nIDs))<br><br></code>
 
UO.Equip(unpack(nIDs))<br><br></code>
 +
 +
Here is an example by Kal In Ex using snicker7's FluentUO library to populate an table with the item id's of currently worn items:
 +
 +
<code>
 +
    dofile(".\\scripts\\FluentUO\\FluentUO.lua")
 +
    local scanSuit = World().Equipped().Items
 +
    pause() 
 +
    local suitIDs = {}
 +
    for d=1,#scanSuit do
 +
        table.insert(suitIDs,scanSuit[d].ID)
 +
    end
 +
    -- later
 +
    UO.Equip(unpack(suitIDs))
 +
</code>
  
 
[[UO.DropPD]]
 
[[UO.DropPD]]

Revision as of 09:36, 8 November 2012

 UO.Equip(nid1[,nid2[,...]])

Instantly equips all of the given object id's. Only available on EA/Mythic shards. Exclusive to OpenEUO.

Note that this does not work with strings. If you want to send multiple IDs to this you may call with a table instead of a string: ...
Create a table in nIDs using table commands
...
UO.Equip(unpack(nIDs))

Here is an example by Kal In Ex using snicker7's FluentUO library to populate an table with the item id's of currently worn items:

   dofile(".\\scripts\\FluentUO\\FluentUO.lua")
   local scanSuit = World().Equipped().Items
   pause()  
   local suitIDs = {}
   for d=1,#scanSuit do
       table.insert(suitIDs,scanSuit[d].ID)
   end
   -- later
   UO.Equip(unpack(suitIDs))

UO.DropPD

UO.LHandID

UO.RHandID