[OpenEUO] Item Storage Script

If you make a Client-side script you can publish it here for other players to use
Locked
Quinton
Master Scribe
Posts: 51
Joined: Sat Apr 02, 2011 6:40 am

[OpenEUO] Item Storage Script

Post by Quinton »

Stores items in your main backpack to the various keys, tool/runic houses and gem pouch.
All items must be in your main backpack, and not within another bag (fail safe for carrying weapons that can be stored in your tool house, just keep them in another container within your main backpack and they won't be added)
StorageApp.zip
(8.89 KiB) Downloaded 645 times
To use:
open and run storageApp.lua

Many thanks to Jack Penny for his wonderful itemlib and menulib!
Last edited by Quinton on Thu Dec 01, 2011 5:36 pm, edited 1 time in total.
Quinton
Master Scribe
Posts: 51
Joined: Sat Apr 02, 2011 6:40 am

Re: [OpenEUO] Item Storage Script

Post by Quinton »

Forgot a file, reposted and should work. For anyone who downloaded, please try again. Thanks!
User avatar
MagicMixture
Apprentice Scribe
Posts: 19
Joined: Wed Nov 16, 2011 8:51 pm

Re: [OpenEUO] Item Storage Script

Post by MagicMixture »

is lua easy to learn? because iv done LONG time easyuo scripts and the lua ,, bit scares me :|
MagicMixture: Image
Quinton
Master Scribe
Posts: 51
Joined: Sat Apr 02, 2011 6:40 am

Re: [OpenEUO] Item Storage Script

Post by Quinton »

If you can code in EUO, you can code in lua. The difficult part is that you already know how to script with EUO, which means you'll probably have less of a desire to struggle through writing simple scripts that you can write in far less time using EUO. But if you can get through it, there are benefits :]
User avatar
marion
Grandmaster Scribe
Posts: 71
Joined: Mon Sep 12, 2011 7:05 am

Re: [OpenEUO] Item Storage Script

Post by marion »

Thanks a lot for this script. :)

It works and stores even some stuff I always trashed before with one easy click. :)
User avatar
Audria
Apprentice Scribe
Posts: 19
Joined: Fri Mar 23, 2012 2:14 am

Re: [OpenEUO] Item Storage Script

Post by Audria »

okay so now I'm going to ask the really stupid question. what's an .lua file? it doesn't seem to read with easyuo so I'm guessing it's a different program? thanks in advance and don't flame the newb here too harshly please :shock:
User avatar
Ilsanor
Legendary Scribe
Posts: 407
Joined: Tue Jun 07, 2011 5:47 am

Re: [OpenEUO] Item Storage Script

Post by Ilsanor »

Basically there is EasyUO which is the older, less powerful and more popular program - basically discontinued as far as development goes. The same authors made OpenEUO - a new program that offers greater capabilities, but is less popular since it operates in a different scripting language (hence you have to learn scripting all over again). Or to put it shortly - EUO(X) (.euo) and OEUO (.lua) scripts are NOT INTERCHANGABLE.
User avatar
Audria
Apprentice Scribe
Posts: 19
Joined: Fri Mar 23, 2012 2:14 am

Re: [OpenEUO] Item Storage Script

Post by Audria »

Ilsanor wrote:Basically there is EasyUO which is the older, less powerful and more popular program - basically discontinued as far as development goes. The same authors made OpenEUO - a new program that offers greater capabilities, but is less popular since it operates in a different scripting language (hence you have to learn scripting all over again). Or to put it shortly - EUO(X) (.euo) and OEUO (.lua) scripts are NOT INTERCHANGABLE.
Sorry it took me so long to answer, but thank you so much for he explanation! I'm looking into Open EUO :)
Pierre
Adept Scribe
Posts: 47
Joined: Sat Feb 04, 2012 12:55 pm

Re: [OpenEUO] Item Storage Script

Post by Pierre »

Just barely started trying this script out, and so far it is truly amazing. Thank you very much! That being said, it doesn't seem to want to add arrows to my wood workers keys... Is this by design, or is there something I need to adjust for this to work? Thanks again!
Quinton
Master Scribe
Posts: 51
Joined: Sat Apr 02, 2011 6:40 am

Re: [OpenEUO] Item Storage Script

Post by Quinton »

It was by design...but it can be changed in the script fairly easily.
I built two sets of lists, one ignores bolts and arrows. So you simply have to plug in the right list.
All code shown below refers to storagelib.lua file.

line 60-63:

Code: Select all

--Wood Worker Item Types
--3903, 7163 are arrows and bolts secondary list to not include those 2
local ww_types = {7127,7121,7133,3903,7163,7124}
local ww2_types = {7127, 7121, 7133, 7124}
line 97-99:

Code: Select all

function S.storeWood()
	store(5,ww2_types)
end
To store arrows and bolts, change line 97-99 to:

Code: Select all

function S.storeWood()
	store(5,ww_types)
end
Pierre
Adept Scribe
Posts: 47
Joined: Sat Feb 04, 2012 12:55 pm

Re: [OpenEUO] Item Storage Script

Post by Pierre »

Thank you very much! I am not at home to implement the changes, but will try it out this evening. I did play with it some more last night, and found out that certain tools (including rolling pins, flour sifters, and brushes) are also not recognized. While I am not without the ability to revise code in EasyUO, this is my 1st excursion into the world of OpenEUO, and I'll admit that I find the multiple lib files daunting (no programming background, just trial, error, and lots of googling). I think if I can figure out the item numbers for these tools, then by using the information you provided for arrows and bolts I could probably make these tools work. Is there a list (or a tool) that you use to determine the item type numbers? I don't want you to feel obligated to adjust your code to fit my desires - I'm just trying to figure this all out as I go, and am not quite able to troubleshoot these things myself yet.

Thank you again for the help - this is truly an amazing script!
Quinton
Master Scribe
Posts: 51
Joined: Sat Apr 02, 2011 6:40 am

Re: [OpenEUO] Item Storage Script

Post by Quinton »

To Scan Your Main Backpack (No Sub Containers are Scanned)
Save into the same directory as your itemlib.lua.
Running it will return the name and type of the objects in your mainpack in the OpenEUO console.

Code: Select all

dofile("itemlib.lua")

my_bk = item:scan():cont(UO.BackpackID):property()

for i = 1, #my_bk do
  my_bk_item = my_bk:pop(i)
  toPrint = string.format("Item Type: %d :: %s",my_bk_item.tp , my_bk_item.name)
  print(toPrint)
end
To Scan Your Surrounding Area
Save into the same directory as your itemlib.lua
Running it will return the name and type of the objects the surrounding tile range of 5 in the OpenEUO console.

Code: Select all

dofile("itemlib.lua")

ground_objects = item:scan():ground(5):property()

for i = 1, #ground_objects do
  ground_object = ground_objects:pop(i)
  toPrint = string.format("Item Type: %d :: %s",ground_object.tp,ground_object.name)
  print(toPrint)
end
Pierre
Adept Scribe
Posts: 47
Joined: Sat Feb 04, 2012 12:55 pm

Re: [OpenEUO] Item Storage Script

Post by Pierre »

Worked beautifully. I was able to edit the item types myself, thanks to you. Much appreciated!
Locked