Jump to content

Recommended Posts

Hello all, help please, need code to  sell items to vendor 
 

if (wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWith(Npc npc, bool skipIfCannotMakePath = false, 
BooleanDelegate conditionExit = null, bool acceptNpcDead = false))
            {
                wManager.Wow.Helpers.Vendor.SellItems(List<String> itemSell, List<string> itemNoSell, 
List<Enums.WoWItemQuality> itemQuality);
            }

this code dont work
Link to comment
https://wrobot.eu/forums/topic/9602-manual-selling/
Share on other sites

need  code to sell items after interract to vendor ,  i want to full manualy selling items for 100% work, 
pulse csharp or runcode
exist code?any help

i use interractwithnpc   and next step need code to sell all items without dinotselllist items

Link to comment
https://wrobot.eu/forums/topic/9602-manual-selling/#findComment-44527
Share on other sites

1 minute ago, BetterSister said:

wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWith

 

can't be used as boolean

i about this,   

wManager.Wow.Helpers.Vendor.SellItems(List<String> itemSell, List<string> itemNoSell, 
List<Enums.WoWItemQuality> itemQuality);
Link to comment
https://wrobot.eu/forums/topic/9602-manual-selling/#findComment-44531
Share on other sites

4 minutes ago, zatvorgt said:

specific vendor   ,
i interract with him wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc
and next step need code to selling him all items and save donotselllist items

You can just go to that vendor and call ToTown, it should use the nearest vendor?

Edit: I mean go to the vendor, open his trade window.

Edited by Ordush
Link to comment
https://wrobot.eu/forums/topic/9602-manual-selling/#findComment-44535
Share on other sites

4 hours ago, Ordush said:

You can just go to that vendor and call ToTown, it should use the nearest vendor? 

Edit: I mean go to the vendor, open his trade window.

As far as i know, not every vendor is working like this. Wrobot is ignoring some vendors completely. He interacts, open trade window, do nothing, close trade window and then repeat.

Link to comment
https://wrobot.eu/forums/topic/9602-manual-selling/#findComment-44540
Share on other sites

41 minutes ago, Findeh said:

Насколько я знаю, не каждый продавец работает так. Wrobot полностью игнорирует некоторые производители. Он взаимодействует, открывает окно торговли, ничего не делает, закрывает окно торговли, а затем повторяется.

yes,  need manual code to sell items 

Link to comment
https://wrobot.eu/forums/topic/9602-manual-selling/#findComment-44541
Share on other sites

int bagSlots = 4;
if (Lua.LuaDoString<bool>("show=MerchantFrame:IsShown();", "show"))
{
  for (int i = 0; i < bagSlots; i++)
  {
    int numSlots = Lua.LuaDoString<int>("bagSlots=GetContainerNumSlots(" + i + ");", "bagSlots");
    for (int a = 1; a < numSlots; a++)
    {
      string itemLink = Lua.LuaDoString<string>("itemLink=GetContainerItemLink(" + i + ", " + a + ");", "itemLink");
      if (!wManager.wManagerSetting.CurrentSetting.DoNotSellList.Contains(System.Text.RegularExpressions.Regex.Match(itemLink, @"\[([^)]*)\]").Groups[1].Value) &&
          itemLink != "nil")
      {
        Logging.WriteDebug("Selling " + System.Text.RegularExpressions.Regex.Match(itemLink, @"\[([^)]*)\]").Groups[1].Value);
        Lua.LuaDoString("UseContainerItem(" + i + ", " + a + ");");
      }
      Thread.Sleep(500);
    }
  }
}

 

Link to comment
https://wrobot.eu/forums/topic/9602-manual-selling/#findComment-44547
Share on other sites

  • 1 year later...
List<WoWItemQuality> quality = new List<WoWItemQuality> // Quality items to sell
{ WoWItemQuality.Common, 
WoWItemQuality.Poor, 
WoWItemQuality.Rare, 
WoWItemQuality.Epic, 
WoWItemQuality.Uncommon 
};
var Sellitems = new List<string>();

if (wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(new robotManager.Helpful.Vector3(-2978.95f, 4033.11f, 3.574616f, "Flying"), 19056)) // interact with npc code 
{
                        foreach(var item in Bag.GetBagItem())
                        {
                            if (item != null && !wManager.wManagerSetting.CurrentSetting.DoNotSellList.Contains(item.Name))
                            {
                                Sellitems.Add(item.Name);
                            }
                        }
                        Vendor.SellItems(Sellitems , wManager.wManagerSetting.CurrentSetting.DoNotSellList, quality);
                        Vendor.RepairAllItems();
}
Thread.Sleep(10000);

 

Link to comment
https://wrobot.eu/forums/topic/9602-manual-selling/#findComment-56938
Share on other sites

  • 5 months later...

I know this is a old thread but i came across it when trying to find a method to bender item by name, i was able to make a method that vender ALL item by the name, i thought I'd share.

 

public static class Toolbox
{
    public static void Sellitem(string ItemName)
    {
        Lua.LuaDoString(string.Format(@"
        local ItemToSell = '{0}'
        for bag = 0,4,1 do 
        for slot = 1, GetContainerNumSlots(bag), 1 do
                local name = GetContainerItemLink(bag, slot);
                if name and string.find(name, ItemToSell) then
                if (MerchantFrame:IsShown() ) then
                     ShowMerchantSellCursor(1)
                    UseContainerItem(bag, slot)
                   end
                end
            end
        end", ItemName));
    }
}

if (wManager.Wow.Bot.Tasks.GoToTask.ToPositionAndIntecractWithNpc(new Vector3(x, y, z), NpcID, 1))
        {
            Toolbox.Sellitem("Name of item");
        }

 

Edited by TheSmokie
Typo
Link to comment
https://wrobot.eu/forums/topic/9602-manual-selling/#findComment-59446
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...