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

Farm/Gather

xact

New Member
Joined
Jan 12, 2011
Messages
13
Reaction score
0
Hi all,

Just purchased a 3 day trial and figured I'd try get something together to farm barley on my 2 plots. The code includes anti afk (jump every 4-5 minutes after routine complete), holds off planting anything until labor is > 1000 (I like to have some to play with when I get on), count of seed used, and I plan on adding a route to the seed merchant and back when I get some more free time.

Code below:
Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using ArcheBuddy.Bot.Classes;




namespace YourNamespace {
    public class YourClass: Core {
        public void PluginRun() {
            while (true) {
                //get Labor points 
                int labor = me.laborPoints;


                //if Labor > 1000
                if (labor > 1000) {
                    //get starting count of seed
                    var barleystart = itemCount("Barley Seed");
                    //Plant farm 1
                    PlantItemsAtFarm("Barley Seed", INSERTFARMIDHERE);
                    CollectItemsAtFarm("Barley", "Farming: Spend 1 Labor to harvest crops.", INSERTFARMOWNERIDHERE);
                    //Plant farm 2      
                    PlantItemsAtFarm("Barley Seed", INSERTFARMIDHERE);
                    CollectItemsAtFarm("Barley", "Farming: Spend 1 Labor to harvest crops.", INSERTFARMOWNERIDHERE);
                    //get ending count of seed
                    var barleyend = itemCount("Barley Seed");
                    //get seed used and show in log
                    var used = barleystart - barleyend;
                    Log(used + " Barley used");


                    //if Labor < 1000 wait 
                } else {
                    Log("Labor under 1000, waiting to regen");
                }


                //Jump once  
                Jump(true);
                Log("JUMP! JUMP!");
                Thread.Sleep(500);
                Jump(false);


                //Generate random time between 4-5 minutes       
                Random random = new Random();
                var mseconds = random.Next(240, 300) * 1000;
                var seconds = mseconds / 1000;
                Log("Waiting for " + seconds.ToString() + " seconds");


                //sleep for random time
                Thread.Sleep(mseconds);
            }
        }
    }
}

Thanks.
 
Nice job, looks good. Thank you for sharing the code its always nice to get ideas from seeing how other people do things.
 
Hello,

may i ask you some help to get something like this work outside of scarecrows for illegal farms? my problem is to plant items without having the "scarecrow borders"
 
Hello,

may i ask you some help to get something like this work outside of scarecrows for illegal farms? my problem is to plant items without having the "scarecrow borders"

Sorry, haven't looked into anything like this yet.

I've been having enough problems getting gps locations to work to get more seeds, opened the gps editor and the plugin and tracked the path, whenever I load it up in the new plugin I get 0 points and 0 links >.<
 
Hey,

I need some help apart from jumping the plugin doesn't work for me.
I assume INSERTFARMIDHERE mean farm name, in my case this should be farma and farmb.
And INSERTFARMOWNERIDHERE would just me by characters name.

I'v done this but for some reason i can't get it to work, also my "farma" is a farmhouse and it's settled in a pvp zone.

Anyone can help ? thx
 
Hey,

I need some help apart from jumping the plugin doesn't work for me.
I assume INSERTFARMIDHERE mean farm name, in my case this should be farma and farmb.
And INSERTFARMOWNERIDHERE would just me by characters name.

I'v done this but for some reason i can't get it to work, also my "farma" is a farmhouse and it's settled in a pvp zone.

Anyone can help ? thx
It says insert your farm ID numbers not the name.
 
Can use name as well, just needs to be in quotes. If you use the farmID don't use quotes.
 
how come it stand there and wont collect

Is the INSERTFARMIDHERE and INSERTFARMOWNERIDHERE the same? I should amend my code but these should be the same to my understanding

Also use scarecrow to check your IDs, seems server restart changes the number again.
 
Last edited:
it is the same
Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using ArcheBuddy.Bot.Classes;




namespace YourNamespace {
    public class YourClass: Core {
        public void PluginRun() {
            while (true) {
                //get Labor points 
                int labor = me.laborPoints;


                //if Labor > 1000
                if (labor > 1000) {
                    //get starting count of seed
                    var barleystart = itemCount("Iris Seed");
                    //Plant farm 1
                    PlantItemsAtFarm("Iris Seed", 24276);
                    CollectItemsAtFarm("24276", "Farming: Spend 1 Labor to harvest crops.", 24276);
                    //Plant farm 2      
                    PlantItemsAtFarm("Iris Seed", 24276);
                    CollectItemsAtFarm("iris", "Farming: Spend 1 Labor to harvest crops.", 24276);
                    //get ending count of seed
                    var barleyend = itemCount("Barley Seed");
                    //get seed used and show in log
                    var used = barleystart - barleyend;
                    Log(used + " Iris used");


                    //if Labor < 1000 wait 
                } else {
                    Log("Labor under 1000, waiting to regen");
                }


                //Jump once  
                Jump(true);
                Log("JUMP! JUMP!");
                Thread.Sleep(500);
                Jump(false);


                //Generate random time between 4-5 minutes       
                Random random = new Random();
                var mseconds = random.Next(240, 300) * 1000;
                var seconds = mseconds / 1000;
                Log("Waiting for " + seconds.ToString() + " seconds");


                //sleep for random time
                Thread.Sleep(mseconds);
            }
        }
    }
}
here is what I put
 
Last edited:
here is what I put

CollectItemsAtFarm("24276", "Farming: Spend 1 Labor to harvest crops.", 24276);
CollectItemsAtFarm("iris", "Farming: Spend 1 Labor to harvest crops.", 24276);

Should be "Iris" or whatever the finishing name for the crop is, I also believe all of this case sensitive. The "Spend x Labor to..." part needs to match the mouseover for the harvest of the final crop (mouseover the F option).

CollectItemsAtFarm("Iris", "Farming: Spend 1 Labor to harvest crops.", 24276);
 
I changed it into this PlantItemsAtFarm("Iris Seed", 19513);
CollectItemsAtFarm("Mature iris", "Farming: Spend 1 Labor to harvest crops.", 19513);
//Plant farm 2
PlantItemsAtFarm("Iris Seed", 19513);
CollectItemsAtFarm("Mature iris", "Farming: Spend 1 Labor to harvest crops.", 19513);
and it still stands there
 
still nothing. the log says this
151 Iris used
JUMP! JUMP!
Waiting for 276 seconds
151 Iris used
JUMP! JUMP!
Waiting for 267 seconds
151 Iris used
JUMP! JUMP!
Waiting for 276 seconds
151 Iris used
JUMP! JUMP!
Waiting for 242 seconds
 
If everything else is right I don't know what the issue is. Just confirm the spelling and capitalization is correct and that the ID matches your farm.

Try this:

Code:
using System;using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using ArcheBuddy.Bot.Classes;








namespace YourNamespace {
    public class YourClass: Core {
        public void PluginRun() {
            while (true) {
                //get Labor points 
                int labor = me.laborPoints;




                //if Labor > 1000
                if (labor > 1000) {
                    //get starting count of seed
                    var barleystart = itemCount("Iris Seed");
                    //Plant farm 1
                    PlantItemsAtFarm("Iris Seed", 24276);
                    CollectItemsAtFarm("Mature Iris", "Farming: Spend 1 Labor to harvest crops.", 24276);
                    
                    //get ending count of seed
                    var barleyend = itemCount("Iris Seed");
                    //get seed used and show in log
                    var used = barleystart - barleyend;
					if(used != 0)
					{
                    Log(used + " Iris used");
					}




                    //if Labor < 1000 wait 
                } else {
                    Log("Labor under 1000, waiting to regen");
                }




                //Jump once  
                Jump(true);
                Log("JUMP! JUMP!");
                Thread.Sleep(500);
                Jump(false);




                //Generate random time between 4-5 minutes       
                Random random = new Random();
                var mseconds = random.Next(240, 300) * 1000;
                var seconds = mseconds / 1000;
                Log("Waiting for " + seconds.ToString() + " seconds");




                //sleep for random time
                Thread.Sleep(mseconds);
            }
        }
    }
}
 
Last edited:
Novice Question... how do I get my farm ID? I'm using the farm name like the following... but all he does is jump!

CollectItemsAtFarm("Mature Iris", "Farming: Spend 1 Labor to harvest crops.", "Farmnamehere");
 
If you open up the Scarecrow plugin it will have the farms nearby and their ID's.
 
Back
Top