Cookie Clicker Wiki
m (e)
Bluushy (talk | contribs)
No edit summary
Tag: Visual edit
(40 intermediate revisions by 14 users not shown)
Line 1: Line 1:
  +
[[File:Cheated cookies.png|right|96px|link=]]
__NOWYSIWYG__{{Semi-Protected}}
 
 
:''For cheats on Cookie Clicker Classic, please refer to [[Cheating (Cookie Clicker Classic)]].''
 
:''For cheats on Cookie Clicker Classic, please refer to [[Cheating (Cookie Clicker Classic)]].''
'''Warning: Do not perform if you want to enjoy the game.''' If you would like to experiment around with the game mechanics or just give yourself a boost, here are some cheats you can try. Almost all require a bit of interaction with technical stuff. However, all the steps are listed and should not be too hard. '''It is recommended that you export your save and paste it onto a file before cheating in case of undesirable results.'''
+
'''Warning: Do not perform if you want to unlock the game fairly.''' If you would like to experiment around with the game mechanics or just give yourself a boost, here are some cheats you can try. Almost all require a bit of interaction with technical stuff. However, all the steps are listed and should not be too hard. '''It is recommended that you export your save and paste it onto a seperate file before cheating in case of undesirable results.'''
   
 
For the sake of organization, all scripts will follow this format:
 
For the sake of organization, all scripts will follow this format:
Line 24: Line 24:
 
These are the instructions to bring up the console in different browsers. The console is where you enter the code into for the cheats to take effect.
 
These are the instructions to bring up the console in different browsers. The console is where you enter the code into for the cheats to take effect.
   
===Chrome===
+
;Chrome:
 
'''Microsoft Windows:''' Either press <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>J</kbd> or press <kbd>F12</kbd> to open the Developer Tools
 
'''Microsoft Windows:''' Either press <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>J</kbd> or press <kbd>F12</kbd> to open the Developer Tools
   
Line 31: Line 31:
 
You can also right-click and select "Inspect element" Then go to the Console bar.
 
You can also right-click and select "Inspect element" Then go to the Console bar.
   
===Firefox===
+
;Firefox:
 
'''Microsoft Windows:''' Press <kbd>F12</kbd> or <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>K</kbd> to open the console.
 
'''Microsoft Windows:''' Press <kbd>F12</kbd> or <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>K</kbd> to open the console.
   
Line 39: Line 39:
 
'''Microsoft Windows Alternate:''' Press <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>K</kbd> to open the console. Make sure Console is selected at the top left, and that JS is selected below it. At the bottom of the console, you will see >>, indicating that this is where you enter your code. Enter what you need, and hit 'enter' to run it. The results should be displayed. Note that a return of 'undefined' does not mean that it failed to execute, just that there was nothing to display back to the user.
 
'''Microsoft Windows Alternate:''' Press <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>K</kbd> to open the console. Make sure Console is selected at the top left, and that JS is selected below it. At the bottom of the console, you will see >>, indicating that this is where you enter your code. Enter what you need, and hit 'enter' to run it. The results should be displayed. Note that a return of 'undefined' does not mean that it failed to execute, just that there was nothing to display back to the user.
   
===Internet Explorer 9+===
+
;Internet Explorer 9+:
 
'''Microsoft Windows:''' Press <kbd>F12</kbd> to open the developer tools. Click the "Console" tab.
 
'''Microsoft Windows:''' Press <kbd>F12</kbd> to open the developer tools. Click the "Console" tab.
   
  +
;
===Opera===
 
  +
;'''Opera GX:''' Press Ctrl + Shift + C to open the developer tools (Another way to do this is by pressing left click and going down the menu to inspect element)
  +
:
 
'''Microsoft Windows:''' Press <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>I</kbd> to open Dragonfly. Click on the "Console" tab.
 
'''Microsoft Windows:''' Press <kbd>CTRL</kbd> + <kbd>SHIFT</kbd> + <kbd>I</kbd> to open Dragonfly. Click on the "Console" tab.
   
===Safari===
+
;Safari:
 
'''Mac OS:''' Press <kbd>⌘</kbd> + <kbd>OPTION</kbd> + <kbd>C</kbd> to open the Error Console. '''(Make sure you check the "Show Develop menu in menu bar" box in the "Advanced" tab of the "Preferences" menu first.)'''
 
'''Mac OS:''' Press <kbd>⌘</kbd> + <kbd>OPTION</kbd> + <kbd>C</kbd> to open the Error Console. '''(Make sure you check the "Show Develop menu in menu bar" box in the "Advanced" tab of the "Preferences" menu first.)'''
   
===Universal===
+
;Universal:
 
Type "javascript:[your code here]" on the address bar, then press Enter.
 
Type "javascript:[your code here]" on the address bar, then press Enter.
   
Line 54: Line 56:
 
There are three ways to enable an interface. Choose the one that works the best.
 
There are three ways to enable an interface. Choose the one that works the best.
   
===Bookmark===
+
;Bookmark:
 
*Create a new bookmark.
 
*Create a new bookmark.
 
*In the "URL" box, copy/paste the following code. (The link to the source code can be found on the wiki page of the corresponding interface.)
 
*In the "URL" box, copy/paste the following code. (The link to the source code can be found on the wiki page of the corresponding interface.)
Line 61: Line 63:
 
*Now, whenever you are in the game, simply click on this bookmark to enable the cheat interface.
 
*Now, whenever you are in the game, simply click on this bookmark to enable the cheat interface.
   
===Developer Console===
+
;Developer Console:
 
*Open your browser console. For instructions, look [[Cheating#Opening_the_Browser_Console|above]].
 
*Open your browser console. For instructions, look [[Cheating#Opening_the_Browser_Console|above]].
 
*Copy all the source code from the link provided in the cheat interface's wiki page.
 
*Copy all the source code from the link provided in the cheat interface's wiki page.
Line 68: Line 70:
 
*There should not be any error if successfully installed.
 
*There should not be any error if successfully installed.
   
===TamperMonkey/GreaseMonkey===
+
;TamperMonkey/GreaseMonkey:
 
*Open your Monkey.
 
*Open your Monkey.
 
*Add a new UserScript.
 
*Add a new UserScript.
Line 106: Line 108:
 
*Import your save to the game.
 
*Import your save to the game.
   
===Save Format===
+
;Save Format:
 
The decoded save follows a certain format, take this save for example:
 
The decoded save follows a certain format, take this save for example:
 
{{!CollapsibleCode}}1.0393||1381898487292;1380107853914;1381899592923|011101|19810703888477384;232154241051907840;4218;2120;24564619087288988;9632;-1;-1;45326046739823870;0;11;107852;0;-1;2;207;1656259545394620;175|219,220,25128184169839,0;216,216,64729416294516,0;180,180,7033459448,0;168,169,22279979110,0;159,159,75346744514,0;150,150,182832240409,0;139,140,651206881531,0;143,143,11123847712297,0;121,122,120436061607417,0;112,112,1119454662710064,0;|4503599627370495;4503599627370495;4503599627370495;4503573749070335;2814337448673279;171798691455|4503599627370495;2313303743266815;2047{{CollapsibleCode!}}
 
{{!CollapsibleCode}}1.0393||1381898487292;1380107853914;1381899592923|011101|19810703888477384;232154241051907840;4218;2120;24564619087288988;9632;-1;-1;45326046739823870;0;11;107852;0;-1;2;207;1656259545394620;175|219,220,25128184169839,0;216,216,64729416294516,0;180,180,7033459448,0;168,169,22279979110,0;159,159,75346744514,0;150,150,182832240409,0;139,140,651206881531,0;143,143,11123847712297,0;121,122,120436061607417,0;112,112,1119454662710064,0;|4503599627370495;4503599627370495;4503599627370495;4503573749070335;2814337448673279;171798691455|4503599627370495;2313303743266815;2047{{CollapsibleCode!}}
Line 186: Line 188:
   
 
=="Cheated cookies taste awful" Achievement==
 
=="Cheated cookies taste awful" Achievement==
You can earn the "[[Achievements#Shadow_Achievements|Cheated cookies taste awful]]" achievement through one of four ways:
+
There are only two in-game events that award the achievement "[[Achievement#Shadow_Achievements|Cheated cookies taste awful]]".
 
*Setting Cookies in bank to be greater than Cookies baked all time. (The amount may need to be adjusted depending on the CpS.)
 
*Setting Cookies in bank to be greater than Cookies baked all time. (The amount may need to be adjusted depending on the CpS.)
 
Game.cookies = Game.cookiesEarned + <u>&lt;amount&gt;</u>;
 
Game.cookies = Game.cookiesEarned + <u>&lt;amount&gt;</u>;
*Spawning a [[Golden Cookie]] before its possible spawning period:
 
Game.shimmer.time = 0;
 
new Game.shimmer('golden');
 
*Giving yourself the achievement:
 
Game.Win('Cheated cookies taste awful'); 
 
*Altering the code like so:
 
{{!CollapsibleCode}}for(i = Game.AchievementsById.length-1; i >= 0; i--) {
 
me = Game.AchievementsById[i];
 
if(me.name == "Cheated cookies taste awful" && me.won == 1) {
 
me.won = 0;
 
}
 
}{{CollapsibleCode!}}
 
*Using the [[Open Sesame]] command
 
   
 
*Using the [[Open Sesame]] command.
You can also remove the achievement by using this line:
 
  +
Game.Achievements['Cheated cookies taste awful'].won=0
 
 
You can also remove the achievement by typing this line in the console:
 
Game.Achievements["Cheated cookies taste awful"].won=0
   
 
==Debug Cheats==
 
==Debug Cheats==
 
These are cheats built into the game itself to aid in debugging and testing the game.
 
These are cheats built into the game itself to aid in debugging and testing the game.
   
===Debug Upgrades===
+
;Debug Upgrades:
 
As of V2, debug upgrades no longer appear in the store. However, they can still be gotten with the unlock and buy cheat.
 
As of V2, debug upgrades no longer appear in the store. However, they can still be gotten with the unlock and buy cheat.
   
Line 225: Line 216:
 
*'''Turbo-charged soil'''Garden plants grow every second. Garden seeds are free to plant. You can switch soils at any time.
 
*'''Turbo-charged soil'''Garden plants grow every second. Garden seeds are free to plant. You can switch soils at any time.
   
===Ruin The Fun===
+
;Ruin The Fun:
 
[[File:RuinTheFun.png|frame|right|The message shown after entering ''Game.RuinTheFun();'']]
 
[[File:RuinTheFun.png|frame|right|The message shown after entering ''Game.RuinTheFun();'']]
 
Ruin The Fun is a function that instantly gives you all the upgrades (including the debug upgrades and starting [[Grandmapocalypse]]), all the achievements, and {{hover|1 nonillion|999,999,999,999,999,999,999,999,999,999}} cookies. To execute this function, simply use:
 
Ruin The Fun is a function that instantly gives you all the upgrades (including the debug upgrades and starting [[Grandmapocalypse]]), all the achievements, and {{hover|1 nonillion|999,999,999,999,999,999,999,999,999,999}} cookies. To execute this function, simply use:
 
Game.RuinTheFun();
 
Game.RuinTheFun();
   
===Sesame Menu===
+
;Sesame Menu:
 
As of V2, the game contains a debugging menu with a multitude of useful features, such as spawning [[Golden Cookie]]s with various effects. To unlock it, you can put <u><code>saysopensesame</code></u> at the end of your bakery name. Alternatively, you can use the following code:
 
As of V2, the game contains a debugging menu with a multitude of useful features, such as spawning [[Golden Cookie]]s with various effects. To unlock it, you can put <u><code>saysopensesame</code></u> at the end of your bakery name. Alternatively, you can use the following code:
 
Game.OpenSesame();
 
Game.OpenSesame();
Line 267: Line 258:
   
 
==Cookies Related==
 
==Cookies Related==
===Gaining Cookies===
+
;Gaining Cookies:
 
To change the amount of cookies in bank, use:
 
To change the amount of cookies in bank, use:
 
Game.cookies = <u>&lt;amount&gt;</u>;
 
Game.cookies = <u>&lt;amount&gt;</u>;
Line 273: Line 264:
 
Game.Earn(<u>&lt;amount adding&gt;</u>);
 
Game.Earn(<u>&lt;amount adding&gt;</u>);
   
===Removing Cookies===
+
;Removing Cookies:
 
To remove a specific amount of cookies, use:
 
To remove a specific amount of cookies, use:
 
Game.cookies -= <u>&lt;amount removing&gt;</u>;
 
Game.cookies -= <u>&lt;amount removing&gt;</u>;
   
===Infinity Cookies===
+
;Infinity Cookies:
 
To make it look like you have infinity amount of cookies but you won't really, use:
 
To make it look like you have infinity amount of cookies but you won't really, use:
 
Game.cookies = NaN;
 
Game.cookies = NaN;
Line 289: Line 280:
 
Game.cookies = -Infinity;
 
Game.cookies = -Infinity;
   
===Spawning Custom Golden Cookies===
+
;Spawning Custom Golden Cookies:
 
{{!CollapsibleCode}}
 
{{!CollapsibleCode}}
 
var newShimmer=new Game.shimmer('golden',<u>&lt;force object type&gt;</u>,<u>&lt;nocount amount&gt;</u>); // &lt;no count amount&gt; default is <b>1</b> // &lt;force object type&gt; Default is <b>0</b>, so it should look something like <i><u>0,1</u></i>
 
var newShimmer=new Game.shimmer('golden',<u>&lt;force object type&gt;</u>,<u>&lt;nocount amount&gt;</u>); // &lt;no count amount&gt; default is <b>1</b> // &lt;force object type&gt; Default is <b>0</b>, so it should look something like <i><u>0,1</u></i>
Line 296: Line 287:
 
newShimmer.force='<u>&lt;effect type&gt;</u>'; // effect when clicked
 
newShimmer.force='<u>&lt;effect type&gt;</u>'; // effect when clicked
 
newShimmer.sizeMult=<u>&lt;size of the cookie&gt;</u>; // default size is: Math.random()*0.75+0.25;
 
newShimmer.sizeMult=<u>&lt;size of the cookie&gt;</u>; // default size is: Math.random()*0.75+0.25;
 
{{CollapsibleCode!}}
{{!CollapsibleCode}} <u>For effects list use</u>&nbsp;<ref>{{GoldenCookies ID table}}</ref>
 
   
===Changing CpS===
+
;Changing CpS:
 
To change the CpS (will self-correct when new buildings/upgrades are bought), use:
 
To change the CpS (will self-correct when new buildings/upgrades are bought), use:
 
Game.cookiesPs = <u>&lt;CpS&gt;</u>;
 
Game.cookiesPs = <u>&lt;CpS&gt;</u>;
Line 308: Line 299:
 
};
 
};
 
Game.recalculateGains = 1;{{CollapsibleCode!}}
 
Game.recalculateGains = 1;{{CollapsibleCode!}}
  +
===Auto-Click Big Cookie===
+
;Auto-Click Big Cookie:
 
To auto-click the big cookie at a set interval, use:
 
To auto-click the big cookie at a set interval, use:
 
var autoClicker = setInterval(Game.ClickCookie, <u>&lt;milliseconds interval&gt;</u>);
 
var autoClicker = setInterval(Game.ClickCookie, <u>&lt;milliseconds interval&gt;</u>);
Line 315: Line 307:
 
clearInterval(autoClicker);
 
clearInterval(autoClicker);
   
===Faster Auto-Click===
+
;Faster Auto-Click:
 
The auto-click cheat above can only click as fast as the CPU can handle. To produce an even faster effect, use:
 
The auto-click cheat above can only click as fast as the CPU can handle. To produce an even faster effect, use:
 
{{!CollapsibleCode}}var autoClicker = function(clicksAtOnce, repeatInterval) {
 
{{!CollapsibleCode}}var autoClicker = function(clicksAtOnce, repeatInterval) {
Line 333: Line 325:
 
autoClicker(<u>&lt;amount of clicks&gt;</u>, <u>&lt;milliseconds interval&gt;</u>);{{CollapsibleCode!}}
 
autoClicker(<u>&lt;amount of clicks&gt;</u>, <u>&lt;milliseconds interval&gt;</u>);{{CollapsibleCode!}}
   
===Auto-Click Only During Click Frenzy===
+
;Auto-Click Only During Click Frenzy:
 
To enable auto-click only during the Click Frenzy, use:
 
To enable auto-click only during the Click Frenzy, use:
 
{{!CollapsibleCode}}setInterval(function() {
 
{{!CollapsibleCode}}setInterval(function() {
if (Game.clickFrenzy > 0) Game.ClickCookie();
+
if (Game.hasBuff('Click frenzy')) Game.ClickCookie();
 
}, <u>&lt;milliseconds interval&gt;</u>);{{CollapsibleCode!}}
 
}, <u>&lt;milliseconds interval&gt;</u>);{{CollapsibleCode!}}
   
===AutoClick===
+
;AutoClick:
 
Holding the assigned key (~) repeatedly clicks the object under the mouse:
 
Holding the assigned key (~) repeatedly clicks the object under the mouse:
 
{{!CollapsibleCode}}
 
{{!CollapsibleCode}}
Line 398: Line 390:
   
 
==Buildings Related==
 
==Buildings Related==
===Prices Stay at Base Price===
+
;Prices Stay at Base Price:
 
If you want all the prices to stay at base price despite amount owned, use:
 
If you want all the prices to stay at base price despite amount owned, use:
 
{{!CollapsibleCode}}
 
{{!CollapsibleCode}}
Line 404: Line 396:
 
{{CollapsibleCode!}}
 
{{CollapsibleCode!}}
   
===All Buildings Are Free===
+
;All Buildings Are Free:
 
If you want to make all buildings completely free, use:
 
If you want to make all buildings completely free, use:
 
{{!CollapsibleCode}}Game.ObjectsById.forEach(function (e) {
 
{{!CollapsibleCode}}Game.ObjectsById.forEach(function (e) {
Line 412: Line 404:
 
Game.storeToRebuild = 1;{{CollapsibleCode!}}
 
Game.storeToRebuild = 1;{{CollapsibleCode!}}
   
===Refill Grimoire Magic===
+
;Refill Grimoire Magic:
 
Game.Objects['Wizard tower'].minigame.magic = Infinity;
 
Game.Objects['Wizard tower'].minigame.magic = Infinity;
  +
;Refill Worship Swaps:
  +
Game.Objects['Temple'].minigame.swaps = 3;
  +
;Unlock all seeds on Farm as if Ruin The Fun was enabled;
  +
Game.Objects['Farm'].minigame.onRuinTheFun;
  +
;Change Profits:
  +
Game.Objects['Bank'].minigame.profit = <nowiki><amount></nowiki>;
   
===Upgrade Buildings (Sugar Lump)===
+
;Upgrade Buildings (Sugar Lump):
 
Game.ObjectsById[<nowiki><index></nowiki>].level = <nowiki><amount></nowiki>; Game.recalculateGains=1;
 
Game.ObjectsById[<nowiki><index></nowiki>].level = <nowiki><amount></nowiki>; Game.recalculateGains=1;
   
===Sacrifice Towers===
+
;Sacrifice Towers:
 
{{!CollapsibleCode}}for (var i in Game.Objects){
 
{{!CollapsibleCode}}for (var i in Game.Objects){
 
Game.Objects[i].sacrifice(1);
 
Game.Objects[i].sacrifice(1);
 
}{{CollapsibleCode!}}
 
}{{CollapsibleCode!}}
   
===Build N Buildings===
+
;Build N Buildings:
 
If you want to build a custom number of buildings, N, use:
 
If you want to build a custom number of buildings, N, use:
 
Game.buyBulk=N;
 
Game.buyBulk=N;
Line 430: Line 428:
 
Note that the [[Wrath Cookie]] counts as a golden cookie as far as the game coding goes, therefore the following scripts also apply on Wrath Cookies. '''If you want all the Wrath Cookies to behave like golden cookies (prevent Ruin and Clot), simply remove the "<kbd>/&#42;</kbd>" and the "<kbd>&#42;/</kbd>" in each script.'''
 
Note that the [[Wrath Cookie]] counts as a golden cookie as far as the game coding goes, therefore the following scripts also apply on Wrath Cookies. '''If you want all the Wrath Cookies to behave like golden cookies (prevent Ruin and Clot), simply remove the "<kbd>/&#42;</kbd>" and the "<kbd>&#42;/</kbd>" in each script.'''
   
===Spawn a Golden Cookie===
+
;Spawn a Golden Cookie:
 
<u>'''(Working and Updated as of 11/28/17)'''</u>
 
<u>'''(Working and Updated as of 11/28/17)'''</u>
   
 
To spawn a golden cookie, use:
 
To spawn a golden cookie, use:
 
var newShimmer=new Game.shimmer("golden");
 
var newShimmer=new Game.shimmer("golden");
If you want to avoid getting the "Cheated cookies taste awful" achievement, use:
 
{{!CollapsibleCode}}/*Game.shimmer.wrath = 0;*/ Game.shimmer.time = Game.shimmer.minTime;
 
Game.shimmer.life = 0;
 
Game.shimmer.spawn();{{CollapsibleCode!}}
 
Or more simply:
 
Game.shimmer.time = Game.shimmer.maxTime;
 
You may also use:
 
Game.shimmerTypes.golden.time = Game.shimmerTypes.golden.maxTime;
 
 
If you want to spawn a golden cookie that starts a cookie chain, add the following script in addition to the ones provided above:
 
If you want to spawn a golden cookie that starts a cookie chain, add the following script in addition to the ones provided above:
 
Game.shimmer.chain = <u>&lt;stage&gt;</u>;
 
Game.shimmer.chain = <u>&lt;stage&gt;</u>;
 
If you want to start the cookie chain at 6 cookies, use "1" as the stage. 66 cookies = "2", 666 cookies = "3", and so on.
 
If you want to start the cookie chain at 6 cookies, use "1" as the stage. 66 cookies = "2", 666 cookies = "3", and so on.
   
===Golden Cookies with No Delay===
+
;Golden Cookies with No Delay:
 
If you want the golden cookies to spawn one after another without delay, use:
 
If you want the golden cookies to spawn one after another without delay, use:
 
{{!CollapsibleCode}}setInterval(function() {
 
{{!CollapsibleCode}}setInterval(function() {
Line 454: Line 444:
 
}, 1);{{CollapsibleCode!}}
 
}, 1);{{CollapsibleCode!}}
   
===Get Golden Cookie Effects without a cookie===
+
;Get Golden Cookie Effects without a cookie:
 
To give yourself a multiplier without a golden cookie, use:
 
To give yourself a multiplier without a golden cookie, use:
 
var effectDurMod=1; Game.gainBuff('&lt;effect&gt;',Math.ceil(&lt;seconds it lasts&gt;*effectDurMod),&lt;multiplier amount&gt;);
 
var effectDurMod=1; Game.gainBuff('&lt;effect&gt;',Math.ceil(&lt;seconds it lasts&gt;*effectDurMod),&lt;multiplier amount&gt;);
<u>For effects list use</u>&nbsp;<ref>{{GoldenCookies ID table}}</ref>
 
   
===Set Golden Cookie Clicks===
+
;Set Golden Cookie Clicks:
 
If you just want to set the amount of golden cookies clicked, use:
 
If you just want to set the amount of golden cookies clicked, use:
 
Game.goldenClicks = <u>&lt;amount&gt;</u>;
 
Game.goldenClicks = <u>&lt;amount&gt;</u>;
 
If you want to earn the related achievements, use one of the auto-click's below.
 
If you want to earn the related achievements, use one of the auto-click's below.
   
===Auto-Click Golden Cookies===
+
;Auto-Click Golden Cookies:
 
If you want the golden cookies to be auto-clicked as soon as they appear, use:
 
If you want the golden cookies to be auto-clicked as soon as they appear, use:
 
{{!CollapsibleCode}}setInterval(function() {
 
{{!CollapsibleCode}}setInterval(function() {
Line 482: Line 471:
 
}, 500);{{CollapsibleCode!}}
 
}, 500);{{CollapsibleCode!}}
   
===Auto-Spawn and Click Golden Cookies===
+
;Auto-Spawn and Click Golden Cookies:
 
If you want to automatically spawn and click a set amount of golden cookies instantaneously, use:
 
If you want to automatically spawn and click a set amount of golden cookies instantaneously, use:
 
{{!CollapsibleCode}}for (var i = 0; i < <u>&lt;amount&gt;</u>; i++) {
 
{{!CollapsibleCode}}for (var i = 0; i < <u>&lt;amount&gt;</u>; i++) {
Line 502: Line 491:
 
}, <u>&lt;milliseconds interval&gt;</u>);{{CollapsibleCode!}}
 
}, <u>&lt;milliseconds interval&gt;</u>);{{CollapsibleCode!}}
   
===Frenzy===
+
;Frenzy:
 
To produce a customized Frenzy effect, use:
 
To produce a customized Frenzy effect, use:
 
{{!CollapsibleCode}}var time = <u>&lt;seconds&gt;</u>;
 
{{!CollapsibleCode}}var time = <u>&lt;seconds&gt;</u>;
Line 510: Line 499:
 
Game.Popup('Frenzy! Cookie production x' + Game.frenzyPower + ' for ' + time + ' seconds!');{{CollapsibleCode!}}
 
Game.Popup('Frenzy! Cookie production x' + Game.frenzyPower + ' for ' + time + ' seconds!');{{CollapsibleCode!}}
   
===Clicking Frenzy===
+
;Clicking Frenzy:
 
To produce a customized Clicking Frenzy effect, use:
 
To produce a customized Clicking Frenzy effect, use:
 
{{!CollapsibleCode}}var time = <u>&lt;seconds&gt;</u>;
 
{{!CollapsibleCode}}var time = <u>&lt;seconds&gt;</u>;
Line 518: Line 507:
   
 
==Grandmapocalypse Related==
 
==Grandmapocalypse Related==
===Change Elder Pledge Time Left===
+
;Change Elder Pledge Time Left:
 
If you want to change the time remained on the Elder Pledge, use:
 
If you want to change the time remained on the Elder Pledge, use:
 
Game.pledgeT = <u>&lt;minutes&gt;</u> * 60 * Game.fps;
 
Game.pledgeT = <u>&lt;minutes&gt;</u> * 60 * Game.fps;
   
===Auto-Buy Elder Pledge===
+
;Auto-Buy Elder Pledge:
 
If you want to automatically buy Elder Pledge as it becomes available, use:
 
If you want to automatically buy Elder Pledge as it becomes available, use:
 
{{!CollapsibleCode}}setInterval(function() {
 
{{!CollapsibleCode}}setInterval(function() {
Line 530: Line 519:
 
}, 500);{{CollapsibleCode!}}
 
}, 500);{{CollapsibleCode!}}
   
===Auto-Click Wrinklers===
+
;Auto-Click Wrinklers:
 
If you want the wrinklers to be auto-clicked as a set interval (note, it must run three times to kill them):
 
If you want the wrinklers to be auto-clicked as a set interval (note, it must run three times to kill them):
 
{{!CollapsibleCode}}
 
{{!CollapsibleCode}}
Line 551: Line 540:
 
var noWrinkler = setInterval(Game.CollectWrinklers, 500);
 
var noWrinkler = setInterval(Game.CollectWrinklers, 500);
   
===Spawn All Wrinklers===
+
;Spawn All Wrinklers:
 
If you want to instantly spawn all twelve wrinklers so you can get the bonus after letting them feed a while:
 
If you want to instantly spawn all twelve wrinklers so you can get the bonus after letting them feed a while:
 
for (i = 0; i < Game.wrinklers.length; i++) { Game.wrinklers[i].phase = 1; }
 
for (i = 0; i < Game.wrinklers.length; i++) { Game.wrinklers[i].phase = 1; }
   
===Make All Wrinklers Shiny===
+
;Make All Wrinklers Shiny:
 
If you want to make all currently existent wrinklers shiny:
 
If you want to make all currently existent wrinklers shiny:
 
for (i = 0; i < Game.wrinklers.length; i++) { Game.wrinklers[i].type = 1; }
 
for (i = 0; i < Game.wrinklers.length; i++) { Game.wrinklers[i].type = 1; }
Line 561: Line 550:
 
for (i = 0; i < Game.wrinklers.length; i++) { Game.wrinklers[i].phase = Game.wrinklers[i].type = 1; }
 
for (i = 0; i < Game.wrinklers.length; i++) { Game.wrinklers[i].phase = Game.wrinklers[i].type = 1; }
   
===Spam-Kill Wrinklers===
+
;Spam-Kill Wrinklers:
 
If you want to kill Wrinklers quickly, use this command:
 
If you want to kill Wrinklers quickly, use this command:
 
{{!CollapsibleCode}}var noWrinkler = setInterval(function () {
 
{{!CollapsibleCode}}var noWrinkler = setInterval(function () {
Line 569: Line 558:
 
If you want to stop spam-killing wrinklers:
 
If you want to stop spam-killing wrinklers:
 
clearInterval(noWrinkler);
 
clearInterval(noWrinkler);
  +
;Bingo Center
  +
If you want to instantly unlock the next Bingo Center upgrade:
  +
setInterval(function(){Game.researchT=0;}, 0);
  +
Note: Does '''not''' unlock the Bingo Center if locked
   
 
==Achievements Related==
 
==Achievements Related==
 
There are two ways to refer to an achievement: its ID and its name. You must type the name EXACTLY as it appears in game for these scripts to work, including capitalization. If you are concerned about typing the name wrong, copy it from the table at the [[Cheating#References|bottom of this page]], or just use the ID.
 
There are two ways to refer to an achievement: its ID and its name. You must type the name EXACTLY as it appears in game for these scripts to work, including capitalization. If you are concerned about typing the name wrong, copy it from the table at the [[Cheating#References|bottom of this page]], or just use the ID.
   
===Unlocking an Achievement===
+
;Unlocking an Achievement:
 
If you want to unlock an achievement, use:
 
If you want to unlock an achievement, use:
 
Game.Win(<u>&lt;name&gt;</u>);
 
Game.Win(<u>&lt;name&gt;</u>);
Line 579: Line 572:
 
Game.Win(Game.AchievementsById[<u>&lt;ID&gt;</u>].name);
 
Game.Win(Game.AchievementsById[<u>&lt;ID&gt;</u>].name);
   
===Unlocking All Achievements===
+
;Unlocking All Achievements:
 
If you want to unlock every single achievement, use:
 
If you want to unlock every single achievement, use:
 
{{!CollapsibleCode}}Game.AchievementsById.forEach(function(e) {
 
{{!CollapsibleCode}}Game.AchievementsById.forEach(function(e) {
Line 586: Line 579:
 
});{{CollapsibleCode!}}
 
});{{CollapsibleCode!}}
 
If you only want to unlock non-shadow achievements, remove the double slash (<kbd>//</kbd>);
 
If you only want to unlock non-shadow achievements, remove the double slash (<kbd>//</kbd>);
  +
===Removing an Achievement===
+
;Removing an Achievement:
 
If you want to remove an achievement, use:
 
If you want to remove an achievement, use:
 
Game.Achievements[<u>&lt;name&gt;</u>].won = 0;
 
Game.Achievements[<u>&lt;name&gt;</u>].won = 0;
Line 592: Line 586:
 
Game.AchievementsById[<u>&lt;ID&gt;</u>].won = 0;
 
Game.AchievementsById[<u>&lt;ID&gt;</u>].won = 0;
   
===Removing All Achievements===
+
;Removing All Achievements:
 
If you want to remove all the achievements, use:
 
If you want to remove all the achievements, use:
 
{{!CollapsibleCode}}Game.AchievementsById.forEach(function(e) {
 
{{!CollapsibleCode}}Game.AchievementsById.forEach(function(e) {
Line 601: Line 595:
   
 
'''Note:''' Removing an achievement won't reduce your milk percentage.
 
'''Note:''' Removing an achievement won't reduce your milk percentage.
  +
 
==Milk Progress==
 
==Milk Progress==
 
To Change your milk progress, use:
 
To Change your milk progress, use:
Game.milkProgress>=<nowiki><progress amount></nowiki>;
+
Game.milkProgress=<nowiki><progress amount></nowiki>;
   
 
==Upgrades Related==
 
==Upgrades Related==
 
Similar to achievements, upgrades can also be referred by either ID or name. A list of them can also be found at the [[Cheating#References|bottom of this page]].
 
Similar to achievements, upgrades can also be referred by either ID or name. A list of them can also be found at the [[Cheating#References|bottom of this page]].
   
===Unlocking/Buying an Upgrade===
+
;Unlocking/Buying an Upgrade:
 
If you want to unlock a single upgrade, use:
 
If you want to unlock a single upgrade, use:
 
Game.Unlock(Game.UpgradesById[<u>&lt;ID&gt;</u>].name);
 
Game.Unlock(Game.UpgradesById[<u>&lt;ID&gt;</u>].name);
Line 618: Line 613:
 
Game.Upgrades[<u>&lt;name&gt;</u>].earn()
 
Game.Upgrades[<u>&lt;name&gt;</u>].earn()
   
===Unlocking/Buying All Upgrades===
+
;Unlocking/Buying All Upgrades:
 
If you want to unlock all upgrades, use:
 
If you want to unlock all upgrades, use:
 
{{!CollapsibleCode}}Game.UpgradesById.forEach(function(e) {
 
{{!CollapsibleCode}}Game.UpgradesById.forEach(function(e) {
 
Game.Unlock(e.name);
 
Game.Unlock(e.name);
});{{CollapsibleCode!}}
+
{{CollapsibleCode!}}
  +
If you want to enable all upgrades, use;
  +
{{!CollapsibleCode}}
  +
Game.UpgradesById.forEach(function(i) {if (i.bought === 0) { Game.cookies +=i.basePrice; i.buy(); }})
 
{{CollapsibleCode!}}
 
If you want to unlock AND obtain all upgrades, use:
 
If you want to unlock AND obtain all upgrades, use:
 
{{!CollapsibleCode}}Game.UpgradesById.forEach(function(e) {
 
{{!CollapsibleCode}}Game.UpgradesById.forEach(function(e) {
Line 630: Line 629:
 
Game.Objects['Cursor'].amount = <nowiki><amount of cursors></nowiki>;
 
Game.Objects['Cursor'].amount = <nowiki><amount of cursors></nowiki>;
   
===Removing an Upgrade===
+
;Removing an Upgrade:
 
If you want to remove an upgrade, use:
 
If you want to remove an upgrade, use:
 
Game.Upgrades[<u>&lt;name&gt;</u>].bought = 0;
 
Game.Upgrades[<u>&lt;name&gt;</u>].bought = 0;
 
or
 
or
 
Game.UpgradesById[<u>&lt;ID&gt;</u>].bought = 0;
 
Game.UpgradesById[<u>&lt;ID&gt;</u>].bought = 0;
  +
===Free Upgrades===
+
;Free Upgrades:
 
If you want to make all upgrades completely free, use:
 
If you want to make all upgrades completely free, use:
 
{{!CollapsibleCode}}Game.UpgradesById.forEach(function (e) {
 
{{!CollapsibleCode}}Game.UpgradesById.forEach(function (e) {
Line 642: Line 642:
 
Game.upgradesToRebuild = 1;{{CollapsibleCode!}}
 
Game.upgradesToRebuild = 1;{{CollapsibleCode!}}
   
===Instant Research===
+
;Instant Research:
 
If you want to make all researches instant, use:
 
If you want to make all researches instant, use:
 
{{!CollapsibleCode}}setInterval(function() {
 
{{!CollapsibleCode}}setInterval(function() {
Line 668: Line 668:
 
Note: Changing the prestige level will not affect your amount of heavenly chips. If you want your heavenly chips amount to be correct, enter the following into the console.
 
Note: Changing the prestige level will not affect your amount of heavenly chips. If you want your heavenly chips amount to be correct, enter the following into the console.
 
Game.heavenlyChips = Game.prestige - Game.heavenlyChipsSpent
 
Game.heavenlyChips = Game.prestige - Game.heavenlyChipsSpent
  +
 
==Dungeons Related==
 
==Dungeons Related==
===Change Dungeon Level===
+
;Change Dungeon Level:
 
If you want to change the dungeon level, use:
 
If you want to change the dungeon level, use:
 
Game.Objects.Factory.dungeon.level = <u>&lt;level&gt;</u>;
 
Game.Objects.Factory.dungeon.level = <u>&lt;level&gt;</u>;
 
The level affects amount of cookies rewarded and spawning of monsters. The new level goes into effect after the boss is defeated.
 
The level affects amount of cookies rewarded and spawning of monsters. The new level goes into effect after the boss is defeated.
   
===Change Dungeon Speed===
+
;Change Dungeon Speed:
 
If you want to change the speed at which the hero goes through the dungeon, use:
 
If you want to change the speed at which the hero goes through the dungeon, use:
 
{{!CollapsibleCode}}setInterval(function() {
 
{{!CollapsibleCode}}setInterval(function() {
Line 681: Line 682:
   
 
==Sugar Lump Related==
 
==Sugar Lump Related==
===Set Sugar Lumps Amount===
+
;Set Sugar Lumps Amount:
 
If you want to set your Sugar Lumps to a certain number, use:
 
If you want to set your Sugar Lumps to a certain number, use:
 
Game.lumps = <u>&lt;amount&gt;</u>
 
Game.lumps = <u>&lt;amount&gt;</u>
   
===Change Lump Variation===
+
;Change Lump Variation:
 
If you want to change a sugar lump to a bifuricated, golden, meaty, or caramelized lump, use:
 
If you want to change a sugar lump to a bifuricated, golden, meaty, or caramelized lump, use:
   
Line 693: Line 694:
 
==Utilities==
 
==Utilities==
 
===Cosmetic Tweaks===
 
===Cosmetic Tweaks===
==== Make the Game "Party" ====
+
;Make the Game "Party":
  +
<center><big><big><big>'''''<u>EPILEPSY/SEIZURE WARNING</u>'''''</big></big></big></center><br>
'''''EPILEPSY WARNING! '''''To make your game rave like in a party. Be careful though, bright colors and shaking ahead!
 
  +
<center><big>'''''BRIGHT, FLASHING, COLORFUL LIGHTS AND VIGOROUS SHAKING ARE INCLUDED'''''</big></center>
  +
  +
To make your game rave like in a party, enter this command in the console:
 
Game.PARTY = true;
 
Game.PARTY = true;
   
==== How to Make Your Own News Ticker ====
+
;How to Make Your Own News Ticker:
 
To add custom tickers use the following code in the console (F12):
 
To add custom tickers use the following code in the console (F12):
 
var customTickers=["<u>&lt;insert news here&gt;</u>","<u>&lt;insert more news here&gt;</u>","<u>&lt;insert even more news here&gt;</u>"];
 
var customTickers=["<u>&lt;insert news here&gt;</u>","<u>&lt;insert more news here&gt;</u>","<u>&lt;insert even more news here&gt;</u>"];
Line 705: Line 709:
 
customTickers.push("<u>&lt;insert news here&gt;</u>");
 
customTickers.push("<u>&lt;insert news here&gt;</u>");
   
====Turn Big Cookie into Face Cookie====
+
;Turn Big Cookie into Face Cookie:
 
To add a grandma face on the big cookie (may be disturbing for some), use:
 
To add a grandma face on the big cookie (may be disturbing for some), use:
 
Game.addClass("elderWrath");
 
Game.addClass("elderWrath");
Line 711: Line 715:
 
Game.removeClass("elderWrath");
 
Game.removeClass("elderWrath");
   
====Changing FPS====
+
;Changing FPS:
 
To change the FPS of the game, use:
 
To change the FPS of the game, use:
 
Game.fps = <u>&lt;FPS&gt;</u>;
 
Game.fps = <u>&lt;FPS&gt;</u>;
'''Note:''' This represents how many frames of animation you see per second and does not make the animations run more smoother. For example, setting this to 60 which is twice the default will make the animations run twice as fast, the opposite is also true. Also, changing this can cause '''current buffs duration''' and '''current golden cookie spawn time''' to be altered. Setting this value to negative can "freeze" Cookie Clicker, making the tab unable to close and requiring a computer restart to fix.
+
'''Note:''' This represents how many frames of animation you see per second and does not make the animations run more smoother. For example, setting this to 60 which is twice the default will make the animations run twice as fast, the opposite is also true. Also, changing this can cause '''current buffs duration''' and '''current golden cookie spawn time''' to be altered. Setting this value to negative can "freeze" Cookie Clicker, making the tab unable to close and requiring a device restart to fix.
   
 
===Calculating Cookies at a Future Time===
 
===Calculating Cookies at a Future Time===
Line 726: Line 730:
   
 
===Golden Cookies Notifications===
 
===Golden Cookies Notifications===
====Golden Cookie Title Bar Alert====
+
;Golden Cookie Title Bar Alert:
 
To make it so that the title of the webpage changes to an exclamation point whenever a golden/red cookie appears, use:
 
To make it so that the title of the webpage changes to an exclamation point whenever a golden/red cookie appears, use:
 
{{!CollapsibleCode}}setInterval(function() {
 
{{!CollapsibleCode}}setInterval(function() {
Line 732: Line 736:
 
}, 100);{{CollapsibleCode!}}
 
}, 100);{{CollapsibleCode!}}
   
====Golden Cookie Desktop Notification====
+
;Golden Cookie Desktop Notification:
 
To make it so that a desktop notification pops up whenever a golden/red cookie appears, use:
 
To make it so that a desktop notification pops up whenever a golden/red cookie appears, use:
 
{{!CollapsibleCode}}if (window.webkitNotifications.checkPermission()) {
 
{{!CollapsibleCode}}if (window.webkitNotifications.checkPermission()) {
Line 762: Line 766:
 
// source: [http://en.reddit.com/r/CookieClicker/comments/1myikg/quick_question_is_there_a_way_to_get_a_desktop/ Cookie Clicker Subreddit]{{CollapsibleCode!}}
 
// source: [http://en.reddit.com/r/CookieClicker/comments/1myikg/quick_question_is_there_a_way_to_get_a_desktop/ Cookie Clicker Subreddit]{{CollapsibleCode!}}
   
====Play Beep Sound when Golden Cookie Spawns====
+
;Play Beep Sound when Golden Cookie Spawns:
 
To make it so that a beeping sound is played whenever a golden/red cookie spawns, use:
 
To make it so that a beeping sound is played whenever a golden/red cookie spawns, use:
 
{{!CollapsibleCode}}var alerted = false;
 
{{!CollapsibleCode}}var alerted = false;
Line 778: Line 782:
   
 
===Auto-Buying Scripts===
 
===Auto-Buying Scripts===
For instructions on using these scripts, refer to [[Cheating#Using_a_Cheat_Interface|above]].
+
For instructions on using these scripts refer to [[Cheating#Using_a_Cheat_Interface|above]].
   
====Build Script X====
+
;Build Script X:
 
Build Script X is a placeholder name to differentiate it from the other scripts. The creator(s) should change it accordingly, but who wants to sit in that debate? Build Script X is a great placeholder name anyway. Fancy.<br />
 
Build Script X is a placeholder name to differentiate it from the other scripts. The creator(s) should change it accordingly, but who wants to sit in that debate? Build Script X is a great placeholder name anyway. Fancy.<br />
 
The script automatically buys the most effective item only in terms of cookies per second and price. It also tells you how long it'll take until it buys, based on your CPS. (Doesn't buy upgrades nor take manual clicks, especially golden cookie clicks, into consideration)<br />
 
The script automatically buys the most effective item only in terms of cookies per second and price. It also tells you how long it'll take until it buys, based on your CPS. (Doesn't buy upgrades nor take manual clicks, especially golden cookie clicks, into consideration)<br />
Line 789: Line 793:
 
Link to source code: http://pastebin.com/raw.php?i=V3ZkT6j2
 
Link to source code: http://pastebin.com/raw.php?i=V3ZkT6j2
   
====Build Script Y====
+
;Build Script Y:
 
This script is an improvement of Build Script X, it buys the most effective buildings or upgrades automatically and tells you details about it in the news bar. This script calculates the effectiveness of each building and each upgrades using the same formula as Build Script X. This script voluntarily ignores the Bingo Center because otherwise it would spam the screen with "research has begun" and bring you to the grandmapocalypse.<br />
 
This script is an improvement of Build Script X, it buys the most effective buildings or upgrades automatically and tells you details about it in the news bar. This script calculates the effectiveness of each building and each upgrades using the same formula as Build Script X. This script voluntarily ignores the Bingo Center because otherwise it would spam the screen with "research has begun" and bring you to the grandmapocalypse.<br />
 
<span style="color:red;">'''Executing this code may cause lag on some machines, when the cookie count is high.''' </span><br />
 
<span style="color:red;">'''Executing this code may cause lag on some machines, when the cookie count is high.''' </span><br />
 
Link to source code: http://pastebin.com/raw.php?i=Nd3Ms8Zy
 
Link to source code: http://pastebin.com/raw.php?i=Nd3Ms8Zy
   
====Build Script Y***====
+
;Build Script Y***:
 
This script is an "improvement" of Build Script Y, after a quick passage to Y* and Y**. It performs exactly the same operation as the Build Script Y, except that it lags even less.<br />
 
This script is an "improvement" of Build Script Y, after a quick passage to Y* and Y**. It performs exactly the same operation as the Build Script Y, except that it lags even less.<br />
 
Build Script Y* removed the recurrent call to the calculation of the best item to buy from the Y script in order to remove the lag caused by the constant calculation.<br />
 
Build Script Y* removed the recurrent call to the calculation of the best item to buy from the Y script in order to remove the lag caused by the constant calculation.<br />
Line 801: Line 805:
 
'''Note:''' If the script is activated at the start of a brand new game, you will immediately get the first 7 of the CpS achievements. Removing the achievements using the method [[Cheating#Removing_an_Achievement|shown here]] technically does work but you will get them again almost instantly. Also, if it's activated after buying the Bingo Center or when One mind is available to be bought, it will spam "research has begun" and start the grandmapocalypse. This applies to both Y and Y***.
 
'''Note:''' If the script is activated at the start of a brand new game, you will immediately get the first 7 of the CpS achievements. Removing the achievements using the method [[Cheating#Removing_an_Achievement|shown here]] technically does work but you will get them again almost instantly. Also, if it's activated after buying the Bingo Center or when One mind is available to be bought, it will spam "research has begun" and start the grandmapocalypse. This applies to both Y and Y***.
   
====Build Script Z Beta 0.94====
+
;Build Script Z Beta 0.94:
 
This script present the same build mechanism as Build Script Y, but it adds the possibility to keep 20 or 140 minutes (depending if you have the last golden cookie upgrade or not) worth of production, enabling the 'Lucky' effect to give you tons of cookies. Option is activated by default and can be removed by pressing 'G'.<br />
 
This script present the same build mechanism as Build Script Y, but it adds the possibility to keep 20 or 140 minutes (depending if you have the last golden cookie upgrade or not) worth of production, enabling the 'Lucky' effect to give you tons of cookies. Option is activated by default and can be removed by pressing 'G'.<br />
 
Note that after buying an item, it won't have a full 140 minutes stock because of the production of the new building. But it is the optimized way.<br />
 
Note that after buying an item, it won't have a full 140 minutes stock because of the production of the new building. But it is the optimized way.<br />
Line 808: Line 812:
   
 
==Reindeer Related==
 
==Reindeer Related==
=== Version 1.0466 ===
 
To auto click reindeers '''Currently Broke''', use this.
 
setInterval(function() { if (Game.seasonPopup.life > 0) { Game.seasonPopup.click(); } }, 500);
 
To spawn a reindeer, use the below cheat. (earns cheated cookies taste awful achievement)
 
Game.seasonPopup.spawn();
 
or you can use this one. (doesn't earn cheated cookies taste awful achievement)
 
Game.seasonPopup.time = Game.seasonPopup.maxTime;
 
 
=== Version 2.0042 ===
 
 
To auto click reindeer, use the following:
 
To auto click reindeer, use the following:
 
setInterval( function() { Game.shimmers.forEach(function(shimmer) { if (shimmer.type == 'reindeer') { shimmer.pop() } }) }, 500);
 
setInterval( function() { Game.shimmers.forEach(function(shimmer) { if (shimmer.type == 'reindeer') { shimmer.pop() } }) }, 500);
Line 826: Line 821:
 
new Game.shimmer('reindeer');
 
new Game.shimmer('reindeer');
   
== Some Codes that may not be listed on here ==
+
==Some Codes that may not be listed on here==
Game.Win('<achievement name>'); // unlock achievement
+
Game.Win('<nowiki><achievement name></nowiki>'); // unlock achievement
 
Game.SetAllAchievs(1); // unlock all achievements
 
Game.SetAllAchievs(1); // unlock all achievements
Game.santaLevel=<level>; // set santa level
+
Game.santaLevel=<nowiki><level></nowiki>; // set santa level
Game.dragonLevel=<level>; // set dragon level
+
Game.dragonLevel=<nowiki><level></nowiki>; // set dragon level
 
Game.MaxSpecials(); // Max Specials
 
Game.MaxSpecials(); // Max Specials
 
Game.DebugUpgradeCpS(); // Debug Upgrades CpS
 
Game.DebugUpgradeCpS(); // Debug Upgrades CpS
Game.gainLumps(<amount of lumps>); // +10 lumps
+
Game.gainLumps(<nowiki><amount of lumps></nowiki>); // +10 lumps
 
Game.Ascend(1); // Ascend
 
Game.Ascend(1); // Ascend
 
Game.cookies/=1000;Game.cookiesEarned/=1000; // /1k
 
Game.cookies/=1000;Game.cookiesEarned/=1000; // /1k
 
Game.RuinTheFun(1); // Ruin the fun (UNLOCK EVERYTHING)
 
Game.RuinTheFun(1); // Ruin the fun (UNLOCK EVERYTHING)
 
Game.GetAllDebugs(); // Get All Debugs
 
Game.GetAllDebugs(); // Get All Debugs
Game.cookies= Game.cookies + <cookie amount>; // Add cookies to your current cookie supply
+
Game.cookies= Game.cookies + <nowiki><cookie amount></nowiki>; // Add cookies to your current cookie supply
Game.cookiesPs=<cookies per second amount>; // Set your cookies per second
+
Game.cookiesPs=<nowiki><cookies per second amount></nowiki>; // Set your cookies per second
Game.computedMouseCps=<mouse cookies per second amount>; // change your mouse cookies per second
+
Game.computedMouseCps=<nowiki><mouse cookies per second amount></nowiki>; // change your mouse cookies per second
 
Game.SetAllUpgrade(1); // get all upgrades
 
Game.SetAllUpgrade(1); // get all upgrades
 
Game.SesameReset(); // reset game
 
Game.SesameReset(); // reset game
Game.Has('<achievement name>'); // Check if user has achievement
+
Game.Has('<nowiki><achievement name></nowiki>'); // Check if user has achievement
 
Game.particlesUpdate(); // Update particles
 
Game.particlesUpdate(); // Update particles
 
Game.mousePointer=0; // change mouse pointer
 
Game.mousePointer=0; // change mouse pointer
 
Timer.track('milk'); // track milk timer
 
Timer.track('milk'); // track milk timer
Game.AscendTimer=<time>; // Change Ascend Timer
+
Game.AscendTimer=<nowiki><time></nowiki>; // Change Ascend Timer
 
Game.killShimmers(); // Remove all shimmers
 
Game.killShimmers(); // Remove all shimmers
Game.Earn(<cookie amount>); // Set your cookie count
+
Game.Earn(<nowiki><cookie amount></nowiki>); // Set your cookie count
 
Game.popups=0; // remove game popup notifications
 
Game.popups=0; // remove game popup notifications
 
Game.HardReset(2); // hard reset game
 
Game.HardReset(2); // hard reset game
 
Game.debugTimersOn=0; // turn on debug timers/off
 
Game.debugTimersOn=0; // turn on debug timers/off
 
Game.sesame=0; // sesame on/off
 
Game.sesame=0; // sesame on/off
Game.Achievements['<achievement name>'].won=1; // unlock achievements
+
Game.Achievements['<nowiki><achievement name></nowiki>'].won=1; // unlock achievements
Game.bakeryName="<bakery name>"; // set your bakery name
+
Game.bakeryName="<nowiki><bakery name></nowiki>"; // set your bakery name
 
Game.bakeryNameRefresh(); // refresh bakery name
 
Game.bakeryNameRefresh(); // refresh bakery name
 
Game.BuildAscendTree(); // build ascend tree
 
Game.BuildAscendTree(); // build ascend tree
Line 864: Line 859:
 
Game.LoadSave(local); // load local save
 
Game.LoadSave(local); // load local save
 
Game.localStorageGet(Game.SaveTo); // save save
 
Game.localStorageGet(Game.SaveTo); // save save
Game.milkProgress = <milk amount>; // change your milk progress
+
Game.milkProgress = <nowiki><milk amount></nowiki>; // change your milk progress
Game.Milk = <amount>; // Change your milk
+
Game.Milk = <nowiki><amount></nowiki>; // Change your milk
 
Game.buyBulk=<1/10/100>; // Change your x# buy amount
 
Game.buyBulk=<1/10/100>; // Change your x# buy amount
 
Game.buyBulk=Game.buyBulkOld; // reset x# buy amount
 
Game.buyBulk=Game.buyBulkOld; // reset x# buy amount
   
==References==
 
<div style='display: none;'>
 
<references/>
 
</div>
 
The IDs for every achievement and upgrade are in the tables below.
 
{{Upgrades ID table}}
 
{{Achievements ID table}}
 
{{GoldenCookies ID table}}
 
 
{{MechNav}}
 
{{MechNav}}
 
[[Category:Cheating]]
 
[[Category:Cheating]]

Revision as of 23:26, 17 April 2022

Cheated cookies
For cheats on Cookie Clicker Classic, please refer to Cheating (Cookie Clicker Classic).

Warning: Do not perform if you want to unlock the game fairly. If you would like to experiment around with the game mechanics or just give yourself a boost, here are some cheats you can try. Almost all require a bit of interaction with technical stuff. However, all the steps are listed and should not be too hard. It is recommended that you export your save and paste it onto a seperate file before cheating in case of undesirable results.

For the sake of organization, all scripts will follow this format:

  • For scripts with "[Expand]", click it to see the full script.
  • <input> - replace the entire underlined part (including < and >) with the desired input.
  • If <input> is in quotes, leave them be.
  • If <input> isn't in quotes, but a script is still not working, put input in quotes.
  • Cheats are case-sensitive, so don't replace uppercase letters with lowercase.

Example:

*game.unlock(<neuromancy>) = wrong
*Game.Unlock("Neuromancy") = right

Additional helpful information:

  • 1 millisecond is 1/1000th of a second, or 0.001 seconds.
  • FPS stands for frames per second, which is the number of calculations done in a second. The default is 30 fps, but you can change it by using this.

Opening the Browser Console

These are the instructions to bring up the console in different browsers. The console is where you enter the code into for the cheats to take effect.

Chrome

Microsoft Windows: Either press CTRL + SHIFT + J or press F12 to open the Developer Tools

Mac OS: Press + ALT + J  then click on the "Console" tab if not already done. You can also right-click and select "Inspect element" Then go to the Console bar.

Firefox

Microsoft Windows: Press F12 or CTRL + SHIFT + K to open the console.

Mac OS: Press + OPTION + K to open the console. Click on the "scratchpad" icon on the right. After entering the desired code, press CTRL + R to execute it.

Microsoft Windows Alternate: Press CTRL + SHIFT + K to open the console. Make sure Console is selected at the top left, and that JS is selected below it. At the bottom of the console, you will see >>, indicating that this is where you enter your code. Enter what you need, and hit 'enter' to run it. The results should be displayed. Note that a return of 'undefined' does not mean that it failed to execute, just that there was nothing to display back to the user.

Internet Explorer 9+

Microsoft Windows: Press F12 to open the developer tools. Click the "Console" tab.

Opera GX: Press Ctrl + Shift + C to open the developer tools (Another way to do this is by pressing left click and going down the menu to inspect element)

Microsoft Windows: Press CTRL + SHIFT + I to open Dragonfly. Click on the "Console" tab.

Safari

Mac OS: Press + OPTION + C to open the Error Console. (Make sure you check the "Show Develop menu in menu bar" box in the "Advanced" tab of the "Preferences" menu first.)

Universal

Type "javascript:[your code here]" on the address bar, then press Enter.

Using a Cheat Interface

There are three ways to enable an interface. Choose the one that works the best.

Bookmark
  • Create a new bookmark.
  • In the "URL" box, copy/paste the following code. (The link to the source code can be found on the wiki page of the corresponding interface.)
Code

javascript:(function(){var script=document.createElement('script');script.setAttribute('src','<source link>');document.body.appendChild(script);}());

  • Name it whatever you like.
  • Now, whenever you are in the game, simply click on this bookmark to enable the cheat interface.
Developer Console
  • Open your browser console. For instructions, look above.
  • Copy all the source code from the link provided in the cheat interface's wiki page.
  • Paste all the code in your browser console.
  • Press Enter.
  • There should not be any error if successfully installed.
TamperMonkey/GreaseMonkey
  • Open your Monkey.
  • Add a new UserScript.
  • Copy/paste the following code into your Monkey editor. (The link to the source code can be found on the wiki page of the corresponding interface.)
Code

// ==UserScript== // @name CheatInterface // @namespace Cookie // @include orteil.dashnet.org/cookieclicker/ // @version 1 // @grant none // ==/UserScript== var oldOnload = window.onload; window.onload = function () { oldOnload(); var script = document.createElement('script'); script.setAttribute('src', '<source link>'); document.body.appendChild(script); }

  • Save.
  • Go to your newly created UserScript.
  • Open the parameters tab.
  • Add a new user include.
  • Copy/paste the game URL. (http://orteil.dashnet.org/cookieclicker/)
  • Reboot your browser.
  • Now, whenever you open Cookie Clicker, the cheat interface will automatically be enabled.

Save Editing

The most simple cheat you can do is import a save. You can make your own save codes by editing an exported save file. If you wish to do that, here are the instructions:

  • Export and copy your save.
  • At the end of the code, delete the "%21END%21" and replace every "%3D" with a equal sign (=).
  • Go to base64 converter and paste the modified save there.
  • Decode it with UTF-8.
  • Edit the save. (For information about formatting, refer below.)
  • Go to base64 converter and paste your new save.
  • Encode it with UTF-8.
  • At the end of the resulting code, replace every equal sign (=) with "%3D" and append "%21END%21".
  • Import your save to the game.
Save Format

The decoded save follows a certain format, take this save for example:

Code

1.0393||1381898487292;1380107853914;1381899592923|011101|19810703888477384;232154241051907840;4218;2120;24564619087288988;9632;-1;-1;45326046739823870;0;11;107852;0;-1;2;207;1656259545394620;175|219,220,25128184169839,0;216,216,64729416294516,0;180,180,7033459448,0;168,169,22279979110,0;159,159,75346744514,0;150,150,182832240409,0;139,140,651206881531,0;143,143,11123847712297,0;121,122,120436061607417,0;112,112,1119454662710064,0;|4503599627370495;4503599627370495;4503599627370495;4503573749070335;2814337448673279;171798691455|4503599627370495;2313303743266815;2047

The vertical bars divide the save into sections. Following are the formats of each individual section.

  • Version number
  • Reserved for future use
  • Unix timestamps
Code

1381898487292;1380107853914;1381899592923 // 1381898487292 - session started // 1380107853914 - legacy started // 1381899592923 - time this save was created // To convert it into a readable format, divide it by 1000 // Put the result in this converter and click "Submit" // 1381898487.292 = Wed, 16 Oct 2013 04:41:27 GMT // 1380107853.914 = Wed, 25 Sep 2013 11:17:33 GMT // 1381899592.923 = Wed, 16 Oct 2013 04:59:52 GMT

  • Preferences (0 means OFF, 1 means ON)
Code

011101 // 0 - particles // 1 - numbers // 1 - automatically save // 1 - offline mode (0 means offline, 1 means online) // 0 - milk // 1 - fancy graphics

  • Cookie stats
Code

19810703888477384;232154241051907840;4218;2120;24564619087288988;9632;-1;-1;45326046739823870;0;11;107852;0;-1;2;207;1656259545394620;175 // 19810703888477384 - Cookies in bank // 232154241051907840 - Cookies baked (this session) // 4218 - Big cookie clicks // 2120 - Golden cookie clicks (all time) // 24564619087288988 - Hand-made cookies // 9632 - Missed golden cookies (removed feature) // -1 - Background color (never implemented) // -1 - Milk type (never implemented) // 45326046739823870 - Cookies forfeited by resetting // 0 - Grandmatriarchs status (0=Appeased, 1=Awoken, 2=Displeased, 3=Angered) // 11 - Elder Pledges bought // 107852 - Elder Pledge time left (minutes * 1800) // 0 - Next upgrade to research // -1 - Research time left (minutes * 1800) // 2 - Number of resets // 207 - Golden cookie clicks (this session) // 1656259545394620 - Cookies withered (sucked by wrinkler) // 175 - Wrinklers popped

  • Buildings
Code

219,220,25128184169839,0;216,216,64729416294516,0;180,180,7033459448,0;168,169,22279979110,0;159,159,75346744514,0;150,150,182832240409,0;139,140,651206881531,0;143,143,11123847712297,0;121,122,120436061607417,0;112,112,1119454662710064,0; // Each building has its own section, separated by semicolons // The pattern repeats, so I will only use Cursor as an example // In this case, the section for Cursor is 219,220,25128184169839,0 // 219 - amount owned // 220 - amount bought (include ones that were sold) // 25128184169839 - total cookies produced // 0 - specialUnlocked (not yet implemented, dungeon related)

  • Upgrades
Code

4503599627370495;4503599627370495;4503599627370495;4503573749070335;2814337448673279;171798691455 // Convert each number separated by semicolons with this converter // Take off the first and last 1 of each result and reverse the order // Separate every 2 digits with a space // 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 // 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 // 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 // 11 11 11 11 00 11 11 00 00 10 00 11 00 11 11 11 00 11 11 11 11 11 11 11 11 // 11 11 11 11 11 11 11 11 11 00 11 11 11 11 11 11 11 11 00 11 11 11 11 11 00 // 11 11 11 00 11 11 11 11 11 11 11 11 11 11 11 11 11 00 // Each 2 digits represents an upgrade (order shown at bottom of this page) // The first digit is whether the upgrade is unlocked (requirements met) // The second digit is whether the upgrade is bought

  • Achievements
Code

4503599627370495;2313303743266815;2047 // Do the same procedure as the Upgrades above, except for separation // 11111111111111111111111111111111111111111111111111 // 11111111111111111111011111111111111011111101100000 // 111111111 // Each digit represents an achievement (order shown at bottom of this page)

Upon finishing the save editing, the following tools may be helpful in returning the save to its original format:

"Cheated cookies taste awful" Achievement

There are only two in-game events that award the achievement "Cheated cookies taste awful".

  • Setting Cookies in bank to be greater than Cookies baked all time. (The amount may need to be adjusted depending on the CpS.)
Game.cookies = Game.cookiesEarned + <amount>;

You can also remove the achievement by typing this line in the console:

Game.Achievements["Cheated cookies taste awful"].won=0

Debug Cheats

These are cheats built into the game itself to aid in debugging and testing the game.

Debug Upgrades

As of V2, debug upgrades no longer appear in the store. However, they can still be gotten with the unlock and buy cheat.

Debug upgrades come in the form of upgrades that can only be enabled by using cheats. To enable them, refer to upgrades section below. There are currently 10 debug upgrades available:

  • Ultrascience= All new researches take only 5 seconds to complete.
  • Gold hoard= All Golden Cookies appear every 0.6 seconds after the current or next golden cookie.
  • Neuromancy= Unlocks every available upgrade (including the debug upgrades) and allows you to toggle them on or off by clicking on their icons in the Stats menu. If Neuromancy itself is clicked, it goes back to the store.
  • Perfect idling= Keeps producing cookies that you would have gained through CpS after you closed the game and tells you the amount of cookies it produced while it was closed. Remains active even after closing the browser.
  • Wrinkler doormat= Wrinklers spawn 1000 times more frequently.
  • Reindeer season= Reindeers spawn faster (about two minutes per reindeer).
  • Eternal seasons= Unlocks Season Switcher without purchasing the heavenly upgrade. Seasons do not have a countdown timer.
  • Magic shenanigans= Cookie production multiplied by 1000.
  • Occult obstruction= Cookie production reduced to 0.
  • Glucose-charged air= Sugar lumps coalesce a whole lot faster.
  • Turbo-charged soilGarden plants grow every second. Garden seeds are free to plant. You can switch soils at any time.
Ruin The Fun
RuinTheFun

The message shown after entering Game.RuinTheFun();

Ruin The Fun is a function that instantly gives you all the upgrades (including the debug upgrades and starting Grandmapocalypse), all the achievements, and 1 nonillion cookies. To execute this function, simply use:

Game.RuinTheFun();
Sesame Menu

As of V2, the game contains a debugging menu with a multitude of useful features, such as spawning Golden Cookies with various effects. To unlock it, you can put saysopensesame at the end of your bakery name. Alternatively, you can use the following code:

Game.OpenSesame();

Defining shortcuts

If you find yourself constantly typing or copypasting cheats or commands, you may want to consider defining a function. So instead of typing 3 lines of code, you could also type a single word to use the exact same cheat. A function is defined as follows:

 function <name>()
 {
     <code here>(code here)
 }
 </code>
<code here>Now you only need to type the function name, followed by parentheses '()' to access a command or multiple commands more quickly. </code>

<code here>You can also pass an argument to a function like so: </code>
 <code here>function <name>(<variable>)
 {
     alert(<variable>)
 }
 </code>
<code here>This example code will trigger a click frenzy for 60 seconds when typing gimmeClickFrenzy(60): </code>
 <code here>function gimmeClickFrenzy(time)
 { 
     Game.clickFrenzy = Game.fps * time;
     Game.recalculateGains = 1;
     Game.Popup('Click frenzy! Clicking power x777 for ' + time + ' seconds!');
 }
 </code>
<code here>You can also pass multiple arguments to a function: </code>
 <code here>function alertMe(text, text2)
 {
     alert(text);
     alert(text2);
 }</code>

Cookies Related

Gaining Cookies

To change the amount of cookies in bank, use:

Game.cookies = <amount>;

To add more cookies to the existing amount in bank, use:

Game.Earn(<amount adding>);
Removing Cookies

To remove a specific amount of cookies, use:

Game.cookies -= <amount removing>;
Infinity Cookies

To make it look like you have infinity amount of cookies but you won't really, use:

Game.cookies = NaN;

To actually obtain Infinity cookies, use:

Game.cookies = Infinity;

Beware: The number of cookies displayed above the big cookie will not change from infinity if you reset the game and/or change the number of cookies in your bank. To fix this, reset the displayed number using:

Game.cookies = 0;

Also, you can clear your cookies forever without gaining more using:

Game.cookies = -Infinity;
Spawning Custom Golden Cookies
Code

var newShimmer=new Game.shimmer('golden',<force object type>,<nocount amount>); // <no count amount> default is 1 // <force object type> Default is 0, so it should look something like 0,1 newShimmer.dur=<duration>; // duration of the cookie Default is: Math.ceil(Math.random()*4+1); newShimmer.life=<cookie life>; // <cookie life> default is Math.ceil(Game.fps*newShimmer.dur); newShimmer.force='<effect type>'; // effect when clicked newShimmer.sizeMult=<size of the cookie>; // default size is: Math.random()*0.75+0.25;

Changing CpS

To change the CpS (will self-correct when new buildings/upgrades are bought), use:

Game.cookiesPs = <CpS>;

To make the effect stay until the page is refreshed, use:

Code

Game.CalculateGains = function() { Game.cookiesPs = <CpS>; Game.computedMouseCps = Game.mouseCps(); Game.recalculateGains = 0; }; Game.recalculateGains = 1;

Auto-Click Big Cookie

To auto-click the big cookie at a set interval, use:

var autoClicker = setInterval(Game.ClickCookie, <milliseconds interval>);

To end this effect, use:

clearInterval(autoClicker);
Faster Auto-Click

The auto-click cheat above can only click as fast as the CPU can handle. To produce an even faster effect, use:

Code

var autoClicker = function(clicksAtOnce, repeatInterval) { var cheated = false; var intoTheAbyss = function() { if(!cheated) { cheated = true; for(var i = 0; i < clicksAtOnce; i++) { Game.ClickCookie(); Game.lastClick = 0; } cheated = false; }; }; return setInterval(intoTheAbyss, repeatInterval); }; autoClicker(<amount of clicks>, <milliseconds interval>);

Auto-Click Only During Click Frenzy

To enable auto-click only during the Click Frenzy, use:

Code

setInterval(function() { if (Game.hasBuff('Click frenzy')) Game.ClickCookie(); }, <milliseconds interval>);

AutoClick

Holding the assigned key (~) repeatedly clicks the object under the mouse:

Code

/** * Summary: Upon activation clicks element under mouse. * @param {number} [rate] - Timeout between clicks in milliseconds; Default: 500 * @author QtheConqueror */ function AutoClick(rate = 500) { if (window.attachEvent) { document.attachEvent("onmousemove", MouseMv); } else { document.addEventListener("mousemove", MouseMv, false); } document.addEventListener('keydown', KeyDown); /** * Summary: Listens for mouse movment and exports position to variables x & y. * @param {Event} e */ function MouseMv(e) { if (!e) e = window.event; if (typeof e.pageY == 'number') { x = e.pageX; y = e.pageY; } else { x = e.clientX; y = e.clientY; } } /** * Summary: Listens for keydown event * @param {Event} e */ function KeyDown(e) { if (e.type == 'keydown') { var char = e.key if (char == '`' || char == '~') { setTimeout(Click(x, y), rate); } } } /** * Summary: Clicks element at postions (x, y) on document. * @param {number} x - X coordinate of document element. * @param {number} y - Y coordinate of document element. */ function Click(x, y) { document.elementFromPoint(x, y).click(); } } setInterval(AutoClick(<milliseconds interval>), 10) // Set to listen every 10ms;

Avalible on Greasy Fork: AutoClick

Buildings Related

Prices Stay at Base Price

If you want all the prices to stay at base price despite amount owned, use:

Code

Game.priceIncrease = 1;

All Buildings Are Free

If you want to make all buildings completely free, use:

Code

Game.ObjectsById.forEach(function (e) { e.basePrice = 0; e.refresh(); }); Game.storeToRebuild = 1;

Refill Grimoire Magic
Game.Objects['Wizard tower'].minigame.magic = Infinity;
Refill Worship Swaps
Game.Objects['Temple'].minigame.swaps = 3;
Unlock all seeds on Farm as if Ruin The Fun was enabled;
Game.Objects['Farm'].minigame.onRuinTheFun;
Change Profits
Game.Objects['Bank'].minigame.profit = <amount>;
Upgrade Buildings (Sugar Lump)
Game.ObjectsById[<index>].level = <amount>; Game.recalculateGains=1;
Sacrifice Towers
Code

for (var i in Game.Objects){ Game.Objects[i].sacrifice(1); }

Build N Buildings

If you want to build a custom number of buildings, N, use:

Game.buyBulk=N;

Golden/Wrath Cookies Related

Note that the Wrath Cookie counts as a golden cookie as far as the game coding goes, therefore the following scripts also apply on Wrath Cookies. If you want all the Wrath Cookies to behave like golden cookies (prevent Ruin and Clot), simply remove the "/*" and the "*/" in each script.

Spawn a Golden Cookie

(Working and Updated as of 11/28/17)

To spawn a golden cookie, use:

var newShimmer=new Game.shimmer("golden");

If you want to spawn a golden cookie that starts a cookie chain, add the following script in addition to the ones provided above:

Game.shimmer.chain = <stage>;

If you want to start the cookie chain at 6 cookies, use "1" as the stage. 66 cookies = "2", 666 cookies = "3", and so on.

Golden Cookies with No Delay

If you want the golden cookies to spawn one after another without delay, use:

Code

setInterval(function() { Game.shimmer.wrath = 0; Game.shimmer.delay = 0; }, 1);

Get Golden Cookie Effects without a cookie

To give yourself a multiplier without a golden cookie, use:

var effectDurMod=1; Game.gainBuff('<effect>',Math.ceil(<seconds it lasts>*effectDurMod),<multiplier amount>);
Set Golden Cookie Clicks

If you just want to set the amount of golden cookies clicked, use:

Game.goldenClicks = <amount>;

If you want to earn the related achievements, use one of the auto-click's below.

Auto-Click Golden Cookies

If you want the golden cookies to be auto-clicked as soon as they appear, use:

Code

setInterval(function() { Game.shimmers.forEach(function(shimmer) { if (shimmer.type == "golden") { shimmer.pop() } }) }, 500);

Alternatively, if you only want to click golden cookies, and not wrath cookies as they appear, use:

Code

setInterval(function() { Game.shimmers.forEach(function(shimmer) { if(shimmer.type == "golden" && shimmer.wrath == 0) { shimmer.pop() } }) }, 500);

Auto-Spawn and Click Golden Cookies

If you want to automatically spawn and click a set amount of golden cookies instantaneously, use:

Code

for (var i = 0; i < <amount>; i++) { (new Game.shimmer('golden',{noWrath:true})).pop(); }

To spawn an amount as well as increment the cookies clicked stat and reset the spawn timer, use:

Code

for (var i = 0; i < <amount>;; i++) { var newShimmer = new Game.shimmer('golden',{noWrath:true}); newShimmer.spawnLead=1; newShimmer.pop(); }

If you want to automatically click all spawned cookies then spawn a cookie at set interval, use:

Code

setInterval(function() { /*Game.shimmers.forEach(function(shimmer){shimmer.wrath = 0});*/ Game.shimmers.forEach(function(shimmer) { if(shimmer.type=="golden") { shimmer.pop(); } }); Game.shimmerTypes.golden.time = Game.shimmerTypes.golden.maxTime; }, <milliseconds interval>);

Frenzy

To produce a customized Frenzy effect, use:

Code

var time = <seconds>; Game.frenzy = Game.fps * time; Game.frenzyPower = <multiplier>; Game.recalculateGains = 1; Game.Popup('Frenzy! Cookie production x' + Game.frenzyPower + ' for ' + time + ' seconds!');

Clicking Frenzy

To produce a customized Clicking Frenzy effect, use:

Code

var time = <seconds>; Game.clickFrenzy = Game.fps * time; Game.recalculateGains = 1; Game.Popup('Click frenzy! Clicking power x777 for ' + time + ' seconds!');

Grandmapocalypse Related

Change Elder Pledge Time Left

If you want to change the time remained on the Elder Pledge, use:

Game.pledgeT = <minutes> * 60 * Game.fps;
Auto-Buy Elder Pledge

If you want to automatically buy Elder Pledge as it becomes available, use:

Code

setInterval(function() { if (Game.UpgradesInStore.indexOf(Game.Upgrades["Elder Pledge"]) != -1) { Game.Upgrades["Elder Pledge"].buy(); } }, 500);

Auto-Click Wrinklers

If you want the wrinklers to be auto-clicked as a set interval (note, it must run three times to kill them):

Code

var wrinklerClick= setInterval(function() { for (var i=0;i<10;i++) { if (Game.wrinklers[i].close==1) {Game.wrinklers[i].hp--} } }, <interval>);

or if you want an instant kill

Code

var wrinklerClick = setInterval(function() { for (var i=0;i<12;i++) { if (Game.wrinklers[i].close==1) {Game.wrinklers[i].hp = 0} } }, 500);

or an even easier way to wipe them out

var noWrinkler = setInterval(Game.CollectWrinklers, 500);
Spawn All Wrinklers

If you want to instantly spawn all twelve wrinklers so you can get the bonus after letting them feed a while:

for (i = 0; i < Game.wrinklers.length; i++) { Game.wrinklers[i].phase = 1; }
Make All Wrinklers Shiny

If you want to make all currently existent wrinklers shiny:

for (i = 0; i < Game.wrinklers.length; i++) { Game.wrinklers[i].type = 1; }

Or, if you want to instantly spawn all twelve wrinklers and make them shiny:

for (i = 0; i < Game.wrinklers.length; i++) { Game.wrinklers[i].phase = Game.wrinklers[i].type = 1; }
Spam-Kill Wrinklers

If you want to kill Wrinklers quickly, use this command:

Code

var noWrinkler = setInterval(function () { Game.CollectWrinklers(); for(i = 0; i < Game.wrinklers.length; i++) { Game.wrinklers[i].phase = 2; } }, 100);

If you want to stop spam-killing wrinklers:

clearInterval(noWrinkler);
Bingo Center

If you want to instantly unlock the next Bingo Center upgrade:

setInterval(function(){Game.researchT=0;}, 0);

Note: Does not unlock the Bingo Center if locked

Achievements Related

There are two ways to refer to an achievement: its ID and its name. You must type the name EXACTLY as it appears in game for these scripts to work, including capitalization. If you are concerned about typing the name wrong, copy it from the table at the bottom of this page, or just use the ID.

Unlocking an Achievement

If you want to unlock an achievement, use:

Game.Win(<name>);

or

Game.Win(Game.AchievementsById[<ID>].name);
Unlocking All Achievements

If you want to unlock every single achievement, use:

Code

Game.AchievementsById.forEach(function(e) { // if (e.hide != 3) Game.Win(e.name); });

If you only want to unlock non-shadow achievements, remove the double slash (//);

Removing an Achievement

If you want to remove an achievement, use:

Game.Achievements[<name>].won = 0;

or

Game.AchievementsById[<ID>].won = 0;
Removing All Achievements

If you want to remove all the achievements, use:

Code

Game.AchievementsById.forEach(function(e) { // if (e.hide == 3) e.won = 0; });

If you only want to remove shadow achievements, remove the double slash (//);

Note: Removing an achievement won't reduce your milk percentage.

Milk Progress

To Change your milk progress, use:

Game.milkProgress=<progress amount>;

Upgrades Related

Similar to achievements, upgrades can also be referred by either ID or name. A list of them can also be found at the bottom of this page.

Unlocking/Buying an Upgrade

If you want to unlock a single upgrade, use:

Game.Unlock(Game.UpgradesById[<ID>].name);

or

Game.Unlock(<name>);

If you want to unlock AND buy an upgrade, use:

Game.UpgradesById[<ID>].earn()

or

Game.Upgrades[<name>].earn()
Unlocking/Buying All Upgrades

If you want to unlock all upgrades, use:

Code

Game.UpgradesById.forEach(function(e) { Game.Unlock(e.name);

If you want to enable all upgrades, use;

Code

Game.UpgradesById.forEach(function(i) {if (i.bought === 0) { Game.cookies +=i.basePrice; i.buy(); }})

If you want to unlock AND obtain all upgrades, use:

Code

Game.UpgradesById.forEach(function(e) { if (e.bought === 0) e.earn(); });

Adding cursors:

Game.Objects['Cursor'].amount = <amount of cursors>;
Removing an Upgrade

If you want to remove an upgrade, use:

Game.Upgrades[<name>].bought = 0;

or

Game.UpgradesById[<ID>].bought = 0;
Free Upgrades

If you want to make all upgrades completely free, use:

Code

Game.UpgradesById.forEach(function (e) { e.basePrice = 0; }); Game.upgradesToRebuild = 1;

Instant Research

If you want to make all researches instant, use:

Code

setInterval(function() { Game.researchT = 0; }, 1);

Heavenly Chips Related

If you want to change the amount of heavenly chips temporarily, use:

Code

Game.prestige = []; Game.prestige['Heavenly chips'] = <amount>;

This will make it so that when you refresh the page, the amount of heavenly chips returns back to normal. If you want it to be permanent, use:

Code

var nhc = <amount>; Game.cookiesReset = nhc * (nhc + 1) * 1e12 / 2; Game.CalculatePrestige();

Use this code to pull up a menu where you have the option to set your Heavenly Chips. (Note, the game says the menu can be only be used once. Disregard it. This code can be used as many times as you want to.)

Game.FreeHeavenlyChips();

If you want to obtain the maximum amount of heavenly chips possible permanently, use:

Code

Game.cookiesReset = Number.MAX_VALUE; Game.CalculatePrestige();

If you want to gain infinity heavenly chips, use:

Code

Game.prestige = []; Game.prestige['Heavenly chips'] = Infinity; Game.prestige.ready = 1; Game.recalculateGains = 1;

Note: Changing the prestige level will not affect your amount of heavenly chips. If you want your heavenly chips amount to be correct, enter the following into the console. Game.heavenlyChips = Game.prestige - Game.heavenlyChipsSpent

Dungeons Related

Change Dungeon Level

If you want to change the dungeon level, use:

Game.Objects.Factory.dungeon.level = <level>;

The level affects amount of cookies rewarded and spawning of monsters. The new level goes into effect after the boss is defeated.

Change Dungeon Speed

If you want to change the speed at which the hero goes through the dungeon, use:

Code

setInterval(function() { Game.Objects['Factory'].dungeon.timer = 0; }, <milliseconds interval>);

Sugar Lump Related

Set Sugar Lumps Amount

If you want to set your Sugar Lumps to a certain number, use:

Game.lumps = <amount>
Change Lump Variation

If you want to change a sugar lump to a bifuricated, golden, meaty, or caramelized lump, use:

Note that you will have to replace <value> with either 0 for normal, 1 for bifuricated, 2 for golden, 3 for meaty, or 4 for caramelized.

Game.lumpCurrentType = <value>

Utilities

Cosmetic Tweaks

Make the Game "Party"
EPILEPSY/SEIZURE WARNING


BRIGHT, FLASHING, COLORFUL LIGHTS AND VIGOROUS SHAKING ARE INCLUDED

To make your game rave like in a party, enter this command in the console:

Game.PARTY = true;
How to Make Your Own News Ticker

To add custom tickers use the following code in the console (F12):

var customTickers=["<insert news here>","<insert more news here>","<insert even more news here>"];
customTickersFunction=function() { return customTickers; }
Game.customTickers.push(customTickersFunction);

To later add more tickers just write:

customTickers.push("<insert news here>");
Turn Big Cookie into Face Cookie

To add a grandma face on the big cookie (may be disturbing for some), use:

Game.addClass("elderWrath");

To remove this effect, refresh the page or use:

Game.removeClass("elderWrath");
Changing FPS

To change the FPS of the game, use:

Game.fps = <FPS>;

Note: This represents how many frames of animation you see per second and does not make the animations run more smoother. For example, setting this to 60 which is twice the default will make the animations run twice as fast, the opposite is also true. Also, changing this can cause current buffs duration and current golden cookie spawn time to be altered. Setting this value to negative can "freeze" Cookie Clicker, making the tab unable to close and requiring a device restart to fix.

Calculating Cookies at a Future Time

This is not really a cheat, but can be somewhat useful at times. To find out how many cookies you'll have in bank at a given time, use:

alert(Beautify(Game.cookies + (new Date("<YYYY-MM-DD HH:MM:SS>") - new Date().getTime()) / 1000 * Game.cookiesPs, 1));

To find out how many cookies you'll have baked all-time at a given time, use:

alert(Beautify(​Game.cookiesEarned + (new Date("<YYYY-MM-DD HH:MM:SS>") - new Date().getTime()) / 1000 * Game.cookiesPs, 1));

To find out how many heavenly chips you can get by resetting at a given time, use:

alert(Beautify(Math.floor((Math.pow(1 + 8 * (Game.cookiesEarned + Game.cookiesReset + (new Date("<YYYY-MM-DD HH:MM:SS>") - new Date().getTime()) / 1000 * Game.cookiesPs) / 10e12, 0.5) - 1) / 2)));

Note that this assumes that you do not click the big cookie, buy new upgrades/buildings, or click golden cookies in this time period.

Golden Cookies Notifications

Golden Cookie Title Bar Alert

To make it so that the title of the webpage changes to an exclamation point whenever a golden/red cookie appears, use:

Code

setInterval(function() { if (Game.shimmer.life > 0) document.title = '!' }, 100);

Golden Cookie Desktop Notification

To make it so that a desktop notification pops up whenever a golden/red cookie appears, use:

Code

if (window.webkitNotifications.checkPermission()) { function askPermission() { window.webkitNotifications.requestPermission(); var element = document.getElementById('notifier_permission'); element.parentNode.removeChild(element); } var ask = document.createElement('BUTTON'); var askText = document.createTextNode('Ask for notification permission'); ask.id = 'notifier_permission'; ask.style.position = 'absolute'; ask.style.zIndex = 99999999; ask.appendChild(askText); document.body.appendChild(ask); ask.onclick = askPermission; } Game.shimmer.spawn = (function() { var spawn = Game.shimmer.spawn; return function() { popup = webkitNotifications.createNotification('img/goldCookie.png', 'Cookie Clicker', 'A wild golden cookie appeared!'); popup.show(); setTimeout(function(){ popup.cancel(); }, '10000'); spawn(); }; })(); // source: Cookie Clicker Subreddit

Play Beep Sound when Golden Cookie Spawns

To make it so that a beeping sound is played whenever a golden/red cookie spawns, use:

Code

var alerted = false; setInterval(function () { if (Game.shimmer.time == 0) { if (alerted) return; alerted = true; var audio = new Audio("http://soundbible.com/grab.php?id=1252&type=wav"); audio.volume = 0.7; audio.play(); } else { alerted = false; } }, 100);

Auto-Buying Scripts

For instructions on using these scripts refer to above.

Build Script X

Build Script X is a placeholder name to differentiate it from the other scripts. The creator(s) should change it accordingly, but who wants to sit in that debate? Build Script X is a great placeholder name anyway. Fancy.
The script automatically buys the most effective item only in terms of cookies per second and price. It also tells you how long it'll take until it buys, based on your CPS. (Doesn't buy upgrades nor take manual clicks, especially golden cookie clicks, into consideration)
The original description above have been disputed as follows:

  • Certain upgrades are not taken into consideration in the calculations, although this may now be fixed.
  • The script also allows for toggling the automatic buy function by pressing the A key.
  • The script uses a proven formula (which includes your CPS rate) to calculate the order of buildings to be bought.

Link to source code: http://pastebin.com/raw.php?i=V3ZkT6j2

Build Script Y

This script is an improvement of Build Script X, it buys the most effective buildings or upgrades automatically and tells you details about it in the news bar. This script calculates the effectiveness of each building and each upgrades using the same formula as Build Script X. This script voluntarily ignores the Bingo Center because otherwise it would spam the screen with "research has begun" and bring you to the grandmapocalypse.
Executing this code may cause lag on some machines, when the cookie count is high.
Link to source code: http://pastebin.com/raw.php?i=Nd3Ms8Zy

Build Script Y***

This script is an "improvement" of Build Script Y, after a quick passage to Y* and Y**. It performs exactly the same operation as the Build Script Y, except that it lags even less.
Build Script Y* removed the recurrent call to the calculation of the best item to buy from the Y script in order to remove the lag caused by the constant calculation.
Link to source code: http://pastebin.com/raw.php?i=N8g0TZ6P
Note: If the script is activated at the start of a brand new game, you will immediately get the first 7 of the CpS achievements. Removing the achievements using the method shown here technically does work but you will get them again almost instantly. Also, if it's activated after buying the Bingo Center or when One mind is available to be bought, it will spam "research has begun" and start the grandmapocalypse. This applies to both Y and Y***.

Build Script Z Beta 0.94

This script present the same build mechanism as Build Script Y, but it adds the possibility to keep 20 or 140 minutes (depending if you have the last golden cookie upgrade or not) worth of production, enabling the 'Lucky' effect to give you tons of cookies. Option is activated by default and can be removed by pressing 'G'.
Note that after buying an item, it won't have a full 140 minutes stock because of the production of the new building. But it is the optimized way.
There are currently 1 known problems : - On small screen the text indicating the new feature status is hidden
Link to source code: http://pastebin.com/raw.php?i=vjLKNs0c

Reindeer Related

To auto click reindeer, use the following:

setInterval( function() { Game.shimmers.forEach(function(shimmer) { if (shimmer.type == 'reindeer') { shimmer.pop() } }) }, 500);

To spawn a reindeer based on timer (will count towards stats & make a sound) use the following:

Game.shimmerTypes.reindeer.time = Game.shimmerTypes.reindeer.maxTime

or

(function(){var newShimmer=new Game.shimmer('reindeer'); newShimmer.spawnLead=1;Game.shimmerTypes['reindeer'].spawned=1;})();

To spawn a reindeer (the essence of redoubled luck way, won't count towards stats) use the following:

new Game.shimmer('reindeer');

Some Codes that may not be listed on here

Game.Win('<achievement name>'); // unlock achievement
Game.SetAllAchievs(1); // unlock all achievements
Game.santaLevel=<level>; // set santa level
Game.dragonLevel=<level>; // set dragon level
Game.MaxSpecials(); // Max Specials
Game.DebugUpgradeCpS(); // Debug Upgrades CpS
Game.gainLumps(<amount of lumps>); // +10 lumps
Game.Ascend(1); // Ascend
Game.cookies/=1000;Game.cookiesEarned/=1000; // /1k
Game.RuinTheFun(1); // Ruin the fun (UNLOCK EVERYTHING)
Game.GetAllDebugs(); // Get All Debugs
Game.cookies= Game.cookies + <cookie amount>; // Add cookies to your current cookie supply
Game.cookiesPs=<cookies per second amount>; // Set your cookies per second
Game.computedMouseCps=<mouse cookies per second amount>; // change your mouse cookies per second
Game.SetAllUpgrade(1); // get all upgrades
Game.SesameReset(); // reset game
Game.Has('<achievement name>'); // Check if user has achievement
Game.particlesUpdate(); // Update particles
Game.mousePointer=0; // change mouse pointer
Timer.track('milk'); // track milk timer
Game.AscendTimer=<time>; // Change Ascend Timer
Game.killShimmers(); // Remove all shimmers
Game.Earn(<cookie amount>); // Set your cookie count
Game.popups=0; // remove game popup notifications
Game.HardReset(2); // hard reset game
Game.debugTimersOn=0; // turn on debug timers/off
Game.sesame=0; // sesame on/off
Game.Achievements['<achievement name>'].won=1; // unlock achievements
Game.bakeryName="<bakery name>"; // set your bakery name
Game.bakeryNameRefresh(); // refresh bakery name
Game.BuildAscendTree(); // build ascend tree
Game.DebuggingPrestige=false; // debug prestige
Game.CalculateGains(); // calculate gains
Game.computedMouseCps; // compute mouse cps
Game.LoadSave(); // load save
Game.LoadSave(local); // load local save
Game.localStorageGet(Game.SaveTo); // save save
Game.milkProgress = <milk amount>; // change your milk progress
Game.Milk = <amount>; // Change your milk
Game.buyBulk=<1/10/100>; // Change your x# buy amount
Game.buyBulk=Game.buyBulkOld; // reset x# buy amount
Cookie Clicker game mechanics
Cookies Cookie ClickerClickingBuildings
General AchievementsGolden CookiesMilkSugar LumpsNews TickerOptionsCheating
Cookies per Second (CpS)Cookies per Click (CpC)
Upgrades Upgrades overview
Multipliers: Flavored CookiesKittens
Research: GrandmapocalypseWrath CookiesWrinklersShiny wrinklers
Ascension AscensionHeavenly ChipsChallenge Mode
Seasons Seasons overview
Valentine's DayBusiness DayEasterHalloweenChristmas
Minigames Minigames overview
GardenStock MarketPantheonGrimoire
Further reading Gameplay