In the image below, I'm checking to see if the player has broken the dark emerald block and is picked up. Then I wanted to drop an emerald with a 50% chance in getting an emerald on the block break event that calls this procedure.
I've tried many combinations with X, + and what I'm seeing is the formula above skips the first block break and gives no emeralds. Then every block thereafter I get one emerald with the block. If I change the second digit to say 5, I get a random number of emeralds every time (1, 4, 2, etc.) which is also not what I want.
What I'm trying to add (failing miserably) is just the % chance in getting the emerald and to NOT give one predictably after breaking 1 block. I'm sure I'm doing something wrong here, so could you tell me what I'm missing? Thanks -Steve