Auto-Ignore script - Automatically ignore clients with wildcard (e.g. clantag) support.
Password Generator script - Server admin tool to easily generate random, secure, admin and deban passwords.
...and some more junk... :P
Summary:
curhighestcn - Returns the highest valid cn in the current game.
curenemies - Returns your current number of enemies.
curdeaths - Returns the given client's current number of deaths.
curfrags - Returns the given client's current number of frags.
curratio - Returns the given client's current ratio (frags / deaths).
curscore - Returns the given client's current score (in points).
Lots of new toys for you cubescripters out there! HF! More to come, keep checking this post.
Password Generator script - Server admin tool to easily generate random, secure, admin and deban passwords.
...and some more junk... :P
[SELECT ALL] Code:
// curhighestcn - Returns the highest client number in the current game. - by DES|Bukz
alias curhighestcn [
hcn = 0
if $connected [
loop q 21 [
if (strcmp (findpn $q) "") [] [
hcn = $q
]
]
] [
loop q 41 [
if (strcmp (findpn $q) "") [] [
hcn = $q
]
]
]
result $hcn
]
// curenemies - Returns the current number of enemies the user may have ATM. - by DES|Bukz
// Requires tools.cfg & the "curhighestcn" script.
alias curenemies [
tmpenemies = 0
if (|| (= $connected 1) (= (curmodeattr bot) 1)) [
if (= (curmodeattr team) 0) [ // FFA
tmpenemies = (- (curplayers) 1)
result $tmpenemies
] [ // Team
if (= (curteam) 0) [ // CLA
loop a (+ (curhighestcn) 1) [
if (= (at (pstat_score $a) 4) 1) [+= tmpenemies 1] []
]
result $tmpenemies
] [ // RVSF
loop b (+ (curhighestcn) 1) [
if (= (at (pstat_score $b) 4) 0) [+= tmpenemies 1] []
]
result $tmpenemies
]
]
] [result -1]
]
// curdeaths - Returns the number of deaths a client has in the current game. - by DES|Bukz
// Returns -1 if an invalid client number was given.
alias curdeaths [
tmpdeaths = 0
if (strcmp (findpn $arg1) "") [result -1] [
tmpdeaths = (at (pstat_score $arg1) 2)
result $tmpdeaths
]
]
// curfrags - Returns the number of frags a client has in the current game. - by DES|Bukz
// Returns -1 if an invalid client number was given.
alias curfrags [
tmpfrags = 0
if (strcmp (findpn $arg1) "") [result -1] [
tmpfrags = (at (pstat_score $arg1) 1)
result $tmpfrags
]
]
// curratio - Returns the given clients ratio in a floating point decimal by DES|Bukz
// Returns -1 if an invalid client number was given.
alias curratio [
if (strcmp (findpn $arg1) "") [result -1] [
alias tmpfrags (at (pstat_score $arg1) 1)
alias tmpdeaths (at (pstat_score $arg1) 2)
if (< $tmpdeaths 2) [
alias tmpratio (concatword $tmpfrags .0)
] [
alias tmpratio (divf $tmpfrags $tmpdeaths)
]
result $tmpratio
]
]
// curscore - Returns the current score (in points) that a given client has ATM by DES|Bukz
alias curscore [
if (strcmp (findpn $arg1) "") [] [
tmpscore = (at (pstat_score $arg1) 3)
result $tmpscore
]
]
docsection [Miscellaneous];
docident [curenemies] [Returns the current number of enemies you have in the game.];
docexample [/echo (curenemies)] [Output: If you currently have 4 enemies, outputs 4.];
docident [curhighestcn] [Returns the highest valid client number found in the current game.];
docexample [/echo (curhighestcn)] [Output: If the highest cn is currently 19, outputs 19.];
docident [curdeaths] [Returns the current number of deaths a client currently has.];
docargument [C] [A valid client number.];
docexample [/echo (curdeaths 5)] [Output: If cn 5 currently has 14 deaths, outputs 14.];
docremark [Returns -1 if an invalid client number was given.];
docident [curfrags] [Returns the current number of frags a client currently has.];
docargument [C] [A valid client number.];
docexample [/echo (curfrags 5)] [Output: If cn 5 currently has 25 frags, outputs 25.];
docremark [Returns -1 if an invalid client number was given.];
docident [curratio] [Returns the current ratio (frags / deaths) of a client.];
docargument [C] [A valid client number.];
docexample [/echo (curratio 5)] [Output: If cn 5 currently has 8 frags and 4 deaths, outputs 2.0.];
docremark [Returns -1 if an invalid client number was given.];
docident [curscore] [Returns the current score of a client.];
docargument [C] [A valid client number.];
docexample [/echo (curscore 5)] [Output: If cn 5 currently has 125 points, outputs 125.];
docremark [Returns -1 if an invalid client number was given or if not currently connected to a server.];
Summary:
curhighestcn - Returns the highest valid cn in the current game.
curenemies - Returns your current number of enemies.
curdeaths - Returns the given client's current number of deaths.
curfrags - Returns the given client's current number of frags.
curratio - Returns the given client's current ratio (frags / deaths).
curscore - Returns the given client's current score (in points).
Lots of new toys for you cubescripters out there! HF! More to come, keep checking this post.