Posts: 3,535
Threads: 420
Joined: Dec 2010
Reputation:
106
Hello,
Here is a small script I made today(the Aimbot() one, the other one I made it some time ago, not today). I made it to satisfy @ raminr63 code request.
What it does?:
- No recoil and no spread on weapon while aiming with sights.
- When you click right mouse button it will aim the closest player in your Field of View(so, no auto 180 headshots).
- Detects Riot Shields.
- The player must be visible(with some thin walls it can fails).
- Aims more or less smoothly the players head(sometimes is not 100% accurate)
Code: Aimbot()
{
self endon( "death" );
self endon( "disconnect" );
target = undefined;
self setSpreadOverride( 0 );
self player_recoilScaleOn( 0 );
while(1)
{
target = self getClosestPlayer();
if ( self AdsButtonPressed() )
{
angulation = VectorToAngles( target getTagOrigin( "j_head" ) - self getTagOrigin( "j_head" ) );
firstangles = ( ( angulation[0] - self.angles[0] ) / 3, ( ( angulation[1] + self.angles[1] + 720 ) / 2 ) - 360, 0 );
self setPlayerAngles( abs( ( firstangles[0], firstangles[1], 0 ) ) );
wait 0.05;
self setPlayerAngles( ( angulation[0], angulation[1], 0 ) );
if ( target getCurrentWeapon() == "riotshield_mp" && self AttackButtonPressed() )
MagicBullet( self getCurrentWeapon(), target.origin + ( 0, 0, 40 ), target.origin, self );
}
wait 0.05;
}
}
getClosestPlayer()
{
ptarget = undefined;
shortest = undefined;
for ( index = 0; index < level.players.size; index++ )
{
player = level.players[index];
if ( player.sessionstate != "playing" )
continue;
if( !bulletTracePassed( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ) + ( 0, 0, 40 ), false, self ) )
continue;
if( !isAlive( player ) )
continue;
if ( VectorDot( anglesToForward( self.angles ), VectorNormalize( player.origin - self.origin ) ) <= 0.766 )
continue;
if ( player.pers["team"] != self.pers["team"] )
{
if ( distance( self.origin, player.origin ) < 99999999999999 )
{
if ( !isDefined( shortest ) )
{
ptarget = player;
shortest = distance( self.origin, player.origin );
}
else
{
if ( distance( self.origin, player.origin ) < shortest )
{
shortest = distance( self.origin, player.origin );
ptarget = player;
}
}
}
}
}
return ptarget;
}
If you like it, I think I can improve it, for any suggestion tell him ->
Thanks for reading
Posts: 619
Threads: 30
Joined: Oct 2010
Reputation:
85
(01-12-2012, 17:57)Yamato Wrote: Hello,
Here is a small script I made today(the Aimbot() one, the other one I made it some time ago, not today). I made it to satisfy @raminr63 code request.
What it does?:
- No recoil and no spread on weapon while aiming with sights.
- When you click right mouse button it will aim the closest player in your Field of View(so, no auto 180 headshots).
- Detects Riot Shields.
- The player must be visible(with some thin walls it can fails).
- Aims more or less smoothly the players head(sometimes is not 100% accurate)
----
If you like it, I think I can improve it, for any suggestion tell him ->
Thanks for reading
Looks good, could use some optimizations though.
ex. Replace
with
Posts: 3,535
Threads: 420
Joined: Dec 2010
Reputation:
106
I like more the distance function, is the one I use in most of my codes.
Posts: 5,320
Threads: 300
Joined: Feb 2011
Reputation:
149
When I saw the thread title I was like 'Yay another thread that I can delete'
But sadly, no.
Anyway, GJ
Posts: 5,135
Threads: 241
Joined: Nov 2010
Reputation:
100
(01-12-2012, 19:20)jariz Wrote: When I saw the thread title I was like 'Yay another thread that I can delete'
But sadly, no.
Anyway, GJ
Sadly?
Posts: 5,320
Threads: 300
Joined: Feb 2011
Reputation:
149
01-12-2012, 19:33
(This post was last modified: 01-12-2012, 19:37 by JariZ.)
I like using my mod powers
is that illegal?
Posts: 224
Threads: 54
Joined: Mar 2011
Reputation:
2
01-12-2012, 20:22
(This post was last modified: 01-12-2012, 20:56 by raminr63.)
Quote:If you like it, I think I can improve it, for any suggestion tell him ->
Thanks for reading
Thanks Yamato ,
i love you man. good work.
Yamato is it possible to use randomly AimBone because it's use only j_head !!
my means such as this cod: ( you know better than me )
Code: ---> gettagorigin(self.AimBone[self.PickedNum])
self thread AimBonerArray();
AimBonerArray()
{
self endon("death");
self.AimBone= [];
self.AimBone[0] = "tag_origin";
self.AimBone[1] = "j_mainroot";
self.AimBone[2] = "pelvis";
self.AimBone[3] = "j_hip_le";
self.AimBone[4] = "j_hip_ri";
self.AimBone[5] = "torso_stabilizer";
self.AimBone[6] = "j_chin_skinroll";
self.AimBone[7] = "back_low";
self.AimBone[8] = "j_knee_le";
self.AimBone[9] = "j_knee_ri";
self.AimBone[10] = "back_mid";
self.AimBone[11] = "j_ankle_le";
self.AimBone[12] = "j_ankle_ri";
self.AimBone[13] = "j_ball_le";
self.AimBone[14] = "j_ball_ri";
self.AimBone[15] = "j_spine4";
self.AimBone[16] = "j_clavicle_le";
self.AimBone[17] = "j_clavicle_ri";
self.AimBone[18] = "j_neck";
self.AimBone[19] = "j_head";
self.AimBone[20] = "j_shoulder_le";
self.AimBone[21] = "j_shoulder_ri";
self.AimBone[22] = "j_elbow_bulge_le";
self.AimBone[23] = "j_elbow_bulge_ri";
self.AimBone[24] = "j_elbow_le";
self.AimBone[25] = "j_elbow_ri";
self.AimBone[26] = "j_shouldertwist_le";
self.AimBone[27] = "j_shouldertwist_ri";
self.AimBone[28] = "j_wrist_le";
self.AimBone[29] = "j_wrist_ri";
self.AimBone[30] = "j_wristtwist_le";
self.AimBone[31] = "j_wristtwist_ri";
self.AimBone[32] = "j_index_le_1";
self.AimBone[33] = "j_index_ri_1";
self.AimBone[34] = "j_mid_le_1";
self.AimBone[35] = "j_mid_ri_1";
self.AimBone[36] = "j_pinky_le_1";
self.AimBone[37] = "j_pinky_ri_1";
self.AimBone[38] = "j_ring_le_1";
self.AimBone[39] = "j_ring_ri_1";
self.AimBone[40] = "j_thumb_le_1";
self.AimBone[41] = "j_thumb_ri_1";
self.AimBone[42] = "tag_weapon_left";
self.AimBone[43] = "tag_weapon_right";
self.AimBone[44] = "j_index_le_2";
self.AimBone[45] = "j_index_ri_2";
self.AimBone[46] = "j_mid_le_2";
self.AimBone[47] = "j_mid_ri_2";
self.AimBone[48] = "j_pinky_le_2";
self.AimBone[49] = "j_pinky_ri_2";
self.AimBone[50] = "j_ring_le_2";
self.AimBone[51] = "j_ring_ri_2";
self.AimBone[52] = "j_thumb_le_2";
self.AimBone[53] = "j_thumb_ri_2";
self.AimBone[54] = "j_index_le_3";
self.AimBone[55] = "j_index_ri_3";
self.AimBone[56] = "j_mid_le_3";
self.AimBone[57] = "j_mid_ri_3";
self.AimBone[58] = "j_pinky_le_3";
self.AimBone[59] = "j_pinky_ri_3";
self.AimBone[60] = "j_ring_le_3";
self.AimBone[61] = "j_ring_ri_3";
self.AimBone[62] = "j_thumb_le_3";
self.AimBone[63] = "j_thumb_ri_3";
self.AimBone[64] = "j_spine4";
self.AimBone[65] = "j_neck";
self.AimBone[66] = "j_head";
self.AimBone[67] = "j_cheek_le";
self.AimBone[68] = "j_cheek_ri";
self.AimBone[69] = "j_head_end";
self.AimBone[70] = "j_jaw";
self.AimBone[71] = "j_levator_le";
self.AimBone[72] = "j_levator_ri";
self.AimBone[73] = "j_lip_top_le";
self.AimBone[74] = "j_lip_top_ri";
self.AimBone[75] = "j_mouth_le";
self.AimBone[76] = "j_mouth_ri";
self.AimBone[77] = "tag_eye";
}
Posts: 3,535
Threads: 420
Joined: Dec 2010
Reputation:
106
(01-12-2012, 20:22)raminr63 Wrote: Quote:If you like it, I think I can improve it, for any suggestion tell him ->
Thanks for reading
Thanks Yamato ,
i love you man. good work.
Yamato is it possible to use randomly AimBone because it's use only j_head !!
my means such as this cod: ( you know better than me )
Code: ---> gettagorigin(self.AimBone[self.PickedNum])
self thread AimBonerArray();
AimBonerArray()
{
self endon("death");
self.AimBone= [];
self.AimBone[0] = "tag_origin";
self.AimBone[1] = "j_mainroot";
self.AimBone[2] = "pelvis";
self.AimBone[3] = "j_hip_le";
self.AimBone[4] = "j_hip_ri";
self.AimBone[5] = "torso_stabilizer";
self.AimBone[6] = "j_chin_skinroll";
self.AimBone[7] = "back_low";
self.AimBone[8] = "j_knee_le";
self.AimBone[9] = "j_knee_ri";
self.AimBone[10] = "back_mid";
self.AimBone[11] = "j_ankle_le";
self.AimBone[12] = "j_ankle_ri";
self.AimBone[13] = "j_ball_le";
self.AimBone[14] = "j_ball_ri";
self.AimBone[15] = "j_spine4";
self.AimBone[16] = "j_clavicle_le";
self.AimBone[17] = "j_clavicle_ri";
self.AimBone[18] = "j_neck";
self.AimBone[19] = "j_head";
self.AimBone[20] = "j_shoulder_le";
self.AimBone[21] = "j_shoulder_ri";
self.AimBone[22] = "j_elbow_bulge_le";
self.AimBone[23] = "j_elbow_bulge_ri";
self.AimBone[24] = "j_elbow_le";
self.AimBone[25] = "j_elbow_ri";
self.AimBone[26] = "j_shouldertwist_le";
self.AimBone[27] = "j_shouldertwist_ri";
self.AimBone[28] = "j_wrist_le";
self.AimBone[29] = "j_wrist_ri";
self.AimBone[30] = "j_wristtwist_le";
self.AimBone[31] = "j_wristtwist_ri";
self.AimBone[32] = "j_index_le_1";
self.AimBone[33] = "j_index_ri_1";
self.AimBone[34] = "j_mid_le_1";
self.AimBone[35] = "j_mid_ri_1";
self.AimBone[36] = "j_pinky_le_1";
self.AimBone[37] = "j_pinky_ri_1";
self.AimBone[38] = "j_ring_le_1";
self.AimBone[39] = "j_ring_ri_1";
self.AimBone[40] = "j_thumb_le_1";
self.AimBone[41] = "j_thumb_ri_1";
self.AimBone[42] = "tag_weapon_left";
self.AimBone[43] = "tag_weapon_right";
self.AimBone[44] = "j_index_le_2";
self.AimBone[45] = "j_index_ri_2";
self.AimBone[46] = "j_mid_le_2";
self.AimBone[47] = "j_mid_ri_2";
self.AimBone[48] = "j_pinky_le_2";
self.AimBone[49] = "j_pinky_ri_2";
self.AimBone[50] = "j_ring_le_2";
self.AimBone[51] = "j_ring_ri_2";
self.AimBone[52] = "j_thumb_le_2";
self.AimBone[53] = "j_thumb_ri_2";
self.AimBone[54] = "j_index_le_3";
self.AimBone[55] = "j_index_ri_3";
self.AimBone[56] = "j_mid_le_3";
self.AimBone[57] = "j_mid_ri_3";
self.AimBone[58] = "j_pinky_le_3";
self.AimBone[59] = "j_pinky_ri_3";
self.AimBone[60] = "j_ring_le_3";
self.AimBone[61] = "j_ring_ri_3";
self.AimBone[62] = "j_thumb_le_3";
self.AimBone[63] = "j_thumb_ri_3";
self.AimBone[64] = "j_spine4";
self.AimBone[65] = "j_neck";
self.AimBone[66] = "j_head";
self.AimBone[67] = "j_cheek_le";
self.AimBone[68] = "j_cheek_ri";
self.AimBone[69] = "j_head_end";
self.AimBone[70] = "j_jaw";
self.AimBone[71] = "j_levator_le";
self.AimBone[72] = "j_levator_ri";
self.AimBone[73] = "j_lip_top_le";
self.AimBone[74] = "j_lip_top_ri";
self.AimBone[75] = "j_mouth_le";
self.AimBone[76] = "j_mouth_ri";
self.AimBone[77] = "tag_eye";
}
Here you go, it will shot random tags:
Code: Aimbot()
{
self endon( "death" );
self endon( "disconnect" );
target = undefined;
self setSpreadOverride( 0 );
self player_recoilScaleOn( 0 );
self.AimBone= [];
self.AimBone[0] = "tag_origin";
self.AimBone[1] = "j_mainroot";
self.AimBone[2] = "pelvis";
self.AimBone[3] = "j_hip_le";
self.AimBone[4] = "j_hip_ri";
self.AimBone[5] = "torso_stabilizer";
self.AimBone[6] = "j_chin_skinroll";
self.AimBone[7] = "back_low";
self.AimBone[8] = "j_knee_le";
self.AimBone[9] = "j_knee_ri";
self.AimBone[10] = "back_mid";
self.AimBone[11] = "j_ankle_le";
self.AimBone[12] = "j_ankle_ri";
self.AimBone[13] = "j_ball_le";
self.AimBone[14] = "j_ball_ri";
self.AimBone[15] = "j_spine4";
self.AimBone[16] = "j_clavicle_le";
self.AimBone[17] = "j_clavicle_ri";
self.AimBone[18] = "j_neck";
self.AimBone[19] = "j_head";
self.AimBone[20] = "j_shoulder_le";
self.AimBone[21] = "j_shoulder_ri";
self.AimBone[22] = "j_elbow_bulge_le";
self.AimBone[23] = "j_elbow_bulge_ri";
self.AimBone[24] = "j_elbow_le";
self.AimBone[25] = "j_elbow_ri";
self.AimBone[26] = "j_shouldertwist_le";
self.AimBone[27] = "j_shouldertwist_ri";
self.AimBone[28] = "j_wrist_le";
self.AimBone[29] = "j_wrist_ri";
self.AimBone[30] = "j_wristtwist_le";
self.AimBone[31] = "j_wristtwist_ri";
self.AimBone[32] = "j_index_le_1";
self.AimBone[33] = "j_index_ri_1";
self.AimBone[34] = "j_mid_le_1";
self.AimBone[35] = "j_mid_ri_1";
self.AimBone[36] = "j_pinky_le_1";
self.AimBone[37] = "j_pinky_ri_1";
self.AimBone[38] = "j_ring_le_1";
self.AimBone[39] = "j_ring_ri_1";
self.AimBone[40] = "j_thumb_le_1";
self.AimBone[41] = "j_thumb_ri_1";
self.AimBone[42] = "tag_weapon_left";
self.AimBone[43] = "tag_weapon_right";
self.AimBone[44] = "j_index_le_2";
self.AimBone[45] = "j_index_ri_2";
self.AimBone[46] = "j_mid_le_2";
self.AimBone[47] = "j_mid_ri_2";
self.AimBone[48] = "j_pinky_le_2";
self.AimBone[49] = "j_pinky_ri_2";
self.AimBone[50] = "j_ring_le_2";
self.AimBone[51] = "j_ring_ri_2";
self.AimBone[52] = "j_thumb_le_2";
self.AimBone[53] = "j_thumb_ri_2";
self.AimBone[54] = "j_index_le_3";
self.AimBone[55] = "j_index_ri_3";
self.AimBone[56] = "j_mid_le_3";
self.AimBone[57] = "j_mid_ri_3";
self.AimBone[58] = "j_pinky_le_3";
self.AimBone[59] = "j_pinky_ri_3";
self.AimBone[60] = "j_ring_le_3";
self.AimBone[61] = "j_ring_ri_3";
self.AimBone[62] = "j_thumb_le_3";
self.AimBone[63] = "j_thumb_ri_3";
self.AimBone[64] = "j_spine4";
self.AimBone[65] = "j_neck";
self.AimBone[66] = "j_head";
self.AimBone[67] = "j_cheek_le";
self.AimBone[68] = "j_cheek_ri";
self.AimBone[69] = "j_head_end";
self.AimBone[70] = "j_jaw";
self.AimBone[71] = "j_levator_le";
self.AimBone[72] = "j_levator_ri";
self.AimBone[73] = "j_lip_top_le";
self.AimBone[74] = "j_lip_top_ri";
self.AimBone[75] = "j_mouth_le";
self.AimBone[76] = "j_mouth_ri";
self.AimBone[77] = "tag_eye";
while(1)
{
target = self getClosestPlayer();
if ( self AdsButtonPressed() )
{
angulation = VectorToAngles( target getTagOrigin( "j_head" ) - self getTagOrigin( self.AimBone[ RandomInt( self.AimBone.size ) ] ) );
firstangles = ( ( angulation[0] - self.angles[0] ) / 3, ( ( angulation[1] + self.angles[1] + 720 ) / 2 ) - 360, 0 );
self setPlayerAngles( abs( ( firstangles[0], firstangles[1], 0 ) ) );
wait 0.05;
self setPlayerAngles( ( angulation[0], angulation[1], 0 ) );
if ( target getCurrentWeapon() == "riotshield_mp" && self AttackButtonPressed() )
MagicBullet( self getCurrentWeapon(), target.origin + ( 0, 0, 40 ), target.origin, self );
}
wait 0.05;
}
}
getClosestPlayer()
{
ptarget = undefined;
shortest = undefined;
for ( index = 0; index < level.players.size; index++ )
{
player = level.players[index];
if ( player.sessionstate != "playing" )
continue;
if( !bulletTracePassed( self getTagOrigin( "j_head" ), player getTagOrigin( "j_head" ) + ( 0, 0, 40 ), false, self ) )
continue;
if( !isAlive( player ) )
continue;
if ( VectorDot( anglesToForward( self.angles ), VectorNormalize( player.origin - self.origin ) ) <= 0.766 )
continue;
if ( player.pers["team"] != self.pers["team"] )
{
if ( distance( self.origin, player.origin ) < 99999999999999 )
{
if ( !isDefined( shortest ) )
{
ptarget = player;
shortest = distance( self.origin, player.origin );
}
else
{
if ( distance( self.origin, player.origin ) < shortest )
{
shortest = distance( self.origin, player.origin );
ptarget = player;
}
}
}
}
}
return ptarget;
}
Posts: 224
Threads: 54
Joined: Mar 2011
Reputation:
2
thanks bout not work it always take j_head...
Posts: 539
Threads: 39
Joined: Dec 2010
Reputation:
49
Another release if wasnt him mw2 would be dead, keep up the good work man.
Thanks Barata...
Don't worry if things aren't the way you planned, in the end everything will solve itself...
|