If you want to sort bods decently efficient without OCR, then here is the best way to do it that I have found.
Calculate how many you can hold and still hold your books to fill into.
Remove that many bods from the book and put book into secure.
"Evaulate Bods" using event property. Parse the string storing information (I used values) for all the unique values (item, cnt, size, quality, material). Use these values to create a code. I hashed them, but you could simply concatenate all the values (I realized this much after I produced my sorter, you can find in oEUO scripts on this board).
Keep a list of bods associated with same destination book. Once all codes are evaluated, iterate the list of destination books needed, pulling it into your pack, dropping in ALL of the bods with that destination book, and then returning it.
This has been the most efficient way to sort easily (the most efficient would be to OCR your source book only pulling bods with the same destination book to minimize drag/drops).
Remember, calculations are pretty fast, but an issued UO action is at least a 1 second delay in your script. Inefficent book pulling could compound your times immensely.
How I did it was with a hash function, but string building is an option: For example
Iron = 0
DC = 1
Ringmail = 0
Chainmail = 1
Small = 0
Large = 1
Normal = 0
Exceptional = 1
If I had three bods:
Normal Chainmail Coif 20 Iron = 012000 (0, 1, 20, 0, 0)
Normal Ringmail Coif 20 Iron = 002000 (0,0, 20, 0, 0)
Exceptional Chainmail Coif 10 DC = 111001 (1, 1, 10, 0, 1)
hashing the values was unneeded. I would keep these as strings unless you text more. I'm not sure if leading 0's and considering them numbers will result in anything positive.
Of course, this item evaulation will keep over important differences between weapons and shields so you may need to keep track of those. So an item designation is good to, and I used a single value or items of the same set value (i.e. Kite, Heaters have the same value, weapons do not).
Anyway, if you want to use anything from my bod sorter, feel free. but writing an euox equivalent, it is certainly possible but I promise you, it won't be as easy. I exploit the crap out of tables and their behavior which are sadly absent from euox.
