Advertisement
chibudesu

Cookie Crumcher

Jan 19th, 2022
760
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. document.getElementById('storeTitle').onmouseover=function() {
  2.     Game.tooltip.dynamic=0;
  3.     Game.tooltip.draw(this, function () {
  4.         window.Buildings = [];
  5.         Game.ObjectsById.forEach((building, index) => {
  6.             if (!building.locked)
  7.                 Buildings.push({
  8.                     'icon': building.iconColumn,
  9.                     'price': Beautify(Math.round(building.price)),
  10.                     'canBuy':Game.cookies>=building.price,
  11.                     'name': building.name,
  12.                     'cost': building.price,
  13.                     'count': building.amount,
  14.                     'value': building.price/(building.storedCps*Game.globalCpsMult)
  15.                 })
  16.         });
  17.         Buildings.sort((a, b) => a.value - b.value);
  18.         output = '<div style="padding:8px;min-width:300px;">';
  19.         Buildings.forEach(building => {
  20.             var time = (building.cost-Game.cookies)/Game.cookiesPs;
  21.             output += ''+
  22.             '<div class="icon" style="float:left;margin-left:-8px;margin-top:-8px;background-position:'+
  23.                 (-48*building.icon)+'px 0px;"></div>'+
  24.             '<div style="float:right;text-align:right;font-weight:bold;color:#6f6;">'+
  25.                 '<small>+</small>' + Math.round(((building.value/Buildings[0].value)-1)*100) + '%<br>'+
  26.                 '<small>'+
  27.                     '<span class="price '+(building.canBuy?'':'disabled')+
  28.                         '" style="padding-top:3px">'+building.price+'</span>'+
  29.                 '</small>'+
  30.             '</div>'+
  31.             '<div class="name">' + building.name + '</div>'+
  32.             '<small>[owned: '+building.count+'] '+(time>0?Math.floor(time/86400)+","+
  33.                 Math.floor(time%2586400/3600)+":"+Math.floor(time%253600/60)+':'+Math.floor(time%2560):'')+
  34.             '</small>'+
  35.             '<div class="line"></div>'
  36.         });
  37.         output += '<div style="font-weight:bold">per second: <span class="price">'+Beautify(Game.cookiesPs)+'</span>'+
  38.                     '<br>per minute: <span class="price">'+Beautify(Game.cookiesPs*60)+'</span>'+
  39.                     '<br>per 10 minutes: <span class="price">'+Beautify(Game.cookiesPs*600)+'</span>'+
  40.                     '<br>per 30 minutes: <span class="price">'+Beautify(Game.cookiesPs*1800)+'</span>'+
  41.                     '<br>per hour: <span class="price">'+Beautify(Game.cookiesPs*3600)+'</span>'+
  42.                     '<br>per day: <span class="price">'+Beautify(Game.cookiesPs*86400)+'</span>'+
  43.                   '</div>';
  44.         return output;
  45.     },'store');
  46.     Game.tooltip.wobble();
  47. };
  48.  
  49. // Some element styles
  50. document.getElementById('topBar').style.display="none";
  51. document.getElementById('game').style.top="0px";
  52. document.getElementById('centerArea').style.overflowY="auto";
  53. document.getElementById('smallSupport').parentNode.removeChild(document.getElementById('smallSupport'));
  54. document.getElementById('support').parentNode.removeChild(document.getElementById('support'));
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement