houseworx
|
|
December 20, 2017, 08:53:53 PM |
|
Depending on how you order the if-elseif statements, it *should* be more efficient than multiple individual "if" blocks...
This is because when checking "if-elseif" block, the interpreter will stop checking as soon as it hits the first one that evaluates as true...
However, with individual blocks, the interpreter has to evaluate every single one of them.
Therefore, you should order your if-elseif statements from "most likely" to be true to "least likely" for maximum efficiency.
thanks.
|
|
|
|
Nicoletta
Newbie
Offline
Activity: 31
Merit: 0
|
|
December 20, 2017, 10:54:34 PM |
|
Any help on this? Hello my helpful friends. I need a script to bet 1 sat on 49.50 if win bet the same bet i lose bet x2 until it gets a profit 100 sat once profit 100 sat reset and get back to 1 sat bet all this until total profit from start reaches 1000 sat than stop
how to archive that?
|
|
|
|
houseworx
|
|
December 20, 2017, 11:46:54 PM Last edit: December 20, 2017, 11:58:05 PM by houseworx |
|
Any help on this? Hello my helpful friends. I need a script to bet 1 sat on 49.50 if win bet the same bet i lose bet x2 until it gets a profit 100 sat once profit 100 sat reset and get back to 1 sat bet all this until total profit from start reaches 1000 sat than stop
how to archive that?
chance=49.50 multiplier=2 base=0.00000001 nextbet=base bethigh=true function dobet() if win then nextbet=base end else nextbet=previousbet*multiplier end if profit > 0.00000100 then resetstats() nextbet=base end if profit > 0.00001000 then stop() ching() end end if im understand right, then give a try but for me its something stpd and nonsense, what are you asking you asking on win get back to basebet (1satoshi) then where are logic to say that you need get back to 1satoshi bet, after profit 100satoshi? basebet will be 1satoshi after every win, or maybe you want increase on win to?! try to think better what you want
|
|
|
|
Nicoletta
Newbie
Offline
Activity: 31
Merit: 0
|
|
December 21, 2017, 12:50:32 AM |
|
Thanks almost correct but after win it should not change the bet it should stay wat it was before I need 2 counts or profit first everytime when profit hits 100 sato it needs to reset bet and next when total profit hits 1000 it should stop chance=49.50 multiplier=2 base=0.00000001 nextbet=base bethigh=true function dobet() if win then nextbet=base end else nextbet=previousbet*multiplier end if profit > 0.00000100 then resetstats() nextbet=base end if profit > 0.00001000 then stop() ching() end end
|
|
|
|
HCP
Legendary
Offline
Activity: 2086
Merit: 4363
<insert witty quote here>
|
|
December 21, 2017, 01:22:20 AM |
|
Thanks almost correct but after win it should not change the bet it should stay wat it was before I need 2 counts or profit first everytime when profit hits 100 sato it needs to reset bet and next when total profit hits 1000 it should stop
Try this version... Slight rearrangement, so that it only resets if the profit > 100 sats, otherwise it will just bet whatever it bet last time... Which seems a bit dangerous (if it martingales up to like 2048 sats, wins once (your profit will be 1 sat) and then goes on another long losing streak, you will lose your bankroll pretty quickly!! I hope you have a big bankroll... chance=49.50 multiplier=2 base=0.00000001 nextbet=base bethigh=true function dobet() if win then if profit > 0.00000100 then resetstats() nextbet=basebet else nextbet=previousbet end
else nextbet=previousbet*multiplier end
if profit > 0.00001000 then stop() ching() end end
|
|
|
|
Nicoletta
Newbie
Offline
Activity: 31
Merit: 0
|
|
December 21, 2017, 02:47:53 AM |
|
thanks but how to et another / second profit counter the one for total profit to stop?
|
|
|
|
houseworx
|
|
December 21, 2017, 02:57:39 AM |
|
Thanks almost correct but after win it should not change the bet it should stay wat it was before I need 2 counts or profit first everytime when profit hits 100 sato it needs to reset bet and next when total profit hits 1000 it should stop chance=49.50 multiplier=2 base=0.00000001 nextbet=base bethigh=true function dobet() if win then nextbet=base end else nextbet=previousbet*multiplier end if profit > 0.00000100 then resetstats() nextbet=base end if profit > 0.00001000 then stop() ching() end end all what you asking is in script what i given. i think you don't understand byself what are you asking and want.
|
|
|
|
HCP
Legendary
Offline
Activity: 2086
Merit: 4363
<insert witty quote here>
|
|
December 21, 2017, 03:12:24 AM |
|
Oh right... Missed the fact that the resetstats() will prevent it from ever stopping! Hahaha oops! Try this one... It records balance at the beginning and then simply compares the current balance and starting balance every roll... That will be your overall profit... Once it is above 1000 says it will stop startbalance=balance chance=49.50 multiplier=2 base=0.00000001 nextbet=base bethigh=true function dobet() if win then if profit > 0.00000100 then resetstats() nextbet=basebet else nextbet=previousbet end
else nextbet=previousbet*multiplier end
if balance - startbalance > 0.00001000 then nextbet=0 stop() ching() end end
|
|
|
|
Nicoletta
Newbie
Offline
Activity: 31
Merit: 0
|
|
December 21, 2017, 03:25:46 AM |
|
Thanks I think that there should be base not basebet? nextbet=basebet
and how can i make it randomly change hi lo?
|
|
|
|
chilly2k (OP)
Legendary
Offline
Activity: 1007
Merit: 1000
|
|
December 21, 2017, 03:42:18 AM |
|
Thanks I think that there should be base not basebet? nextbet=basebet
and how can i make it randomly change hi lo?
This is from memory.. Add this to the end, just before the last "end". And I think your right base vs basebet if math.random() < .5 then bethigh = !bethigh end .. math.random() will generate a random number between 0 - 1. so .5 would be the middle. 1/2 the time it should switch your high low betting. It will do this check after every bet. If you only want to do it for loses move it to the else path of the if win statement.
|
|
|
|
ferryantoine
Newbie
Offline
Activity: 13
Merit: 0
|
|
December 21, 2017, 01:53:07 PM |
|
You could probably set up an "array" and a counter to keep track of the last "x" bets... but the number would need to be kept to a "reasonable" level to prevent the memory usage getting too high and or the bot starting to slow down while it manipulates the array... I'm not sure I understand what it is that you are wanting to do with these 10 results tho? ... betArray = {} counter = 1 -- NOTE: LUA arrays indexed from 1 ;) ... function dobet() ... betArray[counter] = lastbet.Roll counter = counter + 1 ... if counter == 11 then -- do something based on the last 10 rolls ??? -- count them up or something and then set chance according to results? counter = 1 -- reset counter end ... end
friend, can you look at below picture to see what happens. https://ibb.co/knzB9mI need your help to track the rolled numbers. for example you can see that in last 20 bets; like 10 times bet rolled number is between 0 to 30 or 70 to 100 so I lost my bet. what I want is to write a code and track these roll number and then define an if condition to do etc. for example to reset from base or whatever. for example : if anytime in each 20 bets in a row 10 times rolled number was between 0 to 30 or 70 to 100 and we lost those bets then do bla bla bla... I hope I could explain myself. thank you for your help btw.
|
|
|
|
Nicoletta
Newbie
Offline
Activity: 31
Merit: 0
|
|
December 21, 2017, 07:20:06 PM |
|
ok now i am trying to merge my 2 scripts and i am doin something wrong i want the script to proceed with the second strategy but looking and counting if there are 99% in the row is no 1st one counting the 99% and betting 1% after 3 basebet= 0.00000001 nextbet=basebet chance=49.5
highCount=0 lowCount=0 previousbetBackup=basebet
function dobet() if lastBet.Roll > 99 then highCount = highCount+1 else highCount = 0 end if lastBet.Roll < 1 then lowCount = lowCount+1 else lowCount = 0 end
if highCount >= 3 then bethigh = false nextbet = balance * 0.01 chance=90.0 else if lowCount >= 3 then bethigh = true nextbet = balance * 0.01 chance=90.0 else chance=49.5
if win then nextbet = basebet else nextbet = previousbetBackup*2 end previousbetBackup = nextbet end
end end end second one that is betting and multiplies without stop until it gets to profit o 100 sat than restarts the bet to the beginning and stops when reaches the total profit o 1000 startbalance=balance chance=49.50 multiplier=2 base=0.00000001 nextbet=base bethigh=true function dobet() if win then if profit > 0.00000100 then resetstats() nextbet=basebet else nextbet=previousbet end
else nextbet=previousbet*multiplier end
if balance - startbalance > 0.00001000 then nextbet=0 stop() ching() end end how to merge them?
|
|
|
|
houseworx
|
|
December 21, 2017, 07:34:10 PM |
|
ok now i am trying to merge my 2 scripts and i am doin something wrong i want the script to proceed with the second strategy but looking and counting if there are 99% in the row is no 1st one counting the 99% and betting 1% after 3 basebet= 0.00000001 nextbet=basebet chance=49.5
highCount=0 lowCount=0 previousbetBackup=basebet
function dobet() if lastBet.Roll > 99 then highCount = highCount+1 else highCount = 0 end if lastBet.Roll < 1 then lowCount = lowCount+1 else lowCount = 0 end
if highCount >= 3 then bethigh = false nextbet = balance * 0.01 chance=90.0 else if lowCount >= 3 then bethigh = true nextbet = balance * 0.01 chance=90.0 else chance=49.5
if win then nextbet = basebet else nextbet = previousbetBackup*2 end previousbetBackup = nextbet end
end end end second one that is betting and multiplies without stop until it gets to profit o 100 sat than restarts the bet to the beginning and stops when reaches the total profit o 1000 startbalance=balance chance=49.50 multiplier=2 base=0.00000001 nextbet=base bethigh=true function dobet() if win then if profit > 0.00000100 then resetstats() nextbet=basebet else nextbet=previousbet end
else nextbet=previousbet*multiplier end
if balance - startbalance > 0.00001000 then nextbet=0 stop() ching() end end how to merge them? sorry I dont understand what you want. maybe others do.
|
|
|
|
Nicoletta
Newbie
Offline
Activity: 31
Merit: 0
|
|
December 21, 2017, 09:01:02 PM |
|
OK i have 2 scripts that you helped me to build this one is betting on 49.5 and doubles the bet on lose but does not reset on first win only resets when reaches 100 sat profit and stops on 1000 total profit and changes hi lo randomly. startbalance=balance chance=49.50 multiplier=2 base=0.00000001 nextbet=base bethigh=true function dobet() if win then if profit > 0.00000100 then resetstats() nextbet=basebet else nextbet=previousbet end
else nextbet=previousbet*multiplier end
if balance - startbalance > 0.00001000 then nextbet=0 stop() ching() end end what i want add to it is what the second script does it hunts for rows of numbers below 1% or above 99% and if streak is 3 it bets 1% on oposite as in this script basebet= 0.00000001 nextbet=basebet chance=49.5
highCount=0 lowCount=0 previousbetBackup=basebet
function dobet() if lastBet.Roll > 99 then highCount = highCount+1 else highCount = 0 end if lastBet.Roll < 1 then lowCount = lowCount+1 else lowCount = 0 end
if highCount >= 3 then bethigh = false nextbet = balance * 0.01 chance=90.0 else if lowCount >= 3 then bethigh = true nextbet = balance * 0.01 chance=90.0 else chance=49.5
if win then nextbet = basebet else nextbet = previousbetBackup*2 end previousbetBackup = nextbet end
end end end So i need one script to do it all combine them.
|
|
|
|
houseworx
|
|
December 21, 2017, 10:47:39 PM Last edit: December 23, 2017, 04:55:02 PM by houseworx |
|
Seuntjie, HCP, Chilly2k anyone can help me please, I cant figure out by myself. what I want: start() -he will bet basebet without increasing(nextbet=previousbet*multiplier1) -after X currentstreak, he will start increase basebet(nextbet=previousbet*multiplier2) till win. -if he are winning and profit more X then he are reseting stats and reset to basebet, and first X streak without increase nextbet like from start, and after X currentstreak again increasing till win. -if he are winning and profit below X then(nextbet=previousbet*multiplier3) AND he will increasing nextbet with multiplier2 from first bet, not from X currentstreak. *I need only, after function dobet win, lose, else sections. thanks, hope for replies!
|
|
|
|
Nicoletta
Newbie
Offline
Activity: 31
Merit: 0
|
|
December 22, 2017, 12:24:30 AM |
|
Is there any way to combine this 2 scripts? OK i have 2 scripts that you helped me to build this one is betting on 49.5 and doubles the bet on lose but does not reset on first win only resets when reaches 100 sat profit and stops on 1000 total profit and changes hi lo randomly. startbalance=balance chance=49.50 multiplier=2 base=0.00000001 nextbet=base bethigh=true function dobet() if win then if profit > 0.00000100 then resetstats() nextbet=basebet else nextbet=previousbet end
else nextbet=previousbet*multiplier end
if balance - startbalance > 0.00001000 then nextbet=0 stop() ching() end end what i want add to it is what the second script does it hunts for rows of numbers below 1% or above 99% and if streak is 3 it bets 1% on oposite as in this script basebet= 0.00000001 nextbet=basebet chance=49.5
highCount=0 lowCount=0 previousbetBackup=basebet
function dobet() if lastBet.Roll > 99 then highCount = highCount+1 else highCount = 0 end if lastBet.Roll < 1 then lowCount = lowCount+1 else lowCount = 0 end
if highCount >= 3 then bethigh = false nextbet = balance * 0.01 chance=90.0 else if lowCount >= 3 then bethigh = true nextbet = balance * 0.01 chance=90.0 else chance=49.5
if win then nextbet = basebet else nextbet = previousbetBackup*2 end previousbetBackup = nextbet end
end end end So i need one script to do it all combine them.
|
|
|
|
B4RF
|
|
December 22, 2017, 10:03:30 AM |
|
Is there any way to combine this 2 scripts? OK i have 2 scripts that you helped me to build this one is betting on 49.5 and doubles the bet on lose but does not reset on first win only resets when reaches 100 sat profit and stops on 1000 total profit and changes hi lo randomly. startbalance=balance chance=49.50 multiplier=2 base=0.00000001 nextbet=base bethigh=true function dobet() if win then if profit > 0.00000100 then resetstats() nextbet=basebet else nextbet=previousbet end
else nextbet=previousbet*multiplier end
if balance - startbalance > 0.00001000 then nextbet=0 stop() ching() end end what i want add to it is what the second script does it hunts for rows of numbers below 1% or above 99% and if streak is 3 it bets 1% on oposite as in this script basebet= 0.00000001 nextbet=basebet chance=49.5
highCount=0 lowCount=0 previousbetBackup=basebet
function dobet() if lastBet.Roll > 99 then highCount = highCount+1 else highCount = 0 end if lastBet.Roll < 1 then lowCount = lowCount+1 else lowCount = 0 end
if highCount >= 3 then bethigh = false nextbet = balance * 0.01 chance=90.0 else if lowCount >= 3 then bethigh = true nextbet = balance * 0.01 chance=90.0 else chance=49.5
if win then nextbet = basebet else nextbet = previousbetBackup*2 end previousbetBackup = nextbet end
end end end So i need one script to do it all combine them. I simply used the second script added the balance check at the end and exchanged the "if win" statement while using the previousbetBackup variable instead. This should do the trick although I didnt test it. startbalance=balance basebet= 0.00000001 nextbet=basebet chance=49.5 multiplier=2
highCount=0 lowCount=0 previousbetBackup=basebet
function dobet() if lastBet.Roll > 99 then highCount = highCount+1 else highCount = 0 end if lastBet.Roll < 1 then lowCount = lowCount+1 else lowCount = 0 end
if highCount >= 3 then bethigh = false nextbet = balance * 0.01 chance=90.0 else if lowCount >= 3 then bethigh = true nextbet = balance * 0.01 chance=90.0 else chance=49.5 if win then if profit > 0.00000100 then resetstats() nextbet=basebet else nextbet=previousbetBackup end else nextbet=previousbetBackup*multiplier end previousbetBackup = nextbet end end if balance - startbalance > 0.00001000 then nextbet=0 stop() ching() end end
|
▄▄▄████████▄▄▄ ▄██████████████████▄ ▄██████████████████████▄ ██████████████████████████ ████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ██████████████████████████████ ████████████████████████████ ██████████████████████████ ▀██████████████████████▀ ▀██████████████████▀ ▀▀▀████████▀▀▀
| | | | ███████ ██████████ ██████████ ██████████ ██████████ ██████████ ██████████ ██████████ ██████████ ██████████ ██████████ ██████████ ███████ | | | | ▄▄██████████████▄▄ ▄██████████████████████▄ █████ ▄██████████████████████████▄ █████ ████ ▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄ ████ ▄██▀ ████ █████ ██████ █████ ████ ▄██▀ ████ █████ ██████ █████ ████ ██▀ ████ █████ ██████ █████ ████ ██ ████ ▀▀▀▀▀ ▀▀▀▀▀▀ ▀▀▀▀▀ ████ ▄██████▄ ████████████████████████████ ████████ ███████▀ ▀███████ ▀██████▀ █████▀ ▀█████ ▀██████████████████████████▀ ▀▀████████████████████▀▀ | | |
|
|
|
Nicoletta
Newbie
Offline
Activity: 31
Merit: 0
|
|
December 22, 2017, 01:48:24 PM |
|
Thank you all for help 2 more questions 1. how can i make this script to start to bet basebet after 3 losses in the row? 2. how to make this script to bet 10% o the balance on 90% chance randomly every 20-50 won bets? startbalance=balance chance=49.5 multiplier=2 base=balance/1000 nextbet=base bethigh=false resetstats()
function dobet() base=balance/1000
if math.random() < .5 then bethigh = !bethigh end if win then
if profit > balance/2000 then resetstats()
nextbet=base else nextbet=previousbet end
else nextbet=previousbet*multiplier end
if balance - startbalance > 0.00100000 then stop() ching() end end
|
|
|
|
houseworx
|
|
December 23, 2017, 04:55:17 PM |
|
Seuntjie, HCP, Chilly2k anyone can help me please, I cant figure out by myself. what I want: start() -he will bet basebet without increasing(nextbet=previousbet*multiplier1) -after X currentstreak, he will start increase basebet(nextbet=previousbet*multiplier2) till win. -if he are winning and profit more X then he are reseting stats and reset to basebet, and first X streak without increase nextbet like from start, and after X currentstreak again increasing till win. -if he are winning and profit below X then(nextbet=previousbet*multiplier3) AND he will increasing nextbet with multiplier2 from first bet, not from X currentstreak. *I need only, after function dobet win, lose, else sections. thanks, hope for replies! anyone please?!
|
|
|
|
Nicoletta
Newbie
Offline
Activity: 31
Merit: 0
|
|
December 29, 2017, 01:57:58 AM |
|
???Any idea how to do that? Thank you all for help 2 more questions 1. how can i make this script to start to bet basebet after 3 losses in the row? 2. how to make this script to bet 10% o the balance on 90% chance randomly every 20-50 won bets? startbalance=balance chance=49.5 multiplier=2 base=balance/1000 nextbet=base bethigh=false resetstats()
function dobet() base=balance/1000
if math.random() < .5 then bethigh = !bethigh end if win then
if profit > balance/2000 then resetstats()
nextbet=base else nextbet=previousbet end
else nextbet=previousbet*multiplier end
if balance - startbalance > 0.00100000 then stop() ching() end end
|
|
|
|
|