This is a modify version of the script made by "dontknowletspl" to work in waw engine, here´s the original post:
https://forum.plutonium.pw/topic/21826/release-zombies-black-ops-1-aim-assist
code_text
//Call of Duty World at War
//Credits to "dontknowletspl" for the original script
#include maps\_utility;
#include common_scripts\utility;
init()
{
if(level.zombiemode == true)
{
level thread onPlayerConnect();
SetDvar( "aim_assist_lock", "1" );
}
}
onPlayerConnect()
{
level endon( "end_game" );
for ( ;; )
{
if(isDefined(level.player_out_of_playable_area_monitor) && level.player_out_of_playable_area_monitor) //disable death barriers
level.player_out_of_playable_area_monitor = 0;
if(isDefined(level.player_too_many_weapons_monitor) && level.player_too_many_weapons_monitor) //disable too many weapons check
level.player_too_many_weapons_monitor = 0;
level waittill( "connected", player );
player thread AimAssist();
}
}
AimAssist()
{
level endon("end_game");
self endon("disconnect");
for(;;)
{
if(self hasperk("specialty_bulletaccuracy")) //waw custom perk check
tag = "j_head";
else
tag = "j_spine4";
view_pos = self Geteye();
self.head = self getTagOrigin("j_head");
zombies = get_array_of_closest( view_pos, getaispeciesarray("axis", "all"), undefined, undefined, undefined );
range_squared = 500 * 500;
for ( i = 0; i < zombies.size; i++ )
{
zombies[i].head = zombies[i] getTagOrigin(tag);
if ( !IsDefined( zombies[i] ) || !IsAlive( zombies[i] ))
{
continue;
}
enemy_origin = zombies[i].origin;
test_range_squared = DistanceSquared( view_pos, enemy_origin );
if ( test_range_squared < range_squared && GetDvar( "aim_assist_lock" ) == "1")
{
if(zombies[i] player_can_see_me(self) && bulletTracePassed(self.head, zombies[i].head, false, undefined))
{
if(self adsButtonPressed() && self playerADS() < 0.6)
{
self setPlayerAngles(vectorToAngles((zombies[i] getTagOrigin(tag)) - (self getEye())));
while( self adsButtonPressed() )
{
wait .05;
}
break;
}
}
}
}
wait 0.05;
}
}
player_can_see_me( player )
{
playerangles = player getplayerangles();
playerforwardvec = anglesToForward( playerangles );
playerunitforwardvec = vectornormalize( playerforwardvec );
banzaipos = self.origin;
playerpos = player getorigin();
playertobanzaivec = banzaipos - playerpos;
playertobanzaiunitvec = vectornormalize( playertobanzaivec );
forwarddotbanzai = vectordot( playerunitforwardvec, playertobanzaiunitvec );
if ( forwarddotbanzai >= 1 )
{
anglefromcenter = 0;
}
else if ( forwarddotbanzai <= -1 )
{
anglefromcenter = 180;
}
else
{
anglefromcenter = acos( forwarddotbanzai );
}
playerfov = getDvarFloat( "cg_fov" );
banzaivsplayerfovbuffer = 0.2;
if ( banzaivsplayerfovbuffer <= 0 )
{
banzaivsplayerfovbuffer = 0.2;
}
distance = self check_distance(player);
playercanseeme = anglefromcenter <= ( ( playerfov * distance ) * ( 1 - banzaivsplayerfovbuffer ) );
return playercanseeme;
}
check_distance(player)
{
if(distance(self.origin, player.origin) < 90)
return .45;
if(distance(self.origin, player.origin) <= 100)
return .4;
if(distance(self.origin, player.origin) <= 150)
return .3;
if(distance(self.origin, player.origin) <= 200)
return .25;
if(distance(self.origin, player.origin) <= 250)
return .225;
if(distance(self.origin, player.origin) <= 300)
return .2;
if(distance(self.origin, player.origin) <= 350)
return .175;
if(distance(self.origin, player.origin) <= 400)
return .15;
return .125;
}
INSTALL: Copy the code to text editor save as aim_assist.gsc then copy the file to:
%localappdata%\Plutonium\storage\t4\scripts\sp
The script works automatically upon launching any zombie map or custom map, to disable the aim lock just type "aim_assist_lock 0" into the console, the script has some issues with melee, reload and some other actions, ill fix this things probably nex week. Any recommendations will be welcome