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.
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 )