Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if (checkalias atfrags) [] [ // Make stats collecting aliases if they do not already exist.
  2.     curflags = 0
  3.     atflags = 0
  4.     curfrags = 0
  5.     atfrags = 0
  6.     curdeaths = 0
  7.     atdeaths = 0
  8.     curscore = 0
  9.     atscore = 0
  10.     curratio = 0
  11.     atratio = 0
  12.     cursniper = 0 // Weapon shots, damages, etc.
  13.     atsniper = 0
  14.     cursniperdmg = 0
  15.     atsniperdmg = 0
  16.     cursmg = 0
  17.     atsmg = 0
  18.     cursmgdmg = 0
  19.     atsmgdmg = 0
  20.     curshot = 0
  21.     atshot = 0
  22.     curshotdmg = 0
  23.     atshotdmg = 0
  24.     curar = 0
  25.     atar = 0
  26.     curardmg = 0
  27.     atardmg = 0
  28.     curcarb = 0
  29.     atcarb = 0
  30.     curcarbdmg = 0
  31.     atcarbdmg = 0
  32.     curusp = 0
  33.     atusp = 0
  34.     curuspdmg = 0
  35.     atuspdmg = 0
  36.     curnade = 0
  37.     atnade = 0
  38.     curnadedmg = 0
  39.     atnadedmg = 0
  40.     curaki = 0
  41.     ataki = 0
  42.     curakidmg = 0
  43.     atakidmg = 0
  44.     curknife = 0
  45.     atknife = 0
  46.     curknifedmg = 0
  47.     atknifedmg = 0
  48.     clast = 0 // # of times played as CLA.
  49.     rvsfst = 0 // # of times played as RVSF.
  50.     games_played = 0 // Total # of games played.
  51.     tkst = 0 // Teamkills...
  52.     attkst = 0
  53.     htkst = 0
  54.     athtkst = 0
  55.     stkst = 0
  56.     atstkst = 0
  57.     gtkst = 0
  58.     atgtkst = 0
  59.     ktkst = 0
  60.     atktkst = 0
  61.     ftkst = 0
  62.     atftkst = 0
  63.     hsst = 0 // Kills...
  64.     athsst = 0
  65.     knst = 0
  66.     atknst = 0
  67.     spst = 0
  68.     atspst = 0
  69.     gbst = 0
  70.     atgbst = 0
  71.     cfst = 0 // Flags...
  72.     atcfst = 0
  73.     dfst = 0
  74.     atdfst = 0
  75.     hfst = 0
  76.     athfst = 0
  77.     lfst = 0
  78.     atlfst = 0
  79.     kfst = 0
  80.     atkfst = 0
  81.     sfst = 0
  82.     atsfst = 0
  83.     suicides = 0 // Suicides...
  84.     atsuicides = 0
  85. //  cvflag = 0 // Cry... :(
  86. //  atcvflag = 0
  87. //  dfflag = 0
  88. //  atdfflag = 0
  89. //  combo = 0
  90. //  atcombo = 0
  91. //  mcombo = 0
  92. //  atmcombo = 0
  93.     acstart = 0
  94. ]
  95.  
  96.     += acstart 1 // # of times started AC stat, cheap way of doing it I must admit. 8)
  97.  
  98. addcheck_si [+= games_played 1]
  99.  
  100. calc = [ // Function used for gathering and calculating stats.
  101.     curflags = (at (pstat_score (findcn $curname)) 0) // Pull as much stuff from pstat as possible.
  102.     curfrags = (at (pstat_score (findcn $curname)) 1)
  103.     curdeaths = (at (pstat_score (findcn $curname)) 2)
  104.     curscore = (at (pstat_score (findcn $curname)) 3)
  105.     cursniper = (at (pstat_weap (findcn $curname)) 10)
  106.     cursniperdmg = (at (pstat_weap (findcn $curname)) 11)
  107.     cursmg = (at (pstat_weap (findcn $curname)) 8)
  108.     cursmgdmg = (at (pstat_weap (findcn $curname)) 9)
  109.     curar = (at (pstat_weap (findcn $curname)) 12)
  110.     curardmg = (at (pstat_weap (findcn $curname)) 13)
  111.     curshot = (at (pstat_weap (findcn $curname)) 6)
  112.     curshotdmg = (at (pstat_weap (findcn $curname)) 7)
  113.     curcarb = (at (pstat_weap (findcn $curname)) 4)
  114.     curcarbdmg = (at (pstat_weap (findcn $curname)) 5)
  115.     curusp = (at (pstat_weap (findcn $curname)) 2)
  116.     curuspdmg = (at (pstat_weap (findcn $curname)) 3)
  117.     curaki = (at (pstat_weap (findcn $curname)) 18)
  118.     curakidmg = (at (pstat_weap (findcn $curname)) 19)
  119.     curnade = (at (pstat_weap (findcn $curname)) 16)
  120.     curnadedmg = (at (pstat_weap (findcn $curname)) 17)
  121.     curknife = (at (pstat_weap (findcn $curname)) 0)
  122.     curknifedmg = (at (pstat_weap (findcn $curname)) 1)
  123.     curratio = (divf $curfrags $curdeaths) // Calculate ratio.
  124. if (&& (<= $minutesremaining 0) (= $strst 0)) [ // Add current scores to all-time totals during intermission.
  125.         += atfrags $curfrags // Calculate all-time stats.  // TODO: Make it possible to add to these for on-the-fly all-time stats viewing.
  126.         += atdeaths $curdeaths
  127.         += atscore $curscore
  128.         += atflags $curflags
  129.         += atratio $curratio
  130.         += atftkst $ftkst // Frag teamkills.
  131.         += athtkst $htkst // Headshot teamkills.
  132.         += atstkst $stkst // Splatter teamkills.
  133.         += atktkst $ktkst // Knife teamkills.
  134.         += atgtkst $gtkst // Grenade teamkills.
  135.         += attkst $tkst // Total teamkills.
  136.         += atsniper $cursniper // # of shots per weapon...
  137.         += atsmg $cursmg
  138.         += atar $curar
  139.         += atshot $curshot
  140.         += atcarb $curcarb
  141.         += atusp $curusp
  142.         += ataki $curaki
  143.         += atnade $curnade
  144.         += atknife $curknife
  145.         += atsniperdmg $cursniperdmg // Per weapon damage stats...
  146.         += atsmgdmg $cursmgdmg
  147.         += atardmg $curardmg
  148.         += atshotdmg $curshotdmg
  149.         += atcarbdmg $curcarbdmg
  150.         += atuspdmg $curuspdmg
  151.         += atakidmg $curakidmg
  152.         += atnadedmg $curnadedmg
  153.         += atknifedmg $curknifedmg
  154.         += atcfst $cfst // CTF flags.
  155.         += atdfst $dfst // Dropped flags.
  156.         += athfst $hfst // Hunted flags.
  157.         += atkfst $kfst // Kept flags.
  158.         += atlfst $lfst // Lost flags.
  159.         += atsfst $sfst // Stolen flags.
  160.         += atgbst $gbst // Grenade gibs.
  161.         += athsst $hsst // Headshots.
  162.         += atknst $knst // Knife gibs.
  163.         += atspst $spst // Splatters...
  164.         += atsuicides $suicides // Suicides...
  165.         atscoreavg = (divf $curscore $games_played) // Average score.
  166.         atratio = (divf $atfrags $atdeaths) // All-time and/or Average Ratio? FIXME...
  167.     if (= (curmodeattr team) 1) [ // Check if user is in a team mode.
  168.         if (= (curteam) 1) [ // If playing for RVSF, +1 to it's stat.
  169.             += rvsfst 1
  170.         ] [
  171.             += clast 1 // Else they are playing for CLA, +1 to it's stat.
  172.         ]] []
  173.     strst = 1 // In case if this function is called more than once during the intermission, mark this as 1 so the above if statement fails.
  174.     ] []
  175.     if (= $gamemode 0) [ // If statements for holding the curmode acronym for the current round stats menu...
  176.         modest = "TDM"   // Store the acronym in alias "modest".
  177.     ] [
  178.     if (= $gamemode 2) [
  179.         modest = "DM"
  180.     ] [
  181.     if (= $gamemode 4) [
  182.         modest = "TSURV"
  183.     ] [
  184.     if (= $gamemode 3) [
  185.         modest = "SURV"
  186.     ] [
  187.     if (= $gamemode 5) [
  188.         modest = "CTF"
  189.     ] [
  190.     if (= $gamemode 13) [
  191.         modest = "HTF"
  192.     ] [
  193.     if (= $gamemode 15) [
  194.         modest = "KTF"
  195.     ] [
  196.     if (= $gamemode 14) [
  197.         modest = "TKTF"
  198.     ] [
  199.     if (= $gamemode 6) [
  200.         modest = "PF"
  201.     ] [
  202.     if (= $gamemode 9) [
  203.         modest = "LSS"
  204.     ] [
  205.     if (= $gamemode 10) [
  206.         modest = "OSOK"
  207.     ] [
  208.     if (= $gamemode 11) [
  209.         modest = "TOSOK"
  210.     ] [
  211.     if (= $gamemode 7) [
  212.         modest = "BTDM"
  213.     ] [
  214.     if (= $gamemode 8) [
  215.         modest = "BDM"
  216.     ] [
  217.     if (= $gamemode 12) [
  218.         modest = "BOSOK"
  219.     ] [
  220.     if (= $gamemode 1) [
  221.         modest = "COOP"
  222.     ] []]]]]]]]]]]]]]]]
  223. ]
  224.  
  225. clrst = [ // Function used to clear temporary stats holding and script flow aliases on every map start.
  226.     strst = 0
  227.     hsst = 0
  228.     knst = 0
  229.     spst = 0
  230.     gbst = 0
  231.     cfst = 0
  232.     dfst = 0
  233.     lfst = 0
  234.     kfst = 0
  235.     sfst = 0
  236.     tkst = 0
  237.     htkst = 0
  238.     ktkst = 0
  239.     ftkst = 0
  240.     gtkst = 0
  241.     stkst = 0
  242.     suicides = 0
  243. //  cvflag = 0
  244. //  dfflag = 0
  245. //  suicides = 0
  246. //  combo = 0
  247. //  mcombo = 0
  248. ]
  249.  
  250. clrats = [ // Function used to clear all-time statistics "on-the-fly" via user input.
  251.     if (= $arg1 1) [
  252.         atcfst = 0
  253.         atdfst = 0
  254.         athfst = 0
  255.         atkfst = 0
  256.         atlfst = 0
  257.         atsfst = 0
  258.         atfrags = 0
  259.         atdeaths = 0
  260.         atsuicides = 0
  261.         atscore = 0
  262.         atratio = 0
  263.         atgbst = 0
  264.         athsst = 0
  265.         atknst = 0
  266.         atspst = 0
  267.         atftkst = 0
  268.         athtkst = 0
  269.         atstkst = 0
  270.         atktkst = 0
  271.         atgtkst = 0
  272.         attkst = 0
  273.         atsniper = 0
  274.         atsniperdmg = 0
  275.         atsmg = 0
  276.         atsmgdmg = 0
  277.         atar = 0
  278.         atardmg = 0
  279.         atshot = 0
  280.         atshotdmg = 0
  281.         atcarb = 0
  282.         atcarbdmg = 0
  283.         atusp = 0
  284.         atuspdmg = 0
  285.         ataki = 0
  286.         atakidmg = 0
  287.         atnade = 0
  288.         atnadedmg = 0
  289.         atknife = 0
  290.         atknifedmg = 0
  291.         acstart = 0
  292.     ] []
  293. ]
  294.        
  295. stats = [
  296.     calc // Gather and calculate the stats.
  297.     ocsize = $consize
  298.         if (strcmp $arg1 "all") [ // If user entered "all" as the first argument display the all-time stats instead.
  299.             echo ""
  300.             echo All-Time Frags: $atfrags
  301.             echo All-Time Deaths: $atdeaths
  302.             echo All-Time Score: $atscore
  303.         if (< $atdeaths 2) [ // Ratio = # of kills until >= the 2nd death.
  304.             echo All-Time Ratio: (concatword $atfrags .0)
  305.         ] [
  306.             echo All-Time Ratio: $atratio
  307.         ]
  308.             echo CLA: $clast
  309.             echo RVSF: $rvsfst
  310.         ] [ // Else show user the current round stats.
  311.             consize 24
  312.             echo ""
  313.             echo Flags: $curflags
  314.             echo Frags: $curfrags
  315.             echo Deaths: $curdeaths
  316.         if (= $connected 1) [ // Score is only calculated in multiplayer.
  317.             echo Score: $curscore
  318.         ] [
  319.             echo Score: N/A
  320.         ]
  321.         if (< $curdeaths 2) [ // Ratio = # of kills until >= the 2nd death.
  322.             echo Ratio: (concatword $curfrags .0)
  323.         ] [
  324.             echo Ratio: $curratio
  325.         ]
  326.             echo FTK's: $ftkst
  327.             echo HTK's: $htkst
  328.             echo STK's: $htkst
  329.             echo KTK's: $ktkst
  330.             echo GTK's: $gtkst
  331.             echo Total TK's: $tkst
  332.             echo ""
  333.         if (= $connected 1) [ // Weapon damage is only shown in multiplayer, for some reason. :(
  334.             echo Sniper: (concatword $cursniper / $cursniperdmg)
  335.             echo SMG: (concatword $cursmg / $cursmgdmg)
  336.             echo AR: (concatword $curar / $curardmg)
  337.             echo Shotgun: (concatword $curshot / $curshotdmg)
  338.             echo Carbine: (concatword $curcarb / $curcarbdmg)
  339.             echo Pistol: (concatword $curusp / $curuspdmg)
  340.             echo Akimbo: (concatword $curaki / $curakidmg)
  341.             echo Grenade: (concatword $curnade / $curnadedmg)
  342.             echo Knife: (concatword $curknife / $curknifedmg)
  343.             echo ""
  344.             echo Weapon stats are currently shots/damage.
  345.         ] [
  346.             echo Sniper: $cursniper
  347.             echo SMG: $cursmg
  348.             echo AR: $curar
  349.             echo Shotgun: $curshot
  350.             echo Carbine: $curcarb
  351.             echo Pistol: $curusp
  352.             echo Akimbo: $curaki
  353.             echo Grenade: $curnade
  354.             echo Knife: $curknife
  355.             echo ""
  356.             echo Weapon stats for SP are currently # of shots fired.
  357.     sleep 7000 [consize $ocsize]
  358. ]]]
  359.  
  360. get_stats = [ // Function used for gathering stats that pstat_score cannot access.
  361.               // Loops every millisecond and scans the contents of the last line
  362.               // on the console for various events. Therefore, some of the stats
  363.               // collected via this method (the only method ATM) may not be 100%
  364.               // accurate. For instance, double grenade gibs will only count 1,
  365.               // because the events are happening simultaneously and CubeScript
  366.               // currently cannot loop itself quickly enough for it to catch both
  367.               // instances. For this exact same reason, we are unable to count your
  368.               // flag covers, defences, combos, multi combos, etc. while you are
  369.               // using /hudextras... Another project for the devs maybe? :P *hint*
  370.  
  371.     if (= (strstr $conline " 3you fragged teammate") 1) [ // Frags on enemies.
  372.         += tkst 1; += ftkst 1; conline [  ] // +1 to the total teamkill count, and the "frag teamkill" count.
  373.                                             // Clear conline immediately after adding to the stats.
  374.     ] [
  375.     if (= (strstr $conline " 3you headshotted teammate") 1) [ // Headshots on enemies.
  376.         += tkst 1; += htkst 1; conline [  ]
  377.     ] [
  378.     if (= (strstr $conline " 3you splattered teammate") 1) [ // Splatters on enemies.
  379.         += tkst 1; += stkst 1; conline [  ]
  380.     ] [
  381.     if (= (strstr $conline " 3you knifed teammate") 1) [ // Knife gibs on enemies.
  382.         += tkst 1; += ktkst 1; conline [  ]
  383.     ] [
  384.     if (= (strstr $conline " 3you gibbed teammate") 1) [ // Grenade gibs on enemies.
  385.         += tkst 1; += gtkst 1; conline [  ]
  386.     ] [
  387.     if (&& (= (strstr $conline "you headshotted") 1) (= (strstr $conline " 3teammate") 0)) [ // Headshot TK's
  388.         += hsst 1; conline [  ]
  389.     ] [
  390.     if (&& (= (strstr $conline "you knifed") 1) (= (strstr $conline " 3teammate") 0)) [ // Knife Gib TK's
  391.         += knst 1; conline [  ]
  392.     ] [
  393.     if (&& (= (strstr $conline "you splattered") 1) (= (strstr $conline " 3teammate") 0)) [ // Splatter TK's
  394.         += spst 1; conline [  ]
  395.     ] [
  396.     if (&& (= (strstr $conline "you gibbed") 1) (= (strstr $conline " 3teammate") 0)) [ // Grenade Gib TK's
  397.         += gbst 1; conline [  ]
  398.     ] [
  399.     if (= (strcmp $conline " 2you got the enemy flag") 1) [ // Stolen flags.
  400.         += sfst 1; conline [  ]
  401.     ] [
  402.     if (= (strcmp $conline " 2you got the flag") 1) [
  403.         += sfst 1; conline [  ]
  404.     ] [
  405.     if (= (strcmp $conline " 2you dropped the flag") 1) [ // Dropped flags.
  406.         += dfst 1; conline [  ]
  407.     ] [
  408.     if (= (strcmp $conline " 2you lost the flag") 1) [ // Lost flags.
  409.         += lfst 1; conline [  ]
  410.     ] [
  411.     if (= (strstr $conline " 2you have kept the flag for") 1) [ // TKTF/KTF Flags
  412.         += kfst 1; conline [  ]
  413.     ][
  414.     if (&& (= $gamemode 5) (= (strcmp $conline " 2you scored") 1)) [ // CTF Flags
  415.         += cfst 1; conline [  ]
  416.     ] [
  417.     if (&& (= $gamemode 13) (= (strcmp $conline " 2you scored") 1)) [ // HTF Flags
  418.         += hfst 1; conline [  ]
  419.     ] [
  420.     if (= (strcmp $conline " 2you suicided!") 1) [ // Suicides...
  421.         += suicides 1; conline [  ]
  422.     ] [
  423.     ]]]]]]]]]]]]]]]]]
  424.     sleep 1 [get_stats] // The loop...
  425. ]
  426.  
  427. if (strstr $mapstartalways clrst) [] [ // Automate stuff :)
  428.     add2alias mapstartalways [clrst; sleep 3 [get_stats]]
  429.     add2alias start_intermission [stats]
  430. ]
  431.  
  432. // A menu seemed like it would be the easiest and most asthetically pleasing method of displaying the stats...IDK
  433. newmenu "Current Round Statistics" // Current Round Stats Menu
  434. menuinit [(calc)]
  435. menuitemvar [concat (c 4)Here are your stats for $modest (concatword (curmap 1) :)]
  436. menuitem "" -1
  437. menuitemvar [concat (c 0) "        ~Flags~"]
  438. menuitemtextinput " 2Scored: " "result $cfst" // CTF Flags
  439. //menuitemtextinput " 2Covered: " "result $cvflag"
  440. //menuitemtextinput " 2Defended: " "result $dfflag"
  441. menuitemtextinput " 2Dropped: " "result $dfst"
  442. menuitemtextinput " 2Hunted: " "result $hfst" // HTF Flags
  443. menuitemtextinput " 2Kept: " "result $kfst"   // TKTF/KTF Flags
  444. menuitemtextinput " 3Lost: " "result $lfst"
  445. menuitemtextinput " 2Stolen: " "result $sfst" // # of times carrying flag.
  446. menuitem "" -1
  447. menuitemvar [concat (c 3) "        ~Kills~" ]
  448. menuitemtextinput " 2Frags: " "result $curfrags"
  449. menuitemtextinput " 3Deaths: " "result $curdeaths"
  450. menuitemtextinput " 3Suicides: " "result $suicides"
  451. menuitemtextinput " 2Score: " "result $curscore"
  452. //menuitemtextinput " 2Combos: " "result $combo"
  453. //menuitemtextinput " 2Multi-Combos: " "result $mcombo"
  454. menuitemtextinput " 2Ratio: " "result $curratio"
  455. menuitemtextinput " 2Gibs: " "result $gbst"
  456. menuitemtextinput " 2Headshots: " "result $hsst"
  457. menuitemtextinput " 2Knife Gibs: " "result $knst"
  458. menuitemtextinput " 2Splatters: " "result $spst"
  459. menuitemtextinput " 3FTK's: " "result $ftkst"
  460. menuitemtextinput " 3HTK's: " "result $htkst"
  461. menuitemtextinput " 3STK's: " "result $stkst"
  462. menuitemtextinput " 3KTK's: " "result $ktkst"
  463. menuitemtextinput " 3GTK's: " "result $gtkst"
  464. menuitemtextinput " 7Total TK's: " "result $tkst"
  465. menuitem "" -1
  466. menuitemvar [concat (c 1) "      ~Weapons~" ]
  467. menuitemtextinput " 2Sniper: " [(concatword $cursniper / $cursniperdmg)]
  468. menuitemtextinput " 2SMG: " [(concatword $cursmg / $cursmgdmg)]
  469. menuitemtextinput " 2AR: " [(concatword $curar / $curardmg)]
  470. menuitemtextinput " 2Shotgun: " [(concatword $curshot / $curshotdmg)]
  471. menuitemtextinput " 2Carbine: " [(concatword $curcarb / $curcarbdmg)]
  472. menuitemtextinput " 2Pistol: " [(concatword $curusp / $curuspdmg)]
  473. menuitemtextinput " 2Akimbo: " [(concatword $curaki / $curakidmg)]
  474. menuitemtextinput " 2Grenade: " [(concatword $curnade / $curnadedmg)]
  475. menuitemtextinput " 2Knife: " [(concatword $curknife / $curknifedmg)]
  476. menuitem "" -1
  477. menuitemvar [concat (c 4)Weapon stats are currently shots/damage.]
  478.  
  479. newmenu "All-Time Statistics" // All-Time Stats Menu
  480. menuinit [(calc)]
  481. menuitemvar [concat (c 4)Here are your all-time statistics:]
  482. menuitem "" -1
  483. menuitemvar [concat (c 0) "        ~Flags~"]
  484. menuitemtextinput " 2Scored: " "result $atcfst" // CTF Flags
  485. //menuitemtextinput " 2Covered: " "result $atcvflag"
  486. //menuitemtextinput " 2Defended: " "result $atdfflag"
  487. menuitemtextinput " 2Dropped: " "result $atdfst"
  488. menuitemtextinput " 2Hunted: " "result $athfst" // HTF Flags
  489. menuitemtextinput " 2Kept: " "result $atkfst"   // TKTF/KTF Flags
  490. menuitemtextinput " 3Lost: " "result $atlfst"
  491. menuitemtextinput " 2Stolen: " "result $atsfst" // # of times carrying flag.
  492. menuitem "" -1
  493. menuitemvar [concat (c 3) "        ~Kills~" ]
  494. menuitemtextinput " 2Frags: " "result $atfrags"
  495. menuitemtextinput " 3Deaths: " "result $atdeaths"
  496. menuitemtextinput " 3Suicides: " "result $atsuicides"
  497. menuitemtextinput " 2Score: " "result $atscore"
  498. //menuitemtextinput " 2Combos: " "result $atcombo"
  499. //menuitemtextinput " 2Multi-Combos: " "result $atmcombo"
  500. menuitemtextinput " 2Ratio: " "result $atratio"
  501. menuitemtextinput " 2Gibs: " "result $atgbst"
  502. menuitemtextinput " 2Headshots: " "result $athsst"
  503. menuitemtextinput " 2Knife Gibs: " "result $atknst"
  504. menuitemtextinput " 2Splatters: " "result $atspst"
  505. menuitemtextinput " 3FTK's: " "result $atftkst"
  506. menuitemtextinput " 3HTK's: " "result $athtkst"
  507. menuitemtextinput " 3STK's: " "result $atstkst"
  508. menuitemtextinput " 3KTK's: " "result $atktkst"
  509. menuitemtextinput " 3GTK's: " "result $atgtkst"
  510. menuitemtextinput " 7Total TK's: " "result $attkst"
  511. menuitem "" -1
  512. menuitemvar [concat (c 1) "      ~Weapons~" ]
  513. menuitemtextinput " 2Sniper: " [(concatword $atsniper / $atsniperdmg)]
  514. menuitemtextinput " 2SMG: " [(concatword $atsmg / $atsmgdmg)]
  515. menuitemtextinput " 2AR: " [(concatword $atar / $atardmg)]
  516. menuitemtextinput " 2Shotgun: " [(concatword $atshot / $atshotdmg)]
  517. menuitemtextinput " 2Carbine: " [(concatword $atcarb / $atcarbdmg)]
  518. menuitemtextinput " 2Pistol: " [(concatword $atusp / $atuspdmg)]
  519. menuitemtextinput " 2Akimbo: " [(concatword $ataki / $atakidmg)]
  520. menuitemtextinput " 2Grenade: " [(concatword $atnade / $atnadedmg)]
  521. menuitemtextinput " 2Knife: " [(concatword $atknife / $atknifedmg)]
  522. menuitem "" -1
  523. menuitemvar [concat (c 4)Weapon stats are currently shots/damage.]
  524. menuitem "" -1
  525. menuitemvar [concat (c 6) "        ~Other~" ]
  526. menuitemtextinput " 2AC Starts: " "result $acstart"
  527.  
  528. showcurstatsbind = [ // Pre-built current round stats menu viewing alias for easy key binding...
  529.                      // Acts as a "toggle" bind similar to viewing the scoreboard. Press
  530.                      // and hold to view, release to close.
  531.     calc // For accuracy purposes calculate updated statistics before showing the menu.
  532.     showmenu "Current Round Statistics"
  533.     onrelease [closemenu "Current Round Statistics"]
  534. ]
  535.  
  536. showatstatsbind = [ // Pre-built all-time stats menu viewing alias for easy key binding...
  537.                     // Acts as a "toggle" bind similar to viewing the scoreboard. Press
  538.                     // and hold to view, release to close.
  539.     calc // For accuracy purposes calculate updated statistics before showing the menu.
  540.     showmenu "All-Time Statistics"
  541.     onrelease [closemenu "All-Time Statistics"]
  542. ]
  543.  
  544. statsmenu = [ // Command for showing the menus, IDK why people would not want to use the binds. :P
  545.     if (strcmp $arg1 "all") [
  546.         showmenu "All-Time Statistics"
  547.     ] [
  548.         showmenu "Current Round Statistics"
  549.     ]
  550. ]
  551.  
  552. bind BACKQUOTE [showcurstatsbind]
  553. bind EQUALS [showatstatsbind]
  554.  
  555. docsection [MPL] // In-game documentation of the script's various commands.
  556.  
  557. docident [clrst] [MPL: Clears the current round stats.]
  558. docexample [/clrst] []
  559.  
  560. docident [clrats] [MPL: Clears the all-time stats.]
  561. docargument [A] [Clears the values only if this is set to 1.]
  562. docexample [/clrats 1] []
  563.  
  564. docident [stats] [MPL: Prints your current round stats to the console.]
  565. docargument [A] [Prints your all time stats to the console if this is set to "all".]
  566. docexample [/stats] [Prints your current round stats.]
  567. docexample [/stats all] [Prints your all-time stats.]
  568.  
  569. docident [statsmenu] [MPL: Shows your current round stats menu.]
  570. docargument [A] [Shows your all-time stats menu if this is set to "all".]
  571. docexample [/statsmenu] [Shows your current round stats menu.]
  572. docexample [/statsmenu all] [Shows your all-time stats menu.]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement