Join our Official Discord Server.
You can see our github here.
And the V0.1 pull request here.
Bug Fixes
- Roulette table would not truncate, and would truncate when a jackpot game would have finished.
We just have removed this query from endJackpotGame and added it to createGame in sitebot
- con.query("TRUNCATE roulette", function (err, result) {
- });
New Features
- We have removed balance from roulette and jackpot and added it to the navbar (this is on every page of the website, you can see your balance everywhere).
This got removed from roulette.php and jackpot.php.
- <h5 id="balance" style="margin:0">Loading...</h5><br>
And this got added to the navbar.php.
+ <li class="nav-item">
+ <a id="balance" class="nav-link"></a>
+ </li>
And the script that updates the balance was added in navbar too
+ function getBalanced() {
+ $.getJSON( "../src/getbalance.php", function( data ) {
+ if(data['status'] == 'success') {
+ $("#balance").text("Balance: " + data['balance'] + " SBD");
+ }
+ });
+ }
+
+ getBalanced();
- Added the current price of your Balance in US$ using CoinMarketCap data.
We are requesting a json with the current price of SBD from CoinMarketCap and multiplying it with your current balance.
+ $.getJSON( "https://api.coinmarketcap.com/v1/ticker/steem-dollars/?convert=usd", function( data ) {
+ var curr = <?php echo $balance;?> * data[0]['price_usd'];
+ curr = curr.toFixed(2);
+ $("#underbalanced").text(curr + " US$");
+ });
Added a signup login that redirects you to signup.steemit.com
Added a refferal system
Without refferals/reffered
With reffered
With Refferals
Refferal History
How does the refferal system work?
If you were reffered by someone, who you can set on your profile, he will recive everytime you bet 0.1% of your bet as a reward, if you bet 1 SBD he will recive 0.001 SBD. (This is subjected to change, maybe by adding Refferal Levels)
How did we implement it?
Each time you bet we check if you have a refferal, like we check if you have enough balance, if you do we run this
if($ref) {
$noyou = $db->prepare('SELECT * FROM users WHERE username = ?');
$noyou->bind_param('s', $ref);
$noyou->execute();
$rt = $noyou->get_result();
if($rt->num_rows) {
while ($refrow = $rt->fetch_assoc()) {
$refbalance = $refrow['balance'];
}
}
$refbalance = $refbalance + ($_GET['balanceTop']/1000);
$noyou = $db->prepare('UPDATE users SET balance = ? WHERE username = ?');
$noyou->bind_param('ds', $refbalance, $ref);
$noyou->execute();
$transType = 8;
$refrew = $_GET['balanceTop']/1000;
$noyou = $db->prepare('INSERT INTO history (transType, user1, user2, reward, timestamp) VALUES (?, ?, ?, ?, ?)');
$noyou->bind_param('issdi', $transType, $_COOKIE['username'], $ref, $refrew, $timestampedd);
$noyou->execute();
}
Posted on Utopian.io - Rewarding Open Source Contributors
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]
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
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
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
Apologize for the delay, been managing and speaking about Steem at the Steem Creators Conference in Las Vegas, NV all weekend. Expect to be within the the 24-48 hour upvote window in the next 48 hours.
As a friendly reminder, the upvote fee is $0.08 SBD ($0.081 for incognito). Current 300%+ upvote is now $0.24+ SBD.
That being said…
Investors who delegate SP to @thundercurator are entitled to 75% of @thundercurator income after curation. Get on-board early and grow with us!
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit