public void TradeCountInventory(bool message)
        {
            // Let's count our inventory
            Schema schema = Trade.CurrentSchema;

            //Bot.MyInventory = Trade.MyInventory;

            foreach (Inventory.Item item in Bot.MyInventory.Items)
            {
                if (item.IsNotCraftable && !schema.GetItem(item.Defindex).ItemName.Contains("Mann Co. Supply Crate Key") || item.IsNotTradeable)
                {
                }
                else if (item.Defindex == 5000)
                {
                    InventoryMetal++;
                    InventoryScrap++;
                }
                else if (item.Defindex == 5001)
                {
                    InventoryMetal += 3;
                    InventoryRec++;
                }
                else if (item.Defindex == 5002)
                {
                    InventoryMetal += 9;
                    InventoryRef++;
                }
                else if (schema.GetItem(item.Defindex).ItemName.Contains("Mann Co. Supply Crate Key") || item.Defindex == 5021)
                {
                    InventoryKey++;
                    KeyIDS.Add(item.Id);
                }
            }
            TF2Currency tempCurn = new TF2Currency(0, InventoryRef, InventoryRec, InventoryScrap);

            if (!ChooseDonate)
            {
                Trade.SendMessage("Success! I can currently buy " + tempCurn.ToKeys() + " keys, and have " + InventoryKey + " keys for sale.");
            }
            else
            {
                Trade.SendMessage("Success! Please add the items you wish to donate. Thank you ^^.");
            }
            Bot.log.Success(String.Format("I have {0} ref {1} rec {2} scrap and {3} keys.", InventoryRef, InventoryRec, InventoryScrap, InventoryKey));
        }
Beispiel #2
0
        public int GetKeySets()
        {
            TF2Currency tempCurn = new TF2Currency(0, (int)RefinedMetal, (int)ReclaimedMetal, (int)ScrapMetal, 0);

            return(tempCurn.ToKeys());
        }