Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
Merge pull request #75 from Liuhaixv/main
Browse files Browse the repository at this point in the history
fixed hotkey glitch
  • Loading branch information
Blaumaus authored Jul 7, 2022
2 parents 942d33e + 86f1e52 commit 5e75a20
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 34 deletions.
108 changes: 75 additions & 33 deletions Le_Chiffre/hacks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,16 +206,22 @@ class Hacks {

// Thread methods:
void thread_trigger_bot(hacks_state* state, hacks_coords* coords, ConsoleIO* io, Internalisation* i) { // Trigger bot - LAlt, F6
bool f6_released = true;
while (true) {
if (state->game) {
bool f6 = GetKeyState(VK_F6) & 0x0001;
bool f6_pressing = GetKeyState(VK_F6) < 0;
bool lalt = GetAsyncKeyState(VK_LMENU);
bool l_mouse = GetAsyncKeyState(VK_LBUTTON);

if (f6 != state->activate_trigger) {
state->activate_trigger = f6;
io->set_cursor_position(coords->activate_trigger);
io->write_str(state->activate_trigger ? i->translate(XorStr("on")) : i->translate(XorStr("off")), state->activate_trigger ? FOREGROUND_GREEN : FOREGROUND_RED);
if (f6_pressing) {
if (f6_released) {
state->activate_trigger = !state->activate_trigger;
io->set_cursor_position(coords->activate_trigger);
io->write_str(state->activate_trigger ? i->translate(XorStr("on")) : i->translate(XorStr("off")), state->activate_trigger ? FOREGROUND_GREEN : FOREGROUND_RED);
f6_released = false;
}
} else {
f6_released = true;
}

if (state->activate_trigger && lalt && !l_mouse) trigger_bot(client->is_dangerzone());
Expand All @@ -227,14 +233,21 @@ class Hacks {
}

void thread_aimbot(hacks_state* state, hacks_coords* coords, ConsoleIO* io, Internalisation* i) { // Aimbot - F4
bool f4_released = true;
while (true) {
if (state->game) {
bool f4 = GetKeyState(VK_F4) & 0x0001;

if (f4 != state->aimbot) {
state->aimbot = f4;
io->set_cursor_position(coords->aimbot);
io->write_str(state->aimbot ? i->translate(XorStr("on")) : i->translate(XorStr("off")), state->aimbot ? FOREGROUND_GREEN : FOREGROUND_RED);
bool f4_pressing = GetKeyState(VK_F4) < 0;

if (f4_pressing) {
if (f4_released) {
state->aimbot = !state->aimbot;
io->set_cursor_position(coords->aimbot);
io->write_str(state->aimbot ? i->translate(XorStr("on")) : i->translate(XorStr("off")), state->aimbot ? FOREGROUND_GREEN : FOREGROUND_RED);
f4_released = false;
}
}
else {
f4_released = true;
}

if (state->aimbot) aim_bot();
Expand All @@ -247,21 +260,36 @@ class Hacks {
}

void thread_glow_radar(hacks_state* state, hacks_coords* coords, ConsoleIO* io, Internalisation* i) { // Glow ESP - F8; Radar hack - F9
bool f8_released = true;
bool f9_released = true;

while (true) {
if (state->game) {
bool f8 = GetKeyState(VK_F8) & 0x0001; // Enemy glow ESP
bool f9 = GetKeyState(VK_F9) & 0x0001; // Radar hack

if (f8 != state->enemy_wh) {
state->enemy_wh = f8;
io->set_cursor_position(coords->enemy_wh);
io->write_str(state->enemy_wh ? i->translate(XorStr("on")) : i->translate(XorStr("off")), state->enemy_wh ? FOREGROUND_GREEN : FOREGROUND_RED);
bool f8_pressing = GetKeyState(VK_F8) < 0; // Enemy glow ESP
bool f9_pressing = GetKeyState(VK_F9) < 0; // Radar hack

if (f8_pressing) {
if (f8_released) {
state->enemy_wh = !state->enemy_wh;
io->set_cursor_position(coords->enemy_wh);
io->write_str(state->enemy_wh ? i->translate(XorStr("on")) : i->translate(XorStr("off")), state->enemy_wh ? FOREGROUND_GREEN : FOREGROUND_RED);
f8_released = false;
}
}
else {
f8_released = true;
}

if (f9 != state->radar_hack) {
state->radar_hack = f9;
io->set_cursor_position(coords->radar_hack);
io->write_str(state->radar_hack ? i->translate(XorStr("on")) : i->translate(XorStr("off")), state->radar_hack ? FOREGROUND_GREEN : FOREGROUND_RED);
if (f9_pressing) {
if (f9_released) {
state->radar_hack = !state->radar_hack;
io->set_cursor_position(coords->radar_hack);
io->write_str(state->radar_hack ? i->translate(XorStr("on")) : i->translate(XorStr("off")), state->radar_hack ? FOREGROUND_GREEN : FOREGROUND_RED);
f9_released = false;
}
}
else {
f9_released = true;
}

if (state->enemy_wh || state->radar_hack)
Expand All @@ -274,14 +302,21 @@ class Hacks {
}

void thread_no_flash(hacks_state* state, hacks_coords* coords, ConsoleIO* io, Internalisation* i) { // No flash - F3
bool f3_released = true;
while (true) {
if (state->game) {
bool f3 = GetKeyState(VK_F3) & 0x0001;

if (f3 != state->no_flash) {
state->no_flash = f3;
io->set_cursor_position(coords->no_flash);
io->write_str(state->no_flash ? i->translate(XorStr("on")) : i->translate(XorStr("off")), state->no_flash ? FOREGROUND_GREEN : FOREGROUND_RED);
bool f3_pressing = GetKeyState(VK_F3) < 0;

if (f3_pressing) {
if (f3_released) {
state->no_flash = !state->no_flash;
io->set_cursor_position(coords->no_flash);
io->write_str(state->no_flash ? i->translate(XorStr("on")) : i->translate(XorStr("off")), state->no_flash ? FOREGROUND_GREEN : FOREGROUND_RED);
f3_released = false;
}
}
else {
f3_released = true;
}

if (state->no_flash) no_flash();
Expand All @@ -293,15 +328,22 @@ class Hacks {
}

void thread_bunny_hop(hacks_state* state, hacks_coords* coords, ConsoleIO* io, Internalisation* i) { // Bunny hop - F2
bool f2_released = true;
while (true) {
if (state->game) {
bool f2 = GetKeyState(VK_F2) & 0x0001;
bool f2_pressing = GetKeyState(VK_F2) < 0;
bool space = GetAsyncKeyState(VK_SPACE);

if (f2 != state->bunny_hop) {
state->bunny_hop = f2;
io->set_cursor_position(coords->bunny_hop);
io->write_str(f2 ? i->translate(XorStr("on")) : i->translate(XorStr("off")), f2 ? FOREGROUND_GREEN : FOREGROUND_RED);
if (f2_pressing) {
if (f2_released) {
state->bunny_hop = !state->bunny_hop;
io->set_cursor_position(coords->bunny_hop);
io->write_str(state->bunny_hop ? i->translate(XorStr("on")) : i->translate(XorStr("off")), state->bunny_hop ? FOREGROUND_GREEN : FOREGROUND_RED);
f2_released = false;
}
}
else {
f2_released = true;
}

if (state->bunny_hop && space) bunny_hop();
Expand Down
2 changes: 1 addition & 1 deletion Le_Chiffre/misc/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace {
// Config
const ::std::string CHEAT_VERSION = XorStr("v1.4.28");
const ::std::string CHEAT_VERSION = XorStr("v1.4.29");
const ::std::string RELEASE_DATE = XorStr("[25 June, 2022]");
const wchar_t* HOST = L"api.github.com";
const wchar_t* PATH = L"/repos/blaumaus/le_chiffre/tags?per_page=1";
Expand Down

1 comment on commit 5e75a20

@vercel
Copy link

@vercel vercel bot commented on 5e75a20 Jul 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

lechiffre – ./

lechiffre-git-main-blaumaus.vercel.app
lechiffre.vercel.app
lechiffre-blaumaus.vercel.app

Please sign in to comment.