This commit is contained in:
ineed bots
2023-11-27 14:18:15 -06:00
parent af4d44c3a4
commit 13a6417a9d
5 changed files with 137 additions and 467 deletions

View File

@@ -142,7 +142,7 @@ resetBotVars()
self.bot.rand = randomInt( 100 );
self botStop();
self BotBuiltinBotStop();
}
/*
@@ -360,7 +360,7 @@ watchUsingMinigun()
{
if ( self getCurrentWeapon() != "heli_remote_mp" )
{
self changeToWeap( "heli_remote_mp" );
self switchToWeapon( "heli_remote_mp" );
}
if ( isDefined( self.bot.target ) )
@@ -384,7 +384,7 @@ watchAc130Weapon()
curWeap = self GetCurrentWeapon();
if ( curWeap != "ac130_105mm_mp" && curWeap != "ac130_40mm_mp" && curWeap != "ac130_25mm_mp" )
self changeToWeap( "ac130_105mm_mp" );
self switchToWeapon( "ac130_105mm_mp" );
if ( isDefined( self.bot.target ) )
self thread pressFire();
@@ -402,11 +402,11 @@ watchUsingAc130()
while ( isDefined( level.ac130Player ) && level.ac130player == self )
{
self changeToWeap( "ac130_105mm_mp" );
self switchToWeapon( "ac130_105mm_mp" );
wait 1 + randomInt( 2 );
self changeToWeap( "ac130_40mm_mp" );
self switchToWeapon( "ac130_40mm_mp" );
wait 2 + randomInt( 2 );
self changeToWeap( "ac130_25mm_mp" );
self switchToWeapon( "ac130_25mm_mp" );
wait 3 + randomInt( 2 );
}
}
@@ -603,7 +603,7 @@ doBotMovement_loop( data )
if ( self.bot.wantsprint && self.bot.issprinting )
dir = ( 127, dir[1], 0 );
self botMovement( int( dir[0] ), int( dir[1] ) );
self BotBuiltinBotMovement( int( dir[0] ), int( dir[1] ) );
}
/*
@@ -2268,9 +2268,9 @@ getRandomLargestStafe( dist )
holdbreath( what )
{
if ( what )
self botAction( "+holdbreath" );
self BotBuiltinBotAction( "+holdbreath" );
else
self botAction( "-holdbreath" );
self BotBuiltinBotAction( "-holdbreath" );
}
/*
@@ -2283,9 +2283,9 @@ sprint()
self notify( "bot_sprint" );
self endon( "bot_sprint" );
self botAction( "+sprint" );
self BotBuiltinBotAction( "+sprint" );
wait 0.05;
self botAction( "-sprint" );
self BotBuiltinBotAction( "-sprint" );
}
/*
@@ -2301,9 +2301,9 @@ knife()
self.bot.isknifing = true;
self.bot.isknifingafter = true;
self botAction( "+melee" );
self BotBuiltinBotAction( "+melee" );
wait 0.05;
self botAction( "-melee" );
self BotBuiltinBotAction( "-melee" );
self.bot.isknifing = false;
@@ -2322,9 +2322,9 @@ reload()
self notify( "bot_reload" );
self endon( "bot_reload" );
self botAction( "+reload" );
self BotBuiltinBotAction( "+reload" );
wait 0.05;
self botAction( "-reload" );
self BotBuiltinBotAction( "-reload" );
}
/*
@@ -2340,14 +2340,14 @@ frag( time )
if ( !isDefined( time ) )
time = 0.05;
self botAction( "+frag" );
self BotBuiltinBotAction( "+frag" );
self.bot.isfragging = true;
self.bot.isfraggingafter = true;
if ( time )
wait time;
self botAction( "-frag" );
self BotBuiltinBotAction( "-frag" );
self.bot.isfragging = false;
wait 1.25;
@@ -2367,14 +2367,14 @@ smoke( time )
if ( !isDefined( time ) )
time = 0.05;
self botAction( "+smoke" );
self BotBuiltinBotAction( "+smoke" );
self.bot.issmoking = true;
self.bot.issmokingafter = true;
if ( time )
wait time;
self botAction( "-smoke" );
self BotBuiltinBotAction( "-smoke" );
self.bot.issmoking = false;
wait 1.25;
@@ -2394,12 +2394,12 @@ use( time )
if ( !isDefined( time ) )
time = 0.05;
self botAction( "+activate" );
self BotBuiltinBotAction( "+activate" );
if ( time )
wait time;
self botAction( "-activate" );
self BotBuiltinBotAction( "-activate" );
}
/*
@@ -2410,9 +2410,9 @@ fire( what )
self notify( "bot_fire" );
if ( what )
self botAction( "+fire" );
self BotBuiltinBotAction( "+fire" );
else
self botAction( "-fire" );
self BotBuiltinBotAction( "-fire" );
}
/*
@@ -2428,12 +2428,12 @@ pressFire( time )
if ( !isDefined( time ) )
time = 0.05;
self botAction( "+fire" );
self BotBuiltinBotAction( "+fire" );
if ( time )
wait time;
self botAction( "-fire" );
self BotBuiltinBotAction( "-fire" );
}
/*
@@ -2444,9 +2444,9 @@ ads( what )
self notify( "bot_ads" );
if ( what )
self botAction( "+ads" );
self BotBuiltinBotAction( "+ads" );
else
self botAction( "-ads" );
self BotBuiltinBotAction( "-ads" );
}
/*
@@ -2462,12 +2462,12 @@ pressADS( time )
if ( !isDefined( time ) )
time = 0.05;
self botAction( "+ads" );
self BotBuiltinBotAction( "+ads" );
if ( time )
wait time;
self botAction( "-ads" );
self BotBuiltinBotAction( "-ads" );
}
/*
@@ -2489,9 +2489,9 @@ jump()
wait 1;
}
self botAction( "+gostand" );
self BotBuiltinBotAction( "+gostand" );
wait 0.05;
self botAction( "-gostand" );
self BotBuiltinBotAction( "-gostand" );
}
/*
@@ -2502,8 +2502,8 @@ stand()
if ( self IsUsingRemote() )
return;
self botAction( "-gocrouch" );
self botAction( "-goprone" );
self BotBuiltinBotAction( "-gocrouch" );
self BotBuiltinBotAction( "-goprone" );
}
/*
@@ -2514,8 +2514,8 @@ crouch()
if ( self IsUsingRemote() )
return;
self botAction( "+gocrouch" );
self botAction( "-goprone" );
self BotBuiltinBotAction( "+gocrouch" );
self BotBuiltinBotAction( "-goprone" );
}
/*
@@ -2526,16 +2526,8 @@ prone()
if ( self IsUsingRemote() || self.hasRiotShieldEquipped )
return;
self botAction( "-gocrouch" );
self botAction( "+goprone" );
}
/*
Changes to the weap
*/
changeToWeap( weap )
{
self botWeapon( weap );
self BotBuiltinBotAction( "-gocrouch" );
self BotBuiltinBotAction( "+goprone" );
}
/*
@@ -2655,11 +2647,3 @@ bot_lookat( pos, time, vel, doAimPredict )
wait 0.05;
}
}
/*
Bot change weap
*/
botWeapon( weap )
{
self switchToWeapon( weap );
}