Skip to content

Instantly share code, notes, and snippets.

@EugeneKay
Last active August 29, 2015 14:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EugeneKay/0b8e82b008bbd3f82239 to your computer and use it in GitHub Desktop.
Save EugeneKay/0b8e82b008bbd3f82239 to your computer and use it in GitHub Desktop.
Kitten Clicker
autoPlay = setInterval(function() {
var steamworks = gamePage.bld.get('steamworks');
if ( !steamworks.on) {
return;
}
var catpower = gamePage.resPool.get('manpower');
if (catpower.value / catpower.maxValue > 0.99) {
$("a:contains('Send hunters')").click();
}
var furs = gamePage.resPool.get('furs').value;
var parchments = gamePage.resPool.get('parchment').value;
var manuscripts = gamePage.resPool.get('manuscript').value;
var compediums = gamePage.resPool.get('compedium').value;
var blueprints = gamePage.resPool.get('blueprint').value;
if ( parchments < 1000 && furs > 10000 ) {
gamePage.craft('parchment', 10);
}
if ( manuscripts < 1000 && parchments > 1000 ) {
gamePage.craft('manuscript', 8);
}
if ( compediums < 1000 && manuscripts > 1000 ) {
gamePage.craft('compedium', 4);
}
if ( blueprints < 1000 && compediums > 1000 ) {
gamePage.craft('blueprint', 8);
}
var resources = [
["wood", "beam" ],
["minerals", "slab" ],
["coal", "steel"],
["iron", "plate"]
];
for (var i = 0; i < resources.length; i++){
var curRes = gamePage.resPool.get(resources[i][0]);
if (curRes.value / curRes.maxValue > 0.99 && gamePage.workshop.getCraft(resources[i][1]).unlocked) {
gamePage.craft(resources[i][1], 25);
}
}
var origTab = gamePage.activeTabId;
var faith = gamePage.resPool.get('faith');
if (faith.value / faith.maxValue > 0.99) {
gamePage.activeTabId = 'Religion';
gamePage.render();
$(".btnContent:contains('Praise the sun')").click();
gamePage.activeTabId = origTab;
gamePage.render();
}
$("#gameLog").find("input").click();
var catnip = gamePage.resPool.get('catnip');
var calendar = gamePage.calendar;
if ( (catnip.perTickUI > 0) && (catnip.value / catnip.maxValue > 0.99) && !(calendar.season == 2 && calendar.day >= 75) ) {
gamePage.craft('wood', 100);
}
}, 10000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment