Hello Guest

# Randomize without decimal

• 4 Replies
• 940 Views

#### ak47

• 26
• +0/-0
##### Randomize without decimal
« on: October 07, 2018, 07:07:42 pm »
I want random chance without decimal in Script
Chance=math.random(Num1*100, Num2*100)/100
I get chance like 50.12, 29.3, 76.1

#### Seuntjie

• 138
• +0/-1
##### Re: Randomize without decimal
« Reply #1 on: October 07, 2018, 10:51:12 pm »
remove the *100 and /100 parts.

#### ak47

• 26
• +0/-0
##### Re: Randomize without decimal
« Reply #2 on: October 08, 2018, 12:03:28 pm »
Thanks it worked!
Now tell me sir how to compare Wagered amount with Starting balance and if Wagered amount is 50% of starting balance then stop script
Please write short code explains it..
« Last Edit: October 08, 2018, 12:06:06 pm by ak47 »

#### Seuntjie

• 138
• +0/-1
##### Re: Randomize without decimal
« Reply #3 on: October 08, 2018, 12:30:59 pm »
No, work through the programmer mode tutorials on https://forum.seuntjie.com/index.php?topic=2.0 and try to do it yourself. If you can't get it working, post what you're tried and I'll help point you in the right direction.

#### ak47

• 26
• +0/-0
##### Re: Randomize without decimal
« Reply #4 on: October 09, 2018, 07:08:11 am »
Sir,
this worked for me from a dicebot script -
WagerTarget = 0.001
function dobet()
if (wagered) >= WagerTarget then
stop();
end
But i have 1 question if Worst loss streak happen and Wager is near to target will Script force stop in Loss? OR After a 1 win?
if stops in loss then how i change it to after a win?
WagerTarget = 0.001
function dobet()
if (wagered) >= WagerTarget then
if win then   stop();
end
end
this correct
« Last Edit: October 15, 2018, 05:36:15 am by ak47 »