This commit is contained in:
INeedBots 2020-12-23 00:28:33 -06:00
parent 7540e98ab2
commit 00fc713e5a
6 changed files with 114 additions and 114 deletions

View File

@ -2,7 +2,7 @@
_bot_loadout
Author: INeedGames
Date: 12/20/2020
Loadout stuff
Loadout stuff
*/
#include common_scripts\utility;
@ -11,11 +11,11 @@
#include maps\mp\bots\_bot_utility;
/*
Gives the bot loadout
Gives the bot loadout
*/
bot_give_loadout()
{
self bot_giveKillstreaks();
self bot_giveKillstreaks();
self clearPerks();
@ -164,16 +164,16 @@ bot_give_loadout()
}
/*
Fixes the weapon on spawn for the bot
Fixes the weapon on spawn for the bot
*/
fixSecondarySwitch(weap)
{
self endon("death");
self endon("disconnect");
self switchToWeapon(weap);
self setSpawnWeapon(weap);
self switchToWeapon(weap);
self setSpawnWeapon(weap);
wait 0.05;
self switchToWeapon(weap);
self switchToWeapon(weap);
self setSpawnWeapon(weap);
}
@ -214,7 +214,7 @@ bot_get_prestige()
}
/*
Gives the rank to the bot
Gives the rank to the bot
*/
bot_rank()
{
@ -238,7 +238,7 @@ bot_rank()
}
/*
Set the bot's class
Set the bot's class
*/
bot_set_class()
{
@ -362,7 +362,7 @@ bot_set_class()
}
/*
Set the bot's a random weapon for the slot
Set the bot's a random weapon for the slot
*/
bot_get_random_weapon(slot, rank)
{
@ -513,7 +513,7 @@ bot_get_random_weapon(slot, rank)
}
/*
Set the bot's perk for a slot
Set the bot's perk for a slot
*/
bot_get_random_perk(slot, rank)
{
@ -560,7 +560,7 @@ bot_get_random_perk(slot, rank)
}
/*
Set the bots a random face paint
Set the bots a random face paint
*/
bot_random_face()
{
@ -631,7 +631,7 @@ bot_random_face()
}
/*
Gets a random lens
Gets a random lens
*/
bot_random_lens()
{
@ -652,7 +652,7 @@ bot_random_lens()
}
/*
Gets a random reticle
Gets a random reticle
*/
bot_random_reticle()
{
@ -673,7 +673,7 @@ bot_random_reticle()
}
/*
Gets a random tag
Gets a random tag
*/
bot_random_tag()
{
@ -694,7 +694,7 @@ bot_random_tag()
}
/*
Gets a random emblem
Gets a random emblem
*/
bot_random_emblem()
{
@ -715,7 +715,7 @@ bot_random_emblem()
}
/*
Gets a random camo
Gets a random camo
*/
bot_random_camo()
{
@ -746,7 +746,7 @@ bot_random_camo()
}
/*
Gets the cost of a weapon
Gets the cost of a weapon
*/
bot_weapon_cost(id)
{
@ -775,7 +775,7 @@ bot_weapon_cost(id)
}
/*
Checks to see iif the weapon is unlocked
Checks to see iif the weapon is unlocked
*/
bot_weapon_unlocked(id, rank)
{
@ -805,7 +805,7 @@ bot_weapon_unlocked(id, rank)
}
/*
Gets the cost of an attachment
Gets the cost of an attachment
*/
bot_attachment_cost(att)
{
@ -841,7 +841,7 @@ bot_attachment_cost(att)
}
/*
Builds the weapon string
Builds the weapon string
*/
bot_validate_weapon(weap)
{
@ -873,7 +873,7 @@ bot_validate_weapon(weap)
}
/*
Gets random attachements
Gets random attachements
*/
bot_random_attachments(weap, atts, num)
{
@ -994,7 +994,7 @@ bot_random_attachments(weap, atts, num)
}
/*
Gets the perk ref
Gets the perk ref
*/
bot_perk_from_reference_full( reference_full )
{
@ -1015,7 +1015,7 @@ bot_perk_from_reference_full( reference_full )
}
/*
Get the bot's cod points
Get the bot's cod points
*/
bot_get_cod_points()
{
@ -1063,7 +1063,7 @@ bot_get_cod_points()
}
/*
Get the bots rank
Get the bots rank
*/
bot_get_rank()
{
@ -1130,7 +1130,7 @@ bot_get_rank()
}
/*
Set the bots killstreaks
Set the bots killstreaks
*/
bot_setKillstreaks()
{
@ -1204,7 +1204,7 @@ bot_setKillstreaks()
}
/*
Get cost for ks
Get cost for ks
*/
bot_get_killstreak_cost(ks)
{
@ -1241,7 +1241,7 @@ bot_get_killstreak_cost(ks)
}
/*
Gives the kss
Gives the kss
*/
bot_giveKillstreaks()
{
@ -1251,7 +1251,7 @@ bot_giveKillstreaks()
}
/*
Checks if the ks is used
Checks if the ks is used
*/
bot_killstreak_level_is_used( ks_level, used_levels )
{

View File

@ -11,7 +11,7 @@
#include maps\mp\bots\_bot_utility;
/*
When the bot is added to the game
When the bot is added to the game
*/
added()
{
@ -29,24 +29,24 @@ added()
}
/*
When the bot connects
When the bot connects
*/
connected()
{
self endon("disconnect");
self thread classWatch();
self thread teamWatch();
self thread classWatch();
self thread teamWatch();
self thread maps\mp\bots\_bot_loadout::bot_rank();
self thread maps\mp\bots\_bot_loadout::bot_rank();
self thread bot_skip_killcam();
self thread bot_on_spawn();
self thread bot_on_spawn();
self thread bot_on_death();
}
/*
When the bot dies
When the bot dies
*/
bot_on_death()
{
@ -62,7 +62,7 @@ bot_on_death()
}
/*
Bots skip killcams
Bots skip killcams
*/
bot_skip_killcam()
{
@ -123,7 +123,7 @@ teamWatch()
}
/*
When bot spawns
When bot spawns
*/
bot_on_spawn()
{
@ -143,7 +143,7 @@ bot_on_spawn()
}
/*
Fired when the bot is damaged
Fired when the bot is damaged
*/
bot_damage_callback( eAttacker, iDamage, sMeansOfDeath, sWeapon, eInflictor, sHitLoc )
{

View File

@ -71,7 +71,7 @@ PickRandom(arr)
}
/*
Waits for a host player
Waits for a host player
*/
bot_wait_for_host()
{
@ -124,7 +124,7 @@ SetBotGoal(where, dist)
}
/*
Fixes sd bomb planting
Fixes sd bomb planting
*/
bot_onUsePlantObjectFix( player )
{
@ -166,7 +166,7 @@ bot_onUsePlantObjectFix( player )
}
/*
Fixes sd bomb planting
Fixes sd bomb planting
*/
bot_bombPlanted( destroyedObj, player )
{

View File

@ -11,11 +11,11 @@
#include maps\mp\bots\_bot_utility;
/*
Entry point to the bots
Entry point to the bots
*/
init()
{
level.bw_VERSION = "1.1.0";
level.bw_VERSION = "1.1.0";
if(getDvar("bots_main") == "")
setDvar("bots_main", true);
@ -23,7 +23,7 @@ init()
if (!getDvarInt("bots_main"))
return;
if(getDvar("bots_manage_add") == "")
if(getDvar("bots_manage_add") == "")
setDvar("bots_manage_add", 0);//amount of bots to add to the game
if(getDvar("bots_manage_fill") == "")
setDvar("bots_manage_fill", 0);//amount of bots to maintain
@ -43,7 +43,7 @@ init()
if(getDvar("bots_team_mode") == "")
setDvar("bots_team_mode", 0);//counts just bots when 1
if(getDvar("bots_loadout_reasonable") == "")//filter out the bad 'guns' and perks
if(getDvar("bots_loadout_reasonable") == "")//filter out the bad 'guns' and perks
setDvar("bots_loadout_reasonable", false);
if(getDvar("bots_loadout_allow_op") == "")//allows jug, marty and laststand
setDvar("bots_loadout_allow_op", true);
@ -67,21 +67,21 @@ init()
if(getDvar("bots_play_camp") == "")//bots camp and follow
setDvar("bots_play_camp", true);
level.bots = [];
level.bot_decoys = [];
level.bots = [];
level.bot_decoys = [];
level.bot_planes = [];
if(!isDefined(game["botWarfare"]))
if(!isDefined(game["botWarfare"]))
game["botWarfare"] = true;
thread fixGamemodes();
thread onPlayerConnect();
thread fixGamemodes();
thread onPlayerConnect();
thread diffBots();
thread teamBots();
thread addBots();
thread diffBots();
thread teamBots();
thread addBots();
thread doNonDediBots();
thread doNonDediBots();
}
/*
@ -93,9 +93,9 @@ onPlayerConnect()
{
level waittill("connected", player);
player thread watch_shoot();
player thread watch_shoot();
player thread watch_grenade();
player thread connected();
player thread connected();
}
}
@ -110,16 +110,16 @@ onDisconnect()
}
/*
Whena player connects
Whena player connects
*/
connected()
{
self endon("disconnect");
if (!self is_bot())
return;
if (!self is_bot())
return;
self thread maps\mp\bots\_bot_script::connected();
self thread maps\mp\bots\_bot_script::connected();
level.bots[level.bots.size] = self;
self thread onDisconnect();
@ -128,68 +128,68 @@ connected()
}
/*
Handles the diff of the bots
Handles the diff of the bots
*/
diffBots()
{
for (;;)
{
wait 1.5;
for (;;)
{
wait 1.5;
bot_set_difficulty(GetDvar( #"bot_difficulty" ));
}
bot_set_difficulty(GetDvar( #"bot_difficulty" ));
}
}
/*
Setup bot dvars for non dedicated clients
Setup bot dvars for non dedicated clients
*/
doNonDediBots()
{
if (!GetDvarInt( #"xblive_basictraining" ))
return;
if (!GetDvarInt( #"xblive_basictraining" ))
return;
if (isDefined(game[ "bots_spawned" ]))
return;
if (isDefined(game[ "bots_spawned" ]))
return;
game[ "bots_spawned" ] = true;
game[ "bots_spawned" ] = true;
if(getDvar("bot_enemies_extra") == "")
if(getDvar("bot_enemies_extra") == "")
setDvar("bot_enemies_extra", 0);
if(getDvar("bot_friends_extra") == "")
setDvar("bot_friends_extra", 0);
bot_friends = GetDvarInt( #"bot_friends" );
bot_friends = GetDvarInt( #"bot_friends" );
bot_enemies = GetDvarInt( #"bot_enemies" );
bot_enemies += GetDvarInt("bot_enemies_extra");
bot_enemies += GetDvarInt("bot_enemies_extra");
bot_friends += GetDvarInt("bot_friends_extra");
bot_wait_for_host();
bot_wait_for_host();
host = GetHostPlayer();
team = "allies";
team = "allies";
if(isDefined(host) && isDefined(host.pers[ "team" ]) && (host.pers[ "team" ] == "allies" || host.pers[ "team" ] == "axis"))
team = host.pers[ "team" ];
setDvar("bots_manage_add", bot_enemies + bot_friends - 1);
setDvar("bots_manage_fill", bot_enemies + bot_friends);
setDvar("bots_manage_fill_mode", 0);
setDvar("bots_manage_fill_kick", true);
setDvar("bots_manage_fill_spec", false);
setDvar("bots_manage_add", bot_enemies + bot_friends - 1);
setDvar("bots_manage_fill", bot_enemies + bot_friends);
setDvar("bots_manage_fill_mode", 0);
setDvar("bots_manage_fill_kick", true);
setDvar("bots_manage_fill_spec", false);
setDvar("bots_team", "custom");
setDvar("bots_team", "custom");
if (team == "axis")
setDvar("bots_team_amount", bot_friends);
else
setDvar("bots_team_amount", bot_enemies);
if (team == "axis")
setDvar("bots_team_amount", bot_friends);
else
setDvar("bots_team_amount", bot_enemies);
setDvar("bots_team_force", true);
setDvar("bots_team_mode", 0);
}
/*
Sets the difficulty of the bots
Sets the difficulty of the bots
*/
bot_set_difficulty( difficulty )
{
@ -302,7 +302,7 @@ bot_set_difficulty( difficulty )
SetDvar( "sv_botMaxGrenadeTime", "4000" );
SetDvar( "sv_botSprintDistance", "512" );
SetDvar( "sv_botMeleeDist", "80" );
difficulty = "normal";
difficulty = "normal";
}
if ( level.gameType == "oic" && difficulty == "fu" )
@ -468,7 +468,7 @@ change to: B8 00 00 00 00: mov eax, 0
spawnbots:
in the SV_AddTestClient sub:
0F 85 A4 00 00 00: jnz
0F 85 A4 00 00 00: jnz
change to: 0F 84 A4 00 00 00: jz
0x6B6180 in rektmp
0x4682F0 in bg
@ -482,13 +482,13 @@ change to: 0F 84 A4 00 00 00: jz
*/
addBots()
{
level endon ( "game_ended" );
level endon ( "game_ended" );
bot_wait_for_host();
for (;;)
{
wait 1.5;
for (;;)
{
wait 1.5;
botsToAdd = GetDvarInt("bots_manage_add");
@ -581,7 +581,7 @@ addBots()
if (isDefined(tempBot))
kick( tempBot getEntityNumber(), "EXE_PLAYERKICKED" );
}
}
}
}
/*
@ -600,23 +600,23 @@ add_bot()
}
/*
Gives the bot loadout
Gives the bot loadout
*/
bot_give_loadout()
{
self maps\mp\bots\_bot_loadout::bot_give_loadout();
self maps\mp\bots\_bot_loadout::bot_give_loadout();
}
/*
Fired when the bot is damaged
Fired when the bot is damaged
*/
bot_damage_callback( eAttacker, iDamage, sMeansOfDeath, sWeapon, eInflictor, sHitLoc )
{
self maps\mp\bots\_bot_script::bot_damage_callback( eAttacker, iDamage, sMeansOfDeath, sWeapon, eInflictor, sHitLoc );
self maps\mp\bots\_bot_script::bot_damage_callback( eAttacker, iDamage, sMeansOfDeath, sWeapon, eInflictor, sHitLoc );
}
/*
Watch all players grenades
Watch all players grenades
*/
watch_grenade()
{
@ -638,7 +638,7 @@ watch_grenade()
}
/*
Watch the decoy grenade
Watch the decoy grenade
*/
watch_decoy(g)
{
@ -664,7 +664,7 @@ watch_decoy(g)
}
/*
Attach a trigger to the scrambler
Attach a trigger to the scrambler
*/
watch_scrambler()
{
@ -676,7 +676,7 @@ watch_scrambler()
}
/*
Watch when players enter the scrambler trigger
Watch when players enter the scrambler trigger
*/
scramble_nearby(trig)
{
@ -705,7 +705,7 @@ scramble_nearby(trig)
}
/*
Scramble this player
Scramble this player
*/
scramble_player()
{
@ -720,7 +720,7 @@ scramble_player()
}
/*
Watch when a player shoots
Watch when a player shoots
*/
watch_shoot()
{
@ -735,7 +735,7 @@ watch_shoot()
}
/*
When a player fires
When a player fires
*/
doFiringThread()
{
@ -748,7 +748,7 @@ doFiringThread()
}
/*
Watches the planes
Watches the planes
*/
bot_watch_planes()
{
@ -773,7 +773,7 @@ bot_watch_planes()
}
/*
Watches the plane
Watches the plane
*/
watch_plane(ent)
{
@ -799,7 +799,7 @@ watch_plane(ent)
}
/*
Fix xp in sd
Fix xp in sd
*/
bot_killBoost()
{
@ -807,7 +807,7 @@ bot_killBoost()
}
/*
Fixes sd
Fixes sd
*/
fixGamemodes()
{

View File

@ -1 +1 @@
start "" "%~dp0BlackOpsMP.exe" +set dedicated "2" +set sv_maxclients "32" +set sv_licensenum "0" +set sv_punkbuster "0" +set sv_ranked "2" +set net_port "28960" +set net_ip "192.168.1.136" +set developer "0" +set fs_game "" +set g_antilag "0" +exec server.cfg +map mp_nuked
start "" "%~dp0BlackOpsMP.exe" +set dedicated "2" +set sv_maxclients "32" +set sv_licensenum "0" +set sv_punkbuster "0" +set sv_ranked "2" +set net_port "28960" +set net_ip "192.168.1.136" +set developer "0" +set fs_game "" +exec server.cfg +map mp_nuked

View File

@ -1 +1 @@
start "" "%~dp0BlackOpsMP.exe" +set dedicated "1" +set developer "1" +set developer_script "1" +set logfile "2" +set scr_game_spectatetype "2" +set thereisacow "1" +set sv_cheats "1" +set sv_maxclients "32" +set sv_licensenum "0" +set sv_ranked "0" +set fs_game "mods/mp_dev" +set sv_punkbuster "0" +set scr_tdm_scorelimit "0" +set g_antilag "0" +set net_port "28960" +devmap mp_nuked
start "" "%~dp0BlackOpsMP.exe" +set dedicated "1" +set developer "1" +set developer_script "1" +set logfile "2" +set scr_game_spectatetype "2" +set thereisacow "1" +set sv_cheats "1" +set sv_maxclients "32" +set sv_licensenum "0" +set sv_ranked "0" +set fs_game "mods/mp_dev" +set sv_punkbuster "0" +set scr_tdm_scorelimit "0" +set net_port "28960" +devmap mp_nuked