Bitcoin Forum
November 14, 2024, 09:15:17 PM *
News: Check out the artwork 1Dq created to commemorate this forum's 15th anniversary
 
   Home   Help Search Login Register More  
Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 »  All
  Print  
Author Topic: [Free Script] Untitled Dice - Run your own bitcoin dice site (no server needed)  (Read 64522 times)
dan (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
May 16, 2015, 08:17:46 PM
Last edit: July 14, 2016, 07:26:51 PM by dan
 #1

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.


Untitled Dice v0.0.8
Run your own dice site without funding your own bankroll and without risking your own money


Live Demo:
https://untitled-dice.github.io



Source Code:
https://github.com/untitled-dice/untitled-dice.github.io


https://i.imgur.com/dTwOR01.png


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/releases
2. 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. Smiley

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. Smiley Though note that this is just a hobby project so I can only provide limited support as time allows.

FAQ

Q: My faucet won't work
A: 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.
Code:
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#msg11524765

v0.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#dialogs

v0.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#L67

v0.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/
GreydonIselmoe
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250


Credits [CRE] - Community Manager


View Profile WWW
May 16, 2015, 09:41:01 PM
 #2

How would I run this on my own domain?

Look great, though! I'm not entirely familiar with moneypot, but I do know that most other open source dice scripts tend to have backdoors hardcoded somewhere to send deposits to a specific address, or allow for an attacker (the developer) to enter and withdraw or mess around with existing code.

████████  The next evolutionary step in crypto-currency | Sidechain technology - Claimable - sha256   ███████
████████████████  C R E D I T S - [C R E]  ███████████████
◥ Proof of Work / Proof of Deposit mining system ◥ Official Website ◥ Bitcointalk Thread ◥ Exchange
arallmuus
Legendary
*
Offline Offline

Activity: 2730
Merit: 1427



View Profile WWW
May 16, 2015, 10:05:58 PM
 #3

Look great, though! I'm not entirely familiar with moneypot but I do know that most other open source dice scripts tend to have backdoors hardcoded somewhere to send deposits to a specific address, or allow for an attacker (the developer) to enter and withdraw or mess around with existing code.

You might want to take a look abit more into moneypot https://bitcointalk.org/index.php?topic=1020726.0

All I can explain about this is that if a site is build on top of moneypot then you could be sure that it will be verified by Ryan and his team since the bankroll will be from moneypot itself, so Ryan will make sure if the code has no backdoors or any exploit that might harm moneypot ( You could choose to provide your own bankroll as well )

 
█▄
R


▀▀██████▄▄
████████████████
▀█████▀▀▀█████
████████▌███▐████
▄█████▄▄▄█████
████████████████
▄▄██████▀▀
LLBIT▀█ 
  TH#1 SOLANA CASINO  
████████████▄
▀▀██████▀▀███
██▄▄▀▀▄▄████
████████████
██████████
███▀████████
▄▄█████████
████████████
████████████
████████████
████████████
█████████████
████████████▀
████████████▄
▀▀▀▀▀▀▀██████
████████████
███████████
██▄█████████
████▄███████
████████████
█░▀▀████████
▀▀██████████
█████▄█████
████▀▄▀████
▄▄▄▄▄▄▄██████
████████████▀
........5,000+........
GAMES
 
......INSTANT......
WITHDRAWALS
..........HUGE..........
REWARDS
 
............VIP............
PROGRAM
 .
   PLAY NOW    
dan (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
May 16, 2015, 10:16:49 PM
 #4

How would I run this on my own domain?

Look great, though! I'm not entirely familiar with moneypot, but I do know that most other open source dice scripts tend to have backdoors hardcoded somewhere to send deposits to a specific address, or allow for an attacker (the developer) to enter and withdraw or mess around with existing code.

Since you're not actually running your own webserver, you can host your casino anywhere that will host some HTML and Javascript files. This is known as a "static website" as opposed to a "dynamic website" (backed by a database/webserver).

So, Googling for "host static website" or "host static website with custom domain" should give you a good overview of your options.

The Untitled Dice live demo is hosted on https://pages.github.com/ which has a quick article on how to point a custom domain at your "{USERNAME}.github.io" domain: https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages/

It looks like one of the easiest options would be to point a custom domain at a Dropbox folder. Here's a random article I found that recommends some services you might be interested in: http://www.maketecheasier.com/4-ways-to-host-your-website-on-dropbox/ (I Googled for "host static website on dropbox").

Re: Scripts with backdoors: Yeah, before I built this project, I first looked into getting some of the most popular casino scripts and then modifying them to talk to the Moneypot API. I thought it would allow me to leverage existing efforts and maybe rally some interest among turn-key script developers. But I wasn't impressed with the options and decided to write my own.
GreydonIselmoe
Sr. Member
****
Offline Offline

Activity: 294
Merit: 250


Credits [CRE] - Community Manager


View Profile WWW
May 16, 2015, 10:27:15 PM
 #5

Seeing how it uses moneypot as a bankroll, is it possible to configure untitled dice to use my local coindaemon? I'm trying to use this with an altcoin, that's why I ask.

Regarding backdoors, I see that Ryan would probably have screened this a bit and it's most likely safe. Thanks for your work!

████████  The next evolutionary step in crypto-currency | Sidechain technology - Claimable - sha256   ███████
████████████████  C R E D I T S - [C R E]  ███████████████
◥ Proof of Work / Proof of Deposit mining system ◥ Official Website ◥ Bitcointalk Thread ◥ Exchange
joclixal
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
May 16, 2015, 11:34:38 PM
 #6

i try create app, for what App Secret at moneypot??
dan (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
May 16, 2015, 11:49:56 PM
 #7

i try create app, for what App Secret at moneypot??

An app_secret is for apps that run on a server. My script runs in the browser, so you don't need the app_secret (you can just ignore it).

To connect my script with your own Moneypot casino, you just need to set the `app_id` and `redirect_uri` at the top of app.js.

Also, your `redirect_uri` in app.js needs to be one of the redirect_uris you set for your app on Moneypot's "Edit App" page. Need more help?
joclixal
Newbie
*
Offline Offline

Activity: 22
Merit: 0


View Profile
May 17, 2015, 12:04:53 AM
 #8

i try create app, for what App Secret at moneypot??

An app_secret is for apps that run on a server. My script runs in the browser, so you don't need the app_secret (you can just ignore it).

To connect my script with your own Moneypot casino, you just need to set the `app_id` and `redirect_uri` at the top of app.js.

Also, your `redirect_uri` in app.js needs to be one of the redirect_uris you set for your app on Moneypot's "Edit App" page. Need more help?
all done only 1 problem faucet not fuction always WAITING_FOR_SERVER?
look
http://dice.clixincome.com/
dan (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
May 17, 2015, 12:46:00 AM
 #9

Added an FAQ section to the first post that answers this question.

I will soon update the script so that it makes it more clear *why* the Faucet is failing.

Let me know if you still have trouble after setting up ReCaptcha, joclixal.
dan (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
May 17, 2015, 02:09:42 AM
 #10

If you have a fork of this script, you may want to pull in the v0.0.3 changes I just released.

It fixes some cross-browser compatibility issues. It also improves the chatbox by only scrolling to the latest message when the user is already near the bottom. That way, users won't be forced to the bottom of the chatbox every time a new message comes in.
elm
Legendary
*
Offline Offline

Activity: 1050
Merit: 1000


View Profile
May 18, 2015, 01:05:17 PM
 #11

..............................

Which is actually a really neat thing. You don't need to worry about getting shut down (just reopen on a different file host) or think too much about security =)

what do you mean with one doesn't need to worry about getting shut down? thanks
unamis76
Legendary
*
Offline Offline

Activity: 1512
Merit: 1012


View Profile
May 18, 2015, 02:33:39 PM
 #12

Since the funds don't seem to be separated, depositing/gambling/withdrawing there or in any other spinoff of this site is exactly the same as playing on MoneyPot?
elm
Legendary
*
Offline Offline

Activity: 1050
Merit: 1000


View Profile
May 18, 2015, 02:47:12 PM
 #13

Since the funds don't seem to be separated, depositing/gambling/withdrawing there or in any other spinoff of this site is exactly the same as playing on MoneyPot?

thank you for the question because it gives me a chance to add my question. if I would use moneypot investors will all my users need to register and deposit through moneypot?
elm
Legendary
*
Offline Offline

Activity: 1050
Merit: 1000


View Profile
May 18, 2015, 05:35:01 PM
 #14

if I would use moneypot investors will all my users need to register and deposit through moneypot?

Yeah, they will need to register an account with moneypot (there's a nice workflow, that's not too intrusive). While they don't need to go on moneypot.com to do the deposit (they can deposit directly from your app) the funds are managed by moneypot.com

just to be sure that I understood you right. lets say I will have 1k users so they all need to register with moneypot instead with my website?
thanks
PolarPoint
Hero Member
*****
Offline Offline

Activity: 672
Merit: 500


View Profile
May 18, 2015, 05:50:40 PM
 #15

This is a major step forward for anyone who wants to start their own dice site! It sounds very easy to build and owner do not need to fund his own bankroll. The commissions of moneypot is difficult to understand. If someone can work it out, I think small profits can be made.
elm
Legendary
*
Offline Offline

Activity: 1050
Merit: 1000


View Profile
May 18, 2015, 05:55:45 PM
 #16

This is a major step forward for anyone who wants to start their own dice site! It sounds very easy to build and owner do not need to fund his own bankroll. The commissions of moneypot is difficult to understand. If someone can work it out, I think small profits can be made.

why would some one want to own another dice site? moneypot is a great idea and very helpful but IMO for other games than dice.
dan (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
May 18, 2015, 06:13:39 PM
Last edit: May 19, 2015, 04:35:50 AM by dan
 #17

This is a major step forward for anyone who wants to start their own dice site! It sounds very easy to build and owner do not need to fund his own bankroll. The commissions of moneypot is difficult to understand. If someone can work it out, I think small profits can be made.

why would some one want to own another dice site? moneypot is a great idea and very helpful but IMO for other games than dice.

I decided that a dice script would be a good start. Everyone is familiar with dice and how dice work. It's also pretty easy to build and, thus, enhance with your own ideas.

I will keep improving the script, listening to feedback, providing support to anyone that wants to use it, and updating it with new features.

I also plan on releasing more scripts like plinko and slots. Smiley

I'm always open to feedback, thoughts, ideas, and suggestions!
elm
Legendary
*
Offline Offline

Activity: 1050
Merit: 1000


View Profile
May 19, 2015, 06:48:19 AM
 #18

@Dan

a client side game would be enough to start with moneypot? did I understand that right? but a client and server side would be also fine? thanks
dan (OP)
Newbie
*
Offline Offline

Activity: 50
Merit: 0


View Profile
May 19, 2015, 08:09:50 AM
Last edit: May 19, 2015, 06:50:12 PM by dan
 #19

@Dan

a client side game would be enough to start with moneypot? did I understand that right? but a client and server side would be also fine? thanks

Exactly. Untitled Dice is 100% client-side which is why you can run it anywhere.

Moneypot's API also supports server-side apps: https://www.moneypot.com/api-docs (see anything related to the "confidential flow")
PesiHUN
Member
**
Offline Offline

Activity: 113
Merit: 10


View Profile
May 19, 2015, 11:12:50 PM
Last edit: May 19, 2015, 11:44:12 PM by PesiHUN
 #20

Check it and give it a try pls Smiley https://pesihun.github.io/
I would like to see how it works etc. so anybody who can afford play 1-2 games ty Smiley
EDIT.: After im playing with 2 bits and lose all of them, i checked the apps owner tab and i only get 0.03 bit :/ its so low

██████████    YoBit.net - Cryptocurrency Exchange - Over 350 coins
█████████    <<  ● $$$ - $$$ - $$$ - $$$ - $$$ - $$$ - $$$   >>
██████████    <<  ● Play DICE! Win 1-5 btc just for 5 mins!  >>
Pages: [1] 2 3 4 5 6 7 8 9 10 11 12 13 14 »  All
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!