Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $max_rounds = 100
- $min_bet = 0.01
- $max_bet = 0.32
- $address = "1dice7W2AicHosf5EL3GFDUVga7TgtPFn"
- Write-Host "Satoshidice Betting Script"
- $bet = $min_bet
- $total_fees = 0
- $count = 0
- $count_won = 0
- $starting_balance = ./bitcoind getbalance
- if ($starting_balance -ge $bet)
- {
- $broke = "false"
- }
- while ($bet -le $max_bet -AND $count -le $max_rounds -AND $broke -eq "false") {
- $count ++
- $balance_a = ./bitcoind getbalance
- if ($balance_a -lt $bet)
- {
- $broke = "true"
- }
- $tx = ./bitcoind sendtoaddress "$address" $bet
- $balance_b = ./bitcoind getbalance
- $fee = $balance_a - $balance_b - $bet
- $total_fees += $fee
- Write-Host "Game: $count"
- Write-Host "Balance: $balance_a"
- Write-Host "Bet: $bet"
- Write-Host "Fee: $fee"
- Write-Host "Total Fees: $total_fees"
- Write-Host –NoNewLine "Balance: $balance_b Waiting "
- $balance_c = 0
- $last_c = 0
- while ($balance_b -ge $balance_c)
- {
- $balance_c = ./bitcoind getbalance
- if( ($balance_c -eq $last_c) -OR ($last_c -eq 0) )
- {
- Write-Host –NoNewLine "."
- }else
- {
- Write-Host "Balance: $balance_c"
- }
- $last_c = $balance_c
- }
- $diff = $balance_c - $balance_b
- if ($diff -gt $bet)
- {
- $bet = $min_bet
- $count_won = $count_won + 1
- Write-Host "Win! ($count_won out of $count)"
- }else
- {
- $bet = $bet * 2
- Write-Host "Lose!"
- }
- Write-Host ""
- }
- $ending_balance = ./bitcoind getbalance
- if ($bet -gt $max_bet)
- {
- Write-Host ""
- Write-Host -ForegroundColor Black -BackgroundColor White "Script ended due to maximum bet reached."
- Write-Host "Maximum Bet: $max_bet"
- Write-Host ""
- }else
- {
- if ($broke -eq "true")
- {
- Write-Host ""
- Write-Host -ForegroundColor Black -BackgroundColor White "Script ended due to insufficient funds."
- Write-Host "Final Balance: $ending_balance"
- Write-Host ""
- }else
- {
- if ($count -ge $max_count)
- {
- Write-Host ""
- Write-Host -ForegroundColor Black -BackgroundColor White "Script ended due to roundlimit."
- Write-Host "Maximum Rounds:$max_count"
- Write-Host ""
- }else
- {
- Write-Host ""
- Write-Host -ForegroundColor Black -BackgroundColor White "Script ended for an unknown reason."
- Write-Host ""
- }
- }
- }
- Write-Host ""
- Write-Host -ForegroundColor Black -BackgroundColor White "Final Stats"
- Write-Host "Total Rounds: $count"
- Write-Host "Total Rounds Won: $count_won"
- $percent_won = $count_won / $count * 100
- Write-Host "Win Percentage: $percent_won %"
- Write-Host "Starting Balance: $starting_balance"
- Write-Host "Ending Balance: $ending_balance"
- Write-Host "Total Fees Paid: $total_fees"
- $total_diff = $ending_balance - $starting_balance - $total_fees
- if (($total_diff) -gt 0)
- {
- Write-Host "Total Profit: $total_diff"
- }else
- {
- Write-Host "Total Loss: $total_diff"
- }
- Write-Host ""
- Write-Host "Script finished."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement