Join our Official Discord Here.
You can see our github here.
And the pull request for v0.1.1 here.
Bug Fixes
New Features
- Added a new About Us, FAQ and Privacy Policy thanks to
.
- You now need to accept the Privacy Policy before playing on the site.
- Added a promotional balance!
How did we implement it?
We have added a new row in users named promob.
+ `promob` float NOT NULL DEFAULT '0'
And now we don't check anymore if you have enough money in your balance, but if you have enough money in your balance AND promotional balance.
if(($promobal + $balance) >= $_GET['bet'])
And if you do have a promotional balance this is how we calculate how much we remove from balance or/and promotional balance. If you don't have a promotional balance, everything is normal nothing's changed. But if you do have a promotional balance and it's less than your bet, we're setting your promotional balance to 0 and your balance to balance - (your bet - promotional balance).
if(!$promobal) {
+ $newbal = $balance - $_GET['bet'];
+ } else {
+ if($promobal <= $_GET['bet']) {
+ $betnew = $_GET['bet'] - $promobal;
+ $promobal = 0;
+ $newbal = $balance - $betnew;
+ } else {
+ $promobal = $promobal - $_GET['bet'];
+ $newbal = $balance;
+ }
+ }
- Added a Cookie Consent
- Added a Cancel Button for RPS and Coinflip
How did we implement it?
First we check if you are the owner of any of the Coinflip or RPS games, if you are a cancel button will appear.
if($player1 == $_COOKIE['username'] || $player2 == $_COOKIE['username'])
+ $cancel = "
<a style=\"text-decoration:underline;cursor:pointer\" onclick=\"parent.cancelGame(".$gameid.")\">Cancel game";
+ else
+ $cancel = "";
A new .php script named cancel.php that sees if everything is right and can be canceled. First it checks if the game exist, then if the game is not finished through
if($user1 == "" || $user2 == "")
Then it checks if you are the owner of the game through
if($user1 == $_COOKIE['username'] || $user2 == $_COOKIE['username'])
And if everything it's alright it will return your bet and delete the game.
$balance += $bet;
+
+ $q = $db->prepare("UPDATE users SET balance = ? WHERE username = ?");
+ $q->bind_param('ds', $balance, $_COOKIE['username']);
+
+ $q->execute();
+
+ $q = $db->prepare("DELETE FROM coinflip WHERE ID = ?");
+ $q->bind_param('i', $_GET['game']);
+
+ $q->execute();
Added a scroll to history
Added a promo codes system, promo codes give promotional balance to the ones that use them.
Added Slots
Posted on Utopian.io - Rewarding Open Source Contributors