This commit is contained in:
julianacat 2017-07-21 13:46:24 -05:00
parent 61654ba5e8
commit 5ae97a724f
4 changed files with 60 additions and 44 deletions

@ -1 +1 @@
Subproject commit 94a287d6faa00d44e1084b04e602842849858443 Subproject commit e532876ffd707a48389d54ff904dcc40a84f2839

View File

@ -52,7 +52,6 @@ static CatVar priority_mode(priority_mode_enum, "aimbot_prioritymode", "0", "Pri
"SMART: Basically Auto-Threat. Will be tweakable eventually. " "SMART: Basically Auto-Threat. Will be tweakable eventually. "
"FOV, DISTANCE, HEALTH are self-explainable. HEALTH picks the weakest enemy"); "FOV, DISTANCE, HEALTH are self-explainable. HEALTH picks the weakest enemy");
static CatVar wait_for_charge(CV_SWITCH, "aimbot_charge", "0", "Wait for sniper rifle charge", "Aimbot waits until it has enough charge to kill"); static CatVar wait_for_charge(CV_SWITCH, "aimbot_charge", "0", "Wait for sniper rifle charge", "Aimbot waits until it has enough charge to kill");
static CatVar wait_for_charge_bypass(CV_SWITCH, "aimbot_charge_if_full", "1", "Sniper rifle will shoot at 100% charge even if the shot will not kill", "Aimbot waits until 100% charge");
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");
@ -121,7 +120,6 @@ bool silent_huntsman { false };
// for current frame, to avoid performing them again // for current frame, to avoid performing them again
AimbotCalculatedData_s calculated_data_array[2048] {}; AimbotCalculatedData_s calculated_data_array[2048] {};
// The main "loop" of the aimbot.
// The main "loop" of the aimbot. // The main "loop" of the aimbot.
void CreateMove() { void CreateMove() {
@ -375,28 +373,29 @@ bool IsTargetStateGood(CachedEntity* entity) {
if (wait_for_charge && g_pLocalPlayer->holding_sniper_rifle) { if (wait_for_charge && g_pLocalPlayer->holding_sniper_rifle) {
// Grab netvar for current charge damage and multiply by 3 for headshot // Grab netvar for current charge damage and multiply by 3 for headshot
float cdmg = CE_FLOAT(LOCAL_W, netvar.flChargedDamage) * 3; float cdmg = CE_FLOAT(LOCAL_W, netvar.flChargedDamage) * 3;
bool maxCharge = cdmg >= 450.0F;
if (!(cdmg == 450.0f && wait_for_charge_bypass)) { // Darwins damage correction, Darwins protects against 15% of damage
// Darwins damage correction, Darwins protects against 15% of damage if (HasDarwins(entity))
if (HasDarwins(entity)) cdmg = (cdmg * .85) - 1;
cdmg = (cdmg * .85) - 1; // Vaccinator damage correction, Vac charge protects against 75% of damage
// Vaccinator damage correction, Vac charge protects against 75% of damage if (HasCondition<TFCond_UberBulletResist>(entity)) {
if (HasCondition<TFCond_UberBulletResist>(entity)) { cdmg = (cdmg * .25) - 1;
cdmg = (cdmg * .25) - 1; // Passive bullet resist protects against 10% of damage
// Passive bullet resist protects against 10% of damage } else if (HasCondition<TFCond_SmallBulletResist>(entity)) {
} else if (HasCondition<TFCond_SmallBulletResist>(entity)) { cdmg = (cdmg * .90) - 1;
cdmg = (cdmg * .90) - 1; }
} // Invis damage correction, Invis spies get protection from 10% of damage
// Invis damage correction, Invis spies get protection from 10% of damage if (IsPlayerInvisible(entity))
if (IsPlayerInvisible(entity)) cdmg = (cdmg * .80) - 1;
cdmg = (cdmg * .80) - 1;
// Check if player will die from headshot or if target has more health than normal overheal allows. // Check if player will die from headshot or if target has more health than normal overheal allows.
if ( !(entity->m_iHealth <= 150 || entity->m_iHealth <= cdmg || !g_pLocalPlayer->bZoomed || entity->m_iHealth > entity->m_iMaxHealth + (entity->m_iMaxHealth * 0.5)) ) { if ( !(entity->m_iHealth <= 150 || entity->m_iHealth <= cdmg || !g_pLocalPlayer->bZoomed || entity->m_iHealth > entity->m_iMaxHealth + (entity->m_iMaxHealth * 0.5) || maxCharge && entity->m_iHealth > 450.0F) ) {
return false; return false;
}
} }
} }
// If settings allow, ignore taunting players // If settings allow, ignore taunting players
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

View File

@ -52,7 +52,7 @@ float idle_time = 0;
// Vars for breadcrumb followbot // Vars for breadcrumb followbot
// An array for storing the breadcrumbs // An array for storing the breadcrumbs
static Vector breadcrumbs [55]; static Vector breadcrumbs [64];
// Array Bookkeeping vars // Array Bookkeeping vars
int crumbBottom = 0; int crumbBottom = 0;
int crumbTop = 0; int crumbTop = 0;
@ -400,6 +400,16 @@ void DoWalking() {
} }
} }
} }
/*
//Check if target is crouching
if () {
// Check if local player isnt taunting
if (!g_pUserCmd->buttons & IN_DUCK) {
g_pUserCmd->buttons |= IN_DUCK;
}
}*/
} }
} }
@ -637,7 +647,7 @@ void CrumbReset() {
void CrumbTopAdd(Vector crumbToAdd) { void CrumbTopAdd(Vector crumbToAdd) {
// Once the crumbs have hit the limit of the array, loop around and over write unused spots // Once the crumbs have hit the limit of the array, loop around and over write unused spots
if (crumbTop == 55) { if (crumbTop == 64) {
crumbTop = 0; crumbTop = 0;
} else { } else {
// Else, bump the top number market of the array // Else, bump the top number market of the array
@ -650,7 +660,7 @@ void CrumbTopAdd(Vector crumbToAdd) {
logging::Info("Crumb Top add"); logging::Info("Crumb Top add");
// The array can only hold so many crumbs, once it goes over its cap, stop the bot to prevent un-needed movement // The array can only hold so many crumbs, once it goes over its cap, stop the bot to prevent un-needed movement
if (crumbArrayLength > 55) { if (crumbArrayLength > 64) {
CrumbReset(); CrumbReset();
crumbStopped = true; crumbStopped = true;
logging::Info("Crumb Overload!\nDumping array"); logging::Info("Crumb Overload!\nDumping array");
@ -661,7 +671,7 @@ void CrumbTopAdd(Vector crumbToAdd) {
void CrumbBottomAdd() { void CrumbBottomAdd() {
// Once the crumbs have hit the limit of the array, loop around and over write unused spots // Once the crumbs have hit the limit of the array, loop around and over write unused spots
if (crumbBottom == 55) { if (crumbBottom == 64) {
crumbBottom = 0; crumbBottom = 0;
} else { } else {
// Else, bump the top number market of the array // Else, bump the top number market of the array
@ -746,10 +756,10 @@ void DrawFollowbot() {
tmpCrumb2 = crumbBottom + i + 1; tmpCrumb2 = crumbBottom + i + 1;
// Correction for array numbers when one goes over our limit // Correction for array numbers when one goes over our limit
if (tmpCrumb1 >= 55) if (tmpCrumb1 >= 64)
tmpCrumb1 - 55; tmpCrumb1 - 64;
if (tmpCrumb2 >= 55) if (tmpCrumb2 >= 64)
tmpCrumb1 - 55; tmpCrumb1 - 64;
// Take our 2 crumbs and get a position on the screen // Take our 2 crumbs and get a position on the screen
draw::WorldToScreen(breadcrumbs[tmpCrumb1], scnSrt); draw::WorldToScreen(breadcrumbs[tmpCrumb1], scnSrt);
@ -794,10 +804,10 @@ void DrawFollowbot() {
tmpCrumb2 = crumbBottom + i + 1; tmpCrumb2 = crumbBottom + i + 1;
// Correction for array numbers when one goes over our limit // Correction for array numbers when one goes over our limit
if (tmpCrumb1 >= 55) if (tmpCrumb1 >= 64)
tmpCrumb1 - 55; tmpCrumb1 - 64;
if (tmpCrumb2 >= 55) if (tmpCrumb2 >= 64)
tmpCrumb2 - 55; tmpCrumb2 - 64;
// Take our 2 crumbs and get a position on the screen // Take our 2 crumbs and get a position on the screen
draw::WorldToScreen(breadcrumbs[tmpCrumb1], scnSrt); draw::WorldToScreen(breadcrumbs[tmpCrumb1], scnSrt);

View File

@ -142,7 +142,7 @@ static CatCommand test_chat_print("debug_print_chat", "machine broke", [](const
} }
}); });
float afkTimeIdle = 0;
static CatVar tauntslide_tf2(CV_SWITCH, "tauntslide_tf2", "0", "Tauntslide", "Allows free movement while taunting with movable taunts\nOnly works in tf2\nWIP"); static CatVar tauntslide_tf2(CV_SWITCH, "tauntslide_tf2", "0", "Tauntslide", "Allows free movement while taunting with movable taunts\nOnly works in tf2\nWIP");
void CreateMove() { void CreateMove() {
@ -320,21 +320,28 @@ void CreateMove() {
flswitch = !flswitch; flswitch = !flswitch;
} }
static float afkTimeIdle = 0;
// Check if user settings allow anti-afk // Check if user settings allow anti-afk
if (anti_afk) { if (anti_afk) {
// If the timer exceeds 1 minute, jump and reset the timer // If the timer exceeds 1 minute, jump and reset the timer
if ( g_GlobalVars->curtime - afkTimeIdle > 60 ) { if (g_GlobalVars->curtime - 60 > afkTimeIdle) {
// Send random commands
g_pUserCmd->sidemove = RandFloatRange(-450.0, 450.0);
g_pUserCmd->forwardmove = RandFloatRange(-450.0, 450.0);
g_pUserCmd->buttons = rand();
// If player didnt jump, then we dont reset the timer // After 1 second we reset the idletime
if (CE_INT(g_pLocalPlayer->entity, netvar.movetype) == MOVETYPE_FLY) if (g_GlobalVars->curtime - 61 > afkTimeIdle) {
logging::Info("Finish anti-idle");
afkTimeIdle = g_GlobalVars->curtime;
}
} else {
// If the player uses a button, reset the timer
if (g_pUserCmd->buttons & IN_FORWARD || g_pUserCmd->buttons & IN_BACK || g_pUserCmd->buttons & IN_MOVELEFT || g_pUserCmd->buttons & IN_MOVERIGHT || g_pUserCmd->buttons & IN_JUMP || !LOCAL_E->m_bAlivePlayer)
afkTimeIdle = g_GlobalVars->curtime; afkTimeIdle = g_GlobalVars->curtime;
// Attemt to jump
g_pUserCmd->buttons = g_pUserCmd->buttons &~ IN_JUMP;
} }
// If the player uses a button, reset the timer
if ( g_pUserCmd->buttons & IN_FORWARD || g_pUserCmd->buttons & IN_BACK || g_pUserCmd->buttons & IN_MOVELEFT || g_pUserCmd->buttons & IN_MOVERIGHT || g_pUserCmd->buttons & IN_JUMP || !LOCAL_E->m_bAlivePlayer )
afkTimeIdle = g_GlobalVars->curtime;
} }
IF_GAME (IsTF2()) { IF_GAME (IsTF2()) {