January 14, 20215 yr Hey everyone, I'd like to put items on the BuyList like this: Item Name: Instant Poison I, Vendor Item Class: Consumable, Go to Vendor if Quantity Less or Equal: 5, Quantity 20, Script can condition: ObjectManager.Me.Level >20 && ObjectManager.Me.WowClass == WoWClass.Rogue; I cant figure out how to make this work. Does anyone have an idea? Best, W
January 15, 20215 yr Author 5 hours ago, Droidz said: Hello, you want do it with code or with interface? Hey Droidz, I want to do it with Code like: wManager.wManagerSetting.CurrentSetting.BuyList.Add("Instant Poison"); + Vendor Item Class: Consumable, Go to Vendor if Quantity Less or Equal: 5, Quantity 20, Script can condition: ObjectManager.Me.Level >20 && ObjectManager.Me.WowClass == WoWClass.Rogue; Is it possible?
January 15, 20215 yr Try this code: var itemToBuy = new wManager.Wow.Class.Buy { ItemName = "Instant Poison", VendorItemClass = wManager.Wow.Class.Npc.NpcVendorItemClass.Consumable, GoToVendorIfQuantityLessOrEqual = 5, Quantity = 20, ScriptCanCondition = "return ObjectManager.Me.Level >20 && ObjectManager.Me.WowClass == WoWClass.Rogue;" }; wManager.wManagerSetting.CurrentSetting.BuyList.Add(itemToBuy);
January 16, 20215 yr Author 15 hours ago, Droidz said: Try this code: var itemToBuy = new wManager.Wow.Class.Buy { ItemName = "Instant Poison", VendorItemClass = wManager.Wow.Class.Npc.NpcVendorItemClass.Consumable, GoToVendorIfQuantityLessOrEqual = 5, Quantity = 20, ScriptCanCondition = "return ObjectManager.Me.Level >20 && ObjectManager.Me.WowClass == WoWClass.Rogue;" }; wManager.wManagerSetting.CurrentSetting.BuyList.Add(itemToBuy); Okay thank you DroidZ, it nearly works like I intended it to. I have one last question about the can condition. I have to change it into C# like: return wManager.Wow.ObjectManager.ObjectManager.Me.Level >20; Is it possible to run the code in other languages? Because it's easier for me to use codes like I posted here (ObjectManager.Me.Level >20 etc.) Is there a way to create a complete condition like wManager.wManagerSetting.CurrentSetting.BuyList.Contians(Instant Poison); ?
January 16, 20215 yr try wManager.wManagerSetting.CurrentSetting.BuyList.RemoveAll(b => b.ItemName == "Instant Poison"); // remove existing var itemToBuy = new wManager.Wow.Class.Buy { ItemName = "Instant Poison", VendorItemClass = wManager.Wow.Class.Npc.NpcVendorItemClass.Consumable, GoToVendorIfQuantityLessOrEqual = 5, Quantity = 20, ScriptCanCondition = "return ObjectManager.Me.Level > 20;" }; wManager.wManagerSetting.CurrentSetting.BuyList.Add(itemToBuy);
Create an account or sign in to comment