v1.0.0.1
Changes are in orange.
Credits
Skill names gotten from https://www.thebuddyforum.com/arche...plugins/other/178590-auto-trophy-fishing.html
Changelog
v1.0.0.1
Fixed: Bot stops working when fish goes under ship and a "invalid target direction" message is displayed.
Use link in signature for compiled version.
Changes are in orange.
Code:
using ArcheBuddy.Bot.Classes;
using System;
using System.Collections.Generic;
using System.Threading;
namespace Sport_Fisher {
public class Main : Core {
public static string GetPluginAuthor() {
return "CoalCloud";
}
public static string GetPluginVersion() {
[COLOR="#FF8C00"] return "1.0.0.1";
[/COLOR] }
public static string GetPluginDescription() {
return "Sport Fisher";
}
[COLOR="#FF8C00"]bool done;[/COLOR]
public void PluginRun() {
ClearLogs();
Log(String.Format("~~ Plug-in start: {0}, {1}", GetPluginDescription(), GetPluginVersion()));
Dictionary<string, string> actions = new Dictionary<string, string>() {
{"Moving to the Left", "Stand Firm Left"},
{"Moving to the Right", "Stand Firm Right"},
{"Escape", "Give Slack"},
{"Move to the Bottom", "Reel In"},
{"Leap", "Big Reel In"}
};
string prevSkill = null;
while (true) {
if (me.target == null || me.target.target != me || getBuff(me.target, "Strength Contest") == null)
Thread.Sleep(100);
else {
string skillToUse = null;
foreach (Buff b in me.target.getBuffs()) {
if (actions.ContainsKey(b.name)) {
skillToUse = actions[b.name];
break;
}
}
if (skillToUse == null) {
CancelSkill();
} else {
if (!isCasting() || prevSkill != skillToUse) {
CancelSkill();
TurnDirectly();
[COLOR="#FF8C00"]done = false;[/COLOR]
new Thread(() => UseSkill(skillToUse)).Start();
[COLOR="#FF8C00"] while (!isCasting() && !done) ;
[/COLOR]
[COLOR="#FF8C00"]if (isCasting())[/COLOR]
prevSkill = skillToUse;
}
}
}
}
}
public void PluginStop() {
Log("~~ Plug-in stop.");
}
private void UseSkill(string skillToUse) {
[COLOR="#FF8C00"] if (!UseSkill(skillToUse, true))
done = true;[/COLOR]
}
}
}
Credits
Skill names gotten from https://www.thebuddyforum.com/arche...plugins/other/178590-auto-trophy-fishing.html
Changelog
v1.0.0.1
Fixed: Bot stops working when fish goes under ship and a "invalid target direction" message is displayed.
Use link in signature for compiled version.
Last edited: