pescu23
Newbie
Offline
Activity: 19
Merit: 0
|
 |
July 07, 2015, 06:16:39 PM |
|
No one can help me here??  If you want to change the "Chance:", find in the app.js the following line of code multiplier: { str: '2.00', num: 2.00, error: undefined },Set multiplier anything between 1 and 10 - just note the profit drop if the Chance increase an it will increase if the Chance decrease. I don't want to change the Chance, I want to add the target number. Example for Multiplier x4, the Chance would be 24.75% and the Target would be > 75.24 I would like to show the target before Rolling the dice. How can I implement this? I'm a bit lost here...
|
|
|
|
|
|
hamburger
|
 |
July 07, 2015, 06:56:42 PM |
|
I don't want to change the Chance, I want to add the target number.
Example for Multiplier x4, the Chance would be 24.75% and the Target would be > 75.24
I would like to show the target before Rolling the dice.
How can I implement this? I'm a bit lost here...
It is very important to explain exactly what you want. Do not expect people who are willing to take time to help you to just know what you are actually want. If you want to display "Target" instead of "Chance" Find the following code in app.js return el.div( {}, el.span( {className: 'lead', style: { fontWeight: 'bold' }}, 'Chance: ' ), innerNode );
return el.div( {}, el.span( {className: 'lead', style: { fontWeight: 'bold' }}, 'Target: ' ), innerNode );
Then change the code to inverse the calculation Find the following code in app.js // Just show '--' if chance can't be calculated var innerNode; if (isError) { innerNode = el.span( {className: 'lead'}, ' --' ); } else { innerNode = el.span( {className: 'lead'}, ' ' + (winProb * 100).toFixed(2).toString() + '%' ); }
change it to // Just show '--' if chance can't be calculated var innerNode; if (isError) { innerNode = el.span( {className: 'lead'}, ' --' ); } else { innerNode = el.span( {className: 'lead'}, ' > ' + ((winProb * -100) + 100 ).toFixed(2).toString() + '%' ); }
You site will display; Target: > 75.24%as simple as that! Enjoy.
|
Datacoin : DHZ6H91fsDoBHbdqED3ysCJJ2TUh3zRMZD Krugercoin : Yz3A9sTMp2yh5QLuAL8YQyvS5PdjHRHkkf
|
|
|
pescu23
Newbie
Offline
Activity: 19
Merit: 0
|
 |
July 07, 2015, 07:02:44 PM |
|
Hamburger you are right I will be more specific when asking!
I would like to show both but I think I will be able (I'll try!) to implement it with your explanation.
Thank you very very very much, I was struggling my small mind with this all day!!
Thanks again!!!
|
|
|
|
|
pescu23
Newbie
Offline
Activity: 19
Merit: 0
|
 |
July 07, 2015, 07:10:50 PM |
|
I'm having some difficulties to get the calculation for the < 
|
|
|
|
|
pescu23
Newbie
Offline
Activity: 19
Merit: 0
|
 |
July 07, 2015, 07:21:03 PM |
|
got it!
I'm publishing it in case anyone is interested:
((winProb * - 100)*-1).toFixed(2).toString()
|
|
|
|
|
coinableS
Legendary
Offline
Activity: 1470
Merit: 1191
|
 |
July 18, 2015, 11:12:50 PM |
|
After installing this to my domain under the directory /dice it seems to have PERMANENTLY edited my server config. Even after completely deleting the directory I installed this to it still redirects to moneypot. I'd like to have my directory back for my own usage, what do I need to do to stop this auto-redirect?
|
|
|
|
|
coinableS
Legendary
Offline
Activity: 1470
Merit: 1191
|
 |
July 19, 2015, 04:46:56 PM |
|
After installing this to my domain under the directory /dice it seems to have PERMANENTLY edited my server config. Even after completely deleting the directory I installed this to it still redirects to moneypot. I'd like to have my directory back for my own usage, what do I need to do to stop this auto-redirect?
SOLVED, it appears the issue was with my server and not this script. Since there is over 1,000 files it took longer to delete than my FTP manager lead me to believe. Why does this app have over 1,000 files? Seems like a bit much for a site that just uses moneypot API. API is supposed to make things lightweight...
|
|
|
|
|
dan (OP)
Newbie
Offline
Activity: 50
Merit: 0
|
 |
July 28, 2015, 02:02:02 AM |
|
SOLVED, it appears the issue was with my server and not this script. Since there is over 1,000 files it took longer to delete than my FTP manager lead me to believe. Why does this app have over 1,000 files? Seems like a bit much for a site that just uses moneypot API. API is supposed to make things lightweight...
Untitled Dice consists of three files (app.js, index.html, style.css) and about a dozen dependency files found in the vendor and node_modules folders. The rest of those files are nonessential cruft managed by Git and its package manager. 1500+ files are in the ".git" directory that Git creates whenever you clone a project. This folder contains all of the revisions made to a project over time and is only necessary for development purposes, so avoid pushing it to your production server. 1000+ files are in the "node_modules" directory. Untitled Dice uses a package manager called NPM to maintain that folder of dependencies. Even though Untitled Dice only uses 9 files within that folder, the NPM tool populates it with all the development files that each dependency comes with. You can see the actual files that Untitled Dice depends on right here: https://github.com/untitled-dice/untitled-dice.github.io/blob/master/index.htmlOne quick solution would be to zip the untitled-dice directory, FTP it to your server, and then unzip it there. I'll look into isolating Untitled Dice's dependencies to make life easier for this workflow. 
|
|
|
|
|
coinableS
Legendary
Offline
Activity: 1470
Merit: 1191
|
 |
July 28, 2015, 04:36:51 AM |
|
1500+ files are in the ".git" directory that Git creates whenever you clone a project. This folder contains all of the revisions made to a project over time and is only necessary for development purposes, so avoid pushing it to your production server.
Thanks for that explanation Dan, I was wondering why there were so many files included when I cloned it on github.
|
|
|
|
|
smeagol
Legendary
Offline
Activity: 1008
Merit: 1005
|
 |
July 29, 2015, 03:45:47 AM |
|
I put a script up at neodice.ga, it would be great if you could take a look and give me feedback! (There is a rudimentary XP feature, if you have any ideas feel free to PM me)
|
|
|
|
|
dan (OP)
Newbie
Offline
Activity: 50
Merit: 0
|
 |
August 13, 2015, 10:08:17 PM Last edit: August 13, 2015, 10:33:00 PM by dan |
|
v0.0.7 Release: Hooked up Moneypot's new socket/chat serverMoneypot just released a new socket-server which includes a better chat-server and pushes notifications when the user's unconfirmed and confirmed balances change. This update doesn't change very many lines of code since the new chat-server has an almost identical API to the old one. If you want to check it out or if you want to implement this update on your own Untitled-Dice variant, you can see the changes here: https://github.com/untitled-dice/untitled-dice.github.io/commit/2e5a03fa0c683ab6f35fe7246ab538aa18f3cabdWhat this changes about Untitled-Dice: - Chat messages are now saved in Moneypot's database and not forgotten when the chat-server resets.
- Muted users are now saved in Moneypot's database and not forgotten when the chat-server resets.
- The UI now instantly updates to reflect the user's unconfirmed balance and when the user's deposit is confirmed and ready to spend.
For example, as soon as the user makes a bitcoin deposit to your app, Untitled-Dice displays it:
https://dl.dropboxusercontent.com/spa/quq37nq1583x0lf/-vxm59n-.png
And once a block confirms the deposit, Untitled-Dice rolls it into the user's balance:
https://dl.dropboxusercontent.com/spa/quq37nq1583x0lf/1xv64a03.png
In other words, users get instant peace of mind when they deposit into your app.
- Mods now actually have /mute and /unmute power. With the previous chat-server, mods were powerless.
 - HH:MM timestamps are now displayed next to chat messages: https://i.imgur.com/fAZ8FrQ.png
|
|
|
|
|
coinableS
Legendary
Offline
Activity: 1470
Merit: 1191
|
 |
August 13, 2015, 10:23:37 PM |
|
Very nice! Good update IMO, I think some people were confused about having to refresh to see their updated balance after a deposit. Keep up the good work guys!
|
|
|
|
|
dan (OP)
Newbie
Offline
Activity: 50
Merit: 0
|
 |
August 14, 2015, 10:01:13 PM Last edit: August 14, 2015, 10:41:03 PM by dan |
|
Very nice! Good update IMO, I think some people were confused about having to refresh to see their updated balance after a deposit. Keep up the good work guys!
Thanks! Agreed, it's a much smoother experience now that your deposits are instantly acknowledged in the UI. Experimental Update: Added an "All Bets" tabAlso started playing with a more visual interpretation of the roll and outcome: https://i.imgur.com/1Le8iZB.pngI still have some more work to do like populating the All Bets tab when Untitled-Dice loads (done) and replicating the visual outcome in the My Bets tab. I'll release the polished version in v0.0.9 soon. I released v0.0.8 last night which adds the house edge to the configuration options at the top of app.js since it was such a common feature request. For example: https://github.com/untitled-dice/untitled-dice.github.io/issues/3
|
|
|
|
|
badbuddha
Newbie
Offline
Activity: 2
Merit: 0
|
 |
August 17, 2015, 04:31:41 PM |
|
Could you maybe elaborate in detail how the profits between the site owner and Moneypot is split?
Let's say user X deposits 1 BTC and loses it, user Y deposits 1 BTC, wins 4 BTC and then withdraws his 5 BTC total to his wallet. How is it split in this easy example?
|
|
|
|
|
coinableS
Legendary
Offline
Activity: 1470
Merit: 1191
|
 |
August 18, 2015, 03:54:46 AM |
|
Could you maybe elaborate in detail how the profits between the site owner and Moneypot is split?
Let's say user X deposits 1 BTC and loses it, user Y deposits 1 BTC, wins 4 BTC and then withdraws his 5 BTC total to his wallet. How is it split in this easy example?
They have info on this in the FAQ https://www.moneypot.com/faqHow much do you charge? MoneyPot is 100% free, both for users and app developers. On all bets against our bankroll we do take a 50% share of all profit you make.
|
|
|
|
|
elm
Legendary
Offline
Activity: 1050
Merit: 1000
|
 |
August 18, 2015, 06:11:17 AM |
|
Could you maybe elaborate in detail how the profits between the site owner and Moneypot is split?
Let's say user X deposits 1 BTC and loses it, user Y deposits 1 BTC, wins 4 BTC and then withdraws his 5 BTC total to his wallet. How is it split in this easy example?
They have info on this in the FAQ https://www.moneypot.com/faqHow much do you charge? MoneyPot is 100% free, both for users and app developers. On all bets against our bankroll we do take a 50% share of all profit you make. what do I miss here? how can an app owner not use the MP bank roll?
|
|
|
|
|
eternalgloom
Legendary
Offline
Activity: 1820
Merit: 1283
|
 |
August 18, 2015, 05:17:23 PM |
|
Wow you have certainly put quite a bit of effort into this project, awesome that you're just releasing it for free. The though of running my own dice website never crossed my mind tbh, but I will have a go at it with this though.
|
|
|
|
dan (OP)
Newbie
Offline
Activity: 50
Merit: 0
|
 |
August 20, 2015, 04:41:12 AM |
|
what do I miss here? how can an app owner not use the MP bank roll?
RHavar has said that he wants to build an API for bets that cannot be provably fair like if you wanted to build a sports-betting casino on top of Moneypot. At which point only the provably fair API would bet against the investors (the bankroll) and the unprovably fair API would not.
|
|
|
|
|
coldblooded
Newbie
Offline
Activity: 51
Merit: 0
|
 |
August 23, 2015, 08:38:14 AM |
|
Hi, I've been playing around with this for a couple days. One, my faucet just says "loading" what am I doing wrong?  Also, can you tell me what file in the source code the endpoint is being set and the betting logic actually takes place? Is that socket.io.js? Thanks for providing this, it's a great starting point for building any type of other app because it has the oauth stuff and the proven fair encryption/transaction all set up and that's probably the most time consuming part. Thanks again for any help you can provide on the faucet and my main concern is finding the end point so i can create a custom bet. That is what I'm basically trying to do, as I think the only bet type currently is simple_dice if I'm not mistaken.
|
|
|
|
|
Emerge
Legendary
Offline
Activity: 854
Merit: 1000
|
 |
August 23, 2015, 10:46:39 AM |
|
Hi, I've been playing around with this for a couple days. One, my faucet just says "loading" what am I doing wrong?  Also, can you tell me what file in the source code the endpoint is being set and the betting logic actually takes place? Is that socket.io.js? Thanks for providing this, it's a great starting point for building any type of other app because it has the oauth stuff and the proven fair encryption/transaction all set up and that's probably the most time consuming part. Thanks again for any help you can provide on the faucet and my main concern is finding the end point so i can create a custom bet. That is what I'm basically trying to do, as I think the only bet type currently is simple_dice if I'm not mistaken. For your faucet problem, you probably didn't enter the domain's proper secret for Google Recaptcha
|
|
|
|
|
|