Stat Calculator for mIRC

I was sick of doing calculations by hand for my future D/P team, and since the only programming language I'm somewhat fluent in is mIRC, I wrote a program. Basically it allows you to calculate a Pokemon's stat, depending on what EVs, IVs, level and nature you give it. Besides planning your future D/P team, it can be used to see what a newly hatched or acquired Pokemon's stats should be if you want a perfect IV.

Instructions:
1. Get mIRC if you don't have it already
2. Press Alt-R
3. Paste the code below in the remote window
4. Make sure your remote is on. If it's not, type /remote on

5. Open the dialog by pressing F4.
6. Put in the Pokemon's base stat in the editbox above the HP/Other section
7. Choose whether you're calculating Hit Points, or an Other stat
8. If you picked Other, specify how the nature affects your stat in the editbox next to "Nature". If it's a boosting nature, put 1.1. If it's a neutral personality, put 1. If the nature cuts the stat you're calculating, put 0.9.
9. Fill in the level and the IV of your Pokemon.
10. Use the scrollbar to determine the ammount of EVs.

Enjoy.

Code:
alias f4 { dialog -m statcalcer statcalcer }

dialog statcalcer {
  ;General title and size stuff
  title "Mekkah's Stat Calculator"
  size -l -l 140 80
  option dbu

  ;Base Stat
  edit "0", 7, 30 5 20 10
  text "Base", 805, 10 5 20 10

  ;Choice whether the stat is HP or another stat

  radio "HP", 1, 10 15 30 10
  radio "Other", 2, 10 25 30 10

  ;Nature-affecting editing box: should always be 0.9, 1 or 1.1
  edit "1", 3, 30 45 20 10
  text "Nature", 801, 10 45 20 10

  ;The level editing box, number should be between 0 and 100
  edit "5", 9, 30 55 20 10
  text "Level", 802, 10 55 20 10

  ;The IV editing box, number should always be between 0 and 31
  edit "31", 10, 30 65 20 10
  text "IV", 803, 10 65 15 10

  ;The scrollbar for EVs
  scroll "0", 4, 60 10 60 10, horizontal range 0 63
  ;Ammount of stat points
  text "0", 5, 60 35 10 10
  ;Ammount of EVs
  text "0", 6, 75 35 15 10
  ;Final stat
  text "0", 8, 90 35 15 10
}
;Scrolling the EV bar
on *:dialog:statcalcer:scroll:4: {
  did -o statcalcer 5 1 $did(statcalcer,4).sel
  did -o statcalcer 6 1 $calc( $did(statcalcer,4).sel * 4 )
  updatestats
}
;Choosing HP or Other
;HP
on *:dialog:statcalcer:sclick:1: {
  set %scstat HP
  updatestats
}
;Other
on *:dialog:statcalcer:sclick:2: {
  set %scstat Other
  updatestats
}
;Start-up function
on *:dialog:statcalcer:init:0: {
  set %scstat Other
  updatestats
}
;Editing anything, makes sure that it keeps the stat up to date
on *:dialog:statcalcer:edit:*: {
  updatestats
}
;"Refreshing"
alias updatestats {
  if ( %scstat == Other ) {

    var %a $int($calc($did(statcalcer,7) * 2 + $did(statcalcer,10) + $int($calc($did(statcalcer,6)/4)) ))
    var %b $int($calc(%a * $did(statcalcer,9)))
    var %c $int($calc(%b / 100)))
    var %d $int($calc(%c + 5))
    var %e $int($calc(%d * $did(statcalcer,3)))

    did -o statcalcer 8 1 %e
  }
  elseif ( %scstat == HP ) {

    var %a $int($calc($did(statcalcer,7) * 2 + $did(statcalcer,10) + $int($calc($did(statcalcer,6)/4)) ))
    var %b $int($calc(%a * $did(statcalcer,9)))
    var %c $int($calc(%b / 100)))
    var %d $int($calc(%c + 10 + $did(statcalcer,9)))

    did -o statcalcer 8 1 %d
  }
}

;HP formula from FAQ
;INT ( INT ( Base Stat * 2 + DV + INT ( Effort / 4 ) ) * Level / 100 + 10 + Level )

;Other stat formula from FAQ
;INT ( INT ( ( ( ( Base Stat * 2 + DV + INT ( Effort / 4 )   ) * Level ) / 100 ) + 5 ) * Nature )
 
Netbattle doesn't have DP pokemon.

This is pretty cool, Mekkah. Is there no way, however, to calculate non-Lv100 stats? I'd like to know at a glance what stats my Naive/Naughty Chimpyro (Chimchar) should have at Lv5, which is the #1 reason I'd be drawn to such a program in the first place.
 
This is mostly for these D/P Pokemon that have odd base stats, but it also allows you to randomly calculate stuff in a heated mIRC nerd convo without having to start up NetBattle. Not to mention Misty and people with macs. X)

EDIT: certainly possible, I'd just have to add a level part and add * level / 100 or something at the end of the formulae, or something in that sphere.
 
Pretty cool Mekkah. I have a similar program to this that I made on Excel and you can incorporate IV's into it. However like Mekkah's, I can't calculate the stats for pokes below Lvl 100.
 
Since Jumpman requested it, I'm working on implementing levels right now (already did IVs, just didn't update yet)
 
I added the new features I promised, just a little later. I'm considering expanding to making this a full damage calculator where you can fill in Pokemon on both sides and whatnot, but that's an assload of work and MetalKid probably has that already.
 
Well, I've had a D/P IV Calculator on my site for the past couple of months already. As for the damage calculator, I have one, but it isn't 100% yet because I need to upload the new move types for physical vs special.
 
Well, I've had a D/P IV Calculator on my site for the past couple of months already. As for the damage calculator, I have one, but it isn't 100% yet because I need to upload the new move types for physical vs special.

Not to mention that the DP damage formula is still being researched, and it is already showing to be subtly different from that of ADV.
 
Back
Top