Merge pull request #192 from julianacat/master
Updated followbot code + Misc changes
This commit is contained in:
commit
88698cfa39
198
TODO
198
TODO
@ -1,67 +1,141 @@
|
|||||||
MULTIPLATFORM:
|
//==================================================================================================//
|
||||||
|
//Big TODO list for cathook //
|
||||||
Signature Scanner
|
//Organized by Julianacat //
|
||||||
Whole IPC thing | actually, no. cathook for windows WON'T have followbots/ipc.
|
//==================================================================================================//
|
||||||
Signatures and offsets
|
|
||||||
File handling (playerlist, spam, etc...)
|
|
||||||
CMake?
|
|
||||||
|
|
||||||
------------====-----------
|
|
||||||
|
|
||||||
|
|
||||||
TF2C teams
|
|
||||||
TF2C merc
|
|
||||||
HL2DM teams
|
|
||||||
|
|
||||||
fullbright toggle
|
//----------------------------------------------------------------------------------------------------------------------//
|
||||||
Hunter Rifle
|
//Aimbot/Triggerbot //
|
||||||
TTS
|
//------------------------------------------------------------------------------------------------------------------// //
|
||||||
namesteal
|
// //
|
||||||
autovote
|
Hook + Aimbot FIX // //
|
||||||
voice command spam (not like 1 voice command every 1 ms but like just spamming it on the menu)
|
// //
|
||||||
|
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?? // //
|
||||||
|
// //
|
||||||
|
Flare aim on fire // //
|
||||||
|
Improve Projectile Aimbot. A lot. // //
|
||||||
|
ProjPredOrigin // //
|
||||||
|
MAX -> MIN priority // //
|
||||||
|
// //
|
||||||
|
Hunter Rifle? // //
|
||||||
|
// //
|
||||||
|
AutoDetonator // //
|
||||||
|
// //
|
||||||
|
No AutoShoot when disguised // //
|
||||||
|
Ambassador bodyshotting // //
|
||||||
|
No Trigger Mediguns // //
|
||||||
|
More projectile weapons aimbot (wrap assassin, wrangler, stickybomb, airstrike) // //
|
||||||
|
Auto trigger DR before rockets // //
|
||||||
|
// //
|
||||||
|
Make make sentrys slightly lower priority (for getting those pesky turtle engies) // //
|
||||||
|
// //
|
||||||
|
Make building aimbot compensate for gravity on projectile weapons // //
|
||||||
|
// //
|
||||||
|
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 // //
|
||||||
|
// //
|
||||||
|
//------------------------------------------------------------------------------------------------------------------// //
|
||||||
|
// //
|
||||||
|
//----------------------------------------------------------------------------------------------------------------------//
|
||||||
|
|
||||||
dominatesay assistsay worldsay
|
|
||||||
AutoDetonator
|
|
||||||
|
|
||||||
ProjPredOrigin
|
|
||||||
MAX -> MIN priority
|
//----------------------------------------------------------------------------------------------------------------------//
|
||||||
Deflected by enemy player
|
//Visuals/GUI //
|
||||||
Aim Stickies
|
//------------------------------------------------------------------------------------------------------------------// //
|
||||||
FLAG ESP
|
// //
|
||||||
no aim sapper
|
Display on the left // //
|
||||||
Improve Projectile Aimbot. A lot.
|
// //
|
||||||
Proper AutoHitbox
|
make gui color change // //
|
||||||
Display on the left
|
// //
|
||||||
Flare aim on fire
|
Cheat status menu (A gui to display enabled/disabled states of user settings for when the menu is off) // //
|
||||||
Aim Sticky
|
// //
|
||||||
Proj Pred visuals
|
add teleporter count down // //
|
||||||
Hook + Aimbot FIX
|
add spy cloak esp // //
|
||||||
ESP Icons
|
// //
|
||||||
ESP Distance sort
|
Make ubercharge esp color RGB when fully charged // //
|
||||||
Show sapped buildings in ESP
|
// //
|
||||||
Make hacks respect Mannpower powerups and other conditions when calcuating damage, hitbox and prioritizing targets
|
fullbright toggle // //
|
||||||
Fake Lag
|
// //
|
||||||
Engine Prediction
|
FLAG ESP? // //
|
||||||
AutoSticky improve
|
// //
|
||||||
No AutoShoot when disguised
|
ESP Icons // //
|
||||||
Ambassador bodyshotting
|
ESP Distance sort // //
|
||||||
No Trigger Mediguns
|
Show sapped buildings in ESP // //
|
||||||
More projectile weapons aimbot (wrap assassin, wrangler, stickybomb, airstrike)
|
halloween medkits // //
|
||||||
Auto trigger DR before rockets
|
carrying esp // //
|
||||||
Sticky vischeck
|
Tracers/Spy Cam // //
|
||||||
InsultSpam
|
// //
|
||||||
Critical rifles bodyshotting
|
//------------------------------------------------------------------------------------------------------------------// //
|
||||||
FLAG ESP
|
// //
|
||||||
Spy alert uses angles
|
//----------------------------------------------------------------------------------------------------------------------//
|
||||||
halloween medkits
|
|
||||||
carrying esp
|
|
||||||
Tracers/Spy Cam
|
|
||||||
Bodyshot if not zoomed
|
//----------------------------------------------------------------------------------------------------------------------//
|
||||||
Proper medic followbot AI
|
//Chat and Related //
|
||||||
Bot option for aiming at owner's prey (just for fun)
|
//------------------------------------------------------------------------------------------------------------------// //
|
||||||
Bot pathfinding & navigation files system
|
// //
|
||||||
Proper entity classes (actually I might just use a lot of helper functions taking IClientEntity* as first arg)
|
TTS // //
|
||||||
Priority system optimization and testing
|
namesteal // //
|
||||||
General optimization and refactoring
|
autovote // //
|
||||||
Bone ESP
|
// //
|
||||||
XorString or something to make it harder to detect.
|
dominatesay assistsay worldsay // //
|
||||||
|
InsultSpam // //
|
||||||
|
// //
|
||||||
|
//------------------------------------------------------------------------------------------------------------------// //
|
||||||
|
// //
|
||||||
|
//----------------------------------------------------------------------------------------------------------------------//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------------------------//
|
||||||
|
//Followbots //
|
||||||
|
//------------------------------------------------------------------------------------------------------------------// //
|
||||||
|
// //
|
||||||
|
Proper medic followbot AI, breadcrumb followbot is good but a nav system would be better // //
|
||||||
|
// //
|
||||||
|
Bot option for aiming at owner's prey (just for fun) // //
|
||||||
|
Bot pathfinding & navigation files system // //
|
||||||
|
Proper entity classes (actually I might just use a lot of helper functions taking IClientEntity* as first arg) // //
|
||||||
|
// //
|
||||||
|
//------------------------------------------------------------------------------------------------------------------// //
|
||||||
|
// //
|
||||||
|
//----------------------------------------------------------------------------------------------------------------------//
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------------------------------------------------//
|
||||||
|
//Misc //
|
||||||
|
//------------------------------------------------------------------------------------------------------------------// //
|
||||||
|
// //
|
||||||
|
Proper Fake Lag // //
|
||||||
|
Add auto-strafe // //
|
||||||
|
// //
|
||||||
|
Fix achievement hack getting blocked with sv_cheats // //
|
||||||
|
// //
|
||||||
|
Spy alert uses angles // //
|
||||||
|
// //
|
||||||
|
Add ignore gunslinger to melee crit hack // //
|
||||||
|
// //
|
||||||
|
Priority system optimization and testing // //
|
||||||
|
General optimization and refactoring // //
|
||||||
|
// //
|
||||||
|
XorString or something to make it harder to detect. // //
|
||||||
|
// //
|
||||||
|
TF2C teams // //
|
||||||
|
TF2C merc // //
|
||||||
|
HL2DM teams // //
|
||||||
|
// //
|
||||||
|
//------------------------------------------------------------------------------------------------------------------// //
|
||||||
|
// //
|
||||||
|
//----------------------------------------------------------------------------------------------------------------------//
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 94a287d6faa00d44e1084b04e602842849858443
|
Subproject commit e532876ffd707a48389d54ff904dcc40a84f2839
|
@ -79,6 +79,9 @@ void DrawCheatVisuals() {
|
|||||||
PROF_SECTION(PT_spyalert);
|
PROF_SECTION(PT_spyalert);
|
||||||
SAFE_CALL(hacks::tf::spyalert::Draw());
|
SAFE_CALL(hacks::tf::spyalert::Draw());
|
||||||
}
|
}
|
||||||
|
#ifdef IPC_ENABLED
|
||||||
|
IF_GAME(IsTF()) SAFE_CALL(hacks::shared::followbot::Draw());
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
PROF_SECTION(DRAW_esp);
|
PROF_SECTION(DRAW_esp);
|
||||||
hacks::shared::esp::Draw();
|
hacks::shared::esp::Draw();
|
||||||
|
@ -55,6 +55,7 @@ static CatVar wait_for_charge(CV_SWITCH, "aimbot_charge", "0", "Wait for sniper
|
|||||||
static CatVar ignore_vaccinator(CV_SWITCH, "aimbot_ignore_vaccinator", "1", "Ignore Vaccinator", "Hitscan weapons won't fire if enemy is vaccinated against bullets");
|
static CatVar ignore_vaccinator(CV_SWITCH, "aimbot_ignore_vaccinator", "1", "Ignore Vaccinator", "Hitscan weapons won't fire if enemy is vaccinated against bullets");
|
||||||
static CatVar ignore_hoovy(CV_SWITCH, "aimbot_ignore_hoovy", "0", "Ignore Hoovies", "Aimbot won't attack hoovies");
|
static CatVar ignore_hoovy(CV_SWITCH, "aimbot_ignore_hoovy", "0", "Ignore Hoovies", "Aimbot won't attack hoovies");
|
||||||
static CatVar ignore_cloak(CV_SWITCH, "aimbot_ignore_cloak", "1", "Ignore cloaked", "Don't aim at invisible enemies");
|
static CatVar ignore_cloak(CV_SWITCH, "aimbot_ignore_cloak", "1", "Ignore cloaked", "Don't aim at invisible enemies");
|
||||||
|
static CatVar ignore_deadringer(CV_SWITCH, "aimbot_ignore_deadringer", "1", "Ignore deadringer", "Don't aim at deadringed enemies");
|
||||||
static CatVar buildings_sentry(CV_SWITCH, "aimbot_buildings_sentry", "1", "Aim Sentry", "Should aimbot aim at sentryguns?");
|
static CatVar buildings_sentry(CV_SWITCH, "aimbot_buildings_sentry", "1", "Aim Sentry", "Should aimbot aim at sentryguns?");
|
||||||
static CatVar buildings_other(CV_SWITCH, "aimbot_buildings_other", "1", "Aim Other building", "Should aimbot aim at other buildings");
|
static CatVar buildings_other(CV_SWITCH, "aimbot_buildings_other", "1", "Aim Other building", "Should aimbot aim at other buildings");
|
||||||
static CatVar stickybot(CV_SWITCH, "aimbot_stickys", "0", "Aim Sticky", "Should aimbot aim at stickys");
|
static CatVar stickybot(CV_SWITCH, "aimbot_stickys", "0", "Aim Sticky", "Should aimbot aim at stickys");
|
||||||
@ -92,6 +93,8 @@ static CatVar huntsman_full_auto(CV_SWITCH, "aimbot_full_auto_huntsman", "1", "A
|
|||||||
// Debug vars
|
// Debug vars
|
||||||
static CatVar aimbot_debug(CV_SWITCH, "aimbot_debug", "0", "Aimbot Debug", "Display simple debug info for aimbot");
|
static CatVar aimbot_debug(CV_SWITCH, "aimbot_debug", "0", "Aimbot Debug", "Display simple debug info for aimbot");
|
||||||
static CatVar engine_projpred(CV_SWITCH, "debug_aimbot_engine_pp", "0", "Engine ProjPred");
|
static CatVar engine_projpred(CV_SWITCH, "debug_aimbot_engine_pp", "0", "Engine ProjPred");
|
||||||
|
// Followbot vars
|
||||||
|
static CatVar auto_spin_up(CV_SWITCH, "aimbot_spin_up", "0", "Auto Spin Up", "Spin up minigun if you can see target, useful for followbots");
|
||||||
/* TODO IMPLEMENT
|
/* TODO IMPLEMENT
|
||||||
static CatVar auto_spin_up(CV_SWITCH, "aimbot_spin_up", "0", "Auto Spin Up", "Spin up minigun if you can see target, useful for followbots");
|
static CatVar auto_spin_up(CV_SWITCH, "aimbot_spin_up", "0", "Auto Spin Up", "Spin up minigun if you can see target, useful for followbots");
|
||||||
static CatVar auto_zoom(CV_SWITCH, "aimbot_auto_zoom", "0", "Auto Zoom", "Automatically zoom in if you can see target, useful for followbots");
|
static CatVar auto_zoom(CV_SWITCH, "aimbot_auto_zoom", "0", "Auto Zoom", "Automatically zoom in if you can see target, useful for followbots");
|
||||||
@ -120,10 +123,6 @@ void CreateMove() {
|
|||||||
// Check if aimbot is enabled
|
// Check if aimbot is enabled
|
||||||
if (!enabled) return;
|
if (!enabled) return;
|
||||||
|
|
||||||
// Save should aim info
|
|
||||||
bool shouldAim = ShouldAim();
|
|
||||||
bool aimkeyStatus = UpdateAimkey();
|
|
||||||
|
|
||||||
// Refresh projectile info
|
// Refresh projectile info
|
||||||
int huntsman_ticks = 0;
|
int huntsman_ticks = 0;
|
||||||
projectile_mode = (GetProjectileData(g_pLocalPlayer->weapon(), cur_proj_speed, cur_proj_grav));
|
projectile_mode = (GetProjectileData(g_pLocalPlayer->weapon(), cur_proj_speed, cur_proj_grav));
|
||||||
@ -140,23 +139,27 @@ void CreateMove() {
|
|||||||
huntsman_ticks = max(0, huntsman_ticks - 1);
|
huntsman_ticks = max(0, huntsman_ticks - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Save should aim info
|
||||||
|
// We do this as we need to pass whether the aimkey allows aiming to both the find target and aiming system. If we just call the func than toggle aimkey would break so we save it to a var to use it twice
|
||||||
|
bool aimkey_status = UpdateAimkey();
|
||||||
|
|
||||||
// Refresh our best target
|
// Refresh our best target
|
||||||
CachedEntity* target = RetrieveBestTarget(aimkeyStatus);
|
CachedEntity* target = RetrieveBestTarget(aimkey_status);
|
||||||
|
|
||||||
// Check target for dormancy and if there even is a target at all
|
// Check target for dormancy and if there even is a target at all
|
||||||
if (CE_GOOD(target) && foundTarget) {
|
if (CE_GOOD(target) && foundTarget) {
|
||||||
|
|
||||||
// Set target esp color to pink
|
// Set target esp color to pink
|
||||||
hacks::shared::esp::SetEntityColor(target, colors::pink);
|
hacks::shared::esp::SetEntityColor(target, colors::pink);
|
||||||
|
|
||||||
// Check if player can aim and if aimkey allows aiming
|
// Check if player can aim and if aimkey allows aiming
|
||||||
// We also preform a CanShoot check here per the old canshoot method
|
// We also preform a CanShoot check here per the old canshoot method
|
||||||
if (shouldAim && aimkeyStatus && GetCanAim(1)) {
|
if (ShouldAim() && aimkey_status && GetCanAim(1)) {
|
||||||
|
|
||||||
// Check if player isnt using a huntsman
|
// Check if player isnt using a huntsman
|
||||||
if (g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFCompoundBow)) {
|
if (g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFCompoundBow)) {
|
||||||
|
|
||||||
// If settings allow, limit aiming to only when can shoot
|
// We check if we need to do a canshoot check as we might want to shoot but not aim, so do that check here
|
||||||
// We do this here only if wip is true as we do the check elsewhere for legacy
|
|
||||||
if (GetCanAim(2)) {
|
if (GetCanAim(2)) {
|
||||||
// Check the flNextPrimaryAttack netvar to tell when to aim
|
// Check the flNextPrimaryAttack netvar to tell when to aim
|
||||||
if (CanShoot()) Aim(target);
|
if (CanShoot()) Aim(target);
|
||||||
@ -250,6 +253,7 @@ bool ShouldAim() {
|
|||||||
return false;
|
return false;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
IF_GAME (IsTF()) {
|
IF_GAME (IsTF()) {
|
||||||
// Check if player is zooming
|
// Check if player is zooming
|
||||||
if (g_pLocalPlayer->bZoomed) {
|
if (g_pLocalPlayer->bZoomed) {
|
||||||
@ -257,8 +261,19 @@ bool ShouldAim() {
|
|||||||
if (!CanHeadshot()) return false;
|
if (!CanHeadshot()) return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
IF_GAME (IsTF()) {
|
// Minigun spun up handler
|
||||||
|
if (g_pLocalPlayer->weapon()->m_iClassID == CL_CLASS(CTFMinigun)) {
|
||||||
|
int weapon_state = CE_INT(g_pLocalPlayer->weapon(), netvar.iWeaponState);
|
||||||
|
// If user setting for autospin isnt true, then we check if minigun is already zoomed
|
||||||
|
if ((weapon_state == MinigunState_t::AC_STATE_IDLE || weapon_state == MinigunState_t::AC_STATE_STARTFIRING) && !auto_spin_up) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!(g_pUserCmd->buttons & (IN_ATTACK2 | IN_ATTACK))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check if crithack allows attacking
|
// Check if crithack allows attacking
|
||||||
if (!AllowAttacking())
|
if (!AllowAttacking())
|
||||||
return false;
|
return false;
|
||||||
@ -357,8 +372,18 @@ bool IsTargetStateGood(CachedEntity* entity) {
|
|||||||
if (ignore_taunting && HasCondition<TFCond_Taunting>(entity)) return false;
|
if (ignore_taunting && HasCondition<TFCond_Taunting>(entity)) return false;
|
||||||
// Dont target invulnerable players, ex: uber, bonk
|
// Dont target invulnerable players, ex: uber, bonk
|
||||||
if (IsPlayerInvulnerable(entity)) return false;
|
if (IsPlayerInvulnerable(entity)) return false;
|
||||||
// If settings allow, dont target cloaked players
|
// Checks for cloaked/deadringed players
|
||||||
if (ignore_cloak && IsPlayerInvisible(entity)) return false;
|
if (ignore_cloak || ignore_deadringer) {
|
||||||
|
if (IsPlayerInvisible(entity)) {
|
||||||
|
// Determine whether cloaked player is using deadringer and checks user settings accordingly
|
||||||
|
// Item id for deadringer is 59 as of time of creation
|
||||||
|
if (HasWeapon(entity, 59)) {
|
||||||
|
if (ignore_deadringer) return false;
|
||||||
|
} else {
|
||||||
|
if (ignore_cloak) return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// If settings allow, dont target vaccinated players
|
// If settings allow, dont target vaccinated players
|
||||||
if (g_pLocalPlayer->weapon_mode == weaponmode::weapon_hitscan || LOCAL_W->m_iClassID == CL_CLASS(CTFCompoundBow))
|
if (g_pLocalPlayer->weapon_mode == weaponmode::weapon_hitscan || LOCAL_W->m_iClassID == CL_CLASS(CTFCompoundBow))
|
||||||
if (ignore_vaccinator && HasCondition<TFCond_UberBulletResist>(entity)) return false;
|
if (ignore_vaccinator && HasCondition<TFCond_UberBulletResist>(entity)) return false;
|
||||||
@ -892,7 +917,7 @@ void Reset() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Function called when we need to draw to screen
|
// Function called when we need to draw to screen
|
||||||
static CatVar fov_draw(CV_SWITCH, "aimbot_fov_draw", "0", "Draw Fov Ring", "Draws a ring to represent your current aimbot fov\nDoesnt change according to zoom fov\nWIP");
|
static CatVar fov_draw(CV_SWITCH, "aimbot_fov_draw", "0", "Draw Fov Ring", "Draws a ring to represent your current aimbot fov");
|
||||||
void DrawText() {
|
void DrawText() {
|
||||||
// Dont draw to screen when aimbot is disabled
|
// Dont draw to screen when aimbot is disabled
|
||||||
if (!enabled) return;
|
if (!enabled) return;
|
||||||
@ -908,13 +933,13 @@ void DrawText() {
|
|||||||
// Grab the screen resolution and save to some vars
|
// Grab the screen resolution and save to some vars
|
||||||
int width, height;
|
int width, height;
|
||||||
g_IEngine->GetScreenSize(width, height);
|
g_IEngine->GetScreenSize(width, height);
|
||||||
// Some math to find radius of the fov circle
|
|
||||||
// float radius = tanf(DEG2RAD((float)fov) / 2) / tanf(DEG2RAD(draw::fov) / 2) * width;
|
|
||||||
|
|
||||||
|
// Some math to find radius of the fov circle
|
||||||
float mon_fov = (float(width) / float(height) / (4.0f / 3.0f));
|
float mon_fov = (float(width) / float(height) / (4.0f / 3.0f));
|
||||||
float fov_real = RAD2DEG(2 * atanf(mon_fov * tanf(DEG2RAD(draw::fov / 2))));
|
float fov_real = RAD2DEG(2 * atanf(mon_fov * tanf(DEG2RAD(draw::fov / 2))));
|
||||||
|
|
||||||
float radius = tan(DEG2RAD(float(fov)) / 2) / tan(DEG2RAD(fov_real) / 2) * (width);
|
float radius = tan(DEG2RAD(float(fov)) / 2) / tan(DEG2RAD(fov_real) / 2) * (width);
|
||||||
|
|
||||||
// Draw a circle with our newfound circle
|
// Draw a circle with our newfound circle
|
||||||
float px = 0;
|
float px = 0;
|
||||||
float py = 0;
|
float py = 0;
|
||||||
|
@ -33,6 +33,10 @@ void CreateMove() {
|
|||||||
|
|
||||||
// Check if player is using a flame thrower
|
// Check if player is using a flame thrower
|
||||||
if (g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFFlameThrower)) return;
|
if (g_pLocalPlayer->weapon()->m_iClassID != CL_CLASS(CTFFlameThrower)) return;
|
||||||
|
|
||||||
|
// Check for phlogistinator, which is item 594
|
||||||
|
if (HasWeapon(LOCAL_E, 594)) return;
|
||||||
|
|
||||||
// If user settings allow, return if local player is in attack
|
// If user settings allow, return if local player is in attack
|
||||||
if (idle_only && (g_pUserCmd->buttons & IN_ATTACK)) return;
|
if (idle_only && (g_pUserCmd->buttons & IN_ATTACK)) return;
|
||||||
|
|
||||||
|
@ -77,11 +77,14 @@ void CreateMove() {
|
|||||||
// Check user settings if auto-sticky is enabled
|
// Check user settings if auto-sticky is enabled
|
||||||
if (!enabled) return;
|
if (!enabled) return;
|
||||||
|
|
||||||
|
// Check if game is a tf game
|
||||||
|
//IF_GAME (!IsTF()) return;
|
||||||
|
|
||||||
// Check if player is demoman
|
// Check if player is demoman
|
||||||
if (g_pLocalPlayer->clazz != tf_demoman) return;
|
if (g_pLocalPlayer->clazz != tf_demoman) return;
|
||||||
|
|
||||||
// Check for sticky jumper, which is item 265, if true, return
|
// Check for sticky jumper, which is item 265, if true, return
|
||||||
if (HasWeapon(LOCAL_E, 265));
|
if (HasWeapon(LOCAL_E, 265)) return;
|
||||||
|
|
||||||
// Clear the arrays
|
// Clear the arrays
|
||||||
bombs.clear();
|
bombs.clear();
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -18,19 +18,32 @@ class CachedEntity;
|
|||||||
|
|
||||||
namespace hacks { namespace shared { namespace followbot {
|
namespace hacks { namespace shared { namespace followbot {
|
||||||
|
|
||||||
extern CatCommand move_to_crosshair;
|
enum class EFollowType {
|
||||||
extern CatCommand follow;
|
VECTOR, // When we need to goto a vector
|
||||||
extern CatCommand follow_entity;
|
ENTITY // when we dont have a specific steamid, but we still want to follow an entity
|
||||||
|
};
|
||||||
|
|
||||||
|
//extern CatCommand move_to_crosshair;
|
||||||
|
//extern CatCommand follow;
|
||||||
|
//extern CatCommand follow_entity;
|
||||||
extern CatVar bot;
|
extern CatVar bot;
|
||||||
|
|
||||||
extern unsigned follow_steamid;
|
extern unsigned follow_steamid;
|
||||||
extern int following_idx;
|
extern int following_idx;
|
||||||
|
|
||||||
bool IsBot(CachedEntity* entity);
|
bool IsBot(CachedEntity* entity);
|
||||||
void DoWalking();
|
|
||||||
void PrintDebug();
|
|
||||||
void AddMessageHandlers(ipc::peer_t* peer);
|
void AddMessageHandlers(ipc::peer_t* peer);
|
||||||
void AfterCreateMove();
|
void AfterCreateMove();
|
||||||
|
void Draw();
|
||||||
|
void CrumbReset();
|
||||||
|
void CrumbTopAdd(Vector crumbToAdd);
|
||||||
|
void CrumbBottomAdd();
|
||||||
|
void DoWalking();
|
||||||
|
void DrawFollowbot();
|
||||||
|
std::pair<float, float> ComputeMove(const Vector& a, const Vector& b);
|
||||||
|
void WalkTo(const Vector& vector);
|
||||||
|
unsigned MakeMask();
|
||||||
|
void SelectEntity(int idx);
|
||||||
|
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
|
@ -14,9 +14,14 @@ static CatEnum spam_enum({"DISABLED", "CUSTOM", "DEFAULT", "LENNYFACES", "BLANKS
|
|||||||
CatVar spam_source(spam_enum, "spam", "0", "Chat Spam", "Defines source of spam lines. CUSTOM spam file must be set in cat_spam_file and loaded with cat_spam_reload (Use console!)");
|
CatVar spam_source(spam_enum, "spam", "0", "Chat Spam", "Defines source of spam lines. CUSTOM spam file must be set in cat_spam_file and loaded with cat_spam_reload (Use console!)");
|
||||||
CatVar random_order(CV_SWITCH, "spam_random", "0", "Random Order");
|
CatVar random_order(CV_SWITCH, "spam_random", "0", "Random Order");
|
||||||
CatVar filename(CV_STRING, "spam_file", "spam.txt", "Spam file", "Spam file name. Each line should be no longer than 100 characters, file must be located in cathook data folder");
|
CatVar filename(CV_STRING, "spam_file", "spam.txt", "Spam file", "Spam file name. Each line should be no longer than 100 characters, file must be located in cathook data folder");
|
||||||
CatVar teamname_spam(CV_SWITCH, "spam_teamname", "0", "Teamname Spam", "Spam changes the tournament name");
|
|
||||||
CatCommand reload("spam_reload", "Reload spam file", Reload);
|
CatCommand reload("spam_reload", "Reload spam file", Reload);
|
||||||
|
|
||||||
|
static CatEnum voicecommand_enum({"DISABLED", "RANDOM", "MEDIC", "THANKS", "NICE SHOT", "CHEERS", "JEERS"});
|
||||||
|
CatVar voicecommand_spam(voicecommand_enum, "spam_voicecommand", "0", "Voice Command Spam", "Spams tf voice commands");
|
||||||
|
|
||||||
|
CatVar teamname_spam(CV_SWITCH, "spam_teamname", "0", "Teamname Spam", "Spam changes the tournament name");
|
||||||
|
|
||||||
|
|
||||||
bool teamname_swap = false;
|
bool teamname_swap = false;
|
||||||
int current_index { 0 };
|
int current_index { 0 };
|
||||||
float last_spam { 0.0f };
|
float last_spam { 0.0f };
|
||||||
@ -24,6 +29,8 @@ TextFile file {};
|
|||||||
|
|
||||||
const std::string teams[] = { "RED", "BLU" };
|
const std::string teams[] = { "RED", "BLU" };
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// FUCK enum class.
|
// FUCK enum class.
|
||||||
// It doesn't have bitwise operators by default!! WTF!! static_cast<int>(REEE)!
|
// It doesn't have bitwise operators by default!! WTF!! static_cast<int>(REEE)!
|
||||||
|
|
||||||
@ -172,15 +179,46 @@ bool FormatSpamMessage(std::string& message) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void CreateMove() {
|
void CreateMove() {
|
||||||
if (teamname_spam) {
|
|
||||||
if (teamname_swap) {
|
IF_GAME (IsTF2()) {
|
||||||
teamname_swap = false;
|
// Spam changes the tournament name in casual and compeditive gamemodes
|
||||||
g_IEngine->ServerCmd("tournament_teamname Cat");
|
if (teamname_spam) {
|
||||||
} else {
|
if (teamname_swap) {
|
||||||
teamname_swap = true;
|
teamname_swap = false;
|
||||||
g_IEngine->ServerCmd("tournament_teamname Hook");
|
g_IEngine->ServerCmd("tournament_teamname Cat");
|
||||||
|
} else {
|
||||||
|
teamname_swap = true;
|
||||||
|
g_IEngine->ServerCmd("tournament_teamname Hook");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (voicecommand_spam) {
|
||||||
|
static float last_voice_spam = 0.0f;
|
||||||
|
if (g_GlobalVars->curtime - 4.0F > last_voice_spam) {
|
||||||
|
switch ((int)voicecommand_spam) {
|
||||||
|
case 1: // RANDOM
|
||||||
|
g_IEngine->ServerCmd(format("voicemenu ", floor(RandFloatRange(0, 2.9)), " ", floor(RandFloatRange(0, 8.9))).c_str());
|
||||||
|
break;
|
||||||
|
case 2: // MEDIC
|
||||||
|
g_IEngine->ServerCmd("voicemenu 0 0");
|
||||||
|
break;
|
||||||
|
case 3: // THANKS
|
||||||
|
g_IEngine->ServerCmd("voicemenu 0 1");
|
||||||
|
break;
|
||||||
|
case 4: // NICE SHOT
|
||||||
|
g_IEngine->ServerCmd("voicemenu 2 6");
|
||||||
|
break;
|
||||||
|
case 5: // CHEERS
|
||||||
|
g_IEngine->ServerCmd("voicemenu 2 2");
|
||||||
|
break;
|
||||||
|
case 6: // JEERS
|
||||||
|
g_IEngine->ServerCmd("voicemenu 2 3");
|
||||||
|
}
|
||||||
|
last_voice_spam = g_GlobalVars->curtime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!spam_source) return;
|
if (!spam_source) return;
|
||||||
static int safety_ticks = 0;
|
static int safety_ticks = 0;
|
||||||
static int last_spam = 0;
|
static int last_spam = 0;
|
||||||
|
@ -27,6 +27,8 @@ static CatVar trigger_key_mode(trigger_key_modes_enum, "trigger_key_mode", "1",
|
|||||||
static CatEnum hitbox_mode_enum({ "AUTO-HEAD", "AUTO-CLOSEST", "Head only" });
|
static CatEnum hitbox_mode_enum({ "AUTO-HEAD", "AUTO-CLOSEST", "Head only" });
|
||||||
static CatVar hitbox_mode(hitbox_mode_enum, "trigger_hitboxmode", "0", "Hitbox Mode", "Defines hitbox selection mode");
|
static CatVar hitbox_mode(hitbox_mode_enum, "trigger_hitboxmode", "0", "Hitbox Mode", "Defines hitbox selection mode");
|
||||||
|
|
||||||
|
static CatVar accuracy(CV_INT, "trigger_accuracy", "0", "Improve accuracy", "Improves triggerbot accuracy when aiming for specific hitbox");
|
||||||
|
|
||||||
static CatVar ignore_vaccinator(CV_SWITCH, "trigger_ignore_vaccinator", "1", "Ignore Vaccinator", "Hitscan weapons won't fire if enemy is vaccinated against bullets");
|
static CatVar ignore_vaccinator(CV_SWITCH, "trigger_ignore_vaccinator", "1", "Ignore Vaccinator", "Hitscan weapons won't fire if enemy is vaccinated against bullets");
|
||||||
static CatVar ignore_hoovy(CV_SWITCH, "trigger_ignore_hoovy", "1", "Ignore Hoovies", "Triggerbot won't attack hoovies");
|
static CatVar ignore_hoovy(CV_SWITCH, "trigger_ignore_hoovy", "1", "Ignore Hoovies", "Triggerbot won't attack hoovies");
|
||||||
static CatVar ignore_cloak(CV_SWITCH, "trigger_ignore_cloak", "1", "Ignore cloaked", "Don't trigger at invisible enemies");
|
static CatVar ignore_cloak(CV_SWITCH, "trigger_ignore_cloak", "1", "Ignore cloaked", "Don't trigger at invisible enemies");
|
||||||
@ -42,6 +44,7 @@ static CatVar max_range(CV_INT, "trigger_maxrange", "0", "Max distance",
|
|||||||
"900-1100 range is efficient for scout/widowmaker engineer", 4096.0f);
|
"900-1100 range is efficient for scout/widowmaker engineer", 4096.0f);
|
||||||
|
|
||||||
int last_hb_traced = 0;
|
int last_hb_traced = 0;
|
||||||
|
Vector forward;
|
||||||
|
|
||||||
// The main "loop" of the triggerbot
|
// The main "loop" of the triggerbot
|
||||||
void CreateMove() {
|
void CreateMove() {
|
||||||
@ -170,6 +173,35 @@ bool IsTargetStateGood(CachedEntity* entity) {
|
|||||||
if (last_hb_traced != hitbox_t::head) return false;
|
if (last_hb_traced != hitbox_t::head) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If usersettings tell us to use accuracy improvements and the cached hitbox isnt null, then we check if it hits here
|
||||||
|
if (accuracy) {
|
||||||
|
|
||||||
|
// Get a cached hitbox for the one traced
|
||||||
|
hitbox_cache::CachedHitbox* hb = entity->hitboxes.GetHitbox(last_hb_traced);
|
||||||
|
|
||||||
|
// Check for null
|
||||||
|
if (hb) {
|
||||||
|
|
||||||
|
// Get the min and max for the hitbox
|
||||||
|
Vector minz(min(hb->min.x, hb->max.x), min(hb->min.y, hb->max.y), min(hb->min.z, hb->max.z));
|
||||||
|
Vector maxz(max(hb->min.x, hb->max.x), max(hb->min.y, hb->max.y), max(hb->min.z, hb->max.z));
|
||||||
|
|
||||||
|
// Shrink the hitbox here
|
||||||
|
Vector size = maxz - minz;
|
||||||
|
Vector smod = size * 0.05f * (int)accuracy;
|
||||||
|
|
||||||
|
// Save the changes to the vectors
|
||||||
|
minz += smod;
|
||||||
|
maxz -= smod;
|
||||||
|
|
||||||
|
// Trace and test if it hits the smaller hitbox, if it fails we return false
|
||||||
|
Vector hit;
|
||||||
|
if (!CheckLineBox(minz, maxz, g_pLocalPlayer->v_Eye, forward, hit)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Target passed the tests so return true
|
// Target passed the tests so return true
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
@ -219,6 +251,7 @@ bool IsTargetStateGood(CachedEntity* entity) {
|
|||||||
|
|
||||||
// A function to return a potential entity in front of the player
|
// A function to return a potential entity in front of the player
|
||||||
CachedEntity* FindEntInSight(float range) {
|
CachedEntity* FindEntInSight(float range) {
|
||||||
|
|
||||||
// We dont want to hit ourself so we set an ignore
|
// We dont want to hit ourself so we set an ignore
|
||||||
trace_t trace;
|
trace_t trace;
|
||||||
trace::filter_default.SetSelf(RAW_ENT(g_pLocalPlayer->entity));
|
trace::filter_default.SetSelf(RAW_ENT(g_pLocalPlayer->entity));
|
||||||
@ -226,7 +259,6 @@ CachedEntity* FindEntInSight(float range) {
|
|||||||
// Use math to get a vector in front of the player
|
// Use math to get a vector in front of the player
|
||||||
float sp, sy, cp, cy;
|
float sp, sy, cp, cy;
|
||||||
QAngle angle;
|
QAngle angle;
|
||||||
Vector forward;
|
|
||||||
g_IEngine->GetViewAngles(angle);
|
g_IEngine->GetViewAngles(angle);
|
||||||
sy = sinf(DEG2RAD(angle[1]));
|
sy = sinf(DEG2RAD(angle[1]));
|
||||||
cy = cosf(DEG2RAD(angle[1]));
|
cy = cosf(DEG2RAD(angle[1]));
|
||||||
@ -246,6 +278,7 @@ CachedEntity* FindEntInSight(float range) {
|
|||||||
|
|
||||||
// Return an ent if that is what we hit
|
// Return an ent if that is what we hit
|
||||||
if (trace.m_pEnt) {
|
if (trace.m_pEnt) {
|
||||||
|
|
||||||
last_hb_traced = trace.hitbox;
|
last_hb_traced = trace.hitbox;
|
||||||
return ENTITY(((IClientEntity*)trace.m_pEnt)->entindex());
|
return ENTITY(((IClientEntity*)trace.m_pEnt)->entindex());
|
||||||
}
|
}
|
||||||
@ -384,6 +417,49 @@ float EffectiveTargetingRange() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Helper functions to trace for hitboxes
|
||||||
|
|
||||||
|
// TEMPORARY CODE.
|
||||||
|
// TODO
|
||||||
|
bool GetIntersection(float fDst1, float fDst2, Vector P1, Vector P2, Vector& Hit) {
|
||||||
|
if ((fDst1 * fDst2) >= 0.0f) return false;
|
||||||
|
if (fDst1 == fDst2) return false;
|
||||||
|
Hit = P1 + (P2 - P1) * (-fDst1 / (fDst2 - fDst1));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool InBox(Vector Hit, Vector B1, Vector B2, int Axis) {
|
||||||
|
if (Axis == 1 && Hit.z > B1.z && Hit.z < B2.z && Hit.y > B1.y && Hit.y < B2.y) return true;
|
||||||
|
if (Axis == 2 && Hit.z > B1.z && Hit.z < B2.z && Hit.x > B1.x && Hit.x < B2.x) return true;
|
||||||
|
if (Axis == 3 && Hit.x > B1.x && Hit.x < B2.x && Hit.y > B1.y && Hit.y < B2.y) return true;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CheckLineBox(Vector B1, Vector B2, Vector L1, Vector L2, Vector& Hit) {
|
||||||
|
if (L2.x < B1.x && L1.x < B1.x) return false;
|
||||||
|
if (L2.x > B2.x && L1.x > B2.x) return false;
|
||||||
|
if (L2.y < B1.y && L1.y < B1.y) return false;
|
||||||
|
if (L2.y > B2.y && L1.y > B2.y) return false;
|
||||||
|
if (L2.z < B1.z && L1.z < B1.z) return false;
|
||||||
|
if (L2.z > B2.z && L1.z > B2.z) return false;
|
||||||
|
if (L1.x > B1.x && L1.x < B2.x &&
|
||||||
|
L1.y > B1.y && L1.y < B2.y &&
|
||||||
|
L1.z > B1.z && L1.z < B2.z)
|
||||||
|
{
|
||||||
|
Hit = L1;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if ((GetIntersection(L1.x - B1.x, L2.x - B1.x, L1, L2, Hit) && InBox(Hit, B1, B2, 1))
|
||||||
|
|| (GetIntersection(L1.y - B1.y, L2.y - B1.y, L1, L2, Hit) && InBox(Hit, B1, B2, 2))
|
||||||
|
|| (GetIntersection(L1.z - B1.z, L2.z - B1.z, L1, L2, Hit) && InBox(Hit, B1, B2, 3))
|
||||||
|
|| (GetIntersection(L1.x - B2.x, L2.x - B2.x, L1, L2, Hit) && InBox(Hit, B1, B2, 1))
|
||||||
|
|| (GetIntersection(L1.y - B2.y, L2.y - B2.y, L1, L2, Hit) && InBox(Hit, B1, B2, 2))
|
||||||
|
|| (GetIntersection(L1.z - B2.z, L2.z - B2.z, L1, L2, Hit) && InBox(Hit, B1, B2, 3)))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void Draw() {
|
void Draw() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@ bool HeadPreferable(CachedEntity* target);
|
|||||||
bool UpdateAimkey();
|
bool UpdateAimkey();
|
||||||
float EffectiveTargetingRange();
|
float EffectiveTargetingRange();
|
||||||
void Draw();
|
void Draw();
|
||||||
|
bool CheckLineBox(Vector B1, Vector B2, Vector L1, Vector L2, Vector& Hit);
|
||||||
|
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
|
@ -16,14 +16,15 @@
|
|||||||
"type": "list",
|
"type": "list",
|
||||||
"name": "Ignore",
|
"name": "Ignore",
|
||||||
"list": [
|
"list": [
|
||||||
|
"aimbot_ignore_cloak",
|
||||||
|
"aimbot_ignore_deadringer",
|
||||||
|
"aimbot_ignore_vaccinator",
|
||||||
"ignore_taunting",
|
"ignore_taunting",
|
||||||
"aimbot_ignore_hoovy",
|
"aimbot_ignore_hoovy",
|
||||||
|
"aimbot_teammates",
|
||||||
"aimbot_buildings_sentry",
|
"aimbot_buildings_sentry",
|
||||||
"aimbot_buildings_other",
|
"aimbot_buildings_other",
|
||||||
"aimbot_stickys",
|
"aimbot_stickys"
|
||||||
"aimbot_teammates",
|
|
||||||
"aimbot_ignore_cloak",
|
|
||||||
"aimbot_ignore_vaccinator"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -110,11 +111,11 @@
|
|||||||
"name": "Auto Reflect",
|
"name": "Auto Reflect",
|
||||||
"list": [
|
"list": [
|
||||||
"reflect_enabled",
|
"reflect_enabled",
|
||||||
|
"reflect_key",
|
||||||
"reflect_legit",
|
"reflect_legit",
|
||||||
"reflect_only_idle",
|
"reflect_only_idle",
|
||||||
"reflect_stickybombs",
|
"reflect_stickybombs",
|
||||||
"reflect_dodgeball",
|
"reflect_dodgeball"
|
||||||
"reflect_key"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -138,6 +139,7 @@
|
|||||||
"trigger_maxrange",
|
"trigger_maxrange",
|
||||||
"trigger_charge",
|
"trigger_charge",
|
||||||
"trigger_hitboxmode",
|
"trigger_hitboxmode",
|
||||||
|
"trigger_accuracy",
|
||||||
"trigger_key_mode",
|
"trigger_key_mode",
|
||||||
"trigger_key"
|
"trigger_key"
|
||||||
]
|
]
|
||||||
@ -345,36 +347,23 @@
|
|||||||
"type": "list",
|
"type": "list",
|
||||||
"name": "Chat Settings",
|
"name": "Chat Settings",
|
||||||
"list": [
|
"list": [
|
||||||
|
"spam",
|
||||||
|
"killsay",
|
||||||
|
"uberspam",
|
||||||
|
"spam_file",
|
||||||
|
"killsay_file",
|
||||||
|
"spam_random",
|
||||||
"chat_newlines",
|
"chat_newlines",
|
||||||
"clean_chat",
|
"clean_chat",
|
||||||
"killsay",
|
"chat_crypto",
|
||||||
"killsay_file",
|
|
||||||
"spam",
|
|
||||||
"spam_random",
|
|
||||||
"spam_file",
|
|
||||||
"spam_teamname",
|
|
||||||
"uberspam",
|
|
||||||
"uberspam_build",
|
|
||||||
"uberspam_ready",
|
"uberspam_ready",
|
||||||
"uberspam_used",
|
"uberspam_used",
|
||||||
"uberspam_ended",
|
"uberspam_ended",
|
||||||
"uberspam_team",
|
"uberspam_team",
|
||||||
"uberspam_file"
|
"uberspam_build",
|
||||||
]
|
"uberspam_file",
|
||||||
},
|
"spam_voicecommand",
|
||||||
{
|
"spam_teamname"
|
||||||
"type": "list",
|
|
||||||
"name": "Follow Bot Settings",
|
|
||||||
"data": "ipc",
|
|
||||||
"list": [
|
|
||||||
"fb_bot",
|
|
||||||
"fb_auto_playerlist",
|
|
||||||
"fb_mimic_slot",
|
|
||||||
"fb_always_medigun",
|
|
||||||
"fb_autoclass",
|
|
||||||
"fb_follow_distance",
|
|
||||||
"ipc_server",
|
|
||||||
"fb_autoteam"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -392,6 +381,20 @@
|
|||||||
"ac_bhop_count"
|
"ac_bhop_count"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "list",
|
||||||
|
"name": "Followbot",
|
||||||
|
"list": [
|
||||||
|
"fb_bot",
|
||||||
|
"fb_distance",
|
||||||
|
"fb_activation",
|
||||||
|
"fb_roaming",
|
||||||
|
"fb_mimic_slot",
|
||||||
|
"fb_always_medigun",
|
||||||
|
"fb_sync_taunt",
|
||||||
|
"fb_crumb_draw"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "list",
|
"type": "list",
|
||||||
"name": "Miscellaneous",
|
"name": "Miscellaneous",
|
||||||
@ -492,6 +495,7 @@
|
|||||||
"debug_info",
|
"debug_info",
|
||||||
"log",
|
"log",
|
||||||
"setupbones_time",
|
"setupbones_time",
|
||||||
|
"nolerp",
|
||||||
"skinchanger_debug",
|
"skinchanger_debug",
|
||||||
"software_cursor_mode",
|
"software_cursor_mode",
|
||||||
"experimental_cursor_fix",
|
"experimental_cursor_fix",
|
||||||
|
Reference in New Issue
Block a user