diff --git a/uran/.gitignore b/uran/.gitignore index b37f5e6b..d96c2421 100644 --- a/uran/.gitignore +++ b/uran/.gitignore @@ -2,4 +2,5 @@ /Debug/src_/ /Debug/makefile /Debug/objects.mk -/Debug/sources.mk \ No newline at end of file +/Debug/sources.mk +/Debug/ diff --git a/uran/Debug/liburan.so b/uran/Debug/liburan.so deleted file mode 100755 index a16c36d9..00000000 Binary files a/uran/Debug/liburan.so and /dev/null differ diff --git a/uran/TODO b/uran/TODO index 1853c9dd..fd416f1f 100644 --- a/uran/TODO +++ b/uran/TODO @@ -4,5 +4,25 @@ ESP: Box, bones ESP: Uber n stuff TRIGGER: Amby -TRIGGER: Ignore uber; vacc; etc. -AIMBOT \ No newline at end of file +TRIGGER: Ignore VACC + +Priority FIX +OPTIMIZE +Buildings aimbot + + +priority system + proper player struct + optimize + buildings aim + no autoshoot consumable + no autoshoot disg + amby body + +Entity::AddEntityString + +Glow Objects + +actual ammo box esp +no trigger/aim vacc uber +LINES \ No newline at end of file diff --git a/uran/src/entity.cpp b/uran/src/entity.cpp index ff15175e..1c8c9a5d 100644 --- a/uran/src/entity.cpp +++ b/uran/src/entity.cpp @@ -1,5 +1,5 @@ /* - * entity.cpp +a * entity.cpp * * Created on: Oct 6, 2016 * Author: nullifiedcat diff --git a/uran/src/entity.h b/uran/src/entity.h index 88745939..391fb6c5 100644 --- a/uran/src/entity.h +++ b/uran/src/entity.h @@ -14,6 +14,8 @@ class IClientEntity; template inline T GetEntityValue(IClientEntity* ent, unsigned int offset) { + int null = 0; + if (ent == 0) return *(reinterpret_cast(&null)); //logging::Info("GetEntityValue 0x%08x, 0x%08x", ent, offset); return *(reinterpret_cast((unsigned int)ent + offset)); } diff --git a/uran/src/enums.h b/uran/src/enums.h index 4d3293fd..1f4df242 100644 --- a/uran/src/enums.h +++ b/uran/src/enums.h @@ -100,6 +100,7 @@ enum powerup_type { king, plague, supernova, + crits, POWERUP_COUNT }; @@ -109,6 +110,32 @@ enum powerup_owner { blue = 2 }; +enum item_type { + item_null = -1, + item_medkit_small, + item_medkit_medium, + item_medkit_large, + item_ammo_small, + item_ammo_medium, + item_ammo_large, + item_mp_strength, + item_mp_resistance, + item_mp_vampire, + item_mp_reflect, + item_mp_haste, + item_mp_regeneration, + item_mp_precision, + item_mp_agility, + item_mp_knockout, + item_mp_king, + item_mp_plague, + item_mp_supernova, + item_mp_crit, + item_mp_uber, /* this exists for some reason */ + item_mp_warlock, /* never seen that powerup, but the model exists */ + item_mp_thorns /* and this one */ +}; + enum pack_type { not_pack = -1, small, diff --git a/uran/src/hacks/HAimbot.cpp b/uran/src/hacks/HAimbot.cpp index f48050fa..97d7fa8e 100644 --- a/uran/src/hacks/HAimbot.cpp +++ b/uran/src/hacks/HAimbot.cpp @@ -147,6 +147,8 @@ bool HAimbot::ShouldTarget(IClientEntity* entity) { if (v_iMinRange->GetInt() > 0) { if ((enemy_pos - my_pos).Length() > v_iMinRange->GetInt()) return false; } + int econd = GetEntityValue(entity, entityvars.iCond1); + if ((econd & cond_ex::vacc_bullet)) return false; return this->IsVisible(entity); } diff --git a/uran/src/hacks/HEsp.cpp b/uran/src/hacks/HEsp.cpp index 3d39a523..89080b75 100644 --- a/uran/src/hacks/HEsp.cpp +++ b/uran/src/hacks/HEsp.cpp @@ -81,21 +81,25 @@ void HEsp::ProcessEntity(IClientEntity* ent, int idx) { switch (ClassID) { case 1: { if (!this->v_bItemESP->GetBool()) break; - powerup_type type = GetPowerupType(ent); - if (type >= 0) { + item_type type = GetItemType(ent); + if (type == item_type::item_null) break; + if (type >= item_medkit_small && type <= item_medkit_large) { + draw::DrawString(scr.x, scr.y, draw::white, true, "%s HEALTH", packs[type - item_medkit_small]); + scr.y += 16; + } else if (type >= item_ammo_small && type <= item_ammo_large) { + draw::DrawString(scr.x, scr.y, draw::white, true, "%s AMMO", packs[type - item_ammo_small]); + scr.y += 16; + } else if (type >= item_mp_strength && type <= item_mp_crit) { int skin = ent->GetSkin(); - Color clr = (skin == 0 ? draw::yellow : (skin == 1 ? draw::red : draw::blue)); - draw::DrawString(scr.x, scr.y, clr, true, "POWERUP %s", powerups[type]); - scr.y += 16; - } - pack_type health = GetHealthPackType(ent); - if (health >= 0) { - draw::DrawString(scr.x, scr.y, draw::white, true, "%s HEALTH", packs[health]); - scr.y += 16; - } - pack_type ammo = GetAmmoPackType(ent); - if (ammo >= 0) { - draw::DrawString(scr.x, scr.y, draw::white, true, "%s AMMO", packs[ammo]); + Color pickupColor; + if (skin == 1) { + pickupColor = draw::red; + } else if (skin == 2) { + pickupColor = draw::blue; + } else { + pickupColor = draw::yellow; + } + draw::DrawString(scr.x, scr.y, pickupColor, true, "%s PICKUP", powerups[type - item_mp_strength]); scr.y += 16; } } break; @@ -114,7 +118,7 @@ void HEsp::ProcessEntity(IClientEntity* ent, int idx) { * only if bTeammatePowerup or bTeammates is true */ if (power >= 0 && (!teammate || this->v_bTeammatePowerup->GetBool() || this->v_bTeammates->GetBool())) { Color clr = (team == 3 ? draw::blue : (team == 2 ? draw::red : draw::white)); - draw::DrawString(scr.x, scr.y, clr, true, "%s", powerups[power]); + draw::DrawString(scr.x, scr.y, clr, true, "HAS [%s]", powerups[power]); scr.y += 16; } if (teammate && !this->v_bTeammates->GetBool()) return; diff --git a/uran/src/helpers.cpp b/uran/src/helpers.cpp index 274f2827..8c39eaf3 100644 --- a/uran/src/helpers.cpp +++ b/uran/src/helpers.cpp @@ -56,6 +56,62 @@ const char* GetModelPath(IClientEntity* entity) { return interfaces::model->GetModelName(model); } +/* Takes CBaseAnimating entity as input */ +item_type GetItemType(IClientEntity* entity) { + if (entity == 0) return item_type::item_null; + const char* path = GetModelPath(entity); /* SDK function */ + size_t length = strlen(path); + /* Default/Festive medkits */ + if (length >= 29 && path[16] == 'k') { + if (path[20] == 's') return item_type::item_medkit_small; + if (path[20] == 'm') return item_type::item_medkit_medium; + if (path[20] == 'l') return item_type::item_medkit_large; + } + /* Sandwich/Steak */ + if (length >= 22 && path[13] == 'p' && path[14] == 'l') { + return item_type::item_medkit_medium; + } + /* Medieval meat */ + if (length == 39 && path[31] == 'm' && path[29] == 'l') { + return item_type::item_medkit_medium; + } + /* Halloween medkits */ + if (length >= 49 && path[33] == 'm' && path[36] == 'k') { + if (path[20] == 's') return item_type::item_medkit_small; + if (path[40] == 'm') return item_type::item_medkit_medium; + if (path[40] == 'l') return item_type::item_medkit_large; + } + /* Ammo packs */ + if (length >= 31 && path[14] == 'm' && path[15] == 'm') { + if (path[22] == 's') return item_type::item_ammo_small; + if (path[22] == 'm') return item_type::item_ammo_medium; + if (path[22] == 'l') return item_type::item_ammo_large; + } + /* Powerups */ + if (length >= 38 && path[20] == 'p' && path[24] == 'w') { + if (path[30] == 'h') return item_type::item_mp_haste; + if (path[30] == 'v') return item_type::item_mp_vampire; + if (path[30] == 'u') return item_type::item_mp_uber; + if (path[32] == 'e') return item_type::item_mp_precision; + if (path[30] == 'w') return item_type::item_mp_warlock; + if (path[32] == 'r') return item_type::item_mp_strength; + if (path[32] == 'g') return item_type::item_mp_regeneration; + if (path[37] == 'v') return item_type::item_mp_supernova; + /* looks like resistance.mdl is unused and replaced with defense.mdl? idk */ + if (path[37] == 'n') return item_type::item_mp_resistance; + if (path[34] == 'k') return item_type::item_mp_knockout; + /* actually this one is 'defense' but it's used for resistance powerup */ + if (path[35] == 's') return item_type::item_mp_resistance; + if (path[30] == 'c') return item_type::item_mp_crit; + if (path[30] == 'a') return item_type::item_mp_agility; + if (path[31] == 'i') return item_type::item_mp_king; + if (path[33] == 'g') return item_type::item_mp_plague; + if (path[36] == 't') return item_type::item_mp_reflect; + if (path[30] == 't') return item_type::item_mp_thorns; + } + return item_type::item_null; +} + pack_type GetHealthPackType(IClientEntity* ent) { if (!ent) return pack_type::not_pack; const char* name = GetModelPath(ent); @@ -172,7 +228,8 @@ const char* powerups[] = { "KNOCKOUT", "KING", "PLAGUE", - "SUPERNOVA" + "SUPERNOVA", + "CRITS" }; const char* packs[] = { diff --git a/uran/src/helpers.h b/uran/src/helpers.h index 4d863ddd..164afcd6 100644 --- a/uran/src/helpers.h +++ b/uran/src/helpers.h @@ -28,6 +28,7 @@ pack_type GetHealthPackType(IClientEntity* ent); pack_type GetAmmoPackType(IClientEntity* ent); powerup_type GetPowerupType(IClientEntity* ent); powerup_type GetPowerupOnPlayer(IClientEntity* player); +item_type GetItemType(IClientEntity* entity); const char* GetModelPath(IClientEntity* entity); int GetHitboxPosition(IClientEntity* entity, int hb, Vector& out);