Author Topic: [REQUEST] bot kicker  (Read 1421 times)

0 Members and 1 Guest are viewing this topic.

Offline Tosty

  • Soldier
  • **
  • Posts: 172
  • Ultimate TW Medic
    • Just Click it
[REQUEST] bot kicker
« on: August 15, 2007, 10:51:51 pm »
I have a scrip that will addbots when i say !joinnow

Code: [Select]
procedure OnPlayerSpeak(ID: byte; Text: string);
begin
if (Text = '!joinnow') and (antispam = 0) then begin
Command('/addbot zombie');
Command('/addbot zombie');
Command('/addbot zombie');
Command('/addbot zombie');
Command('/addbot zombie');
DoDamage(ID,0);
antispam:=0;
end;
end;

I would like a script that will kick the 'zombie' bots when i kill them



Offline Xxypher

  • Veteran
  • *****
  • Posts: 1319
  • Soldat Veteran.
Re: [REQUEST] bot kicker
« Reply #1 on: August 15, 2007, 10:55:00 pm »
What is the kicking code?

Because you could just reverse it.

Code: [Select]
procedure OnPlayerSpeak(ID: byte; Text: string);
begin
if (Text = '!joinnow') and (antispam = 0) then begin
Command('/kickbot zombie');
Command('/kickbot zombie');
Command('/kickbot zombie');
Command('/kickbot zombie');
Command('/kickbot zombie');
DoDamage(ID,100);
antispam:=0;
end;
end;
But seeing as I am not a Soldat coder, I have no idea.
I am just using what I know from GML.
« Last Edit: August 15, 2007, 11:46:24 pm by Xxypher »

Offline Tosty

  • Soldier
  • **
  • Posts: 172
  • Ultimate TW Medic
    • Just Click it
Re: [REQUEST] bot kicker
« Reply #2 on: August 15, 2007, 10:59:03 pm »
if i just reversted it then it would be no fun when i play because i would not have to kill them to kick then



Offline Xxypher

  • Veteran
  • *****
  • Posts: 1319
  • Soldat Veteran.
Re: [REQUEST] bot kicker
« Reply #3 on: August 15, 2007, 11:46:33 pm »
How about that, add some damage lol.

Offline xReaperx

  • Major(1)
  • Posts: 45
Re: [REQUEST] bot kicker
« Reply #4 on: August 16, 2007, 12:26:18 am »
Quick example:
Code: [Select]
procedure OnPlayerKill(ID: byte; Text: string);
begin
if PlayerName = 'zombie' then begin
Command('/kick zombie');
DoDamage(ID,100);
antispam:=0;
end;
end;

Offline Dr. Zombi3

  • Soldier
  • **
  • Posts: 224
  • Happy Almost Halloween :)
Re: [REQUEST] bot kicker
« Reply #5 on: August 16, 2007, 12:33:26 am »
thats pretty cool but where do u put the script in?
3 warnings then did naughty thing. Now Banned.

Offline zyxstand

  • Veteran
  • *****
  • Posts: 1106
  • Mother of all Bombs
Re: [REQUEST] bot kicker
« Reply #6 on: August 16, 2007, 12:36:23 am »
what's the point of antispam and DoDamage?

Just use Command('/kick zombie');
Here:

Code: [Select]
procedure OnPlayerSpeak(ID: byte; Text: string);
var i: byte; Ltext: string;
begin
  Ltext := LowerCase(Text);
  case Ltext of
    '!joinnow': if antispam = 0 then for i := 1 to 5 do Command('/addbot zombie');
end;

OnPlayerKill(Killer, Victim: byte;Weapon: string);
begin
  if not GetPlayerStat(Victim,'Human') and (GetPlayerStat(Victim,'Name') = 'zombie') then Command('/kick Victim);
end;

This kicks any bot named 'zombie' when he dies.
This doesn't prevent bots from killing each other.
If you want bots to be on the same team use a teamgame and use '/addbot2 zombie' (2 = bravo) or you can turn off damage if the victim and shooter are both named 'zombie' to prevent them from killing each other...
Can't think of anything original to put here...

Offline Tosty

  • Soldier
  • **
  • Posts: 172
  • Ultimate TW Medic
    • Just Click it
Re: [REQUEST] bot kicker
« Reply #7 on: August 16, 2007, 07:49:52 am »
ok thanks



Offline miketh2005

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 668
  • What's the URL for www.microsoft.com?
Re: [REQUEST] bot kicker
« Reply #8 on: August 16, 2007, 10:38:08 am »
well u could just make the zombies friend be the other zombies, easy as pie
Quote from: 'Ando.' pid='12999178' dateline='1309046898'
My new password is secure as shit :)
Mate, I am not sure Shit is even secured nowadays.

Offline Tosty

  • Soldier
  • **
  • Posts: 172
  • Ultimate TW Medic
    • Just Click it
Re: [REQUEST] bot kicker
« Reply #9 on: August 16, 2007, 06:21:56 pm »
OK I JUST TRIED OUT THE SCRIP it didnt work

ZYXStand

it said said error mismach type
when i tryed to do it