these are some more scripts from me, but they don't do what I want them to, all they do is say the Writeconsole parts, (as if the KickBot procedures worked) and seemingly forget to kick the bots
procedure KickBot();
var
i: byte;
begin
for i:=1 to NumPlayers do begin
if not GetPlayerStat(i,'Active') then continue;
if GetPlayerStat(i,'Human') then continue else
try
KickPlayer(i)
except
WriteLn('KickBot failed, Unknown exception.');
end;
end;
end;
procedure KickBotByName(const Name: string);
var
i: byte;
begin
for i:=1 to NumPlayers do begin
if not GetPlayerStat(i,'Active') then continue;
if GetPlayerStat(i,'Human') then continue else
if GetPlayerStat(i,'Name') = Name then
try
KickPlayer(i)
except
WriteLn('KickBotByName failed, Unknown exception.');
end;
end;
end;
function OnCommand(ID:Byte;Text:string):boolean;
var
str: string;
begin
result:=false;
Case LowerCase(Text) of
'/kickbot': begin
try
KickBot()
WriteConsole(ID,'All bots kicked.',$FF22FF22)
except
WriteConsole(ID,'KickBot failed, Unknown exception.',$FFFF2222);
end;
end;
'/kickbotname': begin
str:=Text;
Delete(str,1,13);
try
KickBotByName(str)
WriteConsole(ID,'All '+str+' bots kicked.',$FF22FF22)
except
WriteConsole(ID,'KickBot failed, Unknown exception.',$FFFF2222);
end;
end;
end;
end;
P.S. they do compile