1
Orion UO Scripts / Selling/Buying items
« Last post by Gaun on March 19, 2025, 07:04:18 PM »Hi all, was wondering if any of you managed to sell/buy items from a Orion OA script? If so you might see what I'm missing here:
I am able to get the vendorList object and see the vendorListItems in it and their properties.
I made a shopList to test buying an item by Graphic but I can't seem to obtain it.
Thank you !
I am able to get the vendorList object and see the vendorListItems in it and their properties.
I made a shopList to test buying an item by Graphic but I can't seem to obtain it.
Code: [Select]
var slist = Orion.GetShopList("hammer");
var hammer = new ShopListItem("0x13E3");
slist.SetItems([hammer]);
Orion.Print(Orion.GetShopList("hammer")!=null);
Orion.Say("buy");
Orion.WaitForShop();
var vlist = Orion.GetCurrentVendorList();
Orion.Print("isBuyList: "+vlist.IsBuyList());
Orion.Print(vlist.Items().length+" items in shop")
vlist.Items().forEach(function (item){
if (item.Count()>0){
Orion.Print(item.Count()+" "+item.Name());
}
})
Orion.BuyCurrent("hammer");
Thank you !