Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- autobot = [
- local bots players maxbots total
- bots = 0
- players = 0
- maxbots = (? (isconnected) (? (ismaster (getclientnum)) (? (isadmin (getclientnum)) 32 8) 0) 32)
- looplist l (listclients 1) [
- cond (> $l 127) [
- bots = (+ $bots 1)
- ] (&& (< $l 128) (! (isspectator $l))) [
- players = (+ $players 1)
- ]
- ]
- _ab_balance = $arg1
- if (&& (> $arg1 0) $maxbots) [
- total = (+ $bots $players)
- cond (&& (< $bots $maxbots) (< $total $_ab_balance)) [
- loop i (min (- $_ab_balance $total) $maxbots) addbot
- ] (&& (< $_ab_balance $total) (> $bots 0)) [
- loop i (min (- $total $_ab_balance) $bots) delbot
- ]
- sleep 500 [
- autobot = [@@@autobot]
- autobot $_ab_balance
- if $_ab_balance [
- autobot = [_ab_balance = $arg1]
- ]
- ]
- ] [loop i $bots delbot]
- ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement