I realize that this is an old topic and OpenEUO is a forgotten cause. Although, while working with it. I have found the following when running the below script ...
UO.TargCurs = true
wait(100)
while (UO.TargCurs == true) do
wait(5000)
print("Target the item you want info on")
end
local obtype = UO.LTargetID
for i = 0, UO.ScanItems(true) do
local id,type,kind,contid,x,y,z,stack,rep,col = UO.GetItem(i)
if id == obtype then
local name, info = UO.Property(id)
print ('i = item number ' .. i .. ' in scan items')
print('name:'..name, 'info:'..info)
print("the id is:"..id, "the type is:"..type, "the kind is:"..kind, "the contid is:"..contid, "the x coordinate is:"..x, "the y coordinate is:"..y, "the z coordinate is:"..z, "the stack amount is:"..stack, "the rep is:"..rep, "the col is:"..col)
end
end
I checked my runebook with this and got the following printed result:
i = item number 0 in scan items
name:Runebook
info:Exceptional
Blessed
Weight: 1 Stone
BOD
the id is:1160486928
the type is:8901
the kind is:0
the contid is:1135523425
the x coordinate is:877
the y coordinate is:536
the z coordinate is:0
the stack amount is:0
the rep is:0
the col is:1121
Basically, what I am getting at and what it boils down to is that the subs collections was not scanning the item numbered zero for one of the find item functions. Mainly pertaining to UO.GetItem(val). UO.GetItem starts at zero. I am not sure why but it does. My character attempting to get bods would not use his runebook because it was UO.GetItem number zero. Others may ave this same problem. Just providing potentially useful info is all ... I am not sure if TM wants to mess with this or not.
I changed all of these:
i=1,UO.ScanItems
To these:
i=0,UO.ScanItems
Happy scripting to all.