randell1993
New Member
- Joined
- Dec 9, 2014
- Messages
- 3
- Reaction score
- 0
[Plugin] Illegal Farmer/Open World Farming/Public Farming/ w.e
Hello all
First of all i would like to give credit to Xact for his farm/gather (scarecrow) script as I use it as a core and model for this
Illegal Farmer
Most of the scripts i can see here are mainly for scarecrows but some illegal farming script doesnt work well with me. Here i brought you a code that will work on any quiet place you can see.
This plugin has an Anti-AFK and automatically gathers and plant things.
Before starting the bot Change the following on the script:
NEW GPS location is now necessary, this additional steps is required to run this script
Position your self on where you want the center of your public farm.
Run GPSeditor.exe and the plugin and add the point. Name the database as "pubfarm" and the point as "pub"
Save it on: pubfarm folder inside the plugin (./plugins/pubfarm/pubfarm.db3)
Known Issue:
1. Sometimes this plugin plants outside the radius due to the reason that the character moves a bit so that it can plant the seed so when the script loops a new radius is made and those empty parts are being planted again. (reason why harvesting radius should be atleast twice big as to not miss anything.) Fixed on 0.2
Personal Note: Labor expensive than scarecrow farming but safer from the eyes of player who would report you
Changelogs:
Like my work? maybe you can help me buy some drinks? ^^
help my cause Donate with Paypal
Hello all
First of all i would like to give credit to Xact for his farm/gather (scarecrow) script as I use it as a core and model for this
Illegal Farmer
Most of the scripts i can see here are mainly for scarecrows but some illegal farming script doesnt work well with me. Here i brought you a code that will work on any quiet place you can see.
This plugin has an Anti-AFK and automatically gathers and plant things.
Before starting the bot Change the following on the script:
Code:
//----------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 = 12 ...)
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 for harvesting
public int lpoints = 100; // Will not do any farming once the labor is below this number
NEW GPS location is now necessary, this additional steps is required to run this script
Position your self on where you want the center of your public farm.
Run GPSeditor.exe and the plugin and add the point. Name the database as "pubfarm" and the point as "pub"
Save it on: pubfarm folder inside the plugin (./plugins/pubfarm/pubfarm.db3)
Known Issue:
1. Sometimes this plugin plants outside the radius due to the reason that the character moves a bit so that it can plant the seed so when the script loops a new radius is made and those empty parts are being planted again. (reason why harvesting radius should be atleast twice big as to not miss anything.) Fixed on 0.2
Personal Note: Labor expensive than scarecrow farming but safer from the eyes of player who would report you
Changelogs:
Code:
0.2
A. GPS Location is added. Name: pubfarm.db3 point name is pub, This fixes the issue where there will be messy planting as the bot makes new roundzone everytime.
B. Reverse the planting gathering, Bot now harvest first before planting fixing some issues where bot plants on empty circle space where there are some harvestable crops improving efficiency
0.1
Initial release
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 = 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 (!this.gps.GpsMove("pub")) ;
var seedcounts = itemCount(seedchoice);
RoundZone y = new RoundZone(me.X,me.Y, radius2);
CollectItemsInZone(mature, farm, y);
while (!this.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 (!this.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);
}
}
}
}
Like my work? maybe you can help me buy some drinks? ^^
help my cause Donate with Paypal
Last edited: