Hello Guest

How would I write this down in a script?

  • 1 Replies
  • 344 Views
How would I write this down in a script?
« on: December 18, 2018, 04:02:31 pm »
How would I do this in a script : 50% winning chance, on loosing events increase bid at 50% , on every 2 or 4 or 6 loss  increase bid by 10%

*

Seuntjie

  • *****
  • 279
  • +2/-2
    • View Profile
Re: How would I write this down in a script?
« Reply #1 on: December 18, 2018, 05:15:31 pm »
Break it up into its different parts and write down the parts in english:

chance = 50

if it's a loss (or in other words, not a win) then
 if it's a factor of 2 then
  next bet = previous bet increased by 10%
 else if it's not a factor of 2
  next bet = previous bet increased by 50%
else if it's a win
 do what you need when it's a win
end

Now see the programmer mode tutorials on https://forum.seuntjie.com/index.php?topic=2.0 and my explanation of the modulus operator on https://forum.seuntjie.com/index.php?topic=69.msg157#msg157 and convert it into code.