[V0.1.1] - SteemCasino - Slots have been added

in #utopian-io7 years ago (edited)

image.png
Join our Official Discord Here.
You can see our github here.
And the pull request for v0.1.1 here.

Bug Fixes

  • Fixed the profit bug, where the profit would have been calculated wrongly. Thanks to @jemmanuel.

New Features

  • Added a new About Us, FAQ and Privacy Policy thanks to @edikanefanga.
  • 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 = "<br><a style=\"text-decoration:underline;cursor:pointer\" onclick=\"parent.cancelGame(".$gameid.")\">Cancel game</a>";
+               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
    image.png

  • Added a promo codes system, promo codes give promotional balance to the ones that use them.

  • Added Slots
    image.png

image.png



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

I will upvote and resteem your last blog post free to my 35,000+ followers if you reply with the word, "free".

As a follower of @followforupvotes this post has been randomly selected and upvoted! Enjoy your upvote and have a great day!

You got a 100.00% upvote from @steemcreators courtesy of @andreistalker!

Steamcreators is a collaborative group of influential Steemians leveraging their expertise and resources to create a better platform for all. 75% of all revenue from this bot goes to those that have delegated their hard-earned Steempower to our cause. The rest of the revenue goes to fund new events, projects and development around the globe involving the Steem blockchain to continue revolutionize the way the world uses social media and cryptocurrency (minus a small management fee to run/update this service).

For more information or to get involved with Steemcreators contact Jacob Billett @entrepreneur916 or IJ Maha @steemcafe.

Thanks for the contribution. It has been approved.


Need help? Write a ticket on https://support.utopian.io.
Chat with us on Discord.

[utopian-moderator]

Hey @andreistalker! Thank you for the great work you've done!

We're already looking forward to your next contribution!

Fully Decentralized Rewards

We hope you will take the time to share your expertise and knowledge by rating contributions made by others on Utopian.io to help us reward the best contributions together.

Utopian Witness!

Vote for Utopian Witness! We are made of developers, system administrators, entrepreneurs, artists, content creators, thinkers. We embrace every nationality, mindset and belief.

Want to chat? Join us on Discord https://discord.me/utopian-io

Coin Marketplace

STEEM 0.20
TRX 0.26
JST 0.039
BTC 100693.54
ETH 3647.21
USDT 1.00
SBD 3.13