What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

[Plugin] Illegal Farmer

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:
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:
Can you make it to plant and butcher Turkeys ??
 
Okey i am trying this with Rice.

public string seedchoice = "Rice Seed"; //Seed Name
public string mature = "Rice Plant"; //Name upon Maturity.
public string iname = "Rice"; // Item name

This should be the correct way to edit this right?

I got "Rice Plant" on the grown rice seed that is ready to harvest.

Do i need to edit anything else? OR is this enough to make the acc farm.
So far it did plant Rice seed, will see if it will harvest them.
 
Well i did try with the default Azalea.
However the one with Rice Plant is not working no idea why. There is no way to mistake the name.
Could the problem be that the rice is harvested and the flower is gathered?
 
Sorry for late replies

Can you make it to plant and butcher Turkeys ??

Just change the following
public string seedchoice = "Azalea Seed"; //The turkey chick?
public string mature = "Azalea"; //The name of the turkey that you can butcher
public string farm = "Gathering: Spend 1 Labor to gather materials."; //I think it is something like Husbandry: Blah blah blah

sorry i dont have really much time to check how turkey goes so just rename them


Well i did try with the default Azalea.
However the one with Rice Plant is not working no idea why. There is no way to mistake the name.
Could the problem be that the rice is harvested and the flower is gathered?

Yeah it is since rice is Farming

change this line

Gathering: Spend 1 Labor to gather materials.

to the one showing in your "F" once the rice is fully grown
 
Version 0.2 is released

Changes
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

additional instruction before running the bot

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)
 
Hi Randell!

Thanks for the plugin.

I tried to compile it but I get the following errors :

18:04:54: c:\Users\*\Documents\Archebuddy\Plugins\Pubfarm\pubfarm.cs(33,12) : error CS0103: The name 'gps' does not exist in the current context
18:04:54: c:\Users\*\Documents\Archebuddy\Plugins\Pubfarm\pubfarm.cs(34,12) : error CS0103: The name 'gps' does not exist in the current context
18:04:54: c:\Users\*\Documents\Archebuddy\Plugins\Pubfarm\pubfarm.cs(45,30) : error CS1061: 'PublicFarmer.PublicFarmer' does not contain a definition for 'gps' and no other extension method 'gps' accepting an argument of type 'PublicFarmer.PublicFarmer' was found (a directive using or an assembly reference is missing*?)
18:04:54: c:\Users\*\Documents\Archebuddy\Plugins\Pubfarm\pubfarm.cs(49,34) : error CS1061: 'PublicFarmer.PublicFarmer' does not contain a definition for 'gps' and no other extension method 'gps' accepting an argument of type 'PublicFarmer.PublicFarmer' was found (a directive using or an assembly reference is missing*?)
18:04:54: c:\Users\*\Documents\Archebuddy\Plugins\Pubfarm\pubfarm.cs(58,30) : error CS1061: 'PublicFarmer.PublicFarmer' does not contain a definition for 'gps' and no other extension method 'gps' accepting an argument of type 'PublicFarmer.PublicFarmer' was found (a directive using or an assembly reference is missing*?)

I copy/pasted your code and created a Pubfarm.db3 with a point called dub in my plugin folder /plugins/Pubfarm. Do you know where the problem comes from? (I run AB in another language so I did my best to "translate" the errors accordingly!)
 
Hi Randell!

Thanks for the plugin.

I tried to compile it but I get the following errors :

18:04:54: c:\Users\*\Documents\Archebuddy\Plugins\Pubfarm\pubfarm.cs(33,12) : error CS0103: The name 'gps' does not exist in the current context
18:04:54: c:\Users\*\Documents\Archebuddy\Plugins\Pubfarm\pubfarm.cs(34,12) : error CS0103: The name 'gps' does not exist in the current context
18:04:54: c:\Users\*\Documents\Archebuddy\Plugins\Pubfarm\pubfarm.cs(45,30) : error CS1061: 'PublicFarmer.PublicFarmer' does not contain a definition for 'gps' and no other extension method 'gps' accepting an argument of type 'PublicFarmer.PublicFarmer' was found (a directive using or an assembly reference is missing*?)
18:04:54: c:\Users\*\Documents\Archebuddy\Plugins\Pubfarm\pubfarm.cs(49,34) : error CS1061: 'PublicFarmer.PublicFarmer' does not contain a definition for 'gps' and no other extension method 'gps' accepting an argument of type 'PublicFarmer.PublicFarmer' was found (a directive using or an assembly reference is missing*?)
18:04:54: c:\Users\*\Documents\Archebuddy\Plugins\Pubfarm\pubfarm.cs(58,30) : error CS1061: 'PublicFarmer.PublicFarmer' does not contain a definition for 'gps' and no other extension method 'gps' accepting an argument of type 'PublicFarmer.PublicFarmer' was found (a directive using or an assembly reference is missing*?)

I copy/pasted your code and created a Pubfarm.db3 with a point called dub in my plugin folder /plugins/Pubfarm. Do you know where the problem comes from? (I run AB in another language so I did my best to "translate" the errors accordingly!)

Same, not working
 
I commented out all references of gps and did not have issues.
Interesting, i am sure that i did everything right, but still getting this
Code:
22:53:16: c:\Users\Ozgun\Desktop\Archo\Plugins\pubfarm\pubfarm.cs(33,7) : error CS0103: The name 'gps' does not exist in the current context
22:53:16: c:\Users\Ozgun\Desktop\Archo\Plugins\pubfarm\pubfarm.cs(34,7) : error CS0103: The name 'gps' does not exist in the current context
22:53:16: c:\Users\Ozgun\Desktop\Archo\Plugins\pubfarm\pubfarm.cs(45,30) : error CS1061: 'PublicFarmer.PublicFarmer' does not contain a definition for 'gps' and no extension method 'gps' accepting a first argument of type 'PublicFarmer.PublicFarmer' could be found (are you missing a using directive or an assembly reference?)
22:53:16: c:\Users\Ozgun\Desktop\Archo\Plugins\pubfarm\pubfarm.cs(49,34) : error CS1061: 'PublicFarmer.PublicFarmer' does not contain a definition for 'gps' and no extension method 'gps' accepting a first argument of type 'PublicFarmer.PublicFarmer' could be found (are you missing a using directive or an assembly reference?)
22:53:16: c:\Users\Ozgun\Desktop\Archo\Plugins\pubfarm\pubfarm.cs(58,30) : error CS1061: 'PublicFarmer.PublicFarmer' does not contain a definition for 'gps' and no extension method 'gps' accepting a first argument of type 'PublicFarmer.PublicFarmer' could be found (are you missing a using directive or an assembly reference?)

Edit: C:\Users\Ozgun\Desktop\Archo\Plugins\pubfarm this is the folder when i copy paste from windows i wonder if its an issue of "\" and "\\"

Edit: nope i changed it now getting this error
Code:
23:00:47: c:\Users\Ozgun\Desktop\Archo\Plugins\pubfarm\pubfarm.cs(34,27) : error CS1009: Unrecognized escape sequence
23:00:47: c:\Users\Ozgun\Desktop\Archo\Plugins\pubfarm\pubfarm.cs(34,34) : error CS1009: Unrecognized escape sequence
23:00:47: c:\Users\Ozgun\Desktop\Archo\Plugins\pubfarm\pubfarm.cs(34,40) : error CS1009: Unrecognized escape sequence
23:00:47: c:\Users\Ozgun\Desktop\Archo\Plugins\pubfarm\pubfarm.cs(34,48) : error CS1009: Unrecognized escape sequence
23:00:47: c:\Users\Ozgun\Desktop\Archo\Plugins\pubfarm\pubfarm.cs(34,54) : error CS1009: Unrecognized escape sequence
23:00:47: c:\Users\Ozgun\Desktop\Archo\Plugins\pubfarm\pubfarm.cs(34,62) : error CS1009: Unrecognized escape sequence
 
Last edited:
This is my source with all the GPS commented out

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 = "Potato Eyes"; //Seed Name
        public string mature = "Potato"; //Name upon Maturity.
        public string iname = "Potato"; // 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 = "Farming: Spend 1 Labor to harvest crops."; //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);
            }
        }
    }
}
 
This is my source with all the GPS commented out

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 = "Potato Eyes"; //Seed Name
        public string mature = "Potato"; //Name upon Maturity.
        public string iname = "Potato"; // 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 = "Farming: Spend 1 Labor to harvest crops."; //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);
            }
        }
    }
}

First of all, thanks for your effort. I also figured out taking out gps, compiles without problem but didnt have chance to try yet. I think without having gps it will have the same problem as Worldfarmer. (moving and losing where it stands)
 
First of all, thanks for your effort. I also figured out taking out gps, compiles without problem but didnt have chance to try yet. I think without having gps it will have the same problem as Worldfarmer. (moving and losing where it stands)

I do not know if gps effects it, I have not had the chance to test it long term.
 
Hello :) i tryed to compile it but ingame my char just jumps 1 time and nothing happens
 
aa93d47a3b.jpg


Damn this plug is awesome :D

I dont know but I think it plants EVERY where. I cant plant on the same place as the bot does
 
This plugin isnt worth a shit until it can harvest wild crops without planting.
Unforunately it CANNOt do that. don't waste your time.
 
Back
Top