TKC-Community

Hacking and Art => General Modding & Programming / Other Games => OpenGL/Direct3D => Topic started by: Jurugi on July 09, 2009, 06:52:43 am

Title: [Code] Simple TriggerBot
Post by: Jurugi on July 09, 2009, 06:52:43 am
Hai.
Dis is for use with your model chams in D3D. Make sure its a distinguishable color like Red, Blue, Green, or Yellow. I've commented it to show you how it works, but it's pretty self explanatory. You can remove the comments and use this as you please.. just don't say it's your own for some dumb reason.

Code: [Select]

VOID TriggerBot()
{
COLORREF         cPixel;
HWND opfWindow;
HDC opfDC;

opfWindow = GetForegroundWindow( );
opfDC = GetDC( opfWindow );
int x, y;
for(x=BaseInfo.ScreenCenterX-2; x <= BaseInfo.ScreenCenterX+2; x++)
{
for(y=BaseInfo.ScreenCenterY-2;y <= BaseInfo.ScreenCenterY+2; y++)
{

cPixel = GetPixel( opfDC, x, y );

     
        // Red = >=200, <50, <50; Blue = <50, <50, >=200; Green = <50, >=200, <50
        // Yellow Chams
if(GetRValue(cPixel)>= 150
&& GetGValue(cPixel)>= 125
&& GetBValue(cPixel) < 50)
{
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, NULL, NULL); // Simulate click
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, NULL, NULL);
}
} // End X loop
} // End Y Loop
}

Ok. Basically get an RGB Scanner, find what your chams color is and replace. To increase detection radius change the 2 to a higher value. Right now it only scans 4 pixels at the center but that's good enough for a trigger bot.

Sry for the dbl post btw.
Title: Re: [Code] Simple TriggerBot
Post by: ZOldDude on July 09, 2009, 06:56:18 am
I deleated the other post...NP.
Title: Re: [Code] Simple TriggerBot
Post by: Jurugi on July 09, 2009, 06:58:17 am
TY :D
Title: Re: [Code] Simple TriggerBot
Post by: MrMedic on July 09, 2009, 12:29:19 pm
nice work , btw you may realise that in some games these kind of trigger bots will not fire , this is either because the game is directx input in which case you will need to either hook dinput or hook game input , or else some games wont allow a 1 frame click of the mouse key as 1 frame is too fast for a human ...they think your using automated and you are so wait one frame , maybe do a bool and =! ( toggle ) it then check for true/false and it should fire.

good luck & happy triggerbotting :)
Title: Re: [Code] Simple TriggerBot
Post by: Jurugi on July 09, 2009, 08:08:47 pm
   ::: D Ty.
Code: [Select]
        static bool FireDelay = true;
if(FireDelay) mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, NULL, NULL);
else mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, NULL, NULL);
FireDelay = !FireDelay;
Title: Re: [Code] Simple TriggerBot
Post by: arrapajoe on August 20, 2013, 11:17:31 pm
software that you have to create this file? C + +?
Title: Re: [Code] Simple TriggerBot
Post by: Apprentice on August 09, 2017, 09:22:23 am
Does this work for CSGO?
Title: Re: [Code] Simple TriggerBot
Post by: ZOldDude on August 09, 2017, 10:42:17 am
Works for anything.
Title: Re: [Code] Simple TriggerBot
Post by: Apprentice on August 09, 2017, 01:09:29 pm
Works for anything.

Ok thank you!