Luo.LTarget

From OpenEUO
Revision as of 00:49, 2 November 2010 by Ximan (Talk | contribs) (Created page with "== Calling Convention == Call local f = sl.luo.LTarget -- later local t = f() Args none Returns f is a function, which when called produces t t is a table of UO variable va...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Calling Convention

Call

local f = sl.luo.LTarget
-- later
local t = f()

Args

none

Returns

f is a function, which when called produces t
t is a table of UO variable values

Example Usage

local l = sl.luo
local s = sl.str
local t,vo,v = {}, "", ""
while true do
  t  = l.LTarget()
  vo = s.joinsep(" ",
    t.ID,
    t.Kind,
    t.Tile,
    t.X,
    t.Y,
    t.Z)
  print(vo)
  repeat
    t = l.LTarget()
    v = s.joinsep(" ",
      t.ID,
      t.Kind,
      t.Tile,
      t.X,
      t.Y,
      t.Z)
    wait(100)
  until v ~= vo
end

Description

The live UO luo.LTarget method returns a table of current UO variable values at the time when it is called. Keys and values of the resultant table:

 key          value
 ID           UO.LTargetID,
 Kind         UO.LTargetKind,
 Tile         UO.LTargetTile,
 X            UO.LTargetX,
 Y            UO.LTargetY,
 Z            UO.LTargetZ,


See Also