Pages:
Author

Topic: Double Trouble (Instant/Automatic) w/ Partial Refunds! [12hr rounds] - page 21. (Read 30305 times)

full member
Activity: 210
Merit: 100
firstbits: 121vnq
yeah i saw it too, I was wondering if it had something to do with one of the transactions not being confirmed yet, but before I could put all the numbers in a spreadsheet and see why it might do that it had fixed itself. Regardless, it looks like it is moving/paying properly
hero member
Activity: 560
Merit: 500
Your pot is showing a negative number??  how is that possible?
I'm not sure what happen.
Nothing in my logs show anything being negative.
full member
Activity: 210
Merit: 100
firstbits: 121vnq
i keep picturing wiseoldowl as an owl, sitting in a corner and smoking a pipe...

"Well when I was your age, I was the best bitcoin double trouble player in all the land...."
member
Activity: 92
Merit: 10
full member
Activity: 238
Merit: 100
Also inquiring about - amount. is it due to unconfirmed status?
hero member
Activity: 560
Merit: 500
I'm getting such great comments! Cheesy

Also, at this time...the game would have been reset for midnight (just in-case anyone was wondering about the time).
Though, this is the only night I'm not going to reset it (may do some other nights in the future...but I'll keep everyone posted).

Also, it would be awesome if I could get some more people to reply saying they got paid! Cheesy
full member
Activity: 210
Merit: 100
firstbits: 121vnq
I think the instant action and no need to wait for confirmations will keep this one humming along at nice pace for awhile.
hero member
Activity: 560
Merit: 500
Well if your gonna let it ride until tomorrow night then I am in for another couple btc.
Yeah, I'm going to let it ride for tonight.

Also, not sure if anyone noticed there was two orange lines. I was checking if the next person's address. I changed it to check their transaction ID. (No problems, just a few table mistakes. No money lost). Cheesy
hero member
Activity: 560
Merit: 500
full member
Activity: 238
Merit: 100
Nice!!
Thanks for letting it ride.
hero member
Activity: 560
Merit: 500
Okay, I see.
I'll leave the first night (tonight) alone.
I'll have it setup so from tomorrow it will reset each midnight (clock is still going to be at the top).

[Edit]:
I added some code to the front page to:
1) Refresh every 30 seconds.
2) After it refreshes the first time you will notice ?pot_only is appended to the link. This will change the title to show how big the pot currently is. Saving you time from having to go back to the page and refreshing it every so often.

Hope everyone likes the updates. Cheesy

full member
Activity: 238
Merit: 100
 :-\yeah.?.?
Just this time because we didnt know what time it is. I dont really care that much but if other people feel the same way maybe.

Edit* Why'd my nervous/uneasy face come out like that??haha
hero member
Activity: 560
Merit: 500
Let me be the first to suggest running this one until 2moro nite...lol. Didnt know what time it was where you are.
So, instead of resetting each night...wait two nights?
full member
Activity: 238
Merit: 100
Let me be the first to suggest running this one until 2moro nite...lol. Didnt know what time it was where you are.
hero member
Activity: 560
Merit: 500
Nice same as me.  So will you immediately post a new btc address at midnight for tomorrows game?
I don't use a specific BTC address for payments (well I do, hrm...maybe I should post it?).
It uses the SCI from mybitcoins.com (btw, if you use mybitcoins.com you can get free transactions instead of paying the program fee of 0.0005BTC. As the host, I still take the 1% and 2% fees).

The database goes through, splits the earnings (look a few post up about the math of that), deletes the database, and re-creates it.

[Edit]: The code is now in-place for refunds:
Code:
	//get total amount the unpaid users have put in
$total = 0;
foreach($Id as $user)
{
$total = $Amount[$user] + $total; //they have in pot togeder
}

//spin for each user
foreach($Id as $userz)
{
$share[$userz] =  ( $Amount[$userz] * $total )/count($Id);
$amount2send[$userz] = $share[$userz] - ($share[$userz]/200); //take 2% for end of game fee ;D
mbc_spend($Address[$userz],$amount2send[$userz],"[BitDouble]: {End-of-Day} Refund!","");

//1 night, we need to logg this
$fh = fopen(--onebaddasshiddenfile--, 'a');
fwrite($fh, "[sending]: ".$amount2send[$userz]."\n");
fwrite($fh, "[Shares]: ".$share[$userz]."\n");
fwrite($fh, "[Account]: ".$Address[$userz]."\n\n");
fclose($fh);
}
This is the exact code I am using to split the shares.
If ANYONE sees anything wrong, please let me know!
ps, I am logging what get's shared for 1 night to make sure it goes smoothly. If not, having this log will allow me to see what went wrong.
hero member
Activity: 560
Merit: 500
so what time zone are your servers in?  ie, how long till midnight?
Quote from: 'front page'
Current TIME: 10:15:51 PM
Cheesy 1hr and 45min left
hero member
Activity: 560
Merit: 500
Okay, I believe I have it down (took me a while lol)...
Maybe I can get the communities input before I put it in place? I want to make sure this is fair for everyone.
Code:
usr[1] = 1
usr[2]= 1.5
brank= 1.7

count($Id) =2

$share_math = ( how_much_you_put_in * bank )  /  #ofPlayers_UnPaid ;

$share[1] =   ( 1 * 1.7 )  /  2 ;
$share[1]=  0.85;
$amount2send = $share[1] - ($share[1]/200); //2% gameover fee
$amount2send = 0.84575;
send(user,amount2send);

$share[2] =   ( 1 .5 * 1.7 )  /  2 ;
$share[2]=  1.275;
$amount2send = $share[2] - ($share[2]/200); //2% gameover fee
$amount2send = 1.268625;
send(user,amount2send);

Mind the $ and non $ switching. I do that when I code in notepad -> calculator before I move it into notepad++ xD
full member
Activity: 238
Merit: 100
Thats a toughy. Its different for each person.



Leftover pot
*
(
User_X's Unpaid Deposit Amount
divided by
Total amount of deposits of unpaid users
)

Then your fee
I dont know how to apply that to code

hero member
Activity: 560
Merit: 500
It was pretty late dude, and the concept was new. Hey but the program is pretty smooth:)
Are you doing a smaller time frame for the reset, or what ended up happening with that. I was thinking a big time frame was counter-productive.
I ended up going with the game resetting at midnight.
Currently working on the math to split the current bank between users who haven't gotten paid (when the game resets).
The problem I am having is the weight each user has on the bank as to make the split fair.
full member
Activity: 238
Merit: 100
It was pretty late dude, and the concept was new. Hey but the program is pretty smooth:)
Are you doing a smaller time frame for the reset, or what ended up happening with that. I was thinking a big time frame was counter-productive.
Pages:
Jump to: