Last active
April 16, 2022 23:07
-
-
Save lingsamuel/dc8faaeb7a1e630aa17eabd6a1344300 to your computer and use it in GitHub Desktop.
Kittens Game (zh) automation, theme Grey
This file contains 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
starClick = setInterval(function() { $("#observeBtn").click(); }, 2 * 1000); | |
autoCraft = setInterval(function() { | |
craftable = res=>(res.value / res.maxValue) > 0.95; | |
// 炼木梁 | |
resWood = gamePage.resPool.get('wood') | |
if(craftable(resWood)) { | |
gamePage.craftAll('beam'); | |
} | |
// 炼石板 | |
resMine = gamePage.resPool.get('minerals') | |
if(craftable(resMine)) { | |
gamePage.craftAll('slab'); | |
} | |
// 炼钢,多余的铁炼金属板 | |
resCoal = gamePage.resPool.get('coal') | |
resIron = gamePage.resPool.get('iron') | |
if(craftable(resCoal)) { | |
gamePage.craftAll('steel'); | |
gamePage.craftAll('plate'); | |
} | |
if(craftable(resIron)) { | |
gamePage.craftAll('plate'); | |
} | |
// 炼木 | |
var catnip = gamePage.resPool.get('catnip'); | |
var calendar = gamePage.calendar; | |
if (catnip.perTickUI < 0) { return; } | |
if (calendar.season == 3) { return; } | |
if (craftable(catnip)) { | |
gamePage.craft('wood', 100); | |
} | |
}, 5 * 1000); | |
autoHunt = setInterval(function() { | |
var catpower = gamePage.resPool.get('manpower'); | |
if (catpower.value / catpower.maxValue > 0.95) { | |
$("a:contains('派出猎人')")[0].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); | |
autoUpgrade = setInterval(function() { | |
$(".btnContent:contains('研究院')")[0]?.click(); | |
$(".btnContent:contains('图书馆')")[0]?.click(); | |
$(".btnContent:contains('剧场')")[0]?.click(); | |
$(".btnContent:contains('水渠')")[0]?.click(); | |
$(".btnContent:contains('工坊')")[0]?.click(); | |
$(".btnContent:contains('交易所')")[0]?.click(); | |
$(".btnContent:contains('独角兽牧场')")[0]?.click(); | |
}, 5 * 1000); | |
autoPraise = setInterval(function() { | |
if (gamePage.resPool.get('faith').value / gamePage.resPool.get('faith').maxValue > 0.95 ) { | |
gamePage.religion.praise(); | |
} | |
}, 5 * 1000); | |
autoPromote = setInterval(function() { | |
if (gamePage.resPool.get('gold').value > 10 ) { | |
gamePage.village.promoteKittens() | |
} | |
}, 15 * 1000); | |
// |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment