AtomicBomb
Member
- Joined
- Jul 31, 2011
- Messages
- 112
- Reaction score
- 4
The scarecrow plugin is pretty good but if you are like me and have multiple farm and you grew tired of using the interface every time you want to gather/plant then you need something that require less maintenance. Especially if you farm stuff that mature in 1hour or so.
So I came up with a little plugins of my own that allow me to easily and quickly change what I'm planting and collecting. Once it's setup the way you want you just start it and it will start working right away.
All the information needed to figure out how it work is written in comment block. It shouldn't be too hard to figure it out. And of course you need to compile this to get it working.
Also, there's only a small sample of item that are added in the profile as it is so you will most likely have to add the one you need.
Feel free to share any item you are adding so I can add them in the profile for everyone else usage.
So I came up with a little plugins of my own that allow me to easily and quickly change what I'm planting and collecting. Once it's setup the way you want you just start it and it will start working right away.
Code:
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() {
InitItemsList();
// SetPlantAlgoritm(PlantAlgoritm.Randomized;
SetPlantAlgoritm(PlantAlgoritm.MaxPerfomance);
// Activate an infinite loop (true: activate, false: desactivate)
bool UseLoop = false;
// How long to wait after each loop in MS (milliseconds)
int LoopTime = 3600000;
// 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> FarmGroup1 = new List<uint>();
FarmGroup1.Add(11111);
FarmGroup1.Add(11111);
FarmGroup1.Add(11111);
List<uint> FarmGroup2 = new List<uint>();
FarmGroup2.Add(11111);
FarmGroup2.Add(11111);
// Create one or multiple group of item to collect/plant
// Just enter the name of the item that are added at the bottom of this file
// Take notice that you can't mix Plant/Tree with Animals so use seperate group.
// Also, the first item you add will be the first item that will get processed.
// Example:
List<object> ItemGroup1 = new List<object>();
ItemGroup1.Add(Pine);
ItemGroup1.Add(Lavender);
List<object> ItemGroup2 = new List<object>();
ItemGroup2.Add(Sheep);
ItemGroup2.Add(Hen);
bool StopLoop = false;
while (!StopLoop) {
// This is where you set which item to collect using which Farm Group and Item Group
// Use CollectItems for Plants/Tree and CollectAnimals for Animals
// Example:
CollectItems(FarmGroup1, ItemGroup1);
PlantItems(FarmGroup1, ItemGroup1);
CollectItems(FarmGroup2, ItemGroup1);
PlantItems(FarmGroup2, ItemGroup1);
CollectAnimals(FarmGroup2, ItemGroup2);
if (UseLoop) {
Thread.Sleep(LoopTime);
} else {
StopLoop = true;
}
}
}
// If you want to add new item to gather/plant first create a new List<string> here
// Example if you want to add Aspen you would add this line:
// public List<string> Aspen = new List<string>();
// Then you would add to Aspen the corresponding string in the next block.
public List<string> Pine = new List<string>();
public List<string> Cedar = new List<string>();
public List<string> MapleWoodlot = new List<string>();
public List<string> Mushroom = new List<string>();
public List<string> Lavender = new List<string>();
public List<string> Thistle = new List<string>();
public List<string> Quinoa = new List<string>();
public List<object> Sheep = new List<object>();
public List<object> Hen = new List<object>();
// This is where you add the string to a specific item
// Example for Aspen:
// Aspen.Add("Aspen Tree"); (that's the name of the fully mature item)
// Aspen.Add("Logging: Spend up to 20 Labor to chop down a tree."); (that's the action required to use the fully mature item)
// Aspen.Add("Aspen Sapling") (that's the name of item that is used to plant it)
// Aspen.Add("Standart") (that's the motion type you want to use for this item)
//
// For animal it's a bit different but you should be able to figure it out by following how I did it for Sheep and Hen
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");
// Seed
Mushroom.Add("Mushroom");
Mushroom.Add("Gathering: Spend 1 Labor to gather materials.");
Mushroom.Add("Mushroom Spore");
Mushroom.Add("Standart");
Lavender.Add("Lavender");
Lavender.Add("Gathering: Spend 1 Labor to gather materials.");
Lavender.Add("Lavender Seed");
Lavender.Add("Standart");
Thistle.Add("Thistle");
Thistle.Add("Gathering: Spend 1 Labor to gather materials.");
Thistle.Add("Thistle Seed");
Thistle.Add("Standart");
Quinoa.Add("Quinoa");
Quinoa.Add("Farming: Spend up to 3 Labor to harvest crops.");
Quinoa.Add("Quinoa Seed");
Quinoa.Add("Standart");
// Livestock
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>();
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(DiseasedSheep);
Sheep.Add(HungrySheep);
Sheep.Add(DyingSheep);
Sheep.Add(NormalSheep);
Sheep.Add(ThrivingSheep);
List<string> NormalHen = new List<string>();
List<string> ThrivingHen = new List<string>();
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(NormalHen);
Hen.Add(ThrivingHen);
}
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);
}
}
}
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) {
Log("-> Collect " + s[0]);
CollectItemsAtFarm(s[0], s[1], f);
}
}
}
}
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);
}
}
}
}
}
All the information needed to figure out how it work is written in comment block. It shouldn't be too hard to figure it out. And of course you need to compile this to get it working.
Also, there's only a small sample of item that are added in the profile as it is so you will most likely have to add the one you need.
Feel free to share any item you are adding so I can add them in the profile for everyone else usage.
Last edited: