Welcome Guest [Log In] [Register]
Welcome to The Libelldra Forge. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
A Mod of the mIRC Damage Calculator
Topic Started: Aug 14 2007, 11:42 AM (655 Views)
Iggy Koopa
Member Avatar
Draws VERY CUTE GIRLS with VERY ATTRACTIVE BREASTS.
[ *  *  *  *  * ]
This is a modified version of the mIRC Damage Calculator made by Misty (you may download mIRC here).
  • This version does the following things:
  • Calculates OHKO, 2HKO (including Sandstorm and Leftovers) chances.
  • Tells you how high an attack stats is required for a guaranteed OHKO for things that have a chance of OHKOing.
  • Allow you to enter things such as "405*2" in place of stats to calculate boosted stats more easily (ie Porygon-Z after Nasty Plot using Ice Beam on a max HP/min SpDef Blissey after a Calm Mind would be /dam 405*2 306*1.5 95 714).
To use this, open mIRC and press Alt + R. Click on the Aliases tab, click File on the menu bar, and go to New. Paste the code below into the textbox and click on the OK button.

To use this calculator, type: /dam <Attack> <Defense> <Base Power> [Target HP] <Damage Multipliers>
  • Examples:
  • Porygon-Z with a +2 SpAtk boost using Ice Beam on a +1 SpDef Blissey: /dam 405*2 306*1.5 95 714
  • Persian with a Life Orb using a Technicianed Icy Wind on Skarmory: /dam 251 176 55*1.5 334 *1.3
  • Rampardos with a +6 Atk boost holding Life Orb using a super-effective STAB Stone Edge on Dragonite: /dam 471*4 226 100 324 *1.3 *2 *1.5
Code:
 
dam {
 var %basedam = $calc(($int($calc($int($calc(42 * $int($calc($1)) * $int($calc($3)) / $int($calc($2)))) / 50)) + 2) $iif($4 isnum,$5-,$4-))
 if ($4 isnum) {
   var %mn = $int($calc(%basedam *.85)) | var %mx = $int(%basedam)
   var %min = $round($calc(%mn * 100 / $4),2) | var %max = $round($calc(%mx * 100 / $4),2)
   if (%mn < $4 && %mx >= $4) {
     var %i 0 | while ($int($calc(%basedam * ((%i + 85) / 100))) < $4) { inc %i }
     var %x $int($calc($1))
     while ($int($calc(($int($calc($int($calc(42 * %x * $int($calc($3)) / $int($calc($2)))) / 50)) + 2) $5- *.85)) < $4) { inc %x }
     var %OHKO ( $+ $calc(100 - %i / .16) $+ % OHKO, $calc(%x - $int($calc($1))) more $+(point,$iif($calc(%x - $int($calc($1))) != 1,s)) required for OHKO)
   }
   if (%mn < $int($calc($4 / 2)) && %mx >= $int($calc($4 / 2))) {
     var %j 0 | var %a 0 | while (%j <= 16) {
       var %i 0 | while ($calc($int($calc(%basedam * ((%i + 85) / 100))) + $int($calc(%basedam * ((%j + 85) / 100)))) < $4 && %i < 15) { inc %i }
       inc %a %i | inc %j
     }
     var %THKO $calc((256 - %a)/2.56) $+ % 2HKO
   }
   if (%mn <= $int($calc($4 $iif($calc($4 / 16) < 1,/2-1,*15/32))) && %mx >= $int($calc($4 $iif($calc($4 / 16) < 1,/2-1,*15/32)))) {
     var %j 0 | var %a 0 | while (%j <= 16) {
       var %i 0 | while ($calc($int($calc(%basedam * ((%i + 85)/100))) + $int($calc(%basedam * ((%j + 85)/100)))) < $int($calc($4 $iif($calc($4 / 16) < 1,-1,*15/16))) && %i < 15) { inc %i }
       inc %a %i | inc %j
     }
     var %THKO $iif(%THKO,$+(%THKO,$chr(44))) $calc((256 - %a)/2.56) $+ % $iif(!%THKO,2HKO) with Sandstorm
   }
   if (%mn <= $int($calc($4 $iif($calc($4 / 16) < 1,/2+1,*17/32))) && %mx >= $int($calc($4 $iif($calc($4 / 16) < 1,/2+1,*17/32)))) {
     var %j 0 | var %a 0 | while (%j <= 16) {
       var %i 0 | while ($calc($int($calc(%basedam * ((%i + 85)/100))) + $int($calc(%basedam * ((%j + 85)/100)))) < $int($calc($4 $iif($calc($4 / 16) < 1,+1,*17/16))) && %i < 15) { inc %i }
       inc %a %i | inc %j
     }
     var %THKO $iif(%THKO,$+(%THKO,$chr(44))) $calc((256 - %a)/2.56) $+ % $iif(!%THKO,2HKO) with Leftovers
   }
   echo 4 -a $1 attack vs $2 defense, $3 $+(power,$iif($5,$+($chr(40),$5-,$chr(41))),$chr(44)) $4 max HP: %min $+ % - %max $+ % $iif(%OHKO,%OHKO) $iif(%THKO,$+($chr(40),%THKO,$chr(41)))
 }
 else { echo 4 -a $1 attack vs $2 defense, $3 $+(power,$iif($4,$+($chr(40),$4-,$chr(41))),:) $int($calc(%basedam *.85)) - $int(%basedam) }
}


If you find any bugs or if you have questions or feedback, please post them here, and be sure to pay us a visit on #Libelldra (server irc.slacknet.org, channel #libelldra) if you do get mIRC.
Weg met die foute frisdrink en take a Sisi! No Bubbles en 50% minder Suiker!
Posted Image
Libelldra Forge Élite Artists Guild | My Drawings and Sketches
Offline Profile Quote Post Goto Top
 
SNX7
Member Avatar
(>X_x)> @==('.'Q) <---This is me, owning you.
[ *  *  *  *  * ]
This is pretty sweet, thanks for writing it.
http://profile.myspace.com/index.cfm?fusea...iendID=77086925

Zero's Myspace page^^^ Check it out if you want a good laugh (The first time I looked at his pic's, I thought he was a girl o_O)
Offline Profile Quote Post Goto Top
 
IStillHaveALife
Member Avatar
History will be kind towards me for I intend to write it
[ *  *  *  *  * ]
Still cant figure out how to work this and need it for my grumpig analysis.
I may have to exacute my home, so i may not be posting soon.
Offline Profile Quote Post Goto Top
 
Iggy Koopa
Member Avatar
Draws VERY CUTE GIRLS with VERY ATTRACTIVE BREASTS.
[ *  *  *  *  * ]
I just noticed a small problem with the non-HP based damage calculations. It has been fixed and the script has been updated.
Weg met die foute frisdrink en take a Sisi! No Bubbles en 50% minder Suiker!
Posted Image
Libelldra Forge Élite Artists Guild | My Drawings and Sketches
Offline Profile Quote Post Goto Top
 
ThePoke
Member Avatar
Trainer
[ *  *  * ]
So...to get mIRC I need to put in my email? Or did I just look in the wrong place?

EDIT: Wait, ok, I did it. Now, were do you type stuff in?
Posted Image Posted Image Posted Image Posted Image

Toxicolo, Agrocolo, Toxibliss, and Agbliss all credit to FunkethElf.
Offline Profile Quote Post Goto Top
 
bobblyhead
Member Avatar
I am but a soapy illusion.
[ *  *  *  *  *  *  * ]
Wow, this is a great addition for mIRC, especially with more analysis-makers.

I'll be using this in the future for more calculations, it looks better than metalkids.
Posted Image

Credit to stingerbrg.
Offline Profile Quote Post Goto Top
 
hatdude
Member Avatar
Teh Uber Blaziken
[ *  *  *  *  * ]
I wish I knew how to code
…../|,-‘`ŻŻ`\(o)_\,----,,,_
…( `\(o),,_/` Ż : o : : `-, -patamon

Avatar courtesy of MXIIA

Posted Image
Offline Profile Quote Post Goto Top
 
ZeppelinFan24
Member Avatar
Novice
[ *  * ]
Sweet, Iggy. Thanks. This is awesome, one you learn how to use it.
And then you sense a change
Nothing feels the same
All your dreams are strange
Love comes walking in.

Some kind of alien
It's for the opening
Simply pulls a string
And love comes walking in.

TLF's Resident Classic Rock Fan
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Contributions · Next Topic »
Add Reply