Bitcoin Forum

Economy => Gambling => Topic started by: vipah on May 14, 2013, 09:59:04 AM



Title: [ANN] www.BitGrenade.net Hot Potato Chain Game (MNC/LTC)
Post by: vipah on May 14, 2013, 09:59:04 AM
Announcing the launch of www.bitgrenade.net

Your classic hot potato chain game supporting both LTC and MNC for the moment.  Will most likely add BTC and any other ALT by popular demand.

Come check us out!


Title: Re: [ANN] www.BitGrenade.net Hot Potato Chain Game (MNC/LTC)
Post by: CoinBomb on May 15, 2013, 07:15:16 AM
You have BLATENTLY stolen our javascript.

bitgrenade :

Code:
$(document).ready(function() {
  
  
function toHMS(seconds)
{
seconds = seconds-1;
if(seconds > 0)
{
var h = Math.floor(seconds / 3600);
var m = Math.floor(seconds % 3600 / 60);
var s = Math.floor(seconds % 3600 % 60);
var result = (h < 10 ? "0" + h : h) + ":" + (m < 10 ? "0" + m : m) + ":" + (s  < 10 ? "0" + s : s);
return result;
}
}
function updateTimers()
{
$(".timer").each(function() {
if(!isNaN($(this).html()))
{
seconds = $(this).html();
}
else
{
var hms = $(this).html();
var a = hms.split(":");
var seconds = (+a[0]) * 60 * 60 + (+a[1]) * 60 + (+a[2]);
}

if(seconds > 0)
{
$(this).html(toHMS(seconds));
}
else
{
$(this).html("N/A");
//pollGrenades();
}
});
}
$(".timer").each(function()
{
$(this).html(toHMS($(this).html()));
});

$(".grenade_button").live("click",function() {
var str = $(this).attr("id");
var id = str.match(/[0-9]+/g);

var address = $("#address").val();
var nick = $("#nick").val();
var url = $("#url").val();

$.ajax({
url: "./",
type: "POST",
async: false,
data: "action=buy.grenade&grenade_id="+id+"&address="+address+"&nick="+nick+"&url="+url,
success: function(data) {
if (data.error == 1) {
display_notify(data.title,data.msg,0);
} else {
$("#deposit_fields").html(data.msg);
pollGrenades();
}
}
});


});

var pollingGrenades = false;

function pollGrenades() {

if (! pollingGrenades) {

pollingGrenades = true;

$.ajax({
url: "./",
type: "POST",
async: false,
data: "action=get.grenades&coin_id="+1,
success: function(data) {
$("#grenade_wrapper").html(data.grenades);
}
});

pollingGrenades = false;
}
}

setInterval(updateTimers, 1000);
setInterval(pollGrenades, 30000);
updateTimers();

$("#coin_display").val(1);

$("#coin_display").change(function() {
$("form#coin_select_form").submit();
});

$("#faq_link").click(function() {
$("#faq").modal({
overlayClose:true,
opacity:65,
overlayCss: {backgroundColor:"#000"}
});
});


      
  });

CoinBomb.com (http://CoinBomb.com)
Code:
function toHMS(seconds)
{
seconds = seconds-1;
if(seconds > 0)
{
var h = Math.floor(seconds / 3600);
var m = Math.floor(seconds % 3600 / 60);
var s = Math.floor(seconds % 3600 % 60);
var result = (h < 10 ? "0" + h : h) + ":" + (m < 10 ? "0" + m : m) + ":" + (s  < 10 ? "0" + s : s);
return result;
}
}

function updateTimers()
{
$('.timer').each(function() {
if(!isNaN($(this).html()))
{
seconds = $(this).html();
}
else
{
var hms = $(this).html();
var a = hms.split(':');
var seconds = (+a[0]) * 60 * 60 + (+a[1]) * 60 + (+a[2]);
}

if(seconds > 0)
{
$(this).html(toHMS(seconds));
}
else
{
pollBombs('BTC');
}
});
}

var pollRunning = false;
function pollBombs()
{
if(!pollRunning)
{
pollRunning = true;
$.ajax({
url: "poll.php",
type: "POST",
data: {currencyName : currencyName},
dataType: "html"
})
.done(function(msg)
{
var $msg = $(msg);

$msg.find('.timer').each(function()
{
$(this).html(toHMS($(this).html()));
});
$('#bombWrapper').html($msg);
resizeContainer();
}
)
.always(function()
{
window.pollRunning = false
}
);
}
}


Title: Re: [ANN] www.BitGrenade.net Hot Potato Chain Game (MNC/LTC)
Post by: Quartx on May 19, 2013, 09:49:42 AM
REPLY TO MY PM


Title: Re: [ANN] www.BitGrenade.net Hot Potato Chain Game (MNC/LTC)
Post by: Zaih on May 19, 2013, 10:52:01 AM
Tsk tsk  :-\

You should have at least mixed up the values of the items to make it not look so obvious :P


Title: Re: [ANN] www.BitGrenade.net Hot Potato Chain Game (MNC/LTC)
Post by: vipah on May 22, 2013, 08:27:32 AM
I'm not too worried he just stole his from BitPotatoe and a question on stackoverflow.  I made some "tweaks".