Advertisement
Guest User

Untitled

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