mirror of
https://github.com/ineedbots/iw2_bot_warfare.git
synced 2026-09-15 09:37:06 +00:00
complete iw2 bot warfare
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
# IW2 Bot Warfare
|
# IW2 Bot Warfare
|
||||||
|
|
||||||
Bot Warfare for CoD2, in progress...
|
Bot Warfare for CoD2.
|
||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
- _bot_chat
|
- docs
|
||||||
|
|||||||
+54
-501
@@ -5,9 +5,7 @@
|
|||||||
Does bot chatter.
|
Does bot chatter.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include common_scripts\utility;
|
|
||||||
#include maps\mp\_utility;
|
#include maps\mp\_utility;
|
||||||
#include maps\mp\gametypes\_hud_util;
|
|
||||||
#include maps\mp\bots\_bot_utility;
|
#include maps\mp\bots\_bot_utility;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -15,9 +13,9 @@
|
|||||||
*/
|
*/
|
||||||
init()
|
init()
|
||||||
{
|
{
|
||||||
if ( getdvar( "bots_main_chat" ) == "" )
|
if ( getcvar( "bots_main_chat" ) == "" )
|
||||||
{
|
{
|
||||||
setdvar( "bots_main_chat", 1.0 );
|
setcvar( "bots_main_chat", 1.0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
level thread onBotConnected();
|
level thread onBotConnected();
|
||||||
@@ -41,7 +39,7 @@ onBotConnected()
|
|||||||
*/
|
*/
|
||||||
BotDoChat( chance, string, isTeam )
|
BotDoChat( chance, string, isTeam )
|
||||||
{
|
{
|
||||||
mod = getdvarfloat( "bots_main_chat" );
|
mod = getcvarfloat( "bots_main_chat" );
|
||||||
|
|
||||||
if ( mod <= 0.0 )
|
if ( mod <= 0.0 )
|
||||||
{
|
{
|
||||||
@@ -88,7 +86,7 @@ start_death_watch()
|
|||||||
{
|
{
|
||||||
self waittill( "death" );
|
self waittill( "death" );
|
||||||
|
|
||||||
self thread bot_chat_death_watch( self.lastattacker, self.bots_lastks );
|
self thread bot_chat_death_watch( self.lastkiller, self.bots_lastks );
|
||||||
|
|
||||||
self.bots_lastks = 0;
|
self.bots_lastks = 0;
|
||||||
}
|
}
|
||||||
@@ -169,10 +167,6 @@ start_chat_watch()
|
|||||||
|
|
||||||
switch ( msg )
|
switch ( msg )
|
||||||
{
|
{
|
||||||
case "revive":
|
|
||||||
self thread bot_chat_revive_watch( a, b, c, d, e, f, g );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "killcam":
|
case "killcam":
|
||||||
self thread bot_chat_killcam_watch( a, b, c, d, e, f, g );
|
self thread bot_chat_killcam_watch( a, b, c, d, e, f, g );
|
||||||
break;
|
break;
|
||||||
@@ -181,18 +175,6 @@ start_chat_watch()
|
|||||||
self thread bot_chat_stuck_watch( a, b, c, d, e, f, g );
|
self thread bot_chat_stuck_watch( a, b, c, d, e, f, g );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "tube":
|
|
||||||
self thread bot_chat_tube_watch( a, b, c, d, e, f, g );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "killstreak":
|
|
||||||
self thread bot_chat_killstreak_watch( a, b, c, d, e, f, g );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "attack_vehicle":
|
|
||||||
self thread bot_chat_attack_vehicle_watch( a, b, c, d, e, f, g );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "follow_threat":
|
case "follow_threat":
|
||||||
self thread bot_chat_follow_threat_watch( a, b, c, d, e, f, g );
|
self thread bot_chat_follow_threat_watch( a, b, c, d, e, f, g );
|
||||||
break;
|
break;
|
||||||
@@ -205,18 +187,10 @@ start_chat_watch()
|
|||||||
self thread bot_chat_follow_watch( a, b, c, d, e, f, g );
|
self thread bot_chat_follow_watch( a, b, c, d, e, f, g );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "equ":
|
|
||||||
self thread bot_chat_equ_watch( a, b, c, d, e, f, g );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "nade":
|
case "nade":
|
||||||
self thread bot_chat_nade_watch( a, b, c, d, e, f, g );
|
self thread bot_chat_nade_watch( a, b, c, d, e, f, g );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "throwback":
|
|
||||||
self thread bot_chat_throwback_watch( a, b, c, d, e, f, g );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "rage":
|
case "rage":
|
||||||
self thread bot_chat_rage_watch( a, b, c, d, e, f, g );
|
self thread bot_chat_rage_watch( a, b, c, d, e, f, g );
|
||||||
break;
|
break;
|
||||||
@@ -237,22 +211,10 @@ start_chat_watch()
|
|||||||
self thread bot_chat_uav_target_watch( a, b, c, d, e, f, g );
|
self thread bot_chat_uav_target_watch( a, b, c, d, e, f, g );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "attack_equ":
|
|
||||||
self thread bot_chat_attack_equ_watch( a, b, c, d, e, f, g );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "dom":
|
|
||||||
self thread bot_chat_dom_watch( a, b, c, d, e, f, g );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "hq":
|
case "hq":
|
||||||
self thread bot_chat_hq_watch( a, b, c, d, e, f, g );
|
self thread bot_chat_hq_watch( a, b, c, d, e, f, g );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "sab":
|
|
||||||
self thread bot_chat_sab_watch( a, b, c, d, e, f, g );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "sd":
|
case "sd":
|
||||||
self thread bot_chat_sd_watch( a, b, c, d, e, f, g );
|
self thread bot_chat_sd_watch( a, b, c, d, e, f, g );
|
||||||
break;
|
break;
|
||||||
@@ -261,18 +223,10 @@ start_chat_watch()
|
|||||||
self thread bot_chat_cap_watch( a, b, c, d, e, f, g );
|
self thread bot_chat_cap_watch( a, b, c, d, e, f, g );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "twar":
|
|
||||||
self thread bot_chat_twar_watch( a, b, c, d, e, f, g );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "attack_dog":
|
|
||||||
self thread bot_chat_attack_dog_watch( a, b, c, d, e, f, g );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "connection":
|
case "connection":
|
||||||
self thread bot_chat_connection_player_watch( a, b, c, d, e, f, g );
|
self thread bot_chat_connection_player_watch( a, b, c, d, e, f, g );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "chat":
|
case "chat":
|
||||||
self thread bot_chat_chat_player_watch( a, b, c, d, e, f, g );
|
self thread bot_chat_chat_player_watch( a, b, c, d, e, f, g );
|
||||||
break;
|
break;
|
||||||
@@ -316,7 +270,7 @@ start_startgame_watch()
|
|||||||
|
|
||||||
switch ( level.gametype )
|
switch ( level.gametype )
|
||||||
{
|
{
|
||||||
case "war":
|
case "tdm":
|
||||||
switch ( randomint( 3 ) )
|
switch ( randomint( 3 ) )
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
@@ -334,24 +288,6 @@ start_startgame_watch()
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "dom":
|
|
||||||
switch ( randomint( 3 ) )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
self BotDoChat( 7, "Yaaayy!! I LOVE DOMINATION!!!!" );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
self BotDoChat( 7, "Lets cap the flags and them." );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
self BotDoChat( 7, "Yeeeesss master..." );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "sd":
|
case "sd":
|
||||||
switch ( randomint( 3 ) )
|
switch ( randomint( 3 ) )
|
||||||
{
|
{
|
||||||
@@ -370,24 +306,6 @@ start_startgame_watch()
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "sab":
|
|
||||||
switch ( randomint( 3 ) )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
self BotDoChat( 7, "Soccer/Football! Lets play it!" );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 1:
|
|
||||||
self BotDoChat( 7, "Who plays sab these days." );
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
self BotDoChat( 7, "I do not know what to say." );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "dm":
|
case "dm":
|
||||||
switch ( randomint( 3 ) )
|
switch ( randomint( 3 ) )
|
||||||
{
|
{
|
||||||
@@ -406,7 +324,7 @@ start_startgame_watch()
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "koth":
|
case "hq":
|
||||||
self BotDoChat( 7, "HQ TIME!" );
|
self BotDoChat( 7, "HQ TIME!" );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -426,42 +344,41 @@ doQuickMessage()
|
|||||||
soundalias = "";
|
soundalias = "";
|
||||||
saytext = "";
|
saytext = "";
|
||||||
wait 2;
|
wait 2;
|
||||||
self.spamdelay = true;
|
|
||||||
|
|
||||||
switch ( randomint( 11 ) )
|
switch ( randomint( 4 ) )
|
||||||
{
|
{
|
||||||
case 4 :
|
case 0:
|
||||||
soundalias = "mp_cmd_suppressfire";
|
soundalias = "quickcommands";
|
||||||
saytext = "Suppressing fire!";
|
saytext = ( randomint( 8 ) + 1 ) + "";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 5 :
|
case 1:
|
||||||
soundalias = "mp_cmd_followme";
|
soundalias = "quickstatements";
|
||||||
saytext = "Follow Me!";
|
saytext = ( randomint( 8 ) + 1 ) + "";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 6 :
|
case 2:
|
||||||
soundalias = "mp_stm_enemyspotted";
|
soundalias = "quickresponses";
|
||||||
saytext = "Enemy spotted!";
|
saytext = ( randomint( 7 ) + 1 ) + "";
|
||||||
break;
|
|
||||||
|
|
||||||
case 7 :
|
|
||||||
soundalias = "mp_cmd_fallback";
|
|
||||||
saytext = "Fall back!";
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 8 :
|
|
||||||
soundalias = "mp_stm_needreinforcements";
|
|
||||||
saytext = "Need reinforcements!";
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( soundalias != "" && saytext != "" )
|
if ( soundalias != "" && saytext != "" )
|
||||||
{
|
{
|
||||||
self maps\mp\gametypes\_quickmessages::saveheadicon();
|
switch ( soundalias )
|
||||||
self maps\mp\gametypes\_quickmessages::doquickmessage( soundalias, saytext );
|
{
|
||||||
wait 2;
|
case "quickcommands":
|
||||||
self maps\mp\gametypes\_quickmessages::restoreheadicon();
|
self maps\mp\gametypes\_quickmessages::quickcommands( saytext );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "quickstatements":
|
||||||
|
self maps\mp\gametypes\_quickmessages::quickstatements( saytext );
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "quickresponses":
|
||||||
|
self maps\mp\gametypes\_quickmessages::quickresponses( saytext );
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -471,7 +388,6 @@ doQuickMessage()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.spamdelay = undefined;
|
|
||||||
wait randomint( 5 );
|
wait randomint( 5 );
|
||||||
self.talking = false;
|
self.talking = false;
|
||||||
}
|
}
|
||||||
@@ -494,22 +410,33 @@ endgame_chat()
|
|||||||
{
|
{
|
||||||
player = level.players[ i ];
|
player = level.players[ i ];
|
||||||
|
|
||||||
if ( player.pers[ "score" ] > b )
|
if ( player.score > b )
|
||||||
{
|
{
|
||||||
winner = player;
|
winner = player;
|
||||||
b = player.pers[ "score" ];
|
b = player.score;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( player.pers[ "score" ] < w )
|
if ( player.score < w )
|
||||||
{
|
{
|
||||||
loser = player;
|
loser = player;
|
||||||
w = player.pers[ "score" ];
|
w = player.score;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( level.teambased )
|
if ( level.teambased )
|
||||||
{
|
{
|
||||||
winningteam = maps\mp\gametypes\_globallogic::getwinningteam();
|
winningteam = "none";
|
||||||
|
alliedscore = getTeamScore( "allies" );
|
||||||
|
axisscore = getTeamScore( "axis" );
|
||||||
|
|
||||||
|
if ( alliedscore > axisscore )
|
||||||
|
{
|
||||||
|
winningteam = "allies";
|
||||||
|
}
|
||||||
|
else if ( axisscore > alliedscore )
|
||||||
|
{
|
||||||
|
winningteam = "axis";
|
||||||
|
}
|
||||||
|
|
||||||
if ( self.pers[ "team" ] == winningteam )
|
if ( self.pers[ "team" ] == winningteam )
|
||||||
{
|
{
|
||||||
@@ -935,23 +862,6 @@ endgame_chat()
|
|||||||
bot_chat_streak( streakCount )
|
bot_chat_streak( streakCount )
|
||||||
{
|
{
|
||||||
self endon( "disconnect" );
|
self endon( "disconnect" );
|
||||||
|
|
||||||
if ( streakCount == 7 )
|
|
||||||
{
|
|
||||||
if ( isdefined( self.pers[ "hardPointItem" ] ) && self.pers[ "hardPointItem" ] == "dogs_mp" )
|
|
||||||
{
|
|
||||||
switch ( randomint( 1 ) )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
self BotDoChat( 33, "Nice! I acheived the dogs!" );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
self BotDoChat( 33, "Huh?? I dont got my dogs :((" );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1107,11 +1017,11 @@ bot_chat_killed_watch( victim )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 34:
|
case 34:
|
||||||
message = ( "i love " + getMapName( getdvar( "mapname" ) ) + "!" );
|
message = ( "i love " + getMapName( getcvar( "mapname" ) ) + "!" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 35:
|
case 35:
|
||||||
message = ( getMapName( getdvar( "mapname" ) ) + " is my favorite map!" );
|
message = ( getMapName( getcvar( "mapname" ) ) + " is my favorite map!" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 36:
|
case 36:
|
||||||
@@ -1329,7 +1239,7 @@ bot_chat_death_watch( killer, last_ks )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 40:
|
case 40:
|
||||||
message = ( "wow " + getMapName( getdvar( "mapname" ) ) + " is messed up" );
|
message = ( "wow " + getMapName( getcvar( "mapname" ) ) + " is messed up" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 41:
|
case 41:
|
||||||
@@ -1373,19 +1283,19 @@ bot_chat_death_watch( killer, last_ks )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 51:
|
case 51:
|
||||||
message = ( "lol " + getMapName( getdvar( "mapname" ) ) + " sux" );
|
message = ( "lol " + getMapName( getcvar( "mapname" ) ) + " sux" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 52:
|
case 52:
|
||||||
message = ( "why are we even playing on " + getMapName( getdvar( "mapname" ) ) + "?" );
|
message = ( "why are we even playing on " + getMapName( getcvar( "mapname" ) ) + "?" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 53:
|
case 53:
|
||||||
message = ( getMapName( getdvar( "mapname" ) ) + " is such an unfair map!!" );
|
message = ( getMapName( getcvar( "mapname" ) ) + " is such an unfair map!!" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 54:
|
case 54:
|
||||||
message = ( "what were they thinking when making " + getMapName( getdvar( "mapname" ) ) + "?!" );
|
message = ( "what were they thinking when making " + getMapName( getcvar( "mapname" ) ) + "?!" );
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 55:
|
case 55:
|
||||||
@@ -1446,47 +1356,6 @@ bot_chat_death_watch( killer, last_ks )
|
|||||||
self BotDoChat( 8, message );
|
self BotDoChat( 8, message );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
Revive
|
|
||||||
*/
|
|
||||||
bot_chat_revive_watch( state, revive, c, d, e, f, g )
|
|
||||||
{
|
|
||||||
self endon( "disconnect" );
|
|
||||||
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "go":
|
|
||||||
switch ( randomint( 1 ) )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
self BotDoChat( 10, "i am going to revive " + revive.name );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "start":
|
|
||||||
switch ( randomint( 1 ) )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
self BotDoChat( 10, "i am reviving " + revive.name );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "stop":
|
|
||||||
switch ( randomint( 1 ) )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
self BotDoChat( 10, "i revived " + revive.name );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Killcam
|
Killcam
|
||||||
*/
|
*/
|
||||||
@@ -1581,73 +1450,6 @@ bot_chat_stuck_watch( a, b, c, d, e, f, g )
|
|||||||
self BotDoChat( 20, msg );
|
self BotDoChat( 20, msg );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
Tube
|
|
||||||
*/
|
|
||||||
bot_chat_tube_watch( state, tubeWp, tubeWeap, d, e, f, g )
|
|
||||||
{
|
|
||||||
self endon( "disconnect" );
|
|
||||||
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "go":
|
|
||||||
switch ( randomint( 1 ) )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
self BotDoChat( 10, "i am going to go tube" );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "start":
|
|
||||||
switch ( randomint( 1 ) )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
self BotDoChat( 10, "i tubed" );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
bot_chat_killstreak_watch( streakName, b, c, d, e, f, g )
|
|
||||||
*/
|
|
||||||
bot_chat_killstreak_watch( state, location, directionYaw, d, e, f, g )
|
|
||||||
{
|
|
||||||
self endon( "disconnect" );
|
|
||||||
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "call":
|
|
||||||
if ( self.pers[ "hardPointItem" ] == "dogs_mp" )
|
|
||||||
{
|
|
||||||
self BotDoChat( 20, "wewt! i got the dogs!!" );
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
bot_chat_attack_vehicle_watch( a, b, c, d, e, f, g )
|
|
||||||
*/
|
|
||||||
bot_chat_attack_vehicle_watch( state, vehicle, c, d, e, f, g )
|
|
||||||
{
|
|
||||||
self endon( "disconnect" );
|
|
||||||
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "start":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "stop":
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
bot_chat_follow_threat_watch( a, b, c, d, e, f, g )
|
bot_chat_follow_threat_watch( a, b, c, d, e, f, g )
|
||||||
*/
|
*/
|
||||||
@@ -1778,37 +1580,6 @@ bot_chat_follow_watch( state, player, time, d, e, f, g )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
bot_chat_equ_watch
|
|
||||||
*/
|
|
||||||
bot_chat_equ_watch( state, wp, weap, d, e, f, g )
|
|
||||||
{
|
|
||||||
self endon( "disconnect" );
|
|
||||||
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "go":
|
|
||||||
switch ( randomint( 1 ) )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
self BotDoChat( 10, "going to place a " + getBaseWeaponName( weap ) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "start":
|
|
||||||
switch ( randomint( 1 ) )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
self BotDoChat( 10, "placed a " + getBaseWeaponName( weap ) );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
bot_chat_nade_watch
|
bot_chat_nade_watch
|
||||||
*/
|
*/
|
||||||
@@ -1840,37 +1611,6 @@ bot_chat_nade_watch( state, wp, weap, d, e, f, g )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
bot_chat_throwback_watch
|
|
||||||
*/
|
|
||||||
bot_chat_throwback_watch( state, nade, c, d, e, f, g )
|
|
||||||
{
|
|
||||||
self endon( "disconnect" );
|
|
||||||
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "start":
|
|
||||||
switch ( randomint( 1 ) )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
self BotDoChat( 10, "i am going to throw back the grenade!" );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "stop":
|
|
||||||
switch ( randomint( 1 ) )
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
self BotDoChat( 10, "i threw back the grenade!" );
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
bot_chat_tbag_watch
|
bot_chat_tbag_watch
|
||||||
*/
|
*/
|
||||||
@@ -2028,73 +1768,6 @@ bot_chat_uav_target_watch( state, heard, c, d, e, f, g )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
bot_chat_attack_equ_watch
|
|
||||||
*/
|
|
||||||
bot_chat_attack_equ_watch( state, equ, c, d, e, f, g )
|
|
||||||
{
|
|
||||||
self endon( "disconnect" );
|
|
||||||
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "start":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "stop":
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
bot_chat_dom_watch
|
|
||||||
*/
|
|
||||||
bot_chat_dom_watch( state, sub_state, flag, d, e, f, g )
|
|
||||||
{
|
|
||||||
self endon( "disconnect" );
|
|
||||||
|
|
||||||
switch ( sub_state )
|
|
||||||
{
|
|
||||||
case "spawnkill":
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "start":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "stop":
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "defend":
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "start":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "stop":
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "cap":
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "go":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "start":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "stop":
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
bot_chat_hq_watch
|
bot_chat_hq_watch
|
||||||
*/
|
*/
|
||||||
@@ -2133,83 +1806,6 @@ bot_chat_hq_watch( state, sub_state, c, d, e, f, g )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
bot_chat_sab_watch
|
|
||||||
*/
|
|
||||||
bot_chat_sab_watch( state, sub_state, c, d, e, f, g )
|
|
||||||
{
|
|
||||||
self endon( "disconnect" );
|
|
||||||
|
|
||||||
switch ( sub_state )
|
|
||||||
{
|
|
||||||
case "bomb":
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "start":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "stop":
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "defuser":
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "start":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "stop":
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "planter":
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "start":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "stop":
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "plant":
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "go":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "start":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "stop":
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "defuse":
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "go":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "start":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "stop":
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
bot_chat_sd_watch
|
bot_chat_sd_watch
|
||||||
*/
|
*/
|
||||||
@@ -2341,46 +1937,3 @@ bot_chat_cap_watch( state, sub_state, obj, d, e, f, g )
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
bot_chat_twar_watch
|
|
||||||
*/
|
|
||||||
bot_chat_twar_watch( state, sub_state, c, d, e, f, g )
|
|
||||||
{
|
|
||||||
self endon( "disconnect" );
|
|
||||||
|
|
||||||
switch ( sub_state )
|
|
||||||
{
|
|
||||||
case "cap":
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "go":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "start":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "stop":
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
bot_chat_attack_dog_watch
|
|
||||||
*/
|
|
||||||
bot_chat_attack_dog_watch( state, dog, c, d, e, f, g )
|
|
||||||
{
|
|
||||||
self endon( "disconnect" );
|
|
||||||
|
|
||||||
switch ( state )
|
|
||||||
{
|
|
||||||
case "start":
|
|
||||||
break;
|
|
||||||
|
|
||||||
case "stop":
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -164,7 +164,15 @@ bot_skip_killcam()
|
|||||||
|
|
||||||
if ( isdefined( self.killcam ) )
|
if ( isdefined( self.killcam ) )
|
||||||
{
|
{
|
||||||
|
self BotNotifyBotEvent( "killcam", "start" );
|
||||||
|
|
||||||
|
wait 0.5 + randomint( 3 );
|
||||||
|
|
||||||
|
wait 0.1;
|
||||||
|
|
||||||
self notify( "end_killcam" );
|
self notify( "end_killcam" );
|
||||||
|
|
||||||
|
self BotNotifyBotEvent( "killcam", "stop" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,6 +26,9 @@ connected()
|
|||||||
self.killerlocation = undefined;
|
self.killerlocation = undefined;
|
||||||
self.lastkiller = undefined;
|
self.lastkiller = undefined;
|
||||||
self.bot_change_class = true;
|
self.bot_change_class = true;
|
||||||
|
self.lastkilledplayer = undefined;
|
||||||
|
self.cur_kill_streak = 0;
|
||||||
|
self.cur_death_streak = 0;
|
||||||
|
|
||||||
self thread difficulty();
|
self thread difficulty();
|
||||||
self thread teamWatch();
|
self thread teamWatch();
|
||||||
@@ -84,6 +87,15 @@ onKilled( eInflictor, eAttacker, iDamage, sMeansOfDeath, sWeapon, vDir, sHitLoc,
|
|||||||
|
|
||||||
self.killerlocation = eAttacker.origin;
|
self.killerlocation = eAttacker.origin;
|
||||||
self.lastkiller = eAttacker;
|
self.lastkiller = eAttacker;
|
||||||
|
self.cur_death_streak++;
|
||||||
|
|
||||||
|
if ( eAttacker is_bot() )
|
||||||
|
{
|
||||||
|
eAttacker.cur_death_streak = 0;
|
||||||
|
eAttacker.lastkilledplayer = self;
|
||||||
|
eAttacker.cur_kill_streak++;
|
||||||
|
eAttacker notify( "killed_enemy" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -640,6 +652,7 @@ onSpawned()
|
|||||||
self.bot_lock_goal = false;
|
self.bot_lock_goal = false;
|
||||||
self.help_time = undefined;
|
self.help_time = undefined;
|
||||||
self.bot_was_follow_script_update = undefined;
|
self.bot_was_follow_script_update = undefined;
|
||||||
|
self.cur_kill_streak = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1898,6 +1898,14 @@ getMapName( map )
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
CoD4
|
||||||
|
*/
|
||||||
|
getBaseWeaponName( weap )
|
||||||
|
{
|
||||||
|
return strtok( weap, "_" )[ 0 ];
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
cod2
|
cod2
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ init()
|
|||||||
level thread scripts\mp\bots_adapter_libcod::init();
|
level thread scripts\mp\bots_adapter_libcod::init();
|
||||||
level thread scripts\mp\bots_wp_editor::init();
|
level thread scripts\mp\bots_wp_editor::init();
|
||||||
level thread scripts\mp\bots::init();
|
level thread scripts\mp\bots::init();
|
||||||
//level thread scripts\mp\bots_chat::init();
|
level thread scripts\mp\bots_chat::init();
|
||||||
level thread scripts\mp\bots_menu::init();
|
level thread scripts\mp\bots_menu::init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user