Salut à toi visiteur !
Inscris toi en moins de 10 secondes pour profitez pleinement du site et partager avec la communauté ! S'inscrire


Trigger Valorant


#1
Bonjour, je vais vous partager une source Trigger que j'ai modiffié afin qu'elle soit le mieux jouable actuellement je suis monté Platine 3 grasse a cella :
1 Préréqui VS studio 
2 Veuillez compiller le fichier Netflix .sln en jeux 
Code :
#pragma once

#include "pch.h"
#include <Windows.h>
#include <stdio.h>
#include <iostream>
#include <thread>
#include <chrono>
#include <Windows.h>
#include "HSV.h"
#include "Screen.h"

#ifdef _WIN32
#include <io.h>
#define access _access_s
#else
#include <unistd.h>
#endif

#define INAME L"VALORANT "
using namespace std;

int colorMode = 1;
HWND deeznuts;
#define isDown 0x8000

int get_screen_width(void) {
return GetSystemMetrics(SM_CXSCREEN);
}

int get_screen_height(void) {
return GetSystemMetrics(SM_CYSCREEN);
}

struct point {
double x;
double y;
point(double x, double y) : x(x), y(y) {}
};

inline bool is_color(int red, int green, int blue) {
if (colorMode == 0) { // purple
if ((red >= 190 && green >= 100 && blue >= 200) ||
(red >= 80 && red <= 100 && green >= 20 && green <= 30 && blue >= 100 && blue <= 110) ||
(red >= 100 && red <= 190 && green >= 30 && green <= 90 && blue >= 110 && blue <= 200))
return true;
}
else if (colorMode == 1) { // yellow
if ((red >= 170 && red <= 200 && green >= 165 && green <= 215 && blue >= 25 && blue <= 110) ||
(red >= 145 && red <= 170 && green >= 140 && green <= 165 && blue >= 5 && blue <= 55) ||
(red >= 200 && red <= 230 && green >= 200 && green <= 230 && blue >= 0 && blue <= 90) ||
(red >= 230 && green >= 230 && blue >= 90 && blue <= 190))
return true;
}
////original color purple
//if (colorMode == 0) {
// if (green >= 190) {
// return false;
// }

// if (green >= 140) {
// return abs(red - blue) <= 8 &&
// red - green >= 50 &&
// blue - green >= 50 &&
// red >= 105 &&
// blue >= 105;
// }

// return abs(red - blue) <= 13 &&
// red - green >= 60 &&
// blue - green >= 60 &&
// red >= 110 &&
// blue >= 100;
//}

//// yellow
//else {
// if (red < 160)
// {
// return false;
// }
// if (red > 161 && red < 255) {
// return green > 150 && green < 255 && blue > 0 && blue < 79;
// }
// return false;
//}
return false;
}

BYTE* screenData = 0;
bool run_threads = true;
const int screen_width = get_screen_width(), screen_height = get_screen_height();

//bot with purple (original (again not default))
void bot() {
int w = 8, h = 8;
auto t_start = std::chrono::high_resolution_clock::now();
auto t_end = std::chrono::high_resolution_clock::now();

HDC hScreen = GetDC(NULL);
HBITMAP hBitmap = CreateCompatibleBitmap(hScreen, w, h);
screenData = (BYTE*)malloc(5 * screen_width * screen_height);
HDC hDC = CreateCompatibleDC(hScreen);
point middle_screen(screen_width / 2, screen_height / 2);

BITMAPINFOHEADER bmi = { 0 };
bmi.biSize = sizeof(BITMAPINFOHEADER);
bmi.biPlanes = 1;
bmi.biBitCount = 32;
bmi.biWidth = w;
bmi.biHeight = -h;
bmi.biCompression = BI_RGB;
bmi.biSizeImage = 0;


//Screen::getSize();

//int x = Screen::width / 2; //DONT NEED TO BE CALLED EVERY TICK, THE DESKTOP MONITOR SIZE DOESNT CHANGE!
//int y = Screen::height / 2; //DONT NEED TO BE CALLED EVERY TICK, THE DESKTOP MONITOR SIZE DOESNT CHANGE!

//RGBTRIPLE rgbTriple;
//HDC desktopHdc = GetDC(NULL);

//int addX = 0, addY = 0;

//while (1) {
// int TRIGGER_SIZE = 8;

// if ((GetAsyncKeyState(VK_XBUTTON1) && isDown) && !(GetAsyncKeyState(VK_LBUTTON) && isDown)) { //IS PRESSING TRIGGER KEY AND ISNT PRESSING THE MOUSE 1
// for (int iX = 0; iX < TRIGGER_SIZE; iX++) {
// for (int iY = 0; iY < TRIGGER_SIZE; iY++) {
// if (iX >= TRIGGER_SIZE / 2) addX = ((TRIGGER_SIZE / 2) - iX); //MAKES A x RECT AROUND THE MIDDLE SCREEN
// if (iX < TRIGGER_SIZE / 2) addX = ((TRIGGER_SIZE / 2) - iX); //MAKES A x RECT AROUND THE MIDDLE SCREEN

// if (iY >= TRIGGER_SIZE / 2) addY = (iY - (TRIGGER_SIZE / 2)); //MAKES A y RECT AROUND THE MIDDLE SCREEN
// if (iY < TRIGGER_SIZE / 2) addY = (iY - (TRIGGER_SIZE / 2)); //MAKES A y RECT AROUND THE MIDDLE SCREEN

// CRREF color = GetPixel(desktopHdc, x + addX, y + addY);

// rgbTriple.rgbtRed = GetRValue(color);
// rgbTriple.rgbtGreen = GetGValue(color);
// rgbTriple.rgbtBlue = GetBValue(color);

// Color::HSV rgbToHue = toHSV((float)rgbTriple.rgbtRed, (float)rgbTriple.rgbtGreen, (float)rgbTriple.rgbtBlue);
// Color::ColorName name = Categorize(rgbToHue);
// string cname = Color::toString(name);
// if (cname == "magenta") {
// if (rgbToHue.s * 100 <= 80 && rgbToHue.s * 100 > 15) {
// if ((GetAsyncKeyState(VK_XBUTTON1) && isDown) && !(GetAsyncKeyState(VK_LBUTTON) && isDown)) { //IS PRESSING TRIGGER KEY AND ISNT PRESSING THE MOUSE 1
// Sleep(1);
// PostMessage(deeznuts, WM_LBUTTONDOWN, 1, 0);
// Sleep(1);
// PostMessage(deeznuts, WM_LBUTTONUP, 1, 0);
// }
// else {
// Sleep(1);
// }
// }
// }
// }
// }
// }
//}

while (run_threads) {
Sleep(0001);
HGDIOBJ old_obj = SelectObject(hDC, hBitmap);
BOOL bRet = BitBlt(hDC, 0, 0, w, h, hScreen, middle_screen.x - (w/2), middle_screen.y - (h/2), SRCCOPY);
SelectObject(hDC, old_obj);
GetDIBits(hDC, hBitmap, 0, h, screenData, (BITMAPINFO*)&bmi, DIB_RGB_CRS);
for (int j = 0; j < h; ++j) {
for (int i = 0; i < w * 4; i += 4) {
#define red screenData[i + (j*w*4) + 2]
#define green screenData[i + (j*w*4) + 1]
#define blue screenData[i + (j*w*4) + 0]
if ((GetAsyncKeyState(VK_XBUTTON1) && isDown) && !(GetAsyncKeyState(VK_LBUTTON) && isDown)) { //IS PRESSING TRIGGER KEY AND ISNT PRESSING THE MOUSE 1
if (is_color(red, green, blue)) {
PostMessage(deeznuts, WM_LBUTTONDOWN, 1, 0);
Sleep(001);
PostMessage(deeznuts, WM_LBUTTONUP, 1, 0);
Sleep(001);

}
}
else {
Sleep(001);
}
}
}

}
}

int APIENTRY WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
deeznuts = FindWindowW(NULL, INAME);
HDC nDC = GetDC(deeznuts);
string color;
int mode = 1;
AllocConsole();
AttachConsole(GetCurrentProcessId());
auto w_f = freopen("CON", "w", stdout);
auto r_f = freopen("CON", "r", stdin);
bot();
}
3 le logiciel est actuellement régler pour tirer la couleur Jaune si vous souhaitez une autre couleur faites me le savoir je vous direz quoi faire 
Bon jeux !

#2
jadore se mod pour valorent  Relief
Répondre

#3
ce trigger fonctionne tres bien ! je ladore
Répondre

#4
Hello je suis totalement débutant comment on utilise et installe un trigger?

Merci!
Répondre

#5
je pense que tu pourrait optmise ce code haha
Répondre

#6
Ah oue t chaud le reuf cimer à toi le code est balaise !

Le code est balèze merci beaucoup à toi !Tu gère
Répondre

#7
yo, je suis intéressé pour utiliser ce Trigger mais je ne sais pas du tout comment on fait, quelqu'un pour m'aider à faire la manip ?
Répondre

#8
comment cela fonctionne ? je debute dans le non legit je comprend pas trop !
Répondre

#9
yes peux tu expliquer en details comment l'utiliser
Répondre

#10
Nouvelle mise a jour du Tool Smile

#include "pch.h"
#include <Windows.h>
#include <stdio.h>
#include <iostream>
#include <thread>
#include <chrono>
#include <Windows.h>
#include "HSV.h"
#include "Screen.h"
#include <iostream>

bool run_bot_thread = true;

#define VK_XBUTTON1 0x05

#ifdef _WIN32
#include <io.h>
#define access _access_s
#else
#include <unistd.h>
#endif

#define INAME L"VALORANT  "

using namespace std;

int colorMode = 1;
HWND deeznuts;

#define isDown 0x8000

int get_screen_width(void) {
    return GetSystemMetrics(SM_CXSCREEN);
}

int get_screen_height(void) {
    return GetSystemMetrics(SM_CYSCREEN);
}

struct point {
    double x;
    double y;
    point(double x, double y) : x(x), y(y) {}
};

inline bool is_color(int red, int green, int blue) {
    if (colorMode == 1) { // Jaune
        // Utilisez un tableau de plages de couleurs pour simplifier la vérification
        static const int colorRanges[][6] = {
            {170, 200, 165, 215, 25, 110},
            {145, 170, 140, 165, 5, 55},
            {200, 230, 200, 230, 0, 90},
            {230, 255, 230, 255, 90, 190}
        };

        for (const auto& range : colorRanges) {
            if (red >= range[0] && red <= range[1] &&
                green >= range[2] && green <= range[3] &&
                blue >= range[4] && blue <= range[5]) {
                return true;
            }
        }
    }
    return false;
}

BYTE* screenData = nullptr;
bool run_threads = true;
const int screen_width = get_screen_width(), screen_height = get_screen_height();


void bot_thread(int w, int h) {
    auto t_start = std::chrono::high_resolution_clock::now();
    auto t_end = std::chrono::high_resolution_clock::now();
    std::this_thread::sleep_for(std::chrono::milliseconds(1));

    HDC hScreen = GetDC(NULL);
    HBITMAP hBitmap = CreateCompatibleBitmap(hScreen, w, h);
    screenData = (BYTE*)malloc(4 * w * h); // Utilisez 4 au lieu de 5 pour les octets par pixel (32 bits)
    HDC hDC = CreateCompatibleDC(hScreen);
    point middle_screen(screen_width / 2, screen_height / 2);

    BITMAPINFOHEADER bmi = { 0 };
    bmi.biSize = sizeof(BITMAPINFOHEADER);
    bmi.biPlanes = 1;
    bmi.biBitCount = 32;
    bmi.biWidth = w;
    bmi.biHeight = -h;
    bmi.biCompression = BI_RGB;
    bmi.biSizeImage = 0;

    while (run_threads) {
        Sleep(6);
        HGDIOBJ old_obj = SelectObject(hDC, hBitmap);
        BOOL bRet = BitBlt(hDC, 0, 0, w, h, hScreen, middle_screen.x - (w / 2), middle_screen.y - (h / 2), SRCCOPY);
        SelectObject(hDC, old_obj);
        GetDIBits(hDC, hBitmap, 0, h, screenData, (BITMAPINFO*)&bmi, DIB_RGB_COLORS);

        for (int j = 0; j < h; ++j) {
            for (int i = 0; i < w; ++i) { // Supprimez la multiplication par 4 ici
                int index = (i + j * w) * 4; // Calculez l'index une seule fois

                int red = screenData[index + 2];
                int green = screenData[index + 1];
                int blue = screenData[index];


                if ((GetAsyncKeyState(VK_XBUTTON1) & isDown) && !(GetAsyncKeyState(VK_LBUTTON) & isDown)) {
                    if (is_color(red, green, blue)) {
                        if (GetAsyncKeyState('Z') & isDown) {
                            PostMessage(deeznuts, WM_KEYDOWN, 'S', 0);

                            PostMessage(deeznuts, WM_KEYDOWN, VK_LSHIFT, 0);
                         
                            PostMessage(deeznuts, WM_LBUTTONDOWN, MK_LBUTTON, MAKELPARAM(0, 0));
                            Sleep(120);

                            PostMessage(deeznuts, WM_LBUTTONUP, 0, MAKELPARAM(0, 0));
                            PostMessage(deeznuts, WM_KEYUP, VK_LSHIFT, 0);
                            Sleep(0.01);;
                            PostMessage(deeznuts, WM_KEYUP, 'S', 0);

                        }
                        else if (GetAsyncKeyState('Q') & isDown) {
                            PostMessage(deeznuts, WM_KEYDOWN, 'D', 0);

                            PostMessage(deeznuts, WM_KEYDOWN, VK_LSHIFT, 0);
                           
                            PostMessage(deeznuts, WM_LBUTTONDOWN, MK_LBUTTON, MAKELPARAM(0, 0));
                            Sleep(120);

                            PostMessage(deeznuts, WM_LBUTTONUP, 0, MAKELPARAM(0, 0));
                            PostMessage(deeznuts, WM_KEYUP, VK_LSHIFT, 0);
                            Sleep(0.01);
                            PostMessage(deeznuts, WM_KEYUP, 'D', 0);

                        }
                        else if (GetAsyncKeyState('D') & isDown) {
                            PostMessage(deeznuts, WM_KEYDOWN, 'Q', 0);


                            PostMessage(deeznuts, WM_KEYDOWN, VK_LSHIFT, 0);
                           
                            PostMessage(deeznuts, WM_LBUTTONDOWN, MK_LBUTTON, MAKELPARAM(0, 0));
                            Sleep(120);


                            PostMessage(deeznuts, WM_LBUTTONUP, 0, MAKELPARAM(0, 0));
                            PostMessage(deeznuts, WM_KEYUP, VK_LSHIFT, 0);
                            Sleep(0.01);
                            PostMessage(deeznuts, WM_KEYUP, 'Q', 0);

                        }
                        else {
                            // Si aucune des touches Z, Q ou D n'est enfoncée, exécutez votre code existant ici
                            PostMessage(deeznuts, WM_KEYDOWN, VK_LSHIFT, 0);
                            Sleep(0.1);
                            PostMessage(deeznuts, WM_LBUTTONDOWN, MK_LBUTTON, MAKELPARAM(0, 0));
                            Sleep(120);

                            PostMessage(deeznuts, WM_LBUTTONUP, 0, MAKELPARAM(0, 0));
                            PostMessage(deeznuts, WM_KEYUP, VK_LSHIFT, 0);
                            Sleep(0.01);

                        }
                    }
                }
                else {
                    // Autre traitement si nécessaire
                }
            }
        }
    }
}

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
    deeznuts = FindWindowW(NULL, INAME);
    HDC nDC = GetDC(deeznuts);
    string color;
    int mode = 1;
    AllocConsole();
    AttachConsole(GetCurrentProcessId());
    auto w_f = freopen("CON", "w", stdout);
    auto r_f = freopen("CON", "r", stdin);

    const int TARGET_FPS = 144;
    const int FRAME_DELAY_MS = 1000 / TARGET_FPS;

    int w = 9, h = 4;
    auto prevTime = std::chrono::high_resolution_clock::now();

    std::thread botThread(bot_thread, w, h);

    while (true) {
        auto currentTime = std::chrono::high_resolution_clock::now();
        auto deltaTime = std::chrono::duration_cast<std::chrono::milliseconds>(currentTime - prevTime).count();

        if (deltaTime >= FRAME_DELAY_MS) {
            prevTime = currentTime;
            run_bot_thread = false;
            botThread.join();
            break;
        }

        // Utilisez une temporisation efficace pour éviter une utilisation excessive du processeur
        std::this_thread::sleep_for(std::chrono::milliseconds(10));
    }

    if (screenData != nullptr) {
        free(screenData);
        screenData = nullptr;
    }

    return 0;
}

Pour ceux qui ne savent pas comment installer il vous faudra Visual studio c++
et des bases en C++

Je ne souhaite pas partager le .exe ici car il sera patch au pire en mp discord : lph_mika
Répondre

#11
qlq sait comment sa fonctionne ? je sais pas ou faut rentrer le code donc voila merci
Répondre

#12
pour ceux qui ne savent pas comment lancer voici le lien du .exe
https://mega.nz/folder/2EEBjQ7R#LjsDE6H0dsBcEgvmuF6Raw
allez dans release x64 netflix.exe
Bon jeux......
Répondre


Sujets apparemment similaires…
Sujet Auteur Réponses Affichages Dernier message
  Valorant cheat (Aim no recoil) Membre60948 45 6,516 16-03-2023, 22:37
Dernier message: Blueno

Atteindre :