Scripts AutoKick AutoBan Help Me
#1
Hi

I would like to help me create a script to occur when a TK is auto kick for my vote. on my server I'm a long time away from the keyboard so I would like to help me create this script.
also a script for when someone says a word inadequate say something like "Watch your leguaje" and the second time by a vote autokick is mine. I repeat I'm always away from the keyboard and I'm the admin.

and at this time I created a Bot Admin but have not auto Auto Kick and Ban on TK or Hack.
please help me to create these scripts thanks.
Thanks given by:
#2
I started a mock up of a script but I don't think you could get the cn for the votes could you?
I don't remember a way to get those.
Thanks given by:
#3
(29 Dec 12, 11:59PM)DrauL Wrote: I started a mock up of a script but I don't think you could get the cn for the votes could you?
I don't remember a way to get those.

look at this script but this is for GEMA
1 kill = kick

http://pastebin.com/fUxwGyp2

i need I need a script for any game mode. td, osok, etc.
but for Team Killers
please if you can create the script Put him my thanks
Thanks given by:
#4
Such scripts will be easier to write in the next version of assaultcube. (coming soon)

It will be very easy to get a client's current number of teamkills.

[cubescript]echo (player CN tks)[/cubescript]

That will be essential for creating the script of course. The only way I can think to count teamkills in the current version is to use a recursive alias that constantly scans $conline for text indicating a teamkill. (e.g. unarmed fragged/gibbed/headshot/etc. teammate blah) Problem is this is quite an unreliable method. The script will miss teamkills its only a matter of time. Not to mention the many problems you run into when 2 or more people have the same name on the server.

Solution: Wait until the next version where it will be much easier to write such scripts as well as having them be more reliable. Heres an example of what the script might look like in the upcoming version:

[cubescript]const MAX_TEAMKILLS_PER_ROUND 6 // if a player has more than this number of teamkills they should be autokicked by the script
const MILLIS_BETWEEN_TK_CHECKS 5000 // run the script once every 5 seconds
const MILLIS_BETWEEN_AUTOKICKS 2000 // if multiple people are to be autokicked, wait this many milliseconds before kicking the next player

checkinit mapstartalways [ if (&& $connected (curmodeattr team)) CHECK_TEAMKILLS ] // plug the script into mapstartalways for full automation

CHECK_TEAMKILLS = [
if (currole) [ // you must have admin status on the server for the script to work properly
clients_to_kick = ""
loop i 21 [
if (!= $i (player1 cn)) [ // you (the admin) are exempt from teamkill checks
if (isclient $i) [
if (> (player $i tks) $MAX_TEAMKILLS_PER_ROUND) [
add2list clients_to_kick $i
]
]
]
]
if (listlen $clients_to_kick) [
kick_ctr = -1
loop i (listlen $clients_to_kick) [
sleep (* $i $MILLIS_BETWEEN_AUTOKICKS) [
+= kick_ctr 1
kick (at $clients_to_kick $kick_ctr) "Excessive teamkilling."
]
]
]
]
sleep $MILLIS_BETWEEN_TK_CHECKS CHECK_TEAMKILLS
][/cubescript]
Thanks given by:
#5
(30 Dec 12, 06:05PM)Bukz Wrote: Such scripts will be easier to write in the next version of assaultcube. (coming soon)

It will be very easy to get a client's current number of teamkills.

[cubescript]echo (player CN tks)[/cubescript]

That will be essential for creating the script of course. The only way I can think to count teamkills in the current version is to use a recursive alias that constantly scans $conline for text indicating a teamkill. (e.g. unarmed fragged/gibbed/headshot/etc. teammate blah) Problem is this is quite an unreliable method. The script will miss teamkills its only a matter of time. Not to mention the many problems you run into when 2 or more people have the same name on the server.

Solution: Wait until the next version where it will be much easier to write such scripts as well as having them be more reliable. Heres an example of what the script might look like in the upcoming version:

[cubescript]const MAX_TEAMKILLS_PER_ROUND 6 // if a player has more than this number of teamkills they should be autokicked by the script
const MILLIS_BETWEEN_TK_CHECKS 5000 // run the script once every 5 seconds
const MILLIS_BETWEEN_AUTOKICKS 2000 // if multiple people are to be autokicked, wait this many milliseconds before kicking the next player

checkinit mapstartalways [ if (&& $connected (curmodeattr team)) CHECK_TEAMKILLS ] // plug the script into mapstartalways for full automation

CHECK_TEAMKILLS = [
if (currole) [ // you must have admin status on the server for the script to work properly
clients_to_kick = ""
loop i 21 [
if (!= $i (player1 cn)) [ // you (the admin) are exempt from teamkill checks
if (isclient $i) [
if (> (player $i tks) $MAX_TEAMKILLS_PER_ROUND) [
add2list clients_to_kick $i
]
]
]
]
if (listlen $clients_to_kick) [
kick_ctr = -1
loop i (listlen $clients_to_kick) [
sleep (* $i $MILLIS_BETWEEN_AUTOKICKS) [
+= kick_ctr 1
kick (at $clients_to_kick $kick_ctr) "Excessive teamkilling."
]
]
]
]
sleep $MILLIS_BETWEEN_TK_CHECKS CHECK_TEAMKILLS
][/cubescript]

Thanks friend,at this time, just my server has the bot is version 1.0.1 .....I think when you leave the AC version 1.2.0.0. I'll upload my ADMIN BOT 1.0.2 ~ By ~ BiD # A.D.M
Thank you.
Thanks given by: