Code:
function getSuccess(chanceNumber, chanceMultiplier, Chances, finalNum)
for cN = 1, (chanceNumber *chanceMultiplier) do
chanceNumbers = {}
addEvent(table.insert, 0*cN, chanceNumbers, math.random(1, Chances))
end
for check = 1, table.maxn(chanceNumbers) do
compare = {}
if chanceNumbers[check] == finalNum then
table.insert(compare, chanceNumbers[check])
end
end
if table.maxn(compare) >= 1 then
return TRUE
else
return FALSE
end
end
Well I will explain my script, we assume that the numbers between 1 and 2500 (Chances) I have a chance of 50 (chanceNumber) randomized numbers succeed to reach the number 250 (finalNum) drawn between the numbers who said in early 1-2500 (Chances).
Create this script based on that, but it did not work the way I like, I'm not very good with tables where the script enters numbers on them and I am still learning in this regard.
I would like your help so that I can create a script that does this function.
I appreciate the help already.
Thank you.