Pages:
Author

Topic: Seuntjie' Dice bot programmers mode discussion. - page 21. (Read 125420 times)

full member
Activity: 319
Merit: 100
How to write correctly, what would be chosen in accordance with the passes, I want to add chances for the game
Code:
maxlos = 261     lp = 5  
maxlos0 = 113    lp0 = 10  

lp=5 ---It's a game

lp0=10 --It's a game

hah, where you get this demo version script?! Cheesy
it will not be that easy to add percentage in that script how you think Tongue
i can make however many percentages you want in it(in theory, but it take big time if you want in hundreds...), but not for free.

dlja skoka raznix procentof hochew etot script zdelat?! mogu prodat, na kak mnoga hochew(pochti/teureticheski) nu chitaj bolshe raznie procenti=dlinej script=dolshe pisat nada=bolshe stoit budet Smiley

legendary
Activity: 1717
Merit: 1125
Hi all experts!

I have a questions for you....

In my script I have the following line to have it withdraw:

Code:

if balance>=target  then ching()
 withdraw(withdrawAmount,withdrawAddress)
resetSettings()
end


The problem I experience is that it starts to withdraw at the set limit I have and takes the amount I have chosen to withdraw... but for some reason it the repeats it over and over until the money was gone....

Which in my case was a really shitty move Sad I was willing to take a 30% fee on the test withdrawal but I DIDN'T want to have a 30% on 9 withdrawals in a row, which caused me to loose 30% of my balance Sad

I will attach a bit of the log:
Code:
Betting 0.000000107 at 0.99% chance to win, high
Withdrawing 0.001 to 1HSPqbFBRQDT1pKyGk1mp2UZKQNzUdt43x
---bet lost---  
 ==================================================
  
Betting 0.000000114 at 0.99% chance to win, low
Withdrawing 0.001 to 1HSPqbFBRQDT1pKyGk1mp2UZKQNzUdt43x
---bet lost---  
 ==================================================
  
Betting 0.000000121 at 0.99% chance to win, high
Withdrawing 0.001 to 1HSPqbFBRQDT1pKyGk1mp2UZKQNzUdt43x
---bet lost---  
 ==================================================
  
Betting 0.000000128 at 0.99% chance to win, low
Withdrawing 0.001 to 1HSPqbFBRQDT1pKyGk1mp2UZKQNzUdt43x
---bet lost---  
Can someone please guide me how to over come this.... I don't understand why he repeated since target is:

target=0.0085

and withdraw:

withdrawAmount=0.001   -- amount to withdraw

To me he should recheck the balance and see that it was now 0.001 less and thus not withdrawing anymore Sad I hope it's not an issue with the site being slow to update the balance and fooling the dicebot to think that the balance remains the same? O.o

If that would be the case can I in some way initiate a pause directly after the first withdrawal to give the site time to update?

/T


What site does this happen on?
At most sites the balance is either returned with the bet result OR the bot forces an update to the balance after a withdrawal, but there are sites where it's not possible, or where the next bet can be placed before the balance is updated. Typically, the balance is updated every 30 seconds OR every minute if the bot can't force updates to the balance.

Easiest solution (until I can find out what exactly caused it) would be to track your balance on your own and do the deduction when you withdrawal, then sync the balances when the bot has updated it.

Code:
--all your variables
internalbalance = 0--the balance variable only gets set after the first bet, so you can't use it yet

function dobet()

if internalbalance =0 --if internal balance has not yet been set
or math.abs(internalbalance+currentprofit-balance)<0.0005 then --or if the balances are close enough that the withdrawal reflects on your balance
internalbalance =balance
else
internalbalance +=currentprofit
end

--your bet logic


if internalbalance >target then
--withdraw
internalbalance -=withdrawalamount
end


Disclaimer: My code is untested and not checked for any errors. Use and adapt at your own risk
newbie
Activity: 14
Merit: 0
Hi all experts!

I have a questions for you....

In my script I have the following line to have it withdraw:

-----------------------------

if balance>=target  then ching()
 withdraw(withdrawAmount,withdrawAddress)
   resetSettings()
end

-----------------------------

The problem I experience is that it starts to withdraw at the set limit I have and takes the amount I have chosen to withdraw... but for some reason it the repeats it over and over until the money was gone....

Which in my case was a really shitty move Sad I was willing to take a 30% fee on the test withdrawal but I DIDN'T want to have a 30% on 9 withdrawals in a row, which caused me to loose 30% of my balance Sad

I will attach a bit of the log:

Betting 0.000000107 at 0.99% chance to win, high
Withdrawing 0.001 to 1HSPqbFBRQDT1pKyGk1mp2UZKQNzUdt43x
---bet lost--- 
 ==================================================
 
Betting 0.000000114 at 0.99% chance to win, low
Withdrawing 0.001 to 1HSPqbFBRQDT1pKyGk1mp2UZKQNzUdt43x
---bet lost--- 
 ==================================================
 
Betting 0.000000121 at 0.99% chance to win, high
Withdrawing 0.001 to 1HSPqbFBRQDT1pKyGk1mp2UZKQNzUdt43x
---bet lost--- 
 ==================================================
 
Betting 0.000000128 at 0.99% chance to win, low
Withdrawing 0.001 to 1HSPqbFBRQDT1pKyGk1mp2UZKQNzUdt43x
---bet lost--- 

Can someone please guide me how to over come this.... I don't understand why he repeated since target is:

target=0.0085

and withdraw:

withdrawAmount=0.001   -- amount to withdraw

To me he should recheck the balance and see that it was now 0.001 less and thus not withdrawing anymore Sad I hope it's not an issue with the site being slow to update the balance and fooling the dicebot to think that the balance remains the same? O.o

If that would be the case can I in some way initiate a pause directly after the first withdrawal to give the site time to update?

/T
HCP
legendary
Activity: 2086
Merit: 4361
I'm not sure exactly what you're asking... Huh

You want to set maxlos = 261 AND lp =5?
Code:
if then
  maxlos = 261
  lp = 5
elseif then
  maxlos0 = 113
  lp0 = 10
end

or you want maxlos to equal a specific value when lp is equal to a certain value?

Code:
if lp==5 then
  maxlos = 261
else if lp==10 then
  maxlos = 113
end

or you want lp to be a certain value when maxlos equals a certain value?

Code:
if maxlos==113 then
  lp=10
else if maxlos==261 then
  lp=5
end


You'll have to be more specific with what you're actually trying to achieve...
member
Activity: 270
Merit: 10
How to write correctly, what would be chosen in accordance with the passes, I want to add chances for the game
Code:
maxlos = 261     lp = 5  
maxlos0 = 113    lp0 = 10  

lp=5 ---It's a game

lp0=10 --It's a game
newbie
Activity: 14
Merit: 0
Thanks Seuntjie!

As you mentioned.....

The problem was that I was missing the ' before and after the address.

Now it's working as it should!

Big Thanks!

/mikael
newbie
Activity: 14
Merit: 0
What currency are you using? BTC or DOGE or ?? Huh

The bot seems to be setup to calculate BTC values in the withdrawal code (ie. 1 BTC = 100,000,000 satoshis):
Code:
pairs.Add(new KeyValuePair("Amount", (Amount*100000000m).ToString("0",System.Globalization.NumberFormatInfo.InvariantInfo)));

Given that you're betting "13.016.." and withdrawing "50"... either you're some kind of "whale" or you're wagering and attempting to withdraw in a currency other than BTC Wink

If this is the case, then I suspect that the final amount calculated is not correct and the bot is not reporting the error/failure message from the site correctly.


It's doge Smiley Otherwise I would be a rich gambler Tongue Also basically the only reason I am running it on 999d since they allow minimum bets lower the 1 on Doge.

But I see your point!.. So maybe the withdrawal amount should be in the above case 5000000000 (assuming 50*100000000m)??

I will do as seuntjie advised and test it in console directly...

I will get back to you on the results
legendary
Activity: 1717
Merit: 1125
What currency are you using? BTC or DOGE or ?? Huh

The bot seems to be setup to calculate BTC values in the withdrawal code (ie. 1 BTC = 100,000,000 satoshis):
Code:
pairs.Add(new KeyValuePair("Amount", (Amount*100000000m).ToString("0",System.Globalization.NumberFormatInfo.InvariantInfo)));

Given that you're betting "13.016.." and withdrawing "50"... either you're some kind of "whale" or you're wagering and attempting to withdraw in a currency other than BTC Wink

If this is the case, then I suspect that the final amount calculated is not correct and the bot is not reporting the error/failure message from the site correctly.


The calculation is irrelevant, almost all cryptocurrencies use 8 decimal places and 999dices API uses the smallest that currencies equivalent of a satoshi for all calls and currencies. 1 "Dogetoshi" = 0.00000001 Doge. Also, the same withdrawal function is used when using the withdrawal button, which he stated works correctly, so it's likely an error in the script.
HCP
legendary
Activity: 2086
Merit: 4361
What currency are you using? BTC or DOGE or ?? Huh

The bot seems to be setup to calculate BTC values in the withdrawal code (ie. 1 BTC = 100,000,000 satoshis):
Code:
pairs.Add(new KeyValuePair("Amount", (Amount*100000000m).ToString("0",System.Globalization.NumberFormatInfo.InvariantInfo)));

Given that you're betting "13.016.." and withdrawing "50"... either you're some kind of "whale" or you're wagering and attempting to withdraw in a currency other than BTC Wink

If this is the case, then I suspect that the final amount calculated is not correct and the bot is not reporting the error/failure message from the site correctly.
legendary
Activity: 1717
Merit: 1125
A quick question....

I am trying to get the withdrawal function to work on 999d.

The code used here is:

 if balance >= targetBalance then
    ching()                                  
    withdraw(withdrawAmount,withdrawAddress)

And in the beginning I have the following settings:

-- withdraw settings
withdrawAddress="my address here ofc"
withdrawAmount=50   -- amount to withdraw

I can see the messages in the console saying:

Betting 13.0161111551561 at 95% chance to win, low
Withdrawing 50 to
Betting 0.00002 at 95% chance to win, low
Withdrawing 50 to

Nothing gets withdrawn and it's just getting into a loop since the balace says it should withdraw...

However I can just easy withdraw the same amount by clicking the withdraw button in Dicebot and enter the same amount and address.

Anyone have an idea what's failing?

/Mikael
 

Try using withdrawAddress='my address here ofc'
instead of withdrawAddress="my address here ofc"

Also, to test if your syntax is correct, you can withdraw directly from the console. So you can start your script, stop it after one bet, then use withdraw(withdrawAmount,withdrawAddress) from the console. If it works, it will work from the script, if it doesn't, somethings wrong. (Withdrawing like this POSSIBLY won't update your balance in the bot immediately. It might take a minute to update your balance. Check your withdrawal history on 999dice to see if it worked)
newbie
Activity: 14
Merit: 0
A quick question....

I am trying to get the withdrawal function to work on 999d.

The code used here is:

 if balance >= targetBalance then
    ching()                                  
    withdraw(withdrawAmount,withdrawAddress)

And in the beginning I have the following settings:

-- withdraw settings
withdrawAddress="my address here ofc"
withdrawAmount=50   -- amount to withdraw

I can see the messages in the console saying:

Betting 13.0161111551561 at 95% chance to win, low
Withdrawing 50 to
Betting 0.00002 at 95% chance to win, low
Withdrawing 50 to

Nothing gets withdrawn and it's just getting into a loop since the balace says it should withdraw...

However I can just easy withdraw the same amount by clicking the withdraw button in Dicebot and enter the same amount and address.

Anyone have an idea what's failing?

/Mikael
 
newbie
Activity: 14
Merit: 0
Hi everyone!

I am in dire need of having a customised script created, but I am certainly no programmer. I know exactly what I want in the script just that I can create it myself.

Therefor I wonder if there are any kind soul willing to assist me here? I can donate $10 to the kind soul helping me out here (paypal required).

Please send me a PM if you have time and skills to assist me.

Best Regards!

/Thrilled
DCP
member
Activity: 110
Merit: 10
If resetstats() keeps crashing your script... you can probably work around it by just tracking the profit yourself using a user created profit variable... as it seems the only "stats" you're using is "profit"...

Code:
runProfit = 0
startBalance = balance
...

function dobet()

  runProfit = balance - startBalance

  if win then
    ...
    if (runProfit > 0.000001) then
      -- "reset stats"
      startBalance = balance
      runProfit = 0
      
    end

    ...
    if ((runProfit < -0.0000005) and (runProfit >= -0.0000020)) and (currentstreak == 2) then
    ...

  else
    ...
  end

end


Then you just replace all instances of "profit" with "runProfit" etc...

THANK YOU SO MUCH!  I really appreciate you taking the time to post this.

HCP
legendary
Activity: 2086
Merit: 4361
If resetstats() keeps crashing your script... you can probably work around it by just tracking the profit yourself using a user created profit variable... as it seems the only "stats" you're using is "profit"...

Code:
runProfit = 0
startBalance = balance
...

function dobet()

  runProfit = balance - startBalance

  if win then
    ...
    if (runProfit > 0.000001) then
      -- "reset stats"
      startBalance = balance
      runProfit = 0
      
    end

    ...
    if ((runProfit < -0.0000005) and (runProfit >= -0.0000020)) and (currentstreak == 2) then
    ...

  else
    ...
  end

end


Then you just replace all instances of "profit" with "runProfit" etc...
DCP
member
Activity: 110
Merit: 10

Can you send me a screenshot of your console when you try to run the script and the error it gives please? (including all commands you use before the error)

Hi Seuntjie,

Please can you look at my previous post.. Is there someway I can automatically reset the stats when profit is over 0 ?

Thanks
DCP
member
Activity: 110
Merit: 10
Eugene, I think there is a bug in the software regarding resetstats() not working. I've tried it on 6 different versions of dicebot, I've tried other people's scripts that had the resetstats() in it, scripts other people said were working before. The feature works fine in Advanced mode, but not in programmer mode. If you think it works please send me any script that has it so I can test it.

I really need this feature to work.   Please can you tell me how to make this code work!!

if profit > 0 then
resetstats()
end
Lets keep it seuntjie while on the forums and casinos please.

There isn't a resetstats option in the advanced mode. Are you sure you're using the correct function for what you're trying to do? I know there is an issue in the programmer mode calling the resetstats function outside of the dobet function. I ran a simulation of your script, it worked fine.

Can you send me a screenshot of your console when you try to run the script and the error it gives please? (including all commands you use before the error)


Re: "There isn't a resetstats option in the advanced mode. "  Sorry, disregard that comment. For a moment I confused it with the Reset after BTC Profit function in Advanced mode, but I don't need that for this script, I need to reset the stats when its in profit.

Re: Screenshots, here are 2,  all I did was enter start(), each time it gets to the resetstats() command it crashes with the error. Below are the screenshots and the exact code I just used.

Thanks for looking at it. I'm really hoping the resetstats will work.










Code:
--set for primedice, Go for 4 - fully auto
nextbet = 0
basebet = 0.0
chance=49.5
resetonwin = false
bethigh = false
enablesrc=true
r=math.random(2)

function dobet()


if win then

nextbet = basebet

if (resetonwin == true) then
nextbet = basebet
end

if (profit > 0.000001) then
resetstats()
end


 if (currentstreak == 2) then
              nextbet = 0.0000007
         end

 if ((profit < -0.0000005) and (profit >= -0.0000020)) and (currentstreak == 2) then
              nextbet = 0.0000008
         end


 if ((profit < -0.0000020) and (profit >= -0.0000041)) and (currentstreak == 2) then
              nextbet = 0.0000009
         end

if ((profit < -0.0000041)  and (profit >= -0.0000071)) and (currentstreak == 2) then
              nextbet = 0.0000011
         end

if ((profit < -0.0000071)  and (profit >= -0.0000110)) and (currentstreak == 2) then
              nextbet = 0.0000013
         end

if ((profit < -0.0000110)  and (profit >= -0.0000155)) and (currentstreak == 2) then
              nextbet = 0.0000015
         end

if ((profit < -0.0000155)  and (profit >= -0.0000200)) and (currentstreak == 2) then
              nextbet = 0.0000018
         end

if ((profit < -0.0000200)  and (profit >= -0.0000260)) and (currentstreak == 2) then
              nextbet = 0.0000020
         end

if ((profit < -0.0000260)  and (profit >= -0.0000329)) and (currentstreak == 2) then
              nextbet = 0.0000022
         end


if ((profit < -0.0000329)  and (profit >= -0.0000404)) and (currentstreak == 2) then
              nextbet = 0.0000025
         end

if ((profit < -0.0000404)  and (profit >= -0.0000488)) and (currentstreak == 2) then
              nextbet = 0.0000028
         end

if ((profit < -0.0000488)  and (profit >= -0.0000578)) and (currentstreak == 2) then
              nextbet = 0.0000032
         end

if ((profit < -0.0000578)  and (profit >= -0.0000683)) and (currentstreak == 2) then
              nextbet = 0.0000037
         end

if ((profit < -0.0000683)  and (profit >= -0.0000703)) and (currentstreak == 2) then
              nextbet = 0.0000043
         end

if ((profit < -0.0000703)  and (profit >= -0.0000853)) and (currentstreak == 2) then
              nextbet = 0.0000050
         end

if ((profit < -0.0000853)  and (profit >= -0.0001)) and (currentstreak == 2) then
              nextbet = 0.0000057
         end

if ((profit < -0.0001)  and (profit >= -0.0001180)) and (currentstreak == 2) then
              nextbet = 0.0000060
         end


if currentstreak == 3  then
nextbet = previousbet*2
end

if (currentstreak == 3)  then
resetonwin=true
end


else

nextbet = basebet


r=math.random(2)

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



end
end


legendary
Activity: 1717
Merit: 1125
okey thanks!

but "I'm saying you can get another 1500 reds in a row after 1000 because you CAN get another 1500 losses after 1000 in a row, whether you reset your seed or not."
i don't get why you are saying it, when its not possible at all, each percentage has maxiumum even possible losing streak +/-... and for 1% its ~1500-1600 Huh and if you will get more then something is wrong with this dice game site probably fair i think.

Your luck will be NEAR 100% over an INFINITE amount of bets. You CAN place 1 000 000 bets and have 0% luck. same with this, i dont get, why you are saying it, 0%  luck after 1 000 000 bets you cant get at all, even with minimum dice site win percentage what its = 0.01%(~x9900 payout) it will be around 100 000-150 000 bets maximum +/-

That is the part you don't understand. With randomness, everything is possible. You CAN get another 1500 losses after 1000 in a row, whether you reset your seed or not. It even becomes likely that you will if you place enough bets.

There is no maximum number of losses in a row you can get. You CAN get 1 000 000 losses in a row at 50%, or 90%. With random numbers, it is possible.


Whats the point in asking me if it's possible if you're just going to argue with my answer?

okey, im understand your point.
but that propability is the same, that tommorow alien will fall with NLO on my head, and im will be dead. i get it.


anyone can say what is better option to find mistakes in script if script is very very long? like ~5000 lines?

"[string "chunk"]:2847: attempt to compare number with nil" if i get this kind of error with script, this maybe means my mistake is in 2847 line?! but this line is "end" ....

no-one can tell you where the problem is without seeing the script. It is not due to the length of your script. I can tell you that you are trying to use a variable in an if before it is instantiated.
legendary
Activity: 1717
Merit: 1125
Eugene, I think there is a bug in the software regarding resetstats() not working. I've tried it on 6 different versions of dicebot, I've tried other people's scripts that had the resetstats() in it, scripts other people said were working before. The feature works fine in Advanced mode, but not in programmer mode. If you think it works please send me any script that has it so I can test it.

I really need this feature to work.   Please can you tell me how to make this code work!!

if profit > 0 then
resetstats()
end
Lets keep it seuntjie while on the forums and casinos please.

There isn't a resetstats option in the advanced mode. Are you sure you're using the correct function for what you're trying to do? I know there is an issue in the programmer mode calling the resetstats function outside of the dobet function. I ran a simulation of your script, it worked fine.

Can you send me a screenshot of your console when you try to run the script and the error it gives please? (including all commands you use before the error)
DCP
member
Activity: 110
Merit: 10
Eugene, I think there is a bug in the software regarding resetstats() not working. I've tried it on 6 different versions of dicebot, I've tried other people's scripts that had the resetstats() in it, scripts other people said were working before. The feature works fine in Advanced mode, but not in programmer mode. If you think it works please send me any script that has it so I can test it.

I really need this feature to work.   Please can you tell me how to make this code work!!

if profit > 0 then
resetstats()
end
full member
Activity: 319
Merit: 100
okey thanks!

but "I'm saying you can get another 1500 reds in a row after 1000 because you CAN get another 1500 losses after 1000 in a row, whether you reset your seed or not."
i don't get why you are saying it, when its not possible at all, each percentage has maxiumum even possible losing streak +/-... and for 1% its ~1500-1600 Huh and if you will get more then something is wrong with this dice game site probably fair i think.

Your luck will be NEAR 100% over an INFINITE amount of bets. You CAN place 1 000 000 bets and have 0% luck. same with this, i dont get, why you are saying it, 0%  luck after 1 000 000 bets you cant get at all, even with minimum dice site win percentage what its = 0.01%(~x9900 payout) it will be around 100 000-150 000 bets maximum +/-

That is the part you don't understand. With randomness, everything is possible. You CAN get another 1500 losses after 1000 in a row, whether you reset your seed or not. It even becomes likely that you will if you place enough bets.

There is no maximum number of losses in a row you can get. You CAN get 1 000 000 losses in a row at 50%, or 90%. With random numbers, it is possible.


Whats the point in asking me if it's possible if you're just going to argue with my answer?

okey, im understand your point.
but that propability is the same, that tommorow alien will fall with NLO on my head, and im will be dead. i get it.


anyone can say what is better option to find mistakes in script if script is very very long? like ~5000 lines?

"[string "chunk"]:2847: attempt to compare number with nil" if i get this kind of error with script, this maybe means my mistake is in 2847 line?! but this line is "end" ....
Pages:
Jump to: