move unused

This commit is contained in:
ineedbots 2021-04-27 20:33:57 -07:00
parent 8bde752124
commit fc1e8f48d2
3 changed files with 6 additions and 66 deletions

1
.gitignore vendored
View File

@ -31,3 +31,4 @@ images/
missingasset.csv missingasset.csv
userraw/scripts/_commands.gsc userraw/scripts/_commands.gsc
userraw/scripts/_customcallbacks.gsc userraw/scripts/_customcallbacks.gsc
userraw/scripts/bots_custom.gsc

View File

@ -672,6 +672,10 @@ chooseRandomTactical()
*/ */
setClasses() setClasses()
{ {
n = 5;
if (!self is_bot())
n = 15;
rank = self maps\mp\gametypes\_rank::getRankForXp( self getPlayerData("experience") ); rank = self maps\mp\gametypes\_rank::getRankForXp( self getPlayerData("experience") );
if (RandomFloatRange(0, 1) < ((rank / level.maxRank) + 0.1)) if (RandomFloatRange(0, 1) < ((rank / level.maxRank) + 0.1))
@ -680,7 +684,7 @@ setClasses()
self.pers["bots"]["behavior"]["quickscope"] = true; self.pers["bots"]["behavior"]["quickscope"] = true;
} }
for (i = 0; i < 5; i++) for (i = 0; i < n; i++)
{ {
equipment = chooseRandomPerk("equipment"); equipment = chooseRandomPerk("equipment");
perk3 = chooseRandomPerk("perk3"); perk3 = chooseRandomPerk("perk3");

View File

@ -13,8 +13,6 @@ init()
level thread watchTeams(); level thread watchTeams();
level thread watchCheater();
level thread watchBotCrackedClass(); level thread watchBotCrackedClass();
level thread watchBoxmap(); level thread watchBoxmap();
@ -76,69 +74,6 @@ watchBoxmap()
setDvar("scr_spawnsimple", 0); setDvar("scr_spawnsimple", 0);
} }
watchCheater()
{
SetDvar("bot_cheater", "");
for (;;)
{
wait 0.05;
cheatername = GetDvar("bot_cheater");
if (cheatername == "")
continue;
cheater = undefined;
// find player name
foreach( player in level.players )
{
if (!isSubStr(toLower(player.name), toLower(cheatername)))
continue;
cheater = player;
}
if (!isDefined(cheater))
continue;
// now tell all bots to target
foreach( bot in level.bots )
{
if (isReallyAlive(cheater))
{
if (randomInt(2) && isDefined(bot.bot.target) && isDefined(bot.bot.target.entity) && bot.bot.target.entity getEntityNumber() == cheater getEntityNumber())
bot thread BotPressAttack(0.1);
bot SetWeaponAmmoClip(bot GetCurrentWeapon(), 999);
bot.pers["bots"]["skill"]["aim_time"] = 0.05;
bot.pers["bots"]["skill"]["init_react_time"] = 0;
bot.pers["bots"]["skill"]["reaction_time"] = 1000;
bot.pers["bots"]["skill"]["no_trace_ads_time"] = 0;
bot.pers["bots"]["skill"]["no_trace_look_time"] = 0;
bot.pers["bots"]["skill"]["remember_time"] = 50;
bot.pers["bots"]["skill"]["fov"] = 1;
bot.pers["bots"]["skill"]["dist"] = 100000;
bot.pers["bots"]["skill"]["spawn_time"] = 0;
bot.pers["bots"]["skill"]["help_dist"] = 0;
bot.pers["bots"]["skill"]["semi_time"] = 0.05;
bot.pers["bots"]["skill"]["bones"] = "j_head";
bot SetAttacker(cheater);
}
if (isDefined(bot.bot.target) && isDefined(bot.bot.target.entity))
{
if (bot.bot.target.entity getEntityNumber() != cheater getEntityNumber())
{
bot.bot.targets = [];
bot.bot.target = undefined;
bot notify("new_enemy");
}
}
}
}
}
watchBotCrackedClass() watchBotCrackedClass()
{ {
if(getDvar("bot_pvb_helper_customBotClassTeam") == "") if(getDvar("bot_pvb_helper_customBotClassTeam") == "")