Advertisement
Guest User

Cookie Clicker Cheating

a guest
Sep 4th, 2013
10,566
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.75 KB | None | 0 0
  1. Basic Cookie CheatEdit
  2.  
  3. Press Ctrl+Shift+I and simply type... (F12 for IE or Ctrl+Shift+K for Firefox )
  4.  
  5.  
  6. Game.cookies=however many you want.
  7.  
  8. This gives you "Cheated cookies taste awful" if the number you put is bigger than the total number of cookies baked.
  9.  
  10. If you don't want "Cheated cookies taste awful" whatever you type use
  11.  
  12. Game.Earn(however many you want)
  13. Easy methodEdit
  14.  
  15. Create a new bookmark and where it says URL copy and paste the 'code' below. Now when you're on the Cookie Clicker page, click the bookmark and it'll open a menu in the top right of your browser.
  16.  
  17. javascript: (function () {
  18. var jsCode = document.createElement('script');
  19. jsCode.setAttribute('src', 'https://gist.github.com/pBun/6394697/raw');
  20. document.body.appendChild(jsCode);
  21. }());
  22.  
  23. Browser-specific console instruction[1]Edit
  24.  
  25. These are instructions to bring up the console in different browsers. The console is where you put your codes into effect.
  26.  
  27. Chrome
  28.  
  29. Press CTRL + SHIFT + J to open the "Console" tab of the Developer Tools.
  30.  
  31. Alternative method:
  32.  
  33. Press either CTRL + SHIFT + I or F12 to open the Developer Tools.
  34. Press ESC (or click on "Show console" in the bottom right corner) to slide the console up.
  35.  
  36. Note: In Chrome's dev tools, there is a "Console" tab. However, a smaller "slide-up" console can be opened while any of the other tabs is active.
  37.  
  38. Safari
  39.  
  40. Press CTRL + ALT + I to open the Web Inspector.
  41. See Chrome's step 2. (Chrome and Safari have pretty much identical dev tools.)
  42.  
  43. Note: Step 1 only works if the "Show Develop menu in menu bar" check box in the Advanced tab of the Preferences menu is checked!
  44.  
  45. IE9
  46.  
  47. Press F12 to open the developer tools.
  48. Click the "Console" tab.
  49.  
  50. Firefox
  51.  
  52. Press CTRL + SHIFT + K to open the Web console.
  53.  
  54. Or, if Firebug is installed (recommended):
  55.  
  56. Press F12 to open Firebug.
  57. Click on the "Console" tab.
  58.  
  59. Opera
  60.  
  61. Press CTRL + SHIFT + I to open Dragonfly.
  62. Click on the "Console" tab.
  63.  
  64. End Cheats
  65.  
  66. To end any active cheats, simply refresh the page.
  67.  
  68. Unlock every achievement in the game (including the Cheated cookies taste awful achievement)
  69.  
  70. javascript:(function(){for(var i=0;i<Game.AchievementsN;i++){Game.Win(Game.AchievementsById[i].name);}})();
  71.  
  72. Unlock every achievement in the game (excluding the Cheated cookies taste awful achievement)
  73.  
  74. javascript:(function(){for(var i=0;i<Game.AchievementsN;i++){if(i!=70){Game.Win(Game.AchievementsById[i].name);}}})();
  75.  
  76. Add a new bookmark in your web browser, give it any name and put one of the two scripts into the address field, whilst leaving all other fields empty. Open the game in your web browser and click the bookmark.
  77.  
  78. Gain a number of Golden Cookies
  79.  
  80. Game.goldenClicks = 50;
  81.  
  82. Note that clicks must then be manually incremented with the following code to earn achievements:
  83.  
  84. Game.goldenCookie.click();
  85.  
  86. Spawn Golden Cookie
  87.  
  88. Where "15" is seconds visible. Must enable the normal Golden Cookie clicker.
  89.  
  90. Game.goldenCookie.life = 15;
  91.  
  92. Another Golden Cookie spawn
  93.  
  94. Game.goldenCookie.spawn();
  95.  
  96. Set Cookie output rate
  97.  
  98. Note: will self correct when new buildings/upgrades are bought.
  99.  
  100. Game.cookiesPs = 999999999;
  101.  
  102. Enable every upgrade
  103.  
  104. Game.UpgradesById.forEach(function(i) {if (i.bought === 0) { Game.cookies +=i.basePrice; i.buy(); }})
  105.  
  106. Next upgrade from Bingo Center available instantly (After Bingo Center/Research Facility purchased)
  107.  
  108. setInterval(function(){Game.researchT=0;}, 0);
  109.  
  110. Golden Cookies appear instantly
  111.  
  112. setInterval(function(){Game.goldenCookie.delay=0;}, 0);
  113.  
  114. Elder pledge period setter (Time until next elder pledge, after purchasing Elder Pact upgrade)
  115.  
  116. Game.pledgeT=time;
  117.  
  118.  
  119. Unlock any achievement
  120.  
  121. Example:
  122.  
  123. Game.Win('Mathematician');
  124.  
  125. Game.Win('Base 10');
  126.  
  127. Game.Win('Uncanny clicker');
  128.  
  129. Automatically click Golden Cookies
  130.  
  131. Will automatically click them when they appear. Does not affect the appearance rate (use golden cookie auto-clicker for that).
  132.  
  133. setInterval(function() {if(Game.goldenCookie.life > 0)Game.goldenCookie.click();}, 100);
  134.  
  135. Automatically click Red Cookies without Some Special Effect
  136.  
  137. Only work when you can get Red Cookies. Same as "Automatically click Golden Cookies", but no Clot, Cookie Chain, Elder Frenzy and Clicking Frenzy anymore.
  138.  
  139. setInterval(function() {if(Game.goldenCookie.life > 0){Game.goldenCookie.wrath=0;Game.goldenCookie.click()}}, 100);
  140.  
  141. Automatically buy upgrades and shop items
  142.  
  143. Buys best object and upgrades first, loops.
  144.  
  145. setInterval(function() {
  146. for(i=Game.UpgradesInStore.length-1; i >= 0; i--){
  147. Game.UpgradesInStore[i].buy();
  148. }
  149. for(i=Game.ObjectsById.length-1; i >= 0; i--){
  150. Game.ObjectsById[i].buy();
  151. }
  152. }, 100);
  153.  
  154.  
  155. Auto-click cookie
  156.  
  157. Replace "time" with a number in milliseconds (1/1000 second).
  158. 60000 = 60 seconds (for those who aren't into numbers)
  159.  
  160. setInterval(function() {Game.ClickCookie();}, time);
  161.  
  162. Infinity Golden Cookie Clicker
  163.  
  164. setInterval(function(){Game.goldenCookie.click();}, 10);
  165.  
  166. Auto-click cookie Variant
  167.  
  168. The difference between this and the auto-clickers above, is that this JS script clicks the HTML object, instead of using the game's click function
  169.  
  170. setTimeout(heartbeat,1);
  171. function heartbeat(){
  172. eventFire(document.querySelector('#bigCookie'),'click');
  173. setTimeout(heartbeat,1);
  174. }
  175. function eventFire(el, etype){
  176. if (el.fireEvent) {
  177. (el.fireEvent('on' + etype));
  178. } else {
  179. var evObj = document.createEvent('Events');
  180. evObj.initEvent(etype, true, false);
  181. el.dispatchEvent(evObj);
  182. }
  183. }
  184.  
  185. Infinite Golden Cookie Clicker Variant
  186.  
  187. The difference between this and the auto-clickers above, is that this JS script clicks the HTML object, instead of using the game's click function.
  188.  
  189. setTimeout(heartbeat,1);
  190. function heartbeat(){
  191. eventFire(document.querySelector('#goldenCookie'),'click');
  192. setTimeout(heartbeat,1);
  193. }
  194. function eventFire(el, etype){
  195. if (el.fireEvent) {
  196. (el.fireEvent('on' + etype));
  197. } else {
  198. var evObj = document.createEvent('Events');
  199. evObj.initEvent(etype, true, false);
  200. el.dispatchEvent(evObj);
  201. }
  202. }
  203.  
  204. Show Golden Cookie delay in Title bar
  205.  
  206. setInterval(function() {
  207. document.title='(' + Math.floor(Game.goldenCookie.delay / Game.fps) + ' s) '+Beautify(Game.cookies)+' '+(Game.cookies==1?'cookie':'cookies');
  208. }, Math.floor(500/Game.fps));
  209.  
  210. Infinity Golden Cookie Spawns
  211.  
  212. This will spawn and click one golden cookie per second.
  213.  
  214. setInterval(function() {if(Game.goldenCookie.life === 0) {Game.goldenCookie.spawn();Game.goldenCookie.wrath=0;Game.goldenCookie.click()}}, 1000);
  215.  
  216. Alternative CheatEdit
  217.  
  218. There exists a alternative method to hacking in cookies.
  219.  
  220. First of all you need to export your save.
  221.  
  222. Now, let's cheat. Go to Base64 decode and enter the save there. It will say something like:
  223.  
  224. 1.03||1377793875789|11111|0;0;0;0;0;0;-1;-1;0|0,0,0;0,0,0;0,0,0;0,0,0;0,0,0;0,0,0;0,0,0;0,0,0;0,0,0;|0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;0,0;|0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;
  225.  
  226.  
  227. =�
  228.  
  229.  
  230. You can edit all the numbers EXCEPT "1.03" and the symbols. 1.03 is the current version of the game.
  231.  
  232. After you've modified the save go to Base64 encoder, encode it and import your save to the game.
  233. Optimal Building Buyer ScriptEdit
  234.  
  235. // Tommi Kurki et al's Cookie Clicker Optimal Building Buyer Script!
  236.  
  237. // This script calculates which building has the best income for it's current price
  238. // and buys it automatically. All bought upgrades etc are accounted for. The script displays the
  239. // prices and the buildings it buys in the news ticker ingame. Buying interval is 500ms on default.
  240.  
  241. var interval = 500;
  242.  
  243. var cookieBot = setInterval(function() {
  244. Game.ObjectsById[optimalBuilding()].buy();
  245. }, interval);
  246.  
  247.  
  248. function optimalBuilding() {
  249. cpc = Number.MAX_VALUE;
  250. var x = 0;
  251. for(i = Game.ObjectsById.length-1; i >= 0; i--){
  252. var me = Game.ObjectsById[i];
  253. var cpc2 = me.price *(Game.cookiesPs + me.storedCps) / me.storedCps; //this addition will make items with worse cost/CpS be bought first if buying them will earn you the cookies needed for better items faster; proven optimal cookie-buying strategy.
  254. if (cpc2 < cpc) {
  255. cpc = cpc2;
  256. x = i;
  257. }
  258. }
  259. var txt = "Buying " + Game.ObjectsById[x].name + " at " +
  260. Math.round(Game.ObjectsById[x].price / Game.ObjectsById[x].storedCps) +
  261. " cookies for each CPS!";
  262.  
  263. Game.Ticker = txt;
  264. return x;
  265. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement