What's new
  • Visit Rebornbuddy
  • Visit Panda Profiles
  • Visit LLamamMagic
  • Visit Resources
  • Visit Downloads
  • Visit Portal

[Plugin] Sport Fisher

CoalCloud

New Member
Joined
Oct 3, 2014
Messages
61
Reaction score
0
v1.0.0.1
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:
when im trying to compile this

08:08:13: c:\Users\Lorek\Desktop\Nowy folder\Plugins\GRINDING\Rybki.cs(7,18) : error CS0101: W przestrzeni nazw „Sport_Fisher” występuje już definicja „Main”.


its mean that : sport fisher is in definition main ...
 
when im trying to compile this

08:08:13: c:\Users\Lorek\Desktop\Nowy folder\Plugins\GRINDING\Rybki.cs(7,18) : error CS0101: W przestrzeni nazw „Sport_Fisher” występuje już definicja „Main”.


its mean that : sport fisher is in definition main ...

What compiler are you using? VS or the in built one?
 
the build one ...

whitch one should i use ?
 
Last edited:
v1.0.0.1
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]
        }
    }
}
 
Last edited:
u change its only there ? or in ur signature its new also ? ... u know i cant compile this ...
 
Nice dude. Does it actually catch the fish or does it just release them?
 
can someone compile this new script ? i cant compile it with archebuddy
 
i came back after 3 weeks ... and now when i trying to use this script .... its dont work well, like was before ... now he just using first skill what he need then script stop ;/
 
Can anyone test to see if this still works? Its one of the main reasons i would buy Archebuddy
 
To anyone say this won't compile try this. Compiled first try compiling this, secondly I HAVE NOT TESTED THIS. Just got it to compile.

Code:
using System;
using System.Drawing;
using System.Windows.Forms;
using System.Threading;
using System.Collections.Generic;
using System.Linq;
using ArcheBuddy.Bot.Classes;

namespace Sport_Fisher {
    public class Main : Core {
        public static string GetPluginAuthor() {
            return "CoalCloud";
        }

        public static string GetPluginVersion() {
            return "1.0.0.1";
        }

        public static string GetPluginDescription() {
            return "Sport Fisher";
        }

bool done;

        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();
done = false;
                            new Thread(() => UseSkill(skillToUse)).Start();
                            while (!isCasting() && !done) ;
                           
if (isCasting())
 prevSkill = skillToUse;
                        }
                    }
                }
            }
        }

        public void PluginStop() {
            Log("~~ Plug-in stop.");
        }

        private void UseSkill(string skillToUse) {
            if (!UseSkill(skillToUse, true))
done = true;
        }
    }
}
 
Back
Top