function getSuccess(minValue, maxValue, tries, answer)
for x = 1, tries, 1 do
if(math.random(minValue, maxValue) == answer) then
return true
end
end
return false
end
this should be what you want, it generates "tries" numbers, if one of the numbers generated...