Example #1
0
        static bool canShoot(windowsAPIs winAPI)
        {
            int playerBase = mem.readInt((int)(client) + 0x00A9053C); //0x00A9053C is the localplayer address in memory
            int inCross    = mem.readInt(playerBase + 0x0000AA64);    //reads our local playerbase + the crosshair offset. 0x0000AA64 is the crosshairID address in memory

            return(inCross > 0 && inCross < 64 ? true : false);
        }
Example #2
0
        static void triggerLoop(memoryFunctions mem, IntPtr handle, IntPtr client)
        {
            Console.Beep(100, 400);                                           //started successfully

            int         playerBase = mem.readInt((int)(client) + 0x00A9053C); //0x00A9053C is the localplayer address in memory
            windowsAPIs winAPI     = new windowsAPIs();

            while (true)
            {
                int inCross = mem.readInt(playerBase + 0x0000AA64);                    //reads our local playerbase + the crosshair offset. 0x0000AA64 is the crosshairID address in memory
                if (winAPI.IsKeyPushedDown(triggerKey) && inCross > 0 && inCross < 64) //if incross > 0 && < 64 then that means that there is a player in your crosshair
                {
                    winAPI.DoMouseClick();
                }

                Thread.Sleep(1); //brings down CPU usage
            }
        }
Example #3
0
        static void triggerLoop(memoryFunctions mem, IntPtr handle, IntPtr client)
        {
            Console.Beep(100, 400); //started successfully

            windowsAPIs winAPI = new windowsAPIs();

            while (true)
            {
                if (winAPI.IsKeyPushedDown(triggerKey))
                {
                    if (canShoot) //sees if there is a valid target
                    {
                        DoMouseClick();
                    }
                }
                Thread.Sleep(1); //brings down CPU usage
            }
        }