コード例 #1
0
ファイル: BotLoader.cs プロジェクト: trananh1992/ffxiv_bot
        public static CoreBot loadBotModule(String configName, String routeName)
        {
            CoreBot bot = null;

            Module.SaveConfigHolder configHolder = new Module.SaveConfigHolder();
            List <Waypoint>         wplist       = BotLoader.loadWaypoints(routeName, "wpr");

            byte[] configBytes = BotLoader.loadFile(configName, "cfg");
            if (configBytes.Length > 0 && wplist.Count > 0)
            {
                configHolder.parseBytes(configBytes, true);
            }


            if (configHolder.type != ConfigType.None)
            {
                if (configHolder.type == ConfigType.Fishing)
                {
                    bot = new FishingBot(configHolder.fishingConfig, wplist);
                }
                else if (configHolder.type == ConfigType.Gathering)
                {
                    bot = new GatheringBot(configHolder.gatheringConfig, wplist);
                }
                else if (configHolder.type == ConfigType.Combat)
                {
                    bot = new CombatBot(configHolder.combatConfig, wplist);
                }
            }
            return(bot);
        }
コード例 #2
0
        private static void Main(string[] args)
        {
            log4net.Config.XmlConfigurator.Configure(new FileStream("log4net.config", FileMode.Open));

            int strikeValue = 7;

            var pixelClassifier = new PixelClassifier();

            if (args.Contains("blue"))
            {
                Console.WriteLine("Blue mode");
                pixelClassifier.Mode = PixelClassifier.ClassifierMode.Blue;
            }

            pixelClassifier.SetConfiguration(WowProcess.IsWowClassic());

            var bobberFinder = new SearchBobberFinder(pixelClassifier);
            var biteWatcher  = new PositionBiteWatcher(strikeValue);

            var bot = new FishingBot(bobberFinder, biteWatcher, ConsoleKey.D4, new List <ConsoleKey> {
                ConsoleKey.D5
            });

            bot.FishingEventHandler += (b, e) => LogManager.GetLogger("Fishbot").Info(e);

            WowProcess.PressKey(ConsoleKey.Spacebar);
            System.Threading.Thread.Sleep(1500);

            bot.Start();
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: mouse1130/FishingFun
        private static void Main(string[] args)
        {
            log4net.Config.XmlConfigurator.Configure(new FileStream("log4net.config", FileMode.Open));

            int strikeValue = 7;

            var pixelClassifier = new PixelClassifier();
            var bobberFinder    = new SearchBobberFinder(pixelClassifier);
            var biteWatcher     = new PositionBiteWatcher(strikeValue);

            var bot = new FishingBot(bobberFinder, biteWatcher, ConsoleKey.D5);

            bot.FishingEventHandler += (b, e) => LogManager.GetLogger("Fishbot").Info(e);
            bot.Start();
        }