Skip to content

Instantly share code, notes, and snippets.

@lakario
Last active February 22, 2021 22:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save lakario/7237037 to your computer and use it in GitHub Desktop.
Save lakario/7237037 to your computer and use it in GitHub Desktop.
Clicking bad cheat
var sell = function() {
window.sellInts = window.sellInts || [];
var sellInt = setInterval(function() {
if(parseInt($('#make_amt').text()) > 0) {
try {
$('#sell_btn').click()
} catch(e) { }
}
else {
clearInterval(sellInt);
return;
}
}, 10);
window.sellInts.push(sellInt);
};
var stopSell = function() {
for(var sellInt in window.sellInts) {
clearInterval(window.sellInts[sellInt]);
}
window.sellInts = [];
};
var cook = function() {
window.cookInts = window.cookInts || [];
window.cookInts.push(setInterval(function() {
try {
$('#make_btn').click();
} catch(e) { }
}, 10));
};
var stopCook = function() {
for(var cookInt in window.cookInts) {
clearInterval(window.cookInts[cookInt]);
}
window.cookInts = [];
};
var cleanUp = setInterval(function() {
$('.make_up').remove();
$('.sell_up').remove();
}, 1000);
/* ui */
$('#cbhelper').remove();
$('body').append('<div id="cbhelper" style="width:428px;color:#000;background:#ccc;border:1px solid black;position:fixed;bottom:10px;left:0px;height:45px;"> \
<div style="width:15px;background:red;float:right;height:45px;"></div> \
<div style="float:left;margin:0;padding:10px 5px;"> \
<button id="cbhelper-start-sell" style="background-color:#1c3;border:none;text-shadow:none;">Start Selling</button> \
<button id="cbhelper-stop-sell" style="background-color:#f00;border:none;text-shadow:none;">Stop Selling</button> \
<button id="cbhelper-start-cook" style="background-color:#39f;border:none;text-shadow:none;">Start Cooking</button> \
<button id="cbhelper-stop-cook" style="background-color:#f00;border:none;text-shadow:none;">Stop Cooking</button> \
</div> \
</div>');
$('#cbhelper').on('dblclick', function() {
var $this = $(this);
if (parseInt($this.css('left')) >= 0) {
$this.animate({'left': -1 * ($(this).width() - 10) + 'px'}, 'slow');
}
else {
$this.animate({'left': '0px'}, 'slow');
}
});
$('#cbhelper-start-sell').on('click', $.proxy(sell));
$('#cbhelper-stop-sell').on('click', $.proxy(stopSell));
$('#cbhelper-start-cook').on('click', $.proxy(cook));
$('#cbhelper-stop-cook').on('click', $.proxy(stopCook));
@lakario
Copy link
Author

lakario commented Nov 1, 2013

To start selling:

sell();

To stop selling:

stopSell();

To start cooking:

cook();

To stop cooking:

stopCook();

@khemikale
Copy link

Thanks for fueling my addiction!

@jam0645163871
Copy link

Nothing to preview

@jam0645163871
Copy link

Nothing to preview

@aikidoboy9
Copy link

thx love it good job 9/10

@aikidoboy9
Copy link

Thanks for fueling my addiction!

lol

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment