Jump to content

Put an item in the list not to sell


Recommended Posts

Hello,

wManager.wManagerSetting.CurrentSetting.DoNotSellList.Add("item name");

But to avoid duplicate:

var itemName = "item name"; if (!wManager.wManagerSetting.CurrentSetting.DoNotSellList.Contains(itemName)) wManager.wManagerSetting.CurrentSetting.DoNotSellList.Add(itemName);

 

Link to comment
Share on other sites

  • 2 months later...
On 21/08/2017 at 6:38 PM, joseocnejo said:

Where can I run the code?

Is not there one that allows me to automatically add everything I have in the bag?

        foreach (var woWItem in wManager.Wow.Helpers.Bag.GetBagItem())
        {
            if (!string.IsNullOrWhiteSpace(woWItem.Name) && !wManager.wManagerSetting.CurrentSetting.DoNotSellList.Contains(woWItem.Name))
                wManager.wManagerSetting.CurrentSetting.DoNotSellList.Add(woWItem.Name);
        }

You can run this code in quester profile, custom profile, plugin, ...., or in "dev... tools" (tab "Tools")

Link to comment
Share on other sites

  • 4 years later...
On 6/7/2017 at 3:01 PM, Droidz said:

Hello,

wManager.wManagerSetting.CurrentSetting.DoNotSellList.Add("item name");

But to avoid duplicate:

var itemName = "item name"; if (!wManager.wManagerSetting.CurrentSetting.DoNotSellList.Contains(itemName)) wManager.wManagerSetting.CurrentSetting.DoNotSellList.Add(itemName);

 

can i add loop option to add multi objects ?

Thanks

Link to comment
Share on other sites

3 hours ago, Sye24 said:
List<String> ItemNames = new List<string>
{
  "First Item",
  "second Item",
  //etc
};

foreach (string ItemName in ItemNames)
{
  if(!wManager.wManagerSetting.CurrentSetting.DoNotSellList.Contains(ItemName))
    wManager.wManagerSetting.CurrentSetting.DoNotSellList.Add(itemName);
}

add your time to the list and run this as RunCode

image.png.44fc68117e0921db1c90ef748c0dff15.png

List<String> ItemNames = new List<string>
{
"Hearthstone",
"Linen Cloth",
"Lesser Healing Potion",
"Minor Healing Potion",
};

foreach (string ItemName in ItemNames)
{
  if(!wManager.wManagerSetting.CurrentSetting.DoNotSellList.Contains(ItemName))
    wManager.wManagerSetting.CurrentSetting.DoNotSellList.Add(itemName);
}

 

 

it give me that error , 

On 6/7/2017 at 3:01 PM, Droidz said:

Hello,

wManager.wManagerSetting.CurrentSetting.DoNotSellList.Add("item name");

But to avoid duplicate:

var itemName = "item name"; if (!wManager.wManagerSetting.CurrentSetting.DoNotSellList.Contains(itemName)) wManager.wManagerSetting.CurrentSetting.DoNotSellList.Add(itemName);

 

 

Link to comment
Share on other sites

        List<String> ItemNames = new List<string>
        {
            "First Item",
            "second Item",
            //etc
        };

        foreach (string ItemName in ItemNames)
        {
            if(!wManager.wManagerSetting.CurrentSetting.DoNotSellList.Contains(ItemName))
                wManager.wManagerSetting.CurrentSetting.DoNotSellList.Add(ItemName);
        }

 

Link to comment
Share on other sites

3 hours ago, Droidz said:
        List<String> ItemNames = new List<string>
        {
            "First Item",
            "second Item",
            //etc
        };

        foreach (string ItemName in ItemNames)
        {
            if(!wManager.wManagerSetting.CurrentSetting.DoNotSellList.Contains(ItemName))
                wManager.wManagerSetting.CurrentSetting.DoNotSellList.Add(ItemName);
        }

 

Thank you

Work Perfect 

 

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...