I noticed that you're dividing by 12.5 - shouldn't you be dividing by 8 since you have eight possibilities? To answer your question, while GetRandomPercent always outputs an integer, you could divide the output and store it either as a float to retain the decimal places or a short/long for it to be rounded (not sure whether down or nearest). Float will be more accurate, but you are going to have to use < instead of ==. Short/long may have rounding errors so not all results will have an equal chance of happening. A simpler option might be to use rand instead: set n to rand 0 8 if n < 1 (just fire damage) elseif n < 2 (just frost damage) ... etc Probably the simplest would be for Fire, Frost and Shock damage each having a 1/3 chance of occurring, independent of each other. :)