Page 2 of 7 FirstFirst 1234 ... LastLast
Results 16 to 30 of 97
  1. #16
    Jailbroken671's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    13 28 N, 144 47 E
    Posts
    9,021
    Reputation
    704
    Thanks
    2,055
    My Mood
    Devilish
    somehow, i dont believe this code works

  2. #17
    AVGN's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Kekistan
    Posts
    15,500
    Reputation
    1710
    Thanks
    6,371
    Code:
    #include "aimbot.h"
    
    cAimbot*   aimbot	= NULL;
    
    CTimer ctGetNextPos[26];
    
    int cAimbot::GetNearestPlayer( int VisCheck, int AimBone, int AimAtTeam, int SpawnCheck, int Fov )
    {
    	int iAimAt = -1;
    	float fNearest = (float)INT_MAX;
    
    	for( int i = 0; i <= 24; i++ )
    	{
    		if( esp->bValidObject( i ) && !esp->Players[i].bIsDead )
    		{
    			if( AimAtTeam == 0 && esp->Players[i].Charector->TeamID == esp->local.iTeam )
    				continue;
    
    			if( VisCheck == 1 && !esp->Players[i].bVisible )
    				continue;
    
    			if( Fov == 0 && !esp->Players[i].bOnScreen )
    				continue;
    
    			if( SpawnCheck == 1 && esp->Players[i].bSpawnShield )
    				continue;
    
    			if( esp->Players[i].fDistance < fNearest )
    			{
    				iAimAt = i;
    				fNearest = esp->Players[i].fDistance;
    			}
    		}
    	}
    	return iAimAt;
    }
    
    int cAimbot::GetNearestToCrosshair( int VisCheck, int AimBone, int AimAtTeam, int SpawnCheck )
    {
    	int iAimAt = -1;
    	double fNearest = (float)INT_MAX;
    
    	for( int i = 0; i <= 24; i++ )
    	{
    		if( esp->bValidObject( i ) && esp->bValidCords( i ) && !esp->Players[i].bIsDead )
    		{
    			if( !esp->Players[i].bOnScreen )
    				continue;
    
    			if( AimAtTeam == 0 && esp->Players[i].Charector->TeamID == esp->local.iTeam )
    				continue;
    
    			if( VisCheck == 1 && !esp->Players[i].bVisible )
    				continue;
    
    			if( SpawnCheck == 1 && esp->Players[i].bSpawnShield )
    				continue;
    
    			D3DXVECTOR3 Screen( (float)main->ScreenW2, (float)main->ScreenH2, 0.0f );
    			D3DXVECTOR3 Pos = ( esp->Players[i].HeadScreen - Screen );
    
    			double Dist = ( ( Pos.x * Pos.x ) + ( Pos.y * Pos.y ) + ( Pos.z * Pos.z ) );
    
    			if( Dist < fNearest )
    			{
    				fNearest = Dist;
    				iAimAt = i;
    			}
    		}
    	}
    	return iAimAt;
    }
    
    void cAimbot::Lock( int AimType, int AimBone, int AutoAim, int AutoFire, int VisCheck, int AimAtTeam, int SpawnCheck, int AutoSwitch, int Prediction )
    {
    	if( !esp->local.bDead )
    	{ 
    		if( AutoAim || GetAsyncKeyState( menu->iAimKey ) < 0 )
    		{
    			if( NearestEnemy == -1 && Ready )
    			{
    				if( AimType == 1 )
    					NearestEnemy = GetNearestPlayer( VisCheck, AimBone, AimAtTeam, SpawnCheck, menu->MaxFov );
    				else if( AimType == 2 )
    					NearestEnemy = GetNearestToCrosshair( VisCheck, AimBone, AimAtTeam, SpawnCheck );
    			}
    
    			if( NearestEnemy != -1 && Ready )
    			{		
    				if( esp->bValidObject( NearestEnemy ) && !esp->Players[NearestEnemy].bIsDead )
    				{
    					D3DXVECTOR3 Angles, FinalAimSpot;
    
    					if( Prediction == 1 )
    						FinalAimSpot = GhettoPrediction( NearestEnemy, 55, esp->Players[NearestEnemy].AimTransform.Pos, ctGetNextPos );
    					else
    						FinalAimSpot = esp->Players[NearestEnemy].AimTransform.Pos;
    
    					if( VisCheck == 1 && !esp->Players[NearestEnemy].bVisible )
    					{
    						NearestEnemy = -1;
    						Ready = true;
    						return;
    					}
    
    					GetAngleToTarget( FinalAimSpot, esp->local.CameraPos, Angles );
    
    					engine->GetPlayerMgr()->Yaw   = DegToRad ( Angles[YAW] );
    					engine->GetPlayerMgr()->Pitch = DegToRad ( Angles[PITCH] );
    
    					if( AutoFire )
    					{			
    						mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );
    						mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
    					}
    
    					if( AimType == 1 )
    					{
    						Ready = true;
    						NearestEnemy = -1;
    					}
    				}
    				else
    				{
    					if( AutoSwitch || AutoAim )
    					{
    						Ready = true;	
    						NearestEnemy = -1;
    					}
    					else
    					{
    						Ready = false;
    						NearestEnemy = -1;
    					}
    				}
    			}
    		}
    		else
    		{
    			Ready = true;
    			NearestEnemy = -1;
    		}
    	}
    }
    
    
    void cAimbot::NPC_Lock( int AimType, int AimBone, int AutoAim, int AutoFire, int VisCheck, int AutoSwitch, int Prediction )
    {
    	if( !esp->local.bDead && AutoAim || GetAsyncKeyState( menu->iAimKey ) < 0 )
    	{
    		if( engine->ValidGamePointers() )
    		{
    			if( BestNPC == -1 && Ready )
    			{
    				if( AimType == 1 )
    					BestNPC = GetNearestNPC( VisCheck, AimBone, menu->MaxFov );
    				else if( AimType == 2 )
    					BestNPC = GetNearestNPCToCrosshair( VisCheck, AimBone );
    			}
    
    			if( BestNPC != -1 && Ready )
    			{
    				D3DXVECTOR3 Angles, FinalAimSpot;
    
    				cCharacterFX* Character = (cCharacterFX*)engine->GetGameClientShell()->GetSFXMgr()->SFXList[SFX_CHARACTER].List[BestNPC];
    
    				if( engine->ValidPointer( Character ) && engine->ValidPointer( Character->Object ) )
    				{
    					Transform HeadTransform;
    					unsigned int AimSpot;
    
    					switch( AimBone )
    					{
    						case 1:
    							AimSpot = engine->GetLTModel()->GetNodeTransform( Character->Object, 8, &HeadTransform,  true );
    							HeadTransform.Pos.y += 5.8f;
    							break;
    
    						case 2:
    							AimSpot = engine->GetLTModel()->GetNodeTransform( Character->Object, 6, &HeadTransform,  true );
    							break;
    
    						case 3:
    							AimSpot = engine->GetLTModel()->GetNodeTransform( Character->Object, 7, &HeadTransform,  true );
    							break;
    
    						case 4:
    							AimSpot = engine->GetLTModel()->GetNodeTransform( Character->Object, 4, &HeadTransform,  true );
    							HeadTransform.Pos.y -= 6.0f;
    							break;
    					}
    
    					if( VisCheck == 1 && engine->IsVisible( HeadTransform.Pos ) == false )
    					{
    						BestNPC = -1;
    						Ready = true;
    						return;
    					}
    
    					GetAngleToTarget( HeadTransform.Pos, esp->local.CameraPos, Angles );
    
    					engine->GetPlayerMgr()->Yaw   = DegToRad ( Angles[YAW] );
    					engine->GetPlayerMgr()->Pitch = DegToRad ( Angles[PITCH] );
    
    					if( AutoFire )
    					{			
    						mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );
    						mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
    					}
    
    					if( AimType == 1 )
    					{
    						BestNPC = -1;
    						Ready = true;
    					}
    				}
    				else 
    				{
    					if( AutoSwitch || AutoAim  )
    					{
    						BestNPC = -1;
    						Ready = true;
    					}
    					else
    					{
    						BestNPC = -1;
    						Ready = false;
    					}
    				}
    			}
    		}
    	}
    	else
    	{
    		BestNPC = -1;
    		Ready = true;	
    	}
    }
    
    int cAimbot::GetNearestNPCToCrosshair( int VisCheck, int AimBone )
    {
    	if( !engine ) 
    		return -1;
    
    	int iAimAt = -1;
    	float fNearest = (float)INT_MAX;
    
    	cSFXMgr* SFXMgr = engine->GetGameClientShell()->GetSFXMgr();
    
    	if( engine->ValidPointer( SFXMgr ) ) 
    	{
    		for(int i = 0; i < SFXMgr->SFXList[SFX_CHARACTER].Num; i++)
    		{
    			cCharacterFX* NPC = (cCharacterFX*)SFXMgr->SFXList[SFX_CHARACTER].List[i];
    
    			if(engine->ValidPointer( NPC ) && engine->ValidPointer( NPC->Object ) )
    			{
    				if( esp->local.Object == NPC->Object )	
    					continue; 
    
    				int Type = NPC->IsPlayer;
    
    				if( Type != 0 )
    					continue;
    
    				Transform HeadTransform;
    				unsigned int AimSpot;
    
    				switch( AimBone )
    				{
    					case 1:
    						AimSpot = engine->GetLTModel()->GetNodeTransform  ( NPC->Object, 8, &HeadTransform,  true );
    						HeadTransform.Pos.y += 7.0f;
    						break;
    					case 2:
    						AimSpot = engine->GetLTModel()->GetNodeTransform  ( NPC->Object, 6, &HeadTransform,  true );
    						break;
    					case 3:
    						AimSpot = engine->GetLTModel()->GetNodeTransform  ( NPC->Object, 7, &HeadTransform,  true );
    						break;
    					case 4:
    						AimSpot = engine->GetLTModel()->GetNodeTransform  ( NPC->Object, 4, &HeadTransform,  true );
    						HeadTransform.Pos.y -= 5.0f;
    						break;
    				}
    
    				if( VisCheck == 1 && !engine->IsVisible( HeadTransform.Pos ) )
    					continue;
    
    				D3DXVECTOR3 Out;
    
    				if( !engine->WorldToScreen( HeadTransform.Pos, &Out ) )
    					continue;
    
    				Out.z = 0;
    
    				D3DXVECTOR3 Screen( (float)main->ScreenW2, (float)main->ScreenH2, 0 );
    				D3DXVECTOR3 Pos = ( Out - Screen );
    
    				float Dist = sqrt( (Pos.x * Pos.x ) + ( Pos.y * Pos.y ) + ( Pos.z * Pos.z ) );
    
    				if( Dist < fNearest )
    				{
    					fNearest = Dist;
    					iAimAt = i;
    				}
    			}
    		}
    	}
    	return iAimAt;
    }
    
    int cAimbot::GetNearestNPC( int VisCheck, int AimBone, int Fov )
    {
    	if( !engine )
    		return -1;
    
    	int iAimAt = -1;
    	float fNearest = (float)INT_MAX;
    
    	cSFXMgr* SFXMgr = engine->GetGameClientShell()->GetSFXMgr();
    
    	if( engine->ValidPointer( SFXMgr ) )
    	{
    		for( int i = 0; i < SFXMgr->SFXList[SFX_CHARACTER].Num; i++ )
    		{
    			cCharacterFX* NPC = (cCharacterFX*)SFXMgr->SFXList[SFX_CHARACTER].List[i];
    
    			if( engine->ValidPointer(NPC) && engine->ValidPointer(NPC->Object) )
    			{
    				int* MyObj = engine->GetLTBase()->GetClientObject();
    
    				if( MyObj && MyObj == NPC->Object )	
    					continue; 
    
    				int Type = NPC->IsPlayer;
    
    				if( Type != 0 )
    					continue;
    
    				Transform HeadTransform;
    				unsigned int AimSpot;
    
    				switch( AimBone )
    				{
    					case 1:
    						AimSpot = engine->GetLTModel()->GetNodeTransform( NPC->Object, 8, &HeadTransform,  true );
    						HeadTransform.Pos.y += 7.0f;
    						break;
    					case 2:
    						AimSpot = engine->GetLTModel()->GetNodeTransform( NPC->Object, 6, &HeadTransform,  true );
    						break;
    					case 3:
    						AimSpot = engine->GetLTModel()->GetNodeTransform( NPC->Object, 7, &HeadTransform,  true );
    						break;
    					case 4:
    						AimSpot = engine->GetLTModel()->GetNodeTransform( NPC->Object, 4, &HeadTransform,  true );
    						HeadTransform.Pos.y -= main->fNutOff;
    						break;
    				}
    
    				if( VisCheck == 1 && !engine->IsVisible( HeadTransform.Pos ) )
    					continue;
    
    				D3DXVECTOR3 Dummy;
    
    				if( (int)menu->cBox[4].OnOff == 1 && Fov == 0 && !engine->WorldToScreen( HeadTransform.Pos, &Dummy ) )
    					continue;
    
    				float v[3];
    				VectorSubtract( HeadTransform.Pos, esp->local.CameraPos, v );
    				float fTemp = sqrt( v[0]*v[0] + v[1]*v[1] + v[2]*v[2] ) / 48;
    
    				if( fTemp < fNearest )
    				{
    					iAimAt = i;
    					fNearest = fTemp;
    				}
    			}
    		}
    	}
    	return iAimAt;
    }
    
    void cAimbot::AngleVectors( const float* angles, float* forward, float* right, float* up )
    {
    	float			angle;
    	static float	sr, sp, sy, cr, cp, cy, t;
    
    	angle = angles[YAW];
    	sy = sin(angle);
    	cy = cos(angle);
    
    	angle = angles[PITCH];
    	sp = sin(angle);
    	cp = cos(angle);
    
    	angle =  angles[ROLL];
    	sr = sin(angle);
    	cr = cos(angle);
    
    	if( forward )
    	{
    		forward[0] = cp*cy;
    		forward[1] = cp*sy;
    		forward[2] = -sp;
    	}
    	if( right )
    	{
    		t = sr*sp;
    		right[0] = ( -1*t*cy+-1*cr*-sy );
    		right[1] = ( -1*t*sy+-1*cr*cy );
    		right[2] = -1*sr*cp;
    	}
    	if( up )
    	{
    		t = cr*sp;
    		up[0] = ( t*cy+-sr*-sy );
    		up[1] = ( t*sy+-sr*cy );
    		up[2] = cr*cp;
    	}
    }
    
    void cAimbot::VectorAngles( const float* forward, float* angles )
    {
    	float tmp, yaw, pitch;
    
    	if( forward[2] == 0 && forward[0] == 0 )
    	{
    		yaw = 0;
    
    		if( forward[2] > 0 )
    			pitch = 90;
    		else
    			pitch = 270;
    	}
    	else 
    	{
    		yaw = ( atan2( forward[2], -forward[0] ) * 180 / M_PI )-90;
    
    		if( yaw < 0 )
    			yaw += 360;
    
    		tmp = sqrt( forward[0] * forward[0] + forward[2] * forward[2] );
    		pitch = ( atan2( forward[1], tmp) * 180 / M_PI );
    
    		if( pitch < 0 )
    			pitch += 360;
    	}
    
    	angles[0] = -pitch;
    	angles[1] = yaw;
    	angles[2] = 0;
    }
    
    
    void cAimbot::GetAngleToTarget(D3DXVECTOR3 vTargetPos, D3DXVECTOR3 vCameraPos, D3DXVECTOR3& vAngles)
    {
    	D3DXVECTOR3 vDelta;
    	vDelta.x = vTargetPos.x - vCameraPos.x;
    	vDelta.y = vTargetPos.y - vCameraPos.y;
    	vDelta.z = vTargetPos.z - vCameraPos.z;
    
    	VectorAngles( (float*)&vDelta, (float*)&vAngles );
    
    	if( vAngles.x > 180.0f )          
    		vAngles.x  -= 360.0f; 
    	else if( vAngles.x < -180.0f )    
    		vAngles.x   += 360.0f; 
    
    	if( vAngles.y > 180.0f )            
    		vAngles.y     -= 360.0f; 
    	else if( vAngles.y < -180.0f )      
    		vAngles.y    += 360.0f; 
    }
    
    
    float cAimbot::GetAngleDistanceFromYaw( float fYaw, D3DXVECTOR3 vPos, D3DXVECTOR3 vTarget )
    {
    	D3DXVECTOR2 vDist( vPos.x - vTarget.x, vPos.z - vTarget.z );
    	
    	float fHypot	= VectToHypot( vDist ) + 0.000001f;
    	float fView		= acos( ( vDist.y + 0.000001f ) / fHypot );
    	
    	if( vDist.x < 0 && vDist.y < 0 || vDist.x < 0 && vDist.y > 0 )
    		fView	= ( M_PI - fView );
    	else
    		fView	= ( M_PI + fView );
    	
    	return fabsf( fYaw - fView );
    }
    
    D3DXVECTOR3 cAimbot::GhettoPrediction( int i, int iWait, D3DXVECTOR3 Pos, CTimer* TimerList )
    {
    	if( !TimerList[i]****nning() )
    	{
    		this->oldPos = Pos;
    		TimerList[i].Start( iWait );
    	}
    
    	if( Pos.x > this->oldPos.x )
    	{
    		this->diffPos.x = Pos.x - this->oldPos.x;
    		Pos.x += this->diffPos.x;
    	}
    	else //if( Pos.x < this->oldPos.x )
    	{
    		this->diffPos.x = this->oldPos.x - Pos.x;
    		Pos.x -= this->diffPos.x;
    	}
    
    	if( Pos.y > this->oldPos.y )
    	{
    		this->diffPos.y = Pos.y - this->oldPos.y;
    		Pos.y += this->diffPos.y;
    	}
    	else //if( Pos.y < this->oldPos.y )
    	{
    		this->diffPos.y = this->oldPos.y - Pos.y;
    		Pos.y -= this->diffPos.y;
    	}
    
    	if( Pos.z > this->oldPos.z )
    	{
    		this->diffPos.z = Pos.z - this->oldPos.z;
    		Pos.z += this->diffPos.z;
    	}
    	else //if( Pos.z < this->oldPos.z )
    	{
    		this->diffPos.z = this->oldPos.z - Pos.z;
    		Pos.z -= this->diffPos.z;
    	}
    	return Pos;
    }
    [/B][/SIZE][/COLOR][/FONT]
    Last edited by AVGN; 01-21-2011 at 05:55 PM.



    ^Thanks to RJ^




  3. #18
    Stevenom's Avatar
    Join Date
    Aug 2009
    Gender
    male
    Location
    Summoner's Rift
    Posts
    17,746
    Reputation
    1087
    Thanks
    1,916
    My Mood
    Doubtful
    Quote Originally Posted by Jailbroken™ View Post
    somehow, i dont believe this code works
    To me it looks good.

  4. #19
    KawaiiSlut's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    419
    Reputation
    16
    Thanks
    87
    Quote Originally Posted by Subliminal View Post
    Code:
    #include "aimbot.h"
    
    cAimbot*   aimbot	= NULL;
    
    CTimer ctGetNextPos[26];
    
    int cAimbot::GetNearestPlayer( int VisCheck, int AimBone, int AimAtTeam, int SpawnCheck, int Fov )
    {
    	int iAimAt = -1;
    	float fNearest = (float)INT_MAX;
    
    	for( int i = 0; i <= 24; i++ )
    	{
    		if( esp->bValidObject( i ) && !esp->Players[i].bIsDead )
    		{
    			if( AimAtTeam == 0 && esp->Players[i].Charector->TeamID == esp->local.iTeam )
    				continue;
    
    			if( VisCheck == 1 && !esp->Players[i].bVisible )
    				continue;
    
    			if( Fov == 0 && !esp->Players[i].bOnScreen )
    				continue;
    
    			if( SpawnCheck == 1 && esp->Players[i].bSpawnShield )
    				continue;
    
    			if( esp->Players[i].fDistance < fNearest )
    			{
    				iAimAt = i;
    				fNearest = esp->Players[i].fDistance;
    			}
    		}
    	}
    	return iAimAt;
    }
    
    int cAimbot::GetNearestToCrosshair( int VisCheck, int AimBone, int AimAtTeam, int SpawnCheck )
    {
    	int iAimAt = -1;
    	double fNearest = (float)INT_MAX;
    
    	for( int i = 0; i <= 24; i++ )
    	{
    		if( esp->bValidObject( i ) && esp->bValidCords( i ) && !esp->Players[i].bIsDead )
    		{
    			if( !esp->Players[i].bOnScreen )
    				continue;
    
    			if( AimAtTeam == 0 && esp->Players[i].Charector->TeamID == esp->local.iTeam )
    				continue;
    
    			if( VisCheck == 1 && !esp->Players[i].bVisible )
    				continue;
    
    			if( SpawnCheck == 1 && esp->Players[i].bSpawnShield )
    				continue;
    
    			D3DXVECTOR3 Screen( (float)main->ScreenW2, (float)main->ScreenH2, 0.0f );
    			D3DXVECTOR3 Pos = ( esp->Players[i].HeadScreen - Screen );
    
    			double Dist = ( ( Pos.x * Pos.x ) + ( Pos.y * Pos.y ) + ( Pos.z * Pos.z ) );
    
    			if( Dist < fNearest )
    			{
    				fNearest = Dist;
    				iAimAt = i;
    			}
    		}
    	}
    	return iAimAt;
    }
    
    void cAimbot::Lock( int AimType, int AimBone, int AutoAim, int AutoFire, int VisCheck, int AimAtTeam, int SpawnCheck, int AutoSwitch, int Prediction )
    {
    	if( !esp->local.bDead )
    	{ 
    		if( AutoAim || GetAsyncKeyState( menu->iAimKey ) < 0 )
    		{
    			if( NearestEnemy == -1 && Ready )
    			{
    				if( AimType == 1 )
    					NearestEnemy = GetNearestPlayer( VisCheck, AimBone, AimAtTeam, SpawnCheck, menu->MaxFov );
    				else if( AimType == 2 )
    					NearestEnemy = GetNearestToCrosshair( VisCheck, AimBone, AimAtTeam, SpawnCheck );
    			}
    
    			if( NearestEnemy != -1 && Ready )
    			{		
    				if( esp->bValidObject( NearestEnemy ) && !esp->Players[NearestEnemy].bIsDead )
    				{
    					D3DXVECTOR3 Angles, FinalAimSpot;
    
    					if( Prediction == 1 )
    						FinalAimSpot = GhettoPrediction( NearestEnemy, 55, esp->Players[NearestEnemy].AimTransform.Pos, ctGetNextPos );
    					else
    						FinalAimSpot = esp->Players[NearestEnemy].AimTransform.Pos;
    
    					if( VisCheck == 1 && !esp->Players[NearestEnemy].bVisible )
    					{
    						NearestEnemy = -1;
    						Ready = true;
    						return;
    					}
    
    					GetAngleToTarget( FinalAimSpot, esp->local.CameraPos, Angles );
    
    					engine->GetPlayerMgr()->Yaw   = DegToRad ( Angles[YAW] );
    					engine->GetPlayerMgr()->Pitch = DegToRad ( Angles[PITCH] );
    
    					if( AutoFire )
    					{			
    						mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );
    						mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
    					}
    
    					if( AimType == 1 )
    					{
    						Ready = true;
    						NearestEnemy = -1;
    					}
    				}
    				else
    				{
    					if( AutoSwitch || AutoAim )
    					{
    						Ready = true;	
    						NearestEnemy = -1;
    					}
    					else
    					{
    						Ready = false;
    						NearestEnemy = -1;
    					}
    				}
    			}
    		}
    		else
    		{
    			Ready = true;
    			NearestEnemy = -1;
    		}
    	}
    }
    
    
    void cAimbot::NPC_Lock( int AimType, int AimBone, int AutoAim, int AutoFire, int VisCheck, int AutoSwitch, int Prediction )
    {
    	if( !esp->local.bDead && AutoAim || GetAsyncKeyState( menu->iAimKey ) < 0 )
    	{
    		if( engine->ValidGamePointers() )
    		{
    			if( BestNPC == -1 && Ready )
    			{
    				if( AimType == 1 )
    					BestNPC = GetNearestNPC( VisCheck, AimBone, menu->MaxFov );
    				else if( AimType == 2 )
    					BestNPC = GetNearestNPCToCrosshair( VisCheck, AimBone );
    			}
    
    			if( BestNPC != -1 && Ready )
    			{
    				D3DXVECTOR3 Angles, FinalAimSpot;
    
    				cCharacterFX* Character = (cCharacterFX*)engine->GetGameClientShell()->GetSFXMgr()->SFXList[SFX_CHARACTER].List[BestNPC];
    
    				if( engine->ValidPointer( Character ) && engine->ValidPointer( Character->Object ) )
    				{
    					Transform HeadTransform;
    					unsigned int AimSpot;
    
    					switch( AimBone )
    					{
    						case 1:
    							AimSpot = engine->GetLTModel()->GetNodeTransform( Character->Object, 8, &HeadTransform,  true );
    							HeadTransform.Pos.y += 5.8f;
    							break;
    
    						case 2:
    							AimSpot = engine->GetLTModel()->GetNodeTransform( Character->Object, 6, &HeadTransform,  true );
    							break;
    
    						case 3:
    							AimSpot = engine->GetLTModel()->GetNodeTransform( Character->Object, 7, &HeadTransform,  true );
    							break;
    
    						case 4:
    							AimSpot = engine->GetLTModel()->GetNodeTransform( Character->Object, 4, &HeadTransform,  true );
    							HeadTransform.Pos.y -= 6.0f;
    							break;
    					}
    
    					if( VisCheck == 1 && engine->IsVisible( HeadTransform.Pos ) == false )
    					{
    						BestNPC = -1;
    						Ready = true;
    						return;
    					}
    
    					GetAngleToTarget( HeadTransform.Pos, esp->local.CameraPos, Angles );
    
    					engine->GetPlayerMgr()->Yaw   = DegToRad ( Angles[YAW] );
    					engine->GetPlayerMgr()->Pitch = DegToRad ( Angles[PITCH] );
    
    					if( AutoFire )
    					{			
    						mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );
    						mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
    					}
    
    					if( AimType == 1 )
    					{
    						BestNPC = -1;
    						Ready = true;
    					}
    				}
    				else 
    				{
    					if( AutoSwitch || AutoAim  )
    					{
    						BestNPC = -1;
    						Ready = true;
    					}
    					else
    					{
    						BestNPC = -1;
    						Ready = false;
    					}
    				}
    			}
    		}
    	}
    	else
    	{
    		BestNPC = -1;
    		Ready = true;	
    	}
    }
    
    int cAimbot::GetNearestNPCToCrosshair( int VisCheck, int AimBone )
    {
    	if( !engine ) 
    		return -1;
    
    	int iAimAt = -1;
    	float fNearest = (float)INT_MAX;
    
    	cSFXMgr* SFXMgr = engine->GetGameClientShell()->GetSFXMgr();
    
    	if( engine->ValidPointer( SFXMgr ) ) 
    	{
    		for(int i = 0; i < SFXMgr->SFXList[SFX_CHARACTER].Num; i++)
    		{
    			cCharacterFX* NPC = (cCharacterFX*)SFXMgr->SFXList[SFX_CHARACTER].List[i];
    
    			if(engine->ValidPointer( NPC ) && engine->ValidPointer( NPC->Object ) )
    			{
    				if( esp->local.Object == NPC->Object )	
    					continue; 
    
    				int Type = NPC->IsPlayer;
    
    				if( Type != 0 )
    					continue;
    
    				Transform HeadTransform;
    				unsigned int AimSpot;
    
    				switch( AimBone )
    				{
    					case 1:
    						AimSpot = engine->GetLTModel()->GetNodeTransform  ( NPC->Object, 8, &HeadTransform,  true );
    						HeadTransform.Pos.y += 7.0f;
    						break;
    					case 2:
    						AimSpot = engine->GetLTModel()->GetNodeTransform  ( NPC->Object, 6, &HeadTransform,  true );
    						break;
    					case 3:
    						AimSpot = engine->GetLTModel()->GetNodeTransform  ( NPC->Object, 7, &HeadTransform,  true );
    						break;
    					case 4:
    						AimSpot = engine->GetLTModel()->GetNodeTransform  ( NPC->Object, 4, &HeadTransform,  true );
    						HeadTransform.Pos.y -= 5.0f;
    						break;
    				}
    
    				if( VisCheck == 1 && !engine->IsVisible( HeadTransform.Pos ) )
    					continue;
    
    				D3DXVECTOR3 Out;
    
    				if( !engine->WorldToScreen( HeadTransform.Pos, &Out ) )
    					continue;
    
    				Out.z = 0;
    
    				D3DXVECTOR3 Screen( (float)main->ScreenW2, (float)main->ScreenH2, 0 );
    				D3DXVECTOR3 Pos = ( Out - Screen );
    
    				float Dist = sqrt( (Pos.x * Pos.x ) + ( Pos.y * Pos.y ) + ( Pos.z * Pos.z ) );
    
    				if( Dist < fNearest )
    				{
    					fNearest = Dist;
    					iAimAt = i;
    				}
    			}
    		}
    	}
    	return iAimAt;
    }
    
    int cAimbot::GetNearestNPC( int VisCheck, int AimBone, int Fov )
    {
    	if( !engine )
    		return -1;
    
    	int iAimAt = -1;
    	float fNearest = (float)INT_MAX;
    
    	cSFXMgr* SFXMgr = engine->GetGameClientShell()->GetSFXMgr();
    
    	if( engine->ValidPointer( SFXMgr ) )
    	{
    		for( int i = 0; i < SFXMgr->SFXList[SFX_CHARACTER].Num; i++ )
    		{
    			cCharacterFX* NPC = (cCharacterFX*)SFXMgr->SFXList[SFX_CHARACTER].List[i];
    
    			if( engine->ValidPointer(NPC) && engine->ValidPointer(NPC->Object) )
    			{
    				int* MyObj = engine->GetLTBase()->GetClientObject();
    
    				if( MyObj && MyObj == NPC->Object )	
    					continue; 
    
    				int Type = NPC->IsPlayer;
    
    				if( Type != 0 )
    					continue;
    
    				Transform HeadTransform;
    				unsigned int AimSpot;
    
    				switch( AimBone )
    				{
    					case 1:
    						AimSpot = engine->GetLTModel()->GetNodeTransform( NPC->Object, 8, &HeadTransform,  true );
    						HeadTransform.Pos.y += 7.0f;
    						break;
    					case 2:
    						AimSpot = engine->GetLTModel()->GetNodeTransform( NPC->Object, 6, &HeadTransform,  true );
    						break;
    					case 3:
    						AimSpot = engine->GetLTModel()->GetNodeTransform( NPC->Object, 7, &HeadTransform,  true );
    						break;
    					case 4:
    						AimSpot = engine->GetLTModel()->GetNodeTransform( NPC->Object, 4, &HeadTransform,  true );
    						HeadTransform.Pos.y -= main->fNutOff;
    						break;
    				}
    
    				if( VisCheck == 1 && !engine->IsVisible( HeadTransform.Pos ) )
    					continue;
    
    				D3DXVECTOR3 Dummy;
    
    				if( (int)menu->cBox[4].OnOff == 1 && Fov == 0 && !engine->WorldToScreen( HeadTransform.Pos, &Dummy ) )
    					continue;
    
    				float v[3];
    				VectorSubtract( HeadTransform.Pos, esp->local.CameraPos, v );
    				float fTemp = sqrt( v[0]*v[0] + v[1]*v[1] + v[2]*v[2] ) / 48;
    
    				if( fTemp < fNearest )
    				{
    					iAimAt = i;
    					fNearest = fTemp;
    				}
    			}
    		}
    	}
    	return iAimAt;
    }
    
    void cAimbot::AngleVectors( const float* angles, float* forward, float* right, float* up )
    {
    	float			angle;
    	static float	sr, sp, sy, cr, cp, cy, t;
    
    	angle = angles[YAW];
    	sy = sin(angle);
    	cy = cos(angle);
    
    	angle = angles[PITCH];
    	sp = sin(angle);
    	cp = cos(angle);
    
    	angle =  angles[ROLL];
    	sr = sin(angle);
    	cr = cos(angle);
    
    	if( forward )
    	{
    		forward[0] = cp*cy;
    		forward[1] = cp*sy;
    		forward[2] = -sp;
    	}
    	if( right )
    	{
    		t = sr*sp;
    		right[0] = ( -1*t*cy+-1*cr*-sy );
    		right[1] = ( -1*t*sy+-1*cr*cy );
    		right[2] = -1*sr*cp;
    	}
    	if( up )
    	{
    		t = cr*sp;
    		up[0] = ( t*cy+-sr*-sy );
    		up[1] = ( t*sy+-sr*cy );
    		up[2] = cr*cp;
    	}
    }
    
    void cAimbot::VectorAngles( const float* forward, float* angles )
    {
    	float tmp, yaw, pitch;
    
    	if( forward[2] == 0 && forward[0] == 0 )
    	{
    		yaw = 0;
    
    		if( forward[2] > 0 )
    			pitch = 90;
    		else
    			pitch = 270;
    	}
    	else 
    	{
    		yaw = ( atan2( forward[2], -forward[0] ) * 180 / M_PI )-90;
    
    		if( yaw < 0 )
    			yaw += 360;
    
    		tmp = sqrt( forward[0] * forward[0] + forward[2] * forward[2] );
    		pitch = ( atan2( forward[1], tmp) * 180 / M_PI );
    
    		if( pitch < 0 )
    			pitch += 360;
    	}
    
    	angles[0] = -pitch;
    	angles[1] = yaw;
    	angles[2] = 0;
    }
    
    
    void cAimbot::GetAngleToTarget(D3DXVECTOR3 vTargetPos, D3DXVECTOR3 vCameraPos, D3DXVECTOR3& vAngles)
    {
    	D3DXVECTOR3 vDelta;
    	vDelta.x = vTargetPos.x - vCameraPos.x;
    	vDelta.y = vTargetPos.y - vCameraPos.y;
    	vDelta.z = vTargetPos.z - vCameraPos.z;
    
    	VectorAngles( (float*)&vDelta, (float*)&vAngles );
    
    	if( vAngles.x > 180.0f )          
    		vAngles.x  -= 360.0f; 
    	else if( vAngles.x < -180.0f )    
    		vAngles.x   += 360.0f; 
    
    	if( vAngles.y > 180.0f )            
    		vAngles.y     -= 360.0f; 
    	else if( vAngles.y < -180.0f )      
    		vAngles.y    += 360.0f; 
    }
    
    
    float cAimbot::GetAngleDistanceFromYaw( float fYaw, D3DXVECTOR3 vPos, D3DXVECTOR3 vTarget )
    {
    	D3DXVECTOR2 vDist( vPos.x - vTarget.x, vPos.z - vTarget.z );
    	
    	float fHypot	= VectToHypot( vDist ) + 0.000001f;
    	float fView		= acos( ( vDist.y + 0.000001f ) / fHypot );
    	
    	if( vDist.x < 0 && vDist.y < 0 || vDist.x < 0 && vDist.y > 0 )
    		fView	= ( M_PI - fView );
    	else
    		fView	= ( M_PI + fView );
    	
    	return fabsf( fYaw - fView );
    }
    
    D3DXVECTOR3 cAimbot::GhettoPrediction( int i, int iWait, D3DXVECTOR3 Pos, CTimer* TimerList )
    {
    	if( !TimerList[i]****nning() )
    	{
    		this->oldPos = Pos;
    		TimerList[i].Start( iWait );
    	}
    
    	if( Pos.x > this->oldPos.x )
    	{
    		this->diffPos.x = Pos.x - this->oldPos.x;
    		Pos.x += this->diffPos.x;
    	}
    	else //if( Pos.x < this->oldPos.x )
    	{
    		this->diffPos.x = this->oldPos.x - Pos.x;
    		Pos.x -= this->diffPos.x;
    	}
    
    	if( Pos.y > this->oldPos.y )
    	{
    		this->diffPos.y = Pos.y - this->oldPos.y;
    		Pos.y += this->diffPos.y;
    	}
    	else //if( Pos.y < this->oldPos.y )
    	{
    		this->diffPos.y = this->oldPos.y - Pos.y;
    		Pos.y -= this->diffPos.y;
    	}
    
    	if( Pos.z > this->oldPos.z )
    	{
    		this->diffPos.z = Pos.z - this->oldPos.z;
    		Pos.z += this->diffPos.z;
    	}
    	else //if( Pos.z < this->oldPos.z )
    	{
    		this->diffPos.z = this->oldPos.z - Pos.z;
    		Pos.z -= this->diffPos.z;
    	}
    	return Pos;
    }
    Code:
    #ifndef AIMBOTH
    #define AIMBOTH
    
    #pragma once
    
    #include "includes.h"
    
    #define M_PI 3.14159265358979323846f
    #define DegToRad( degree ) ( (degree) * (3.141592654f / 180.0f) )
    #define PITCH 0
    #define YAW 1
    #define ROLL 2
    
    class cAimbot
    {
    public:
    	cAimbot( void )
    	{
    		NearestEnemy = -1;
    		BestNPC = -1;
    		Ready = true;
    	}
    
    	inline float VectToHypot( D3DXVECTOR2 vPos )
    	{
    		return sqrt( vPos.x * vPos.x + vPos.y * vPos.y );
    	}
    
    	void LockToWeapon( void );
    	int GetNearestNPC( int VisCheck, int AimBone, int Fov );
    	float GetAngleDistanceFromYaw( float fYaw, D3DXVECTOR3 vPos, D3DXVECTOR3 vTarget );
    	D3DXVECTOR3 GhettoPrediction( int i, int iWait, D3DXVECTOR3 Pos, CTimer* TimerList );
    	int GetNearestPlayer( int VisCheck, int AimBone, int AimAtTeam, int SpawnCheck, int Fov );
    	void GetAngleToTarget( D3DXVECTOR3 vTargetPos, D3DXVECTOR3 vCameraPos, D3DXVECTOR3& vAngles );
    	void NPC_Lock( int AimType, int AimBone, int AutoAim, int AutoFire, int VisCheck, int AutoSwitch, int Prediction );
    	void Lock( int AimType, int AimBone, int AutoAim, int AutoFire, int VisCheck, int AimAtTeam, int SpawnCheck, int AutoSwitch, int Prediction );
    
    private:
    	bool Ready;
    	int NearestEnemy, BestNPC;
    	D3DXVECTOR3 oldPos, diffPos;
    
    	int GetNearestWeapon( void );
    	void VectorAngles( const float* forward, float* angles );
    	int GetNearestNPCToCrosshair( int VisCheck, int AimBone );
    	void AngleVectors( const float* angles, float* forward, float* right, float* up );
    	int GetNearestToCrosshair( int VisCheck, int AimBone, int AimAtTeam, int SpawnCheck );
    };
    
    extern class cAimbot* aimbot;
    
    #endif

  5. #20
    Lady GaGa's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Location
    Gamerage
    Posts
    5,147
    Reputation
    140
    Thanks
    333
    My Mood
    Angelic
    Quote Originally Posted by flameswor10 View Post
    Code:
    void LeftClickDown ( )
    {  
      INPUT    Input={0};
      // left down 
      Input.type      = INPUT_MOUSE;
      Input.mi.dwFlags  = MOUSEEVENTF_LEFTDOWN;
      ::SendInput(1,&Input,sizeof(INPUT));
    }
    
    void LeftClickUp( )
    {
    	INPUT    Input={0};
    	  // left up
      ::ZeroMemory(&Input,sizeof(INPUT));
      Input.type      = INPUT_MOUSE;
      Input.mi.dwFlags  = MOUSEEVENTF_LEFTUP;
      ::SendInput(1,&Input,sizeof(INPUT));
    }
    void Aimbot (bool aim, int x, int y, int enemyx, int enemyy, bool autoshoot)
    {
    	if (aim == true)
    	{	
    		if (x && y == enemyx && enemyy)
    		{
    			if(autoshoot = true)
    			{
    				LeftClickDown ();
    				LeftClickUp ();
    			}
    		}else{
    			POINT CrosshairPos;
    			GetCursorPos(&CrosshairPos);
    			x=CrosshairPos.x;
    			y=CrosshairPos.y;
    			SetCursorPos(enemyx, enemyy);
    		}
    	}
    }
    No Errors on compile
    Even for Project Blackout?
    Your signature has been removed due to excessive homosexuality.

  6. #21
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,611
    Reputation
    149
    Thanks
    4,957
    My Mood
    Cool
    This looks like CA now.
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  7. #22
    KawaiiSlut's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    419
    Reputation
    16
    Thanks
    87
    Quote Originally Posted by Justified View Post
    Even for Project Blackout?

    Join the CA section. You will see what I do every post ban

  8. #23
    Lady GaGa's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Location
    Gamerage
    Posts
    5,147
    Reputation
    140
    Thanks
    333
    My Mood
    Angelic
    Quote Originally Posted by KawaiiSlut View Post

    Join the CA section. You will see what I do every post ban
    You people have killed CA.
    I do private servers.
    Your signature has been removed due to excessive homosexuality.

  9. #24
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,611
    Reputation
    149
    Thanks
    4,957
    My Mood
    Cool
    Quote Originally Posted by KawaiiSlut View Post

    Join the CA section. You will see what I do every post ban
    OMG DONT>!!!!!!!!1
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  10. #25
    KawaiiSlut's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    419
    Reputation
    16
    Thanks
    87
    Quote Originally Posted by topblast View Post


    OMG DONT>!!!!!!!!1
    Wut.
    I decided to post here instead of CA section

  11. #26
    Lady GaGa's Avatar
    Join Date
    Nov 2009
    Gender
    male
    Location
    Gamerage
    Posts
    5,147
    Reputation
    140
    Thanks
    333
    My Mood
    Angelic
    Quote Originally Posted by topblast View Post


    OMG DONT>!!!!!!!!1
    Now I want to take a peek
    Gimme a hint
    Your signature has been removed due to excessive homosexuality.

  12. #27
    KawaiiSlut's Avatar
    Join Date
    Jul 2010
    Gender
    female
    Posts
    419
    Reputation
    16
    Thanks
    87
    Quote Originally Posted by Justified View Post
    Now I want to take a peek
    Gimme a hint


    GUI took around about 1 hour to make.
    Hack only works for 3 seconds XD
    Last edited by KawaiiSlut; 01-21-2011 at 06:09 PM.

  13. #28
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,611
    Reputation
    149
    Thanks
    4,957
    My Mood
    Cool
    Quote Originally Posted by Justified View Post
    Now I want to take a peek
    Gimme a hint
    Santa is Comming early.

    thats ur hint
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

  14. #29
    Reaper8281's Avatar
    Join Date
    Jan 2009
    Gender
    male
    Location
    In your pants
    Posts
    2,174
    Reputation
    172
    Thanks
    98
    faaaakeee lol

    thanks James


    thanks Zorph2


    thanks again Zorph2

    R.I.P. Hippyfreak


    made by Zorph2


    thanks to my friend madazn down at LNG

  15. #30
    topblast's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Far from around you Programmer: C++ | VB | C# | JAVA
    Posts
    3,611
    Reputation
    149
    Thanks
    4,957
    My Mood
    Cool
    no it is real
    I just like programming, that is all.

    Current Stuff:

    • GPU Programmer (Cuda)
    • Client/Server (Cloud Server)
    • Mobile App Development

Page 2 of 7 FirstFirst 1234 ... LastLast