Ejemplo n.º 1
0
        public static int buyAmount(int itemID, int itemCount, int freeSlots)
        {
            int totalAmount = itemCount / Computations.getRequiredAmount(itemID); // make x

            if (totalAmount / 100 > freeSlots)
            {
                return(freeSlots * 100); //return maximum buy
            }
            else
            {
                return(totalAmount); //return total amount
            }
        }
Ejemplo n.º 2
0
        public void ardentMillProcess()
        {
            if (clientMode == ClientMode.HARVESTBOTMINE)
            {
                characterMove(ardentMineCoords);
            }
            else if (clientMode == ClientMode.HARVESTBOTHERB)
            {
                characterMove(ardentHerbCoords);
            }
            while (!craftDone & clientMode != ClientMode.DISCONNECTED)
            {
                foreach (int itemID in Program.lootIDs)
                {
                    bool craftItemStatus = false;
                    while (craftItemStatus & clientMode != ClientMode.DISCONNECTED)
                    {
                        if (myCharacter.Inventorys[InventoryType.ETC].getItemCount(itemID) + myCharacter.Inventorys[InventoryType.EtcBags].getItemCount(itemID) < Computations.getRequiredAmount(itemID))
                        {
                            craftItemStatus = true;
                        }

                        if (myCharacter.Fatigue > 180)
                        {
                            if (myCharacter.Inventorys[InventoryType.USE].getItemCount(2340220) > 0) //Super Moo
                            {
                                useEnergyDrink();
                            }
                            else if (myCharacter.Inventorys[InventoryType.USE].getFreeSlots() > 0)
                            {
                                buyEnergyDrink();
                            }
                            else if (myCharacter.Inventorys[InventoryType.USE].getFreeSlots() == 0)
                            {
                                updateLog("No use space! Now Disconnecting");
                            }
                            //disconnect here
                        }
                        else
                        {
                            if (myCharacter.Inventorys[InventoryType.ETC].getItemCount(Computations.getRequiredCraftingItem(itemID)) == 0)
                            {
                                //buyCraftingItem(itemID, 100);
                            }
                            if (myCharacter.Inventorys[InventoryType.ETC].getItemCount(Computations.getRequiredCraftingItem(itemID)) > 0)
                            {
                                //CraftItem
                            }
                        }
                    }
                }
                craftDone = true;
            }
        }