No error from that code Out. It just runs the code it skips the collecting part of the code and it only plants. This is the code I am using. The plant items at farm works great it always plants with no problem but since the last update you gave us yesterday the collecting stopped working altogether. It won't collect at all. It just skips the code like its not even there.
public void PluginRun() {
while (true) {
//get Labor points
int labor = me.laborPoints;
//if Labor > 1000
if (labor > 2000) {
//get starting count of seed
var barleystart = itemCount("Azalea");
//Plant farm 1
CollectItemsAtFarm("Azalea", "Gathering: Spend 1 Labor to gather materials.", "JoeBobJr");
if (!CollectItemsAtFarm("Azalea", "Gathering: Spend 1 Labor to gather materials.", "JoeBobJr"))
Log(GetLastError().ToString());
PlantItemsAtFarm("Azalea Seed", 24674);
//get ending count of seed
var barleyend = itemCount("Azalea");
//get seed used and show in log
var used = barleystart - barleyend;
Log(barleyend + " Azalea");
//if Labor < 1000 wait
} else {
PlantItemsAtFarm("Azalea Seed", 25066);
Log("Labor under 2000, waiting to regen");
}
//Jump once
//Jump(true);
//Log("JUMP! JUMP!");
UpdateNoAfkState();
Turn(0.05, true);
Thread.Sleep(200);
//Jump(false);
//Generate random time between 4-5 minutes
Random random = new Random();
var mseconds = random.Next(24, 107) * 1000;
var seconds = mseconds / 1000;
Log("Waiting for " + seconds.ToString() + " seconds");
//sleep for random time
Thread.Sleep(mseconds);
}
}