function lottery takes nothing returns nothing set udg_a = GetRandomInt(1, 49) loop set udg_b = GetRandomInt(1, 49) exitwhen (udg_b!=udg_a) endloop loop set udg_c = GetRandomInt(1, 49) exitwhen (udg_c!=udg_b) and (udg_c!=udg_a) endloop loop set udg_d = GetRandomInt(1, 49) exitwhen (udg_d!=udg_c) and (udg_d!=udg_a) and (udg_d!=udg_b) endloop loop set udg_e = GetRandomInt(1, 49) exitwhen (udg_e!=udg_a) and (udg_e!=udg_b) and (udg_e!=udg_d) and (udg_e!=udg_c) endloop loop set udg_f = GetRandomInt(1, 49) exitwhen (udg_f!=udg_a) and (udg_f!=udg_b) and (udg_f!=udg_c) and (udg_f!=udg_d) and (udg_f!=udg_e) endloop call DisplayTextToForce( GetPlayersAll(), "Numbers "+I2S(udg_a)+" "+I2S(udg_b)+" "+I2S(udg_c)+" "+I2S(udg_d)+" "+I2S(udg_e)+" "+I2S(udg_f) ) endfunction