//Ich Bot Auto Slay v1.3 block config { bas_delay_endround 5 //Delay to end round when all human players have died //Setting to -1 will disable this feature bas_delay_afterjoin 5 //Delay when the first human joins and bots are playing //Setting to -1 will disable this feature bas_endroundcommand "bot_kill" //command to end the round bas_premessage 1 // If set to 1 script will announce bots time remaining bas_endmessage 1 // If set to 1 script will announce that bots have been slain to end the round bas_bombplayout 1 // If set to 1 script will let bots play on if the bomb is planted } block check { es_xsetinfo bas_ctcount 0 es_xsetinfo bas_tcount 0 es_xsetinfo bas_botcount 0 es_xsetinfo bas_humancount 0 es_xcreateplayerlist bas_playerlist es_xforeachkey bas_key in bas_playerlist "es_xdoblock ich_botautoslay/fek" es_keygroupdelete bas_playerlist } block fek { es_keygetvalue bas_teamid bas_playerlist server_var(bas_key) teamid if (server_var(bas_teamid) > 1) do { es_getplayerprop bas_isdead server_var(bas_key) "CCSPlayer.baseclass.pl.deadflag" if (server_var(bas_isdead) = 0) do { if (server_var(bas_teamid) = 2) then es_xmath bas_ctcount + 1 if (server_var(bas_teamid) = 3) then es_xmath bas_tcount + 1 es_keygetvalue bas_isbot bas_playerlist server_var(bas_key) isbot if (server_var(bas_isbot) = 1) then es_xmath bas_botcount + 1 if (server_var(bas_isbot) = 0) then es_xmath bas_humancount + 1 } } } block endround { es alias bas_alias server_var(bas_endroundcommand) bas_alias if (server_var(bas_endmessage) = 1) then es_xmsg #multi #green[Ichthys BotAutoSlay] -#lightgreen Bots have been slayed to end the round } block load { es_xsetinfo bas_delay_endround 0 es_xsetinfo bas_delay_afterjoin 0 es_xsetinfo bas_isbot 0 es_xsetinfo bas_isdead 0 es_xsetinfo bas_teamid 0 es_xsetinfo bas_key 0 es_xsetinfo bas_endroundcommand 0 es_xsetinfo bas_endroundmessage 0 es_xsetinfo bas_roundcount 0 es_xsetinfo bas_format 0 es_xsetinfo bas_botcount 0 es_xsetinfo bas_humancount 0 es_xsetinfo bas_premessage 0 es_xsetinfo bas_endmessage 0 es_xsetinfo bas_bombplayout 0 es_doblock ich_botautoslay/config es_xsetinfo bas_version "1.3" es_xmakepublic bas_version } event bomb_planted { if (server_var(bas_bombplayout) = 1) do { es_xsetinfo bas_countdownstarted 1 es_xmath bas_roundcount + 1 es_xstring bas_roundcount replace 10 0 } } event round_end { es_xsetinfo bas_countdownstarted 1 es_xmath bas_roundcount + 1 es_xstring bas_roundcount replace 10 0 } event round_start { es_xsetinfo bas_countdownstarted 0 } event player_death { if (server_var(bas_delay_endround) != "-1") do { if (server_var(bas_countdownstarted) = 0) do { if (event_var(es_userteam) > 1) do { es_xsetinfo bas_isbot 0 es_isbot bas_isbot event_var(userid) if (server_var(bas_isbot) = 0) do { es_xdoblock ich_botautoslay/check if (server_var(bas_humancount) = 0) do { if (server_var(bas_botcount) != 0) do { if (server_var(bas_ctcount) != 0) do { if (server_var(bas_tcount) != 0) do { es_xsetinfo bas_countdownstarted 1 if (server_var(bas_premessage) = 1) then es_xmsg #multi #green[Ichthys BotAutoSlay] -#lightgreen Bots will be slain in server_var(bas_delay_endround) seconds to end the round es_format bas_format "if (%1 = server_var(bas_roundcount)) then es_xdoblock ich_botautoslay/endround" server_var(bas_roundcount) esnq es_xdelayed server_var(bas_delay_endround) server_var(bas_format) } } } } } } } } } event player_team { if (server_var(bas_delay_afterjoin) != "-1") do { if (server_var(bas_countdownstarted) = 0) do { if (event_var(team) > 1) do { es_xsetinfo bas_isbot 0 es_isbot bas_isbot event_var(userid) if (server_var(bas_isbot) = 0) do { es_xdoblock ich_botautoslay/check if (server_var(bas_humancount) = 0) do { if (server_var(bas_botcount) != 0) do { es_xsetinfo bas_countdownstarted 1 if (server_var(bas_premessage) = 1) then es_xmsg #multi #green[Ichthys BotAutoSlay] -#lightgreen Bots will be slain in server_var(bas_delay_endround) seconds to end the round es_format bas_format "if (%1 = server_var(bas_roundcount)) then es_xdoblock ich_botautoslay/endround" server_var(bas_roundcount) esnq es_xdelayed server_var(bas_delay_afterjoin) server_var(bas_format) } } } } } } }