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

[Plugin] Illegal Farmer

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);
            }
        }
    }
}
 
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);
            }
        }
    }
}


Compilation wasn't the issue. It DOESNT harvest is the issue.
 
Daph what are you trying to harvest and what line do you have where it originally says
public string farm = "Gathering: Spend 1 Labor to gather materials."; //text when harvesting
you need t edit that line to get it to harvest what you want to harvest. that one is for azalea and any other gathering type plant that uses 1 labor. if its for other things then you would have to edit it to match the tooltip you get when you hover mouse over where it shows F on your screen that you press to harvest that plant/tree or whatever and use the line it shows you in spot above instead of Gathering: Spend 1 Labor to gather materials.
 
it cant see some plant, for example lily, narcissus so it dont gather.
 
i run illegal fruit tree farms form time to time i have no issues planting the farms myself, i would just like to know how to edit these scripts to ONLY gather the fruited and dying trees, thank you
 
На посадку настроил. А на сбор Азалии настроить не получается.
 
Back
Top