Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Truly random numbers with ranges (Lua)
--[[ Truly random numbers Lua made by Ice Scripter This program may be updated overtime Put "random()" to use the truly random number Don't worry about code between these lines. ]] -- Added ranges by DmilkaSTD -- edited and improved by 'JAMES COLLINS' local u = 0 function random(init, range_end) -- start pseudo-random number generation u = u + 1 local regular = math.floor(math.random(math.randomseed(os.time()+u))*(range_end - init)) regular = (regular + init) return regular end -- end of pseudo-random number generation -- example -- for i = 1, 10 do print(random(100, 1000)) end
run
|
edit
|
history
|
help
2
1
Weight system (Will make a C# one soon too!)
test random skill id
The Pyramid in the two-dimensional array made of random stones - Lua
Find primes until e
Replace all substring in string
123
Fixed
test3
BasicTablePrinterV2