Skip to content

Instantly share code, notes, and snippets.

@mathuin
Created June 21, 2015 23:25
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 mathuin/27b8d3d3515158686f3e to your computer and use it in GitHub Desktop.
Save mathuin/27b8d3d3515158686f3e to your computer and use it in GitHub Desktop.
Kittens Game Current Scripts
starClick = setInterval(function() { $("#gameLog").find("input").click(); }, 2 * 1000);
autoCatnip = setInterval(function() {
var catnip = gamePage.resPool.get('catnip');
var calendar = gamePage.calendar;
// Only run if positive catnip and not in last half of Autumn
if (catnip.perTickUI < 0) { return; }
if (catnip.value / catnip.maxValue < 0.95) { return; }
if (calendar.season == 2 && calendar.day > 50) { return; }
gamePage.craftAll('wood');
}, 5 * 1000);
autoHunt = setInterval(function() {
var catpower = gamePage.resPool.get('manpower');
if (catpower.value / catpower.maxValue > 0.95) {
$("a:contains('Send hunters')").click();
if (gamePage.workshop.getCraft('parchment').unlocked) { gamePage.craftAll('parchment'); }
// if (gamePage.workshop.getCraft('manuscript').unlocked) { gamePage.craftAll('manuscript'); }
// if (gamePage.workshop.getCraft('compedium').unlocked) { gamePage.craftAll('compedium'); }
// if (gamePage.workshop.getCraft('blueprint').unlocked) { gamePage.craftAll('blueprint'); }
}
}, 5 * 1000);
autoCraft = setInterval(function() {
var resources = [
["wood", "beam" ],
["minerals", "slab" ],
["coal", "steel"],
["iron", "steel"] // was "plate"
];
for (var i = 0; i < resources.length; i++) {
var curRes = gamePage.resPool.get(resources[i][0]);
if (curRes.value / curRes.maxValue > 0.95
&& gamePage.workshop.getCraft(resources[i][1]).unlocked) {
gamePage.craftAll(resources[i][1]);
}
}
}, 5 * 1000);
autoPray = setInterval(function() {
var origTab = gamePage.activeTabId;
var faith = gamePage.resPool.get('faith');
if (faith.value / faith.maxValue > 0.95) {
gamePage.activeTabId = 'Religion'; gamePage.render();
$(".btnContent:contains('Praise the sun')").click();
gamePage.activeTabId = origTab; gamePage.render();
}
}, 10 * 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment