Wiceradon 0 Posted January 14, 2021 Share Posted January 14, 2021 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 Link to comment https://wrobot.eu/forums/topic/12776-items-on-buylist/ Share on other sites More sharing options...
Droidz 2738 Posted January 15, 2021 Share Posted January 15, 2021 Hello, you want do it with code or with interface? Link to comment https://wrobot.eu/forums/topic/12776-items-on-buylist/#findComment-60994 Share on other sites More sharing options...
Wiceradon 0 Posted January 15, 2021 Author Share Posted January 15, 2021 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? Link to comment https://wrobot.eu/forums/topic/12776-items-on-buylist/#findComment-60996 Share on other sites More sharing options...
Droidz 2738 Posted January 15, 2021 Share Posted January 15, 2021 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); Link to comment https://wrobot.eu/forums/topic/12776-items-on-buylist/#findComment-60997 Share on other sites More sharing options...
Wiceradon 0 Posted January 15, 2021 Author Share Posted January 15, 2021 Oh Thanks, I'll try this ? Link to comment https://wrobot.eu/forums/topic/12776-items-on-buylist/#findComment-60998 Share on other sites More sharing options...
Wiceradon 0 Posted January 16, 2021 Author Share Posted January 16, 2021 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); ? Link to comment https://wrobot.eu/forums/topic/12776-items-on-buylist/#findComment-61003 Share on other sites More sharing options...
Droidz 2738 Posted January 16, 2021 Share Posted January 16, 2021 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); happiness7 1 Link to comment https://wrobot.eu/forums/topic/12776-items-on-buylist/#findComment-61005 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now