Last active
August 29, 2015 14:25
-
-
Save gigablah/0d1ac3754cbda0e0af9f to your computer and use it in GitHub Desktop.
Kittens game
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
var hunter = function () { | |
if ($("#fastHuntContainer a").css('visibility') == 'visible' && gamePage.resPool.resources[6].value < 500) { | |
console.log("Sending hunters..."); | |
$("#fastHuntContainer a").click(); | |
} | |
}; | |
var observer = function () { | |
if ($('#observeBtn').length > 0) { | |
console.log("Observing..."); | |
$('#observeBtn').click(); | |
} | |
}; | |
var crafter = function () { | |
console.log("Crafting..."); | |
crafts = [2, 3, 6]; | |
$('#craftContainer table tr:nth-child('+crafts[~~(Math.random() * crafts.length)]+') a:contains("all")')[0].click(); | |
}; | |
var trader = function () { | |
if (gamePage.resPool.resources[6].value > 500) { | |
console.log("Trading..."); | |
gamePage.diplomacyTab.racePanels[4].tradeBtn.tradeAllHref.link.click(); | |
} | |
}; | |
var intervals = {}; | |
intervals.hunter = setInterval(hunter, 10000); | |
//intervals.observer = setInterval(observer, 2000); | |
intervals.crafter = setInterval(crafter, 300000); | |
intervals.trader = setInterval(trader, 300000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment