Page 1 of 1

[OpenEUO] itemlib.lua (@ version 1.0)

Posted: Fri Jul 01, 2011 7:55 pm
by Penny
@ version 1.0

Here's a new library for finditem + some extras for openeuo. If you find bugs, please post here :)

An example of how to use it:

Code: Select all

dofile("itemlib.lua")
------------------------------------------------------------
-- how to find corpses nearby and loots gold+oints from them
-- and claim them
------------------------------------------------------------
-- find corpses
corpses = item:scan():ground(2):tp(8198)

-- open corpses
for i = 1,#corpses do
    corpses:pop(i):open():wait(500)
end

-- search for gold + oints and loot them
loots = item:scan():cont(corpses:getIDs()):tp({3821,3620})
for i = 1,#loots do
    loots:pop(i):drop(UO.BackpackID)
end

-- claim them
pop:say("[claim"):waitTarget()
for i = 1,#corpses do
    corpses:pop(i):target():waitTarget()
end
UO.Key("ESC")
-- SIMPLES!!

Re: [OpenEUO] itemlib.lua (@ version 1.0)

Posted: Fri Jul 01, 2011 7:56 pm
by Penny
a file with some examples + comments

Re: [OpenEUO] itemlib.lua (@ version 1.0)

Posted: Fri Jul 01, 2011 8:05 pm
by Penny
<reserved for whatever purposes i come up with>

Re: [OpenEUO] itemlib.lua (@ version 1.0)

Posted: Sat Jul 02, 2011 1:21 am
by Superduke
Very nice!

I'm doing ok with easyuo but i have a very long way to go with oeuo unfortunately...

Re: [OpenEUO] itemlib.lua (@ version 1.0)

Posted: Sat Jul 02, 2011 5:57 am
by Nelapsi
Sweet :)

Now to code something with it or maybe will recode one of my scripts using it, thanks