From aa0b4d5f6df816cf2df1c0313a464e0fcb1ce556 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 11 Sep 2020 22:11:50 -0600 Subject: [PATCH] chance --- userraw/maps/mp/bots/_bot_script.gsc | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/userraw/maps/mp/bots/_bot_script.gsc b/userraw/maps/mp/bots/_bot_script.gsc index 0e6f8e8..d10d8c0 100644 --- a/userraw/maps/mp/bots/_bot_script.gsc +++ b/userraw/maps/mp/bots/_bot_script.gsc @@ -1440,7 +1440,11 @@ bot_use_tube_think() { wait randomintRange(2, 4); - if (randomInt(100) < 20) + chance = self.pers["bots"]["behavior"]["nade"] / 2; + if (chance > 20) + chance = 20; + + if (randomInt(100) < chance) continue; tube = self getValidTube(); @@ -1558,7 +1562,11 @@ bot_use_equipment_think() { wait randomintRange(2, 4); - if (randomInt(100) < 20) + chance = self.pers["bots"]["behavior"]["nade"] / 2; + if (chance > 20) + chance = 20; + + if (randomInt(100) < chance) continue; nade = undefined; @@ -1650,7 +1658,11 @@ bot_use_grenade_think() { wait randomintRange(2, 4); - if (randomInt(100) < 20) + chance = self.pers["bots"]["behavior"]["nade"] / 2; + if (chance > 20) + chance = 20; + + if (randomInt(100) < chance) continue; nade = self getValidGrenade(); @@ -1747,7 +1759,11 @@ bot_jav_loc_think() { wait randomintRange(2, 4); - if (randomInt(100) < 20) + chance = self.pers["bots"]["behavior"]["nade"] / 2; + if (chance > 20) + chance = 20; + + if (randomInt(100) < chance) continue; if (!self GetAmmoCount("javelin_mp"))