LUA I've got a chance table which has a label, value which is the chance of getting that…
- User
LUA I've got a chance table which has a label, value which is the chance of getting that rareity adds up to 1, and the average price. The requiredhourly is how much money the chances need to average per hour. The timeTaken is how much time is taken between each chance in seconds. I want the timetaken to refresh everytime a chance happens
simulate running for a day (24 hours) and then print the hourly, how many jobs are done per hour and how many chances are recived.
then loop playing around with the chance value (can't go over 1) and repeat until you get close to the required hourly can go up to 50000 but can't go below 35000
local chances = { {label = 'Rare', value = 0.7992, avp = 700}, {label = 'Mythical', value = 0.1598, avp = 1500}, {label = 'Legendary', value = 0.0320, avp = 3000}, {label = 'Ancient', value = 0.0064, avp = 1000}, {label = 'Exceedingly Rare', value = 0.0026, avp = 125000} } local requiredhourly = 40000
local timeTaken = math.random(30, 60) + 7 -- seconds
- Assistant