Esempio n. 1
0
        public async Task MoveItemsAroundMain()
        {
            //await RetainerRoutine.ReadRetainers(DumpItemsByCategoryMain);
            //await Coroutine.Sleep(1000);
            await RetainerRoutine.ReadRetainers(PullItemsByCategoryMain);

            await Coroutine.Sleep(1000);

            await RetainerRoutine.ReadRetainers(DumpItemsByCategoryMain);
        }
Esempio n. 2
0
        public async Task LowerItemsById()
        {
            await RetainerRoutine.ReadRetainers(PullListItems);

            await Coroutine.Sleep(1000);

            foreach (var slot in InventoryManager.FilledSlots.Where(i => i.IsHighQuality && ItemsToLower.Contains(i.RawItemId)))
            {
                RetainerRoutine.LogLoud($"Lowering {slot}");
                slot.LowerQuality();
                await Coroutine.Sleep(1000);
            }
            await Coroutine.Sleep(1000);

            await RetainerRoutine.ReadRetainers(RetainerRoutine.DumpItems);
        }
Esempio n. 3
0
        public async Task GenerateList()
        {
            foreach (var category in CountCategories)
            {
                categoryCount.Add(category, new List <ItemStored>());
            }

            await RetainerRoutine.ReadRetainers(CountCategoryItems);

            foreach (var category in CountCategories)
            {
                using (var outputFile = new StreamWriter($"{category.ToString()}.csv", false))
                {
                    outputFile.WriteLine($"ItemId,IsHq,Count,Ilvl,ItemUICategory,Name");
                    foreach (var itemStored in categoryCount[category])
                    {
                        outputFile.WriteLine($"{itemStored}");
                    }
                }
            }
        }
Esempio n. 4
0
        public async Task Pullorder()
        {
            foreach (var item in orderList)
            {
                Logger.Info($"{DataManager.GetItem((uint) item.Item)}");
            }

            await RetainerRoutine.ReadRetainers(CheckForItems);

            foreach (var item in orderList.ToList())
            {
                var itemCount = DataManager.GetItem((uint)item.Item).ItemCount();

                if (itemCount > 0)
                {
                    if (itemCount >= item.Amount)
                    {
                        Logger.Info($"Removing {item}");
                        orderList.Remove(item);
                    }
                    else
                    {
                        Logger.Info($"Changing amount of {item} to {item.Amount - (int) itemCount}");
                        orderList.First(i => i.Item == item.Item).Amount = item.Amount - (int)itemCount;
                    }
                }
                else
                {
                    Logger.Info($"Have no {item}");
                }
            }

            using (var outputFile = new StreamWriter("Order.json", false))
            {
                outputFile.Write(JsonConvert.SerializeObject(orderList, Formatting.None));
            }
        }
Esempio n. 5
0
 public async Task PullExcludeId()
 {
     await RetainerRoutine.ReadRetainers(CheckForItemsById);
 }