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

[PLUGIN] World Farmer - An Open world farm plugin

umm the widget actually lost the plant button and the farm button actually plants...
 
works great solo havent tried with someone elses stuff in range. both plant and gather.
 
umm the widget actually lost the plant button and the farm button actually plants...

Yea i made it that way. Farm button starts the plugin then it will keep farming/planting. The plant button caused confusion for some people.
Should i add the plant button again?

lm at work at the moment. Will work on the plugin later today. Any feedback is welcomed.
 
Yea i made it that way. Farm button starts the plugin then it will keep farming/planting. The plant button caused confusion for some people.
Should i add the plant button again?

lm at work at the moment. Will work on the plugin later today. Any feedback is welcomed.


i think the plant button is a good idea because if i run into someone elses farm i can loot their stuff but does this just work on planted items under your name or works for everyone elses too? also there should be an option where it switches the commands for each planted thing. etc drop down menu - azalea - potato - saplings etc
 
i think the plant button is a good idea because if i run into someone elses farm i can loot their stuff but does this just work on planted items under your name or works for everyone elses too? also there should be an option where it switches the commands for each planted thing. etc drop down menu - azalea - potato - saplings etc

I will add a plant button again then.
As it is now you only need to say what seed you want to plant and then it recognize what skill that needs to be used to gather that plant.
For saplings and animals its another thing, it can have 2 or 3 skills at the same time and I want this to be fully automated. As it is now it uses the first skill available for that doodad. If its a turkey I guess it will feed it and butcher it since the feed button will be skill nr1 and when feed the butcher skill will be skill nr 1. Here I want to add "Use skill" checkboxes to decide what skills to use. I just need to figure out how to code it in a smart way ;)
If anyone with coding experience want to help please pm me.
 
Not works for me... it's possible to send me the .Dll ?

Don't this code work?

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 YourNamespace
{
    public class YourClass : Core
    {
        public static string GetPluginAuthor()
        {
            return "Biocide";
        }
        public static string GetPluginVersion()
        {
            return "0.4";
        }
        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 = "Azalea Seed";
        public int Garea = 25; // size of Gathering area
        public int Parea = 6;  // size of planting area

//---------------DONT CHANGE ANYTHING BELOW THIS LINE---------------------------------------------


     public uint skill;
     public int gtime;   
     public string descr;
     public string name;  
            
        public DoodadObject GetBestNearestdood(Zone zone)
        {
            DoodadObject dood = null;
            double dist       = 999999;            
            foreach (var Obj in getDoodads())
            {      
                //If there is any Doodads that we looking for in this zone
                if (Obj.uniqOwnerId == me.uniqId)
                {
                    if (Obj.growthTime < 1)
                    {                                                         
                        dood  = Obj;
                        dist  = me.dist(Obj);
                        gtime = Obj.growthTime;
                    }
                 }
              }          
            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("Farm", false); //Add checkbox to our character widget     
            while (true)
            {  
                if (GetGroupStatus("Farm"))
                {               
                    DoodadObject bestdood = null;
                    bestdood              = GetBestNearestdood(Gzone);
                    if (bestdood != null)
                    {
                        while (GetGroupStatus("Farm") && bestdood != null)
                        {
                            var skills = bestdood.getUseSkills();
                            if (skills.Count > 0)
                            {
                                skill = skills[0].id;
                                descr = skills[0].desc;
                                name  = skills[0].name;
                                CollectItemsInZone(bestdood.name, skill, Gzone);
                                bestdood              = GetBestNearestdood(Gzone);
                                }
                            Thread.Sleep(50);
                            }
                        Thread.Sleep(50);
                        }
                    PlantItemsInZone(seedchoice, Pzone);
                    Thread.Sleep(50);
                    }              
                Thread.Sleep(50);
            }
            Thread.Sleep(50);
        }        
    }
}
 
It did gather, couldn't test for planting 'cause of ban wave.
 
Don't this code work?

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 YourNamespace
{
    public class YourClass : Core
    {
        public static string GetPluginAuthor()
        {
            return "Biocide";
        }
        public static string GetPluginVersion()
        {
            return "0.4";
        }
        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 = "Azalea Seed";
        public int Garea = 25; // size of Gathering area
        public int Parea = 6;  // size of planting area

//---------------DONT CHANGE ANYTHING BELOW THIS LINE---------------------------------------------


     public uint skill;
     public int gtime;   
     public string descr;
     public string name;  
            
        public DoodadObject GetBestNearestdood(Zone zone)
        {
            DoodadObject dood = null;
            double dist       = 999999;            
            foreach (var Obj in getDoodads())
            {      
                //If there is any Doodads that we looking for in this zone
                if (Obj.uniqOwnerId == me.uniqId)
                {
                    if (Obj.growthTime < 1)
                    {                                                         
                        dood  = Obj;
                        dist  = me.dist(Obj);
                        gtime = Obj.growthTime;
                    }
                 }
              }          
            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("Farm", false); //Add checkbox to our character widget     
            while (true)
            {  
                if (GetGroupStatus("Farm"))
                {               
                    DoodadObject bestdood = null;
                    bestdood              = GetBestNearestdood(Gzone);
                    if (bestdood != null)
                    {
                        while (GetGroupStatus("Farm") && bestdood != null)
                        {
                            var skills = bestdood.getUseSkills();
                            if (skills.Count > 0)
                            {
                                skill = skills[0].id;
                                descr = skills[0].desc;
                                name  = skills[0].name;
                                CollectItemsInZone(bestdood.name, skill, Gzone);
                                bestdood              = GetBestNearestdood(Gzone);
                                }
                            Thread.Sleep(50);
                            }
                        Thread.Sleep(50);
                        }
                    PlantItemsInZone(seedchoice, Pzone);
                    Thread.Sleep(50);
                    }              
                Thread.Sleep(50);
            }
            Thread.Sleep(50);
        }        
    }
}

No doesn't : C:\Users\Benoit\Desktop\naab\Plugins\World Farmer\World Farmer.dllUnknown executing error, or plugin was forcibly unloaded
 
This one worked perfectly for me for different seeds:
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 YourNamespace
{
    public class YourClass : Core
    {
        public static string GetPluginAuthor()
        {
            return "Biocide";
        }
        public static string GetPluginVersion()
        {
            return "0.4";
        }
        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 = "Pumkpin Seed";
     //public string seedchoice = "Clover Seed Bundle";
     
     public int Garea = 24; // size of Gathering area
     public int Parea = 3;  // size of planting area

    //---------------DONT CHANGE ANYTHING BELOW THIS LINE---------------------------------------------


     public uint skill;
     public int gtime;   
     public string descr;
     public string name;  
            
        public DoodadObject GetBestNearestdood(Zone zone)
        {
            DoodadObject dood = null;
            double dist       = 999999;            
            foreach (var Obj in getDoodads())
            {      
                //If there is any Doodads that we looking for in this zone
                if (Obj.uniqOwnerId == me.uniqId)
                {
                    if (Obj.growthTime < 1)
                    {                                                         
                        dood  = Obj;
                        dist  = me.dist(Obj);
                        gtime = Obj.growthTime;
                    }
                 }
              }          
            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("Farm", false); //Add checkbox to our character widget     
            while (true)
            {  
                if (GetGroupStatus("Farm"))
                {               
                    DoodadObject bestdood = null;
                    bestdood              = GetBestNearestdood(Gzone);
                    if (bestdood != null)
                    {
                        while (GetGroupStatus("Farm") && bestdood != null)
                        {
                            var skills = bestdood.getUseSkills();
                            if (skills.Count > 0)
                            {
                                skill = skills[0].id;
                                descr = skills[0].desc;
                                name  = skills[0].name;
                                CollectItemsInZone(bestdood.name, skill, Gzone);
                                bestdood              = GetBestNearestdood(Gzone);
                                }
                            Thread.Sleep(50);
                            }
                        Thread.Sleep(50);
                        }
                    PlantItemsInZone(seedchoice, Pzone);
                    Thread.Sleep(50);
                    }              
                Thread.Sleep(50);
            }
            Thread.Sleep(50);
        }        
    }
}
 
Ok here is a new test version 0.5 whit Skill prioritization.
I'm out of labor points and have only been able to test it with Vita Roots but there where no problems then.
If anyone could set it up and test it for fruit or animals I would appreciate any information about if the skill prioritization works as intended.
And by the way the Plant checkbox is back.

The skill to put in to the skillprio1, 2 and 3 is the skill names to use, if you start gather a plant you can se the skill name on the "channel" bar

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 = "Azalea 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"                     //
        //    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
        // "Gather Eggs from Livestock" = Gather Eggs from Hens
        // "Harvest"
        // "Find Fruit" = Cherry Trees, Appel Trees
        // "Feed" = Feed animals
        // "Water Plants" = Water plants
        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 DoodadObject GetBestNearestdood(Zone zone)
        {
            DoodadObject dood = null;
            foreach (var Obj in getDoodads())
            {
                var skills = Obj.getUseSkills();
                if (Obj.uniqOwnerId == me.uniqId && skills.Count > 0)
                {
                    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(50);
                        
                    }
                }
                Thread.Sleep(50);
            }
        }
    }
}
 
Last edited:
Ok here is a new test version 0.5 whit Skill prioritization.
I'm out of labor points and have only been able to test it with Vita Roots but there where no problems then.
If anyone could set it up and test it for fruit or animals I would appreciate any information about if the skill prioritization works as intended.
And by the way the Plant checkbox is back.

The skill to put in to the skillprio1, 2 and 3 is the skill names to use, if you start gather a plant you can se the skill name on the "channel" bar

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 = "Azalea 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 = LOGGING                           //
        //    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
        // "Gather Eggs from Livestock" = Gather Eggs from Hens
        // "Harvest"
        // "Find Fruit" = Cherry Trees, Appel Trees
        // "Feed" = Feed animals
        // "Water Plants" = Water plants
        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 DoodadObject GetBestNearestdood(Zone zone)
        {
            DoodadObject dood = null;
            foreach (var Obj in getDoodads())
            {
                var skills = Obj.getUseSkills();
                if (Obj.uniqOwnerId == me.uniqId && skills.Count > 0)
                {
                    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(50);
                        
                    }
                }
                Thread.Sleep(50);
            }
        }
    }
}
For me this version doesn't do anything.
 
For me this version doesn't do anything.
Strange.
Did you chose seed:
public string seedchoice = "Azalea Seed";

And matched the seed with skill:
public string SkillPrio1 = "Gather";
public string SkillPrio2 = "Harvest";
public string SkillPrio3 = "Find Fruit";

And clicked the checkboxes "Gather" and "Plant" in the widget
 
Strange.
Did you chose seed:
public string seedchoice = "Azalea Seed";

And matched the seed with skill:
public string SkillPrio1 = "Gather";
public string SkillPrio2 = "Harvest";
public string SkillPrio3 = "Find Fruit";

And clicked the checkboxes "Gather" and "Plant" in the widget
I did choose "Mushroom Spore", "Gather" and "Plant" are automatically checked.

Right now it does plant but take around 5 min to start planting.
I've planted all fruited trees to try the skill priority.
 
I did choose "Mushroom Spore", "Gather" and "Plant" are automatically checked.

Right now it does plant but take around 5 min to start planting.
I've planted all fruited trees to try the skill priority.

If you have many plants/trees/structures around you it can take some time since it will check them all to se if they fit your settings.
Let me know how the skill priority works.

Remember you Need to set Find fruit in your settings and no Chop tree, if you don't want to cut them down.
 
Each time it uses "Gather" on a tree it crashes:
Code:
01:01:41: Script [D:\ArcheBuddy\Plugins\WorldFarmer\WorldFarmer.dll] run error:
01:01:41: Error: Object  '/00ff327d_e9ef_4fde_900e_c0173bef945f/xxufqj9ejnbd4dfycwb2cbgo_4043.rem' has been disconnected or does not exist on the server.

Does only happen on trees, not crops or plants.
My fruit trees are still growing so I'll test "Find Fruit" tomorrow.

The code I used:
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 = "Azalea 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 = LOGGING                           //
        //    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
        public string SkillPrio1 = "Gather";
        public string SkillPrio2 = "Harvest";
        public string SkillPrio3 = "Find Fruit";
        
        
        public int Garea = 15; // 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 DoodadObject GetBestNearestdood(Zone zone)
        {
            DoodadObject dood = null;
            foreach (var Obj in getDoodads())
            {
                var skills = Obj.getUseSkills();
                if (Obj.uniqOwnerId == me.uniqId && skills.Count > 0)
                {
                    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(50);
                        
                    }
                }
                Thread.Sleep(50);
            }
        }
    }
}


EDIT:
This happens while planting:
Code:
02:01:44: Script [D:\ArcheBuddy\Plugins\WorldFarmer\WorldFarmer.dll] run error:
02:01:44: Error: Object '/00ff327d_e9ef_4fde_900e_c0173bef945f/nngstthsx44gda44zuamxfmp_8897.rem' has been disconnected or does not exist on the server.
02:01:44: Stack trace:    to ArcheBuddy.Bot.Classes.DoodadObject.getUseSkills()
   à WorldFarmer.WorldFarmer.GetBestNearestdood(Zone zone) dans d:\ArcheBuddy\Plugins\WorldFarmer\WorldFarmer.cs:ligne 70
   à WorldFarmer.WorldFarmer.PluginRun() dans d:\ArcheBuddy\Plugins\WorldFarmer\WorldFarmer.cs:ligne 214

Maybe it has something to do with a scarecrow being near, I'll test on a safe spot.
 
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()
 
Each time it uses "Gather" on a tree it crashes:
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 :)
 
Back
Top