Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // @Combination of PrimeDice 3 scripts Compiled by DaNksta
- // @Contains:
- // @PDDark Skin by Paradocks
- // @Faucet Timer (draggable and can show/hide with CTRL + ALT + Z)
- // @New BASE bet button - Sets your bet amount to whatever you want. Set this by clicking on the dice icon.
- // @REFRESH BALANCE (bets 0.00000000) by clicking on the B next to your balance.
- // @Add A new button near MAX, 1/2, and 2x buttons. Set its value by clicking the two dice logo above them.
- var basebet = 0.00000001;
- basebet = basebet.toFixed(8);
- $('.icon--dice').click(function() {
- basebet = prompt("What would you like your basebet to be?", "0.00000000");
- });
- $('<button id="basebet" class="btn btn--submit grid__item one-third" >Base</button>').insertAfter('div button:nth(3)');
- $('#basebet').click(function() {
- $('.hero__main input:first').val(basebet).change();
- });
- $('.icon--balance').attr('data-ember-action', '');
- $('.icon--balance').click(function() {
- $('.hero__main input:first').val(0).change();
- setTimeout(function() {
- $('#spinner').click();
- }, 500);
- });
- // ==UserScript==
- // @name PD3 Dark
- // @version 0.1
- // @description enter something useful
- // @author paradocks
- // ==/UserScript==
- var css = '',
- // Change the URL below in quotes for a custom background image.
- backgroundurl = 'http://cdn.wonderfulengineering.com/wp-content/uploads/2014/01/HD-backgrounds-3.jpg';
- // CSS
- css += '<style>';
- css += 'header, .tabs, .slideout__content__inside, .chat__you *, .btn, .hero__main, .rollrow-dark, .rollbox--prominent, .chat__input-holder{background-color:#121212 !important;color:#ccc !important;}';
- css += 'time{color:#ccc !important;}';
- css += 'div.tabs > div > div.live-data-header > div{background-color:#111111;border-top:1px solid #777; border-bottom:1px solid #777;}';
- css += '.btn,.btn--secondary.btn--active,.btn--secondary.btn--selector, .btn--submit:last-child{border:1px solid #777 !important;background-color:#242130 !important;color:#ccc!important;}';
- css += '.btn:hover,.btn--secondary.btn--active:hover,.btn--secondary.btn--selector:hover{border:1px solid #777 !important;background-color:#322E47 !important;color:#ccc!important;}';
- css += '.hero{margin-bottom:0px;background:url("'+ backgroundurl + '") no-repeat 50% 50%;}';
- css += '.slideout *{color:#ccc;}';
- css += '.tabs{padding-top:20px;border-top:1px solid #777 !important;}';
- css += 'header{border: 1px solid #777 !important;border-left:none !important;border-right:none !important;}';
- css += '.rollrow-thin, .rollrow-dark .chat__input-holder {background-color:#212121;}';
- css += '.input{background-color:#323232 !important;color:#ccc;}';
- css += '.action-open-slideout{background-color:#121212 !important;}';
- css += 'span.admin{color:red !important}';
- // Uncomment (remove // from two lines below) to Remove Site Header & Max Bet Button
- // css += '.theme-switch, .header-main, .hero button:nth-child(3) {display:none;}';
- // css += '.slideout, body{padding-top:0px !important; }';
- css += '</style>';
- $(css).appendTo('head');
- // PD3Dark End
- /*
- // PD3 Faucet Timer
- // Created by Serlite
- //
- // (Hide using Ctrl + Alt + Z)
- */
- var sinceLastClaim = 0;
- var $fTimer = null;
- var $fTimerWrapper = null;
- var fIntervalRef = null;
- var fTimerHider = {17: false, 18: false, 90:false};
- initializeTimer();
- // Creates GUI and begins timer countdown
- function initializeTimer(){
- if (!window.jQuery.ui){
- $("body").append("<script src='//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.js'></script>");
- }
- // Delay to allow jQuery UI to load
- setTimeout(function(){
- $("body").append("<div class='faucet-timer' style='background:#FFF; border:2px solid #b4b9cd; position:fixed; z-index:9999; top:100px; left:200px; color:#6d738c; padding:15px; font-size:1em'><p style='margin-bottom:10px;'>Since last claim:</p><p><span class='time-counter' style='font-weight:bold;'>00:00</span></p></div>");
- // Caching reference
- $fTimer = $(".faucet-timer .time-counter");
- $fTimerWrapper = $(".faucet-timer");
- $fTimerWrapper.draggable();
- fIntervalRef = setInterval(updateFaucetTime, 1000);
- // Reset timer if claim button is pressed
- $(document).on("click", "button.btn.btn--primary.btn--huge.btn--block", function(){
- if ($(this).text() == "Claim"){
- sinceLastClaim = 0;
- writeFaucetTime(formattedFaucetTime());
- setTimerCol();
- // Reset interval ensure precision
- clearInterval(fIntervalRef);
- fIntervalRef = setInterval(updateFaucetTime, 1000);
- }
- });
- // Register key down in combo
- $(document).keydown(function(e){
- if (e.keyCode in fTimerHider){
- fTimerHider[e.keyCode] = true;
- // Ctrl + Alt + Z, toggle visible
- if (fTimerHider[17] && fTimerHider[18] && fTimerHider[90]){
- $fTimerWrapper.toggle();
- }
- }
- });
- // Register key up in combo
- $(document).keyup(function(e){
- if (e.keyCode in fTimerHider){
- fTimerHider[e.keyCode] = false;
- }
- });
- }, 800);
- }
- // Increment timer value
- function updateFaucetTime(){
- sinceLastClaim++;
- writeFaucetTime(formattedFaucetTime());
- setTimerCol();
- }
- // Format time into more readable string
- function formattedFaucetTime(){
- var minutes = Math.floor(sinceLastClaim/60).toString();
- var seconds = (sinceLastClaim%60).toString();
- // Adding leading zeroes
- if (minutes.length == 1){
- minutes = "0" + minutes;
- }
- if (seconds.length == 1){
- seconds = "0" + seconds;
- }
- return (minutes + ":" + seconds);
- }
- // Change timer text
- function writeFaucetTime(faucetTime){
- $fTimer.text(faucetTime);
- }
- // Change colour according to time
- function setTimerCol(){
- if (sinceLastClaim >= 180){
- $fTimer.css("color","#5fb365");
- }
- else{
- $fTimer.css("color","#6d738c");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement