elseif construct general (language independent) rules:
The first (and only the first) elseif expression (if any) that evaluates to true would be executed.
The elseif statement is only executed if the preceding if expression and any preceding elseif expressions evaluated to false, and the current elseif expression evaluated to true (there may be glitches as usual in Morrowind scripting (forcegreeting...), but that's another story)
elseif ( Random100 < 33 ) messagebox "You hear the familiar sound of the peening of a hammer - a smith at his craft." elseif ( Random100 < 34 ) messagebox "The air is thick with the pungent smell of leather and oil." elseif ( Random100 < 33 ); this will never be executed, because there is a previous elseif evaluating true (same condition by the way, a nonsense with elseifs) messagebox "You hear the long, smooth sound of a blade being honed." endifendif
I like those three. Although I'd like to give them a third of a probability of appearing. Does elseif ( Random100 < 33 ) mean that it has a 33% chance of appearing and something like elseif ( Random100 < 67 ) means it has a 67% chance of appearing? Or do I have it backwards?
A simple rule: when using < in comparisons, use increasing order; when using >, use decreasing order.
example:
if ( Random100 < 33 ) MessageBox "< 33"elseif ( Random100 < 33 ) MessageBox "You will never see me"elseif ( Random100 < 66 ) MessageBox "< 66"else ; in any other case, no extra condition needed MessageBox ">= 66"endifif ( Random100 > 66 ) MessageBox "> 66"elseif ( Random100 > 70 ) MessageBox "You will never see me too"elseif ( Random100 > 33 ) MessageBox "> 33"else MessageBox "<= 33"endif