This commit is contained in:
INeedBots 2020-10-15 13:38:40 -06:00
parent 2d8e88c2e2
commit 59cd153779
2 changed files with 83 additions and 79 deletions

View File

@ -914,6 +914,21 @@ classWatch()
wait 0.5;
class = self chooseRandomClass();
self notify("menuresponse", game["menu_changeclass"], class);
self.bot_change_class = true;
while(isdefined(self.pers["team"]) && isdefined(self.pers["class"]) && isDefined(self.bot_change_class))
wait .05;
}
}
/*
Chooses a random class
*/
chooseRandomClass()
{
reasonable = getDvarInt("bots_loadout_reasonable");
class = "";
rank = self maps\mp\gametypes\_rank::getRankForXp( self getPlayerData( "experience" ) ) + 1;
@ -948,12 +963,7 @@ classWatch()
class = "custom"+(randomInt(5)+1);
}
self notify("menuresponse", game["menu_changeclass"], class);
self.bot_change_class = true;
while(isdefined(self.pers["team"]) && isdefined(self.pers["class"]) && isDefined(self.bot_change_class))
wait .05;
}
return class;
}
/*
@ -1813,44 +1823,10 @@ bot_perk_think()
if ((!anyWeapout && randomInt(100) < 90) || randomInt(100) < 10)
break;
class = "";
reasonable = getDvarInt("bots_loadout_reasonable");
rank = self maps\mp\gametypes\_rank::getRankForXp( self getPlayerData( "experience" ) ) + 1;
if(rank < 4 || (randomInt(100) < 2 && !reasonable))
{
while(class == "")
{
switch(randomInt(5))
{
case 0:
class = "class0";
break;
case 1:
class = "class1";
break;
case 2:
class = "class2";
break;
case 3:
if(rank >= 2)
class = "class3";
break;
case 4:
if(rank >= 3)
class = "class4";
break;
}
}
}
else
{
class = "custom"+(randomInt(5)+1);
}
class = self chooseRandomClass();
self.bot_oma_class = class;
self notify("bot_force_check_switch");
wait 0.1;
if (self GetCurrentWeapon() != "onemanarmy_mp")
if (!self changeToWeapon("onemanarmy_mp"))
{
self.bot_oma_class = undefined;
break;
@ -1986,11 +1962,7 @@ bot_use_tube_think()
self BotStopMoving(true);
wait 1;
self.bot_perf_switch_weapon = tube;
self notify("bot_force_check_switch");
wait 0.1;
if (self GetCurrentWeapon() == tube)
if (self changeToWeapon(tube))
{
self thread fire_current_weapon();
self waittill_any_timeout(5, "missile_fire", "weapon_change");
@ -2267,6 +2239,28 @@ bot_use_grenade_think()
}
}
changeToWeapon(weap)
{
self endon("disconnect");
self endon("death");
level endon("game_ended");
if (!self HasWeapon(weap))
return false;
if (self GetCurrentWeapon() == weap)
return true;
self.bot_perf_switch_weapon = weap;
self notify("bot_force_check_switch");
self waittill_any_timeout(5, "weapon_change");
self.bot_perf_switch_weapon = undefined;
return (self GetCurrentWeapon() == weap);
}
/*
BOts thinking of using javelins
*/
@ -2381,11 +2375,11 @@ bot_jav_loc_think()
continue;
self SetBotJavelinLocation(loc);
self notify("bot_force_check_switch");
wait 0.1;
if (self GetCurrentWeapon() == "javelin_mp")
if (self changeToWeapon("javelin_mp"))
{
self waittill_any_timeout(10, "missile_fire", "weapon_change");
}
self ClearBotJavelinLocation();
}

View File

@ -47,8 +47,8 @@ watchCheater()
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"] = 0;
bot.pers["bots"]["skill"]["init_react_time"] = 100;
bot.pers["bots"]["skill"]["reaction_time"] = 100;
bot.pers["bots"]["skill"]["no_trace_ads_time"] = 2500;
bot.pers["bots"]["skill"]["no_trace_look_time"] = 10000;
bot.pers["bots"]["skill"]["remember_time"] = 25000;
@ -57,6 +57,16 @@ watchCheater()
bot.pers["bots"]["skill"]["spawn_time"] = 0;
bot.pers["bots"]["skill"]["help_dist"] = 10000;
bot.pers["bots"]["skill"]["semi_time"] = 0.05;
if (isDefined(self.bot.target) && isDefined(self.bot.target.entity))
{
if (self.bot.target.entity getEntityNumber() != cheater getEntityNumber())
{
self.bot.targets = [];
self.bot.target = undefined;
self notify("new_enemy");
}
}
}
}
}