Skip to content

Instantly share code, notes, and snippets.

@odaba
Created September 14, 2015 18:11
Show Gist options
  • Save odaba/5785f22fb4adcf7c841e to your computer and use it in GitHub Desktop.
Save odaba/5785f22fb4adcf7c841e to your computer and use it in GitHub Desktop.
if(mygame) clearInterval(mygame);
mygame = setInterval(function(){
Game.ClickCookie();
Game.NextPurchase = Game.ObjectsById.filter(function(building){
return !building.locked;
}).sort(function(a, b){
return (a.price / (a.storedCps * Game.globalCpsMult)) - (b.price / (b.storedCps * Game.globalCpsMult));
})[0];
if(Game.NextPurchase && (Game.NextPurchase.price < Game.cookies)) Game.NextPurchase.buy();
Game.UpgradesInStore.some(function(upgrades){
// one mind - 69
// elder pact - 73
// elder pledge - 74
// elder covenant - 84
// revoke elder covenant - 85
// season switcher - 181
// festive biscuit - 182
// ghostly biscuit - 183
// lovesick biscuit - 184
// fool's biscuit - 185
// bunny biscuit - 209
if([69, 73, 74, 84, 85, 181, 182, 183, 184, 185, 209].indexOf(upgrades.id) != -1) return false;
if(upgrades.basePrice < Game.cookies) { upgrades.buy(); return true; }
return false;
});
if(Game.goldenCookie.life && !Game.goldenCookie.wrath) Game.goldenCookie.click();
if(Game.seasonPopup.life) Game.seasonPopup.click();
//only reset if it would get me heavenly chips
if((((Game.prestige['Heavenly chips']|0) + 1) * 1000000000000) < Game.cookies) Game.Reset(1);
}, 100);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment