NOTICE: By continued use of this site you understand and agree to the binding Terms of Service and Privacy Policy.
// ==UserScript== // @name TheCrims_rabunki // @namespace thecrims.js // @include http://*.thecrims.com/bcefecdbeee // @license GPL-2.0 // @version 1 // @grant none // ==/UserScript== var interval = -1; function robbery(input, min_health) { var health = parseInt($('[ng-bind="user.stamina"]').text()); if(health >= min_health) { input.removeAttr('disabled'); input.prop('disabled', false); input.click(); setTimeout(robbery, 1500, input, min_health); } else { location.href = '/dabdefbeeaaede'; } } function check_robbery() { var input = $('input[value="Zr�b to!"]'); var form = input.parents('form').eq(0); var select = form.find('select'); var options = select.find('option'); if(options.length > 1) { clearInterval(interval); var max_dmg_val = 0; var min_health = 0; options.each(function() { var name = $(this).text(); var matches = name.match(/.* \- ([0-9]+)%.*?SP: ([0-9]+)%/); if(matches && parseInt(matches[2]) === 100) { max_dmg_val = $(this).attr('value'); min_health = parseInt(matches[1]); } }); select.val(max_dmg_val).trigger('change'); setTimeout(robbery, 500, input, min_health); } } interval = setInterval(check_robbery, 100);