Fixed compilation errors, but didn't try the plug-in itself.
Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using ArcheBuddy.Bot.Classes;
namespace PublicFarmer {
public class PublicFarmer: Core {
public static string GetPluginAuthor()
{
return "randell1993";
}
public static string GetPluginVersion()
{
return ".1";
}
public static string GetPluginDescription()
{
return "Does a Public Farm.";
}
//----------Settings----------//
public string seedchoice = "Azalea Seed"; //Seed Name
public string mature = "Azalea"; //Name upon Maturity.
public string iname = "Azalea"; // Item name
public int radius = 4; // How big will your public farm be (1 = 3 seeds, 2 = 3 ...)
public int radius2 = 10; // How big the gathering space will be (make this larger than the farm area)
public string farm = "Gathering: Spend 1 Labor to gather materials."; //text when harvesting
public int lpoints = 100; // Will not do any farming once the labor is below this number
//---------------Script Proper, Edit on your Descretion------------------------//
public void PluginRun() {
Gps gps = new Gps(this);
gps.LoadDataBase(Application.StartupPath + "\\Plugins\\Pubfarm\\pubfarm.db3");
while (true) {
int labor = me.laborPoints;
if (labor > lpoints) {
Log("----------");
Log("");
Log("Moving to location");
while (!gps.GpsMove("pub")) ;
var seedcounts = itemCount(seedchoice);
RoundZone y = new RoundZone(me.X,me.Y, radius2);
CollectItemsInZone(mature, farm, y);
while (!gps.GpsMove("pub")) ;
RoundZone z = new RoundZone(me.X,me.Y, radius);
PlantItemsInZone(seedchoice, z);
var seedcounte = itemCount(seedchoice);
var used = seedcounts - seedcounte;
Log(used + " " + seedchoice +" planted");
var icount = itemCount(iname);
Log("Total of "+icount+" "+iname+" in the inventory");
Log("");
while (!gps.GpsMove("pub")) ;
} else {
Log("----------");
Log("");
Log("Labor under "+lpoints+", waiting to regen");
Log("");
}
//Anti-Afk
Jump(true);
//Log("JUMP! JUMP!");
Thread.Sleep(500);
Jump(false);
Random random = new Random();
var mseconds = random.Next(270, 300) * 1000;
var seconds = mseconds / 1000;
//Log("Waiting for " + seconds.ToString() + " seconds");
Thread.Sleep(mseconds);
}
}
}
}