Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. curfrags = 0 // Make current round stats collecting alises on startup.
  2. curdeaths = 0
  3. curscore = 0
  4. curflags = 0
  5. ftkst = 0
  6. htkst = 0
  7. stkst = 0
  8. ktkst = 0
  9. gtkst = 0
  10. tkst = 0
  11. cursniper = 0
  12. cursmg = 0
  13. curar = 0
  14. curshot = 0
  15. curcarb = 0
  16. curusp = 0
  17. curaki = 0
  18. curnade = 0
  19. curknife = 0
  20. curknifedmg = 0
  21. cursniperdmg = 0
  22. cursmgdmg = 0
  23. curardmg = 0
  24. curshotdmg = 0
  25. curcarbdmg = 0
  26. curuspdmg = 0
  27. curakidmg = 0
  28. curnadedmg = 0
  29. cfst = 0
  30. dfst = 0
  31. hfst = 0
  32. kfst = 0
  33. lfst = 0
  34. sfst = 0
  35. gbst = 0
  36. hsst = 0
  37. knst = 0
  38. spst = 0
  39. suicides = 0
  40. scoped = 0
  41. chksst = 0
  42. curscore = 0
  43.  
  44. addOnQuit [ // Keep saved.cfg as tidy as possible without clearing all-time stats holding alises.
  45.     calc = ""
  46.     clrst = ""
  47.     clrats = ""
  48.     stratvalues = ""
  49.     stats = ""
  50.     get_stats = ""
  51.     rksmsg = ""
  52.     rksmsgs = ""
  53.     conextras = ""
  54.     showcurstatsbind = ""
  55.     showatstatsbind = ""
  56.     statsmenu = ""
  57.     modmenu = ""
  58.     statshot = ""
  59.     autostatshot = ""
  60.     spst = ""
  61.     gbst = ""
  62.     chksst = ""
  63.     hsst = ""
  64.     fratio = ""
  65.     curcarbdmg = ""
  66.     cfst = ""
  67.     curshot = ""
  68.     curusp = ""
  69.     dfst = ""
  70.     curratio = ""
  71.     stkst = ""
  72.     ktkst = ""
  73.     sksmsg = ""
  74.     curar = ""
  75.     htkst = ""
  76.     curfrags = ""
  77.     knst = ""
  78.     curakidmg = ""
  79.     cksst = ""
  80.     cursniperdmg = ""
  81.     curknife = ""
  82.     gtkst = ""
  83.     curshotdmg = ""
  84.     curardmg = ""
  85.     curflags = ""
  86.     curuspdmg = ""
  87.     curscore = ""
  88.     cursniper = ""
  89.     sfst = ""
  90.     cursmg = ""
  91.     scoped = ""
  92.     curaki = ""
  93.     curnade = ""
  94.     ftkst = ""
  95.     curnadedmg = ""
  96.     curcarb = ""
  97.     cursmgdmg = ""
  98.     hfst = ""
  99.     curdeaths = ""
  100.     suicides = ""
  101.     tkst = ""
  102.     lfst = ""
  103. ]
  104.  
  105. if (= (strcmp $altaction_5 " setscope 1; onrelease [ setscope 0 ] ") 1) [ // Add # of times scoped counter to altaction_5...
  106.     altaction_5 = [setscope 1; += scoped 1; onrelease [ setscope 0 ]]
  107. ] []
  108.  
  109. if (checkalias atflags) [] [ // Make all-time stats collecting aliases if they do not already exist.
  110.     atflags = 0
  111.     atfrags = 0
  112.     atdeaths = 0
  113.     atscore = 0
  114.     atratio = 0
  115.     atsniper = 0
  116.     atsniperdmg = 0
  117.     atsmg = 0
  118.     atsmgdmg = 0
  119.     atshot = 0
  120.     atshotdmg = 0
  121.     atar = 0
  122.     atardmg = 0
  123.     atcarb = 0
  124.     atcarbdmg = 0
  125.     atusp = 0
  126.     atuspdmg = 0
  127.     atnade = 0
  128.     atnadedmg = 0
  129.     ataki = 0
  130.     atakidmg = 0
  131.     atknife = 0
  132.     atknifedmg = 0
  133.     clast = 0 // # of times played as CLA.
  134.     rvsfst = 0 // # of times played as RVSF.
  135.     games_played = 0 // Total # of games played.
  136.     attkst = 0
  137.     athtkst = 0
  138.     atstkst = 0
  139.     atgtkst = 0
  140.     atktkst = 0
  141.     atftkst = 0
  142.     athsst = 0
  143.     atknst = 0
  144.     atspst = 0
  145.     atgbst = 0
  146.     atcfst = 0
  147.     atdfst = 0
  148.     athfst = 0
  149.     atlfst = 0
  150.     atkfst = 0
  151.     atsfst = 0
  152.     atsuicides = 0
  153.     gmst = 0
  154.     mpst = 0
  155.     tdmst = 0
  156.     dmst = 0
  157.     tsvst = 0
  158.     svst = 0
  159.     ctfst = 0
  160.     htfst = 0
  161.     ktfst = 0
  162.     tktfst = 0
  163.     pfst = 0
  164.     lssst = 0
  165.     osokst = 0
  166.     tosokst = 0
  167.     btdmst = 0
  168.     bdmst = 0
  169.     bosokst = 0
  170.     coopst = 0
  171.     aqueousst = 0
  172.     arabianst = 0
  173.     arcticst = 0
  174.     aridst = 0
  175.     complexst = 0
  176.     depotst = 0
  177.     desertst = 0
  178.     desert2st = 0
  179.     desert3st = 0
  180.     douzest = 0
  181. //  edificest = 0
  182.     elevationst = 0
  183.     gothicst = 0
  184.     iceroadst = 0
  185. //  industrialst = 0
  186.     ingressst = 0
  187.     kellerst = 0
  188.     minesst = 0
  189.     outpostst = 0
  190.     powerst = 0
  191.     rattrapst = 0
  192.     scaffoldst = 0
  193.     shinest = 0
  194.     snowst = 0
  195.     sunsetst = 0
  196.     toxicst = 0
  197.     urbanst = 0
  198.     werkst = 0
  199.     acstart = 0 // # of AC launches...
  200.     atscoped = 0
  201.     rvsfst = 0 // # of times playing for each team stats.
  202.     clast = 0
  203.     offmpst = 0 // # of times playing official or non-official maps stats.
  204.     cstmpst = 0
  205.     athksst = 0
  206.     ocsize = $consize
  207.     ffast = 0
  208.     botst = 0
  209.     atfratio = "0.0"
  210.     sksmsg = 0
  211.     5ksmsg = " 05x 3kill streak!"
  212.     10ksmsg = " 010x 3kill streak!"
  213.     15ksmsg = " 015x 3kill streak!"
  214.     20ksmsg = " 020x 3kill streak!"
  215.     mplextras = 0
  216.     ggst = 0
  217.     strst = 0
  218.     mplss = 0
  219. ]
  220.  
  221.     += acstart 1 // # of times started AC stat, cheap way of doing it I must admit. 8)
  222.  
  223. // addcheck_si [+= games_played 1]
  224.  
  225. calc = [ // Function used for gathering and calculating stats.
  226.     curflags = (at (pstat_score (findcn $curname)) 0) // Pull as much stuff from pstat as possible.
  227.     curfrags = (at (pstat_score (findcn $curname)) 1)
  228.     curdeaths = (at (pstat_score (findcn $curname)) 2)
  229.     curscore = (at (pstat_score (findcn $curname)) 3)
  230.     cursniper = (at (pstat_weap (findcn $curname)) 10)
  231.     cursniperdmg = (at (pstat_weap (findcn $curname)) 11)
  232.     cursmg = (at (pstat_weap (findcn $curname)) 8)
  233.     cursmgdmg = (at (pstat_weap (findcn $curname)) 9)
  234.     curar = (at (pstat_weap (findcn $curname)) 12)
  235.     curardmg = (at (pstat_weap (findcn $curname)) 13)
  236.     curshot = (at (pstat_weap (findcn $curname)) 6)
  237.     curshotdmg = (at (pstat_weap (findcn $curname)) 7)
  238.     curcarb = (at (pstat_weap (findcn $curname)) 4)
  239.     curcarbdmg = (at (pstat_weap (findcn $curname)) 5)
  240.     curusp = (at (pstat_weap (findcn $curname)) 2)
  241.     curuspdmg = (at (pstat_weap (findcn $curname)) 3)
  242.     curaki = (at (pstat_weap (findcn $curname)) 18)
  243.     curakidmg = (at (pstat_weap (findcn $curname)) 19)
  244.     curnade = (at (pstat_weap (findcn $curname)) 16)
  245.     curnadedmg = (at (pstat_weap (findcn $curname)) 17)
  246.     curknife = (at (pstat_weap (findcn $curname)) 0)
  247.     curknifedmg = (at (pstat_weap (findcn $curname)) 1)
  248.     curratio = (divf $curfrags $curdeaths) // Calculate ratio.
  249.     fratio = (divf $cfst $sfst)
  250.         if (&& (<= $minutesremaining 0) (= $strst 0)) [ // Add current scores to all-time totals during intermission.
  251.             += atfrags $curfrags // Calculate all-time stats.  // TODO: Make it possible to add to these for on-the-fly all-time stats viewing.
  252.             += atdeaths $curdeaths
  253.             += atscore $curscore
  254.             += atflags $curflags
  255.             += atratio $curratio
  256.             += atftkst $ftkst // Frag teamkills.
  257.             += athtkst $htkst // Headshot teamkills.
  258.             += atstkst $stkst // Splatter teamkills.
  259.             += atktkst $ktkst // Knife teamkills.
  260.             += atgtkst $gtkst // Grenade teamkills.
  261.             += attkst $tkst // Total teamkills.
  262.             += atsniper $cursniper // # of shots per weapon...
  263.             += atsmg $cursmg
  264.             += atar $curar
  265.             += atshot $curshot
  266.             += atcarb $curcarb
  267.             += atusp $curusp
  268.             += ataki $curaki
  269.             += atnade $curnade
  270.             += atknife $curknife
  271.             += atsniperdmg $cursniperdmg // Per weapon damage stats...
  272.             += atsmgdmg $cursmgdmg
  273.             += atardmg $curardmg
  274.             += atshotdmg $curshotdmg
  275.             += atcarbdmg $curcarbdmg
  276.             += atuspdmg $curuspdmg
  277.             += atakidmg $curakidmg
  278.             += atnadedmg $curnadedmg
  279.             += atknifedmg $curknifedmg
  280.             += atcfst $cfst // CTF flags.
  281.             += atdfst $dfst // Dropped flags.
  282.             += athfst $hfst // Hunted flags.
  283.             += atkfst $kfst // Kept flags.
  284.             += atlfst $lfst // Lost flags.
  285.             += atsfst $sfst // Stolen flags.
  286.             += atgbst $gbst // Grenade gibs.
  287.             += athsst $hsst // Headshots.
  288.             += atknst $knst // Knife gibs.
  289.             += atspst $spst // Splatters...
  290.             += atsuicides $suicides // Suicides...
  291.             += atscoped $scoped // Scopes...
  292.         if (> $chksst $athksst) [ // Highest ever kill streak...
  293.             athksst = $chksst
  294.         ] []
  295.             atfratio = (divf $atcfst $atsfst)
  296.             atscoreavg = (divf $curscore $games_played) // Average score.
  297.             atratio = (divf $atfrags $atdeaths) // All-time and/or Average Ratio? FIXME...
  298.         if (= $connected 1) [ // "gg" counter, only for online multiplayer rounds... :P
  299.             if (= (strstr (at $conline 0) $curname) 1) [
  300.                 if (|| (= (strcmp (at $conline 1) "gg") 1) (= (strcmp (at $conline 1) "GG") 1)) [
  301.                 += ggst 1; conline [  ]
  302.             ] []] []] []
  303.         if (= (curmodeattr team) 1) [ // Check if user is in a team mode.
  304.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [
  305.                 if (= (curteam) 1) [ // If playing for RVSF, +1 to it's stat.
  306.                     += rvsfst 1
  307.                 ] [
  308.                     += clast 1 // Else they are playing for CLA, +1 to it's stat.
  309.             ]] []] []
  310.         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.
  311.         ] []
  312.     if (= $gamemode 0) [ // If statements for holding the curmode acronym for the current round stats menu...
  313.         modest = "TDM"   // Store the acronym in alias "modest".
  314.                          // Only add to the mode/map counting stats if they are playing online or bot multiplayer...
  315.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += tdmst 1] []] []
  316.     ] [
  317.     if (= $gamemode 2) [
  318.         modest = "DM"
  319.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += dmst 1; += ffast 1] []] []
  320.     ] [
  321.     if (= $gamemode 4) [
  322.         modest = "TSURV"
  323.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += tsvst 1] []] []
  324.     ] [
  325.     if (= $gamemode 3) [
  326.         modest = "SURV"
  327.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += svst 1; += ffast 1] []] []
  328.     ] [
  329.     if (= $gamemode 5) [
  330.         modest = "CTF"
  331.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += ctfst 1] []] []
  332.     ] [
  333.     if (= $gamemode 13) [
  334.         modest = "HTF"
  335.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += htfst 1] []] []
  336.     ] [
  337.     if (= $gamemode 15) [
  338.         modest = "KTF"
  339.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += ktfst 1; += ffast 1] []] []
  340.     ] [
  341.     if (= $gamemode 14) [
  342.         modest = "TKTF"
  343.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += tktfst 1] []] []
  344.     ] [
  345.     if (= $gamemode 6) [
  346.         modest = "PF"
  347.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += pfst 1; += ffast 1] []] []
  348.     ] [
  349.     if (= $gamemode 9) [
  350.         modest = "LSS"
  351.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += lssst 1; += ffast 1] []] []
  352.     ] [
  353.     if (= $gamemode 10) [
  354.         modest = "OSOK"
  355.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += osokst 1; += ffast 1] []] []
  356.     ] [
  357.     if (= $gamemode 11) [
  358.         modest = "TOSOK"
  359.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += tosokst 1] []] []
  360.     ] [
  361.     if (= $gamemode 7) [
  362.         modest = "BTDM"
  363.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += btdmst 1; += botst 1] []] []
  364.     ] [
  365.     if (= $gamemode 8) [
  366.         modest = "BDM"
  367.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += bdmst 1; += ffast 1; += botst 1] []] []
  368.     ] [
  369.     if (= $gamemode 12) [
  370.         modest = "BOSOK"
  371.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += bosokst 1; += ffast 1; += botst 1] []] []
  372.     ] [
  373.     if (= $gamemode 1) [
  374.         modest = "COOP"
  375.         if (= $gmst 0) [if (|| (= $connected 1) (= (curmodeattr bot) 1)) [gmst = 1; += coopst 1] []] []
  376.     ] []]]]]]]]]]]]]]]]
  377.  
  378.     if (= $mpst 0) [
  379.         if (= (strcmp (curmap 1) ac_aqueous) 1) [
  380.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += aqueoussst 1; += offmpst 1] []
  381.         ] [
  382.         if (= (strcmp (curmap 1) ac_arabian) 1) [
  383.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += arabianst 1; += offmpst 1] []
  384.         ] [
  385.         if (= (strcmp (curmap 1) ac_arctic) 1) [
  386.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += arcticst 1; += offmpst 1] []
  387.         ] [
  388.         if (= (strcmp (curmap 1) ac_arid) 1) [
  389.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += aridst 1; += offmpst 1] []
  390.         ] [
  391.         if (= (strcmp (curmap 1) ac_complex) 1) [
  392.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += complexst 1; += offmpst 1] []
  393.         ] [
  394.         if (= (strcmp (curmap 1) ac_depot) 1) [
  395.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += depotst 1; += offmpst 1] []
  396.         ] [
  397.         if (= (strcmp (curmap 1) ac_desert) 1) [
  398.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += desertst 1; += offmpst 1] []
  399.         ] [
  400.         if (= (strcmp (curmap 1) ac_desert2) 1) [
  401.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += desert2st 1; += offmpst 1] []
  402.         ] [
  403.         if (= (strcmp (curmap 1) ac_desert3) 1) [
  404.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += desert3st 1; += offmpst 1] []
  405.         ] [
  406.         if (= (strcmp (curmap 1) ac_douze) 1) [
  407.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += douzest 1; += offmpst 1] []
  408.         ] [
  409.         if (= (strcmp (curmap 1) ac_elevation) 1) [
  410.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += elevationst 1; += offmpst 1] []
  411.         ] [
  412.         if (= (strcmp (curmap 1) ac_gothic) 1) [
  413.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += gothicst 1; += offmpst 1] []
  414.         ] [
  415.         if (= (strcmp (curmap 1) ac_iceroad) 1) [
  416.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += iceroadst 1; += offmpst 1] []
  417.         ] [
  418.         if (= (strcmp (curmap 1) ac_ingress) 1) [
  419.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += ingressst 1; += offmpst 1] []
  420.         ] [
  421.         if (= (strcmp (curmap 1) ac_keller) 1) [
  422.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += kellerst 1; += offmpst 1] []
  423.         ] [
  424.         if (= (strcmp (curmap 1) ac_mines) 1) [
  425.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += minesst 1; += offmpst 1] []
  426.         ] [
  427.         if (= (strcmp (curmap 1) ac_outpost) 1) [
  428.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += outpostst 1; += offmpst 1] []
  429.         ] [
  430.         if (= (strcmp (curmap 1) ac_power) 1) [
  431.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += powerst 1; += offmpst 1] []
  432.         ] [
  433.         if (= (strcmp (curmap 1) ac_rattrap) 1) [
  434.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += rattrapst 1; += offmpst 1] []
  435.         ] [
  436.         if (= (strcmp (curmap 1) ac_scaffold) 1) [
  437.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += scaffoldst 1; += offmpst 1] []
  438.         ] [
  439.         if (= (strcmp (curmap 1) ac_shine) 1) [
  440.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += shinest 1; += offmpst 1] []
  441.         ] [
  442.         if (= (strcmp (curmap 1) ac_snow) 1) [
  443.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += snowst 1; += offmpst 1] []
  444.         ] [
  445.         if (= (strcmp (curmap 1) ac_sunset) 1) [
  446.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += sunsetst 1; += offmpst 1] []
  447.         ] [
  448.         if (= (strcmp (curmap 1) ac_toxic) 1) [
  449.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += toxicst 1; += offmpst 1] []
  450.         ] [
  451.         if (= (strcmp (curmap 1) ac_urban) 1) [
  452.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += urbanst 1; += offmpst 1] []
  453.         ] [
  454.         if (= (strcmp (curmap 1) ac_werk) 1) [
  455.             if (|| (= $connected 1) (= (curmodeattr bot) 1)) [mpst = 1; += werkst 1; += offmpst 1] []
  456.         ] [+= cstmpst 1; mpst = 1]]]]]]]]]]]]]]]]]]]]]]]]]]] []
  457. ]
  458.  
  459. clrst = [ // Function used to clear temporary stats holding and script flow aliases on every map start.
  460.     strst = 0
  461.     hsst = 0
  462.     knst = 0
  463.     spst = 0
  464.     gbst = 0
  465.     cfst = 0
  466.     dfst = 0
  467.     lfst = 0
  468.     kfst = 0
  469.     sfst = 0
  470.     tkst = 0
  471.     htkst = 0
  472.     ktkst = 0
  473.     ftkst = 0
  474.     gtkst = 0
  475.     stkst = 0
  476.     suicides = 0
  477.     scoped = 0
  478.     gmst = 0
  479.     mpst = 0
  480.     cksst = 0
  481.     chksst = 0
  482.     fratio = "0.0"
  483.     curratio = "0.0"
  484.     sksmsg = 0
  485. ]
  486.  
  487. clrats = [ // Function used to clear all-time statistics "on-the-fly" via user input.
  488.     if (= $arg1 1) [
  489.         atcfst = 0
  490.         atdfst = 0
  491.         athfst = 0
  492.         atkfst = 0
  493.         atlfst = 0
  494.         atsfst = 0
  495.         atfrags = 0
  496.         atdeaths = 0
  497.         atsuicides = 0
  498.         atscore = 0
  499.         atratio = 0
  500.         atgbst = 0
  501.         athsst = 0
  502.         atknst = 0
  503.         atspst = 0
  504.         atftkst = 0
  505.         athtkst = 0
  506.         atstkst = 0
  507.         atktkst = 0
  508.         atgtkst = 0
  509.         attkst = 0
  510.         atsniper = 0
  511.         atsniperdmg = 0
  512.         atsmg = 0
  513.         atsmgdmg = 0
  514.         atar = 0
  515.         atardmg = 0
  516.         atshot = 0
  517.         atshotdmg = 0
  518.         atcarb = 0
  519.         atcarbdmg = 0
  520.         atusp = 0
  521.         atuspdmg = 0
  522.         ataki = 0
  523.         atakidmg = 0
  524.         atnade = 0
  525.         atnadedmg = 0
  526.         atknife = 0
  527.         atknifedmg = 0
  528.         acstart = 0
  529.         atscoped = 0
  530.         tdmst = 0
  531.         dmst = 0
  532.         tsvst = 0
  533.         svst = 0
  534.         ctfst = 0
  535.         htfst = 0
  536.         ktfst = 0
  537.         tktfst = 0
  538.         pfst = 0
  539.         lssst = 0
  540.         osokst = 0
  541.         tosokst = 0
  542.         btdmst = 0
  543.         bdmst = 0
  544.         bosokst = 0
  545.         coopst = 0
  546.         aqueousst = 0
  547.         arabianst = 0
  548.         arcticst = 0
  549.         aridst = 0
  550.         complexst = 0
  551.         depotst = 0
  552.         desertst = 0
  553.         desert2st = 0
  554.         desert3st = 0
  555.         douzest = 0
  556. //      edificest = 0
  557.         elevationst = 0
  558.         gothicst = 0
  559.         iceroadst = 0
  560. //      industrialst = 0
  561.         ingressst = 0
  562.         kellerst = 0
  563.         minesst = 0
  564.         outpostst = 0
  565.         powerst = 0
  566.         rattrapst = 0
  567.         scaffoldst = 0
  568.         shinest = 0
  569.         snowst = 0
  570.         sunsetst = 0
  571.         toxicst = 0
  572.         urbanst = 0
  573.         werkst = 0
  574.         rvsfst = 0
  575.         clast = 0
  576.         cstmpst = 0
  577.         offmpst = 0
  578.         athksst = 0
  579.         ffast = 0
  580.         botst = 0
  581.         atfratio = "0.0"
  582.         atratio = "0.0"
  583.         ggst = 0
  584.     ] []
  585. ]
  586.  
  587. stratvalues = [ // Function used for storing current round statistics to the all-time statistics if a proper
  588.                 // intermission was not given (i.e. admin forces new map) before clearing stats for the next round.
  589.     if (= $arg1 1) [
  590.         += atfrags $curfrags // Calculate all-time stats.  // TODO: Make it possible to add to these for on-the-fly all-time stats viewing.
  591.         += atdeaths $curdeaths
  592.         += atscore $curscore
  593.         += atflags $curflags
  594. //      += atratio $curratio
  595.         += atftkst $ftkst // Frag teamkills.
  596.         += athtkst $htkst // Headshot teamkills.
  597.         += atstkst $stkst // Splatter teamkills.
  598.         += atktkst $ktkst // Knife teamkills.
  599.         += atgtkst $gtkst // Grenade teamkills.
  600.         += attkst $tkst // Total teamkills.
  601.         += atsniper $cursniper // # of shots per weapon...
  602.         += atsmg $cursmg
  603.         += atar $curar
  604.         += atshot $curshot
  605.         += atcarb $curcarb
  606.         += atusp $curusp
  607.         += ataki $curaki
  608.         += atnade $curnade
  609.         += atknife $curknife
  610.         += atsniperdmg $cursniperdmg // Per weapon damage stats...
  611.         += atsmgdmg $cursmgdmg
  612.         += atardmg $curardmg
  613.         += atshotdmg $curshotdmg
  614.         += atcarbdmg $curcarbdmg
  615.         += atuspdmg $curuspdmg
  616.         += atakidmg $curakidmg
  617.         += atnadedmg $curnadedmg
  618.         += atknifedmg $curknifedmg
  619.         += atcfst $cfst // CTF flags.
  620.         += atdfst $dfst // Dropped flags.
  621.         += athfst $hfst // Hunted flags.
  622.         += atkfst $kfst // Kept flags.
  623.         += atlfst $lfst // Lost flags.
  624.         += atsfst $sfst // Stolen flags.
  625.         += atgbst $gbst // Grenade gibs.
  626.         += athsst $hsst // Headshots.
  627.         += atknst $knst // Knife gibs.
  628.         += atspst $spst // Splatters...
  629.         += atsuicides $suicides // Suicides...
  630.         += atscoped $scoped // Scopes...
  631.         if (> $chksst $athksst) [ // Highest ever kill streak...
  632.             athksst = $chksst
  633.         ] []
  634.         atscoreavg = (divf $curscore $games_played) // Average score.
  635.         atratio = (divf $atfrags $atdeaths) // All-time and/or Average Ratio? FIXME...
  636.     ] []
  637. ]
  638.        
  639. stats = [
  640.     calc // Gather and calculate the stats.
  641.     ocsize = $consize
  642.     consize 100
  643.         if (strcmp $arg1 "all") [ // If user entered "all" as the first argument display the all-time stats instead.
  644.             echo ""
  645.             echo (c 0)Here are your all-time statistics:
  646.             echo ""
  647.             echo (c 2)Scored: (c 5) $atcfst
  648.             echo (c 2)Dropped: (c 5) $atdfst
  649.             echo (c 2)Hunted: (c 5) $athfst
  650.             echo (c 2)Kept: (c 5) $atkfst
  651.             echo (c 2)Stolen: (c 5) $atsfst
  652.             echo (c 2)Flag Ratio: (c 5) $atfratio
  653.             echo ""
  654.             echo (c 2)Frags: (c 5) $atfrags
  655.             echo (c 2)Deaths: (c 5) $atdeaths
  656.             echo (c 2)Suicides: (c 5) $atsuicides
  657.             echo (c 2)Score: (c 5) $atscore
  658.         if (< $atdeaths 2) [ // Ratio = # of kills until >= the 2nd death.
  659.             echo (c 2)Ratio: (c 5) (concatword $atfrags .0)
  660.         ] [
  661.             echo (c 2)Ratio: (c 5) $atratio
  662.         ]
  663.             echo (c 2)Gibs: (c 5) $atgbst
  664.             echo (c 2)Headshots: (c 5) $athsst
  665.             echo (c 2)Knife Gibs: (c 5) $atknst
  666.             echo (c 2)Splatters: (c 5) $atspst
  667.             echo (c 2)Highest KS: (c 5) $athksst
  668.             echo (c 2)FTK's: (c 5) $atftkst
  669.             echo (c 2)HTK's: (c 5) $athtkst
  670.             echo (c 2)STK's: (c 5) $atstkst
  671.             echo (c 2)KTK's: (c 5) $atktkst
  672.             echo (c 2)GTK's: (c 5) $atgtkst
  673.             echo (c 2)Total TK's: (c 5) $attkst
  674.             echo ""
  675.             echo (c 2)Sniper: (c 5) (concatword $atsniper / $atsniperdmg)
  676.             echo (c 2)SMG: (c 5) (concatword $atsmg / $atsmgdmg)
  677.             echo (c 2)AR: (c 5) (concatword $atar / $atardmg)
  678.             echo (c 2)Shotgun: (c 5) (concatword $atshot / $atshotdmg)
  679.             echo (c 2)Carbine: (c 5) (concatword $atcarb / $atcarbdmg)
  680.             echo (c 2)Pistol: (c 5) (concatword $atusp / $atuspdmg)
  681.             echo (c 2)Akimbo: (c 5) (concatword $ataki / $atakidmg)
  682.             echo (c 2)Grenade: (c 5) (concatword $atnade / $atnadedmg)
  683.             echo (c 2)Knife: (c 5) (concatword $atknife / $atknifedmg)
  684.             echo (c 2)Scopes: (c 5) $atscoped
  685.             echo ""
  686.             echo (c 2)TDM: (c 5) $tdmst
  687.             echo (c 2)DM: (c 5) $dmst
  688.             echo (c 2)TSURV: (c 5) $tsvst
  689.             echo (c 2)SURV: (c 5) $svst
  690.             echo (c 2)CTF: (c 5) $ctfst
  691.             echo (c 2)HTF: (c 5) $htfst
  692.             echo (c 2)TKTF: (c 5) $tktfst
  693.             echo (c 2)KTF: (c 5) $ktfst
  694.             echo (c 2)PF: (c 5) $pfst
  695.             echo (c 2)LSS: (c 5) $lssst
  696.             echo (c 2)TOSOK: (c 5) $tosokst
  697.             echo (c 2)OSOK: (c 5) $osokst
  698.             echo (c 2)BTDM: (c 5) $btdmst
  699.             echo (c 2)BDM: (c 5) $bdmst
  700.             echo (c 2)BOSOK: (c 5) $bosokst
  701.             echo (c 2)COOP: (c 5) $coopst
  702.             echo ""
  703.             echo (c 2)ac_aqueous: (c 5) $aqueousst
  704.             echo (c 2)ac_arabian: (c 5) $arabianst
  705.             echo (c 2)ac_arctic: (c 5) $arcticst
  706.             echo (c 2)ac_arid: (c 5) $aridst
  707.             echo (c 2)ac_complex: (c 5) $complexst
  708.             echo (c 2)ac_depot: (c 5) $depotst
  709.             echo (c 2)ac_desert: (c 5) $desertst
  710.             echo (c 2)ac_desert2: (c 5) $desert2st
  711.             echo (c 2)ac_desert3: (c 5) $desert3st
  712.             echo (c 2)ac_douze: (c 5) $douzest
  713.             echo (c 2)ac_elevation: (c 5) $elevationst
  714.             echo (c 2)ac_gothic: (c 5) $gothicst
  715.             echo (c 2)ac_iceroad: (c 5) $iceroadst
  716.             echo (c 2)ac_ingress: (c 5) $ingressst
  717.             echo (c 2)ac_keller: (c 5) $kellerst
  718.             echo (c 2)ac_mines: (c 5) $minesst
  719.             echo (c 2)ac_outpost: (c 5) $outpostst
  720.             echo (c 2)ac_power: (c 5) $powerst
  721.             echo (c 2)ac_rattrap: (c 5) $rattrapst
  722.             echo (c 2)ac_scaffold: (c 5) $scaffoldst
  723.             echo (c 2)ac_shine: (c 5) $shinest
  724.             echo (c 2)ac_snow: (c 5) $snowst
  725.             echo (c 2)ac_sunset: (c 5) $sunsetst
  726.             echo (c 2)ac_toxic: (c 5) $toxicst
  727.             echo (c 2)ac_urban: (c 5) $urbanst
  728.             echo (c 2)ac_werk: (c 5) $werkst
  729.             echo (c 2)Offical: (c 5) $offmpst
  730.             echo (c 2)Custom: (c 5) $cstmpst
  731.             echo ""
  732.             echo (c 2)AC Starts: (c 5) $acstart
  733.             echo (c 2)CLA: (c 5) $clast
  734.             echo (c 2)RVSF: (c 5) $rvsfst
  735.             echo (c 2)FFA: (c 5) $ffast
  736.             echo (c 2)Bot: (c 5) $botst
  737.             echo (c 2)GG: (c 5) $ggst
  738.         ] [ // Else show user the current round stats.
  739.             consize 100
  740.             echo ""
  741.             echo (c 0)Here are your current round statistics:
  742.             echo ""
  743.             echo (c 2)Scored: (c 5) $cfst
  744.             echo (c 2)Dropped: (c 5) $dfst
  745.             echo (c 2)Hunted: (c 5) $hfst
  746.             echo (c 2)Kept: (c 5) $kfst
  747.             echo (c 2)Lost: (c 5) $lfst
  748.             echo (c 2)Stolen: (c 5) $sfst
  749.             echo (c 2)Flag Ratio: (c 5) $fratio
  750.             echo ""
  751.             echo (c 2)Frags: (c 5) $curfrags
  752.             echo (c 2)Deaths: (c 5) $curdeaths
  753.             echo (c 2)Suicides: (c 5) $suicides
  754.         if (= $connected 1) [ // Score is only calculated in multiplayer.
  755.             echo (c 2)Score: (c 5) $curscore
  756.         ] [
  757.             echo (c 2)Score: (c 5) N/A
  758.         ]
  759.         if (< $curdeaths 2) [ // Ratio = # of kills until >= the 2nd death.
  760.             echo (c 2)Ratio: (c 5) (concatword $curfrags .0)
  761.         ] [
  762.             echo (c 2)Ratio: (c 5) $curratio
  763.         ]
  764.             echo (c 2)Gibs: (c 5) $gbst
  765.             echo (c 2)Headshots: (c 5) $hsst
  766.             echo (c 2)Knife Gibs: (c 5) $knst
  767.             echo (c 2)Splatters: (c 5) $spst
  768.             echo (c 2)Current KS: (c 5) $cksst
  769.             echo (c 2)Highest KS: (c 5) $chksst
  770.             echo (c 2)FTK's: (c 5) $ftkst
  771.             echo (c 2)HTK's: (c 5) $htkst
  772.             echo (c 2)STK's: (c 5) $htkst
  773.             echo (c 2)KTK's: (c 5) $ktkst
  774.             echo (c 2)GTK's: (c 5) $gtkst
  775.             echo (c 2)Total TK's: (c 5) $tkst
  776.             echo ""
  777.         if (= $connected 1) [ // Weapon damage is only shown in multiplayer, for some reason. :(
  778.             echo (c 2)Sniper: (c 5) (concatword $cursniper / $cursniperdmg)
  779.             echo (c 2)SMG: (c 5) (concatword $cursmg / $cursmgdmg)
  780.             echo (c 2)AR: (c 5) (concatword $curar / $curardmg)
  781.             echo (c 2)Shotgun: (c 5) (concatword $curshot / $curshotdmg)
  782.             echo (c 2)Carbine: (c 5) (concatword $curcarb / $curcarbdmg)
  783.             echo (c 2)Pistol: (c 5) (concatword $curusp / $curuspdmg)
  784.             echo (c 2)Akimbo: (c 5) (concatword $curaki / $curakidmg)
  785.             echo (c 2)Grenade: (c 5) (concatword $curnade / $curnadedmg)
  786.             echo (c 2)Knife: (c 5) (concatword $curknife / $curknifedmg)
  787.             echo (c 2)Scopes: (c 5) $scoped
  788.             echo ""
  789.             echo (c 4)Weapon stats are currently shots/damage.
  790.         ] [
  791.             echo (c 2)Sniper: (c 5) $cursniper
  792.             echo (c 2)SMG: (c 5) $cursmg
  793.             echo (c 2)AR: (c 5) $curar
  794.             echo (c 2)Shotgun: (c 5) $curshot
  795.             echo (c 2)Carbine: (c 5) $curcarb
  796.             echo (c 2)Pistol: (c 5) $curusp
  797.             echo (c 2)Akimbo: (c 5) $curaki
  798.             echo (c 2)Grenade: (c 5) $curnade
  799.             echo (c 2)Knife: (c 5) $curknife
  800.             echo (c 2)Scopes: (c 5) $scoped
  801.             echo ""
  802.             echo (c 4)Weapon stats for SP are currently # of shots fired.
  803.         ]]
  804.     sleep 500 [consize $ocsize]
  805. ]
  806.  
  807. get_stats = [ // Function used for gathering stats that pstat_score cannot access.
  808.               // Loops every millisecond and scans the contents of the last line
  809.               // on the console for various events. Therefore, some of the stats
  810.               // collected via this method (the only method ATM) may not be 100%
  811.               // accurate. For instance, double grenade gibs will only count 1,
  812.               // because the events are happening simultaneously and CubeScript
  813.               // currently cannot loop itself quickly enough for it to catch both
  814.               // instances. For this exact same reason, we are unable to count your
  815.               // flag covers, defences, combos, multi combos, etc. while you are
  816.               // using /hudextras... Another project for the devs maybe? :P *hint*
  817.  
  818.     if (= (strstr $conline " 3you fragged teammate") 1) [ // Frag teamkills.
  819.         += tkst 1; += ftkst 1; conline [  ] // +1 to the total teamkill count, and the "frag teamkill" count.
  820.                                             // Clear conline immediately after adding to the stats.
  821.     ] [
  822.     if (= (strstr $conline " 3you headshot teammate") 1) [ // Headshot teamkills.
  823.         += tkst 1; += htkst 1; conline [  ]
  824.     ] [
  825.     if (= (strstr $conline " 3you splattered teammate") 1) [ // Splatter teamkills.
  826.         += tkst 1; += stkst 1; conline [  ]
  827.     ] [
  828.     if (= (strstr $conline " 3you slashed teammate") 1) [ // Knife teamkills.
  829.         += tkst 1; += ktkst 1; conline [  ]
  830.     ] [
  831.     if (= (strstr $conline " 3you gibbed teammate") 1) [ // Grenade teamkills.
  832.         += tkst 1; += gtkst 1; conline [  ]
  833.     ] [
  834.     if (&& (= (strstr $conline "you fragged") 1) (= (strstr $conline " 3teammate") 0)) [ // Used for kill streaks...
  835.         += cksst 1; conline [  ]
  836.     ] [
  837.     if (&& (= (strstr $conline "you headshot") 1) (= (strstr $conline " 3teammate") 0)) [ // Headshots...
  838.         += hsst 1; += cksst 1; conline [  ]
  839.     ] [
  840.     if (&& (= (strstr $conline "you slashed") 1) (= (strstr $conline " 3teammate") 0)) [ // Knife gibs.
  841.         += knst 1; += cksst 1; conline [  ]
  842.     ] [
  843.     if (&& (= (strstr $conline "you splattered") 1) (= (strstr $conline " 3teammate") 0)) [ // Splatters...
  844.         += spst 1; += cksst 1; conline [  ]
  845.     ] [
  846.     if (&& (= (strstr $conline "you gibbed") 1) (= (strstr $conline " 3teammate") 0)) [ // Grenade gibs.
  847.         += gbst 1; += cksst 1; conline [  ]
  848.     ] [
  849.     if (&& (= (strcmp (at $conline 0) " 2you") 1) (= (strstr $conline "were fragged by") 1)) [ // Used to reset kill streaks...
  850.         cksst = 0; sksmsg = 0; conline [  ]
  851.     ] [
  852.     if (&& (= (strcmp (at $conline 0) " 2you") 1) (= (strstr $conline "were headshot by") 1)) [
  853.         cksst = 0; sksmsg = 0; conline [  ]
  854.     ] [
  855.     if (&& (= (strcmp (at $conline 0) " 2you") 1) (= (strstr $conline "were slashed by") 1)) [
  856.         cksst = 0; sksmsg = 0; conline [  ]
  857.     ] [
  858.     if (&& (= (strcmp (at $conline 0) " 2you") 1) (= (strstr $conline "were splattered by") 1)) [
  859.         cksst = 0; sksmsg = 0; conline [  ]
  860.     ] [
  861.     if (&& (= (strcmp (at $conline 0) " 2you") 1) (= (strstr $conline "were gibbed by") 1)) [
  862.         cksst = 0; sksmsg = 0; conline [  ]
  863.     ] [
  864.     if (= (strcmp $conline " 2you have the enemy flag") 1) [ // Stolen flags.
  865.         += sfst 1; conline [  ]
  866.     ] [
  867.     if (= (strcmp $conline " 2you have the flag") 1) [
  868.         += sfst 1; conline [  ]
  869.     ] [
  870.     if (= (strcmp $conline " 2you dropped the flag") 1) [ // Dropped flags.
  871.         += dfst 1; conline [  ]
  872.     ] [
  873.     if (= (strcmp $conline " 2you lost the flag") 1) [ // Lost flags.
  874.         += lfst 1; conline [  ]
  875.     ] [
  876.     if (= (strstr $conline " 2you have kept the flag for") 1) [ // TKTF/KTF Flags
  877.         += kfst 1; conline [  ]
  878.     ][
  879.     if (&& (= $gamemode 5) (= (strcmp $conline " 2you scored") 1)) [ // CTF Flags
  880.         += cfst 1; conline [  ]
  881.     ] [
  882.     if (&& (= $gamemode 13) (= (strcmp $conline " 2you scored") 1)) [ // HTF Flags
  883.         += hfst 1; conline [  ]
  884.     ] [
  885.     if (= (strcmp $conline " 2you suicided!") 1) [ // Suicides...
  886.         += suicides 1; cksst = 0; sksmsg = 0; conline [  ]
  887.     ] [
  888.     ]]]]]]]]]]]]]]]]]]]]]]]
  889.    
  890.     if (> $cksst $chksst) [ // Current round highest kill streak...
  891.         chksst = $cksst
  892.     ] []
  893.     if (= $mplextras 1) [ // Extra console kill streak messages.
  894.         if (&& (= $cksst 5) (= $sksmsg 0)) [
  895.             echo $5ksmsg; sksmsg = 1; rksmsg
  896.         ] [
  897.         if (&& (= $cksst 10) (= $sksmsg 0)) [
  898.             echo $10ksmsg; sksmsg = 1; rksmsg
  899.         ] [
  900.         if (&& (= $cksst 15) (= $sksmsg 0)) [
  901.             echo $15ksmsg; sksmsg = 1; rksmsg
  902.         ] [
  903.         if (&& (= $cksst 20) (= $sksmsg 0)) [
  904.             echo $20ksmsg; sksmsg = 1; rksmsg
  905.         ] []]]]] []
  906.     sleep 1 [get_stats] // The loop...
  907. ]
  908.  
  909. rksmsg = [ // Reset the kill streak messages anti-spam measure... :p
  910.     sleep 20000 [sksmsg = 0]
  911. ]
  912.  
  913. rksmsgs = [ // Used by the mod menu to reset kill streak messages to defaults.
  914.     5ksmsg = " 05x 3kill streak!"
  915.     10ksmsg = " 010x 3kill streak!"
  916.     15ksmsg = " 015x 3kill streak!"
  917.     20ksmsg = " 020x 3kill streak!"
  918.         closemenu "MPL Mod"
  919.         sleep 1 [showmenu "MPL Mod"]
  920. ]
  921.  
  922. conextras = [ // Used for allowing players to easily enable/disable the extra kill streak messages.
  923.     if (= $arg1 1) [
  924.         mplextras = 1
  925.         echo (c 1)MPL: (c 4)Extra console messages (c 0)enabled! (c 4)Use /conextras 0 to disable.
  926.     ] [
  927.         mplextras = 0
  928.         echo (c 1)MPL: (c 4)Extra console messages (c 3)disabled! (c 4)Use /conextras 1 to enable.
  929.     ]
  930. ]
  931.  
  932. if (strstr $mapstartalways clrst) [] [ // Automate stuff :)
  933.     add2alias mapstartalways [consize $ocsize; sleep 5 [if (= $strst 0) [stratvalues 1] []]; sleep 10 [clrst]; sleep 15 [get_stats]]
  934.     add2alias start_intermission [stats; if (= $mplss 1) [sleep 100 [statshot]] []]
  935. ]
  936.  
  937. statshot = [ // Function used for taking screenshots of the stats menus automatically.
  938.     syear = (at (timestamp) 0)
  939.     smonth = (at (timestamp) 1)
  940.     sday = (at (timestamp) 2)
  941.     shour = (at (timestamp) 3)
  942.     sminute = (at (timestamp) 4)
  943.     ssecond = (at (timestamp) 5)
  944.     if (= $screenshottype 0) [screenext = ".bmp"] []
  945.     if (= $screenshottype 1) [screenext = ".jpg"] []
  946.     if (= $screenshottype 2) [screenext = ".png"] []
  947.     if (strcmp $arg1 "all") [
  948.         showmenu "All-Time Statistics"
  949.         sleep 1 [screenshot (concatword "screenshots/MPL_All-Time_Stats_Shot_" $syear $smonth $sday _ $shour . $sminute . $ssecond _ (curmap 1) _ $modest $screenext)]
  950.         sleep 2 [closemenu "All-Time Statistics"]
  951.         sleep 3 [echo Statshot was sucessfully executed!]
  952.     ] [
  953.         showmenu "Current Round Statistics"
  954.         sleep 1 [screenshot (concatword "screenshots/MPL_Stats_Shot_" $syear $smonth $day _ $shour . $sminute . $ssecond _ (curmap 1) _ $modest $screenext)]
  955.         sleep 2 [closemenu "Current Round Statistics"]
  956.         sleep 3 [echo Statshot was sucessfully executed!]
  957.     ]
  958. ]
  959.  
  960. autostatshot = [ // Function used for enabling/disabling automatic stats screenshots during intermissions.
  961.     if (= $arg1 1) [
  962.         mplss = 1
  963.         echo (c 1)MPL: (c 4)Automatic stats screenshots (c 3)enabled! (c 4)Use /autostatshot 0 to disable.
  964.     ] [
  965.         mplss = 0
  966.         echo (c 1)MPL: (c 4)Automatic stats screenshots (c 3)disabled! (c 4)Use /autostatshot 1 to enable.
  967.     ]
  968. ]
  969.  
  970. // Mod menu for easily customizing the extra kill streak messages.
  971. newmenu "MPL Mod"
  972. menuinit [echo (c 1)MPL: (c 5)This menu allows you to easily modify the various kill streak messages while using (c 0)/conextras 1.]
  973. menuitemtextinput " 25x Kill Streak: " "result $5ksmsg" "5ksmsg = $arg1"
  974. menuitemtextinput " 210x Kill Streak: " "result $10ksmsg" "10ksmsg = $arg1"
  975. menuitemtextinput " 215x Kill Streak: " "result $15ksmsg" "15ksmsg = $arg1"
  976. menuitemtextinput " 220x Kill Streak: " "result $20ksmsg" "20ksmsg = $arg1"
  977. menuitem "" -1
  978. menuitemcheckbox " 3Reset to defaults: " "" "rksmsgs"
  979. menuitem "                   0OK" [ closemenu "MPL Mod" ]
  980.  
  981. // A menu seemed like it would be the easiest and most asthetically pleasing method of displaying the stats...IDK
  982. newmenu "Current Round Statistics" // Current Round Stats Menu
  983. menuinit [(calc)]
  984. menuitemvar [concat (c 4)Here are your stats for $modest (concatword (curmap 1) :)]
  985. menuitem "" -1
  986. menuitemvar [concat (c 0) "        ~Flags~"]
  987. menuitemtextinput " 2Scored: " "result $cfst" // CTF Flags
  988. menuitemtextinput " 2Dropped: " "result $dfst"
  989. menuitemtextinput " 2Hunted: " "result $hfst" // HTF Flags
  990. menuitemtextinput " 2Kept: " "result $kfst"   // TKTF/KTF Flags
  991. menuitemtextinput " 3Lost: " "result $lfst"
  992. menuitemtextinput " 2Stolen: " "result $sfst" // # of times carrying flag.
  993. menuitemtextinput " 2Flag Ratio: " "result $fratio"
  994. menuitem "" -1
  995. menuitemvar [concat (c 3) "        ~Kills~" ]
  996. menuitemtextinput " 2Frags: " "result $curfrags"
  997. menuitemtextinput " 3Deaths: " "result $curdeaths"
  998. menuitemtextinput " 3Suicides: " "result $suicides"
  999. menuitemtextinput " 2Score: " "result $curscore"
  1000. menuitemtextinput " 2Ratio: " "result $curratio"
  1001. menuitemtextinput " 2Gibs: " "result $gbst"
  1002. menuitemtextinput " 2Headshots: " "result $hsst"
  1003. menuitemtextinput " 2Knife Gibs: " "result $knst"
  1004. menuitemtextinput " 2Splatters: " "result $spst"
  1005. menuitemtextinput " 2Current KS: " "result $cksst"
  1006. menuitemtextinput " 2Highest KS: " "result $chksst"
  1007. menuitemtextinput " 3FTK's: " "result $ftkst"
  1008. menuitemtextinput " 3HTK's: " "result $htkst"
  1009. menuitemtextinput " 3STK's: " "result $stkst"
  1010. menuitemtextinput " 3KTK's: " "result $ktkst"
  1011. menuitemtextinput " 3GTK's: " "result $gtkst"
  1012. menuitemtextinput " 7Total TK's: " "result $tkst"
  1013. menuitem "" -1
  1014. menuitemvar [concat (c 1) "      ~Weapons~" ]
  1015. menuitemtextinput " 2Sniper: " [(concatword $cursniper / $cursniperdmg)]
  1016. menuitemtextinput " 2SMG: " [(concatword $cursmg / $cursmgdmg)]
  1017. menuitemtextinput " 2AR: " [(concatword $curar / $curardmg)]
  1018. menuitemtextinput " 2Shotgun: " [(concatword $curshot / $curshotdmg)]
  1019. menuitemtextinput " 2Carbine: " [(concatword $curcarb / $curcarbdmg)]
  1020. menuitemtextinput " 2Pistol: " [(concatword $curusp / $curuspdmg)]
  1021. menuitemtextinput " 2Akimbo: " [(concatword $curaki / $curakidmg)]
  1022. menuitemtextinput " 2Grenade: " [(concatword $curnade / $curnadedmg)]
  1023. menuitemtextinput " 2Knife: " [(concatword $curknife / $curknifedmg)]
  1024. menuitemtextinput " 2Scopes: " "result $scoped"
  1025. menuitem "" -1
  1026. menuitemvar [concat (c 4)Weapon stats are currently shots/damage.]
  1027.  
  1028. newmenu "All-Time Statistics" // All-Time Stats Menu
  1029. menuinit [(calc)]
  1030. menuitemvar [concat (c 4)Here are your all-time statistics:]
  1031. menuitem "" -1
  1032. menuitemvar [concat (c 0) "        ~Flags~"]
  1033. menuitemtextinput " 2Scored: " "result $atcfst" // CTF Flags
  1034. menuitemtextinput " 2Dropped: " "result $atdfst"
  1035. menuitemtextinput " 2Hunted: " "result $athfst" // HTF Flags
  1036. menuitemtextinput " 2Kept: " "result $atkfst"   // TKTF/KTF Flags
  1037. menuitemtextinput " 3Lost: " "result $atlfst"
  1038. menuitemtextinput " 2Stolen: " "result $atsfst" // # of times carrying flag.
  1039. menuitemtextinput " 2Flag Ratio: " "result $atfratio"
  1040. menuitem "" -1
  1041. menuitemvar [concat (c 3) "        ~Kills~" ]
  1042. menuitemtextinput " 2Frags: " "result $atfrags"
  1043. menuitemtextinput " 3Deaths: " "result $atdeaths"
  1044. menuitemtextinput " 3Suicides: " "result $atsuicides"
  1045. menuitemtextinput " 2Score: " "result $atscore"
  1046. menuitemtextinput " 2Ratio: " "result $atratio"
  1047. menuitemtextinput " 2Gibs: " "result $atgbst"
  1048. menuitemtextinput " 2Headshots: " "result $athsst"
  1049. menuitemtextinput " 2Knife Gibs: " "result $atknst"
  1050. menuitemtextinput " 2Splatters: " "result $atspst"
  1051. menuitemtextinput " 2Highest KS: " "result $athksst"
  1052. menuitemtextinput " 3FTK's: " "result $atftkst"
  1053. menuitemtextinput " 3HTK's: " "result $athtkst"
  1054. menuitemtextinput " 3STK's: " "result $atstkst"
  1055. menuitemtextinput " 3KTK's: " "result $atktkst"
  1056. menuitemtextinput " 3GTK's: " "result $atgtkst"
  1057. menuitemtextinput " 7Total TK's: " "result $attkst"
  1058. menuitem "" -1
  1059. menuitemvar [concat (c 1) "      ~Weapons~" ]
  1060. menuitemtextinput " 2Sniper: " [(concatword $atsniper / $atsniperdmg)]
  1061. menuitemtextinput " 2SMG: " [(concatword $atsmg / $atsmgdmg)]
  1062. menuitemtextinput " 2AR: " [(concatword $atar / $atardmg)]
  1063. menuitemtextinput " 2Shotgun: " [(concatword $atshot / $atshotdmg)]
  1064. menuitemtextinput " 2Carbine: " [(concatword $atcarb / $atcarbdmg)]
  1065. menuitemtextinput " 2Pistol: " [(concatword $atusp / $atuspdmg)]
  1066. menuitemtextinput " 2Akimbo: " [(concatword $ataki / $atakidmg)]
  1067. menuitemtextinput " 2Grenade: " [(concatword $atnade / $atnadedmg)]
  1068. menuitemtextinput " 2Knife: " [(concatword $atknife / $atknifedmg)]
  1069. menuitemtextinput " 2Scopes: " "result $atscoped"
  1070. menuitem "" -1
  1071. menuitemvar [concat (c 4)Weapon stats are currently shots/damage.]
  1072. menuitem "" -1
  1073. menuitemvar [concat (c 6) "        ~Modes~" ]
  1074. menuitemtextinput " 2TDM: " "result $tdmst"
  1075. menuitemtextinput " 2DM: " "result $dmst"
  1076. menuitemtextinput " 2TSURV: " "result $tsvst"
  1077. menuitemtextinput " 2SURV: " "result $svst"
  1078. menuitemtextinput " 2CTF: " "result $ctfst"
  1079. menuitemtextinput " 2HTF: " "result $htfst"
  1080. menuitemtextinput " 2TKTF: " "result $tktfst"
  1081. menuitemtextinput " 2KTF: " "result $ktfst"
  1082. menuitemtextinput " 2PF: " "result $pfst"
  1083. menuitemtextinput " 2LSS: " "result $lssst"
  1084. menuitemtextinput " 2TOSOK: " "result $tosokst"
  1085. menuitemtextinput " 2OSOK: " "result $osokst"
  1086. menuitemtextinput " 2BTDM: " "result $btdmst"
  1087. menuitemtextinput " 2BDM: " "result $bdmst"
  1088. menuitemtextinput " 2BOSOK: " "result $bosokst"
  1089. menuitemtextinput " 2COOP: " "result $coopst"
  1090. menuitem "" -1
  1091. menuitemvar [concat (c 7) "        ~Maps~" ]
  1092. menuitemtextinput " 2ac_aqueous: " "result $aqueousst"
  1093. menuitemtextinput " 2ac_arabian: " "result $arabianst"
  1094. menuitemtextinput " 2ac_arctic: " "result $arcticst"
  1095. menuitemtextinput " 2ac_arid: " "result $aridst"
  1096. menuitemtextinput " 2ac_complex: " "result $complexst"
  1097. menuitemtextinput " 2ac_depot: " "result $depotst"
  1098. menuitemtextinput " 2ac_desert: " "result $desertst"
  1099. menuitemtextinput " 2ac_desert2: " "result $desert2st"
  1100. menuitemtextinput " 2ac_desert3: " "result $desert3st"
  1101. menuitemtextinput " 2ac_douze: " "result $douzest"
  1102. //menuitemtextinput " 2ac_edifice: " "result $edificest"
  1103. menuitemtextinput " 2ac_elevation: " "result $elevationst"
  1104. menuitemtextinput " 2ac_gothic: " "result $gothicst"
  1105. menuitemtextinput " 2ac_iceroad: " "result $iceroadst"
  1106. //menuitemtextinput " 2ac_industrial: " "result $industrialst"
  1107. menuitemtextinput " 2ac_ingress: " "result $ingressst"
  1108. menuitemtextinput " 2ac_keller: " "result $kellerst"
  1109. menuitemtextinput " 2ac_mines: " "result $minesst"
  1110. menuitemtextinput " 2ac_outpost: " "result $outpostst"
  1111. menuitemtextinput " 2ac_power: " "result $powerst"
  1112. menuitemtextinput " 2ac_rattrap: " "result $rattrapst"
  1113. menuitemtextinput " 2ac_scaffold: " "result $scaffoldst"
  1114. menuitemtextinput " 2ac_shine: " "result $shinest"
  1115. menuitemtextinput " 2ac_snow: " "result $snowst"
  1116. menuitemtextinput " 2ac_sunset: " "result $sunsetst"
  1117. menuitemtextinput " 2ac_toxic: " "result $toxicst"
  1118. menuitemtextinput " 2ac_urban: " "result $urbanst"
  1119. menuitemtextinput " 2ac_werk: " "result $werkst"
  1120. menuitemtextinput " 2Official: " "result $offmpst"
  1121. menuitemtextinput " 2Custom: " "result $cstmpst"
  1122. menuitem "" -1
  1123. menuitemvar [concat (c 0) "        ~Other~" ]
  1124. menuitemtextinput " 2AC Starts: " "result $acstart"
  1125. menuitemtextinput " 3CLA: " "result $clast"
  1126. menuitemtextinput " 1RVSF: " "result $rvsfst"
  1127. menuitemtextinput " 4FFA: " "result $ffast"
  1128. menuitemtextinput " 2Bot: " "result $botst"
  1129. menuitemtextinput " 2GG: " "result $ggst"
  1130.  
  1131. showcurstatsbind = [ // Pre-built current round stats menu viewing alias for easy key binding...
  1132.                      // Acts as a "toggle" bind similar to viewing the scoreboard. Press
  1133.                      // and hold to view, release to close.
  1134.    
  1135.     calc // For accuracy purposes calculate updated statistics before showing the menu.
  1136.     showmenu "Current Round Statistics"
  1137.     onrelease [closemenu "Current Round Statistics"]
  1138. ]
  1139.  
  1140. showatstatsbind = [ // Pre-built all-time stats menu viewing alias for easy key binding...
  1141.                     // Acts as a "toggle" bind similar to viewing the scoreboard. Press
  1142.                     // and hold to view, release to close.
  1143.    
  1144.     calc // For accuracy purposes calculate updated statistics before showing the menu.
  1145.     showmenu "All-Time Statistics"
  1146.     onrelease [closemenu "All-Time Statistics"]
  1147. ]
  1148.  
  1149. statsmenu = [ // Command for showing the menus, IDK why people would not want to use the binds. :P
  1150.     if (strcmp $arg1 "all") [
  1151.         showmenu "All-Time Statistics"
  1152.     ] [
  1153.         showmenu "Current Round Statistics"
  1154.     ]
  1155. ]
  1156.  
  1157. modmenu = [ // Command for showing the mod menu.
  1158.     showmenu "MPL Mod"
  1159. ]
  1160.  
  1161. // bind BACKQUOTE [showcurstatsbind]
  1162. // bind EQUALS [showatstatsbind]
  1163.  
  1164. docsection [MPL] // In-game documentation of the script's various commands.
  1165.  
  1166. docident [clrst] [ 1MPL: 5Clears the current round stats.]
  1167. docexample [/clrst] []
  1168.  
  1169. docident [clrats] [ 1MPL: 5Clears the all-time stats.]
  1170. docargument [A] [Clears the values only if this is set to 01.]
  1171. docexample [/clrats 1] []
  1172.  
  1173. docident [conextras] [ 1MPL: 5Displays extra skill based messages.]
  1174. docargument [A] [Displays messages if this is set to 01.]
  1175. docexample [/conextras 1] [ 0Enables 5the messages.]
  1176. docexample [/conextras 0] [ 3Disables 5the messages.]
  1177.  
  1178. docident [modmenu] [ 1MPL: 5Displays the MPL Mod menu.]
  1179. docremark [Allows you to easily customize the kill streak messages.]
  1180. docexample [/modmenu]
  1181.  
  1182. docident [stats] [ 1MPL: 5Prints your current round stats to the console.]
  1183. docargument [A] [Prints your all time stats to the console if this is set to 0"all".]
  1184. docexample [/stats] [Prints your current round stats.]
  1185. docexample [/stats all] [Prints your all-time stats.]
  1186.  
  1187. docident [statshot] [ 1MPL: 5Automatically takes a screenshot of the current round stats menu.]
  1188. docargument [A] [Screenshots the all-time stats menu instead if this is set to 0"all".]
  1189. docexample [/statshot] [Screenshots the current round stats menu.]
  1190. docexample [/statshot all] [Screenshots the all-time stats menu.]
  1191.  
  1192. docident [autostatshot] [ 1MPL: 5Automatically takes a /statshot during intermissions if enabled.]
  1193. docargument [A] [ 30 0= disabled; 31 0= enabled]
  1194. docexample [/autostatshot 1] [Enables automatic statshots.]
  1195. docexample [/autostatshot 0] [Disables automatic statshots.]
  1196.  
  1197. docident [statsmenu] [ 1MPL: 5Shows your current round stats menu.]
  1198. docargument [A] [Shows your all-time stats menu if this is set to 0"all".]
  1199. docexample [/statsmenu] [Shows your current round stats menu.]
  1200. docexample [/statsmenu all] [Shows your all-time stats menu.]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement