Gather water
Gathers water from a well continuously.
As requested at https://www.thebuddyforum.com/arche...d-discussions/186588-auto-water-gatherer.html
Gathers water from a well continuously.
As requested at https://www.thebuddyforum.com/arche...d-discussions/186588-auto-water-gatherer.html
Code:
using ArcheBuddy.Bot.Classes;
using System;
using System.Collections.Generic;
using System.Linq;
namespace Gather_Water {
public class Main : Core {
public static string GetPluginAuthor() {
return "CoalCloud";
}
public static string GetPluginVersion() {
return "1.0.0.0";
}
public static string GetPluginDescription() {
return "Gather Water";
}
public void PluginRun() {
ClearLogs();
Log(String.Format("~~ Plug-in start: {0}, {1}", GetPluginDescription(), GetPluginVersion()));
while (true) {
DoodadObject well = getDoodads().FirstOrDefault(x => x.dist(me) <= 5d && x.name == "Well");
if (well == null)
return;
while (me.isCasting || me.isGlobalCooldown) ;
List<Skill> sList;
while ((sList = well.getUseSkills()).Count == 0) ;
UseDoodadSkill(sList[0].id, well, true);
}
}
public void PluginStop() {
Log("~~ Plug-in stop.");
}
}
}