0 Members and 1 Guest are viewing this topic.
if (LowerCase(text) = '!on') then begin if (gather_mod = 0) and (player[id] = 0) then begin player[id] := 1; temp := ''; temp := temp + idtoname(id) + ' '; gather_mod := 1; WriteConsole(0,'Soldat Gather Bot started! Script by Dr.Thrax',RGB(255,130,23)); WriteLn(' [*] GatherBot: Soldat Gather Bot started! Script by Dr.Thrax'); WriteConsole(0,'CTF('+inttostr(c_pl/2)+'on'+inttostr(c_pl/2)+'): '+temp,RGB(255,130,23)); WriteLn(' [*] GatherBot: CTF('+inttostr(c_pl/2)+'on'+inttostr(c_pl/2)+'): '+temp); end else WriteConsole(id,'Gather already running!',RGB(255,130,23)); end;if (LowerCase(Text) = '!add') then begin if (gather_mod = 1) and (player[id] = 0) then begin player[id] := 1; temp := temp + idtoname(id) + ' '; WriteConsole(0,'CTF('+inttostr(c_pl/2)+'on'+inttostr(c_pl/2)+'): '+temp,RGB(255,130,23)); WriteLn(' [*] GatherBot: CTF('+inttostr(c_pl/2)+'on'+inttostr(c_pl/2)+'): '+temp); end else begin if (gather_mod = 0) then WriteConsole(id,'No gather running! Type "!on" to start a Gather!',RGB(255,130,23)) else if (player[id] = 1) then WriteConsole(id,'You already added on this gather!',RGB(255,130,23)) end; end;if (LowerCase(Text) = '!status') then begin if (gather_mod = 1) then begin WriteConsole(0,'CTF('+inttostr(c_pl/2)+'on'+inttostr(c_pl/2)+'): '+temp,RGB(255,130,23)); WriteLn(' [*] GatherBot: CTF('+inttostr(c_pl/2)+'on'+inttostr(c_pl/2)+'): '+temp); end else WriteConsole(id,'No gather running! Type "!on" to start a Gather!',RGB(255,130,23)); end;if (LowerCase(Text) = '!del') then begin if (gather_mod = 1) and (player[id] = 1) then begin player[id] := 0; nametemp := idtoname(id); Delete(temp,pos(idtoname(id),temp),Length(nametemp)+1); gath := false; for i := 1 to 32 do if player[i] = 1 then gath := true; if gath = true then begin WriteConsole(0,'CTF('+inttostr(c_pl/2)+'on'+inttostr(c_pl/2)+'): '+temp,RGB(255,130,23)); WriteLn(' [*] GatherBot: CTF('+inttostr(c_pl/2)+'on'+inttostr(c_pl/2)+'): '+temp); end; end else WriteConsole(id,'No gather running or you didnt add yet!',RGB(255,130,23)); if gather_mod = 1 then begin gath := false; for i := 1 to 32 do if player[i] = 1 then gath := true; if gath = false then begin temp := ''; gather_mod := 0; WriteConsole(0,'Gather turned off!',RGB(255,130,23)); WriteLn(' [*] GatherBot: Gather turned off!'); end; end; end;
function OnCommand(ID: Byte; Text: string): boolean;beginif (text = '/gather') and (gather_on = false) then begin Command('/say Gather online'); gather_on := true; endelse if (text = '/gather') and (gather_on = true) then begin Command('/say Gather offline'); gather_on := false; end;end;