// Settings/Aliases/etc. autoscreenshot 0 crosshairsize 15 flyspeed 2.25 fov 105 fullconsize 90 jpegquality 90 name "DES|Bukz" nextprimary 5 scopefov 40 screenshottype 1 sensitivity 2.7 showscoresondeath 0 ofc_gamma_list = [215 175 190 165 190 165 165 170 165 180 165 155 175 165 165 195 200 175 165 155 170 205 165 180 175 150 190 180 165] dyngamma = 1 showstatsondeath = 1 // Consts MAXSNIPERCOMBOMILLIS = 3000 // See "deathData" below. // Binds bind 5 [if (curmodeattr team) [voicecom yes "No problem, it happens. :)"]] bind 6 [voicecom yes "Yes! :)"] bind LEFT [if (&& (curmodeattr team) (curmodeattr flag)) [voicecom cominginwiththeflag "<- left"] [say "%<- left"]] bind RIGHT [if (&& (curmodeattr team) (curmodeattr flag)) [voicecom cominginwiththeflag "-> right"] [say "%-> right"]] bind UP [if (&& (curmodeattr team) (curmodeattr flag)) [voicecom cominginwiththeflag mid] [say %mid]] bind DOWN [if (curmodeattr team) [if (curmodeattr flag) [voicecom recovertheflag "Recover the flag!"] [voicecom coverme "Cover me!"]] [voicecom imattacking "I'm attacking!"]] bind F [if $editing [solid 1] [sndtoggle]] bind N [ if (&& (listlen $deathData) (<= (- (millis) (at $deathData 4)) 7500)) [ tmpmsg = shot if (= (at $deathData 2) 0) [tmpmsg = knife] if (= (at $deathData 2) 1) [if (= (player (at $deathData 0) primary) 5) [tmpmsg = combo] [tmpmsg = pistol]] if (= (at $deathData 2) 2) [tmpmsg = carbine] if (= (at $deathData 2) 3) [if (at $deathData 3) [tmpmsg = "noob cannon"] [tmpmsg = shotgun]] if (= (at $deathData 2) 4) [tmpmsg = spam] // SMG if (= (at $deathData 2) 6) [tmpmsg = spray] // AR if (= (at $deathData 2) 5) [if (at $deathData 3) [tmpmsg = headshot] [tmpmsg = snipe]] if (= (at $deathData 2) 8) [tmpmsg = nade] if (= (at $deathData 2) 9) [tmpmsg = akimbo] if (= (player (at $deathData 0) team) (player1 team)) [tmpmsg = TK] // Same team = teamkill voicecom niceshot (format "Nice %1, %2! %3" $tmpmsg (at $deathData 5) (at $hapemo (rnd (listlen $hapemo)))) // Output: "Nice %s, %s! %s", weapon, name, emoticon ] [voicecom niceshot (concat "Nice shot!" (at $hapemo (rnd (listlen $hapemo))))] ] bind MOUSE2 [if $editing [domodifier 10] [altaction]] bind LCTRL [toggleconsole] megabind E [] [edittoggle] [melee] [melee] [edittoggle] // Scripts // Alias tools. blanklist = [loop bll (listlen $arg1) [(at $arg1 $bll) = ""]] resetlist = [loop rll (listlen $arg1) [(at $arg1 $rll) = 0]] forceinit = [if (! (checkalias $arg1)) [$arg1 = ""]] initlist = [if (listlen $arg1) [loop ill (listlen $arg1) [forceinit (at $arg1 $ill)]]] addcheck = [forceinit $arg1; if (! (strstr (getalias $arg1) $arg2)) [add2alias $arg1 $arg2]] blanklist "deathData" resetlist "timestked lastsnipe lasthit" initlist "mapstartalways onKill onReload start_intermission" // Ensure the initialization of various native aliases. // Misc tools. forceclosecon = [if (= $conopen 1) [loop i 2 [toggleconsole]] [if (= $conopen 2) [toggleconsole]]] forcefullcon = [if (&& (= $conopen 0) $altconsize) [loop i 2 [toggleconsole]] [if (!= $conopen 2) [toggleconsole]]] forcealtcon = [if $altconsize [if (= $conopen 0) [toggleconsole] [if (= $conopen 2) [loop i 2 [toggleconsole]]]] [forcefullcon]] // Auto-Sorry srymsgs = [Sorry sorry Sry sry Soz soz Oops oops "My fault, sorry" "Ahh, sorry" "Accident, sorry"] hapemo = ":) (: :> <: :3 :D" sademo = ":( ): :| |: :/ \: :\ /: ._. D: :c :C :s :S" if (! (checkalias sryslp)) [sryslp = 1500] spmsg = 0 addcheck onKill [if (&& (curmodeattr team) (|| $connected (curmodeattr bot))) [if (&& (= $arg1 (player1 cn)) (&& (= (player $arg2 team) (player1 team)) (!= $arg1 $arg2))) [if (! $spmsg) [spmsg = 1; sleep $sryslp [voicecom sorry (concatword (at $srymsgs (rnd (listlen $srymsgs))) "! " (at $sademo (rnd (listlen $sademo)))); spmsg = 0] 1]]]] waskill = [if (&& (= $arg1 (player1 cn)) (&& (!= $arg1 $arg2) (!= (player $arg2 team) (player1 team)))) [result 1] [result 0]] // deathData for storing info about your death. addcheck onKill [if (= $arg2 (player1 cn)) [deathData = (concat $arg1 $arg2 $arg3 $arg4 (millis) (findpn $arg1) (findpn $arg2))]] // You were killed (somehow), store data into "deathData" addcheck onKill [if (= $arg2 (player1 cn)) [if (&& (= (player $arg1 team) (player1 team)) (!= $arg1 $arg2)) [+= timestked 1; sleep 750 [echo (concatword (c 9) (player (at $deathData 0) name) "'s TKs: " (c 5) (player (at $deathData 0) tks))]]]] // You got TK'd addcheck onKill [if (= $arg2 (player1 cn)) [if (= $arg1 (player1 cn)) [+= selfgibs 1]]] // Suicides counter addcheck onKill [if (= $arg2 (player1 cn)) [if (! (listlen $timeBetDeaths)) [timeBetDeaths = (- (millis) $startmillis)] [add2list timeBetDeaths (- (millis) $lastdeath)]]] // Time between deaths list addcheck onKill [if (= $arg2 (player1 cn)) [lastdeath = (millis)]] addcheck onKill [if (= $arg2 (player1 cn)) [if (!= $arg1 $arg2) [updatedata deathdata $arg1]]] // Update deaths list addcheck onKill [if (= $arg2 (player1 cn)) [if $showstatsondeath [updatestats]]] addcheck onKill [] addcheck onKill [if (waskill $arg1 $arg2) [if (= $arg3 0) [+= slashes 1]]] addcheck onKill [if (waskill $arg1 $arg2) [if (&& (= $arg3 5) (= $arg4 1)) [+= headshots 1]]] addcheck onKill [if (waskill $arg1 $arg2) [if (= $arg3 8) [+= gibs 1]]] addcheck onKill [if (waskill $arg1 $arg2) [if (! (listlen $timeBetKills)) [timeBetKills = (- (millis) $startmillis)] [add2list timeBetKills (- (millis) $lastkill)]]] addcheck onKill [if (waskill $arg1 $arg2) [if (= $arg3 (player1 primary)) [+= primarykills 1]]] // Primary weapon kills counter addcheck onKill [if (waskill $arg1 $arg2) [if (|| (= $arg3 1) (= $arg3 9)) [+= secondarykills 1]]] // Secondary weapon(s) kills counter (pistol/akimbo) addcheck onKill [if (waskill $arg1 $arg2) [if (&& (|| (= $arg3 1) (= $arg3 9)) (&& (= (player1 primary) 5) (<= (- (millis) $lastsnipe) $MAXSNIPERCOMBOMILLIS))) [+= spcombos 1]]] // Sniper/Pistol combo counter addcheck onKill [if (waskill $arg1 $arg2) [if (&& (= $arg3 0) (&& (= (player1 primary) 5) (<= (- (millis) $lastsnipe) $MAXSNIPERCOMBOMILLIS))) [+= skcombos 1]]] // Sniper/Knife combo counter addcheck onKill [if (waskill $arg1 $arg2) [if (&& (= $arg3 8) (&& (= (player1 primary) 5) (<= (- (millis) $lastsnipe) $MAXSNIPERCOMBOMILLIS))) [+= sgcombos 1]]] // Sniper/Grenade combo counter addcheck onKill [if (waskill $arg1 $arg2) [lastkill = (millis); updatedata victimdata $arg2]] // Update victim list // Intermission-time-stats updatestats = [ // Dump current stats (check start_intermission below) forcefullcon statsnames = [Flags Frags Deaths Score Ratio Headshots Slashes Gibs Suicides Reloads Teamkills Teamkilled "Average seconds between kills" "Average seconds between deaths" "Most killed enemy" "Killed by the most" "Teamkilled the most" "Sniper/Pistol combos" "Sniper/Knife combos" "Sniper/Grenade combos" "Primary weapon kills" "Secondary weapon kills"] lastGameData = (concat (player1 flags) (player1 frags) (player1 deaths) (player1 points) (divf (player1 frags) (player1 deaths)) $headshots $slashes $gibs $selfgibs $reloads (player1 tks) $timestked (divf (listaverage $timeBetKills) 1000) (divf (listaverage $timeBetDeaths) 1000) (format " 2%1 4--- 9(%2) 5" (findhighest $victimdata) (at $victimdata (+ (findlist $victimdata (findhighest $victimdata)) 1))) (format " 2%1 4--- 9(%2) 5" (findhighest $deathdata) (at $deathdata (+ (findlist $deathdata (findhighest $deathdata)) 1))) (format " 2%1 4--- 9(%2) 5" (at (highestTKS) 0) (at (highestTKS) 1)) $spcombos $skcombos $sgcombos $primarykills $secondarykills) echo (c 9)---------- echo (concatword (c 0) (player1 name) "'s") stats for (c 5) (getmode 1) (curmap 1) loop usl (listlen $statsnames) [ // Start continue statements - skip outputting the stat for various reasons if (&& (= $usl 0) (|| (! (curmodeattr flags)) (! (player1 flags)))) [continue] // No flags or not flag mode? if (&& (= $usl 3) (|| (! $connected) (< (player1 points) 1))) [continue] // No points or not connected? if (= $usl 4) [if (checkrange (player1 deaths) 0 1) [echo (c 1)Ratio: (format " 5%1.0" (player1 frags)); continue]] // Less than 2 deaths? ratio = frags if (|| (&& (= $usl 5) (! $headshots)) (|| (&& (= $usl 6) (! $slashes)) (&& (= $usl 7) (! $gibs)))) [continue] // No headshots, slashes, or gibs? if (&& (= $usl 8) (! $selfgibs)) [continue] // No suicides? if (&& (|| (= $usl 10) (= $usl 11)) (! (curmodeattr team))) [continue] // Not teammode? if (|| (&& (= $usl 12) (< (player1 frags) 1)) (&& (= $usl 13) (! (player1 deaths)))) [continue] // No kills or deaths? Skip averages if (|| (&& (= $usl 14) (strcmp (findhighest $victimdata) N/A)) (|| (&& (= $usl 15) (strcmp (findhighest $deathdata) N/A)) (&& (= $usl 16) (|| (strcmp (highestTKS) N/A) (! (curmodeattr team)))))) [continue] // No kills/deaths? Skip most kills/killed if (|| (&& (= $usl 17) (! $spcombos)) (|| (&& (= $usl 18) (! $skcombos)) (&& (= $usl 19) (! $sgcombos)))) [continue] // No sniper/pistol or sniper/knife combos? if (|| (&& (= $usl 20) (! $primarykills)) (&& (= $usl 21) (! $secondarykills))) [continue] // No primary or secondary weapon kills? // End continue statements echo (format " 1%1: 5%2" (at $statsnames $usl) (at $lastGameData $usl)) ] echo (c 9)---------- ] // Returns the element IMMEDIATELY BEFORE the position of, the highest value in a given list. // For the stats script, this returns the enemy that you killed the most. (e.g. (findhighest $victimdata) // Example output: unarmed) // Example list: "name1 int1 name2 int2 name3 int3 name4 int4 name5 int5" findhighest = [ if (! (listlen $arg1)) [result N/A] [ curhighest = 1 // First number = current highest loop fhl (listlen $arg1) [ if (|| (! (testlist (at $arg1 $fhl))) (= $fhl 1)) [continue] [ // Skip if the element is not a valid number, or is at position 1 (curhighest has it covered). if (>f (at $arg1 $fhl) (at $arg1 $curhighest)) [curhighest = $fhl] // If the next number is higher than the current highest, update curhighest. ] ] -= curhighest 1 // Take one away, we want to return the player's name not the number. result (at $arg1 $curhighest) ] ] // Returns a list of clients that have at least 1 teamkill. findtkclients = [ if (&& (curplayers) (&& (curmodeattr team) (> $numargs 0))) [ blanklist "tkclients" tmparg1 = $arg1 loop ftl (curplayers) [ if (>= (player $ftl tks) $tmparg1) [add2list tkclients (format "%1 %2" (player $ftl name) (player $ftl tks))] ] if (listlen $tkclients) [result $tkclients] [result N/A] ] [result N/A] ] // Returns the players name that has the current highest amount of teamkills and how many teamkills they have. (e.g. echo (highestTKS) // Example output: unarmed 5) highestTKS = [ if (&& (curplayers) (curmodeattr team)) [ resetlist "curHTK" loop htl (curplayers) [ if (> (player $htl tks) (player $curHTK tks)) [curHTK = $htl] ] if (> (player $curHTK tks) 0) [result (format "%1 %2" (player $curHTK name) (player $curHTK tks))] [result N/A] ] [result N/A] ] // Returns 1 if there is more than 1 client of the specified name on the server/in the game/etc, else 0. findDupeName = [ tmpDNC = 0 loop fdl (curplayers) [ if (> $tmpDNC 1) [break] [ if (strcmp (player $fdl name) $arg1) [+= tmpDNC 1] ] ] if (> $tmpDNC 1) [result 1] [result 0] ] // Manages the list of enemies you have killed and how many times you have killed them. updatedata = [ vicp = (findlist (getalias $arg1) (findpn $arg2)) if (> $vicp -1) [ tmpdata = "" loop uvl (listlen (getalias $arg1)) [if (= $uvl (+ $vicp 1)) [add2list tmpdata (+ (at (getalias $arg1) $uvl) 1)] [add2list tmpdata (at (getalias $arg1) $uvl)]] $arg1 = $tmpdata ] [if (! (findDupeName (findpn $arg2))) [add2list $arg1 (concat (findpn $arg2) 1)]] // Don't add clients with duplicate names to the list! The stats would be inaccurate. ] statshots = [showscores 0; sleep 1 [screenshot]; sleep 2 [showscores 1]; sleep 1000 [screenshot]] // Server admin stuff run pwlist // \:D claimadmin = [ if (&& $connected (! (currole))) [ if (> (listlen $pwlist) 0) [ app = (findlist $pwlist (curserver 1)) if (!= $app -1) [ echo (c 0)Claiming admin for server (c 2) (at $pwlist $app) // (c 0)using password (c 2) (at $pwlist (+ $app 1)) setadmin 1 (at $pwlist (+ $app 1)) ] [ app = (findlist $pwlist (format "%1:%2" (curserver 1) (curserver 3))) if (!= $app -1) [ echo (c 0)Claiming admin for server (c 2) (at $pwlist $app) // (c 0)using password (c 2) (at $pwlist (+ $app 1)) setadmin 1 (at $pwlist (+ $app 1)) ] [ tmp_hostname = (curserver 2) app = (findlist $pwlist $tmp_hostname) if (!= $app -1) [ echo (c 0)Claiming admin for server (c 2) (at $pwlist $app) // (c 0)using password (c 2) (at $pwlist (+ $app 1)) setadmin 1 (at $pwlist (+ $app 1)) ] [ app = (findlist $pwlist (format "%1:%2" $tmp_hostname (curserver 3))) if (!= $app -1) [ echo (c 0)Claiming admin for server (c 2) (at $pwlist $app) // (c 0)using password (c 2) (at $pwlist (+ $app 1)) setadmin 1 (at $pwlist (+ $app 1)) ] [echo (c 3)Cannot find an admin password for this server in your configuration!] ] ] ] ] [echo (c 3)Your admin passwords list is empty!] ] [setadmin 0] ] aban = [ if $connected [ tmpvictim = $arg1 if (> $numargs 1) [tmpreason = $arg2] if (! (currole)) claimadmin whois $tmpvictim sleep 250 screenshot sleep 750 [if (> $numargs 1) [ban $tmpvictim $tmpreason] [ban $tmpvictim admin]] sleep 1500 claimadmin ] ] akick = [ if $connected [ tmpvictim = $arg1 if (> $numargs 1) [tmpreason = $arg2] if (! (currole)) claimadmin whois $tmpvictim sleep 250 [if (> $numargs 1) [kick $tmpvictim $tmpreason] [kick $tmpvictim admin]] sleep 1000 claimadmin ] ] aforce = [ if $connected [ tmpvictim = $arg1 if (> $numargs 1) [say (format "Reason: %1" $arg2)] if (! (currole)) claimadmin sleep 250 [forceteam $tmpvictim] sleep 1000 claimadmin ] ] af = [aforce $arg1 "Setting Teams"] // Mapstartalways addcheck mapstartalways [startmillis = (millis); accuracy 0; accuracyreset; forceclosecon] addcheck mapstartalways [blanklist "deathData timeBetDeaths timeBetKills victimdata deathdata oldpstat_weaps"] addcheck mapstartalways [resetlist "timestked gibs headshots lastkill lastdeath reloads slashes lastsnipe spcombos skcombos sgcombos primarykills secondarykills selfgibs"] // How many times you reloaded counter. addcheck onReload [+= reloads 1] // Start intermission addcheck start_intermission [accuracy 1; updatestats; statshots] // MOUSE1 add2bind MOUSE1 [if (&& (= (curweapon) 5) (magcontent 5)) [lastsnipe = (millis)]] addListOnQuit "skcombos selfgibs headshots lastdeath primarykills gibs sgcombos slashes secondarykills timestked reloads spcombos lastkill lastsnipe startmillis statsnames app tkclients tmparg1 curHTK curhighest lastGameData tmpvictim tmpDNC vicp tmpdata victimdata deathdata deathData "// Settings/Aliases/etc. autoscreenshot 0 crosshairsize 15 flyspeed 2.25 fov 105 fullconsize 90 jpegquality 90 name "DES|Bukz" nextprimary 5 scopefov 40 screenshottype 1 sensitivity 2.7 showscoresondeath 0 ofc_gamma_list = [215 175 190 165 190 165 165 170 165 180 165 155 175 165 165 195 200 175 165 155 170 205 165 180 175 150 190 180 165] dyngamma = 1 showstatsondeath = 1 // Consts MAXSNIPERCOMBOMILLIS = 3000 // See "deathData" below. // Binds bind 5 [if (curmodeattr team) [voicecom yes "No problem, it happens. :)"]] bind 6 [voicecom yes "Yes! :)"] bind LEFT [if (&& (curmodeattr team) (curmodeattr flag)) [voicecom cominginwiththeflag "<- left"] [say "%<- left"]] bind RIGHT [if (&& (curmodeattr team) (curmodeattr flag)) [voicecom cominginwiththeflag "-> right"] [say "%-> right"]] bind UP [if (&& (curmodeattr team) (curmodeattr flag)) [voicecom cominginwiththeflag mid] [say %mid]] bind DOWN [if (curmodeattr team) [if (curmodeattr flag) [voicecom recovertheflag "Recover the flag!"] [voicecom coverme "Cover me!"]] [voicecom imattacking "I'm attacking!"]] bind F [if $editing [solid 1] [sndtoggle]] bind N [ if (&& (listlen $deathData) (<= (- (millis) (at $deathData 4)) 7500)) [ tmpmsg = shot if (= (at $deathData 2) 0) [tmpmsg = knife] if (= (at $deathData 2) 1) [if (= (player (at $deathData 0) primary) 5) [tmpmsg = combo] [tmpmsg = pistol]] if (= (at $deathData 2) 2) [tmpmsg = carbine] if (= (at $deathData 2) 3) [if (at $deathData 3) [tmpmsg = "noob cannon"] [tmpmsg = shotgun]] if (= (at $deathData 2) 4) [tmpmsg = spam] // SMG if (= (at $deathData 2) 6) [tmpmsg = spray] // AR if (= (at $deathData 2) 5) [if (at $deathData 3) [tmpmsg = headshot] [tmpmsg = snipe]] if (= (at $deathData 2) 8) [tmpmsg = nade] if (= (at $deathData 2) 9) [tmpmsg = akimbo] if (= (player (at $deathData 0) team) (player1 team)) [tmpmsg = TK] // Same team = teamkill voicecom niceshot (format "Nice %1, %2! %3" $tmpmsg (at $deathData 5) (at $hapemo (rnd (listlen $hapemo)))) // Output: "Nice %s, %s! %s", weapon, name, emoticon ] [voicecom niceshot (concat "Nice shot!" (at $hapemo (rnd (listlen $hapemo))))] ] bind MOUSE2 [if $editing [domodifier 10] [altaction]] bind LCTRL [toggleconsole] megabind E [] [edittoggle] [melee] [melee] [edittoggle] // Scripts // Alias tools. blanklist = [loop bll (listlen $arg1) [(at $arg1 $bll) = ""]] resetlist = [loop rll (listlen $arg1) [(at $arg1 $rll) = 0]] forceinit = [if (! (checkalias $arg1)) [$arg1 = ""]] initlist = [if (listlen $arg1) [loop ill (listlen $arg1) [forceinit (at $arg1 $ill)]]] addcheck = [forceinit $arg1; if (! (strstr (getalias $arg1) $arg2)) [add2alias $arg1 $arg2]] blanklist "deathData" resetlist "timestked lastsnipe lasthit" initlist "mapstartalways onKill onReload start_intermission" // Ensure the initialization of various native aliases. // Misc tools. forceclosecon = [if (= $conopen 1) [loop i 2 [toggleconsole]] [if (= $conopen 2) [toggleconsole]]] forcefullcon = [if (&& (= $conopen 0) $altconsize) [loop i 2 [toggleconsole]] [if (!= $conopen 2) [toggleconsole]]] forcealtcon = [if $altconsize [if (= $conopen 0) [toggleconsole] [if (= $conopen 2) [loop i 2 [toggleconsole]]]] [forcefullcon]] // Auto-Sorry srymsgs = [Sorry sorry Sry sry Soz soz Oops oops "My fault, sorry" "Ahh, sorry" "Accident, sorry"] hapemo = ":) (: :> <: :3 :D" sademo = ":( ): :| |: :/ \: :\ /: ._. D: :c :C :s :S" if (! (checkalias sryslp)) [sryslp = 1500] spmsg = 0 addcheck onKill [if (&& (curmodeattr team) (|| $connected (curmodeattr bot))) [if (&& (= $arg1 (player1 cn)) (&& (= (player $arg2 team) (player1 team)) (!= $arg1 $arg2))) [if (! $spmsg) [spmsg = 1; sleep $sryslp [voicecom sorry (concatword (at $srymsgs (rnd (listlen $srymsgs))) "! " (at $sademo (rnd (listlen $sademo)))); spmsg = 0] 1]]]] waskill = [if (&& (= $arg1 (player1 cn)) (&& (!= $arg1 $arg2) (!= (player $arg2 team) (player1 team)))) [result 1] [result 0]] // deathData for storing info about your death. addcheck onKill [if (= $arg2 (player1 cn)) [deathData = (concat $arg1 $arg2 $arg3 $arg4 (millis) (findpn $arg1) (findpn $arg2))]] // You were killed (somehow), store data into "deathData" addcheck onKill [if (= $arg2 (player1 cn)) [if (&& (= (player $arg1 team) (player1 team)) (!= $arg1 $arg2)) [+= timestked 1; sleep 750 [echo (concatword (c 9) (player (at $deathData 0) name) "'s TKs: " (c 5) (player (at $deathData 0) tks))]]]] // You got TK'd addcheck onKill [if (= $arg2 (player1 cn)) [if (= $arg1 (player1 cn)) [+= selfgibs 1]]] // Suicides counter addcheck onKill [if (= $arg2 (player1 cn)) [if (! (listlen $timeBetDeaths)) [timeBetDeaths = (- (millis) $startmillis)] [add2list timeBetDeaths (- (millis) $lastdeath)]]] // Time between deaths list addcheck onKill [if (= $arg2 (player1 cn)) [lastdeath = (millis)]] addcheck onKill [if (= $arg2 (player1 cn)) [if (!= $arg1 $arg2) [updatedata deathdata $arg1]]] // Update deaths list addcheck onKill [if (= $arg2 (player1 cn)) [if $showstatsondeath [updatestats]]] addcheck onKill [if (waskill $arg1 $arg2) [if (= $arg3 0) [+= slashes 1]]] addcheck onKill [if (waskill $arg1 $arg2) [if (&& (= $arg3 5) (= $arg4 1)) [+= headshots 1]]] addcheck onKill [if (waskill $arg1 $arg2) [if (= $arg3 8) [+= gibs 1]]] addcheck onKill [if (waskill $arg1 $arg2) [if (! (listlen $timeBetKills)) [timeBetKills = (- (millis) $startmillis)] [add2list timeBetKills (- (millis) $lastkill)]]] addcheck onKill [if (waskill $arg1 $arg2) [if (= $arg3 (player1 primary)) [+= primarykills 1]]] // Primary weapon kills counter addcheck onKill [if (waskill $arg1 $arg2) [if (|| (= $arg3 1) (= $arg3 9)) [+= secondarykills 1]]] // Secondary weapon(s) kills counter (pistol/akimbo) addcheck onKill [if (waskill $arg1 $arg2) [if (&& (|| (= $arg3 1) (= $arg3 9)) (&& (= (player1 primary) 5) (<= (- (millis) $lastsnipe) $MAXSNIPERCOMBOMILLIS))) [+= spcombos 1]]] // Sniper/Pistol combo counter addcheck onKill [if (waskill $arg1 $arg2) [if (&& (= $arg3 0) (&& (= (player1 primary) 5) (<= (- (millis) $lastsnipe) $MAXSNIPERCOMBOMILLIS))) [+= skcombos 1]]] // Sniper/Knife combo counter addcheck onKill [if (waskill $arg1 $arg2) [if (&& (= $arg3 8) (&& (= (player1 primary) 5) (<= (- (millis) $lastsnipe) $MAXSNIPERCOMBOMILLIS))) [+= sgcombos 1]]] // Sniper/Grenade combo counter addcheck onKill [if (waskill $arg1 $arg2) [lastkill = (millis); updatedata victimdata $arg2]] // Update victim list // Intermission-time-stats updatestats = [ // Dump current stats (check start_intermission below) forcefullcon statsnames = [Flags Frags Deaths Score Ratio Headshots Slashes Gibs Suicides Reloads Teamkills Teamkilled "Average seconds between kills" "Average seconds between deaths" "Most killed enemy" "Killed by the most" "Teamkilled the most" "Sniper/Pistol combos" "Sniper/Knife combos" "Sniper/Grenade combos" "Primary weapon kills" "Secondary weapon kills"] lastGameData = (concat (player1 flags) (player1 frags) (player1 deaths) (player1 points) (divf (player1 frags) (player1 deaths)) $headshots $slashes $gibs $selfgibs $reloads (player1 tks) $timestked (divf (listaverage $timeBetKills) 1000) (divf (listaverage $timeBetDeaths) 1000) (format " 2%1 4--- 9(%2) 5" (findhighest $victimdata) (at $victimdata (+ (findlist $victimdata (findhighest $victimdata)) 1))) (format " 2%1 4--- 9(%2) 5" (findhighest $deathdata) (at $deathdata (+ (findlist $deathdata (findhighest $deathdata)) 1))) (format " 2%1 4--- 9(%2) 5" (at (highestTKS) 0) (at (highestTKS) 1)) $spcombos $skcombos $sgcombos $primarykills $secondarykills) echo (c 9)---------- echo (concatword (c 0) (player1 name) "'s") stats for (c 5) (getmode 1) (curmap 1) loop usl (listlen $statsnames) [ // Start continue statements - skip outputting the stat for various reasons if (&& (= $usl 0) (|| (! (curmodeattr flags)) (! (player1 flags)))) [continue] // No flags or not flag mode? if (&& (= $usl 3) (|| (! $connected) (< (player1 points) 1))) [continue] // No points or not connected? if (= $usl 4) [if (checkrange (player1 deaths) 0 1) [echo (c 1)Ratio: (format " 5%1.0" (player1 frags)); continue]] // Less than 2 deaths? ratio = frags if (|| (&& (= $usl 5) (! $headshots)) (|| (&& (= $usl 6) (! $slashes)) (&& (= $usl 7) (! $gibs)))) [continue] // No headshots, slashes, or gibs? if (&& (= $usl 8) (! $selfgibs)) [continue] // No suicides? if (&& (|| (= $usl 10) (= $usl 11)) (! (curmodeattr team))) [continue] // Not teammode? if (|| (&& (= $usl 12) (< (player1 frags) 1)) (&& (= $usl 13) (! (player1 deaths)))) [continue] // No kills or deaths? Skip averages if (|| (&& (= $usl 14) (strcmp (findhighest $victimdata) N/A)) (|| (&& (= $usl 15) (strcmp (findhighest $deathdata) N/A)) (&& (= $usl 16) (|| (strcmp (highestTKS) N/A) (! (curmodeattr team)))))) [continue] // No kills/deaths? Skip most kills/killed if (|| (&& (= $usl 17) (! $spcombos)) (|| (&& (= $usl 18) (! $skcombos)) (&& (= $usl 19) (! $sgcombos)))) [continue] // No sniper/pistol or sniper/knife combos? if (|| (&& (= $usl 20) (! $primarykills)) (&& (= $usl 21) (! $secondarykills))) [continue] // No primary or secondary weapon kills? // End continue statements echo (format " 1%1: 5%2" (at $statsnames $usl) (at $lastGameData $usl)) ] echo (c 9)---------- ] // Returns the element IMMEDIATELY BEFORE the position of, the highest value in a given list. // For the stats script, this returns the enemy that you killed the most. (e.g. (findhighest $victimdata) // Example output: unarmed) // Example list: "name1 int1 name2 int2 name3 int3 name4 int4 name5 int5" findhighest = [ if (! (listlen $arg1)) [result N/A] [ curhighest = 1 // First number = current highest loop fhl (listlen $arg1) [ if (|| (! (testlist (at $arg1 $fhl))) (= $fhl 1)) [continue] [ // Skip if the element is not a valid number, or is at position 1 (curhighest has it covered). if (>f (at $arg1 $fhl) (at $arg1 $curhighest)) [curhighest = $fhl] // If the next number is higher than the current highest, update curhighest. ] ] -= curhighest 1 // Take one away, we want to return the player's name not the number. result (at $arg1 $curhighest) ] ] // Returns a list of clients that have at least 1 teamkill. findtkclients = [ if (&& (curplayers) (&& (curmodeattr team) (> $numargs 0))) [ blanklist "tkclients" tmparg1 = $arg1 loop ftl (curplayers) [ if (>= (player $ftl tks) $tmparg1) [add2list tkclients (format "%1 %2" (player $ftl name) (player $ftl tks))] ] if (listlen $tkclients) [result $tkclients] [result N/A] ] [result N/A] ] // Returns the players name that has the current highest amount of teamkills and how many teamkills they have. (e.g. echo (highestTKS) // Example output: unarmed 5) highestTKS = [ if (&& (curplayers) (curmodeattr team)) [ resetlist "curHTK" loop htl (curplayers) [ if (> (player $htl tks) (player $curHTK tks)) [curHTK = $htl] ] if (> (player $curHTK tks) 0) [result (format "%1 %2" (player $curHTK name) (player $curHTK tks))] [result N/A] ] [result N/A] ] // Returns 1 if there is more than 1 client of the specified name on the server/in the game/etc, else 0. findDupeName = [ tmpDNC = 0 loop fdl (curplayers) [ if (> $tmpDNC 1) [break] [ if (strcmp (player $fdl name) $arg1) [+= tmpDNC 1] ] ] if (> $tmpDNC 1) [result 1] [result 0] ] // Manages the list of enemies you have killed and how many times you have killed them. updatedata = [ vicp = (findlist (getalias $arg1) (findpn $arg2)) if (> $vicp -1) [ tmpdata = "" loop uvl (listlen (getalias $arg1)) [if (= $uvl (+ $vicp 1)) [add2list tmpdata (+ (at (getalias $arg1) $uvl) 1)] [add2list tmpdata (at (getalias $arg1) $uvl)]] $arg1 = $tmpdata ] [if (! (findDupeName (findpn $arg2))) [add2list $arg1 (concat (findpn $arg2) 1)]] // Don't add clients with duplicate names to the list! The stats would be inaccurate. ] statshots = [showscores 0; sleep 1 [screenshot]; sleep 2 [showscores 1]; sleep 1000 [screenshot]] // Server admin stuff run pwlist // \:D claimadmin = [ if (&& $connected (! (currole))) [ if (> (listlen $pwlist) 0) [ app = (findlist $pwlist (curserver 1)) if (!= $app -1) [ echo (c 0)Claiming admin for server (c 2) (at $pwlist $app) // (c 0)using password (c 2) (at $pwlist (+ $app 1)) setadmin 1 (at $pwlist (+ $app 1)) ] [ app = (findlist $pwlist (format "%1:%2" (curserver 1) (curserver 3))) if (!= $app -1) [ echo (c 0)Claiming admin for server (c 2) (at $pwlist $app) // (c 0)using password (c 2) (at $pwlist (+ $app 1)) setadmin 1 (at $pwlist (+ $app 1)) ] [ tmp_hostname = (curserver 2) app = (findlist $pwlist $tmp_hostname) if (!= $app -1) [ echo (c 0)Claiming admin for server (c 2) (at $pwlist $app) // (c 0)using password (c 2) (at $pwlist (+ $app 1)) setadmin 1 (at $pwlist (+ $app 1)) ] [ app = (findlist $pwlist (format "%1:%2" $tmp_hostname (curserver 3))) if (!= $app -1) [ echo (c 0)Claiming admin for server (c 2) (at $pwlist $app) // (c 0)using password (c 2) (at $pwlist (+ $app 1)) setadmin 1 (at $pwlist (+ $app 1)) ] [echo (c 3)Cannot find an admin password for this server in your configuration!] ] ] ] ] [echo (c 3)Your admin passwords list is empty!] ] [setadmin 0] ] aban = [ if $connected [ tmpvictim = $arg1 if (> $numargs 1) [tmpreason = $arg2] if (! (currole)) claimadmin whois $tmpvictim sleep 250 screenshot sleep 750 [if (> $numargs 1) [ban $tmpvictim $tmpreason] [ban $tmpvictim admin]] sleep 1500 claimadmin ] ] akick = [ if $connected [ tmpvictim = $arg1 if (> $numargs 1) [tmpreason = $arg2] if (! (currole)) claimadmin whois $tmpvictim sleep 250 [if (> $numargs 1) [kick $tmpvictim $tmpreason] [kick $tmpvictim admin]] sleep 1000 claimadmin ] ] aforce = [ if $connected [ tmpvictim = $arg1 if (> $numargs 1) [say (format "Reason: %1" $arg2)] if (! (currole)) claimadmin sleep 250 [forceteam $tmpvictim] sleep 1000 claimadmin ] ] af = [aforce $arg1 "Setting Teams"] // Mapstartalways addcheck mapstartalways [startmillis = (millis); accuracy 0; accuracyreset; forceclosecon] addcheck mapstartalways [blanklist "deathData timeBetDeaths timeBetKills victimdata deathdata oldpstat_weaps"] addcheck mapstartalways [resetlist "timestked gibs headshots lastkill lastdeath reloads slashes lastsnipe spcombos skcombos sgcombos primarykills secondarykills selfgibs"] // How many times you reloaded counter. addcheck onReload [+= reloads 1] // Start intermission addcheck start_intermission [accuracy 1; updatestats; statshots] // MOUSE1 add2bind MOUSE1 [if (&& (= (curweapon) 5) (magcontent 5)) [lastsnipe = (millis)]] addListOnQuit "skcombos selfgibs headshots lastdeath primarykills gibs sgcombos slashes secondarykills timestked reloads spcombos lastkill lastsnipe startmillis statsnames app tkclients tmparg1 curHTK curhighest lastGameData tmpvictim tmpDNC vicp tmpdata victimdata deathdata deathData "