Example #1
0
        public static bool clickToMonster(Point?monsterLocation)
        {
            int   i = 0;
            Point?fightExpMonsterImage = null;

            GameHelper.Log("Finding to fight....");
            while (i < 5)
            {
                fightExpMonsterImage = GameImage.findGameImage(fightImage, "Fight Monster", true, monsterLocation.Value.X - 150, monsterLocation.Value.Y - 250, 300, 300);
                if (fightExpMonsterImage != null)
                {
                    GameImage.clickImage(fightImage, fightExpMonsterImage.Value.X + monsterLocation.Value.X - 150, fightExpMonsterImage.Value.Y + monsterLocation.Value.Y - 250, "Fight Monster");
                    GameHelper.Log("Click to fight exp monster");
                    return(true);
                }
                i++;
                GameHelper.Delay(100);
            }

            if (fightExpMonsterImage == null)
            {
                fightExpMonsterImage = GameImage.findGameImage(bossImage, "Fight BOSS", true, monsterLocation.Value.X - 100, monsterLocation.Value.Y - 300, 200, 300);
                if (fightExpMonsterImage != null)
                {
                    GameImage.clickImage(bossImage, fightExpMonsterImage.Value.X + monsterLocation.Value.X - 100, fightExpMonsterImage.Value.Y + monsterLocation.Value.Y - 250, "Fight Boss");
                }
            }

            if (fightExpMonsterImage == null)
            {
                GameHelper.Log("Found fight image of exp monster Fail");
            }
            return(false);
        }
Example #2
0
        public static List <int> checkFoodFullExp()
        {
            List <int> result = new List <int>();

            if (GameImage.findGameImage(maxLvlImage, "Max exp image", true, GamePos.shikiCenterBattle[0], GamePos.shikiCenterBattle[1], GamePos.shikiCenterBattle[2] - GamePos.shikiCenterBattle[0], GamePos.shikiCenterBattle[3] - GamePos.shikiCenterBattle[1]) != null)
            {
                result.Add(1);
            }
            if (GameImage.findGameImage(maxLvlImage, "Max exp image", true, GamePos.shikiRightBattle[0], GamePos.shikiRightBattle[1], GamePos.shikiRightBattle[2] - GamePos.shikiRightBattle[0], GamePos.shikiRightBattle[3] - GamePos.shikiRightBattle[1]) != null)
            {
                result.Add(2);
            }

            if (result.Count > 0)
            {
                GameHelper.Log("Click to change shiki");
                GameHelper.clickGame(655, 482, true);
                GameHelper.Delay(1000);
                ShikiFood.findShikiFood(foodType, result);
            }
            return(result);
        }