Beispiel #1
0
 private void PerformEnergyRefilling(IButtonPositionsAndColors posColorManager)
 {
     RefillEnergy(posColorManager);
     ExecutionDelay.DelayFor(2000, 300);
     Mouse.LeftClick(posColorManager.ReplayButtonPos);
     ExecutionDelay.DelayFor(2500, 300);
 }
Beispiel #2
0
        public IState MoveNext(IButtonPositionsAndColors posColorManager, ModeConfig config, Statistics stats)
        {
            //Unknown scroll, rainbowmon, mystical scroll, ...
            //sendMouseLeftclick(new Point(Randomize(90, 890), Randomize(15, 860)));
            Mouse.LeftClick(posColorManager.GetMiscButtonPos);
            ExecutionDelay.DelayFor(1500, 300);
            stats.MiscDrops++;

            return(StateManager.Instance[StateKind.AfterWin]);
        }
Beispiel #3
0
        public IState MoveNext(IButtonPositionsAndColors posColorManager, ModeConfig config, Statistics stats)
        {
            Console.WriteLine($"Position X is: {Cursor.Position.X} Position Y is: {Cursor.Position.Y}"
                              + "\n R:" + Screen.GetPixel(new Point(Cursor.Position.X, Cursor.Position.Y)).R
                              + "\n G: " + Screen.GetPixel(new Point(Cursor.Position.X, Cursor.Position.Y)).G
                              + "\n B: " + Screen.GetPixel(new Point(Cursor.Position.X, Cursor.Position.Y)).B +
                              "\n");
            ExecutionDelay.DelayFor(1500);

            return(StateManager.Instance[StateKind.Debug]);
        }
Beispiel #4
0
        public IState MoveNext(IButtonPositionsAndColors posColorManager, ModeConfig config, Statistics stats)
        {
            //Perform a double click
            Mouse.DoubleLeftClick(posColorManager.DoubleClickPos);
            ExecutionDelay.DelayFor(2000, 300);

            //Check whether it is a rune drop or not
            return(posColorManager.CheckRuneDropCol.Matches(Screen.GetPixel(posColorManager.CheckRuneDropPos))
                ? StateManager.Instance[StateKind.RuneDrop]
                : StateManager.Instance[StateKind.NoRuneDrop]);
        }
Beispiel #5
0
        protected int StartNewRound(IButtonPositionsAndColors posColorManager, bool refreshEnergy)
        {
            //Start a new round
            Mouse.LeftClick(posColorManager.ReplayButtonPos);
            ExecutionDelay.DelayFor(2300, 300);

            var refreshedEnergy = CheckEnergyEmpty(posColorManager, refreshEnergy) ? 1 : 0;

            Mouse.LeftClick(posColorManager.StartBattleButtonPos);
            ExecutionDelay.DelayFor(1000, 300);

            return(refreshedEnergy);
        }
Beispiel #6
0
 protected void RefillEnergy(IButtonPositionsAndColors posColorManager)
 {
     Mouse.LeftClick(posColorManager.RefreshEnergyButtonPos);
     ExecutionDelay.DelayFor(1500, 300);
     Mouse.LeftClick(posColorManager.Energy4CrystalsButtonPos);
     ExecutionDelay.DelayFor(1500, 300);
     Mouse.LeftClick(posColorManager.Energy4CrystalsConfirmButtonPos);
     ExecutionDelay.DelayFor(4000, 300);
     Mouse.LeftClick(posColorManager.RefreshedEnergyConfirmButtonPos);
     ExecutionDelay.DelayFor(1500, 300);
     Mouse.LeftClick(posColorManager.CloseCashShopWindowButtonPos);
     ExecutionDelay.DelayFor(1500, 300);
 }
Beispiel #7
0
        public IState MoveNext(IButtonPositionsAndColors posColorManager, ModeConfig config, Statistics stats)
        {
            //Bad rune
            stats.BadRuneCount++;
            //Purple 5* rune: take screenshot in order to check the sell heuristic quality
            //if ((checkRuneName(230, 130, 237) && MatchedColor(221, 228, 226, GetPixel(new Point(657, 366)))))
            //    take_screenshot(SUBPATH, bad_rune_count);
            Mouse.LeftClick(posColorManager.SellRuneButtonPos);
            ExecutionDelay.DelayFor(1200, 300);
            //Is it a 5* or violet rune? Confirm sell button
            Mouse.LeftClick(posColorManager.ConfirmSellRuneButtonPos);
            ExecutionDelay.DelayFor(3500, 300);

            return(StateManager.Instance[StateKind.AfterWin]);
        }
Beispiel #8
0
        public override IState MoveNext(IButtonPositionsAndColors posColorManager, ModeConfig config, Statistics stats)
        {
            Mouse.LeftClick(posColorManager.NoContinueButtonPos);
            ExecutionDelay.DelayFor(3500, 300);
            Mouse.LeftClick(posColorManager.ReplayButtonPos);
            ExecutionDelay.DelayFor(1500, 300);

            stats.Refills += StartNewRound(posColorManager, config.RefreshEnergy);

            stats.LossCount++;
            stats.Runs++;
            stats.Print();

            return(StateManager.Instance[StateKind.LastRuneFarming]);
        }
Beispiel #9
0
        public IState MoveNext(IButtonPositionsAndColors posColorManager, ModeConfig config, Statistics stats)
        {
            //Good rune
            stats.GoodRuneCount++;
            if (stats.GoodRuneCount != null)
            {
                Screen.TakeScreenshot(Environment.ExpandEnvironmentVariables(Settings.Default.Rootpath),
                                      stats.GoodRuneCount.Value);
            }

            ExecutionDelay.DelayFor(1200, 300);
            Mouse.LeftClick(posColorManager.GetRuneButtonPos);
            ExecutionDelay.DelayFor(1200, 300);

            return(StateManager.Instance[StateKind.AfterWin]);
        }
Beispiel #10
0
        public IState MoveNext(IButtonPositionsAndColors posColorManager, ModeConfig config, Statistics stats)
        {
            ExecutionDelay.DelayFor(1500);

            return(StateManager.Instance[StateKind.InitialRuneFamring]);
        }