Posts: 32
Threads: 5
Joined: Nov 2012
29 Dec 12, 06:13PM
(This post was last modified: 29 Dec 12, 06:14PM by ADM|AtriX.)
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.
Posts: 1,438
Threads: 54
Joined: Jun 2010
29 Dec 12, 11:59PM
(This post was last modified: 29 Dec 12, 11:59PM by DrauL.)
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.
Posts: 32
Threads: 5
Joined: Nov 2012
(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
Posts: 1,331
Threads: 44
Joined: Jun 2010
30 Dec 12, 06:05PM
(This post was last modified: 30 Dec 12, 07:23PM by Bukz.)
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]
Posts: 32
Threads: 5
Joined: Nov 2012
(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.