|
You last visited: Today at 16:42
Advertisement
[Help] Triggerbot
Discussion on [Help] Triggerbot within the Paladins forum part of the Shooter category.
09/12/2018, 12:39
|
#1
|
elite*gold: 0
Join Date: Sep 2011
Posts: 10
Received Thanks: 2
|
[Help] Triggerbot
Hello guys,
I wrote a very simple Triggerbot for Paladins, basically all it does is it gets pixel color from the center of the screen (where crosshair is) and if its red it shoots. It works as intended the only problem is when you move mouse moderately fast around target it misses some shots. So what I would like to do is, when the crosshair gets red disable mouse movement, shoot and when it gets white (So its off target) enable mouse movement again. In C++ I tried using BlockInput(true)->BlockInput(false) but it blocks keyboard too, which is pretty bad. Is there any way to block mouse movement only? I have written this code both in AutoIt and in C++ so if you can help me in either language  . Here are my codes:
AutoIt:
Code:
#include <AutoItConstants.au3>
#include <Misc.au3>
HotKeySet('{NUMPAD1}', '_Shoot')
HotKeySet('{NUMPAD2}', '_Pause')
HotKeySet('{NUMPAD3}', '_Exit')
Global $Red = IniRead('colors.ini', 'Colors', 'Red', 'Not Found')
Global $DistantRed = IniRead('colors.ini', 'Colors', 'DistantRed', 'Not Found')
Global $SniperRed = IniRead('colors.ini', 'Colors', 'SniperRed', 'Not Found')
Global $X = [MENTION=408378]desktop[/MENTION]Width/2
Global $Y = [MENTION=408378]desktop[/MENTION]Height/2
Global $Pause = 0
Func _Shoot()
$Pause = 0
While $Pause = 0
$currentColor = PixelGetColor($X, $Y)
If $currentColor = $Red Or $currentColor = $DistantRed Or $currentColor = $SniperRed Then
MouseClick('Left')
EndIf
WEnd
EndFunc
Func _Pause()
$Pause = 1
EndFunc
Func _Exit()
Exit
EndFunc
While 1
sleep(100)
WEnd
C++:
Code:
#include <Windows.h>
#include <iostream>
using namespace std;
class Crosshair
{
public:
int centerX;
int centerY;
HDC hdc;
bool getColor();
void shoot();
Crosshair(int, int, HDC);
};
Crosshair::Crosshair(int centerX, int centerY, HDC hdc)
{
this->centerX = centerX;
this->centerY = centerY;
this->hdc = hdc;
}
bool Crosshair::getColor() {
COLORREF pixel = GetPixel(this->hdc, this->centerX, this->centerY);
int red = GetRValue(pixel);
int green = GetGValue(pixel);
int blue = GetBValue(pixel);
if (red == 255 && green == 64 && blue == 64) {
return true;
} else {
return false;
}
}
void Crosshair::shoot() {
if (getColor()) {
mouse_event(MOUSEEVENTF_LEFTDOWN, this->centerX, this->centerY, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, this->centerX, this->centerY, 0, 0);
}
Sleep(10);
}
int main(int argc, char** argv[]) {
string winName = "Paladins (64-bit, DX11)";
HWND mainHWND = FindWindow(0, winName.c_str());
RECT rect;
GetWindowRect(mainHWND, &rect);
HDC dc = GetDC(NULL);
Crosshair cross(rect.right / 2, rect.bottom / 2, dc);
while (true) {
cross.shoot();
}
system("pause");
return 0;
}
Thank you.
|
|
|
09/21/2018, 09:32
|
#2
|
elite*gold: 100
Join Date: Mar 2006
Posts: 1,826
Received Thanks: 429
|
How about you just move the mouse where the RED is?
Or capture the X/Y of RED and forcefully move mouse in that coordinate until release (Mouse1 Hotkey).
|
|
|
02/16/2020, 14:31
|
#3
|
elite*gold: 0
Join Date: Feb 2020
Posts: 4
Received Thanks: 0
|
Hey, a bit late but... try lowering the "Sleep(n)". something like "Sleep(15)" should do it.
|
|
|
02/17/2020, 21:12
|
#4
|
elite*gold: 0
Join Date: Feb 2020
Posts: 2
Received Thanks: 1
|
sir what to do with these codes please tell me
|
|
|
 |
Similar Threads
|
[C++] Need some help with my Triggerbot...
02/25/2016 - C/C++ - 1 Replies
Nach dem neusten Patch spinnt mein Triggerbot:
void triggerbot() {
if (tON && eInCH) {
if (GetAsyncKeyState(VK_MENU) & Pressed) {
Sleep(triggerdelay);
mouse_event(MOUSEEVENTF_LEFTDOWN, NULL, NULL, NULL, NULL);
Sleep(2);
mouse_event(MOUSEEVENTF_LEFTUP, NULL, NULL, NULL, NULL);
Sleep(2);
|
Need help for making triggerbot
11/18/2014 - S4 League - 6 Replies
Hi, i plan to make triggerbot / sniperbot with autoit
i just make it for learning, i tried the pixel search method, but whenever it try to fire, the aim goes above.
So i want to know if there's any method other than pixel search?
or is there any thread that provide the tutorial ?
search for a while and seems can't find what i need :confused:
|
[Help]Triggerbot when word/name appears
08/13/2013 - AutoIt - 3 Replies
Hey,
I need help with my AUTO IT script for a trigger bot for the game called Gunz
To explain, i'm using a picture
http://i44.tinypic.com/314a2yh.jpg
As you can see the name above the x-hair, and I would just like to make it so that with pixel search when it finds words above the x-hair, you shoots (or left click)
While True
|
help help help help help help
06/28/2009 - Say Hello - 0 Replies
how i can dowmload Mangos 6385 ???????????????????????????????????
please give me the limk i can't see that
i know it is in www.elitepvpers.com/.../153716-release-mangos-relea ses-blackscorpian-win32-2-4-3-a.html -
but give me link sent it to my email plz
|
All times are GMT +1. The time now is 16:42.
|
|