[OpenEUO] itemlib.lua (@ version 1.0)

Discussion about the technical aspects of scripting. Ask about all issues involving your freelance projects here.
Locked
Penny
Legendary Scribe
Posts: 210
Joined: Thu Oct 01, 2009 12:05 pm

[OpenEUO] itemlib.lua (@ version 1.0)

Post 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!!
Attachments
itemlib.lua
(9.04 KiB) Downloaded 269 times
Last edited by Penny on Fri Jul 01, 2011 7:58 pm, edited 1 time in total.
Failure is not an option, it's a standard.
Penny
Legendary Scribe
Posts: 210
Joined: Thu Oct 01, 2009 12:05 pm

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

Post by Penny »

a file with some examples + comments
Attachments
itemlib_examples.lua
(1.53 KiB) Downloaded 262 times
Failure is not an option, it's a standard.
Penny
Legendary Scribe
Posts: 210
Joined: Thu Oct 01, 2009 12:05 pm

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

Post by Penny »

<reserved for whatever purposes i come up with>
Failure is not an option, it's a standard.
Superduke
Grandmaster Scribe
Posts: 83
Joined: Fri May 27, 2011 2:28 am

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

Post by Superduke »

Very nice!

I'm doing ok with easyuo but i have a very long way to go with oeuo unfortunately...
Nelapsi
Legendary Scribe
Posts: 268
Joined: Thu Apr 15, 2010 11:16 am

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

Post by Nelapsi »

Sweet :)

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