|
|
|
|
|
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) |
|
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);