Why on earth would you want a script like that where you only get a pre-specified item?
Take advantage of the item type already loaded and select random equipment/armor from that
random code snippet from a co emu based source
Code:
List<Struct.ItemData> ItemData = new List<Struct.ItemData>();
foreach (KeyValuePair<int, Struct.ItemData> Items in Nano.Items)
ItemData.Add(Items.Value);
Setup the item stats and use something like
Code:
Item.ItemID = Nano.Rand.Next(111003, 601339);
while (!Nano.Items.ContainsKey(Item.ItemID))
Item.ItemID = Nano.Rand.Next(111003, 601339);
to select a random item id between 111003, 601339. If it doesn't exist in the loaded items, it tries again.
Do a calculation to get the base item (knock off the final digit) and use a percent success calculation to re-attach an item quality (1-9)
Other info such as sockets/+/bless can be done in the exact same way (seeing as you already have the item structure, you are just filling in the fields and then adding the item.