Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const lootboxItemOld = window.lootboxItem;
- var autoQuit = autoQuitCheckbox.attr('checked') ? 1 : 0;
- var sent = false;
- var loots = {
- want: [],
- not: [],
- must: []
- };
- window.lootboxItem = function(item) {
- lootboxItemOld(item);
- var stat = window.parseItemStat(item.stat);
- var limit = parseInt(filterInput.val());
- if (((isNaN(limit) || (item.pr >= limit)) && valueCheckbox.attr('checked')) || (item.stat.search(/ttl/) >= 0 && blessCheckbox.attr('checked')) || (item.stat.search(/quest/) >= 0) || (item.stat.search(/legendary/) >= 0 && legendaryCheckbox.attr('checked')) || (item.stat.search(/heroic/) >= 0 && heroicCheckbox.attr('checked')) || (item.stat.search(/unique/) >= 0 && uniqueCheckbox.attr('checked')) || ((item.stat.search(/fullheal/) >= 0 || item.stat.search(/leczy/) >= 0 || item.stat.search(/perheal/) >= 0) && mixCheckbox.attr('checked')) || (item.stat.search(/ammo/) >= 0 && arrowCheckbox.attr('checked')) || (item.stat.search(/gold/) >= 0 && goldCheckbox.attr('checked')) || (item.stat.search(/teleport/) >= 0 && tpCheckbox.attr('checked')) || (item.stat.search(/runes/) >= 0 && runesCheckbox.attr('checked'))) {
- if (window.g.party && !(window.isset(stat.reqp) && stat.reqp.indexOf(window.hero.prof) == -1)) {
- loots.must.push(item.id);
- window.setStateOnOneLootItem(item.id, 2);
- } else {
- loots.want.push(item.id)
- window.setStateOnOneLootItem(item.id, 1);
- }
- } else {
- loots.not.push(item.id);
- window.setStateOnOneLootItem(item.id, 0);
- }
- if (!sent) {
- sent = true;
- setTimeout(function() {
- window._g("loot&want=" + loots.want.join(",") + "¬=" + loots.not.join(",") + "&must=" + loots.must.join(",") + "&final=" + autoQuit);
- if (autoQuit) window.closeLootWindow();
- sent = false;
- loots = {
- want: [],
- not: [],
- must: []
- };
- }, 300);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement