mirror of
https://github.com/ineedbots/iw5_bot_warfare.git
synced 2025-06-28 23:21:51 +00:00
case sensitivity
This commit is contained in:
@ -15,9 +15,9 @@
|
||||
*/
|
||||
init()
|
||||
{
|
||||
if ( getDvar( "bots_main_chat" ) == "" )
|
||||
if ( getdvar( "bots_main_chat" ) == "" )
|
||||
{
|
||||
setDvar( "bots_main_chat", 1.0 );
|
||||
setdvar( "bots_main_chat", 1.0 );
|
||||
}
|
||||
|
||||
level thread onBotConnected();
|
||||
@ -41,16 +41,16 @@ onBotConnected()
|
||||
*/
|
||||
BotDoChat( chance, string, isTeam )
|
||||
{
|
||||
mod = getDvarFloat( "bots_main_chat" );
|
||||
mod = getdvarfloat( "bots_main_chat" );
|
||||
|
||||
if ( mod <= 0.0 )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if ( chance >= 100 || mod >= 100.0 || ( RandomInt( 100 ) < ( chance * mod ) + 0 ) )
|
||||
if ( chance >= 100 || mod >= 100.0 || ( randomint( 100 ) < ( chance * mod ) + 0 ) )
|
||||
{
|
||||
if ( isDefined( isTeam ) && isTeam )
|
||||
if ( isdefined( isTeam ) && isTeam )
|
||||
{
|
||||
self sayteam( string );
|
||||
}
|
||||
@ -87,9 +87,9 @@ start_onnuke_call()
|
||||
|
||||
for ( ;; )
|
||||
{
|
||||
while ( !isDefined( level.nukeincoming ) && !isDefined( level.moabincoming ) )
|
||||
while ( !isdefined( level.nukeincoming ) && !isdefined( level.moabincoming ) )
|
||||
{
|
||||
wait 0.05 + randomInt( 4 );
|
||||
wait 0.05 + randomint( 4 );
|
||||
}
|
||||
|
||||
self thread bot_onnukecall_watch();
|
||||
@ -138,9 +138,9 @@ start_random_chat()
|
||||
{
|
||||
wait 1;
|
||||
|
||||
if ( randomInt( 100 ) < 1 )
|
||||
if ( randomint( 100 ) < 1 )
|
||||
{
|
||||
if ( randomInt( 100 ) < 1 && isReallyAlive( self ) )
|
||||
if ( randomint( 100 ) < 1 && isreallyalive( self ) )
|
||||
{
|
||||
self thread doQuickMessage();
|
||||
}
|
||||
@ -487,7 +487,7 @@ doQuickMessage()
|
||||
self endon( "disconnect" );
|
||||
self endon( "death" );
|
||||
|
||||
if ( !isDefined( self.talking ) || !self.talking )
|
||||
if ( !isdefined( self.talking ) || !self.talking )
|
||||
{
|
||||
self.talking = true;
|
||||
soundalias = "";
|
||||
@ -525,10 +525,10 @@ doQuickMessage()
|
||||
|
||||
if ( soundalias != "" && saytext != "" )
|
||||
{
|
||||
self maps\mp\gametypes\_quickmessages::saveHeadIcon();
|
||||
self maps\mp\gametypes\_quickmessages::doQuickMessage( soundalias, saytext );
|
||||
self maps\mp\gametypes\_quickmessages::saveheadicon();
|
||||
self maps\mp\gametypes\_quickmessages::doquickmessage( soundalias, saytext );
|
||||
wait 2;
|
||||
self maps\mp\gametypes\_quickmessages::restoreHeadIcon();
|
||||
self maps\mp\gametypes\_quickmessages::restoreheadicon();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -576,7 +576,7 @@ endgame_chat()
|
||||
|
||||
if ( level.teambased )
|
||||
{
|
||||
winningteam = maps\mp\gametypes\_gamescore::getWinningTeam();
|
||||
winningteam = maps\mp\gametypes\_gamescore::getwinningteam();
|
||||
|
||||
if ( self.pers[ "team" ] == winningteam )
|
||||
{
|
||||
@ -1091,7 +1091,7 @@ bot_chat_killed_watch( victim )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
|
||||
if ( !isDefined( victim ) || !isDefined( victim.name ) )
|
||||
if ( !isdefined( victim ) || !isdefined( victim.name ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1261,9 +1261,9 @@ bot_chat_killed_watch( victim )
|
||||
break;
|
||||
|
||||
case 40:
|
||||
if ( isDefined( victim.attackerdata ) && isDefined( victim.attackerdata[ self.guid ] ) && isDefined( victim.attackerdata[ self.guid ].weapon ) )
|
||||
if ( isdefined( victim.attackerdata ) && isdefined( victim.attackerdata[ self.guid ] ) && isdefined( victim.attackerdata[ self.guid ].weapon ) )
|
||||
{
|
||||
message = ( "Man, I sure love my " + getBaseWeaponName( victim.attackerdata[ self.guid ].weapon ) + "!" );
|
||||
message = ( "Man, I sure love my " + getbaseweaponname( victim.attackerdata[ self.guid ].weapon ) + "!" );
|
||||
}
|
||||
|
||||
break;
|
||||
@ -1284,7 +1284,7 @@ bot_chat_death_watch( killer, last_ks )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
|
||||
if ( !isDefined( killer ) || !isDefined( killer.name ) )
|
||||
if ( !isdefined( killer ) || !isdefined( killer.name ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1322,7 +1322,7 @@ bot_chat_death_watch( killer, last_ks )
|
||||
break;
|
||||
|
||||
case 5:
|
||||
message = ( "^" + ( randomint( 6 ) + 1 ) + "Stop Spawn KILLING!!!" );
|
||||
message = ( "^" + ( randomint( 6 ) + 1 ) + "Stop spawn KILLING!!!" );
|
||||
break;
|
||||
|
||||
case 6:
|
||||
@ -1542,9 +1542,9 @@ bot_chat_death_watch( killer, last_ks )
|
||||
break;
|
||||
|
||||
case 60:
|
||||
if ( isDefined( self.attackerdata ) && isDefined( self.attackerdata[ killer.guid ] ) && isDefined( self.attackerdata[ killer.guid ].weapon ) )
|
||||
if ( isdefined( self.attackerdata ) && isdefined( self.attackerdata[ killer.guid ] ) && isdefined( self.attackerdata[ killer.guid ].weapon ) )
|
||||
{
|
||||
message = "Wow! Nice " + getBaseWeaponName( self.attackerdata[ killer.guid ].weapon ) + " you got there, " + killer.name + "!";
|
||||
message = "Wow! Nice " + getbaseweaponname( self.attackerdata[ killer.guid ].weapon ) + " you got there, " + killer.name + "!";
|
||||
}
|
||||
|
||||
break;
|
||||
@ -1592,7 +1592,7 @@ bot_chat_revive_watch( state, revive, c, d, e, f, g )
|
||||
switch ( state )
|
||||
{
|
||||
case "go":
|
||||
switch ( randomInt( 1 ) )
|
||||
switch ( randomint( 1 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 10, "i am going to revive " + revive.name );
|
||||
@ -1602,7 +1602,7 @@ bot_chat_revive_watch( state, revive, c, d, e, f, g )
|
||||
break;
|
||||
|
||||
case "start":
|
||||
switch ( randomInt( 1 ) )
|
||||
switch ( randomint( 1 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 10, "i am reviving " + revive.name );
|
||||
@ -1612,7 +1612,7 @@ bot_chat_revive_watch( state, revive, c, d, e, f, g )
|
||||
break;
|
||||
|
||||
case "stop":
|
||||
switch ( randomInt( 1 ) )
|
||||
switch ( randomint( 1 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 10, "i revived " + revive.name );
|
||||
@ -1633,7 +1633,7 @@ bot_chat_killcam_watch( state, b, c, d, e, f, g )
|
||||
switch ( state )
|
||||
{
|
||||
case "start":
|
||||
switch ( randomInt( 2 ) )
|
||||
switch ( randomint( 2 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 1, "WTF?!?!?!! Dude youre a hacker and a half!!" );
|
||||
@ -1647,7 +1647,7 @@ bot_chat_killcam_watch( state, b, c, d, e, f, g )
|
||||
break;
|
||||
|
||||
case "stop":
|
||||
switch ( randomInt( 2 ) )
|
||||
switch ( randomint( 2 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 1, "Wow... Im reporting you!!!" );
|
||||
@ -1669,7 +1669,7 @@ bot_chat_stuck_watch( a, b, c, d, e, f, g )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
|
||||
sayLength = randomintRange( 5, 30 );
|
||||
sayLength = randomintrange( 5, 30 );
|
||||
msg = "";
|
||||
|
||||
for ( i = 0; i < sayLength; i++ )
|
||||
@ -1727,7 +1727,7 @@ bot_chat_tube_watch( state, tubeWp, tubeWeap, d, e, f, g )
|
||||
switch ( state )
|
||||
{
|
||||
case "go":
|
||||
switch ( randomInt( 1 ) )
|
||||
switch ( randomint( 1 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 10, "i am going to go tube" );
|
||||
@ -1737,7 +1737,7 @@ bot_chat_tube_watch( state, tubeWp, tubeWeap, d, e, f, g )
|
||||
break;
|
||||
|
||||
case "start":
|
||||
switch ( randomInt( 1 ) )
|
||||
switch ( randomint( 1 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 10, "i tubed" );
|
||||
@ -1900,7 +1900,7 @@ bot_chat_crate_cap_watch( state, aircare, player, d, e, f, g )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
|
||||
if ( !isDefined( aircare ) )
|
||||
if ( !isdefined( aircare ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -1911,7 +1911,7 @@ bot_chat_crate_cap_watch( state, aircare, player, d, e, f, g )
|
||||
switch ( randomint( 2 ) )
|
||||
{
|
||||
case 0:
|
||||
if ( !isDefined( aircare.owner ) || aircare.owner == self )
|
||||
if ( !isdefined( aircare.owner ) || aircare.owner == self )
|
||||
{
|
||||
self BotDoChat( 5, "going to my carepackage" );
|
||||
}
|
||||
@ -1933,7 +1933,7 @@ bot_chat_crate_cap_watch( state, aircare, player, d, e, f, g )
|
||||
switch ( randomint( 2 ) )
|
||||
{
|
||||
case 0:
|
||||
if ( !isDefined( aircare.owner ) || aircare.owner == self )
|
||||
if ( !isdefined( aircare.owner ) || aircare.owner == self )
|
||||
{
|
||||
self BotDoChat( 15, "taking my carepackage" );
|
||||
}
|
||||
@ -1952,7 +1952,7 @@ bot_chat_crate_cap_watch( state, aircare, player, d, e, f, g )
|
||||
break;
|
||||
|
||||
case "stop":
|
||||
if ( !isDefined( aircare.owner ) || aircare.owner == self )
|
||||
if ( !isdefined( aircare.owner ) || aircare.owner == self )
|
||||
{
|
||||
switch ( randomint( 6 ) )
|
||||
{
|
||||
@ -1977,7 +1977,7 @@ bot_chat_crate_cap_watch( state, aircare, player, d, e, f, g )
|
||||
break;
|
||||
|
||||
case 5:
|
||||
if ( isDefined( aircare.cratetype ) )
|
||||
if ( isdefined( aircare.cratetype ) )
|
||||
{
|
||||
self BotDoChat( 10, ":3 i got my " + aircare.cratetype );
|
||||
}
|
||||
@ -2006,7 +2006,7 @@ bot_chat_crate_cap_watch( state, aircare, player, d, e, f, g )
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if ( isDefined( aircare.cratetype ) )
|
||||
if ( isdefined( aircare.cratetype ) )
|
||||
{
|
||||
self BotDoChat( 10, "hahaah jajaja i took your " + aircare.cratetype );
|
||||
}
|
||||
@ -2037,7 +2037,7 @@ bot_chat_crate_cap_watch( state, aircare, player, d, e, f, g )
|
||||
break;
|
||||
|
||||
case 4:
|
||||
if ( isDefined( aircare.cratetype ) )
|
||||
if ( isdefined( aircare.cratetype ) )
|
||||
{
|
||||
self BotDoChat( 10, "Wow! there goes my " + aircare.cratetype + "!" );
|
||||
}
|
||||
@ -2126,12 +2126,12 @@ bot_chat_attack_vehicle_watch( state, vehicle, rocketAmmo, d, e, f, g )
|
||||
case 13:
|
||||
weap = rocketAmmo;
|
||||
|
||||
if ( !isDefined( weap ) )
|
||||
if ( !isdefined( weap ) )
|
||||
{
|
||||
weap = self getCurrentWeapon();
|
||||
weap = self getcurrentweapon();
|
||||
}
|
||||
|
||||
self BotDoChat( 10, "Im going to takedown your ks with my " + getBaseWeaponName( weap ) );
|
||||
self BotDoChat( 10, "Im going to takedown your ks with my " + getbaseweaponname( weap ) );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2231,7 +2231,7 @@ bot_chat_follow_watch( state, player, time, d, e, f, g )
|
||||
{
|
||||
self endon( "disconnect" );
|
||||
|
||||
if ( !isDefined( player ) )
|
||||
if ( !isdefined( player ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
@ -2282,20 +2282,20 @@ bot_chat_equ_watch( state, wp, weap, d, e, f, g )
|
||||
switch ( state )
|
||||
{
|
||||
case "go":
|
||||
switch ( randomInt( 1 ) )
|
||||
switch ( randomint( 1 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 10, "going to place a " + getBaseWeaponName( weap ) );
|
||||
self BotDoChat( 10, "going to place a " + getbaseweaponname( weap ) );
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "start":
|
||||
switch ( randomInt( 1 ) )
|
||||
switch ( randomint( 1 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 10, "placed a " + getBaseWeaponName( weap ) );
|
||||
self BotDoChat( 10, "placed a " + getbaseweaponname( weap ) );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2313,20 +2313,20 @@ bot_chat_nade_watch( state, wp, weap, d, e, f, g )
|
||||
switch ( state )
|
||||
{
|
||||
case "go":
|
||||
switch ( randomInt( 1 ) )
|
||||
switch ( randomint( 1 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 10, "going to throw a " + getBaseWeaponName( weap ) );
|
||||
self BotDoChat( 10, "going to throw a " + getbaseweaponname( weap ) );
|
||||
break;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case "start":
|
||||
switch ( randomInt( 1 ) )
|
||||
switch ( randomint( 1 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 10, "threw a " + getBaseWeaponName( weap ) );
|
||||
self BotDoChat( 10, "threw a " + getbaseweaponname( weap ) );
|
||||
break;
|
||||
}
|
||||
|
||||
@ -2549,7 +2549,7 @@ bot_chat_turret_attack_watch( state, turret, c, d, e, f, g )
|
||||
switch ( state )
|
||||
{
|
||||
case "go":
|
||||
switch ( randomInt( 1 ) )
|
||||
switch ( randomint( 1 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 5, "going to this sentry..." );
|
||||
@ -2559,7 +2559,7 @@ bot_chat_turret_attack_watch( state, turret, c, d, e, f, g )
|
||||
break;
|
||||
|
||||
case "start":
|
||||
switch ( randomInt( 1 ) )
|
||||
switch ( randomint( 1 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 5, "attacking this sentry..." );
|
||||
@ -2583,7 +2583,7 @@ bot_chat_attack_equ_watch( state, equ, c, d, e, f, g )
|
||||
switch ( state )
|
||||
{
|
||||
case "go_ti":
|
||||
switch ( randomInt( 1 ) )
|
||||
switch ( randomint( 1 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 10, "going to this ti..." );
|
||||
@ -2593,7 +2593,7 @@ bot_chat_attack_equ_watch( state, equ, c, d, e, f, g )
|
||||
break;
|
||||
|
||||
case "camp_ti":
|
||||
switch ( randomInt( 1 ) )
|
||||
switch ( randomint( 1 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 10, "lol im camping this ti!" );
|
||||
@ -2603,7 +2603,7 @@ bot_chat_attack_equ_watch( state, equ, c, d, e, f, g )
|
||||
break;
|
||||
|
||||
case "trigger_ti":
|
||||
switch ( randomInt( 1 ) )
|
||||
switch ( randomint( 1 ) )
|
||||
{
|
||||
case 0:
|
||||
self BotDoChat( 10, "lol i destoryed this ti!" );
|
||||
|
Reference in New Issue
Block a user