Stat scripts (Demo)

Discussion in 'Server and Client Scripting' started by coyotte508, Apr 21, 2010.

  1. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Code (javascript):
    1. ({
    2.  
    3. serverStartUp : function() {
    4.         scriptChecks = 0;
    5.         this.init() ;
    6.         this.loadStatsFromFile() ;
    7. }
    8. ,
    9.  
    10. init : function() {
    11.         if (typeof(stats) == "undefined" )
    12.                 stats = [];
    13.          
    14.         if (typeof(totalUsage)  == "undefined" )
    15.                 totalUsage =  [];
    16.        
    17.         if (typeof(scriptChecks)  == "undefined" )
    18.                 scriptChecks += 1;
    19.          
    20.         PokeStat = function (poke)
    21.         {
    22.                 this.poke = poke;
    23.                 this.totalUsage = 0;
    24.                 this.moves = [];
    25.                  
    26.                 this.addMoveSet = function(move1,move2,move3,move4)
    27.                 {
    28.                         this.totalUsage += 1;
    29.                         var parmoves = new Array(move1,move2,move3,move4) ;
    30.                         for (var i = 0; i < 4;  i += 1)
    31.                         {
    32.                                 if  (parmoves[i] == 0)
    33.                                         continue;
    34.                                 if  (typeof(this.moves[parmoves[i]]) == "undefined" )
    35.                                         this.moves[parmoves[i]] = 0;
    36.                                 this.moves[parmoves[i]] += 1;
    37.                         }
    38.                 }
    39.         }
    40.        
    41.         saveStatsPeriodically =  function(version) {
    42.                 if (version !=  scriptChecks)
    43.                         return;
    44.                 this.saveStatsToFile() ;
    45.                 //save every  two hours
    46.                 sys.callLater("saveStatsPeriodically("+version+" )", 7200) ;
    47.         }
    48. }
    49.  
    50.  
    51. ,
    52.  
    53. afterNewMessage : function  (message) {
    54.         if (message == "Script  Check: OK" ) {
    55.                 sys.sendAll("ScriptBot: Scripts were updated!" ) ;
    56.                 this.init() ;
    57.         }
    58. }
    59. ,
    60.  
    61. beforeBattleStarted :  function(src, dest,clauses) {
    62.         [I]/*  Check if this is a regular battle */[/I]
    63.         if (sys.tier(src) == sys.tier(dest) &&  clauses[7] == 0)
    64.         {
    65.                 [I]/*  save stats.. */[/I]
    66.                 var tier =  sys.tier(src) ;
    67.                 if (typeof(stats[tier]) == "undefined" ) {
    68.                         stats[tier] = [];
    69.                 }
    70.                 if (typeof(totalUsage[tier]) == "undefined" ) {
    71.                         totalUsage[tier] = 0;
    72.                 }
    73.                 this.saveStats(src,tier)  ;
    74.                 this.saveStats(dest,tier)  ;
    75.         }
    76. }
    77. ,
    78. saveStats : function (id, tier)
    79. {
    80.         totalUsage[tier] += 1;
    81.          
    82.         for (var i = 0; i < 6;  i+=1)
    83.         {
    84.                 var poke =  sys.teamPoke(id, i) ;
    85.                 if (poke == 0)
    86.                         continue;
    87.                 if (typeof(stats[tier][poke]) == "undefined"  )
    88.                         stats[tier][poke] = new PokeStat(poke) ;
    89.                 stats[tier][poke].addMoveSet(sys.teamPokeMove(id,i,0), sys.teamPokeMove(id,i,1), sys.teamPokeMove(id,i,2), sys.teamPokeMove(id,i,3)) ;
    90.         }
    91. }
    92.  
    93. ,
    94.  
    95. saveStatsToFile : function  ()
    96. {
    97.         sys.writeToFile("stats.txt", "" ) ;
    98.        
    99.         var write = function(string) {
    100.                 sys.appendToFile("stats.txt", string+"\n" ) ;
    101.         };
    102.        
    103.         write ("/!\\ Tier Usage Stats! /!\\" ) ;
    104.         for (tier in stats) {
    105.                 write("\n\n=== Tier: " + tier +  " ===" ) ;
    106.                 write("--Total Usage: " + totalUsage[tier]  + "--" )  ;
    107.                 for (pokemon in stats[tier]) {
    108.                         var poke =  stats[tier][pokemon]
    109.                         write("*Pokemon " + sys.pokemon(pokemon) + ": " + poke.totalUsage  + "*" )  ;
    110.                         for (move in poke.moves)
    111.                         {
    112.                                 write(sys.move(move) + ": " + poke.moves[move]) ;
    113.                         }
    114.                         write("" ) ;
    115.                 }
    116.         }
    117. }
    118.  
    119. ,
    120.  
    121. loadStatsFromFile :  function ()
    122. {
    123.         var loadedStats =  sys.getFileContent("stats.txt" ).split("\n" ) ;
    124.        
    125.         print("Size: "+loadedStats.length) ;
    126.        
    127.         totalUsage = [];
    128.         stats = [];
    129.        
    130.         var tier = "";
    131.         var poke = 0;
    132.         for (x in loadedStats)
    133.         {
    134.                 line =  loadedStats[x];
    135.                 if (line.length ==  0)
    136.                         continue;
    137.                 if (line.substr(0,3) == "===" ) {
    138.                         //Tier  line
    139.                         tier =  line.substr(10, line.length-14) ;
    140.                         totalUsage[tier] = 0;
    141.                         stats[tier] = [];
    142.                         continue;
    143.                 }
    144.                 if (line.substr(0,2) == "--" ) {
    145.                         //Total  usage line
    146.                         totalUsage[tier] = line.substr(15, line.length-17) * 1;
    147.                         continue;
    148.                 }
    149.                 if (line.charAt(0) == "*" ) {
    150.                         //New  pokémon!
    151.                         var i =  line.indexOf(':') ;
    152.                         if (i ==-1)
    153.                                 continue;
    154.                         poke =  sys.pokeNum(line.substring(9, i)) ;
    155.                         stats[tier][poke] = new PokeStat(poke) ;
    156.                         stats[tier][poke].totalUsage = line.substring(i+2, line.length - 1) * 1 ;
    157.                         continue;
    158.                 }
    159.                 //Move!
    160.                 var i =  line.indexOf(':') ;
    161.                 if (i ==-1)
    162.                         continue;
    163.                 var move =  sys.moveNum(line.substring(0, i)) ;
    164.                 if (move != 0) {
    165.                         stats[tier][poke].moves[move] = line.substr(i+2) * 1;
    166.                 }
    167.         }
    168. }
    169.  
    170. ,
    171.  
    172. beforeChatMessage:  function(src, message) {
    173.         if ((message[0] == '/' || message[0] == '!') &&  message.length > 1) {
    174.                 print("Command -- " + sys.name(src) + ": " + message) ;
    175.                 sys.stopEvent() ;
    176.                 var command;
    177.                 var commandData;
    178.                 var pos =  message.indexOf(' ') ;
    179.  
    180.                 if (pos != -1) {
    181.                         command =  message.substring(1, pos).toLowerCase() ;
    182.                         commandData =  message.substr(pos+1) ;
    183.                 } else {
    184.                         command =  message.substr(1).toLowerCase() ;
    185.                 }
    186.                 var tar =  sys.id(commandData)  ;
    187.  
    188.                 if (command == "commands"  || command == "command" ) {
    189.                         sys.sendMessage(src, "" )  ;
    190.                         sys.sendMessage(src, "*** Commands ***" ) ;
    191.                         sys.sendMessage(src, "/pokeStats [poke] [tier]: to see stats of the pokemon  in the tier" ) ;
    192.                         sys.sendMessage(src, "/tierStats [poke] [tier]: to see stats of tier"  ) ;
    193.                         sys.sendMessage(src, "/savestats: Save all tier usage stats to file. Very  expensive!" ) ;
    194.                         sys.sendMessage(src, "/loadstats: Load all tier usage stats from file. Very  expensive!" ) ;
    195.                         return;
    196.                 }
    197.                 if (command == "pokestats"  ) {
    198.                         var pos =  commandData.indexOf(' ') ;
    199.                         if (pos == -1) {
    200.                                 return;
    201.                         }
    202.                         var poke =  sys.pokeNum(commandData.substring(0, pos)) ;
    203.                         var tier =  commandData.substr(pos+1) ;
    204.                         if (typeof(stats[tier]) == "undefined" ) {
    205.                                 sys.sendMessage(src,  "StatBot: The tier you entered ("+ tier+" ) doesn't exist  in the db." ) ;
    206.                                 return;
    207.                         }
    208.                         if (typeof(stats[tier][poke]) == "undefined"  ) {
    209.                                 sys.sendMessage(src,  "StatBot: There's no records of  pokemon " + poke + " for the tier "+  tier+ "." )  ;
    210.                                 return;
    211.                         }
    212.                         sys.sendMessage(src, "" )  ;
    213.                         sys.sendMessage(src, "*** Pokemon " + sys.pokemon(poke) + " in tier " + tier +  " ***" ) ;
    214.                         poke =  stats[tier][poke];
    215.                         sys.sendMessage(src, "StatBot: Usage percentage: " + Math.round(parseFloat(poke.totalUsage)  * 10000 /  totalUsage[tier])/100 + "%." ) ;
    216.                         sys.sendMessage(src, "StatBot: Moves: " ) ;
    217.                         for (move in poke.moves)  {
    218.                                 sys.sendMessage(src,  sys.move(move) + ": " + Math.round(parseFloat(poke.moves[move]) * 10000 / poke.totalUsage)/100 + "%." ) ;
    219.                         }
    220.                         return;
    221.                 }
    222.                 if (command == "tierstats"  ) {
    223.                         var tier =  commandData;
    224.                         if (typeof(stats[tier]) == "undefined" ) {
    225.                                 sys.sendMessage(src,  "StatBot: The tier " + tier + " doesn't exist  in the db." ) ;
    226.                                 return;
    227.                         }
    228.                         sys.sendMessage(src, "" )  ;
    229.                         sys.sendMessage(src, "*** Tier " +  tier + " ***" )  ;
    230.                         for (poke in stats[tier]) {
    231.                                 sys.sendMessage(src,  sys.pokemon(poke) + ": " + Math.round(stats[tier][poke].totalUsage  * 10000 /  parseFloat(totalUsage[tier]))/100 + "%." ) ;
    232.                         }
    233.                         return;
    234.                 }
    235.                 if (command == "savestats"  ) {
    236.                         this.saveStatsToFile() ;
    237.                         sys.sendMessage(src, "StatBot: All stats were saved!" ) ;
    238.                         return;
    239.                 }
    240.                 if (command == "loadstats"  ) {
    241.                         this.loadStatsFromFile() ;
    242.                         sys.sendMessage(src, "StatBot: Stats were loaded" ) ;
    243.                         return;
    244.                 }
    245.         }
    246. }
    247.  
    248. })
    249.  


    Results so far:
    [Secret]*** Tier OverUsed (5610 battles) ***
    Bulbasaur: 0.02%.
    Venusaur: 2.67%.
    Charizard: 3.76%.
    Blastoise: 0.82%.
    Pidgeot: 0.29%.
    Raticate: 0.05%.
    Arbok: 0.02%.
    Pikachu: 0.7%.
    Raichu: 0.75%.
    Sandslash: 0.23%.
    Nidoqueen: 0.12%.
    Nidoking: 0.37%.
    Clefairy: 0.62%.
    Clefable: 2.19%.
    Ninetales: 0.36%.
    Vileplume: 0.05%.
    Parasect: 0.14%.
    Venomoth: 0.14%.
    Dugtrio: 1.35%.
    Persian: 0.02%.
    Golduck: 0.21%.
    Primeape: 0.87%.
    Arcanine: 4.21%.
    Poliwrath: 0.34%.
    Alakazam: 4.53%.
    Machamp: 7.04%.
    Victreebel: 0.29%.
    Tentacruel: 3.46%.
    Golem: 0.12%.
    Rapidash: 0.46%.
    Slowbro: 1.37%.
    Magneton: 0.29%.
    Dodrio: 0.12%.
    Dewgong: 0.21%.
    Muk: 0.23%.
    Cloyster: 1.19%.
    Gengar: 19.79%.
    Onix: 0.14%.
    Hypno: 0.16%.
    Kingler: 0.34%.
    Electrode: 0.68%.
    Exeggutor: 0.32%.
    Marowak: 2.51%.
    Hitmonlee: 0.68%.
    Hitmonchan: 0.55%.
    Weezing: 0.34%.
    Chansey: 0.11%.
    Kangaskhan: 0.39%.
    Starmie: 11.76%.
    Mr. Mime: 0.07%.
    Scyther: 0.36%.
    Jynx: 0.04%.
    Magmar: 0.05%.
    Pinsir: 0.25%.
    Tauros: 0.11%.
    Magikarp: 0.34%.
    Gyarados: 17.49%.
    Lapras: 1.59%.
    Ditto: 0.09%.
    Eevee: 0.11%.
    Vaporeon: 7.45%.
    Jolteon: 6.38%.
    Flareon: 0.37%.
    Omastar: 0.39%.
    Kabutops: 1.23%.
    Aerodactyl: 5.35%.
    Snorlax: 9.63%.
    Articuno: 0.7%.
    Zapdos: 7.09%.
    Moltres: 0.11%.
    Dragonair: 0.52%.
    Dragonite: 8.88%.
    Meganium: 0.32%.
    Typhlosion: 2.83%.
    Croconaw: 0.11%.
    Feraligatr: 2.83%.
    Noctowl: 0.12%.
    Ariados: 0.04%.
    Crobat: 3.58%.
    Lanturn: 1.87%.
    Pichu: 0.02%.
    Cleffa: 0.34%.
    Xatu: 0.12%.
    Ampharos: 0.34%.
    Azumarill: 0.32%.
    Politoed: 0.39%.
    Jumpluff: 0.27%.
    Quagsire: 0.04%.
    Espeon: 1.48%.
    Umbreon: 3.08%.
    Murkrow: 0.11%.
    Slowking: 0.52%.
    Forretress: 4.51%.
    Dunsparce: 0.12%.
    Steelix: 1.34%.
    Snubbull: 0.11%.
    Qwilfish: 0.46%.
    Scizor: 28.7%.
    Shuckle: 0.7%.
    Heracross: 3.98%.
    Sneasel: 0.04%.
    Ursaring: 0.32%.
    Piloswine: 0.12%.
    Octillery: 0.68%.
    Delibird: 0.14%.
    Mantine: 0.48%.
    Skarmory: 10.7%.
    Houndoom: 1.82%.
    Kingdra: 6.63%.
    Donphan: 0.94%.
    Porygon2: 1.55%.
    Stantler: 0.02%.
    Smeargle: 5.12%.
    Hitmontop: 1.03%.
    Miltank: 1.03%.
    Blissey: 11.32%.
    Raikou: 1.03%.
    Entei: 0.02%.
    Suicune: 7.5%.
    Pupitar: 0.11%.
    Tyranitar: 22.51%.
    Celebi: 3.76%.
    Treecko: 0.04%.
    Sceptile: 2.44%.
    Blaziken: 2.07%.
    Swampert: 19.82%.
    Mightyena: 0.09%.
    Linoone: 0.02%.
    Ludicolo: 2.64%.
    Shiftry: 0.07%.
    Swellow: 0.45%.
    Pelipper: 0.02%.
    Gardevoir: 1.71%.
    Breloom: 8.16%.
    Slaking: 0.64%.
    Ninjask: 3.23%.
    Shedinja: 1.12%.
    Exploud: 0.45%.
    Hariyama: 0.61%.
    Mawile: 0.04%.
    Aggron: 0.3%.
    Meditite: 0.04%.
    Medicham: 0.89%.
    Plusle: 0.07%.
    Sharpedo: 0.23%.
    Wailord: 0.18%.
    Camerupt: 0.11%.
    Torkoal: 0.34%.
    Grumpig: 0.04%.
    Flygon: 7.34%.
    Cacturne: 0.93%.
    Altaria: 0.21%.
    Zangoose: 0.37%.
    Whiscash: 0.82%.
    Claydol: 0.64%.
    Cradily: 0.29%.
    Milotic: 3.55%.
    Kecleon: 0.05%.
    Banette: 0.05%.
    Duskull: 0.07%.
    Dusclops: 0.14%.
    Tropius: 0.02%.
    Absol: 1.98%.
    Wynaut: 0.09%.
    Glalie: 0.14%.
    Walrein: 2.16%.
    Huntail: 0.12%.
    Gorebyss: 0.18%.
    Relicanth: 0.18%.
    Salamence: 22.03%.
    Metagross: 19.09%.
    Regirock: 0.05%.
    Regice: 0.41%.
    Registeel: 0.78%.
    Latias: 10.91%.
    Groudon: 0.07%.
    Jirachi: 13.58%.
    Grotle: 0.02%.
    Torterra: 1.62%.
    Chimchar: 0.02%.
    Infernape: 16.02%.
    Empoleon: 5.29%.
    Staraptor: 2.12%.
    Luxray: 0.12%.
    Roserade: 3.76%.
    Rampardos: 0.91%.
    Bastiodon: 0.34%.
    Buizel: 0.02%.
    Floatzel: 0.5%.
    Cherrim: 0.02%.
    Gastrodon: 0.02%.
    Ambipom: 1.28%.
    Drifblim: 0.52%.
    Lopunny: 0.05%.
    Mismagius: 2.98%.
    Honchkrow: 1.19%.
    Purugly: 0.04%.
    Skuntank: 0.04%.
    Bronzong: 4.24%.
    Chatot: 0.02%.
    Spiritomb: 1.94%.
    Munchlax: 0.04%.
    Lucario: 13.1%.
    Hippowdon: 6.36%.
    Drapion: 0.55%.
    Toxicroak: 0.84%.
    Carnivine: 0.04%.
    Abomasnow: 4.71%.
    Weavile: 9.25%.
    Magnezone: 7.36%.
    Lickilicky: 0.27%.
    Rhyperior: 1.59%.
    Tangrowth: 0.21%.
    Electivire: 9.88%.
    Magmortar: 0.94%.
    Togekiss: 4.56%.
    Yanmega: 2.12%.
    Leafeon: 0.45%.
    Glaceon: 1.62%.
    Gliscor: 9.36%.
    Mamoswine: 3.07%.
    Porygon-Z: 8.29%.
    Gallade: 4.14%.
    Probopass: 0.25%.
    Dusknoir: 5.76%.
    Froslass: 2.75%.
    Rotom: 0.46%.
    Uxie: 1.52%.
    Mesprit: 0.12%.
    Azelf: 8.22%.
    Heatran: 17.24%.
    Regigigas: 0.36%.
    Cresselia: 3.71%.
    Phione: 0.37%.
    Shaymin: 0.78%.
    Rotom-C: 1.41%.
    Rotom-H: 8.45%.
    Rotom-F: 0.73%.
    Rotom-W: 0.5%.
    Rotom-S: 0.09%.
    Missingno: 0.18%.[/Secret]

    [Secret]*** Pokemon Gengar in tier OverUsed ***
    StatBot: Usage percentage: 19.76%. (1110 battles)
    StatBot: Moves:
    Brick Break: 0.09%.
    Confuse Ray: 2.43%.
    Counter: 0.9%.
    Curse: 0.81%.
    Dark Pulse: 3.42%.
    Destiny Bond: 21.26%.
    Disable: 0.18%.
    Double Team: 0.36%.
    Dream Eater: 10.18%.
    Embargo: 0.09%.
    Energy Ball: 12.07%.
    Explosion: 9.64%.
    Fire Punch: 0.81%.
    Focus Blast: 49.19%.
    Focus Punch: 1.26%.
    Giga Drain: 2.16%.
    Hidden Power: 32.61%.
    Hypnosis: 24.05%.
    Ice Punch: 3.15%.
    Icy Wind: 3.51%.
    Mean Look: 2.07%.
    Night Shade: 0.63%.
    Nightmare: 0.99%.
    Ominous Wind: 0.45%.
    Pain Split: 6.76%.
    Perish Song: 0.63%.
    Protect: 4.68%.
    Psychic: 11.98%.
    Seismic Toss: 0.36%.
    Shadow Ball: 86.4%.
    Shadow Punch: 0.18%.
    Sludge Bomb: 11.62%.
    Substitute: 13.33%.
    Sucker Punch: 0.09%.
    Taunt: 2.7%.
    Thunder: 3.15%.
    Thunderbolt: 55.14%.
    Torment: 0.18%.
    Toxic: 0.36%.
    Trick: 15.05%.
    Will-O-Wisp: 5.05%.[/Secret]


    There is a little bug: Mr. Mime appears as Missingno because of the space in its name.
     
    Last edited: Jun 3, 2010
  2. eric the espeon

    eric the espeon is an espeon.

    Joined:
    Apr 21, 2010
    Messages:
    854
    Likes Received:
    1
    Stats in a more useful order (usage):
    [Secret]
    Scizor 28.42%
    Tyranitar 22.29%
    Salamence 21.81%
    Swampert 19.62%
    Gengar 19.59%
    Metagross 18.90%
    Gyarados 17.32%
    Heatran 17.07%
    Infernape 15.86%
    Jirachi 13.45%
    Lucario 12.97%
    Starmie 11.64%
    Blissey 11.21%
    Latias 10.80%
    Skarmory 10.59%
    Electivire 9.78%
    Snorlax 9.53%
    Gliscor 9.27%
    Weavile 9.16%
    Dragonite 8.79%
    Rotom-H 8.37%
    Porygon-Z 8.21%
    Azelf 8.14%
    Breloom 8.08%
    Suicune 7.43%
    Vaporeon 7.38%
    Magnezone 7.29%
    Flygon 7.27%
    Zapdos 7.02%
    Machamp 6.97%
    Kingdra 6.56%
    Jolteon 6.32%
    Hippowdon 6.30%
    Dusknoir 5.70%
    Aerodactyl 5.30%
    Empoleon 5.24%
    Smeargle 5.07%
    Abomasnow 4.66%
    Togekiss 4.51%
    Alakazam 4.49%
    Forretress 4.47%
    Bronzong 4.20%
    Arcanine 4.17%
    Gallade 4.10%
    Heracross 3.94%
    Charizard 3.72%
    Celebi 3.72%
    Roserade 3.72%
    Cresselia 3.67%
    Crobat 3.54%
    Milotic 3.51%
    Tentacruel 3.43%
    Ninjask 3.20%
    Umbreon 3.05%
    Mamoswine 3.04%
    Mismagius 2.95%
    Typhlosion 2.80%
    Feraligatr 2.80%
    Froslass 2.72%
    Venusaur 2.64%
    Ludicolo 2.61%
    Marowak 2.49%
    Sceptile 2.42%
    Clefable 2.17%
    Walrein 2.14%
    Staraptor 2.10%
    Yanmega 2.10%
    Blaziken 2.05%
    Absol 1.96%
    Spiritomb 1.92%
    Lanturn 1.85%
    Houndoom 1.80%
    Gardevoir 1.69%
    Torterra 1.60%
    Glaceon 1.60%
    Lapras 1.57%
    Rhyperior 1.57%
    Porygon2 1.53%
    Uxie 1.50%
    Espeon 1.47%
    Rotom-C 1.40%
    Slowbro 1.36%
    Dugtrio 1.34%
    Steelix 1.33%
    Ambipom 1.27%
    Kabutops 1.22%
    Cloyster 1.18%
    Honchkrow 1.18%
    Shedinja 1.11%
    Hitmontop 1.02%
    Miltank 1.02%
    Raikou 1.02%
    Donphan 0.93%
    Magmortar 0.93%
    Cacturne 0.92%
    Rampardos 0.90%
    Medicham 0.88%
    Primeape 0.86%
    Toxicroak 0.83%
    Blastoise 0.81%
    Whiscash 0.81%
    Registeel 0.77%
    Shaymin 0.77%
    Raichu 0.74%
    Rotom-F 0.72%
    Pikachu 0.69%
    Articuno 0.69%
    Shuckle 0.69%
    Electrode 0.67%
    Hitmonlee 0.67%
    Octillery 0.67%
    Slaking 0.63%
    Claydol 0.63%
    Clefairy 0.61%
    Hariyama 0.60%
    Hitmonchan 0.54%
    Drapion 0.54%
    Dragonair 0.51%
    Slowking 0.51%
    Drifblim 0.51%
    Floatzel 0.50%
    Rotom-W 0.50%
    Mantine 0.48%
    Rapidash 0.46%
    Qwilfish 0.46%
    Rotom 0.46%
    Swellow 0.45%
    Exploud 0.45%
    Leafeon 0.45%
    Regice 0.41%
    Kangaskhan 0.39%
    Omastar 0.39%
    Politoed 0.39%
    Nidoking 0.37%
    Flareon 0.37%
    Zangoose 0.37%
    Phione 0.37%
    Ninetales 0.36%
    Scyther 0.36%
    Regigigas 0.36%
    Poliwrath 0.34%
    Kingler 0.34%
    Weezing 0.34%
    Magikarp 0.34%
    Cleffa 0.34%
    Ampharos 0.34%
    Torkoal 0.34%
    Bastiodon 0.34%
    Exeggutor 0.32%
    Meganium 0.32%
    Azumarill 0.32%
    Ursaring 0.32%
    Aggron 0.30%
    Pidgeot 0.29%
    Victreebel 0.29%
    Magneton 0.29%
    Cradily 0.29%
    Jumpluff 0.27%
    Lickilicky 0.27%
    Pinsir 0.25%
    Probopass 0.25%
    Sandslash 0.23%
    Muk 0.23%
    Sharpedo 0.23%
    Golduck 0.21%
    Dewgong 0.21%
    Altaria 0.21%
    Tangrowth 0.21%
    Wailord 0.18%
    Gorebyss 0.18%
    Relicanth 0.18%
    Missingno 0.18%
    Hypno 0.16%
    Parasect 0.14%
    Venomoth 0.14%
    Onix 0.14%
    Delibird 0.14%
    Dusclops 0.14%
    Glalie 0.14%
    Nidoqueen 0.12%
    Golem 0.12%
    Dodrio 0.12%
    Noctowl 0.12%
    Xatu 0.12%
    Dunsparce 0.12%
    Piloswine 0.12%
    Huntail 0.12%
    Luxray 0.12%
    Mesprit 0.12%
    Chansey 0.11%
    Tauros 0.11%
    Eevee 0.11%
    Moltres 0.11%
    Croconaw 0.11%
    Murkrow 0.11%
    Snubbull 0.11%
    Pupitar 0.11%
    Camerupt 0.11%
    Ditto 0.09%
    Mightyena 0.09%
    Wynaut 0.09%
    Rotom-S 0.09%
    Mr. Mime 0.07%
    Shiftry 0.07%
    Plusle 0.07%
    Duskull 0.07%
    Groudon 0.07%
    Raticate 0.05%
    Vileplume 0.05%
    Magmar 0.05%
    Kecleon 0.05%
    Banette 0.05%
    Regirock 0.05%
    Lopunny 0.05%
    Jynx 0.04%
    Ariados 0.04%
    Quagsire 0.04%
    Sneasel 0.04%
    Treecko 0.04%
    Mawile 0.04%
    Meditite 0.04%
    Grumpig 0.04%
    Purugly 0.04%
    Skuntank 0.04%
    Munchlax 0.04%
    Carnivine 0.04%
    Bulbasaur 0.02%
    Arbok 0.02%
    Persian 0.02%
    Pichu 0.02%
    Stantler 0.02%
    Entei 0.02%
    Linoone 0.02%
    Pelipper 0.02%
    Tropius 0.02%
    Grotle 0.02%
    Chimchar 0.02%
    Buizel 0.02%
    Cherrim 0.02%
    Gastrodon 0.02%
    Chatot 0.02%
    [/Secret]
     
  3. TEA_DEMON

    TEA_DEMON New Member

    Joined:
    Apr 25, 2010
    Messages:
    12
    Likes Received:
    0
    So I tried using this, and got the following error: "Script Error line 1: SyntaxError: Parse error". What am I doing wrong?
     
  4. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Well, in the script window you need to have ({ at the beginning and }) at the end. I fixed the script to add that. Can you try again?
     
  5. TEA_DEMON

    TEA_DEMON New Member

    Joined:
    Apr 25, 2010
    Messages:
    12
    Likes Received:
    0
    Ahh cool it's all good now, thanks a lot.
     
  6. TEA_DEMON

    TEA_DEMON New Member

    Joined:
    Apr 25, 2010
    Messages:
    12
    Likes Received:
    0
    Sorry for the double post, and I feel stupid for asking so many questions. -.-

    I go /savestats, but then check the stats file and there's nothing there. Am I doing it wrong?
     
  7. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Does teh message show up saying the stats were saved?
     
  8. TEA_DEMON

    TEA_DEMON New Member

    Joined:
    Apr 25, 2010
    Messages:
    12
    Likes Received:
    0
    It does, but then when I use /pokestats Pokemon Tier it says "Tier does not exist".
     
  9. coyotte508

    coyotte508 Well-Known Member Administrator Server Owner Administrator Server Owner

    Joined:
    Apr 21, 2010
    Messages:
    6,363
    Likes Received:
    168
    Then maybe no tiered battles happend? And that's why the file is empty.
     
  10. eric the espeon

    eric the espeon is an espeon.

    Joined:
    Apr 21, 2010
    Messages:
    854
    Likes Received:
    1
    thanks for the update coyotte!