Bitcoin Forum
October 23, 2017, 03:05:30 AM *
News: Latest stable version of Bitcoin Core: 0.15.0.1  [Torrent]. (New!)
 
   Home   Help Search Donate Login Register  
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 »
  Print  
Author Topic: Seuntjie' Dice bot programmers mode discussion.  (Read 48529 times)
chilly2k
Legendary
*
Offline Offline

Activity: 920


View Profile
March 16, 2016, 06:57:46 PM
 #121

Hi,
I have some idea but can not implement it.
Maybe somone can help me)
For example, i have some sequences of bets (5 for example), and i want that the bot bettin it sequences randomly
1st sequence:
0.00000001 Low
0.00000002 Low
0.00000004 High
0.00000008 High
2nd
0.00000001 Low
0.00000002 High
0.00000004 High
0.00000008 Low
3rd
0.00000001 High
0.00000002 Low
0.00000004 High
0.00000008 Low
etc...
help please)!
thank you!

   I'm sure you could create a table/array in LUA, but I don't have the time to look it up right this second.  The key would be to use the math.random() function.  
something like

sequencenum = math.random(1,size of table variable)  

Then use sequencenum to index into that table to the selected sequence.  

   If I have time later I'll look it up.  

1508727930
Hero Member
*
Offline Offline

Posts: 1508727930

View Profile Personal Message (Offline)

Ignore
1508727930
Reply with quote  #2

1508727930
Report to moderator
1508727930
Hero Member
*
Offline Offline

Posts: 1508727930

View Profile Personal Message (Offline)

Ignore
1508727930
Reply with quote  #2

1508727930
Report to moderator
1508727930
Hero Member
*
Offline Offline

Posts: 1508727930

View Profile Personal Message (Offline)

Ignore
1508727930
Reply with quote  #2

1508727930
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
Kavalskiy
Newbie
*
Offline Offline

Activity: 2


View Profile
March 16, 2016, 08:34:07 PM
 #122

well, I better wait Smiley
achodik
Jr. Member
*
Offline Offline

Activity: 34


View Profile
March 24, 2016, 03:54:01 AM
 #123

I wrote this real quick, and it seems to do what you want. Running through if statements like this probably isn't the most efficient way to do it, but it seems to work. If you want to add another set of high/low variation just make the (1,3) to (1,4) and copy/paste a section for betchoice==4, and change the respective true/falses for bethigh

Edit: This could easily be improved by having outer and inner if statements and/or breaks, but I doubt running a dozen~ if statements per bet will trash your CPU

LMK if you start using it and I'll mess with it some more

Quote from: lua code
chance=49.75
minbet=0.00000001
seqnum=0

function dobet()
if seqnum>3 then seqnum=0 end
if seqnum==0 then betchoice=math.random(1,3) end

if betchoice==1 and seqnum==0 then
bethigh=false
nextbet=0.00000001
end
if betchoice==1 and seqnum==1 then
bethigh=false
nextbet=0.00000002
end
if betchoice==1 and seqnum==2 then
bethigh=true
nextbet=0.00000004
end
if betchoice==1 and seqnum==3 then
bethigh=true
nextbet=0.00000008
end

if betchoice==2 and seqnum==0 then
bethigh=false
nextbet=0.00000001
end
if betchoice==2 and seqnum==1 then
bethigh=true
nextbet=0.00000002
end
if betchoice==2 and seqnum==2 then
bethigh=true
nextbet=0.00000004
end
if betchoice==2 and seqnum==3 then
bethigh=false
nextbet=0.00000008
end

if betchoice==3 and seqnum==0 then
bethigh=true
nextbet=0.00000001
end
if betchoice==3 and seqnum==1 then
bethigh=false
nextbet=0.00000002
end
if betchoice==3 and seqnum==2 then
bethigh=true
nextbet=0.00000004
end
if betchoice==3 and seqnum==3 then
bethigh=false
nextbet=0.00000008
end



seqnum=seqnum+1

end
janggernaut
Hero Member
*****
Offline Offline

Activity: 770



View Profile
March 26, 2016, 03:37:05 AM
 #124

hello, just want ask how to make a script in seunjti bot, if we want random chance ? let say i want minimum chance is 1% n max 5%, start bet at 0.00000001 , if lose increase 10% , and if win, reset.
thank you

COBINHOOD – ZERO TRADING FEE CRYPTOCURRENCY EXCHANGE 
slack
Telegram
achodik
Jr. Member
*
Offline Offline

Activity: 34


View Profile
March 26, 2016, 09:55:49 AM
 #125

hello, just want ask how to make a script in seunjti bot, if we want random chance ? let say i want minimum chance is 1% n max 5%, start bet at 0.00000001 , if lose increase 10% , and if win, reset.
thank you

So the chance to win changes? If so, by how much?

So the bet starts at 0.00000001 and increases by 10% after every loss? And after a win it goes back to 0.00000001?
janggernaut
Hero Member
*****
Offline Offline

Activity: 770



View Profile
March 26, 2016, 02:13:41 PM
 #126

hello, just want ask how to make a script in seunjti bot, if we want random chance ? let say i want minimum chance is 1% n max 5%, start bet at 0.00000001 , if lose increase 10% , and if win, reset.
thank you

So the chance to win changes? If so, by how much?

So the bet starts at 0.00000001 and increases by 10% after every loss? And after a win it goes back to 0.00000001?

nope, just random chance on % win, from 1% - 5%,
yes.

COBINHOOD – ZERO TRADING FEE CRYPTOCURRENCY EXCHANGE 
slack
Telegram
chilly2k
Legendary
*
Offline Offline

Activity: 920


View Profile
March 26, 2016, 02:49:43 PM
 #127

hello, just want ask how to make a script in seunjti bot, if we want random chance ? let say i want minimum chance is 1% n max 5%, start bet at 0.00000001 , if lose increase 10% , and if win, reset.
thank you

So the chance to win changes? If so, by how much?

So the bet starts at 0.00000001 and increases by 10% after every loss? And after a win it goes back to 0.00000001?

nope, just random chance on % win, from 1% - 5%,
yes.

   This should do it.  Didn't test it, but it's pretty simple.  Also it always bets high, you can change the bethigh = true to false to bet low.  And the chance is always a whole number 1-5 

Code:

chance = math.random(1,5)
bethigh = true
basebet = 0.00000001
nextbet = basebet

function dobet()

chance = math.random(1,5)

if (win) then
   nextbet = basebet
else
   nextbet = previousbet * 1.1
end
   

end


janggernaut
Hero Member
*****
Offline Offline

Activity: 770



View Profile
March 26, 2016, 10:36:15 PM
 #128

hello, just want ask how to make a script in seunjti bot, if we want random chance ? let say i want minimum chance is 1% n max 5%, start bet at 0.00000001 , if lose increase 10% , and if win, reset.
thank you

So the chance to win changes? If so, by how much?

So the bet starts at 0.00000001 and increases by 10% after every loss? And after a win it goes back to 0.00000001?

nope, just random chance on % win, from 1% - 5%,
yes.

   This should do it.  Didn't test it, but it's pretty simple.  Also it always bets high, you can change the bethigh = true to false to bet low.  And the chance is always a whole number 1-5  

Code:


chance = math.random(1,5)
bethigh = true
basebet = 0.00000001
nextbet = basebet

function dobet()

chance = math.random(1,5)

if (win) then
   nextbet = basebet
else
   nextbet = previousbet * 1.1
end
  

end


seems cool, i'll give it a try, thank you very much for helping me dude

ok, im already tried it, its cool, but its just betting from range 1%-5%, (1%, 2%, 3%, 4%, n 5%). but can i betting at other %? example : at 3.5%, 2.75%, 1.13%, etc, so its really random chance from 1%-5%, not just 1, 2, 3, 4, n 5%, thank you in advance

COBINHOOD – ZERO TRADING FEE CRYPTOCURRENCY EXCHANGE 
slack
Telegram
chilly2k
Legendary
*
Offline Offline

Activity: 920


View Profile
March 26, 2016, 11:26:04 PM
 #129

hello, just want ask how to make a script in seunjti bot, if we want random chance ? let say i want minimum chance is 1% n max 5%, start bet at 0.00000001 , if lose increase 10% , and if win, reset.
thank you

So the chance to win changes? If so, by how much?

So the bet starts at 0.00000001 and increases by 10% after every loss? And after a win it goes back to 0.00000001?

nope, just random chance on % win, from 1% - 5%,
yes.

   This should do it.  Didn't test it, but it's pretty simple.  Also it always bets high, you can change the bethigh = true to false to bet low.  And the chance is always a whole number 1-5  

Code:


chance = math.random(1,5)
bethigh = true
basebet = 0.00000001
nextbet = basebet

function dobet()

chance = math.random(1,5)

if (win) then
   nextbet = basebet
else
   nextbet = previousbet * 1.1
end
  

end


seems cool, i'll give it a try, thank you very much for helping me dude

ok, im already tried it, its cool, but its just betting from range 1%-5%, (1%, 2%, 3%, 4%, n 5%). but can i betting at other %? example : at 3.5%, 2.75%, 1.13%, etc, so its really random chance from 1%-5%, not just 1, 2, 3, 4, n 5%, thank you in advance

   I thought you might ask something like that.  Try this.  math.random() returns a value between 0 and 1.  So by adding that to the prior chance you'll get the fractions.  I'm sure there is another way to do it with just one math.random, but I can't think of it off the top of my head. 

Code:


chance = math.random(1,5)
chance += math.random()
bethigh = true
basebet = 0.00000001
nextbet = basebet

function dobet()

chance = math.random(1,5)
chance += math.random()

if (win) then
   nextbet = basebet
else
   nextbet = previousbet * 1.1
end
   

end


janggernaut
Hero Member
*****
Offline Offline

Activity: 770



View Profile
March 27, 2016, 12:06:45 AM
 #130

hello, just want ask how to make a script in seunjti bot, if we want random chance ? let say i want minimum chance is 1% n max 5%, start bet at 0.00000001 , if lose increase 10% , and if win, reset.
thank you

So the chance to win changes? If so, by how much?

So the bet starts at 0.00000001 and increases by 10% after every loss? And after a win it goes back to 0.00000001?

nope, just random chance on % win, from 1% - 5%,
yes.

   This should do it.  Didn't test it, but it's pretty simple.  Also it always bets high, you can change the bethigh = true to false to bet low.  And the chance is always a whole number 1-5  

Code:


chance = math.random(1,5)
bethigh = true
basebet = 0.00000001
nextbet = basebet

function dobet()

chance = math.random(1,5)

if (win) then
   nextbet = basebet
else
   nextbet = previousbet * 1.1
end
  

end


seems cool, i'll give it a try, thank you very much for helping me dude

ok, im already tried it, its cool, but its just betting from range 1%-5%, (1%, 2%, 3%, 4%, n 5%). but can i betting at other %? example : at 3.5%, 2.75%, 1.13%, etc, so its really random chance from 1%-5%, not just 1, 2, 3, 4, n 5%, thank you in advance

   I thought you might ask something like that.  Try this.  math.random() returns a value between 0 and 1.  So by adding that to the prior chance you'll get the fractions.  I'm sure there is another way to do it with just one math.random, but I can't think of it off the top of my head.  

Code:


chance = math.random(1,5)
chance += math.random()
bethigh = true
basebet = 0.00000001
nextbet = basebet

function dobet()

chance = math.random(1,5)
chance += math.random()

if (win) then
   nextbet = basebet
else
   nextbet = previousbet * 1.1
end
  

end


ok, i'll give it a try now, thank you very much dude

ok, the RESULT is very NICE, i like it, thank you once again for helping me dude!


COBINHOOD – ZERO TRADING FEE CRYPTOCURRENCY EXCHANGE 
slack
Telegram
seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
March 27, 2016, 08:51:15 AM
 #131

how about using math.random(1,500)/100.0 instead?

rindo
Hero Member
*****
Offline Offline

Activity: 812



View Profile
March 27, 2016, 02:49:22 PM
 #132

Code:


chance = math.random(1,5)
bethigh = true
basebet = 0.00000001
nextbet = basebet

function dobet()

chance = math.random(1,5)

if (win) then
   nextbet = basebet
else
   nextbet = previousbet * 1.1
end
  

end


how to add this code

Switch after Wins

like SS




achodik
Jr. Member
*
Offline Offline

Activity: 34


View Profile
March 27, 2016, 05:36:47 PM
 #133

Code:


chance = math.random(1,5)
bethigh = true
basebet = 0.00000001
nextbet = basebet

function dobet()

chance = math.random(1,5)

if (win) then
   nextbet = basebet
else
   nextbet = previousbet * 1.1
end
  
if win and bethigh==true then
   bethigh=false
end
if win and bethigh==false then
   bethigh=true
end

end


how to add this code

Switch after Wins

like SS





Should do it
chilly2k
Legendary
*
Offline Offline

Activity: 920


View Profile
March 27, 2016, 06:02:28 PM
 #134

Code:


chance = math.random(1,5)
bethigh = true
basebet = 0.00000001
nextbet = basebet

function dobet()

chance = math.random(1,5)

if (win) then
   nextbet = basebet
else
   nextbet = previousbet * 1.1
end
  
if win and bethigh==true then
   bethigh=false
end
if win and bethigh==false then
   bethigh=true
end

end


how to add this code

Switch after Wins

like SS





Should do it

   That should work, and whatever makes sense to you is the correct way. 

A few tips.

bethigh = !bethigh    will flip the bethigh setting.  So if it's true it will make it false and if it's false make it true. 

And with that you could just add it to the first (win) if statement. 

 

achodik
Jr. Member
*
Offline Offline

Activity: 34


View Profile
March 27, 2016, 06:23:18 PM
 #135

Quote from: chilly2k
That should work, and whatever makes sense to you is the correct way.  

A few tips.

bethigh = !bethigh    will flip the bethigh setting.  So if it's true it will make it false and if it's false make it true.  

And with that you could just add it to the first (win) if statement.  

  

Cool, thank you


Updated code
Code:
chance = math.random(1,5)
bethigh = true
basebet = 0.00000001
nextbet = basebet

function dobet()

chance = math.random(1,5)

if (win) then
   nextbet = basebet
   bethigh = !bethigh
else
   nextbet = previousbet * 1.1
end

end
rindo
Hero Member
*****
Offline Offline

Activity: 812



View Profile
March 27, 2016, 06:36:59 PM
 #136

Quote from: chilly2k
That should work, and whatever makes sense to you is the correct way.  

A few tips.
bethigh = !bethigh    will flip the bethigh setting.  So if it's true it will make it false and if it's false make it true.  
And with that you could just add it to the first (win) if statement.  
Cool, thank you
Updated code

ahh thanks u somuch Guys

 I hope make profit from the dice  Grin

seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
March 28, 2016, 08:18:09 AM
 #137

achodik I took the liberty of uploading this script of yours to my website. Feel free to upload it yourself. Or, if you already have an account at my site, I'll just transfer ownership of it to you, if you want. If you have any other cool scripts that you use or have written, please share it with us using the site

I also uploaded a few similar simple scripts that can be used as templates or starting points for doing stuff with random things and they can be found at https://bot.seuntjie.com/scripts.aspx You might need to go to the next page (the bottom of the page has a paging control, like a next and previous button) to find the scripts

achodik
Jr. Member
*
Offline Offline

Activity: 34


View Profile
March 31, 2016, 11:22:49 AM
 #138

achodik I took the liberty of uploading this script of yours to my website. Feel free to upload it yourself. Or, if you already have an account at my site, I'll just transfer ownership of it to you, if you want. If you have any other cool scripts that you use or have written, please share it with us using the site

I also uploaded a few similar simple scripts that can be used as templates or starting points for doing stuff with random things and they can be found at https://bot.seuntjie.com/scripts.aspx You might need to go to the next page (the bottom of the page has a paging control, like a next and previous button) to find the scripts

That's okay. I'm still working on my script. When I decide to share it I'll make an account ^^

I think I might have found a bug, but I haven't tried to recreate it so I'm not sure. When trying to withdraw (balance*0.1) it wouldn't go through, my guess was because the requested amount had 9 digits after the decimal place. I added rounding to the withdraw request, and it started working. I also added a 5 second sleep to ensure the dice site wasn't throttling my requests, so it could have been that, but I imagine it's because I was trying to withdraw what 999dice saw as an invalid amount.
seuntjie
Legendary
*
Offline Offline

Activity: 1414



View Profile WWW
March 31, 2016, 02:51:10 PM
 #139

achodik I took the liberty of uploading this script of yours to my website. Feel free to upload it yourself. Or, if you already have an account at my site, I'll just transfer ownership of it to you, if you want. If you have any other cool scripts that you use or have written, please share it with us using the site

I also uploaded a few similar simple scripts that can be used as templates or starting points for doing stuff with random things and they can be found at https://bot.seuntjie.com/scripts.aspx You might need to go to the next page (the bottom of the page has a paging control, like a next and previous button) to find the scripts

That's okay. I'm still working on my script. When I decide to share it I'll make an account ^^

I think I might have found a bug, but I haven't tried to recreate it so I'm not sure. When trying to withdraw (balance*0.1) it wouldn't go through, my guess was because the requested amount had 9 digits after the decimal place. I added rounding to the withdraw request, and it started working. I also added a 5 second sleep to ensure the dice site wasn't throttling my requests, so it could have been that, but I imagine it's because I was trying to withdraw what 999dice saw as an invalid amount.

There was a bug with 999dices withdrawals in my bot, but it's fixed in 3.1.4. Also, just make sure that the amount you try to withdraw is larger than the minimum withdrawal amount of 999dice.

achodik
Jr. Member
*
Offline Offline

Activity: 34


View Profile
March 31, 2016, 03:47:15 PM
 #140

There was a bug with 999dices withdrawals in my bot, but it's fixed in 3.1.4. Also, just make sure that the amount you try to withdraw is larger than the minimum withdrawal amount of 999dice.

I'm using 3.1.4

I decided to recreate it this morning.. withdraw(3.123456781,"address") does not work no matter how many times I do it, but withdraw(3.12345678,"address") will work right away.

Note this is on 999dice in dogecoin, so that is a very small, but above the minimum, withdraw.

Not a huge deal (to me) since I fixed my code with rounding, and the advanced mode will automatically truncate the withdraw you put in (the majority of users will likely use this method instead of calculated withdraw in programmer mode), but yeah. Someone else might run into this eventually so I figured I would let you know what I found
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 »
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!