Created
July 6, 2015 20:47
-
-
Save edunham/1ed36769421ee87ce9ef to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
autoHunt = setInterval(function() { | |
var catpower = gamePage.resPool.get('manpower'); | |
if (catpower.value / catpower.maxValue > 0.5) { | |
$("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); | |
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); | |
starClick = setInterval(function() { $("#gameLog").find("input").click(); }, 2 * 1000); | |
autoCraft = setInterval(function() { | |
var resources = [ | |
["wood", "beam" ], | |
["minerals", "slab" ], | |
["coal", "steel"], | |
["iron", "steel"], | |
["titanium", "alloy"] | |
]; | |
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); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment