示例#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);
        }
示例#2
0
 public static void battleStart()
 {
     GameImage.clickImage(readyImage, 976, 488, "start Battle");
 }