Hacker News new | ask | show | jobs
by Hario 4731 days ago
Here's a way to check traps, gather wood, and stoke the fire separately:

var stoke = function(){if(!$('#stokeButton').hasClass('disabled')){$('#stokeButton').trigger('click')}}

var check = function(){if(!$("#trapsButton").hasClass('disabled')){$("#trapsButton").trigger('click')}}

var gather = function(){if(!$("#gatherButton").hasClass('disabled')){$("#gatherButton").trigger('click')}}

g = setInterval(gather, 1000) c = setInterval(check, 1000) s = setInterval(stoke, 60000)

2 comments

Was getting undefined errors with that..

This works:

function pushGather(){if(!$("#gatherButton").hasClass('disabled')){$("#gatherButton").trigger('click');}}setInterval(pushGather, 1000);

function pushCheck(){if(!$("#trapsButton").hasClass('disabled')){$("#trapsButton").trigger('click');}}setInterval(pushCheck, 1000);

function pushStoke(){if(!$("#stokeButton").hasClass('disabled')){$("#stokeButton").trigger('click');}}setInterval(pushStoke, 60000);

Here's a way to get the ship, max out the hull, launch and win:

    Ship.init();State.ship = {hull:10000, thrusters:10000};Ship.liftOff();
Dodging optional.