Difference between revisions of "Luo.Char"

From OpenEUO
Jump to: navigation, search
m (Created page with "== Calling Convention == Call local f = sl.luo.Char -- later local t = f() Args none Returns f is a function, which when called produces t t is a table of UO variable value...")
 
m (See Also)
Line 55: Line 55:
  
 
* [[luo]]
 
* [[luo]]
 +
 +
* [http://www.easyuo.com/openeuo/wiki/index.php/Documentation#Variables UO Variables]

Revision as of 01:18, 2 November 2010

Calling Convention

Call

local f = sl.luo.Char
-- 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.Char()
  vo = s.joinsep(" ",
    t.Dir,
    t.PosX,
    t.PosY,
    t.PosZ,
    t.CursKind)
  print(vo)
  repeat
    t = l.Char()
    v = s.joinsep(" ",
      t.Dir,
      t.PosX,
      t.PosY,
      t.PosZ,
      t.CursKind)
    wait(100)
  until v ~= vo
end

Description

The live UO luo.Char 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
 CursKind     UO.CursKind
 Dir          UO.CharDir
 ID           UO.CharID
 Name         UO.CharName
 PosX         UO.CharPosX
 PosY         UO.CharPosY
 PosZ         UO.CharPosZ
 Sex          UO.Sex
 Status       UO.CharStatus
 Type         UO.CharType


See Also