From 3ab2ea1a87826da7e612181e547f8f6961b2437b Mon Sep 17 00:00:00 2001 From: TotallyNotElite <1yourexperiment@protonmail.com> Date: Sat, 26 May 2018 19:21:08 +0200 Subject: [PATCH 1/3] Don't aim if holding sapper or pda --- TODO | 3 +-- include/localplayer.hpp | 1 + src/hacks/Aimbot.cpp | 7 +++++++ src/localplayer.cpp | 8 ++++++-- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/TODO b/TODO index 001beb2d..03964704 100755 --- a/TODO +++ b/TODO @@ -15,8 +15,7 @@ //------------------------------------------------------------------------------------------------------------------// // // // Hook + Aimbot FIX // // - // // -no aim sapper // // + // // // // // // Make hacks respect Mannpower powerups and other conditions when calcuating damage, hitbox and prioritizing targets // // Proper AutoHitbox, Isnt this already a thing?? // // diff --git a/include/localplayer.hpp b/include/localplayer.hpp index 5945a4be..fdbd7e1b 100755 --- a/include/localplayer.hpp +++ b/include/localplayer.hpp @@ -23,6 +23,7 @@ public: bool bZoomed; float flZoomBegin; bool holding_sniper_rifle; + bool holding_sapper; weaponmode weapon_mode; bool using_action_slot_item{ false }; diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 6c78bebc..598e7d07 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -488,6 +488,10 @@ bool IsTargetStateGood(CachedEntity *entity) } IF_GAME(IsTF()) { + //don't aim if holding sapper + if (g_pLocalPlayer->holding_sapper) + return false; + // Wait for charge if (wait_for_charge && g_pLocalPlayer->holding_sniper_rifle) { @@ -585,6 +589,9 @@ bool IsTargetStateGood(CachedEntity *entity) } else if (entity->m_Type() == ENTITY_BUILDING) { + //Don't aim if holding sapper + if (g_pLocalPlayer->holding_sapper) + return false; // Enabled check if (!(buildings_other || buildings_sentry)) return false; diff --git a/src/localplayer.cpp b/src/localplayer.cpp index c4efb44c..7f0d2b45 100755 --- a/src/localplayer.cpp +++ b/src/localplayer.cpp @@ -19,13 +19,17 @@ void LocalPlayer::Update() return; } holding_sniper_rifle = false; + holding_sapper = false; wep = weapon(); if (CE_GOOD(wep)) { weapon_mode = GetWeaponMode(); if (wep->m_iClassID() == CL_CLASS(CTFSniperRifle) || - wep->m_iClassID() == CL_CLASS(CTFSniperRifleDecap)) - holding_sniper_rifle = true; + wep->m_iClassID() == CL_CLASS(CTFSniperRifleDecap)) + holding_sniper_rifle = true; + if (wep->m_iClassID() == CL_CLASS(CTFWeaponBuilder) || + wep->m_iClassID() == CL_CLASS(CTFWeaponSapper)) + holding_sapper = true; } team = CE_INT(entity, netvar.iTeamNum); life_state = CE_BYTE(entity, netvar.iLifeState); From b87288ffdcf1da142786ca505eb93f394124515e Mon Sep 17 00:00:00 2001 From: TotallyNotElite <1yourexperiment@protonmail.com> Date: Sat, 26 May 2018 20:29:43 +0200 Subject: [PATCH 2/3] Add option to stop autoshoot while disguised --- TODO | 2 +- include/conditions.hpp | 2 ++ include/helpers.hpp | 1 + src/hacks/Aimbot.cpp | 6 ++++-- src/helpers.cpp | 7 +++++++ src/visual/menu/ncc/Menu.cpp | 1 + 6 files changed, 16 insertions(+), 3 deletions(-) diff --git a/TODO b/TODO index 03964704..e62d997b 100755 --- a/TODO +++ b/TODO @@ -27,7 +27,7 @@ MAX -> MIN priority // // // // Hunter Rifle? // // // // -No AutoShoot when disguised // // + // // Ambassador bodyshotting // // No Trigger Mediguns // // More projectile weapons aimbot (wrap assassin, wrangler, stickybomb, airstrike) // // diff --git a/include/conditions.hpp b/include/conditions.hpp index 6ce9e27d..ff042c83 100644 --- a/include/conditions.hpp +++ b/include/conditions.hpp @@ -179,6 +179,8 @@ constexpr condition_data_s CreateConditionMask(ConditionList... conds) // Should be either expanded or unused constexpr condition_data_s KInvisibilityMask = CreateConditionMask(TFCond_Cloaked); +constexpr condition_data_s KDisguisedMask = + CreateConditionMask(TFCond_Disguised); // Original name constexpr condition_data_s KVisibilityMask = CreateConditionMask(TFCond_OnFire, TFCond_Jarated, TFCond_CloakFlicker, diff --git a/include/helpers.hpp b/include/helpers.hpp index e2330f55..ffa5c5a2 100755 --- a/include/helpers.hpp +++ b/include/helpers.hpp @@ -52,6 +52,7 @@ void EndConVars(); bool IsPlayerInvulnerable(CachedEntity *player); bool IsPlayerCritBoosted(CachedEntity *player); bool IsPlayerInvisible(CachedEntity *player); +bool IsPlayerDisguised(CachedEntity *player); const char *GetBuildingName(CachedEntity *ent); Vector GetBuildingPosition(CachedEntity *ent); diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index 598e7d07..bfc268dc 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -33,6 +33,8 @@ static CatVar aimkey_mode(aimkey_modes_enum, "aimbot_aimkey_mode", "1", static CatVar autoshoot(CV_SWITCH, "aimbot_autoshoot", "1", "Autoshoot", "Shoot automatically when the target is locked, isn't " "compatible with 'Enable when attacking'"); +static CatVar autoshoot_disguised(CV_SWITCH, "aimbot_autoshoot_disguised", "1", "Autoshoot while disguised", + "Shoot automatically if disguised."); static CatVar multipoint(CV_SWITCH, "aimbot_multipoint", "0", "Multipoint", "Multipoint aimbot"); static CatEnum hitbox_mode_enum({ "AUTO", "AUTO-CLOSEST", "STATIC" }); @@ -774,11 +776,11 @@ void Aim(CachedEntity *entity) // A function to check whether player can autoshoot void DoAutoshoot() { - // Enable check if (!autoshoot) return; - + if (IsPlayerDisguised(g_pLocalPlayer->entity) && !autoshoot_disguised) + return; // Handle Compound bow if (g_pLocalPlayer->weapon()->m_iClassID() == CL_CLASS(CTFCompoundBow)) { diff --git a/src/helpers.cpp b/src/helpers.cpp index db53bcd6..881ed092 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -855,6 +855,13 @@ bool IsPlayerInvisible(CachedEntity *player) player); } +bool IsPlayerDisguised(CachedEntity *player) +{ + return HasConditionMask( + player); +} + // F1 c&p Vector CalcAngle(Vector src, Vector dst) { diff --git a/src/visual/menu/ncc/Menu.cpp b/src/visual/menu/ncc/Menu.cpp index 55fe7f2b..b60af187 100644 --- a/src/visual/menu/ncc/Menu.cpp +++ b/src/visual/menu/ncc/Menu.cpp @@ -295,6 +295,7 @@ static const std::string list_tf2 = R"( "aimbot_aimkey" "aimbot_aimkey_mode" "aimbot_autoshoot" + "aimbot_autoshoot_disguised" "aimbot_hitboxmode" "aimbot_fov" "aimbot_fov_draw" From 6d6679f8693297c3ccf9a3ec3dc75cfcd82ee430 Mon Sep 17 00:00:00 2001 From: TotallyNotElite <1yourexperiment@protonmail.com> Date: Sat, 26 May 2018 20:45:13 +0200 Subject: [PATCH 3/3] Spy ambassador wait for charge and todo list update UNTESTED!!! Don't have an amby! --- TODO | 18 +++++++++--------- src/hacks/Aimbot.cpp | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/TODO b/TODO index e62d997b..2986b573 100755 --- a/TODO +++ b/TODO @@ -18,7 +18,7 @@ Hook + Aimbot FIX // // // // // // // // Make hacks respect Mannpower powerups and other conditions when calcuating damage, hitbox and prioritizing targets // // -Proper AutoHitbox, Isnt this already a thing?? // // + // // // // Flare aim on fire // // Improve Projectile Aimbot. A lot. // // @@ -41,9 +41,9 @@ add Spectator Silent for projectile weapons // // // // Improve aimbot accuracy // // // // -Add Multipoint (Take hitbox, shrink it, then use corners as points to check) // // + // // // // -Make ambasador check rely on wait for charge user setting // // + // // // // //------------------------------------------------------------------------------------------------------------------// // // // @@ -55,14 +55,14 @@ Make ambasador check rely on wait for charge user setting // // //Visuals/GUI // //------------------------------------------------------------------------------------------------------------------// // // // -Display on the left // // + // // // // -make gui color change // // + // // // // Cheat status menu (A gui to display enabled/disabled states of user settings for when the menu is off) // // // // add teleporter count down // // -add spy cloak esp // // + // // // // Make ubercharge esp color RGB when fully charged // // // // @@ -87,11 +87,11 @@ Tracers/Spy Cam // // //------------------------------------------------------------------------------------------------------------------// // // // TTS // // -namesteal // // -autovote // // + // // + // // // // dominatesay assistsay worldsay // // -InsultSpam // // + // // // // //------------------------------------------------------------------------------------------------------------------// // // // diff --git a/src/hacks/Aimbot.cpp b/src/hacks/Aimbot.cpp index bfc268dc..662f3b54 100644 --- a/src/hacks/Aimbot.cpp +++ b/src/hacks/Aimbot.cpp @@ -823,7 +823,7 @@ void DoAutoshoot() if (IsAmbassador(g_pLocalPlayer->weapon())) { // Check if ambasador can headshot - if (!AmbassadorCanHeadshot()) + if (!AmbassadorCanHeadshot() && wait_for_charge) attack = false; } }