Skip to content

Instantly share code, notes, and snippets.

@hevans90
Last active October 28, 2020 14:24
Show Gist options
  • Save hevans90/16a4e637980bbcf8fc385cff31b732da to your computer and use it in GitHub Desktop.
Save hevans90/16a4e637980bbcf8fc385cff31b732da to your computer and use it in GitHub Desktop.
kittens scripts
setInterval(() =>game.tick(), 0.1);
alloyCrafting = setInterval(() => {
gamePage.craftAll('alloy');
}, 1 * 1000);
autoHunt = setInterval(() => {
const catpower = gamePage.resPool.get('manpower');
if (catpower.value / catpower.maxValue > 0.95) {
$("span:contains('Send hunters')").click();
}
}, 1 * 1000);
autoDank = setInterval(() => {
$("span:contains('Praise')").click();
}, 1 * 1000);
autoLibrarian = setInterval(() => {
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'); }
}, 1 * 1000);
autoCatnip = setInterval(() => {
const catnip = gamePage.resPool.get('catnip');
const 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');
}, 1 * 1000);
autoCraft = setInterval(() => {
const resources = [
["wood", "beam" ],
["minerals", "slab" ],
["coal", "steel"],
["iron", "plate"],
["oil", "kerosene"],
["unobtainium", "eludium"],
["uranium", "thorium"],
];
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]);
}
}
}, 1 * 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment