Hey guys, searching through out the Internet for a decent non-stop Scarecrow/Farming plugin, and finding absolutelly nothing, only one or two that were not reliable, not to mention a bunch of people who never shared squat, I made a small plugin and decided to share with the community what I made using some examples from Out and from Xact.
Basically, it does non-stop farming, using multiple characters and multiple farms, I use it mostly for barleys and Onions, can be used for gathering also, just note you have to change the CollectItemsAtFarm if you use for something other than gathering/farming that cost 1 lp, also change the item and seed for what you want to use it.
It should be noted that if you put in settings this plugin to auto-start and in account settings you configure to close game after DC and restart checked accounts, your character will continue farming non-stop through the night, because it will restart after the DCs, obviously if you configure your account to auto-launch with chosen server and character.
This support multiple characters, each one working in a specific farm, considering AB doesn't have individual auto-start per char, it also support multiple farms, it should be noted that the property ids sometimes change and you also have to change it in the code.
Basically, it does non-stop farming, using multiple characters and multiple farms, I use it mostly for barleys and Onions, can be used for gathering also, just note you have to change the CollectItemsAtFarm if you use for something other than gathering/farming that cost 1 lp, also change the item and seed for what you want to use it.
It should be noted that if you put in settings this plugin to auto-start and in account settings you configure to close game after DC and restart checked accounts, your character will continue farming non-stop through the night, because it will restart after the DCs, obviously if you configure your account to auto-launch with chosen server and character.
This support multiple characters, each one working in a specific farm, considering AB doesn't have individual auto-start per char, it also support multiple farms, it should be noted that the property ids sometimes change and you also have to change it in the code.
Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using ArcheBuddy.Bot.Classes;
namespace YourNamespace {
public class YourClass: Core {
public void PluginRun() {
while (true) {
if (gameState == GameState.Ingame){
//get Labor points
int labor = me.laborPoints;
string item = "Onion"; // PUT WHAT YOU WANT TO GATHER/FARM HERE
string seed = "Onion Seed"; // PUT THE ITEM SEED NAME HERE
//if Labor > 200
if (labor > 200) {
//get starting count of seed
var itemStart1 = itemCount(seed);
var itemStart2 = itemCount(item);
Log("------------------------");
Log("Character: " + me.name);
Log("Total "+ item +": " + itemStart2);
Log("Total "+ seed +": " + itemStart1);
// PUT CHARACTER 1 NAME HERE
if (me.name == "Charactername"){
// PUT FARM IDs HERE, Use scarecrow plugin to get the farm IDs, use the numbers without ", in this case, I'm using 2 16x16, that when they r finished,
// it takes a 5m break and it's already ready for harvest, in case of onions and barleys.
uint[] farms = {10909, 7292};
foreach (uint farm in farms){
Log("Farm: "+farm);
CollectItemsAtFarm(item, "Gathering: Spend 1 Labor to gather materials.", farm);
CollectItemsAtFarm(item, "Farming: Spend 1 Labor to harvest crops.", farm);
PlantItemsAtFarm(seed, farm);
}
} else if (me.name == "Charactername") {
// PUT FARM IDs HERE, in this case using 1 16x16 and 5 8x8
uint[] farms = {6252, 18973, 22692, 7270, 6279, 16197};
foreach (uint farm in farms){
Log("Farm: "+farm);
CollectItemsAtFarm(item, "Gathering: Spend 1 Labor to gather materials.", farm);
CollectItemsAtFarm(item, "Farming: Spend 1 Labor to harvest crops.", farm);
PlantItemsAtFarm(seed, farm);
}
} else if (me.name == "Charactername") {
// PUT FARM IDs HERE
uint[] farms = {18803, 18431};
foreach (uint farm in farms){
Log("Farm: "+farm);
CollectItemsAtFarm(item, "Gathering: Spend 1 Labor to gather materials.", farm);
CollectItemsAtFarm(item, "Farming: Spend 1 Labor to harvest crops.", farm);
PlantItemsAtFarm(seed, farm);
}
}
// end else if
//else Thread.Abort();
//get ending count of seed
var itemEnd1 = itemCount(seed);
var itemEnd2 = itemCount(item);
//get seed used and show in log
var used1 = itemStart1 - itemEnd1;
var used2 = itemEnd2 - itemStart2;
Log("------------------------");
Log("Character: " + me.name);
Log(item+" Gathered: " + used2);
Log(seed+" Used: " + used1);
//if Labor < 200 wait
} else {
Log("Labor under 200, waiting to regen");
}
//Jump once
Jump(true);
Log("JUMP! JUMP!");
Thread.Sleep(500);
Jump(false);
//Generate random time between 4-5 minutes
Random random = new Random();
var mseconds = random.Next(240, 300) * 1000;
var seconds = mseconds / 1000;
Log("Waiting for " + seconds.ToString() + " seconds");
//sleep for random time
Thread.Sleep(mseconds);
}
else Thread.Sleep(30000);
}
}
}
}