Help me find an old script. (tools.cfg and config/docsection.cfg)
#1
V-Man really did a fantastic job creating tools.cfg many, many years ago and at the very least I would like to play around with some of the commands, but I might even make whatever changes are necessary to "port" it to AC 1.3 (with his permission of course)

I'm looking for the most recent version that I can find but please post any copy that you may have of the old tools.cfg by V-Man!

EDIT: XRD came through and found a copy of it, if you have a newer version of it please post it below! I am still looking for the accompanying config/docsection.cfg that was packaged along with tools.cfg as well

// tools.cfg -- A collection of useful CubeScript tools by V-Man -- version 1.1.0.11, 4/2/2011
// *************************************************************************************************************
// integer, float, and number checks by Kirin.
alias isfloat [strcmp (+f $arg1 0) $arg1]
alias isint [strcmp (+ $arg1 0) $arg1]
alias isnumber [|| (isfloat $arg1) (isint $arg1)]
alias iseven [! (mod $arg1 2)]
// rndposneg -- generates a random number, positive or negative, with a given absolute value -- by V-Man
alias rndposneg [result (concatword (at ["" -] (rnd 2)) (rnd $arg1))]
// Ranged random int script by DES|Bukz and V-Man
alias rrnd [+ (rnd (- $arg2 $arg1)) $arg1] // Result may not equal or exceed max
// Ranged random floating point int script by DES|Bukz and V-Man
// rrndf min max decimal - /echo (rrndf 3 3.14 2) - Outputs a random number from 3 to 3.14 with two decimal places.
alias rrndf [divf (+f (rnd (*f (-f $arg2 $arg1) (pow 10 $arg3))) (*f $arg1 (pow 10 $arg3))) (pow 10 $arg3)]
alias rndattract [
tmpresult = (average $arg3 (rrnd (- $arg1 $arg3) (+ $arg2 $arg3)))
tmpresult = (average $tmpresult $arg3)
result $tmpresult] // rndattract (min) (max) (attractor)
alias larger [if (>=f $arg1 $arg2) [result $arg1] [result $arg2]] // returns the larger of two numbers
alias smaller [if (<=f $arg1 $arg2) [result $arg1] [result $arg2]] // returns the smaller of two numbers
alias whatpercent [result (*f (divf (- $arg3 $arg1) (- $arg2 $arg1)) 100)] // Returns percentage of given value
alias percentrange [result (*f (- $arg2 $arg1) (divf $arg3 100))] // Returns a value that is a given percent
// *************************************************************************************************************
// absval, square, and sqrt -- calculate absolute value, square, and square root -- by V-Man and Kirin
alias absval [if (<f 0 $arg1) [result $arg1] [result (*f $arg1 -1)]]
alias square [result (*f $arg1 $arg1)]
alias sqrt [
arg1 = (absval $arg1)
x = (divf (+f $arg1 1) 2)
tmp_iters = 0
sqrt_perr = (absval (-f (square $arg1) $arg1))
sqrt_err = (absval (-f (square $x) $arg1))
while [(|| (<f $sqrt_err $sqrt_perr) (< $tmp_iters 5))] [
  -=f x (divf (-f (square $x) $arg1) (*f 2 $x))
  sqrt_perr = $sqrt_err
  sqrt_err = (absval (-f (square $x) $arg1))
  += tmp_iters 1]
result $x]
// *************************************************************************************************************
// Exponent script made by Kirin (iterative pow algorithm, exponents are forced into integers)
alias pow [
alias pow_exp $arg2
alias pow_base $arg1
if (= $pow_exp 0) [result 1] [
if (< $pow_exp 0) [*= pow_exp -1] []
-= pow_exp 1
loop i $pow_exp [*=f pow_base $arg1]
if (> $arg2 0) [result $pow_base] [result (divf 1 $pow_base)]]]
alias fac [tmpfac = 1
loop fa (- $arg1 1) [*=f tmpfac (+ $fa 2)]
result $tmpfac] // Factorial
// *************************************************************************************************************
// roundf by Gibstick -- returns the nearest integer
alias roundf [
if (>= (+f ($arg1) 0.5) (+ ($arg1) 1.0)) [
(+ ($arg1) 1)] [
(+ ($arg1) 0)]]
// average by V-Man -- input the list of numbers to be rounded as a single argument in brackets
alias average [
avsum = 0
loop i $numargs [+=f avsum (getalias (concatword "arg" (+ $i 1)))]
divf $avsum $numargs]
// "average 1 3 3 7" returns 3.5
// *************************************************************************************************************
//[Kirin] format float/int to a precision; e.g.,  /echo (formatprec 123.456 2) outputs 123.45
alias formatprec [
fp_number = $arg1
fp_mag = (pow 10 $arg2)
*=f fp_number $fp_mag
-= fp_number 0
fp_number = (divf $fp_number $fp_mag)
result $fp_number]
// *************************************************************************************************************
// Contributions from Yarukinasu
alias div=f [$arg1 = (divf (getalias $arg1) $arg2)] // Something that should have been an ident this whole time...
// Natural, decimal, and binary logarithms by V-Man and Yarukinasu
alias logn [
tmplog = (absval $arg1); ecount = 0
while [(> $tmplog 2)] [div=f tmplog 2.718281828459045; += ecount 1]
while [(<=f $tmplog 0.56)] [*=f tmplog 2.718281828459045; -= ecount 1]
tmp_log = (divf (-f $tmplog 1) $tmplog)
loop ln 30 [+=f tmp_log (divf (pow (divf (-f $tmplog 1) $tmplog) (+ $ln 2)) (+ $ln 2))]
result (+f $tmp_log $ecount)]
alias log2 [
tmpval = (absval $arg1); tmpres = 0
while [(< $tmpval 1)] [-=f tmpres 1; *=f tmpval 2]
while [(>= $tmpval 2)] [+=f tmpres 1; div=f tmpval 2]
tmpfp = 1
while [(>=f $tmpfp 0.000001)] [div=f tmpfp 2; *=f tmpval $tmpval
  if (>= $tmpval 2) [div=f tmpval 2; +=f tmpres $tmpfp]]
result $tmpres]
alias log10 [result (divf (logn $arg1) (logn 10))] // Using natural log is a tiny bit more accurate
// Greatest Common Divisor and Lowest Common Multiple by Yarukinasu; condensed by V-Man
alias GCD [storeargs $arg1 $arg2 0
while [(!= $tmp2 0)] [
tmp3 = $tmp2
tmp2 = (modf $tmp1 $tmp2)
tmp1 = $tmp3]
result $tmp1] // Euclidean algorithm
alias LCM [tmplcm = 1
loop l $numargs [tmplcm = (div (* $tmplcm (getalias (concatword arg (+ $l 1)))) (GCD $tmplcm (getalias (concatword arg (+ $l 1)))))]
result $tmplcm]
// *************************************************************************************************************
// Trigonometric functions based on the Taylor Series; scripted by V-Man
alias sin [
tmpsin = $arg1
while [(>f $tmpsin 3.14159265358979)] [-=f tmpsin 6.28318530717958]
while [(<f $tmpsin -3.14159265358979)] [+=f tmpsin 6.28318530717958]
tmp_sin = $tmpsin
loop sn 9 [if (iseven $sn) [
  -=f tmp_sin (divf (pow $tmpsin (+ (* $sn 2) 3)) (fac (+ (* $sn 2) 3)))] [
  +=f tmp_sin (divf (pow $tmpsin (+ (* $sn 2) 3)) (fac (+ (* $sn 2) 3)))]]
result $tmp_sin] // Sine of an angle, in radians
alias cos [
tmpcos = $arg1
while [(>f $tmpcos 6.28318530717958)] [-=f tmpcos 6.28318530717958]
while [(<f $tmpcos 0)] [+=f tmpcos 6.28318530717958]
tmp_cos = 1
loop cs 9 [if (iseven $cs) [
-=f tmp_cos (divf (pow $tmpcos (+ (* $cs 2) 2)) (fac (+ (* $cs 2) 2)))] [
+=f tmp_cos (divf (pow $tmpcos (+ (* $cs 2) 2)) (fac (+ (* $cs 2) 2)))]]
result $tmp_cos] // Cosine of an angle, in radians
alias tan [divf (sin $arg1) (cos $arg1)] // Tangent
alias cosecant [divf 1 (sin $arg1)]
alias secant [divf 1 (cos $arg1)]
alias cotangent [divf (cos $arg1) (sin $arg1)]
alias torads [result (*f (divf $arg1 180) 3.1415927)] // Convert from degrees to radians, by Yarukinasu
alias todegs [result (divf (*f $arg1 180) 3.1415927)] // Convert from radians to degrees, by Yarukinasu
alias numpi [result (concatword (divf (roundf (*f (divf $arg1 3.1415927) 1000)) 1000) pi)] // Express a number as rounded multiples of pi
// *************************************************************************************************************
// check2add -- a sane way to generically standardize check-based alias and keybind addition
alias addcheck [if (strstr (getalias $arg1) $arg2) [] [add2alias $arg1 $arg2]]
alias add2list [if (strcmp "" (getalias $arg1)) [$arg1 = $arg2] [$arg1 = (concat (getalias $arg1) $arg2)]]]
// Some commonly-used native aliases that do not get emptied:
alias addcheck_msa [addcheck mapstartalways $arg1]
alias addcheck_si [addcheck start_intermission $arg1]
alias addcheck_onquit [addcheck onQuit $arg1]
alias addcheck_sb [addcheck sbconnect $arg1]
// A way to add aliases to be cleared OnQuit:
alias addlistonquit [alias_list = $arg1; loop i (listlen $alias_list) [addOnQuit (concat "delalias" (at $alias_list $i))]]
// example: addlistonquit [newalias newalias1 newalias2 newalias3 newalias4 newalias5]
// They will be cleared on quitting the game, if users prefer to keep saved.cfg clear.
// *************************************************************************************************************
// initialize -- for the introduction of large lists of new aliases
alias checkinit [if (checkalias $arg1) [] [alias $arg1 $arg2]] // Defines an alias if the alias does not exist yet
alias initialize [loop i (listlen $arg1) [checkinit (at $arg1 $i) $arg2]]
// initialize [qwer wert erty rtyu tyui yuio uiop asdf sdfg dfgh fghj ghjk hjlk zxcv xcvb cvbn vbnm] 0
// All 17 aliases are defined as 0 if they (each) do not already exist
// *************************************************************************************************************
// storeargs -- conveniently store arguments into tmp aliases -- by V-Man
alias storeargs [
loop st $numargs [
alias (concatword "tmp" (+ $st 1)) (getalias (concatword "arg" (+ $st 1)))]
] // storeargs $arg1 $arg2 $arg3 $arg4 $arg5
// stores arguments in tmp1, tmp2, tmp3, tmp4, tmp5 for future use
// *************************************************************************************************************
// serial and nestalias -- quickly create a nested alias or a series of multiple, numbered aliases (and delete them)
alias serial [
tmp_command = $arg3
serialnum = 0
loop sa $arg2 [
if (checkalias (concatword $arg1 $sa)) [] [alias (concatword $arg1 $sa) (tmp_command)]
+= serialnum 1]] // serial (base name) (number to make) [meta-command]
// Uses $serialnum as its counting variable
// Will not make the alias if the alias already exists
alias delserial [
loop ds $arg2 [
delalias (concatword $arg1 $ds)]] // delserial (base name) (number to delete up to)
alias nestalias [
storeargs $arg1 $arg2 $arg3 $arg4
nestnum = 0
tmp_alias = $tmp4
loop nn $tmp2 [
tmp_alias = (concat "alias" $tmp1 "[" $tmp_alias "]" ";" (tmp3))
+= nestnum 1]
alias $tmp1 $tmp_alias] // nestalias (alias name) (number of layers) [side meta-command] (end command)
// Uses $nestnum as its counting variable; you can use "delalias" as the end command for a self-deleting alias
// *************************************************************************************************************
// self-recursive alias maker -- creates an alias which calls itself -- by V-Man
alias recursive [
storeargs $arg1 $arg2 $arg3
if (isnumber $tmp1) [
echo You must use a string for the alias!] [
alias (getalias tmp1) (concat (getalias tmp3) ";" "sleep" (getalias tmp2) (getalias tmp1))]
delserial tmp 4]
// recursive (name of alias) (sleep time) (command)
// recursive rave 500 [scalelights 99 1337]
// "rave" can then be added into mapstartalways using addcheck_msa
alias stoploop [push $arg1 []] // stoploop rave
// *************************************************************************************************************
// bloop -- A backward loop -- by V-Man
alias bloop [loop $arg1 $arg2 [$arg1 = (- (+ (* (getalias $arg1) -1) $arg2) 1); arg3]]
// bloop i 10 [echo $i]
// 9 8 7 6 5 4 3 2 1 0
// sloop -- add sleep to a loop -- idea by macm, abused by V-Man
alias sloop [
storeargs $arg1 $arg2 $arg3 $arg4
if (isnumber $tmp1) [
echo You must use a string for the alias!] [
(getalias tmp1) = 0
if (isint $tmp3) [
sloopme] [echo You must use an integer for the sleep!]]]
alias sloopme [
  if (< (getalias (getalias tmp1)) $tmp2) [
   tmp4
   += (getalias tmp1) 1
   sleep $tmp3 [sloopme]] []]
// sloop (alias to use as counter) (number of loops) (sleep time) (command)
// sloop temp 5 500 [echo Number (concatword (getalias temp) !)]
// *************************************************************************************************************
alias add2bind [if (strstr (keybind $arg1) $arg2) [] [bind $arg1 (concat (keybind $arg1) ";" $arg2)]]
// findbind -- A method of back-searching for key commands, phrases, or aliases in keybinds
alias bindcheck [if (strstr (keybind $arg1) $arg2) [result 1] [result 0]]
alias keylist [ MOUSE1 MOUSE2 MOUSE3 MOUSE4 MOUSE5 MOUSE6 MOUSE7 MOUSE8 BACKSPACE TAB CLEAR RETURN PAUSE ESCAPE SPACE EXCLAIM QUOTEDBL HASH DOLLAR AMPERSAND QUOTE LEFTPAREN RIGHTPAREN ASTERISK PLUS COMMA MINUS PERIOD SLASH 0 1 2 3 4 5 6 7 8 9 COLON SEMICOLON LESS EQUALS GREATER QUESTION AT LEFTBRACKET BACKSLASH RIGHTBRACKET CARET UNDERSCORE BACKQUOTE a b c d e f g h i j k l m n o p q r s t u v w x y z DELETE KP0 KP1 KP2 KP3 KP4 KP5 KP6 KP7 KP8 KP9 KP_PERIOD KP_DIVIDE KP_MULTIPLY KP_MINUS KP_PLUS KP_ENTER KP_EQUALS UP DOWN RIGHT LEFT INSERT HOME END PAGEUP PAGEDOWN F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 F15 NUMLOCK CAPSLOCK SCROLLOCK RSHIFT LSHIFT RCTRL LCTRL RALT LALT RMETA LMETA LSUPER RSUPER MODE COMPOSE HELP PRINT SYSREQ BREAK MENU SZ UE OE AE ] // listlen = 144
alias findbind [
alias bindloopresult []
alias itemtofind $arg1
loop i 144 [
if (bindcheck (at $keylist $i) $itemtofind) [
  alias bindloopresult (concat $bindloopresult (at $keylist $i))] []]
result $bindloopresult]
// Method for dealing with multiple results in findbind:
alias numbinds [listlen (findbind $arg1)] // number of keys having the designated term in their binds
// add2bind every key that has the designated term:
alias add2eachbind [
alias addition $arg2
if (findbind $arg1) [
loop i (numbinds $itemtofind) [add2bind (at (findbind $itemtofind) $i) $addition]]]
// Example:
// add2eachbind reload [echo "reloading..."]
// ifbind -- encase an already-existing keybind in a conditional statement -- by V-Man
alias ifbind [
bind $arg1 (concat [if] $arg2 (concatword "[" (if $arg4 [result (keybind $arg1)] [result $arg3]) "]") (concatword "[" (if $arg4 [result $arg3] [result (keybind $arg1)]) "]"))]
// ifbind (key) (condition) (command) (Use normal keybind if condition is 1 or 0?)
// ifbind V [$connected] [showmenu voicecom] 0
// Takes the current bind in key "V" and makes it the "if not" (0) argument in an encasing "if" statement depending on $connected (thus, the provided command is executed when $connected evaluates to 1).
// *************************************************************************************************************
// delfromlist -- A set of tools to modify lists
alias delfromlistend [
tmp_list1 = []
loop de (- (listlen $arg1) $arg2) [
  add2list tmp_list1 (at $arg1 $de)]
result (getalias tmp_list1) ]
// echo (delfromlistend $testlist 3)
alias delfromliststart [
tmp_list2 = []
loop ds (- (listlen $arg1) $arg2) [
  add2list tmp_list2 (at $arg1 (+ $ds $arg2))]
result (getalias tmp_list2) ]
// echo (delfromliststart $testlist 3)
alias delfromlist [
tmp_list3 = []
loop dl (listlen $arg1) [
  if (strcmp (at $arg1 $dl) $arg2) [] [
   add2list tmp_list3 (at $arg1 $dl)]]
result (getalias tmp_list3) ]
// echo (delfromlist $testlist k)
alias delfromlist_mult [
alias tmp_list4 $arg1
loop mu (listlen $arg2) [alias tmp_list4 (delfromlist $tmp_list4 (at $arg2 $mu))]
result (getalias tmp_list4) ]
// echo (delfromlist_mult $testlist [a c e g i k])
alias replacestr [
tmp_list5 = []
loop rs (listlen $arg1) [
  if (strcmp (at $arg1 $rs) $arg2) [add2list tmp_list5 $arg3] [add2list tmp_list5 (at $arg1 $rs)]]
result (getalias tmp_list5)]
// replacestr [I do not like CubeScript] "not" "really"
alias swapstrpos [
tmp_list6 = []
alias strpos1 (findlist $arg1 $arg2)
alias strpos2 (findlist $arg1 $arg3)
loop sw (listlen $arg1) [
  if (= $sw $strpos1) [add2list tmp_list6 $arg3] [
   if (= $sw $strpos2) [add2list tmp_list6 $arg2] [
    add2list tmp_list6 (at $arg1 $sw)]]]
result (getalias tmp_list6)]
// swapstrpos [I do really like CubeScript] "do" "really"
// insertpos -- modify a list by inserting a specified element into a specified point in the list -- by V-Man
alias insertpos [
tmp_list7 = []
loop inp (listlen $arg1) [
  if (= $arg2 $inp) [
   add2list tmp_list7 $arg3 ; add2list tmp_list7 (at $arg1 $inp)] [
   add2list tmp_list7 (at $arg1 $inp)]]
result (getalias tmp_list7)]
// insertpos (list) (position) (element to add)
// echo (insertpos [I really would enjoy playing TOSOK all day long] 3 not)
alias insertstr [
if (= (findlist $arg1 $arg2) -1) [echo Specified string not found in list!] [
insertpos $arg1 (+ (findlist $arg1 $arg2) 1) $arg3]]
// insertstr (list) (element after which to insert new element) (element to add) (next element, if it helps you)
// echo (insertstr [A good Cuber will die for the team!] will sometimes die)
// if there are two instances of the reference element, this script uses the first one.
alias concatlist [
tmp_cnclist = []
loop cncl (listlen $arg1) [tmp_cnclist = (concatword $tmp_cnclist (at $arg1 $cncl))]
result $tmp_cnclist] // echo (concatlist [V - M a n])
alias mv2liststart [result (insertpos (delfromlist $arg1 $arg2) 0 $arg2)] // echo (mv2liststart [fragging love I] I)
// *************************************************************************************************************
// add2menu -- Quickly append to any already-defined menu without having to open its cfg file for editing
alias add2menu [
newmenu $arg1
arg2]
alias add2mainmenu [
add2menu main $arg1]
// *************************************************************************************************************
// conloop -- A generic looping conline checker.
alias if_conline_list [] // instead of "checkinit" to avoid spamz0r
alias if_conline_has [
check_for = $arg1
if (|| (|| (strcmp $arg2 "but_not") (strcmp $arg2 "and_also")) (strcmp $arg2 "or_else")) [
tmp_other = $arg3
action_if_yes = $arg4
action_if_no = $arg5
if (strcmp $arg2 "but_not") [
  if (&& (strstr $conline $check_for) (! (strstr $conline $tmp_other))) [action_if_yes] [action_if_no]] []
if (strcmp $arg2 "and_also") [
  if (&& (strstr $conline $check_for) (strstr $conline $tmp_other)) [action_if_yes] [action_if_no]] []
if (strcmp $arg2 "or_else") [
  if (|| (strstr $conline $check_for) (strstr $conline $tmp_other)) [action_if_yes] [action_if_no]] []
] [
action_if_yes = $arg2
action_if_no = $arg3
if (strstr $conline $check_for) [action_if_yes] [action_if_no]]]
alias add2conloop [addcheck if_conline_list $arg1]
recursive conloop 0 [if_conline_list; conline [ ]]
addcheck_msa conloop
// Example:
// add2conloop [if_conline_has "connected: " [whois (findcn (at $conline 1))] []]
// *************************************************************************************************************
// convertcnum and whoisline -- automatically stores the last "whois" info in an alias -- by V-Man
alias convertcnum [
loop co 42 [if (strcmp (at $conline 2) (concatword $co ":")) [tmpcn = $co] []]
result $tmpcn]
add2conloop [
if_conline_has "WHOIS" [
if (= (listlen $conline) 7) [
  alias whoisline (concat (convertcnum) (at $conline 4) (at $conline 6))
  ] [
  alias whoisline (concat (convertcnum) (at $conline 4) (at $conline 7))]] []]
// whoisline = cn, name, IP
// *************************************************************************************************************
// curplayers -- Returns the number of players in the server or bot game -- by DES|Bukz.
// Modified by V-Wifey and V-Man.
alias curplayers [
players = 0
if $connected [
  loop x 21 [if (= (at (pstat_score $x) 4) -1) [] [+= players 1]]
  result $players
] [
  loop x 41 [if (strcmp (findpn $x) "") [] [+= players 1]]
  result $players
]]
// *************************************************************************************************************
// validcnumlist by V-Man: counts the number of (non-duplicated) client numbers
alias validcnumlist [
validcnums = []
if $connected [
  loop n 21 [if (= (at (pstat_score $n) 4) -1) [] [add2list validcnums $n]]
  result $validcnums
] [
  loop n 41 [if (strcmp (findpn $n) "") [] [add2list validcnums $n]]
  result $validcnums ]]
// kickbots: kickbots 1 3 5 7 9 kicks multiple bots, by client number
alias kickbots [
loop o $numargs [
  kickbot (findpn (getalias (concatword "arg" (+ $o 1)))) ]]
// whoisall: WHOIS check on every client in the server
alias whoisall [loop w 21 [whois $w]]
// teamcount: echo (teamcount 1) returns the count for players in RVSF
alias teamcount [
tmp_count = 0
loop p (curplayers) [
if (= (at (pstat_score (at (validcnumlist) $p)) 4) $arg1) [+= tmp_count 1] []
] result $tmp_count ]
// *************************************************************************************************************
// Bukz' "cur" scripts -- calculates the highest client number, number of enemies, and individual pstat scores
// 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 (curmodeattr bot)) [
  if (curmodeattr team) [
   if (curteam) [
    loop b (+ (curhighestcn) 1) [
  if (= (at (pstat_score $b) 4) 0) [+= tmpenemies 1] []
  ] result $tmpenemies
  ] [
     loop b (+ (curhighestcn) 1) [
      if (= (at (pstat_score $a) 4) 1) [+= tmpenemies 1] []
      ] result $tmpenemies]] [
  tmpenemies = (- (curplayers) 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) "") [result -1] [
  tmpscore = (at (pstat_score $arg1) 3)
   result $tmpscore ]]
// *************************************************************************************************************
alias countsound [
registersound $arg1 $arg2 $arg3 $arg4
+= regsounds 1
alias $arg5 (concat "sound" $regsounds)
addlistonquit $arg5]
// countsound weapon\chainsaw [] [] [] chsaw
// registers chainsaw.wav and saves its sound command in alias "chsaw"
regsounds = 98 // If there are 98 sounds registered in sounds.cfg (98 is default)
// *************************************************************************************************************
// Clearing the tools on quit
addcheck_onquit [delserial tmp_list 9]
addcheck_onquit [delserial tmp 9]
addlistonquit [addcheck add2bind add2list addcheck_msa addcheck_si addcheck_onquit addcheck_sb addlistonquit findbind bindcheck bindloopresult fblc itemtofind findbind_loop keylist numbinds add2eachbind addition initialize checkinit if_conline_has check_for has_not action_if_yes action_if_no add2conloop conloop if_conline_list pow pow_exp pow_base roundf average avsum add2menu add2mainmenu players curplayers serial tmp_command serialnum nestalias tmp_name tmp_command tmp_layers nestnum tmp_alias delfromlistend delfromliststart delfromlist delfromlist_mult replacestr swapstrpos mv2liststart tmp_list strpos1 strpos2 validcnumlist validcnums kickbots teamcount tmp_count curhighestcn hcn curenemies tmpenemies curdeaths tmpdeaths curfrags tmpfrags curratio tmpratio storeargs sloop sloopme recursive isfloat isint isnumber iseven rndposneg absval square sqrt x tmp_iters sqrt_perr sqrt_err insertpos insertstr convertcnum tmpcn whoisline shiftsel countsound regsounds larger smaller torads todegs div=f larger smaller GCD LCM tmplcm fac tmpfac sin tmpsin tmp_sin cos tmpcos tmp_cos tan cosecant secant cotangent numpi logn tmplog ecount tmp_log log10 log2 tmpval tmpres tmpfp whatpercent percentrange rndattract tmpresult
alias_list onQuit]
exec config/docsection.cfg
Thanks given by: