Spirea's Diablo II Resource

Gambling

Based on information from Jarulf given in the forum.
When an item of qlvl is gambled upon, an ilvl is chosen by the formula :
ilvl = clvl - 5 + Rnd(10)
if ( ilvl < 5 ) { ilvl = 5 }
if ( ilvl > 99 ) { ilvl = 99 }

where Rnd(10) is a random number from 0-9, with uniform distribution
Chance of that item being rare is 6.99%, and the chance of the item being exceptional or elite is given by the following formula
chance of exceptional = [100*(ilvl-qlvl)/2+1]/100 %
chance of elite = [100*(ilvl-qlvl)/4+1]/100 % * ( 1-chance of exceptional )

Character Level
Item Category
Item
  Magical Rare Total
Normal % % %
Exceptional % % %
Elite % % %
Total % % %