Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Windows.Forms;
- using System.Threading;
- using System.Collections.Generic;
- using ArcheBuddy.Bot.Classes;
- namespace ScarecrowAlternative {
- public class ScarecrowAlternative : Core {
- public void PluginRun() {
- // Activate an infinite loop (true: activate, false: deactivate)
- bool UseLoop = true;
- // How long to wait after each loop in ms (milliseconds)
- Random random = new Random();
- var mseconds = random.Next(240, 300) * 1000;
- var seconds = mseconds / 1000;
- int LoopTime = mseconds;
- InitItemsList();
- // SetPlantAlgoritm(PlantAlgoritm.Randomized;
- SetPlantAlgoritm(PlantAlgoritm.MaxPerfomance);
- // Create one or multiple group of farm
- // Just replace the "11111" with your Farm ID
- // Use the Scarecrow plugin to quickly find your Farm ID
- // Example:
- List<uint> TreeFarmGroup = new List<uint>();
- TreeFarmGroup.Add(11111); //Thatched
- TreeFarmGroup.Add(11111); //Gweonid
- List<uint> NoTreeFarmGroup = new List<uint>();
- NoTreeFarmGroup.Add(11111); //Thatched
- NoTreeFarmGroup.Add(11111); //Solz
- NoTreeFarmGroup.Add(11111); //Small
- //NoTreeFarmGroup.Add(11111); //Gweonid
- //NoTreeFarmGroup.Add(11111);
- List<uint> AnimalFarmGroup = new List<uint>();
- AnimalFarmGroup.Add(11111); //Solz
- //AnimalFarmGroup.Add(11111); //Gweonid
- //AnimalFarmGroup.Add(11111);
- // Create one or multiple groups of item to collect/plant.
- // Just enter the name of the item that are added at the bottom of this file under each group.
- // Take notice that you can't mix Plant/Tree with Animals so use seperate groups.
- // Also note, the first item you add will be the first item that will get processed.
- //Tree Group - NO PLANTS
- List<object> TreeItemGroup = new List<object>();
- TreeItemGroup.Add(OliveTree);
- //TreeItemGroup.Add(BarleyBundle);
- //No Tree Group - PLANTS ONLY
- List<object> NoTreeItemGroup = new List<object>();
- //Gathering
- NoTreeItemGroup.Add(Azalea);
- NoTreeItemGroup.Add(Clover);
- NoTreeItemGroup.Add(Cornflower);
- NoTreeItemGroup.Add(Cotton);
- NoTreeItemGroup.Add(Iris);
- NoTreeItemGroup.Add(Lavender);
- NoTreeItemGroup.Add(Lily);
- NoTreeItemGroup.Add(Lotus);
- NoTreeItemGroup.Add(Mushroom);
- NoTreeItemGroup.Add(Narcissus);
- NoTreeItemGroup.Add(Rose);
- NoTreeItemGroup.Add(Rosemary);
- NoTreeItemGroup.Add(Sunflower);
- NoTreeItemGroup.Add(Thistle);
- //Farming
- NoTreeItemGroup.Add(Barley);
- NoTreeItemGroup.Add(Carrot);
- NoTreeItemGroup.Add(Corn);
- NoTreeItemGroup.Add(Cucumber);
- NoTreeItemGroup.Add(Garlic);
- NoTreeItemGroup.Add(Onion);
- NoTreeItemGroup.Add(Potato);
- NoTreeItemGroup.Add(Pumpkin);
- NoTreeItemGroup.Add(Quinoa);
- NoTreeItemGroup.Add(Rice);
- NoTreeItemGroup.Add(Strawberry);
- NoTreeItemGroup.Add(Tomato);
- NoTreeItemGroup.Add(Wheat);
- NoTreeItemGroup.Add(Yam);
- //Animal Item Group - ANIMALS ONLY
- List<object> AnimalItemGroup = new List<object>();
- AnimalItemGroup.Add(DuckCage);
- AnimalItemGroup.Add(ChickenCoop);
- bool StopLoop = false;
- while (!StopLoop) {
- ClearLogs();
- // Farming Log
- // This is where I get a starting count of the seeds and gathered items I currently have in my inventory.
- // After a count has been done, it posts the results to the log window.
- // There must be a new line for each item for now, working on consolidation.
- var itemStart1 = itemCount("Barley Seed");
- var itemStart2 = itemCount("Barley");
- var itemStart3 = itemCount("Rice Seed");
- var itemStart4 = itemCount("Rice");
- var itemStart5 = itemCount("Garlic Seed");
- var itemStart6 = itemCount("Garlic");
- var itemStart7 = itemCount("Raw Goose Meat");
- var itemStart8 = itemCount("Raw Duck Meat");
- var itemStart9 = itemCount("Raw Chicken");
- var itemStart10 = itemCount("Olive Sapling");
- var itemStart11 = itemCount("Olive");
- var itemStart12 = itemCount("Ground Grain");
- var itemStart13 = itemCount("Fresh Fertilizer");
- var itemStart14 = itemCount("Egg");
- Log("Starting Barley Seed: " + itemStart1);
- Log("Starting Barley: " + itemStart2);
- Log("Starting Rice Seed: " + itemStart3);
- Log("Starting Rice: " + itemStart4);
- Log("Starting Garlic Seed: " + itemStart5);
- Log("Starting Garlic: " + itemStart6);
- Log("Starting Raw Goose Meat: " + itemStart7);
- Log("Starting Raw Duck Meat: " + itemStart8);
- Log("Starting Raw Chicken: " + itemStart9);
- Log("Starting Olive Sapling: " + itemStart10);
- Log("Starting Olive: " + itemStart11);
- Log("Starting Ground Grain: " + itemStart12);
- Log("Starting Fresh Fertilizer " + itemStart13);
- Log("Starting Egg: " + itemStart14);
- // This is where you set which item to collect using in each of your groups set up above.
- // Use CollectItems for Plants and regular, non-fruit Trees, and CollectAnimals for Animals and Fruit Trees
- //Animals
- CollectAnimals(AnimalFarmGroup, AnimalItemGroup);
- PlantAnimals(AnimalFarmGroup, AnimalItemGroup);
- //Fruit Trees
- CollectAnimals(TreeFarmGroup, TreeItemGroup);
- PlantAnimals(TreeFarmGroup, TreeItemGroup);
- //All other plants
- CollectItems(NoTreeFarmGroup, NoTreeItemGroup);
- PlantItems(NoTreeFarmGroup, NoTreeItemGroup);
- Log("End of loop.");
- // This is the second portion of the Used/Gathered Log.
- // Here we get the ending values of the seeds and gathered items in our inventory and calulate the difference.
- var itemEnd1 = itemCount("Barley Seed");
- var itemEnd2 = itemCount("Barley");
- var itemEnd3 = itemCount("Rice Seed");
- var itemEnd4 = itemCount("Rice");
- var itemEnd5 = itemCount("Garlic Seed");
- var itemEnd6 = itemCount("Garlic");
- var itemEnd7 = itemCount("Raw Goose Meat");
- var itemEnd8 = itemCount("Raw Duck Meat");
- var itemEnd9 = itemCount("Raw Chicken");
- var itemEnd10 = itemCount("Olive Sapling");
- var itemEnd11 = itemCount("Olive");
- var itemEnd12 = itemCount("Ground Grain");
- var itemEnd13 = itemCount("Fresh Fertilizer");
- var itemEnd14 = itemCount("Egg");
- //After the calulation has been done, we post the results to the log.
- var used1 = itemStart1 - itemEnd1;
- var used2 = itemEnd2 - itemStart2;
- var used3 = itemStart3 - itemEnd3;
- var used4 = itemEnd4 - itemStart4;
- var used5 = itemStart5 - itemEnd5;
- var used6 = itemEnd6 - itemStart6;
- var used7 = itemEnd7 - itemStart7;
- var used8 = itemEnd8 - itemStart8;
- var used9 = itemEnd9 - itemStart9;
- var used10 = itemStart10 - itemEnd10;
- var used11 = itemEnd11 - itemStart11;
- var used12 = itemStart12 - itemEnd12;
- var used13 = itemEnd13 - itemStart13;
- var used14 = itemEnd14 - itemStart14;
- Log("Barley Seed Used: " + used1);
- Log("Barley Gathered: " + used2);
- Log("Rice Seed Used: " + used3);
- Log("Rice Gathered: " + used4);
- Log("Garlic Seed Used: " + used5);
- Log("Garlic Gathered: " + used6);
- Log("Raw Goose Meat Gathered: " + used7);
- Log("Raw Duck Meat Gathered: " + used8);
- Log("Raw Chicken Gathered: " + used9);
- Log("Olive Sapling Used: " + used10);
- Log("Olive Gathered: " + used11);
- Log("Ground Grain Used: " + used12);
- Log("Fresh Fertilizer Gathered: " + used13);
- Log("Egg Gathered: " + used14);
- // Here is the Anti-AFK section.
- // The length of the AFK is determined above, in the LoopTime section.
- Log("Running Anti-AFK.");
- UpdateNoAfkState();
- Turn(0.5);
- Log("Waiting for " + seconds.ToString() + " seconds.");
- if (UseLoop) {
- Thread.Sleep(LoopTime);
- } else {
- StopLoop = true;
- }
- }
- }
- // Here is the section where we tell the program all of the variables it will be using.
- // Each line here is our different Trees, Cages, Plants, Etc.
- // If you want to add a new item to gather/plant first create a new List<string> here.
- // For example, if you want to add Aspen, you would add this line:
- // public List<string> Aspen = new List<string>();
- // Trees
- public List<string> Pine = new List<string>();
- public List<string> Cedar = new List<string>();
- public List<string> MapleWoodlot = new List<string>();
- // Gathering
- public List<string> Azalea = new List<string>();
- public List<string> Clover = new List<string>();
- public List<string> Cornflower = new List<string>();
- public List<string> Cotton = new List<string>();
- public List<string> Iris = new List<string>();
- public List<string> Lavender = new List<string>();
- public List<string> Lily = new List<string>();
- public List<string> Lotus = new List<string>();
- public List<string> Mushroom = new List<string>();
- public List<string> Narcissus = new List<string>();
- public List<string> Rose = new List<string>();
- public List<string> Rosemary = new List<string>();
- public List<string> Sunflower = new List<string>();
- public List<string> Thistle = new List<string>();
- // Farming
- public List<string> Barley = new List<string>();
- public List<string> Carrot = new List<string>();
- public List<string> Corn = new List<string>();
- public List<string> Cucumber = new List<string>();
- public List<string> Garlic = new List<string>();
- public List<string> Onion = new List<string>();
- public List<string> Potato = new List<string>();
- public List<string> Pumpkin = new List<string>();
- public List<string> Quinoa = new List<string>();
- public List<string> Rice = new List<string>();
- public List<string> Strawberry = new List<string>();
- public List<string> Tomato = new List<string>();
- public List<string> Wheat = new List<string>();
- public List<string> Yam = new List<string>();
- //Bundles
- public List<string> BarleyBundle = new List<string>();
- // Animals&FruitTrees
- public List<object> Sheep = new List<object>();
- public List<object> Turkey = new List<object>();
- public List<object> Hen = new List<object>();
- public List<object> ChickenCoop = new List<object>();
- public List<object> DuckCage = new List<object>();
- public List<object> OliveTree = new List<object>();
- // This is the section where we tell the program exactly what it's looking for in the game.
- // Everything in this section must be exactly as seen in the game. For example: Use up to 2 Labor, is **NOT** the same as Use 2 Labor.
- // Take great care to check spelling, punctuation, and overall syntax while editing this section.
- // Example for Aspen:
- // Aspen.Add("Aspen Tree"); (This is the name of the fully mature item)
- // Aspen.Add("Logging: Spend up to 20 Labor to chop down a tree."); (This is the action required to use the fully mature item)
- // Aspen.Add("Aspen Sapling") (This is the name of item that is used to plant our mature item)
- // Aspen.Add("Standart") (This is the motion type you want to use for this item, for plants, use "Standart", for bundles and cages, use "SnakeFromBorder")
- public void InitItemsList() {
- // Saplings
- Pine.Add("Pine Tree");
- Pine.Add("Logging: Spend up to 20 Labor to chop down a tree.");
- Pine.Add("Pine Sapling");
- Pine.Add("Standart");
- Cedar.Add("Cedar Tree");
- Cedar.Add("Logging: Spend up to 10 Labor to chop down a tree.");
- Cedar.Add("Cedar Sapling");
- Cedar.Add("Standart");
- // Woodlot
- MapleWoodlot.Add("Maple Woodlot");
- MapleWoodlot.Add("Logging: Spend up to 200 Labor to chop down a tree.");
- MapleWoodlot.Add("Maple Woodlot");
- MapleWoodlot.Add("SnakeFromBorder");
- // Gathering
- Azalea.Add("Azalea");
- Azalea.Add("Gathering: Spend 1 Labor to gather materials.");
- Azalea.Add("Rose Seed");
- Azalea.Add("Standart");
- Clover.Add("Clover");
- Clover.Add("Gathering: Spend 1 Labor to gather materials.");
- Clover.Add("Clover Seed");
- Clover.Add("Standart");
- Cornflower.Add("Cornflower");
- Cornflower.Add("Gathering: Spend up to 2 Labor to gather materials.");
- Cornflower.Add("Cornflower Seed");
- Cornflower.Add("Standart");
- Cotton.Add("Cotton");
- Cotton.Add("Gathering: Spend up to 2 Labor to gather materials.");
- Cotton.Add("Cotton Seed");
- Cotton.Add("Standart");
- Iris.Add("Iris");
- Iris.Add("Gathering: Spend 1 Labor to gather materials.");
- Iris.Add("Iris Seed");
- Iris.Add("Standart");
- Lavender.Add("Lavender");
- Lavender.Add("Gathering: Spend 1 Labor to gather materials.");
- Lavender.Add("Lavender Seed");
- Lavender.Add("Standart");
- Lily.Add("Lily");
- Lily.Add("Gathering: Spend up to 2 Labor to gather materials.");
- Lily.Add("Lily Seed");
- Lily.Add("Standart");
- Lotus.Add("Lotus");
- Lotus.Add("Gathering: Spend up to 2 Labor to gather materials.");
- Lotus.Add("Lotus Seed");
- Lotus.Add("Standart");
- Mushroom.Add("Mushroom");
- Mushroom.Add("Gathering: Spend 1 Labor to gather materials.");
- Mushroom.Add("Mushroom Spore");
- Mushroom.Add("Standart");
- Narcissus.Add("Narcissus");
- Narcissus.Add("Gathering: Spend 1 Labor to gather materials.");
- Narcissus.Add("Narcissus Seed");
- Narcissus.Add("Standart");
- Rose.Add("Rose");
- Rose.Add("Gathering: Spend 1 Labor to gather materials.");
- Rose.Add("Rose Seed");
- Rose.Add("Standart");
- Rosemary.Add("Rosemary");
- Rosemary.Add("Gathering: Spend up to 2 Labor to gather materials.");
- Rosemary.Add("Rosemary Seed");
- Rosemary.Add("Standart");
- Sunflower.Add("Sunflower");
- Sunflower.Add("Gathering: Spend up to 3 Labor to gather materials.");
- Sunflower.Add("Sunflower Seed");
- Sunflower.Add("Standart");
- Thistle.Add("Thistle");
- Thistle.Add("Gathering: Spend 1 Labor to gather materials.");
- Thistle.Add("Thistle Seed");
- Thistle.Add("Standart");
- // Farming
- Barley.Add("Barley");
- Barley.Add("Farming: Spend 1 Labor to harvest crops.");
- Barley.Add("Barley Seed");
- Barley.Add("Standart");
- Carrot.Add("Carrot");
- Carrot.Add("Farming: Spend 1 Labor to harvest crops.");
- Carrot.Add("Carrot Seed");
- Carrot.Add("Standart");
- Corn.Add("Corn");
- Corn.Add("Farming: Spend 1 Labor to harvest crops.");
- Corn.Add("Corn Seed");
- Corn.Add("Standart");
- Cucumber.Add("Cucumber");
- Cucumber.Add("Farming: Spend 1 Labor to harvest crops.");
- Cucumber.Add("Cucumber Seed");
- Cucumber.Add("Standart");
- Garlic.Add("Garlic");
- Garlic.Add("Farming: Spend up to 2 Labor to harvest crops.");
- Garlic.Add("Garlic Seed");
- Garlic.Add("Standart");
- Onion.Add("Onion");
- Onion.Add("Farming: Spend 1 Labor to harvest crops.");
- Onion.Add("Onion Seed");
- Onion.Add("Standart");
- Potato.Add("Potato");
- Potato.Add("Farming: Spend 1 Labor to harvest crops.");
- Potato.Add("Potato Seed");
- Potato.Add("Standart");
- Pumpkin.Add("Pumpkin");
- Pumpkin.Add("Farming: Spend up to 2 Labor to harvest crops.");
- Pumpkin.Add("Pumpkin Seed");
- Pumpkin.Add("Standart");
- Quinoa.Add("Quinoa");
- Quinoa.Add("Farming: Spend up to 3 Labor to harvest crops.");
- Quinoa.Add("Quinoa Seed");
- Quinoa.Add("Standart");
- Rice.Add("Rice Plant");
- Rice.Add("Farming: Spend 1 Labor to harvest crops.");
- Rice.Add("Rice Seed");
- Rice.Add("Standart");
- Strawberry.Add("Strawberry");
- Strawberry.Add("Farming: Spend up to 2 Labor to harvest crops.");
- Strawberry.Add("Strawberry Seed");
- Strawberry.Add("Standart");
- Tomato.Add("Tomato");
- Tomato.Add("Farming: Spend up to 2 Labor to harvest crops.");
- Tomato.Add("Tomato Seed");
- Tomato.Add("Standart");
- Wheat.Add("Wheat");
- Wheat.Add("Farming: Spend up to 2 Labor to harvest crops.");
- Wheat.Add("Wheat Seed");
- Wheat.Add("Standart");
- Yam.Add("Yam");
- Yam.Add("Farming: Spend up to 2 Labor to harvest crops.");
- Yam.Add("Yam Seed");
- Yam.Add("Standart");
- //Bundles
- BarleyBundle.Add("Barley Bundle");
- BarleyBundle.Add("Farming: Spend 10 Labor to harvest crops.");
- BarleyBundle.Add("Barley Seed Bundle");
- BarleyBundle.Add("Standart");
- //FruitTrees
- // Make sure all your FruitTrees have a "Plant" List<string>, even if you don't need to plant that Tree. Otherwise it will break the collect and plant function.
- // create new List<String> to hold the planting information
- List<string> PlantOliveSapling = new List<string>();
- List<string> DyingOliveTree = new List<string>();
- List<string> FruitedOliveTree = new List<string>();
- // add the item name you are planting planting FIRST (yes the order is important)
- PlantOliveSapling.Add("Olive Sapling");
- // add planting algorithm SECOND (yes the order is important)
- PlantOliveSapling.Add("Standart");
- DyingOliveTree.Add("Dying Olive Tree");
- DyingOliveTree.Add("Gathering: Spend up to 15 Labor to gather fruit.");
- FruitedOliveTree.Add("Fruited Olive Tree");
- FruitedOliveTree.Add("Gathering: Spend up to 15 Labor to gather fruit.");
- // always add the "Plant" List<string> first or the PlantAnimals/CollectAnimals function won't work
- OliveTree.Add(PlantOliveSapling);
- OliveTree.Add(DyingOliveTree);
- OliveTree.Add(FruitedOliveTree);
- // Livestock
- // Make sure all your Animal Object have a "Plant" List<string>, even if you don't need to plant that animal. Otherwise it will break the collect and plant function.
- // create new List<String> to hold the planting information
- List<string> PlantSheep = new List<string>();
- List<string> DiseasedSheep = new List<string>();
- List<string> HungrySheep = new List<string>();
- List<string> DyingSheep = new List<string>();
- List<string> NormalSheep = new List<string>();
- List<string> ThrivingSheep = new List<string>();
- // add the item name your planting FIRST (yes the order is important)
- PlantSheep.Add("Lamb");
- // add planting algorithm SECOND (yes the order is important)
- PlantSheep.Add("Standart");
- DiseasedSheep.Add("Diseased Sheep");
- DiseasedSheep.Add("Husbandry: Spend 3 Labor and 1 Livestock Supplement to treat sick livestock.");
- HungrySheep.Add("Hungry Sheep");
- HungrySheep.Add("Husbandry: Spend 2 Labor and 1 Combined Feed to feed livestock.");
- NormalSheep.Add("Sheep");
- NormalSheep.Add("Husbandry: Spend 2 Labor and 1 Combined Feed to feed livestock.");
- ThrivingSheep.Add("Thriving Sheep");
- ThrivingSheep.Add("Husbandry: Spend up to 10 Labor to shear livestock.");
- DyingSheep.Add("Dying Sheep");
- DyingSheep.Add("Husbandry: Spend up to 10 Labor to shear livestock.");
- Sheep.Add(PlantSheep);
- Sheep.Add(DiseasedSheep);
- Sheep.Add(HungrySheep);
- Sheep.Add(DyingSheep);
- Sheep.Add(NormalSheep);
- Sheep.Add(ThrivingSheep);
- List<string> PlantTurkey = new List<string>();
- List<string> NormalTurkey = new List<string>();
- List<string> ThrivingTurkey = new List<string>();
- PlantTurkey.Add("Turkey Chick");
- PlantTurkey.Add("Standart");
- NormalTurkey.Add("Turkey");
- NormalTurkey.Add("Husbandry: Spend 1 Labor and 1 Ground Grain to feed livestock.");
- ThrivingTurkey.Add("Thriving Turkey");
- ThrivingTurkey.Add("Husbandry: Spend up to 10 Labor to butcher livestock.");
- Turkey.Add(PlantTurkey);
- Turkey.Add(NormalTurkey);
- Turkey.Add(ThrivingTurkey);
- List<string> PlantHen = new List<string>();
- List<string> NormalHen = new List<string>();
- List<string> ThrivingHen = new List<string>();
- PlantHen.Add("Chick");
- PlantHen.Add("Standart");
- NormalHen.Add("Hen");
- NormalHen.Add("Husbandry: Spend 1 Labor and 1 Ground Grain to feed livestock.");
- ThrivingHen.Add("Thriving Hen");
- ThrivingHen.Add("Husbandry: Spend up to 5 Labor to gather eggs.");
- Hen.Add(PlantHen);
- Hen.Add(NormalHen);
- Hen.Add(ThrivingHen);
- List<string> PlantChickenCoop = new List<string>();
- List<string> CollapsedChickenCoop = new List<string>();
- List<string> BrokenChickenCoop = new List<string>();
- List<string> SickChickenCoop = new List<string>();
- List<string> HungryChickenCoop = new List<string>();
- List<string> DyingChickenCoop = new List<string>();
- List<string> NormalChickenCoop = new List<string>();
- List<string> ThrivingChickenCoop = new List<string>();
- PlantChickenCoop.Add("Small Bamboo Coop");
- PlantChickenCoop.Add("SnakeFromBorder");
- CollapsedChickenCoop.Add("Collapsed Bamboo Coop");
- CollapsedChickenCoop.Add("Husbandry: Spend 50 Labor to butcher livestock. The fences will collapse completely afterwards.");
- BrokenChickenCoop.Add("Broken Chicken Coop");
- BrokenChickenCoop.Add("Repair the cage with 5 Labor and 2 Bamboo Stalks.");
- SickChickenCoop.Add("Sick Chicken Coop");
- SickChickenCoop.Add("Husbandry: Spend 15 Labor and 5 Livestock Supplements to treat sick livestock.");
- HungryChickenCoop.Add("Hungry Chicken Coop");
- HungryChickenCoop.Add("Husbandry: Spend 1 Labor and 3 Ground Grain to feed livestock.");
- NormalChickenCoop.Add("Small Chicken Coop");
- NormalChickenCoop.Add("Husbandry: Spend 1 Labor and 3 Ground Grain to feed livestock.");
- ThrivingChickenCoop.Add("Thriving Chicken Coop");
- ThrivingChickenCoop.Add("Husbandry: Spend up to 20 Labor to collect eggs from the cage. Has a low chance of completely shattering the cage.");
- DyingChickenCoop.Add("Dying Chicken Coop");
- DyingChickenCoop.Add("Husbandry: Spend up to 10 Labor to butcher livestock.");
- ChickenCoop.Add(PlantChickenCoop);
- ChickenCoop.Add(CollapsedChickenCoop);
- ChickenCoop.Add(BrokenChickenCoop);
- ChickenCoop.Add(SickChickenCoop);
- ChickenCoop.Add(HungryChickenCoop);
- ChickenCoop.Add(DyingChickenCoop);
- ChickenCoop.Add(NormalChickenCoop);
- ChickenCoop.Add(ThrivingChickenCoop);
- List<string> PlantDuckCage = new List<string>();
- List<string> BrokenDuckCage = new List<string>();
- List<string> DiseasedDuckCage = new List<string>();
- List<string> HungryDuckCage = new List<string>();
- List<string> DyingDuckCage = new List<string>();
- List<string> NormalDuckCage = new List<string>();
- List<string> ThrivingDuckCage = new List<string>();
- PlantDuckCage.Add("Bamboo Duck Cage");
- PlantDuckCage.Add("SnakeFromBorder");
- BrokenDuckCage.Add("Broken Duck Cage");
- BrokenDuckCage.Add("Repair the cage with 5 Labor and 2 Bamboo Stalks.");
- DiseasedDuckCage.Add("Diseased Duck Cage");
- DiseasedDuckCage.Add("Husbandry: Spend 15 Labor and 5 Livestock Supplements to treat sick livestock.");
- HungryDuckCage.Add("Hungry Duck Cage");
- HungryDuckCage.Add("Husbandry: Spend 1 Labor and 3 Ground Grain to feed livestock.");
- NormalDuckCage.Add("Small Duck Cage");
- NormalDuckCage.Add("Husbandry: Spend 1 Labor and 3 Ground Grain to feed livestock.");
- ThrivingDuckCage.Add("Thriving Duck Cage");
- ThrivingDuckCage.Add("Husbandry: Spend up to 35 Labor to collect feathers from the cage. Has a low chance of shattering the cage completely.");
- DyingDuckCage.Add("Dying Duck Cage");
- DyingDuckCage.Add("Husbandry: Spend up to 10 Labor to butcher livestock.");
- DuckCage.Add(PlantDuckCage);
- DuckCage.Add(BrokenDuckCage);
- DuckCage.Add(DiseasedDuckCage);
- DuckCage.Add(HungryDuckCage);
- DuckCage.Add(DyingDuckCage);
- DuckCage.Add(NormalDuckCage);
- DuckCage.Add(ThrivingDuckCage);
- }
- // Here is the function used to gather our Farming/Gathering items.
- public void CollectItems(List<uint> Scarecrow, List<object> Items) {
- foreach (uint f in Scarecrow) {
- Log("Farm ID: " + f);
- foreach (List<string> s in Items) {
- Log("-> Collect " + s[0]);
- CollectItemsAtFarm(s[0], s[1], f);
- }
- }
- }
- // Here is the function used to gather our Animals and Fruit Trees.
- public void CollectAnimals(List<uint> Scarecrow, List<object> Items) {
- foreach (uint f in Scarecrow) {
- Log("Farm ID: " + f);
- foreach (List<object> o in Items) {
- foreach(List<string> s in o) {
- // Skip the "Plant" List<string>
- if (s != o[0]) {
- Log("-> Collect " + s[0]);
- CollectItemsAtFarm(s[0], s[1], f);
- }
- }
- }
- }
- }
- // Here is the function used to plant our Animals and Fruit Trees.
- public void PlantAnimals(List<uint> Scarecrow, List<object> Items) {
- foreach (uint f in Scarecrow) {
- Log("Farm ID: " + f);
- foreach (List<object> o in Items) {
- foreach(List<string> s in o) {
- // It will only process the first List<string> in the List<object> and ignore the others hence why it's important to add the "Plant" List<string> first.
- if (s == o[0]) {
- if (s[1] == "SnakeFromBorder") {
- SetPlantMotionType(PlantMotionType.SnakeFromBorder);
- } else if (s[1] == "Standart") {
- SetPlantMotionType(PlantMotionType.Standart);
- } else if (s[1] == "SnakeFromCenter") {
- SetPlantMotionType(PlantMotionType.SnakeFromCenter);
- } else if (s[1] == "SecondStandart") {
- SetPlantMotionType(PlantMotionType.SecondStandart);
- }
- Log("-> Plant " + s[0]);
- PlantItemsAtFarm(s[0], f);
- }
- }
- }
- }
- }
- //Here is the function used to plant our Farmed/Gathered seeds.
- public void PlantItems(List<uint> Scarecrow, List<object> Items) {
- foreach (uint f in Scarecrow) {
- Log("Farm ID: " + f);
- foreach (List<string> s in Items) {
- if (s[3] == "SnakeFromBorder") {
- SetPlantMotionType(PlantMotionType.SnakeFromBorder);
- } else if (s[3] == "Standart"){
- SetPlantMotionType(PlantMotionType.Standart);
- }
- Log("-> Plant " + s[2]);
- PlantItemsAtFarm(s[2], f);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment