Generating Probability in a sequence

So I work on my friend's game in my spare time writing quests and events, that sort of thing. I'm working on an event now that has got me stumped trying to work out the probability of results!

The NPC needs to hand out one of twelve items at a particular frequency when another item is turned into her. The problem is three of them need to occur 20% of the time each, another three 10% each, three more at 2% each, and the last three at 1% each. I know that to have a roughly even chance of each item, the frequencies would need to be set such as:

ifrand(8) followed by 9, 10, 11, 13, 14, 17, 20, 25, 33, and ending with (50) between the last two. I probably could've figured this one out on my own (this much was in a guide) but twelve instances of 8% is a bit more straightforward than what I need.

I don't think the code for this allows decimals but even considering integers I find myself thinking in circles! Can anyone help? How would I go about working out more progs like this in the future?

i.e. there's a 33% chance it'll be mint, otherwise it's a jawbreaker or chocolate. If it's a mint, there's a 66% chance it'll be white, if not there's a 77% chance it'll be pink, if not there's a 66% chance it'll be blue, otherwise it'll be red.

But I think what this structure will do is give a roughly 20% chance of getting White Mint, White Jawbreaker, or White Chocolate; 10% Pink Mint, Pink Jawbreaker, or Milk Chocolate; 2% chance of Blue Mint, Blue Jawbreaker, Dark Chocolate; or 1% chance of Red Mint, Red Jawbreaker, Pepper Chocolate.
Yes, all this work is to distribute candy prizes.
It makes sense in the game.