Bitcoin Forum
April 25, 2024, 05:10:48 AM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 [35] 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 »
  Print  
Author Topic: Seuntjie' Dice bot programmers mode discussion.  (Read 125126 times)
seuntjie
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



View Profile WWW
June 12, 2017, 08:44:35 PM
 #681

How do i code if i want to multiply after every 3 turn loss/win

Can anyone help me with this, thanks

Examples make everyones life easier if you can't speak english properly

1714021848
Hero Member
*
Offline Offline

Posts: 1714021848

View Profile Personal Message (Offline)

Ignore
1714021848
Reply with quote  #2

1714021848
Report to moderator
Bitcoin mining is now a specialized and very risky industry, just like gold mining. Amateur miners are unlikely to make much money, and may even lose money. Bitcoin is much more than just mining, though!
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1714021848
Hero Member
*
Offline Offline

Posts: 1714021848

View Profile Personal Message (Offline)

Ignore
1714021848
Reply with quote  #2

1714021848
Report to moderator
1714021848
Hero Member
*
Offline Offline

Posts: 1714021848

View Profile Personal Message (Offline)

Ignore
1714021848
Reply with quote  #2

1714021848
Report to moderator
Phyzyprogrammer
Member
**
Offline Offline

Activity: 90
Merit: 10

Visit www.btcscriptbot.wordpress.com to get latest


View Profile WWW
June 12, 2017, 10:43:25 PM
 #682

helo guys its me again,

i just saw this script i downloaded but i wanted to add stop on loss in it but its not stoping even after i added the code ,
can anyone pls let me know what am doing wrong
thankx alo

Code:
-- The Russian Roulette by McGuyver
-- If you like my scrypt, your donations are much welcome ;)
-- My BTC Wallet: 33kx7iqfjSLuEAoW7EasLs83vontLmCvAE

chance1=8.9189              -->11.10X payout
chance2=10.1020             --> 9.8X payout
chance3=13.0263             --> 7.6X Payout
chance4=18.3333             --> 5.4X Payout
chance5=30.9375             --> 3.2X Payout

m1=1.119         --> Multipliers

(Increase on Lose 1.119=11.9% Inc on lose)
m2=1.137
m3=1.182
m4=1.274
m5=1.546

target=0.00100000     --> Set your Target Profit

here

prebet=0.00000001
betfactor=0.00002           --> very conservative to absorb max

losses with profit on win (Bankroll*0.00002 = basebet)
basebet=balance*betfactor --> 2 sats basebet at .0005 BTC,

basebet increases as balance increases; basebet=0.00000002

(fixed basebet) 
nextbet=prebet
chance=chance1
bethigh=false

startBalance = balance               -- this is the where i put the stop on win button
runprofit = 0

lostchance=1
losecount=0
wincount=0
trigger=0
betcount=0
preroll=9
counter=0
high=0
low=0



resetseed()
--resetstats()              --> To reset your statistics, remove

the double dash (--)

function dobet()

loadgun()
betroll()
rstseed()
viewstats()
betcount+=1

if basebet<0.00000002 then  --> Change this for a higher basebet

(Both Values)
basebet=0.00000002
end

e=currentstreak+preroll

if win then

goal()
loadgun()
basebet=balance*betfactor

if basebet<0.00000002 then  --> Change this for a higher

basebet (Both Values)
basebet=0.00000002
end

nextbet=prebet
wincount+=1
losecount=0

hilo()

if trigger==1 then
chance=chance1
lostchance=1
preroll=9
end

if trigger==2 then
chance=chance2
lostchance=2
preroll=8
end

if trigger==3 then
chance=chance3
lostchance=3
preroll=5
end

if trigger==4 then
chance=chance4
lostchance=4
preroll=4
end

if trigger==5 then
chance=chance5
lostchance=5
preroll=1
end

else
losecount+=1
nexbet=prebet

if lostchance==1 then
if e == 0 then
chance=chance1
nextbet=basebet
end

if e <0 then
chance=chance1
nextbet=previousbet*m1
end
end

if lostchance==2 then
if e == 0 then
chance=chance2
nextbet=basebet
end

if e <0 then
chance=chance2
nextbet=previousbet*m2
end
end

if lostchance==3 then
if e == 0 then
chance=chance3
nextbet=basebet
end

if e <0 then
chance=chance3
nextbet=previousbet*m3
end
end

if lostchance==4 then
if e == 0 then
chance=chance4
nextbet=basebet
end

if e <0 then
chance=chance4
nextbet=previousbet*m4
end

end

if lostchance==5 then
-- randomizer()
if e == 0 then
chance=chance5
nextbet=basebet
end

if e <0 then
chance=chance5
nextbet=previousbet*m5
end

end

end

end

function hilo()

        if high > low then
bethigh=true
        else
bethigh=false
        end

       if (high-low) > 5 then
bethigh=false
        end

        if (low-high)> 5 then
bethigh=true
        end
end

function betroll()

if (lastBet.roll < chance) then
low += 1
end

if (lastBet.roll > (99.99 - chance)) then
high += 1
end

end

function rstseed()

if counter==500 then

resetseed()
counter=0
low=0
high=0
else

counter+=1

end
end

function viewstats()
print(" ")
print("Total Bet : "..betcount)
print("Current Streak Loss : "..losecount)
print("Wins : "..wincount)
print("Losses : "..(betcount-wincount))
print("Current Profit : "..string.format("%.8f",profit))
print("Target Profit : "..string.format("%.8f",target))
print("Current Balance : "..string.format("%.8f",balance))
print("High :"..high.." / ".."Low :"..low)
print(" ")
end

function randomizer()

r=math.random(2)

if r==2 then
bethigh=true
else
bethigh=false
end

end

function loadgun()

t=math.random(5)

trigger=t

end

function goal()
if profit>target then
stop()
print(" ")
print("TARGET REACHED!!!")
print(" ")
print("Total Wins : "..wincount)
print("Total Losses : "..(betcount-wincount))
print("Total Bet : "..betcount)
print("Current Profit : "..string.format("%.8f",profit))
print("Target Profit : "..string.format("%.8f",target))
print("Final Balance : "..string.format("%.8f",balance))
print(" ")

runprofit = balance - startBalance
  if runprofit <= -0.001 then  -- 0.001 BTC loss            -- this is whwer i put the stop on win
    nextbet = 0
    stop()
  end

end

visit (www.btcscriptbot.wordpress.com) we offer latest scripts and bots to earn bitcoins and other altcoins for free and paid! Earn Bitcoins with bots
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
June 12, 2017, 11:07:28 PM
 #683

You need to put the runprofit calculation OUTSIDE of the "if profit>target then" block... You have put it inside that block... so it will only do that calculation if profit>target... Roll Eyes

Basically, you are missing an "end" statement:
Quote
function goal()
  if profit>target then
    stop()
    print(" ")
    print("TARGET REACHED!!!")
    print(" ")
    print("Total Wins : "..wincount)
    print("Total Losses : "..(betcount-wincount))
    print("Total Bet : "..betcount)
    print("Current Profit : "..string.format("%.8f",profit))
    print("Target Profit : "..string.format("%.8f",target))
    print("Final Balance : "..string.format("%.8f",balance))
    print(" ")
  end

  runprofit = balance - startBalance
  if runprofit <= -0.001 then  -- 0.001 BTC loss            -- this is whwer i put the stop on win
    nextbet = 0
    stop()
  end   

end

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Phyzyprogrammer
Member
**
Offline Offline

Activity: 90
Merit: 10

Visit www.btcscriptbot.wordpress.com to get latest


View Profile WWW
June 12, 2017, 11:43:24 PM
 #684

You need to put the runprofit calculation OUTSIDE of the "if profit>target then" block... You have put it inside that block... so it will only do that calculation if profit>target... Roll Eyes

Basically, you are missing an "end" statement:
Quote
function goal()
  if profit>target then
    stop()
    print(" ")
    print("TARGET REACHED!!!")
    print(" ")
    print("Total Wins : "..wincount)
    print("Total Losses : "..(betcount-wincount))
    print("Total Bet : "..betcount)
    print("Current Profit : "..string.format("%.8f",profit))
    print("Target Profit : "..string.format("%.8f",target))
    print("Final Balance : "..string.format("%.8f",balance))
    print(" ")
  end

  runprofit = balance - startBalance
  if runprofit <= -0.001 then  -- 0.001 BTC loss            -- this is whwer i put the stop on win
    nextbet = 0
    stop()
  end   

end


tankx fop ur reply bro , i hv put the (end) tatement in it,,,,
but its just running and it didint stop when it reached the loss terget,,

plus i dont understand what u mean by
Quote
You need to put the runprofit calculation OUTSIDE of the "if profit>target then" block... You have put it inside that block... so it will only do that calculation if profit>target... Roll Eyes

pls explain more sir thankx alot and bless u

visit (www.btcscriptbot.wordpress.com) we offer latest scripts and bots to earn bitcoins and other altcoins for free and paid! Earn Bitcoins with bots
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
June 13, 2017, 02:23:12 AM
 #685

well... as has been explained several times... an "if-then-else" statement is in the form:

Quote
if (some condition is true) then
  .. do some stuff ..
else
  .. do something else ..
end
All the code between the "if-then" and "end" (or "else" if there is an "else") will only execute if the condition evaluates to "True".

In your instance... you had put the runprofit calculation inside the "if profit>target then" section. So unless profit was greater than target, the runprofit calculation would not happen. Tongue

Anyway, the main reason for your stoploss not working, is that the goal() function where you are doing the runprofit calculation, is ONLY called if a bet wins... so it will never do the runprofit calculation on a loss, so it will never detect that you've lost any amount and stop Roll Eyes

Quote
if win then
   
   goal()
   loadgun()
   basebet=balance*betfactor
....
else
   losecount+=1
   nexbet=prebet
....
end

To fix this, you can either put the call to goal() in the dobet() function, but outside of the "if win then-else" section, so it is called for every roll... or you can add a call to goal() inside the "else" section of the "if win then-else" part of the code.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
Phyzyprogrammer
Member
**
Offline Offline

Activity: 90
Merit: 10

Visit www.btcscriptbot.wordpress.com to get latest


View Profile WWW
June 13, 2017, 08:44:47 AM
 #686

thankx for repling bro, lols if i tell u , u wouldnt belive me but still i hv to tell u (i dont understand a thing of what u hv just told me....
pls could u break it down? mnore cus my head is like  Cry spinning

well... as has been explained several times... an "if-then-else" statement is in the form:

Quote
if (some condition is true) then
  .. do some stuff ..
else
  .. do something else ..
end
All the code between the "if-then" and "end" (or "else" if there is an "else") will only execute if the condition evaluates to "True".

In your instance... you had put the runprofit calculation inside the "if profit>target then" section. So unless profit was greater than target, the runprofit calculation would not happen. Tongue

Anyway, the main reason for your stoploss not working, is that the goal() function where you are doing the runprofit calculation, is ONLY called if a bet wins... so it will never do the runprofit calculation on a loss, so it will never detect that you've lost any amount and stop Roll Eyes

Quote
if win then
   
   goal()
   loadgun()
   basebet=balance*betfactor
....
else
   losecount+=1
   nexbet=prebet
....
end

To fix this, you can either put the call to goal() in the dobet() function, but outside of the "if win then-else" section, so it is called for every roll... or you can add a call to goal() inside the "else" section of the "if win then-else" part of the code.

visit (www.btcscriptbot.wordpress.com) we offer latest scripts and bots to earn bitcoins and other altcoins for free and paid! Earn Bitcoins with bots
kwong1983
Newbie
*
Offline Offline

Activity: 54
Merit: 0


View Profile
June 13, 2017, 10:36:12 AM
 #687

How do i code if i want to multiply after every 3 turn loss/win

Can anyone help me with this, thanks

So you have a basebet and want to multipy that bet after every 3rd bet? Or only when you lost 3 bets in a row?

I think that kind of stuff is already possible in the advanced mode, right? You wont need any code for that.

Multiply after lost 3 bets in a row
B4RF
Hero Member
*****
Offline Offline

Activity: 813
Merit: 507


View Profile
June 13, 2017, 05:21:40 PM
 #688

How do i code if i want to multiply after every 3 turn loss/win

Can anyone help me with this, thanks

So you have a basebet and want to multipy that bet after every 3rd bet? Or only when you lost 3 bets in a row?

I think that kind of stuff is already possible in the advanced mode, right? You wont need any code for that.

Multiply after lost 3 bets in a row

Use the settings mode 'Advanced' and under strategies you use maritngale and insert 3 in the textbox of 'Multiply after every [ ] loss'.

There is no need for the programmersmode if you wanne use only a small variation of martingale.


▄▄▄████████▄▄▄
▄██████████████████▄
▄██████████████████████▄
██████████████████████████
████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
██████████████████████████████
████████████████████████████
██████████████████████████
▀██████████████████████▀
▀██████████████████▀
▀▀▀████████▀▀▀
   ███████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
██████████
███████
BTC  ◉PLAY  ◉XMR  ◉DOGE  ◉BCH  ◉STRAT  ◉ETH  ◉GAS  ◉LTC  ◉DASH  ◉PPC
     ▄▄██████████████▄▄
  ▄██████████████████████▄        █████
▄██████████████████████████▄      █████
████ ▄▄▄▄▄ ▄▄▄▄▄▄ ▄▄▄▄▄ ████     ▄██▀
████ █████ ██████ █████ ████    ▄██▀
████ █████ ██████ █████ ████    ██▀
████ █████ ██████ █████ ████    ██
████ ▀▀▀▀▀ ▀▀▀▀▀▀ ▀▀▀▀▀ ████ ▄██████▄
████████████████████████████ ████████
███████▀            ▀███████ ▀██████▀
█████▀                ▀█████
▀██████████████████████████▀
  ▀▀████████████████████▀▀ 
✔️DICE           
✔️BLACKJACK
✔️PLINKO
✔️VIDEO POKER
✔️ROULETTE     
✔️LOTTO
Phyzyprogrammer
Member
**
Offline Offline

Activity: 90
Merit: 10

Visit www.btcscriptbot.wordpress.com to get latest


View Profile WWW
June 13, 2017, 09:14:12 PM
 #689

still here guys

thankx for repling bro, lols if i tell u , u wouldnt belive me but still i hv to tell u (i dont understand a thing of what u hv just told me....
pls could u break it down? mnore cus my head is like  Cry spinning

well... as has been explained several times... an "if-then-else" statement is in the form:

Quote
if (some condition is true) then
  .. do some stuff ..
else
  .. do something else ..
end
All the code between the "if-then" and "end" (or "else" if there is an "else") will only execute if the condition evaluates to "True".

In your instance... you had put the runprofit calculation inside the "if profit>target then" section. So unless profit was greater than target, the runprofit calculation would not happen. Tongue

Anyway, the main reason for your stoploss not working, is that the goal() function where you are doing the runprofit calculation, is ONLY called if a bet wins... so it will never do the runprofit calculation on a loss, so it will never detect that you've lost any amount and stop Roll Eyes

Quote
if win then
   
   goal()
   loadgun()
   basebet=balance*betfactor
....
else
   losecount+=1
   nexbet=prebet
....
end

To fix this, you can either put the call to goal() in the dobet() function, but outside of the "if win then-else" section, so it is called for every roll... or you can add a call to goal() inside the "else" section of the "if win then-else" part of the code.

visit (www.btcscriptbot.wordpress.com) we offer latest scripts and bots to earn bitcoins and other altcoins for free and paid! Earn Bitcoins with bots
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
June 14, 2017, 02:19:45 AM
 #690

still here guys
Cool story bro... Roll Eyes

Maybe you should be using the time you wait for someone to reply to you to go and read https://www.tutorialspoint.com/lua/ or one of the other thousands of "learn to program" tutorials that you can find using google

While you're at it, you might like to learn how to edit your messages when you press the "quote" button... re-quoting massive messages and adding 3 words (of impatient whining that no-one is helping you) is both annoying and poor etiquette.

The folks here have been INSANELY patient with you... perhaps you should return the favour by asking your question and then waiting patiently for someone to help you out... Remember, we don't get paid to sit on bitcointalk 24/7, we're not employees... and I'm sure most people here have jobs, families and lives outside of bitcointalk...

I can't speak for the others, but I personally do this because I genuinely enjoy helping people... until they act like entitled, spoiled brats...  Angry

#sorryNotSorry

thankx for repling bro, lols if i tell u , u wouldnt belive me but still i hv to tell u (i dont understand a thing of what u hv just told me....
pls could u break it down? mnore cus my head is like  Cry spinning
Once again... an "if-then-else" statement is in the form:

Quote
if (some condition is true) then
  .. do some stuff ..
else
  .. do something else ..
end
All the code between the "if-then" and "else" (ie. .. do some stuff ..) will only execute if the condition evaluates to "True". If the condition is "False", then the code between the "else" and "end" (ie. .. do something else ..) will be executed instead. So each time this "if-then-else" section is executed, only ONE part of it will actually be run.

You put your "stoploss" code inside the "if profit>target then" section. So unless profit was greater than target, your stoploss code would not be executed.

Additionally, you put your "stoploss" code inside the "goal()" function. According to your script, "goal()" is ONLY called if a bet wins as it is inside the "if win then" section... This means that your stoploss code will not run if your bet is a loss. It would only be run if your bet was a "win" AND Profit > target. Obviously, this means that it will never detect that you've lost too much money... so it will never make your program stop!

Quote
if win then
    -- THIS CODE GETS EXECUTED ON WIN
    goal()
    loadgun()
    basebet=balance*betfactor
    ....
else
    -- THIS CODE GETS EXECUTED ON LOSS
    losecount+=1
    nexbet=prebet
    ....
end

To fix this, you can either put the call to goal() BEFORE the "if win then-else" section, so it is called for every single roll... or you can add a call to goal() inside the "else" section of the "if win then-else" part of the code right before losecount+=1 so that it is also called when your roll is a loss.

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
kwong1983
Newbie
*
Offline Offline

Activity: 54
Merit: 0


View Profile
June 14, 2017, 08:07:14 AM
 #691

How do i code if i want to multiply after every 3 turn loss/win

Can anyone help me with this, thanks

So you have a basebet and want to multipy that bet after every 3rd bet? Or only when you lost 3 bets in a row?

I think that kind of stuff is already possible in the advanced mode, right? You wont need any code for that.

Multiply after lost 3 bets in a row

Use the settings mode 'Advanced' and under strategies you use maritngale and insert 3 in the textbox of 'Multiply after every [ ] loss'.

There is no need for the programmersmode if you wanne use only a small variation of martingale.

I know this can be done in advance mode but there is some limitation that i need to put that is not avaliable in advance. Can you help me out?
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
June 14, 2017, 10:02:20 AM
 #692

Just put in a counter to count your losses... reset it when you win (or hit 3 losses)... check it on a loss and if it equals 3 then multiply Wink

Code:
...
losscount = 0
...
function dobet()
  ...
  if win then
    losscount = 0
    ...
  else
    losscount = losscount + 1
    if losscount == 3 then
      nextbet = previousbet * multiplier
      losscount = 0
    end
    ...
  end

end


█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
seuntjie
Legendary
*
Offline Offline

Activity: 1717
Merit: 1125



View Profile WWW
June 14, 2017, 10:51:14 AM
 #693

Just put in a counter to count your losses... reset it when you win (or hit 3 losses)... check it on a loss and if it equals 3 then multiply Wink

Code:
...
losscount = 0
...
function dobet()
  ...
  if win then
    losscount = 0
    ...
  else
    losscount = losscount + 1
    if losscount == 3 then
      nextbet = previousbet * multiplier
      losscount = 0
    end
    ...
  end

end


You could also use currentstreak and modulus.

Code:
...
function dobet()
  ...
  if win then
    ...
  else
    if currentstreak%3==0 then
      nextbet = previousbet * multiplier
    end
    ...
  end

end


Phyzyprogrammer
Member
**
Offline Offline

Activity: 90
Merit: 10

Visit www.btcscriptbot.wordpress.com to get latest


View Profile WWW
June 14, 2017, 12:52:56 PM
 #694

Not cool bro, Huh but i really dont blame you  Roll Eyes
really not cool but thankx anyways it worked now

still here guys
Cool story bro... Roll Eyes

Maybe you should be using the time you wait for someone to reply to you to go and read https://www.tutorialspoint.com/lua/ or one of the other thousands of "learn to program" tutorials that you can find using google

While you're at it, you might like to learn how to edit your messages when you press the "quote" button... re-quoting massive messages and adding 3 words (of impatient whining that no-one is helping you) is both annoying and poor etiquette.

The folks here have been INSANELY patient with you... perhaps you should return the favour by asking your question and then waiting patiently for someone to help you out... Remember, we don't get paid to sit on bitcointalk 24/7, we're not employees... and I'm sure most people here have jobs, families and lives outside of bitcointalk...

I can't speak for the others, but I personally do this because I genuinely enjoy helping people... until they act like entitled, spoiled brats...  Angry

#sorryNotSorry

thankx for repling bro, lols if i tell u , u wouldnt belive me but still i hv to tell u (i dont understand a thing of what u hv just told me....
pls could u break it down? mnore cus my head is like  Cry spinning
Once again... an "if-then-else" statement is in the form:

Quote
if (some condition is true) then
  .. do some stuff ..
else
  .. do something else ..
end
All the code between the "if-then" and "else" (ie. .. do some stuff ..) will only execute if the condition evaluates to "True". If the condition is "False", then the code between the "else" and "end" (ie. .. do something else ..) will be executed instead. So each time this "if-then-else" section is executed, only ONE part of it will actually be run.

You put your "stoploss" code inside the "if profit>target then" section. So unless profit was greater than target, your stoploss code would not be executed.

Additionally, you put your "stoploss" code inside the "goal()" function. According to your script, "goal()" is ONLY called if a bet wins as it is inside the "if win then" section... This means that your stoploss code will not run if your bet is a loss. It would only be run if your bet was a "win" AND Profit > target. Obviously, this means that it will never detect that you've lost too much money... so it will never make your program stop!

Quote
if win then
    -- THIS CODE GETS EXECUTED ON WIN
    goal()
    loadgun()
    basebet=balance*betfactor
    ....
else
    -- THIS CODE GETS EXECUTED ON LOSS
    losecount+=1
    nexbet=prebet
    ....
end

To fix this, you can either put the call to goal() BEFORE the "if win then-else" section, so it is called for every single roll... or you can add a call to goal() inside the "else" section of the "if win then-else" part of the code right before losecount+=1 so that it is also called when your roll is a loss.

visit (www.btcscriptbot.wordpress.com) we offer latest scripts and bots to earn bitcoins and other altcoins for free and paid! Earn Bitcoins with bots
BossMacko
Hero Member
*****
Offline Offline

Activity: 1134
Merit: 502



View Profile
June 18, 2017, 12:55:40 AM
 #695

Hello guys, i just want to ask if it is possible to implement 2 scripts in advanced mode? for example if script 1 lose a bet it will call and run script 2 until the function dobet of script 2 is completed then it will call script 1 again. I am thinking of a case switch but i can't implement it in lua language. thanks in advanced.
HCP
Legendary
*
Offline Offline

Activity: 2086
Merit: 4316

<insert witty quote here>


View Profile
June 18, 2017, 02:28:12 AM
 #696

Firstly, you can't run scripts in Advanced mode, only programmer mode.

And, No you can't get it to load extra scripts. You can only run what is inside the script window.

As a solution to your problem, you could just create two functions outside of the dobet() function... call one scriptOneStuff() and scriptTwoStuff() and then just call whichever one you want based on the outcome of your rolls or whatever other conditions you are wanting to base the script changing conditions on... something like

Code:
...
function dobet()

  if (win) then
    scriptOneStuff()
  else
    scriptTwoStuff()
  end

  ...

end

function scriptOneStuff()
  ... put your stuff here...
end

function scriptTwoStuff()
  nextbet = something else
  bethigh = low
  other stuff that you want to do...

end

Using global vars declared before the dobet() should enable you to manipulate common values in both functions...

█████████████████████████
████▐██▄█████████████████
████▐██████▄▄▄███████████
████▐████▄█████▄▄████████
████▐█████▀▀▀▀▀███▄██████
████▐███▀████████████████
████▐█████████▄█████▌████
████▐██▌█████▀██████▌████
████▐██████████▀████▌████
█████▀███▄█████▄███▀█████
███████▀█████████▀███████
██████████▀███▀██████████
█████████████████████████
.
BC.GAME
▄▄░░░▄▀▀▄████████
▄▄▄
██████████████
█████░░▄▄▄▄████████
▄▄▄▄▄▄▄▄▄██▄██████▄▄▄▄████
▄███▄█▄▄██████████▄████▄████
███████████████████████████▀███
▀████▄██▄██▄░░░░▄████████████
▀▀▀█████▄▄▄███████████▀██
███████████████████▀██
███████████████████▄██
▄███████████████████▄██
█████████████████████▀██
██████████████████████▄
.
..CASINO....SPORTS....RACING..
█░░░░░░█░░░░░░█
▀███▀░░▀███▀░░▀███▀
▀░▀░░░░▀░▀░░░░▀░▀
░░░░░░░░░░░░
▀██████████
░░░░░███░░░░
░░█░░░███▄█░░░
░░██▌░░███░▀░░██▌
░█░██░░███░░░█░██
░█▀▀▀█▌░███░░█▀▀▀█▌
▄█▄░░░██▄███▄█▄░░▄██▄
▄███▄
░░░░▀██▄▀


▄▄████▄▄
▄███▀▀███▄
██████████
▀███▄░▄██▀
▄▄████▄▄░▀█▀▄██▀▄▄████▄▄
▄███▀▀▀████▄▄██▀▄███▀▀███▄
███████▄▄▀▀████▄▄▀▀███████
▀███▄▄███▀░░░▀▀████▄▄▄███▀
▀▀████▀▀████████▀▀████▀▀
eddd
Newbie
*
Offline Offline

Activity: 6
Merit: 0


View Profile
June 19, 2017, 06:56:27 PM
 #697

Hi guys,

Seems there's a difference between simulation and the real sites.

I've got a script that is consistently profitable in simulation, but it's not within the actual site (Primedice in this case).

Is the simulation actually a perfect game? i.e. it doesn't take in the 1% house edge?

If so, is there a way to set it to take into account the house edge?

1982dre
Hero Member
*****
Offline Offline

Activity: 1372
Merit: 512



View Profile WWW
June 21, 2017, 12:32:12 PM
 #698

Hi guys,

Seems there's a difference between simulation and the real sites.

I've got a script that is consistently profitable in simulation, but it's not within the actual site (Primedice in this case).

Is the simulation actually a perfect game? i.e. it doesn't take in the 1% house edge?

If so, is there a way to set it to take into account the house edge?



I think the HE is also calculated in the simulation. Think you just got bad luck on PD.

.....1% HOUSE EDGE.....
.....FAUCET 3.5K...........
.....RAINBOT
10K..........






















█████
 █████     ███
  █████     ███     █
   █████     ███     █
    █████     ███     █
     █████     ███     █
      █████     ███     █

     █████     ███     █

    █████     ███     █

   █████     ███     █

  █████     ███     █

 █████     ███

█████
..DuckDice..
█████
███     █████
█     ███     █████ 
█     ███     █████  
█     ███     █████   
█     ███     █████    
█     ███     █████     
█     ███     █████
    
█     ███     █████
   
█     ███     █████
  
█     ███     █████
 
███     █████

█████






















.....★  B O N U S E S.....
.....
  L O T T E R Y......
.....
  J A C K P O T......
momo1180
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
June 21, 2017, 02:15:18 PM
 #699

I want to add a function when x is lost, add a bet.

Code:
basebet=0.1
bchance=93
chance=bchance
nextbet=basebet
maxbet=100
minbet=100
maxchance=93
minchance=93
randomc=100

function dobet()
bethigh= math.random(0,1000)%2==0
x=math.random(0,10000)
if x < randomc then
nextbet = math.random(minbet,maxbet)
chance=math.random(minchance*100,maxchance*100)/100
else
nextbet = basebet
chance=bchance
end
end
haybee191
Newbie
*
Offline Offline

Activity: 9
Merit: 0


View Profile
June 21, 2017, 03:31:15 PM
 #700

hello, i would like to simply know how to add a time delay to my script, for example, to delay for say 1minute after an action , before commencing another one
Pages: « 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 [35] 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 »
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!