The Capulator

For script writing
Post Reply
User avatar
wyli romesco
Spy vs. Pie
Posts: 81
Joined: Wed May 07, 2014 6:39 am

The Capulator

Post by wyli romesco » Wed Oct 22, 2014 10:23 am

Here's another teeny-tiny scriptlet, inspired by some recent AFHk chat.

For when you can't remember where you put that handy chart, here's a little doohickey that calculates the minimum +Item you need to be running to ensure you get that certain special something to drop.

Code: Select all

void main (int dropChance)
{
	if (dropChance > 0 && dropChance < 100)
	{
		int hardCap = round((10000/dropChance.to_float())-100);
		print ("To ensure that drop you need to run "+hardCap+".00% +Item.","blue");
	}
}
Yep that's all of it. No, really...

Note: Updated to correct some very slight rounding weirdness.

Post Reply