SteamBot icon indicating copy to clipboard operation
SteamBot copied to clipboard

Crafting still not working?

Open brandoncardoso opened this issue 12 years ago • 1 comments

I've been trying to get crafting working for the past day or two, and nothing seems to be working.

        Bot.GetInventory();
        Bot.LaunchTF2();
        try
        {
            foreach (var item in Bot.MyInventory.GetItemsByDefindex(5001))
            {
                Bot.log.Debug("Found rec... trying to craft...");
                ulong[] rec = { item.Id };
                TF2GC.Crafting.CraftItems(Bot, (short)TF2GC.ECraftingRecipe.SmeltReclaimed, rec);
            }
        }
        catch
        {
            Bot.log.Error("Can't craft.");
        }
        Bot.ExitTF2();

Is what I have, and I can't understand why it isn't working.

brandoncardoso avatar Mar 04 '14 02:03 brandoncardoso

Solved. The bot wasn't seeing itself as being in TF2. Just needed to add a Thread.Sleep() in.

brandoncardoso avatar Mar 04 '14 04:03 brandoncardoso