Defectuous
New Member
- Joined
- Dec 17, 2014
- Messages
- 238
- Reaction score
- 1
[Plugin Name]
FarmMonkey: Continuous Multi Farm Harvest & Planting Plugin
[Description]
A farm plugin capable of continuous farming over multiple farms.
[Special Thanks]
Voyager92 - For a really Epic Non-Stop Farm/Gathering Base from which I am building this on
imapedarsag - For helping in the current and future development assistance of the code.
[Future Additions ( Plus Notes)]
# Planting Timers ( doodads are messing with my mind )
# Mail Support ( Currently Working in Development, release soon )
# Seed Vendor Support ( Currently Working in Development, release soon )
# Door Support ( Currently Working in Development, release soon )
# Crop Rotation ( rotate seeds on farms )
# Multi Character Support ( Log out and farm on another toon on that account )
# Chest Storage Support ( Waiting on the api )
# Gui Support ( windows forms are my greatest enemy at this time )
[Completed Additions]
# Gps Support - Safe Spot, Death Run & Farm Locations
[Known Issues]
# Seed Count does not update per farm, just at the start of planting
# Ran into a issue with a Mansion where it will stop gathering and plant after two rows. Need to sort out why.
[Instructions]
# Start Scarecrow & Get the Farm ID(s)
# Place the Farm ID's in the
uint[] _farms = { 12345, 54321 }; // Gather Farm ID's wtih scarecrow { 12345, 54321 }
# Add Seed Name
string _seed = "Aloe Seed"; // Seeds to plant
# Add Final Plant Name
string _plant = "Aloe"; // Make sure plant ends up Mature or just the plant name
# Make surey ou have the rather gather command ( on any plant needing more than 1 labor it should be " up to 2,3"
string _gather = "Gathering: Spend 1 Labor to gather materials.";
string _harvest = "Farming: Spend 1 Labor to harvest crops.";
# Compile the Code and start the Plugin.
[Stable Release Source Version 1.1.9.4(.5)]
[HIDE]
[/HIDE]
[Plugins That Make This Plugin Better]
Move While Planting - Set both config options to 2 and you look very human to the casual eye
[Cost = FREE]
I have been asked by several people in game that use this. Why I don't charge for this and I have told them that it will NEVER happen. My hope is to get this to a point where I feel it ready to be added to the store as a FREE item and will always be FREE.
FarmMonkey: Continuous Multi Farm Harvest & Planting Plugin
[Description]
A farm plugin capable of continuous farming over multiple farms.
[Special Thanks]
Voyager92 - For a really Epic Non-Stop Farm/Gathering Base from which I am building this on
imapedarsag - For helping in the current and future development assistance of the code.
[Future Additions ( Plus Notes)]
# Planting Timers ( doodads are messing with my mind )
# Mail Support ( Currently Working in Development, release soon )
# Seed Vendor Support ( Currently Working in Development, release soon )
# Door Support ( Currently Working in Development, release soon )
# Crop Rotation ( rotate seeds on farms )
# Multi Character Support ( Log out and farm on another toon on that account )
# Chest Storage Support ( Waiting on the api )
# Gui Support ( windows forms are my greatest enemy at this time )
[Completed Additions]
# Gps Support - Safe Spot, Death Run & Farm Locations
[Known Issues]
# Seed Count does not update per farm, just at the start of planting
# Ran into a issue with a Mansion where it will stop gathering and plant after two rows. Need to sort out why.
[Instructions]
# Start Scarecrow & Get the Farm ID(s)
# Place the Farm ID's in the
uint[] _farms = { 12345, 54321 }; // Gather Farm ID's wtih scarecrow { 12345, 54321 }
# Add Seed Name
string _seed = "Aloe Seed"; // Seeds to plant
# Add Final Plant Name
string _plant = "Aloe"; // Make sure plant ends up Mature or just the plant name
# Make surey ou have the rather gather command ( on any plant needing more than 1 labor it should be " up to 2,3"
string _gather = "Gathering: Spend 1 Labor to gather materials.";
string _harvest = "Farming: Spend 1 Labor to harvest crops.";
# Compile the Code and start the Plugin.
[Stable Release Source Version 1.1.9.4(.5)]
[HIDE]
Code:
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;
//
// Special Thanks to Voyager92 for a really Epic Non-Stop Farm/Gathering Base from which I am building this on.
// Thread: [Plugin] Non-Stop Farm/Gathering for multiple toons/farms and with restart support
//
namespace ArcheAgeFarmMonkey
{
public class FarmMonkey : Core
{
public static string GetPluginAuthor()
{ return "Defectuous"; }
public static string GetPluginVersion()
{ return "1.1.9.4.5"; }
public static string GetPluginDescription()
{ return "FarmMonkey: Continuous Multi Farm Harvest & Planting Plugin"; }
// START Universal Config
uint[] _farms = { 12345, 54321 }; // Gather Farm ID's wtih scarecrow { 12345, 54321 }
int _minlabor = 20; // Minimum Labor for harvesting.
string _seed = "Azalea Seed";
string _plant = "Azalea"; // Make sure plant ends up Mature or not.
// Note: You may need to update the Amount of labor needed for Gathering & Harvesting.
string _gather = "Gathering: Spend 1 Labor to gather materials.";
string _harvest = "Farming: Spend 1 Labor to harvest crops.";
// This gps file needs 2 points " Safe " & " Farm "
string _gpsfile = "\\plugins\\FarmMonkey\\file.db3";
// Set to true if you have a gps file for moving to and from the safe.
private bool _enablegps = false;
// Set to true if your gps file has paths from the Nui ( generally not necessary in safe zone farming )
private bool _deathcheck = false;
// END Universal Config
// ( Do Not Edit anything past this line unless you are confident you know what your doing )
// Universal Application Information
private Gps gps;
Random random = new Random();
//Call on plugin start
public void PluginRun()
{
ClearLogs();
Log(Time() + "FarmMonkey: Plugin Started");
while (true) {
if (gameState == GameState.Ingame){
Log(Time() + "Time to Farm");
// Death Check ( Am i really dead ? )
if ( _enablegps == true && _deathcheck == true && !me.isAlive()){
Log(Time() + "[ WARNING: We have died, there must be a reason for this check into that would you ]");
// Res timer is Buggy due to continued deaths raises the time
Log(Time() + "INFO: Waiting 18 Seconds to resurection");
Thread.Sleep(18000);
Log(Time() + "INFO: Time to Ressurect");
ResToRespoint();
while (!me.isAlive()){
Log(Time() + "INFO: Crap Your Still Dead. Waiting 10 seconds and trying again.");
Log(Time() + "INFO: Also Check your Res Timer & note how long.");
Thread.Sleep(10000);
ResToRespoint();
}
Log(Time() + "INFO: Thread Waiting 120 Seconds (2 Minutes) In case of long load times.");
Thread.Sleep(120000);
DeathRun();
}
// Lets get back to the Farms
if ( _enablegps == true && me.isAlive()){ MoveToFarm(); }
// Time to Harvest plants
Harvesting();
// Lets fill that field with seeds
Planting();
// Time to head back to the safe spot
if ( _enablegps == true){ MoveToSafe(); }
// Temporary Sleep to prevent to many checks
var mseconds = random.Next(240, 300) * 1000;
var seconds = mseconds / 1000;
Log(Time() + "Waiting " + seconds.ToString() + " seconds to check seeds");
Thread.Sleep(mseconds);
}
}
}
// Moving Routines
public void MoveToFarm()
{
gps = new Gps(this);
gps.LoadDataBase(Application.StartupPath + _gpsfile);
gps.GpsMove("Farm");
}
public void MoveToSafe()
{
gps = new Gps(this);
gps.LoadDataBase(Application.StartupPath + _gpsfile);
gps.GpsMove("Safe");
}
public void DeathRun()
{
gps = new Gps(this);
gps.LoadDataBase(Application.StartupPath + _gpsfile);
Log("Lets Get Moving");
gps.GpsMove("Safe");
}
// Farming Routines
public void Harvesting()
{
var _labor = me.laborPoints;
if (_labor > _minlabor){
Log("Current Labor:" + _labor);
foreach (uint farm in _farms){
Log(Time() + "Harvesting " + _plant + "(s) on FarmID: " + farm);
CollectItemsAtFarm(_plant, _gather, farm);
CollectItemsAtFarm(_plant, _harvest, farm);
}
}
}
public void Planting()
{
var seedcount = itemCount(_seed);
if ( seedcount == 0){
Log(Time() + "Seed Count:" + seedcount + _seed);
Log(Time() + "You have no seeds!");
} else{
foreach (uint farm in _farms)
{
Log(Time() + "Seed Count: " + seedcount + _seed);
Log(Time() + "Planting" + _seed + "(s) on FarmID: " + farm);
PlantItemsAtFarm(_seed, farm);
}
}
}
// Utility Stuff
public string Time()
{
string A = DateTime.Now.ToString("[hh:mm:ss] ");
return A;
}
//Call on plugin stop
public void PluginStop()
{
}
}
}
Code:
Revision 1.1.9.4.5
Fixed Death Run Issue ( Compiles Successfully this time round )
Revision: 1.1.9.4
gps features functional, but they have been disabled by default
Safe & Farm Locations supported in GPS
Death Check & Walk: Checks if your dead and resurrects you
Revision: 1.0.0.0
Inital Functional Release
[Plugins That Make This Plugin Better]
Move While Planting - Set both config options to 2 and you look very human to the casual eye
[Cost = FREE]
I have been asked by several people in game that use this. Why I don't charge for this and I have told them that it will NEVER happen. My hope is to get this to a point where I feel it ready to be added to the store as a FREE item and will always be FREE.
Last edited: