Thread: Auto-blast

Results 1 to 4 of 4
  1. #1
    Gossam's Avatar
    Join Date
    Jun 2015
    Gender
    male
    Posts
    9
    Reputation
    10
    Thanks
    33

    Auto-blast

    credits to f1ssi0n for some help on this, enjoy

    Code:
    #include "CAutoAirblast.h"
    
    #include "SDK.h"
    #include "CEntity.h"
    #include "Util.h"
    
    CAutoAirblast::CAutoAirblast()
    {
        autoAirblastSwitch = new F1_ConVar<Switch>( "Auto Airblast", false );
        enabled = new F1_ConVar<bool>( " - Enabled" , false);
        aimMode = new F1_ConVar<bool>( " - Aim mode", false );
    }
    
    const char *CAutoAirblast::name() const { return "AUTO-AIRBLAST"; }
    
    void CAutoAirblast::processCommand(CUserCmd *pUserCmd)
    {
        if(!enabled->getValue())
            return;
    
        if(gLocalPlayerVars.activeWeapon == classId::CTFFlameThrower)
        {
            CTarget closeIndex = targs.getBestTarget();
    
            if(closeIndex.ent == -1)
                return;
    
            if(aimMode->getValue() == true)
            {
                //pUserCmd->viewangles.z += 23421341234151324123543514534534534590.0f;
                aimer.aim(pUserCmd, closeIndex.target, true);
            }
    
            pUserCmd->buttons |= IN_ATTACK2;
    
            targs.removeTarget( closeIndex.ent );
        }
        return;
    }
    
    bool CAutoAirblast::processEntity(int index)
    {
        if(!enabled)
            return false;
    
        CEntity<> ent{index};
    
        if(ent.isNull())
        {
            targs.removeTarget(index);
            return false;
        }
    
        if(ent->IsDormant())
        {
            targs.removeTarget(index);
            return false;
        }
    
        // if the projectile is from our own team we dont want or need to reflect it
        if(ent.get<int>(gEntVars.iTeam) == gLocalPlayerVars.team)
        {
            targs.removeTarget(index);
            return false;
        }
    
        auto entTag = CEntTag(ent.castToPointer<CBaseEntity>());
    
        Vector vel;
    
        if( entTag.isProjectile() )
        {
            vel = EstimateAbsVelocity( ent.castToPointer<CBaseEntity>() );
    
            //if( vel == Vector(0,0,0) )
            //{
            //    targs.removeTarget( index );
            //    return false;
            //}
        }
        else
        {
            targs.removeTarget( index );
            return false;
        }
    
        Vector origin;
        ent->GetWorldSpaceCenter(origin);
    
        Vector eyePos = gLocalPlayerVars.pred.origin + CEntity<>{me}.get<Vector>(gEntVars.vecViewOffset);
    
        float latency = gInts.Engine->GetNetChannelInfo()->GetLatency(FLOW_INCOMING) + gInts.Engine->GetNetChannelInfo()->GetLatency(FLOW_OUTGOING);
    
        Vector target = origin + (vel * latency);
    
        //gInts.DebugOverlay->AddEntityTextOverlay( index, 0, 1, 255, 255, 255, 255, "%f", ::getDistanceToVector( target ) );
    
        float length = ( target - eyePos ).Length();
    
        if( length <= ( 185.0f ) )
        {
            //Log::Console( "Target at %f dist", length );
            targs.addTarget( { index, (target - eyePos) } );
        }
        else
        {
        }
    
        return true;
    }
    
    void CAutoAirblast::menuUpdate( F1_IConVar **menuArray, int &currIndex )
    {
        menuArray[ currIndex++ ] = autoAirblastSwitch;
    
        if(autoAirblastSwitch->getValue() == true )
        {
            menuArray[ currIndex++ ] = enabled;
            menuArray[ currIndex++ ] = aimMode;
        }
    }
    
    /*
    int CAutoAirblast::findBestTarget()
    {
        float bestDist = 8192.0f;
        int bestIndex = -1;
    
        for(auto &targ : targets)
        {
            if(targ.second < bestDist)
            {
                bestDist = targ.second;
                bestIndex = targ.first;
            }
        }
    
        return bestIndex;
    }
    */

  2. #2
    oskaras_'s Avatar
    Join Date
    Sep 2016
    Gender
    male
    Posts
    46
    Reputation
    10
    Thanks
    3
    My Mood
    Sneaky
    thanks for this

  3. #3
    Earthcake's Avatar
    Join Date
    Sep 2016
    Gender
    female
    Posts
    9
    Reputation
    10
    Thanks
    0
    I don't know what to do with this code. Is it c++ ? And if so, what program do i use to make it work? Thanks!

  4. #4
    LMAOBoxMidnight's Avatar
    Join Date
    Sep 2015
    Gender
    male
    Location
    Mann Co Store
    Posts
    40
    Reputation
    10
    Thanks
    365
    SOME help on this? this is directly copied from his public cheat wtf

Similar Threads

  1. [Help] Any hack or script for auto air blast?
    By rusty_dark_killer in forum Team Fortress 2 Hacks
    Replies: 10
    Last Post: 03-07-2013, 09:28 AM
  2. [Request] Auto air-blast script
    By shadowswimer in forum Team Fortress 2 Hacks
    Replies: 10
    Last Post: 01-07-2013, 10:45 AM
  3. WarRock Auto Vehicle Repair Hack
    By mortis123 in forum WarRock - International Hacks
    Replies: 12
    Last Post: 01-17-2006, 08:40 PM
  4. Vehicle Stealing and Vehicle auto-destroy in Havana
    By Zededarian in forum Game Hacking Tutorials
    Replies: 0
    Last Post: 01-02-2006, 04:34 PM
  5. WarRock Auto Healer
    By Flawless in forum WarRock - International Hacks
    Replies: 8
    Last Post: 12-31-2005, 03:44 AM