Update: I built this for the Moneypot API as it was when RHavar founded it. Since then, Moneypot is under new ownership and its API has possibly changed. I will not be updating this script. You'll need to know some Javascript to maintain it. I don't offer any technical support.
What is it?Untitled Dice is a bare-bones bitcoin dice casino built on top of the Moneypot.com gambling API that lets anyone run their own dice site by cloning and modifying this project.
Since Moneypot handles the user accounts, betting, faucet, and chat, Untitled Dice does not need a server of its own. It's fully client-side (just some javascript files), so it can be hosted anywhere including Github.
Features- Chat box
- Hotkeys
- Faucet
- Provably fair verification
- Serverless: Host it anywhere that hosts html and javascript files
- Free bankroll: Since your users bet against Moneypot's bankroll, you risk no money and the profits are shared between you, Moneypot, and Moneypot's investors. See:
https://www.moneypot.com/investment- 1% house edge
Want to run your own dice site?1. Clone this project's code (
https://github.com/untitled-dice/untitled-dice.github.io) or get the latest stable release here:
https://github.com/untitled-dice/untitled-dice.github.io/releases2. Create an app at Moneypot.com (
https://www.moneypot.com/apps/new)
3. Modify the config (most importantly the config.app_id) at the top of the app.js file (
https://github.com/untitled-dice/untitled-dice.github.io/blob/2d3b14c7f5fae0c81a810fd62e378f7e63099d44/app.js#L4-L21)
4. Do whatever you want with the code. Rebrand it completely. Change the colors. Improve the code. Make it your own. Just keep an eye on this thread and the github repo to look out for any updates you may want to backport into your clone.
Questions?Just ask here.
If you need 1-on-1 support, you can find me lurking on MoneyPot's Slack (
http://slack.moneypot.com/), username is `dan` just like here.
Though note that this is just a hobby project so I can only provide limited support as time allows.
FAQQ: My faucet won't workA: The faucet uses Google ReCaptcha to prevent abuse, so you sign your website up with ReCaptcha here:
https://www.google.com/recaptcha/intro/index.html - Once you register your site there, ReCaptcha will give you a site_key and a site_secret. Your site_key goes into the config at the top of app.js, and your site_secret goes into the "Edit App" page for your app - you will see a field called "Recaptcha Secret".
Q: What commands are available in the chatbox?A: Only app owners and mods can use commands.
COMMAND DESCRIPTION
/mute <username> <duration> Mute <username> for <duration>
/unmute <username> Unmute <username>
EXAMPLES
/mute foo forever Mute user "foo" forever
/mute foo 10 min Mute user "foo" for 10 minutes
/mute foo 30 sec Mute user "foo" for 30 seconds
/mute foo 1 day Mute user "foo" for 1 day
/unmute foo Unmutes user "foo"
TODO list and things I need to improve:- Implement auto-better
- Implement an "All Bets" tab
- Let user set client-seed. It defaults to 0 right now.
- [Implemented in v0.0.7]
Display timestamps in chat- [Fixed in v0.0.3]
Right now, the chatbox always scrolls to the last message every time someone chats. This is very annoying when you're trying to scroll back to read previous conversation because the chat will keep jerking you to the latest message. I need to fix it so that the chat only scrolls if you are viewing the latest message.Changelog:v0.0.8 (13 August 2015): Added configurable house edge (minor but often-requested feature)
- You can now configure the script's house-edge in the configuration settings at the top of app.js (default is 1%)
v0.0.7 (13 August 2015): Upgrades to Moneypot's new socket-/chat-server (Vastly improves the Untitled-Dice experience. Recommended upgrade!)
- Read more here:
https://bitcointalk.org/index.php?topic=1062680.msg12135241#msg12135241- Chat messages and mutes are now saved in Moneypot's database and will not be forgotten when the chat-server resets
- Mods now have the power to /mute and /unmute
- The UI instantly updates to reflect changes in the user's confirmed and unconfirmed balance (when they deposit bitcoin to your app's bitcoin address)
- Chat messages now have a HH:MM timestamp
v0.0.6 (3 June 2015): Very minor/skippable release
- Made bet validation errors more user-friendly:
https://bitcointalk.org/index.php?topic=1062680.msg11524765#msg11524765v0.0.5 (2 June 2015):
- Added Deposit and Withdraw dialog links to navbar so users can move money in and out of untitled-dice without navigating to Moneypot. Read more at
https://www.moneypot.com/api-docs#dialogsv0.0.4:
- Fixed bug where betting high would have house of edge of 1.02% instead of 1.00% -
https://github.com/untitled-dice/untitled-dice.github.io/blob/1beabd04d13dd0d619498dc198b165c3a5c6b0d3/app.js#L67v0.0.3:
- ChatBox only scrolls to last message if user is already scrolled to the bottom when someone chats
- Fixed a cross-browser compatibility issue (e.g. "Number.isFinite" error in Safari)
- Started adding version as a comment in app.js to help operators follow the changelog
My other work:-
http://plinkopot.com/