Thank you Joannak for your afford. But I described my problem badly in the first post.
And RamPackWobble whank you, too. But what if the first probability is 100%? Than the others whould never occur.
I have to find another way around this. :/
Edit:
And what if I instead go from low to high? So it will pass all 0% chances (they whould anyways never occur). But if the last 2 are 100% there is the same problem.
I think I now have a solution:
roll=round(random(X1+X2+X3+X4+X5+X6...))
if roll <=X1 - case 1
if roll >X1 & roll <= X1+X2 - case 2 occurs
if roll >X1+X2 & roll <= X1+X2+X3 - case 3 occurs
if roll >X1+X2+X3 & roll <= X1+X2+X3+X4 - case 4 occurs
if roll X1+X2+X3+X4 & roll <= X1+X2+X3+X4+X5 - case 5 occurs
if roll X1+X2+X3+X4+X5 & roll <= X1+X2+X3+X4+X5+X6 - case 6 occurs
So this whould ensure, that the AI does check all probabilities, even if there are more at 0% or 100%. The other good thing about this whould be that there is always an X case choosen (except all cases have 0% chance).
The values itself are dynamic but the number of X cases are static. So I think I could use this. Whould this be correct on the maths side?