Hello Guest

some one please give me the code which generates random number

  • 2 Replies
  • 60 Views
*

swaroop95

  • *
  • 1
  • +0/-0
    • View Profile
some one please give me the code which generates random number
« on: January 25, 2019, 04:30:40 pm »
i want a code which generates random high and low

*

Seuntjie

  • *****
  • 184
  • +0/-1
    • View Profile
Re: some one please give me the code which generates random number
« Reply #1 on: January 25, 2019, 04:53:38 pm »
Here's an example script from the 2nd page of the scripts page on the website that uses random numbers: https://bot.seuntjie.com/scripts.aspx?id=14
Here's the first two results for web-searching "lua random number": http://lua-users.org/wiki/MathLibraryTutorial and https://stackoverflow.com/questions/20154991/generating-uniform-random-numbers-in-lua

*

amit888

  • **
  • 24
  • +1/-0
    • View Profile
Re: some one please give me the code which generates random number
« Reply #2 on: January 26, 2019, 02:33:49 pm »
Put this code immediately after function dobet()
r = math.random(2)
if r == 1 then
bethigh = true
else
bethigh = false
end
 :D