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

[PLUGIN] World Farmer - An Open world farm plugin

Is there a way to make it plant faster?
 
Last edited:
Same error when gathering tree, and nothing else in the way:
Code:
13:10:47: Script [D:\ArcheBuddy\Plugins\WorldFarmer\WorldFarmer.dll] run error:
13:10:47: Error: L'objet '/00ff327d_e9ef_4fde_900e_c0173bef945f/dgrdsupylk5oxsz4eekhfifo_33283.rem' has been disconnected or does not exist on the server.
13:10:47: Stack trace:     ArcheBuddy.Bot.Classes.Skill.get_name()
I did a test on a few of the trees with fruit and had no problems whatsoever. I need more info about this. Does anyone else have the same problem. Are you using the game in English?


Great job can you put an no-afk ? :)
Thank you. I will look at that later. When do you want the no afk to kick in? A check to see wen you are out of seeds and start then. Or maybe a plant XX amount of seeds and then afk for xx minutes?

Is there a way to make it plant faster?
I made a script with only the plant function to monitor the speed and its the same as in the full plugin. The answer is no. The speed is limited to this in the game or in Archebuddy.
 
Great job can you put an no-afk ? :)

Now with Anti AFK function.
Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;
namespace WorldFarmer
{
    public class WorldFarmer : Core
    {
        public static string GetPluginAuthor()
        {
            return "Biocide";
        }
        public static string GetPluginVersion()
        {
            return "0.5";
        }
        public static string GetPluginDescription()
        {
            return "World Farmer";
        }
       
       
       
        //-----------------------------------------SETTINGS-------------------------------------------//
        ///////////////////////////////////////////////////////////////////////////////////////////////
        //    NAME OF THE SEED YOU WANT TO PLANT. THIS MUST BE EXACTLY AS YOU SE IT IN GAME.         //
        ///////////////////////////////////////////////////////////////////////////////////////////////     
        public string seedchoice = "Barley Seed";
 
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////      
        //    PRIORITIZE SKILLS TO USE . FOR EXAMPLE IF YOU WANT TO PICK CHERRY:                                          //
        //    PRIO1 = FIND FRUIT IF YOU WANT TO CUT DOWN THE TREE AFTER YOU SET PRIO2 = Chop Tree                         //
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////        
       
        //------------LIST OF SKILLS-------------//  [I NEED MORE INFO ABOUT THE SKILLS THATS AVAILABLE]
        // Gather = Plants like Azalea
        // Harvest
        // Find Fruit = Cherry Trees, Appel Trees
        // Feed = Feed animals
        // Water Plant = Water plants
        // Gather Eggs from Livestock = Gather Eggs from Hens
        public string SkillPrio1 = "Gather";
        public string SkillPrio2 = "Harvest";
        public string SkillPrio3 = "Find Fruit";
        
        
        public int Garea = 20; // size of Gathering area
        public int Parea = 6;  // size of planting area
//---------------DONT CHANGE ANYTHING BELOW THIS LINE-----------------------------------------------------------------------------
        
 
 

        public uint Sid;
        public string Sdesc;
        public string Sname;
        public int Scount;
        public string Sprio;
        public int AFKcount;
        

        public DoodadObject GetBestNearestdood(Zone zone)
        {
            DoodadObject dood = null;
            foreach (var Obj in getDoodads())
            {
                var skills = Obj.getUseSkills();
                if (Obj.uniqOwnerId == me.uniqId && skills.Count > 0)
                {
                    //Log(Obj.name);
                    if (skills.Count > 2)
                    {
                        Scount = 3;
                        if (skills[0].name == SkillPrio1 || skills[1].name == SkillPrio1 || skills[2].name == SkillPrio1)
                        {
                            Sprio = SkillPrio1;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio2 || skills[1].name == SkillPrio2 || skills[2].name == SkillPrio2)
                        {
                            Sprio = SkillPrio2;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio3 || skills[1].name == SkillPrio3 || skills[2].name == SkillPrio3)
                        {
                            Sprio = SkillPrio3;
                            dood = Obj;
                        }
                    }
                    else if (skills.Count == 2)
                    {
                        Scount = 2;
                        if (skills[0].name == SkillPrio1 || skills[1].name == SkillPrio1)
                        {
                            Sprio = SkillPrio1;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio2 || skills[1].name == SkillPrio2)
                        {
                            Sprio = SkillPrio2;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio3 || skills[1].name == SkillPrio3)
                        {
                            Sprio = SkillPrio3;
                            dood = Obj;
                        }
                    }
                    else if (skills.Count == 1)
                    {
                        Scount = 1;
                        if (skills[0].name == SkillPrio1)
                        {
                            Sprio = SkillPrio1;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio2)
                        {
                            Sprio = SkillPrio2;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio3)
                        {
                            Sprio = SkillPrio3;
                            dood = Obj;
                        }
                    }
                }
                Thread.Sleep(50);
            }
            return dood;
        }
        public void PluginRun()
        {
            RoundZone Gzone = new RoundZone(me.X, me.Y, Garea); //Make new gather zone.
            RoundZone Pzone = new RoundZone(me.X, me.Y, Parea); //Make new plant zone.
                 
            SetGroupStatus("Gather", true); //Add checkbox to our character widget
            SetGroupStatus("Plant", true); //Add checkbox to our character widget
            
            while (true)
            {
                DoodadObject bestdood = null;
                bestdood = GetBestNearestdood(Gzone);
                if (bestdood != null && GetGroupStatus("Gather"))
                {
                    var skills = bestdood.getUseSkills();
                    if (Scount > 2)
                    {
                        if (skills[0].name == Sprio)
                        {
                            while (skills[0].name == Sprio && bestdood != null && GetGroupStatus("Gather"))  
                            {
                                CollectItemsInZone(bestdood.name, skills[0].desc, Gzone);
                                Thread.Sleep(50);
                            }
                        }
                        else if (skills[1].name == Sprio)
                        {
                            while (skills[1].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
                            {
                                CollectItemsInZone(bestdood.name, skills[1].desc, Gzone);
                                Thread.Sleep(50);
                            }
                        }
                        else if (skills[2].name == Sprio)
                        {
                            while (skills[2].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
                            {
                                CollectItemsInZone(bestdood.name, skills[2].desc, Gzone);
                                Thread.Sleep(50);
                            }
                        }
                    }
                    if (Scount == 2)
                    {
                        if (skills[0].name == Sprio)
                        {
                            while (skills[0].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
                            {
                                CollectItemsInZone(bestdood.name, skills[0].desc, Gzone);
                                Thread.Sleep(50);
                            }
                        }
                        else if (skills[1].name == Sprio)
                        {
                            while (skills[1].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
                            {
                                CollectItemsInZone(bestdood.name, skills[1].desc, Gzone);
                                Thread.Sleep(50);
                            }
                        }
                    }
                    
                    if (Scount == 1)
                    {
                        if (skills[0].name == Sprio)
                        {   
                            while (skills[0].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
                            {
                                CollectItemsInZone(bestdood.name, skills[0].desc, Gzone);
                                bestdood = GetBestNearestdood(Gzone);
                                Thread.Sleep(50);
                            }
                        }
                    }
                }
                else if (GetGroupStatus("Plant"))
                {
                    while (GetGroupStatus("Plant"))
                    {
                        bestdood = GetBestNearestdood(Gzone);
                        if (bestdood != null)
                        {
                            break;
                        }
                        PlantItemsInZone(seedchoice, Pzone);
                        Thread.Sleep(10);
                        if (bestdood == null && AFKcount == 100)
                        {
                            Jump(true);
                            Thread.Sleep(50);
                            Jump(false);
                            AFKcount = 0;
                        }
                        AFKcount = AFKcount + 1; 
                    }
                }
                Thread.Sleep(50);
                if (bestdood == null && AFKcount == 100)
                {
                    Jump(true);
                    Thread.Sleep(50);
                    Jump(false);
                    AFKcount = 0;
                }
                AFKcount = AFKcount + 1;   
        }
        }
    }
}
 
Last edited:
Gather? on tree?
What do you mean? Does it try to use Gather skill on a tree? A tree does only have Uproot, Chop Tree, and Find Fruit as skill options that I know of.
What kind of tree was it? Did the tree have fruit on it? Do you know in what stage the tree was in.

I'm planting some trees now to test this, ill hope no one finds my hiding spot :)
Here is the skills from fruit tree:
--Skill itself:
223825gatherskill.png


--Castbar while gathering:
144621findfruit.png


I do have the game in english.
 
Here is the skills from fruit tree:
--Skill itself:
223825gatherskill.png


--Castbar while gathering:
144621findfruit.png


I do have the game in english.

Ok that's Find Fruit. I have done that a few times tonight without problems.
When does it crash for you, when the channel bar ends?

Try the code from post # 84.
 
Last edited:
I did:
Code:
        public string SkillPrio1 = "Water Plants";
        public string SkillPrio2 = "Gather";
        public string SkillPrio3 = "Find Fruit";

And I don't see it using water.
 
Last edited:
I'm using this:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;
namespace WorldFarmer
{
public class WorldFarmer : Core
{
public static string GetPluginAuthor()
{
return "Biocide";
}
public static string GetPluginVersion()
{
return "0.5";
}
public static string GetPluginDescription()
{
return "World Farmer";
}



//-----------------------------------------SETTINGS-------------------------------------------//
///////////////////////////////////////////////////////////////////////////////////////////////
// NAME OF THE SEED YOU WANT TO PLANT. THIS MUST BE EXACTLY AS YOU SE IT IN GAME. //
///////////////////////////////////////////////////////////////////////////////////////////////
public string seedchoice = "Potato Eyes";

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// PRIORITIZE SKILLS TO USE . FOR EXAMPLE IF YOU WANT TO PICK CHERRY: //
// PRIO1 = FIND FRUIT IF YOU WANT TO CUT DOWN THE TREE AFTER YOU SET PRIO2 = Chop Tree //
// TIP: PLANT ONE SEED IN THE CLIMATE YOU WILL USE IT IN. WAIT UNTIL READY AND YOU WILL SE THE CORRECT NAME //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//------------LIST OF SKILLS-------------// [I NEED MORE INFO ABOUT THE SKILLS THATS AVAILABLE]
// Gather = Plants like Azalea
// Harvest
// Find Fruit = Cherry Trees, Appel Trees
// Feed = Feed animals
// Water Plants = Water plants
// Gather Eggs from Livestock = Gather Eggs from Hens
public string SkillPrio1 = "Farm";
public string SkillPrio2 = "Gather";
public string SkillPrio3 = "Harvest";


public int Garea = 20; // size of Gathering area
public int Parea = 10; // size of planting area
//---------------DONT CHANGE ANYTHING BELOW THIS LINE-----------------------------------------------------------------------------




public uint Sid;
public string Sdesc;
public string Sname;
public int Scount;
public string Sprio;
public int AFKcount;


public DoodadObject GetBestNearestdood(Zone zone)
{
DoodadObject dood = null;
foreach (var Obj in getDoodads())
{
var skills = Obj.getUseSkills();
if (Obj.uniqOwnerId == me.uniqId && skills.Count > 0)
{
//Log(Obj.name);
if (skills.Count > 2)
{
Scount = 3;
if (skills[0].name == SkillPrio1 || skills[1].name == SkillPrio1 || skills[2].name == SkillPrio1)
{
Sprio = SkillPrio1;
dood = Obj;
}
else if (skills[0].name == SkillPrio2 || skills[1].name == SkillPrio2 || skills[2].name == SkillPrio2)
{
Sprio = SkillPrio2;
dood = Obj;
}
else if (skills[0].name == SkillPrio3 || skills[1].name == SkillPrio3 || skills[2].name == SkillPrio3)
{
Sprio = SkillPrio3;
dood = Obj;
}
}
else if (skills.Count == 2)
{
Scount = 2;
if (skills[0].name == SkillPrio1 || skills[1].name == SkillPrio1)
{
Sprio = SkillPrio1;
dood = Obj;
}
else if (skills[0].name == SkillPrio2 || skills[1].name == SkillPrio2)
{
Sprio = SkillPrio2;
dood = Obj;
}
else if (skills[0].name == SkillPrio3 || skills[1].name == SkillPrio3)
{
Sprio = SkillPrio3;
dood = Obj;
}
}
else if (skills.Count == 1)
{
Scount = 1;
if (skills[0].name == SkillPrio1)
{
Sprio = SkillPrio1;
dood = Obj;
}
else if (skills[0].name == SkillPrio2)
{
Sprio = SkillPrio2;
dood = Obj;
}
else if (skills[0].name == SkillPrio3)
{
Sprio = SkillPrio3;
dood = Obj;
}
}
}
Thread.Sleep(50);
}
return dood;
}
public void PluginRun()
{
RoundZone Gzone = new RoundZone(me.X, me.Y, Garea); //Make new gather zone.
RoundZone Pzone = new RoundZone(me.X, me.Y, Parea); //Make new plant zone.

SetGroupStatus("Gather", true); //Add checkbox to our character widget
SetGroupStatus("Plant", true); //Add checkbox to our character widget

while (true)
{
DoodadObject bestdood = null;
bestdood = GetBestNearestdood(Gzone);
if (bestdood != null && GetGroupStatus("Gather"))
{
var skills = bestdood.getUseSkills();
if (Scount > 2)
{
if (skills[0].name == Sprio)
{
while (skills[0].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
{
CollectItemsInZone(bestdood.name, skills[0].desc, Gzone);
Thread.Sleep(50);
}
}
else if (skills[1].name == Sprio)
{
while (skills[1].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
{
CollectItemsInZone(bestdood.name, skills[1].desc, Gzone);
Thread.Sleep(50);
}
}
else if (skills[2].name == Sprio)
{
while (skills[2].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
{
CollectItemsInZone(bestdood.name, skills[2].desc, Gzone);
Thread.Sleep(50);
}
}
}
if (Scount == 2)
{
if (skills[0].name == Sprio)
{
while (skills[0].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
{
CollectItemsInZone(bestdood.name, skills[0].desc, Gzone);
Thread.Sleep(50);
}
}
else if (skills[1].name == Sprio)
{
while (skills[1].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
{
CollectItemsInZone(bestdood.name, skills[1].desc, Gzone);
Thread.Sleep(50);
}
}
}

if (Scount == 1)
{
if (skills[0].name == Sprio)
{
while (skills[0].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
{
CollectItemsInZone(bestdood.name, skills[0].desc, Gzone);
bestdood = GetBestNearestdood(Gzone);
Thread.Sleep(50);
}
}
}
}
else if (GetGroupStatus("Plant"))
{
while (GetGroupStatus("Plant"))
{
bestdood = GetBestNearestdood(Gzone);
if (bestdood != null)
{
break;
}
PlantItemsInZone(seedchoice, Pzone);
Thread.Sleep(10);
if (bestdood == null && AFKcount == 100)
{
Jump(true);
Thread.Sleep(50);
Jump(false);
AFKcount = 0;
}
AFKcount = AFKcount + 1;
}
}
Thread.Sleep(50);
if (bestdood == null && AFKcount == 100)
{
Jump(true);
Thread.Sleep(50);
Jump(false);
AFKcount = 0;
}
AFKcount = AFKcount + 1;
}
}
}
}

and i get this error:
Stack trace: at WorldFarmer.WorldFarmer.PluginRun() in c:\Users\Gb\Downloads\Plugins\world farmer\farm.cs:line 139(line 139= RoundZone Gzone = new RoundZone(me.X, me.Y, Garea); //Make new gather zone.)

Help please, the plugin isnt farming the potatos, it just plants it.
 
Last edited:
I did:
Code:
        public string SkillPrio1 = "Water Plants";
        public string SkillPrio2 = "Gather";
        public string SkillPrio3 = "Find Fruit";

And I don't see it using water.
Got it. It's because there is no S on Water Plant.

Same kind of error as before after it finished Water Plant on everything:
Code:
04:01:52: Script [D:\ArcheBuddy\Plugins\WorldFarmer\WorldFarmer.dll] run error:
04:01:52: Error: Object '/eed63d3e_e935_4863_ac19_c089229982b5/+zmz3ggxojakczntdl_heoch_89002.rem' has been disconnected or does not exist on the server.
04:01:52: Stack trace:    at ArcheBuddy.Bot.Classes.Skill.get_name()
   at WorldFarmer.WorldFarmer.PluginRun() in d:\ArcheBuddy\Plugins\WorldFarmer\WorldFarmer.cs:ligne 185

Used your last code, here is what I have:
Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;
namespace WorldFarmer
{
    public class WorldFarmer : Core
    {
        public static string GetPluginAuthor()
        {
            return "Biocide";
        }
        public static string GetPluginVersion()
        {
            return "0.5";
        }
        public static string GetPluginDescription()
        {
            return "World Farmer";
        }
       
       
       
        //-----------------------------------------SETTINGS-------------------------------------------//
        ///////////////////////////////////////////////////////////////////////////////////////////////
        //    NAME OF THE SEED YOU WANT TO PLANT. THIS MUST BE EXACTLY AS YOU SE IT IN GAME.         //
        ///////////////////////////////////////////////////////////////////////////////////////////////     
        public string seedchoice = "Mushroom Spore";
        
        ///public string seedchoice = "Barley Seed";
 
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////      
        //    PRIORITIZE SKILLS TO USE . FOR EXAMPLE IF YOU WANT TO PICK CHERRY:                                          //
        //    PRIO1 = FIND FRUIT IF YOU WANT TO CUT DOWN THE TREE AFTER YOU SET PRIO2 = Chop Tree                         //
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////        
       
        //------------LIST OF SKILLS-------------//  [I NEED MORE INFO ABOUT THE SKILLS THATS AVAILABLE]
        // Gather = Plants like Azalea
        // Harvest
        // Find Fruit = Cherry Trees, Appel Trees
        // Feed = Feed animals
        // Water Plants = Water plants
        // Gather Eggs from Livestock = Gather Eggs from Hens
        public string SkillPrio1 = "Water Plant";
        public string SkillPrio2 = "Gather";
        public string SkillPrio3 = "Find Fruit";
        
        ///public string SkillPrio2 = "Harvest";
        
        public int Garea = 20; // size of Gathering area
        public int Parea = 6;  // size of planting area
//---------------DONT CHANGE ANYTHING BELOW THIS LINE-----------------------------------------------------------------------------
        
 
 

        public uint Sid;
        public string Sdesc;
        public string Sname;
        public int Scount;
        public string Sprio;
        public int AFKcount;
        

        public DoodadObject GetBestNearestdood(Zone zone)
        {
            DoodadObject dood = null;
            foreach (var Obj in getDoodads())
            {
                var skills = Obj.getUseSkills();
                if (Obj.uniqOwnerId == me.uniqId && skills.Count > 0)
                {
                    //Log(Obj.name);
                    if (skills.Count > 2)
                    {
                        Scount = 3;
                        if (skills[0].name == SkillPrio1 || skills[1].name == SkillPrio1 || skills[2].name == SkillPrio1)
                        {
                            Sprio = SkillPrio1;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio2 || skills[1].name == SkillPrio2 || skills[2].name == SkillPrio2)
                        {
                            Sprio = SkillPrio2;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio3 || skills[1].name == SkillPrio3 || skills[2].name == SkillPrio3)
                        {
                            Sprio = SkillPrio3;
                            dood = Obj;
                        }
                    }
                    else if (skills.Count == 2)
                    {
                        Scount = 2;
                        if (skills[0].name == SkillPrio1 || skills[1].name == SkillPrio1)
                        {
                            Sprio = SkillPrio1;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio2 || skills[1].name == SkillPrio2)
                        {
                            Sprio = SkillPrio2;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio3 || skills[1].name == SkillPrio3)
                        {
                            Sprio = SkillPrio3;
                            dood = Obj;
                        }
                    }
                    else if (skills.Count == 1)
                    {
                        Scount = 1;
                        if (skills[0].name == SkillPrio1)
                        {
                            Sprio = SkillPrio1;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio2)
                        {
                            Sprio = SkillPrio2;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio3)
                        {
                            Sprio = SkillPrio3;
                            dood = Obj;
                        }
                    }
                }
                Thread.Sleep(50);
            }
            return dood;
        }
        public void PluginRun()
        {
            RoundZone Gzone = new RoundZone(me.X, me.Y, Garea); //Make new gather zone.
            RoundZone Pzone = new RoundZone(me.X, me.Y, Parea); //Make new plant zone.
                 
            SetGroupStatus("Gather", true); //Add checkbox to our character widget
            SetGroupStatus("Plant", true); //Add checkbox to our character widget
            
            while (true)
            {
                DoodadObject bestdood = null;
                bestdood = GetBestNearestdood(Gzone);
                if (bestdood != null && GetGroupStatus("Gather"))
                {
                    var skills = bestdood.getUseSkills();
                    if (Scount > 2)
                    {
                        if (skills[0].name == Sprio)
                        {
                            while (skills[0].name == Sprio && bestdood != null && GetGroupStatus("Gather"))  
                            {
                                CollectItemsInZone(bestdood.name, skills[0].desc, Gzone);
                                Thread.Sleep(50);
                            }
                        }
                        else if (skills[1].name == Sprio)
                        {
                            while (skills[1].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
                            {
                                CollectItemsInZone(bestdood.name, skills[1].desc, Gzone);
                                Thread.Sleep(50);
                            }
                        }
                        else if (skills[2].name == Sprio)
                        {
                            while (skills[2].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
                            {
                                CollectItemsInZone(bestdood.name, skills[2].desc, Gzone);
                                Thread.Sleep(50);
                            }
                        }
                    }
                    if (Scount == 2)
                    {
                        if (skills[0].name == Sprio)
                        {
                            while (skills[0].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
                            {
                                CollectItemsInZone(bestdood.name, skills[0].desc, Gzone);
                                Thread.Sleep(50);
                            }
                        }
                        else if (skills[1].name == Sprio)
                        {
                            while (skills[1].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
                            {
                                CollectItemsInZone(bestdood.name, skills[1].desc, Gzone);
                                Thread.Sleep(50);
                            }
                        }
                    }
                    
                    if (Scount == 1)
                    {
                        if (skills[0].name == Sprio)
                        {   
                            while (skills[0].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
                            {
                                CollectItemsInZone(bestdood.name, skills[0].desc, Gzone);
                                bestdood = GetBestNearestdood(Gzone);
                                Thread.Sleep(50);
                            }
                        }
                    }
                }
                else if (GetGroupStatus("Plant"))
                {
                    while (GetGroupStatus("Plant"))
                    {
                        bestdood = GetBestNearestdood(Gzone);
                        if (bestdood != null)
                        {
                            break;
                        }
                        PlantItemsInZone(seedchoice, Pzone);
                        Thread.Sleep(10);
                        if (bestdood == null && AFKcount == 100)
                        {
                            Jump(true);
                            Thread.Sleep(50);
                            Jump(false);
                            AFKcount = 0;
                        }
                        AFKcount = AFKcount + 1; 
                    }
                }
                Thread.Sleep(50);
                if (bestdood == null && AFKcount == 100)
                {
                    Jump(true);
                    Thread.Sleep(50);
                    Jump(false);
                    AFKcount = 0;
                }
                AFKcount = AFKcount + 1;   
        }
        }
    }
}
 
If someone is good enough to code this (or you OP!) it would be really great if this plugin could be made to chop down illegal tree farms, even with the popup saying you are not the owner of the item.
 
What do i have to do to make the bot farm and harvest potatoes all the time? Plant, wait, Harvest, plant, wait, harvest... ?
 
I did:
Code:
        public string SkillPrio1 = "Water Plants";
        public string SkillPrio2 = "Gather";
        public string SkillPrio3 = "Find Fruit";

And I don't see it using water.

It should be Water Plant not Water Plants.
I could se that I had an s in the description but that's wrong, no s.
 
What do i have to do to make the bot farm and harvest potatoes all the time? Plant, wait, Harvest, plant, wait, harvest... ?

This code should do it.
Anyone that had the error message could try this code to see if its gone.

Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;
namespace WorldFarmer
{
    public class WorldFarmer : Core
    {
        public static string GetPluginAuthor()
        {
            return "Biocide";
        }
        public static string GetPluginVersion()
        {
            return "0.5";
        }
        public static string GetPluginDescription()
        {
            return "World Farmer";
        }
       
       
       
        //-----------------------------------------SETTINGS-------------------------------------------//
        ///////////////////////////////////////////////////////////////////////////////////////////////
        //    NAME OF THE SEED YOU WANT TO PLANT. THIS MUST BE EXACTLY AS YOU SE IT IN GAME.         //
        ///////////////////////////////////////////////////////////////////////////////////////////////     
        public string seedchoice = "Potato Eyes";
 
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////      
        //    PRIORITIZE SKILLS TO USE . FOR EXAMPLE IF YOU WANT TO PICK CHERRY:                                          //
        //    PRIO1 = Find Fruit IF YOU WANT TO CUT DOWN THE TREE AFTER YOU SET PRIO2 = Chop Tree                         //
        ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////        
       
        //------------LIST OF SKILLS-------------//  [I NEED MORE INFO ABOUT THE SKILLS THATS AVAILABLE]
        // Gather = Plants like Azalea
        // Harvest
        // Find Fruit = Cherry Trees, Appel Trees
        // Feed = Feed animals
        // Water Plant = Water plant
        // Gather Eggs from Livestock = Gather Eggs from Hens
        public string SkillPrio1 = "Harvest";
        public string SkillPrio2 = "Gather";
        public string SkillPrio3 = "Find Fruit";
        
        
        public int Garea = 20; // size of Gathering area
        public int Parea = 6;  // size of planting area
//---------------DONT CHANGE ANYTHING BELOW THIS LINE-----------------------------------------------------------------------------
        
 
 

        public uint Sid;
        public string Sdesc;
        public string Sname;
        public int Scount;
        public string Sprio;
        public int AFKcount;
        

        public DoodadObject GetBestNearestdood(Zone zone)
        {
            DoodadObject dood = null;
            foreach (var Obj in getDoodads())
            {
                var skills = Obj.getUseSkills();
                if (Obj.uniqOwnerId == me.uniqId && skills.Count > 0)
                {
                    //Log(Obj.name);
                    if (skills.Count > 2)
                    {
                        Scount = 3;
                        if (skills[0].name == SkillPrio1 || skills[1].name == SkillPrio1 || skills[2].name == SkillPrio1)
                        {
                            Sprio = SkillPrio1;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio2 || skills[1].name == SkillPrio2 || skills[2].name == SkillPrio2)
                        {
                            Sprio = SkillPrio2;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio3 || skills[1].name == SkillPrio3 || skills[2].name == SkillPrio3)
                        {
                            Sprio = SkillPrio3;
                            dood = Obj;
                        }
                    }
                    else if (skills.Count == 2)
                    {
                        Scount = 2;
                        if (skills[0].name == SkillPrio1 || skills[1].name == SkillPrio1)
                        {
                            Sprio = SkillPrio1;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio2 || skills[1].name == SkillPrio2)
                        {
                            Sprio = SkillPrio2;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio3 || skills[1].name == SkillPrio3)
                        {
                            Sprio = SkillPrio3;
                            dood = Obj;
                        }
                    }
                    else if (skills.Count == 1)
                    {
                        Scount = 1;
                        if (skills[0].name == SkillPrio1)
                        {
                            Sprio = SkillPrio1;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio2)
                        {
                            Sprio = SkillPrio2;
                            dood = Obj;
                        }
                        else if (skills[0].name == SkillPrio3)
                        {
                            Sprio = SkillPrio3;
                            dood = Obj;
                        }
                    }
                }
                Thread.Sleep(50);
            }
            return dood;
        }
        public void PluginRun()
        {
            RoundZone Gzone = new RoundZone(me.X, me.Y, Garea); //Make new gather zone.
            RoundZone Pzone = new RoundZone(me.X, me.Y, Parea); //Make new plant zone.
                 
            SetGroupStatus("Gather", false); //Add checkbox to our character widget
            SetGroupStatus("Plant", false); //Add checkbox to our character widget
            
            while (true)
            {
                DoodadObject bestdood = null;
                bestdood = GetBestNearestdood(Gzone);
                if (bestdood != null && GetGroupStatus("Gather"))
                {
                    var skills = bestdood.getUseSkills();
                    if (Scount > 2)
                    {
                        if (skills[0].name == Sprio)
                        {
                            while (skills[0].name == Sprio && bestdood != null && GetGroupStatus("Gather"))  
                            {
                                CollectItemsInZone(bestdood.name, skills[0].desc, Gzone);
                                Thread.Sleep(100);
                                bestdood = GetBestNearestdood(Gzone);
                            }
                        }
                        else if (skills[1].name == Sprio)
                        {
                            while (skills[1].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
                            {
                                CollectItemsInZone(bestdood.name, skills[1].desc, Gzone);
                                Thread.Sleep(100);
                                bestdood = GetBestNearestdood(Gzone);
                            }
                        }
                        else if (skills[2].name == Sprio)
                        {
                            while (skills[2].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
                            {
                                CollectItemsInZone(bestdood.name, skills[2].desc, Gzone);
                                Thread.Sleep(100);
                                bestdood = GetBestNearestdood(Gzone);
                            }
                        }
                    }
                    else if (Scount == 2)
                    {
                        if (skills[0].name == Sprio)
                        {
                            while (skills[0].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
                            {
                                CollectItemsInZone(bestdood.name, skills[0].desc, Gzone);
                                Thread.Sleep(100);
                                bestdood = GetBestNearestdood(Gzone);
                            }
                        }
                        else if (skills[1].name == Sprio)
                        {
                            while (skills[1].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
                            {
                                CollectItemsInZone(bestdood.name, skills[1].desc, Gzone);
                                Thread.Sleep(100);
                                bestdood = GetBestNearestdood(Gzone);
                            }
                        }
                    }
                    
                    else if (Scount == 1)
                    {
                        if (skills[0].name == Sprio)
                        {   
                            while (skills[0].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
                            {
                                CollectItemsInZone(bestdood.name, skills[0].desc, Gzone);
                                Thread.Sleep(100);
                                bestdood = GetBestNearestdood(Gzone);
                            }
                        }
                    }
                }
                else if (GetGroupStatus("Plant"))
                {
                    while (GetGroupStatus("Plant"))
                    {
                        bestdood = GetBestNearestdood(Gzone);
                        if (bestdood != null)
                        {
                            break;
                        }
                        PlantItemsInZone(seedchoice, Pzone);
                        Thread.Sleep(10);
                        if (bestdood == null && AFKcount == 200)
                        {
                            Jump(true);
                            Thread.Sleep(10);
                            Jump(false);
                            AFKcount = 0;
                        }
                        AFKcount = AFKcount + 1;
                        Thread.Sleep(10);
                    }
                }
                Thread.Sleep(50);
                
                if (bestdood == null && AFKcount == 200)
                {
                    Jump(true);
                    Thread.Sleep(10);
                    Jump(false);
                    AFKcount = 0;
                }
                AFKcount = AFKcount + 1;
            }
        }
    }
}
 
Last edited:
Im trying to do it with rice, but it wont farm it after planting, how do i fix it?
using System;
using System.Windows.Forms;
using System.Threading;
using System.Threading.Tasks;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;
namespace WorldFarmer
{
public class WorldFarmer : Core
{
public static string GetPluginAuthor()
{
return "Biocide";
}
public static string GetPluginVersion()
{
return "0.5";
}
public static string GetPluginDescription()
{
return "World Farmer";
}



//-----------------------------------------SETTINGS-------------------------------------------//
///////////////////////////////////////////////////////////////////////////////////////////////
// NAME OF THE SEED YOU WANT TO PLANT. THIS MUST BE EXACTLY AS YOU SE IT IN GAME. //
///////////////////////////////////////////////////////////////////////////////////////////////
public string seedchoice = "Rice Seed";

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// PRIORITIZE SKILLS TO USE . FOR EXAMPLE IF YOU WANT TO PICK CHERRY: //
// PRIO1 = Find Fruit IF YOU WANT TO CUT DOWN THE TREE AFTER YOU SET PRIO2 = Chop Tree //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

//------------LIST OF SKILLS-------------// [I NEED MORE INFO ABOUT THE SKILLS THATS AVAILABLE]
// Gather = Plants like Azalea
// Harvest
// Find Fruit = Cherry Trees, Appel Trees
// Feed = Feed animals
// Water Plant = Water plant
// Gather Eggs from Livestock = Gather Eggs from Hens
public string SkillPrio1 = "Farm";
public string SkillPrio2 = "Gather";
public string SkillPrio3 = "Harvest";


public int Garea = 100; // size of Gathering area
public int Parea = 23; // size of planting area
//---------------DONT CHANGE ANYTHING BELOW THIS LINE-----------------------------------------------------------------------------




public uint Sid;
public string Sdesc;
public string Sname;
public int Scount;
public string Sprio;
public int AFKcount;


public DoodadObject GetBestNearestdood(Zone zone)
{
DoodadObject dood = null;
foreach (var Obj in getDoodads())
{
var skills = Obj.getUseSkills();
if (Obj.uniqOwnerId == me.uniqId && skills.Count > 0)
{
//Log(Obj.name);
if (skills.Count > 2)
{
Scount = 3; d
if (skills[0].name == SkillPrio1 || skills[1].name == SkillPrio1 || skills[2].name == SkillPrio1)
{
Sprio = SkillPrio1;
dood = Obj;
}
else if (skills[0].name == SkillPrio2 || skills[1].name == SkillPrio2 || skills[2].name == SkillPrio2)
{
Sprio = SkillPrio2;
dood = Obj;
}
else if (skills[0].name == SkillPrio3 || skills[1].name == SkillPrio3 || skills[2].name == SkillPrio3)
{
Sprio = SkillPrio3;
dood = Obj;
}
}
else if (skills.Count == 2)
{
Scount = 2;
if (skills[0].name == SkillPrio1 || skills[1].name == SkillPrio1)
{
Sprio = SkillPrio1;
dood = Obj;
}
else if (skills[0].name == SkillPrio2 || skills[1].name == SkillPrio2)
{
Sprio = SkillPrio2;
dood = Obj;
}
else if (skills[0].name == SkillPrio3 || skills[1].name == SkillPrio3)
{
Sprio = SkillPrio3;
dood = Obj;
}
}
else if (skills.Count == 1)
{
Scount = 1;
if (skills[0].name == SkillPrio1)
{
Sprio = SkillPrio1;
dood = Obj;
}
else if (skills[0].name == SkillPrio2)
{
Sprio = SkillPrio2;
dood = Obj;
}
else if (skills[0].name == SkillPrio3)
{
Sprio = SkillPrio3;
dood = Obj;
}
}
}
Thread.Sleep(50);
}
return dood;
}
public void PluginRun()
{
RoundZone Gzone = new RoundZone(me.X, me.Y, Garea); //Make new gather zone.
RoundZone Pzone = new RoundZone(me.X, me.Y, Parea); //Make new plant zone.

SetGroupStatus("Gather", false); //Add checkbox to our character widget
SetGroupStatus("Plant", false); //Add checkbox to our character widget

while (true)
{
DoodadObject bestdood = null;
bestdood = GetBestNearestdood(Gzone);
if (bestdood != null && GetGroupStatus("Gather"))
{
var skills = bestdood.getUseSkills();
if (Scount > 2)
{
if (skills[0].name == Sprio)
{
while (skills[0].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
{
CollectItemsInZone(bestdood.name, skills[0].desc, Gzone);
Thread.Sleep(100);
bestdood = GetBestNearestdood(Gzone);
}
}
else if (skills[1].name == Sprio)
{
while (skills[1].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
{
CollectItemsInZone(bestdood.name, skills[1].desc, Gzone);
Thread.Sleep(100);
bestdood = GetBestNearestdood(Gzone);
}
}
else if (skills[2].name == Sprio)
{
while (skills[2].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
{
CollectItemsInZone(bestdood.name, skills[2].desc, Gzone);
Thread.Sleep(100);
bestdood = GetBestNearestdood(Gzone);
}
}
}
else if (Scount == 2)
{
if (skills[0].name == Sprio)
{
while (skills[0].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
{
CollectItemsInZone(bestdood.name, skills[0].desc, Gzone);
Thread.Sleep(100);
bestdood = GetBestNearestdood(Gzone);
}
}
else if (skills[1].name == Sprio)
{
while (skills[1].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
{
CollectItemsInZone(bestdood.name, skills[1].desc, Gzone);
Thread.Sleep(100);
bestdood = GetBestNearestdood(Gzone);
}
}
}

else if (Scount == 1)
{
if (skills[0].name == Sprio)
{
while (skills[0].name == Sprio && bestdood != null && GetGroupStatus("Gather"))
{
CollectItemsInZone(bestdood.name, skills[0].desc, Gzone);
Thread.Sleep(100);
bestdood = GetBestNearestdood(Gzone);
}
}
}
}
else if (GetGroupStatus("Plant"))
{
while (GetGroupStatus("Plant"))
{
bestdood = GetBestNearestdood(Gzone);
if (bestdood != null)
{
break;
}
PlantItemsInZone(seedchoice, Pzone);
Thread.Sleep(10);
if (bestdood == null && AFKcount == 200)
{
Jump(true);
Thread.Sleep(10);
Jump(false);
AFKcount = 0;
}
AFKcount = AFKcount + 1;
Thread.Sleep(10);
}
}
Thread.Sleep(50);

if (bestdood == null && AFKcount == 200)
{
Jump(true);
Thread.Sleep(10);
Jump(false);
AFKcount = 0;
}
AFKcount = AFKcount + 1;
}
}
}
}


ArcheBuddy.Bot.Classes.DoodadObject.getUseSkills()
at WorldFarmer.WorldFarmer.GetBestNearestdood(Zone zone) in c:\Users\Gabriel\Downloads\Plugins\world farmer\farm.cs:line 71
at WorldFarmer.WorldFarmer.PluginRun() in c:\Users\Gabriel\Downloads\Plugins\world farmer\farm.cs:line 148

Other problem is that it wont farm if i get disconected, after i reconect.
 
Last edited:
Is there a fixed amount of seed it places? It feels like it only sets down 50 or so seeds and goes afk.
 
Biocide,

First tks for your plugin! Excellent work!

Can you point me out the code that I have to edit to change the pattern of the zone from circular to square? Cuz, the perfect circular "looks like a bot work" and not a "human work" lol. I believe that the square area will look more a design pattern that a human can easily do.
 
can this plugin support multiple plants + animals? So far i'm only using it for JUST RICE but i want to incorporate hens, chicken, goats, dogs, cats, cows, and humans.
 
I have a problem with goose down.

public string SkillPrio1 = "Feed";
public string SkillPrio2 = "Gather Goose Down from Goose";
public string SkillPrio3 = "Gather";

Even by setting "Gather Goose Down from Goose" as SkillPrio1 it just does nothing. Any suggestions?
 
Back
Top