Free javascript Hosting


farmrpg-helpers.js

Uploaded on Sep 29 2021 20:43 by hello

window.frpg = (function() {

function bulkFishing(pageEl) {
var page = pageEl.data('page');

if(page === 'fishing') {
var fishingEl = $('.fishcaught');
var baitEl = pageEl.find('.col-40 strong');
var bait = Number(baitEl.text());

for(var i=1; i<=bait; i++){
fishingEl.click();
}

alert('bulk fishing with: '+ bait +' bait');

$('.modal-button').click();
}
}

function bulkExplore(pageEl) {
var page = pageEl.data('page');

if(page === 'area') {
var exploreEl = pageEl.find('.explorebtn');
var staminaEl = pageEl.find('#stamina');
var stamina = Number(staminaEl.text());

for(var i=1; i<=stamina; i++){
exploreEl[0].click();
}

alert('bulk explore with: '+ stamina +' stamina');

$('#homebtn')[0].click();
}
}

var init = function() {
$('#bottom').on('click', function(e) {
if($(e.target).is('#homebtn')) {
return;
}

var page = $('.page.page-on-center');


bulkFishing(page);
bulkExplore(page);
});
}

// Public API
return { init };
})();

Back to list