在全屏应用程序中如何防止光标移动?

时间:2017-04-22 20:04:04

标签: c# bots

基本上,我正在开发一个" bot"用于自动训练天际技能。它只是一个有趣的项目,在游戏中作弊是没有意义的,你可以通过控制台命令来做。

public static void DestructionRestorationTraining(int xpos, int ypos)
    {
        while (true) //i'll try to change it to while(skill's level < 100) later
        {
            mouse_event(MOUSEEVENTF_LEFTDOWN, xpos, ypos, 0, 0);
            mouse_event(MOUSEEVENTF_RIGHTDOWN, xpos, ypos, 0, 0);
            System.Threading.Thread.Sleep(9000); //casts the spells for 9 seconds
            mouse_event(MOUSEEVENTF_LEFTUP, xpos, ypos, 0, 0);
            mouse_event(MOUSEEVENTF_RIGHTUP, xpos, ypos, 0, 0);
            System.Threading.Thread.Sleep(20000); //waits 20 seconds to restore mana
        }
    }

但是当我运行它时,我的光标在屏幕上移动并且从未找到我的马,因此没有找到它。已经尝试在每个循环中将光标位置设置到屏幕中间,但每次执行动作时它都会移动。

0 个答案:

没有答案