Code:
using System;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using ArcheBuddy.Bot.Classes;
namespace ScarecrowAlternative {
public class ScarecrowAlternativeX : Core {
public void PluginRun() {
InitItemsList();
// SetPlantAlgoritm(PlantAlgoritm.Randomized;
SetPlantAlgoritm(PlantAlgoritm.MaxPerfomance);
// Activate an infinite loop (true: activate, false: desactivate)
bool UseLoop = false;
// How long to wait after each loop in MS (milliseconds)
int LoopTime = 3600000;
// Create one or multiple group of farm
// Just replace the "11111" with your Farm ID
// Use the Scarecrow plugin to quickly find your Farm ID
// Example:
List<uint> FarmGroup1 = new List<uint>();
FarmGroup1.Add(15480);
FarmGroup1.Add(15479);
FarmGroup1.Add(15482);
FarmGroup1.Add(15397);
FarmGroup1.Add(15471);
List<uint> FarmGroup2 = new List<uint>();
FarmGroup2.Add(15478);
FarmGroup2.Add(15481);
FarmGroup2.Add(15474);
FarmGroup2.Add(15473);
FarmGroup2.Add(15472);
// Create one or multiple group of item to collect/plant
// Just enter the name of the item that are added at the bottom of this file
// Take notice that you can't mix Plant/Tree with Animals so use seperate group.
// Also, the first item you add will be the first item that will get processed.
// Example:
List<object> ItemGroup1 = new List<object>();
ItemGroup1.Add(Orange Coral);
ItemGroup1.Add(Pearl);
List<object> ItemGroup2 = new List<object>();
ItemGroup2.Add(Yellow Coral);
ItemGroup2.Add(Pearl);
bool StopLoop = false;
while (!StopLoop) {
// This is where you set which item to collect using which Farm Group and Item Group
// Use CollectItems for Plants/Tree and CollectAnimals for Animals
// Example:
CollectItems(FarmGroup1, ItemGroup1);
PlantItems(FarmGroup1, ItemGroup1);
CollectItems(FarmGroup2, ItemGroup2);
PlantItems(FarmGroup2, ItemGroup2);
// CollectAnimals(FarmGroup2, ItemGroup2);
if (UseLoop) {
Thread.Sleep(LoopTime);
} else {
StopLoop = true;
}
}
}
// If you want to add new item to gather/plant first create a new List<string> here
// Example if you want to add Aspen you would add this line:
// public List<string> Aspen = new List<string>();
// Then you would add to Aspen the corresponding string in the next block.
public List<string> CoralOrange = new List<string>();
public List<string> CoralYellow = new List<string>();
public List<string> Pearl = new List<string>();
// This is where you add the string to a specific item
// Example for Aspen:
// Aspen.Add("Aspen Tree"); (that's the name of the fully mature item)
// Aspen.Add("Logging: Spend up to 20 Labor to chop down a tree."); (that's the action required to use the fully mature item)
// Aspen.Add("Aspen Sapling") (that's the name of item that is used to plant it)
// Aspen.Add("Standart") (that's the motion type you want to use for this item)
//
// For animal it's a bit different but you should be able to figure it out by following how I did it for Sheep and Hen
public void InitItemsList() {
// Saplings
CoralOrange.Add("Orange Coral");
CoralOrange.Add("Gathering: Spend up to 3 Labor to gather materials underwater.");
CoralOrange.Add("Orange Plate Coral Polyp");
CoralOrange.Add("SnakeFromBorder");
CoralYellow.Add("Yellow Coral");
CoralYellow.Add("Gathering: Spend up to 3 Labor to gather materials underwater.");
CoralYellow.Add("Orange Plate Coral Polyp");
CoralYellow.Add("SnakeFromBorder");
Pearl.Add("Pearl");
Pearl.Add("Gathering: Spend up to 3 Labor to gather materials underwater.");
Pearl.Add("Pearl Oyster");
Pearl.Add("Standart");
}
public void CollectItems(List<uint> Scarecrow, List<object> Items) {
foreach (uint f in Scarecrow) {
Log("Farm ID: " + f);
foreach (List<string> s in Items) {
Log("-> Collect " + s[0]);
CollectItemsAtFarm(s[0], s[1], f);
}
}
}
public void CollectAnimals(List<uint> Scarecrow, List<object> Items) {
foreach (uint f in Scarecrow) {
Log("Farm ID: " + f);
foreach (List<object> o in Items) {
foreach(List<string> s in o) {
Log("-> Collect " + s[0]);
CollectItemsAtFarm(s[0], s[1], f);
}
}
}
}
public void PlantItems(List<uint> Scarecrow, List<object> Items) {
foreach (uint f in Scarecrow) {
Log("Farm ID: " + f);
foreach (List<string> s in Items) {
if (s[3] == "SnakeFromBorder") {
SetPlantMotionType(PlantMotionType.SnakeFromBorder);
} else if (s[3] == "Standart"){
SetPlantMotionType(PlantMotionType.Standart);
}
Log("-> Plant " + s[2]);
PlantItemsAtFarm(s[2], f);
}
}
}
}
}
I tried using the "Alternative Scarecrow" for my needs, but it looks like the code is outdated, I try adding my own changes but I keep getting errors like:
Code:
3:37:39 PM: c:\Users\x\Desktop\TrueGather.cs(46,73) : error CS1026: ) expected
3:37:39 PM: c:\Users\x\Desktop\TrueGather.cs(46,75) : error CS1002: ; expected
3:37:39 PM: c:\Users\x\Desktop\TrueGather.cs(46,75) : error CS1525: Invalid expression term ')'
3:37:39 PM: c:\Users\x\Desktop\TrueGather.cs(50,36) : error CS1026: ) expected
3:37:39 PM: c:\Users\x\Desktop\TrueGather.cs(50,41) : error CS1002: ; expected
3:37:39 PM: c:\Users\x\Desktop\TrueGather.cs(50,41) : error CS1525: Invalid expression term ')'
3:37:39 PM: c:\Users\x\Desktop\gathering\TrueGather.cs(46,35) : error CS1026: ) expected
3:37:39 PM: c:\Users\x\Desktop\gathering\TrueGather.cs(46,40) : error CS1002: ; expected
3:37:39 PM: c:\Users\x\Desktop\gathering\TrueGather.cs(46,40) : error CS1525: Invalid expression term ')'
3:37:39 PM: c:\Users\x\Desktop\gathering\TrueGather.cs(50,35) : error CS1026: ) expected
3:37:39 PM: c:\Users\x\Desktop\gathering\TrueGather.cs(50,40) : error CS1002: ; expected
3:37:39 PM: c:\Users\x\Desktop\gathering\TrueGather.cs(50,40) : error CS1525: Invalid expression term ')'
can someone help me out please? thanks.