Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Output the number of each building owned to the console:
- keys(Game.buildings).reduce(function(p,c){
- if(Game.buildings[c].visible)
- {
- buildamount = (Game.buildings[c].name + ': ' + Game.buildings[c].amount + ', ')
- }
- else buildamount = ''
- return p + buildamount},'')
- //output the income of each resource to the console:
- keys(Game.res).reduce(function(p,c){
- if(Game.res[c].visible && Game.res[c].computedPS > 0)
- {
- resincome = ('\n' + Game.res[c].name + ': ' + Beautify(Game.res[c].computedPS) + '/s');
- }
- else resincome = ''
- return p + resincome},'')
- /*output to the console the remaining achievements not won and if applicable how many resources/buildings needed (doesn't show when it is unlocked on the purchase of something:*/
- achievementsleft = '\n'
- for(i in Game.achievements)
- {
- if(Game.achievements[i].won == 0)
- {
- achievementsleft += Game.achievements[i].name + ': \n'
- for(j in Game.achievements[i].unlocksAt)
- {
- achievementsleft += "\n " + Beautify(Game.achievements[i].unlocksAt[j].amount) + ' ' + Game.achievements[i].unlocksAt[j].X.name
- }
- achievementsleft += "\n \n"
- }
- }
- console.log(achievementsleft)
- //Same but for upgrades:
- upgradesleft = '\n'
- for(i in Game.upgrades)
- {
- if(Game.upgrades[i].visible == 0)
- {
- upgradesleft += Game.upgrades[i].name + ': \n'
- for(j in Game.upgrades[i].unlocksAt)
- {
- upgradesleft += "\n " + Beautify(Game.upgrades[i].unlocksAt[j].amount) + ' ' + Game.upgrades[i].unlocksAt[j].X.name
- }
- upgradesleft += "\n \n"
- }
- }
- console.log(upgradesleft)
- //fast autoclicker:
- Game.PopNumber = function(el, text) {} //else it goes crazy.
- var autoclicker = function(clicksatonce,clickinterval)
- {
- autoclick = function()
- {
- for(j in Object.keys(Game.clickables))
- {
- with(Game.clickables[Object.keys(Game.clickables)[j]])
- if(visible)
- {
- for(i=0;i<clicksatonce;i++)
- {
- Click()
- }}}}
- return setInterval(autoclick,clickinterval)
- }
- autoclicker(100,1) /*the first number is how many clicks at once, the second is how often to do them in milliseconds. If there are a lot of clickables set it lower.*/
- //Adds k,B,T etc. to numbers:
- nums = ['k','M','B','T','Q','Qi', 'Sx', 'Sp', 'Oc', 'No', 'De'];
- function Beautify(num,floats)
- {
- if (!isFinite(num)) return 'Infinity';
- if(num < 1e3 || num >= parseFloat('1e' + 3*(nums.length + 1))) return Math.round(num);
- var i = 0;
- while(num >= 1000)
- {
- num/=1000;
- i++;
- }
- num = Math.round(num*1000)/1000;
- if(num>=1000)
- {
- num/=1000;
- i++;
- num = Math.round(num*1000)/1000;
- } //deals with rounding errors
- num = num.toString();
- if(num.indexOf('.') == -1) num += '.000';
- else
- {
- dec = num.indexOf('.');
- while(num.slice(dec,num.length).length < 4) num += '0'; //adds trailing 0s (if needed) to stop the numbers jumping around.
- }
- return num + nums[i - 1];
- }
- /*
- Bookmarklets:
- Multibuy buttons:
- */
- javascript:(function(){with(document)(head.appendChild(createElement('script')).src='http://pastebin.com/raw.php?i=hCTuvzBf')._})();
- /*
- Import/export saves:
- */
- javascript:(function(){with(document)(head.appendChild(createElement('script')).src='http://pastebin.com/raw.php?i=C1kJemmr')._})();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement