Show Posts
|
Pages: [1]
|
Buying a Left 4 Dead 2 CD-Key for 8 BTC.
EDIT: nevermind, got one.
|
|
|
A python pool server implementation, at the moment it's nothing more than a basic single-threaded HTTP server but it will get added on as time goes by, I will probably be working on this for the next couple of days/weeks trying to get it up to par with what I think a pool server should be able to handle. Goals: - Serve up to two-thousand getwork/s on a four-core system. - Support everything pushpool supports (aside from the binary protocol) - Allow event listeners for things like solved blocks, so you can write plugins with extra functionality, like automatic payout - Only have one thread processing HTTP requests, it then off-loads the work to hash working processes to evade the GIL. The source is on github at: https://github.com/bool-/pypooldIf you want to contribute to the project, feel free to fork it and create a pull request.
|
|
|
Well, I threw a gambling part into an IRC bot, it works as follows: The bot is located in ##btcbot on freenode. You can play online at: http://webchat.freenode.net/?channels=##btcbotTHE BOT IS NOW OPEN SOURCE AND HAS A GITHUB AT https://github.com/bool-/btcbotCurrent Roulette Wager: 0.1Commands:+ident - Identifies you with the bot, you must be identifiedwith NickServ in order for it to identify you. +deposit - Supplies a bitcoin address where you can deposit funds. +withdraw <sendtoaddress> <amount=all> - Withdraws your funds to the address specified. +balance - Gives you your current balance. +roulette <chamber> - Bets whatever the wager is at the time on a simple game. You have five bullets in a six round revolver and specify which chamber is blank. If you get shot, the wager goes directly to the pot. If you don't get shot you take 85% of the current pot. The pot keeps 15% to keep it up! +raffle <tickets=1> - Buys tickets in a fast-paced raffle game. Each ticket is 0.05 BTC and when twenty tickets are purchased it selects a winner and pays them. YOU KEEP THE FULL 1 BTC! Winners:To be added...
|
|
|
Well, I threw a gambling part into my IRC bot, it works as follows: You get a random number from 1-100 and where: 1-50 loses to the bank 51-89 wins 150% of the wager 90-99 wins 220% of the wager 100 wins the jackpot, you get 90% of it, the system gets 5% and 5% stays. Every bid, jackpot gets 10% and system gets 5% of the wager. Minimum bid is is 0.05, although in order to be eligible to win the jackpot, you have to wager 0.1 or more, otherwise if you roll 100 it will just do the standard 220%. Anyways, if you wanted to give it a shot you can find him in #btcbot on irc.freenode.net. It is host based, as long as your host doesn't change your balance will remain yours. If you don't know how to use IRC, use this http://webchat.freenode.net/?channels=#btcbot case "roll": if(!$args[2]) { $bot->message($chan, $who[0] . ", use !btclotto roll <wager>"); return 0; } if(!is_numeric($args[2])) { $bot->message($chan, $who[0] . ", number values only!"); return 0; } $wager = floatval($args[2]); if($bitcoin->getbalance($who[2], 1) < $wager || $wager < 0.05) { $bot->message($chan, $who[0] . ", you cannot wager that amount!!! it must be lower than your balance and at least 0.05"); return 0; } $num = rand(1,100); $amount_won = 0.0; $jackpot = false; $winner = false; $system_fee = $wager * 0.05; if($num > 50 && $num < 90) { $amount_won = $wager * 1.5; $winner = true; } elseif($num >= 90 && $num < 100) { $amount_won = $wager * 2.2; $winner = true; } elseif($num == 100) { if($wager > 0.1) { $amount_won = $pot_balance * 0.90; $system_fee = $system_fee + ($pot_balance * 0.05); $jackpot = true; } else { $amount_won = $wager * 2.2; $winner = true; } } if($amount_won > $balance && $jackpot == false) { $bot->message($chan, $who[0] . ", You rolled a " . $num . " and won more than the bank can pay out, bet lower or have bool_ transfer some spare funds."); return 0; } if($winner) { $bot->message($chan, $who[0] . ", You rolled a " . $num . " and won, " . $amount_won . " BTC has been sent to your balance."); $bitcoin->move("bank", $who[2], $amount_won, 0); } elseif($jackpot) { $bot->message($chan, $who[0] . ", You rolled a 100 and won the jackpot, " . $amount_won . " BTC has been sent to your balance."); $bitcoin->move("pot", $who[2], $amount_won, 0); } else { $bot->message($chan, $who[0] . ", You rolled a " . $num . " and lost, " . $wager . " BTC has been sent to the bank."); } $bitcoin->move($who[2], "bank", $wager, 0); $jackpot_fee = $wager * 0.1; $bitcoin->move("bank", "donations", $system_fee, 0); $bitcoin->move("bank", "pot", $jackpot_fee, 0); break;
|
|
|
Anyways, basically I have been working on my bitcoin bot all night, it does this right now like !btcstats and !mktstats <market_symbol>. It's unique feature at the moment is it's gambling feature, it follows a very similar design to the bitcoinlotto posted earlier where: 1-50 loses to the pot 51-89 wins 170% of the wager 90-100 wins 220% of the wager If you submit over 0.1 BTC as a wager, you have a chance to win 75% of the pot, the other 25% is reserved for fees and such. Anyways, if you wanted to give it a shot you can find him in #btcbot on irc.freenode.net. Here is the source for the gambling feature: $bitcoin = new jsonRPCClient(''); $balance = floatval($bitcoin->getbalance("pot", 1));
switch($args[1]) { case "pot_balance": $bot->message($chan, $who[0] . ", Pot balance is: " . $balance); break; case "balance": $bot->message($chan, $who[0] . ", Your balance is: " . $bitcoin->getbalance($who[0], 1)); break; case "newaddress": $bot->message($chan, $who[0] . ", Your new address is: " . $bitcoin->getnewaddress($who[0])); break; case "withdraw": if(!$args[2]) { $bot->message($chan, $who[0] . ", use !btcdouble withdraw <sendtoaddress>"); return 0; } $balance_you = $bitcoin->getbalance($who[0], 1); $bot->message($chan, $who[0] . ", You have been sent: " . $balance_you); $bitcoin->sendfrom("pot", $args[2], $balance_you, 1); break; case "roll": if(!$args[2]) { $bot->message($chan, $who[0] . ", use !btcdouble roll <wager>"); return 0; } $wager = floatval($args[2]); if($bitcoin->getbalance($who[0], 1) < $wager || $wager < 0) { $bot->message($chan, $who[0] . ", you cannot wager that amount!!!"); return 0; } $num = rand(1,100); if ($num <= 50) { $bitcoin->move($who[0], "pot", $wager, 0); $bot->message($chan, $who[0] . ", You rolled a " . $num . ", " . $wager . " BTC has been sent to the pot"); } elseif($num > 50 && $num < 90) { $bitcoin->move($who[0], "pot", $wager, 0); if(($balance + 0.0005) < $wager*1.7) { $myFile = "debt"; $fh = fopen($myFile, 'a'); $stringData = "Owe " .$wager*1.7. " to " . $who[0] . "\n"; fwrite($fh, $stringData); fclose($fh); $bot->message($chan, $who[0] . ", You rolled a " . $num . " but the pot is unable to pay you off at the moment, contact bool_ and tell him to send you your winnings."); return 0; } $bitcoin->move("pot", $who[0], $wager*1.7, 0); $bot->message($chan, $who[0] . ", You rolled a " . $num . ", " . ($wager*1.7) . " BTC has been sent to your balance"); } else { $bitcoin->move($who[0], "pot", $wager, 0); if(($balance + 0.0005) < $wager*2.2) { $myFile = "debt"; $fh = fopen($myFile, 'a'); $stringData = "Owe " .$wager*2.2. " to " . $who[0] . "\n"; fwrite($fh, $stringData); fclose($fh); $bot->message($chan, $who[0] . ", You rolled a " . $num . " but the pot is unable to pay you off at the moment, contact bool_ and tell him to send you your winnings."); return 0; } $bitcoin->move("pot", $who[0], $wager*2.2, 0); $bot->message($chan, $who[0] . ", You rolled a " . $num . ", " . ($wager*2.2) . " BTC has been sent to your balance"); } break; default: $bot->message($chan, $who[0] . ", use !btcdouble <roll|withdraw|newaddress|balance|pot_balance>"); break; }
|
|
|
<?php while(1) { $bitcoind_path = '"%ProgramFiles(x86)%\Bitcoin\daemon\bitcoind"'; $sendtoaddress = 'fdasfad'; $tax = 0.0005; $betamount = 0.1; $minimumbalance = 0.0; $strbalance = exec($bitcoind_path.' getbalance'); $balance = floatval($strbalance); if($balance >= $betamount + $tax && $balance - ($betamount + $tax) > $minimumbalance) { echo exec($bitcoind_path.' sendtoaddress '. $sendtoaddress . ' ' . $betamount) . '\n'; echo 'sent!'; } else { sleep(10); } } ?> I use it for sites like bitcoin lottery and such so I can continue to waste my mining earnings I will add JSON-RPC support in the future, this was just a test script. If you like it consider donating a small amount to 17kKVg1NP8ciHG3qKoZirc7UP3NE1AFQC6
|
|
|
|