Hey so I'm on Runuo 2.0 RC1 and I have tons of custom mobs and items and I'm trying to modify some item drop rates on my custom mobs but it seems to not really change at all ill post part of a script:
Code:
public override bool OnBeforeDeath()
        {
            if (Utility.Random(100) < 30) // 30% chance to drop
                switch (Utility.Random(7))
                {
                    case 0: PackItem(new MagicMansInsanity()); break;
                    case 1: PackItem(new MagicMansSanity()); break;
                    case 2: PackItem(new Tokens(10000, 25000)); break;
                    case 3: PackItem(new Tokens(10000, 25000)); break;
                    case 4: PackItem(new Tokens(10000, 25000)); break;
                    case 5: PackItem(new Tokens(10000, 25000)); break;
                    case 6: PackItem(new Tokens(10000, 25000)); break;                  
                }

            return base.OnBeforeDeath();

        }

The problem is the drop rate on most of the mobs using the utility.random100<30 does not actually give the mob a 30% drop chance for anything.. any help would be great
 
Remember that when you use Utility.Random, they are using a "0", so in your case "100" means "101"! I would use Utility.RandomDouble() < 0.3

After that, it would be 30% of chance to drop one of the things in your list... so another 1/7 chance to drop each of them.
 
Remember that when you use Utility.Random, they are using a "0", so in your case "100" means "101"! I would use Utility.RandomDouble() < 0.3

After that, it would be 30% of chance to drop one of the things in your list... so another 1/7 chance to drop each of them.
I will give this a try and let you know if it works!
 
Back