').append(il)
+ // VAULTORDER is now a simple sequential array [1, 2, ..., num_vaults]
+ // 'index' is the 0-based index of the actual vault being rendered.
+ return $('
').append(il);
}
- // select the vault order for this char
- vaultlayout = (this.opt('vaultlayout') && setuptools.data.muledump.vaultbuilder.layouts[this.opt('vaultlayout')]) ? this.opt('vaultlayout') : setuptools.data.options.vaultlayout;
- vaultwidth = (
- typeof setuptools.data.muledump.vaultbuilder.layouts[vaultlayout] === 'object' &&
- setuptools.data.muledump.vaultbuilder.layouts[vaultlayout].vaultwidth
- ) ? setuptools.data.muledump.vaultbuilder.layouts[vaultlayout].vaultwidth : ROW;
- VAULTORDER = setuptools.data.muledump.vaultbuilder.layouts[vaultlayout] ? setuptools.data.muledump.vaultbuilder.layouts[vaultlayout].vaultorder : vaultorders[0];
+ // Removed vaultlayout selection from options and vaultbuilder
+ // Vault width is determined by currentMuleEffectiveROW
+ var maxVaultWidthForThisMule = currentMuleEffectiveROW;
+
+ // VAULTORDER will be populated based on actual chests later.
+ // Global VAULTORDER is used by makechest.
// vaults
- var chests;
+ var chests_for_counting; // Renamed to avoid conflict if 'chests' is used later for display data
if (d.Account.Vault && this.totals.cache === false) {
// counting for totals
- chests = d.Account.Vault ? d.Account.Vault.Chest || ['-1'] : ['-1'];
- if (typeof chests === 'string') chests = [chests];
- if (typeof chests === 'object' && Object.keys(chests).length === 0) chests = ['-1'];
- if (Array.isArray(chests) === false) {
- setuptools.app.techlog('Mule ' + this.guid + ' encountered bad chest data');
- setuptools.app.techlog(chests);
- chests = ['-1'];
- }
- for (var tv = 0; tv < chests.length; tv++) {
+ chests_for_counting = d.Account.Vault ? d.Account.Vault.Chest || ['-1'] : ['-1'];
+ if (typeof chests_for_counting === 'string') chests_for_counting = [chests_for_counting];
+ if (typeof chests_for_counting === 'object' && !Array.isArray(chests_for_counting) && Object.keys(chests_for_counting).length === 0) chests_for_counting = ['-1'];
+ if (Array.isArray(chests_for_counting) && chests_for_counting.length === 0) chests_for_counting = ['-1'];
+
+
+ for (var tv = 0; tv < chests_for_counting.length; tv++) {
- if (chests[tv] === 0) continue;
- if (typeof chests[tv] !== 'string') chests[tv] = '-1';
- if (chest = chests[tv].split(','))
- for (var tv2 = 0; tv2 < 8; tv2++)
- this.totals.count(chest[tv2] || '-1', 'vaults');
+ if (chests_for_counting[tv] === 0) continue; // Should not happen with string arrays
+ if (typeof chests_for_counting[tv] !== 'string') chests_for_counting[tv] = '-1';
+ var chest_items_for_counting = chests_for_counting[tv].split(',');
+ for (var tv2 = 0; tv2 < 8; tv2++)
+ this.totals.count(chest_items_for_counting[tv2] || '-1', 'vaults');
}
}
@@ -2060,41 +2294,138 @@
if (setuptools.data.config.debugging === true) setuptools.app.uaTiming('mule', 'parseVaults', 'start', this.guid, false, setuptools.app.uaTimingAggregate);
if (this.loginOnly === false && !this.opt('shrink')) this.dom.append($('
'));
- if (!chests) {
+ var displayChestsData = d.Account.Vault ? (d.Account.Vault.Chest || ['-1']) : ['-1'];
+ if (typeof displayChestsData === 'string') {
+ displayChestsData = [displayChestsData];
+ } else if (typeof displayChestsData === 'object' && !Array.isArray(displayChestsData) && Object.keys(displayChestsData).length === 0) {
+ displayChestsData = ['-1'];
+ } else if (Array.isArray(displayChestsData) && displayChestsData.length === 0 ) {
+ displayChestsData = ['-1'];
+ }
+ // At this point, displayChestsData is an array of strings, each string representing one vault's contents.
+ // e.g., ["vault1items", "vault2items"] or ["-1"] for one empty vault.
+ // If displayChestsData is ["-1"] and it truly means no vaults, its length is 1.
+ // However, if Account.Vault.Chest is undefined, it becomes ['-1'], meaning one (empty) vault placeholder.
+
+ // Populate global VAULTORDER for makechest's data-vaultId attribute
+ VAULTORDER = [];
+ // displayChestsData contains one string per vault. If it's ["-1"] from no vault, length is 1.
+ // This means it will generate VAULTORDER = [1] for a single placeholder empty vault.
+ for (var i = 0; i < displayChestsData.length; i++) {
+ // If displayChestsData is ["-1"] and it represents the *absence* of any vaults (e.g. API returns nothing for Vault.Chest)
+ // then we should not create a VAULTORDER entry.
+ // However, the current logic makes displayChestsData = ['-1'] if Vault.Chest is undefined or empty.
+ // This implies one empty vault is always shown. If that's the desired behavior:
+ if (displayChestsData.length === 1 && displayChestsData[0] === '-1') {
+ // Check if this '-1' truly represents an empty vault or absence of vaults.
+ // For simplicity, assume ['-1'] means one empty vault slot.
+ VAULTORDER.push(1);
+ } else {
+ VAULTORDER.push(i + 1); // Vault IDs are 1-indexed
+ }
+ }
+ if (displayChestsData.length === 1 && displayChestsData[0] === "-1" && VAULTORDER.length === 0) {
+ // ensure if displayChestsData is just ["-1"] (one empty vault), VAULTORDER is [1]
+ VAULTORDER = [1];
+ }
- chests = d.Account.Vault ? d.Account.Vault.Chest || ['-1'] : ['-1'];
- if (typeof chests === 'string') chests = [chests];
- if (typeof chests === 'object' && Object.keys(chests).length === 0) chests = ['-1'];
+ var w_arranged = arrangevaults(displayChestsData, maxVaultWidthForThisMule);
+ var arranged_chests_items_data = w_arranged[1]; // Array of chest data strings or nulls
+ var actual_vault_cols = w_arranged[0];
+ var arr_vaults = []; // Holds jQuery objects (rendered chests) or nulls
+
+ var currentVaultOriginalIdIndex = 0; // 0-based index for actual vaults encountered
+ for (var x = 0; x < arranged_chests_items_data.length; x++) {
+ var chest_data_string = arranged_chests_items_data[x];
+ if (chest_data_string !== null) {
+ // This is an actual vault (data string, could be empty items like "-1,-1...")
+ var chest_content_array = (chest_data_string || '-1').split(',');
+ while (chest_content_array.length < 8) chest_content_array.push('-1');
+
+ arr_vaults.push(makechest(chest_content_array, 'vaults', currentVaultOriginalIdIndex));
+ currentVaultOriginalIdIndex++;
+ } else {
+ // This is a spacer from arrangevaults padding
+ arr_vaults.push(null);
+ }
}
- var w = arrangevaults(chests, vaultlayout);
- chests = w[1];
- for (var x = 0; x < chests.length; x++) {
- // non-existent chests are skipped
- if (typeof chests[x] !== "string") {
+ if (this.loginOnly === false && !this.opt('shrink') && arr_vaults.length > 0) {
+ if (actual_vault_cols > 0 || arr_vaults.some(item => item !== null)) {
+ maketable('vaults', arr_vaults, actual_vault_cols).appendTo(this.dom);
+ }
+ }
+ if (setuptools.data.config.debugging === true) setuptools.app.uaTiming('mule', 'parseVaults', 'stop', this.guid);
- // this is a spacer
- if (chests[x] === 0) {
+ }
- arr.push(null);
- continue;
+ // materialschest counting for totals
+ if (!(d.Account.MaterialStorage === undefined)) {
- }
+ var materials;
+ if (d.Account && d.Account.MaterialStorage && d.Account.MaterialStorage.Chest) {
+ if (Array.isArray(d.Account.MaterialStorage.Chest)) {
+ // If the chest is an array, join its elements
+ materials = d.Account.MaterialStorage.Chest.join(',');
+ } else {
+ // If the chest is not an array, assign it directly
+ materials = d.Account.MaterialStorage.Chest;
+ }
+ } else {
+ // Handle the case when Account or MaterialStorage or Chest is undefined
+ materials = ''; // or whatever default value you want to assign
+ }
- // empty chests are empty
- if (typeof chests[x] === 'object') chests[x] = '-1,-1,-1,-1,-1,-1,-1,-1';
+ var items = (typeof materials === 'string') ? materials.split(',').reverse() : undefined;
+ if (Array.isArray(items) === true && this.totals.cache === false) {
+ for (var tg = 0; tg < items.length; tg++)
+ this.totals.count(items[tg], 'materials');
+ }
+ }
- }
+ // display materialschest
+ if (this.opt('materials') && !(d.Account.MaterialStorage === undefined)) {
- var chest = (chests[x] || '-1').split(',');
- while (chest.length < 8) chest.push('-1');
- arr.push(makechest(chest, 'vaults', x));
+ if (setuptools.data.config.debugging === true) setuptools.app.uaTiming('mule', 'parseMaterials', 'start', this.guid, false, setuptools.app.uaTimingAggregate);
+ if (this.loginOnly === false && !this.opt('shrink')) this.dom.append($('
'));
+ if (Array.isArray(items) === true) {
+ var marr = [];
+ while (items.length) {
+ while (items.length < 8) items.push("-1");
+ marr.push(makechest(items, 'materials'));
+ items = items.slice(8);
+ }
+ if (this.loginOnly === false && !this.opt('shrink')) maketable('materials', marr, ((setuptools.data.config.giftChestWidth === 0) ? currentMuleEffectiveROW : setuptools.data.config.giftChestWidth)).appendTo(this.dom);
}
+ if (setuptools.data.config.debugging === true) setuptools.app.uaTiming('mule', 'parseMaterials', 'stop', this.guid);
- if (this.loginOnly === false && !this.opt('shrink')) maketable('vaults', arr, w[0]).appendTo(this.dom);
- if (setuptools.data.config.debugging === true) setuptools.app.uaTiming('mule', 'parseVaults', 'stop', this.guid);
+ }
+
+ // ssnlspoils counting for totals
+ var spoils = d.Account.TemporaryGifts;
+ var items = (typeof spoils === 'string') ? spoils.split(',').reverse() : undefined;
+ if (Array.isArray(items) === true && this.totals.cache === false) {
+ for (var tg = 0; tg < items.length; tg++)
+ this.totals.count(items[tg], 'spoils');
+ }
+
+ // display ssnlspoils
+ if (this.opt('spoils')) {
+
+ if (setuptools.data.config.debugging === true) setuptools.app.uaTiming('mule', 'parseSpoils', 'start', this.guid, false, setuptools.app.uaTimingAggregate);
+ if (this.loginOnly === false && !this.opt('shrink')) this.dom.append($('
'));
+ if (Array.isArray(items) === true) {
+
+ var sarr = [];
+ while (items.length) {
+ sarr.push(makechest(items, 'spoils'));
+ items = items.slice(8);
+ }
+ if (this.loginOnly === false && !this.opt('shrink')) maketable('spoils', sarr, ((setuptools.data.config.giftChestWidth === 0) ? currentMuleEffectiveROW : setuptools.data.config.giftChestWidth)).appendTo(this.dom);
+ }
+ if (setuptools.data.config.debugging === true) setuptools.app.uaTiming('mule', 'parseSpoils', 'stop', this.guid);
}
@@ -2153,6 +2484,73 @@
}
+ // ssnlpetinv couting for totals
+ var ssnlpetinv;
+ if (!(d.Char === undefined)) {
+ for (let index = 0; index < d.Char.length; index++)
+ {
+ if(d.Char[index].Seasonal === "True" && d.Char[index].Pet !== undefined && d.Char[index].Pet.inv !== undefined)
+ ssnlpetinv = d.Char[index].Pet.inv.split(';')[2];
+ }
+
+ var items = (typeof ssnlpetinv === 'string') ? ssnlpetinv.split(',').reverse() : undefined;
+ if (Array.isArray(items) === true && this.totals.cache === false) {
+ for (var tg = 0; tg < items.length; tg++)
+ this.totals.count(items[tg], 'ssnlpetinv');
+ }
+ }
+
+ // display ssnlpetinv
+ if (this.opt('ssnlpetinv') && !(d.Char === undefined)) {
+
+ if (setuptools.data.config.debugging === true) setuptools.app.uaTiming('mule', 'parseSsnlpetinv', 'start', this.guid, false, setuptools.app.uaTimingAggregate);
+ if (this.loginOnly === false && !this.opt('shrink')) this.dom.append($('
'));
+ if (Array.isArray(items) === true) {
+
+ var sarr = [];
+ while (items.length) {
+ sarr.push(makechest(items, 'ssnlpetinv'));
+ items = items.slice(8);
+ }
+ if (this.loginOnly === false && !this.opt('shrink')) maketable('ssnlpetinv', sarr, ((setuptools.data.config.giftChestWidth === 0) ? currentMuleEffectiveROW : setuptools.data.config.giftChestWidth)).appendTo(this.dom);
+ }
+ if (setuptools.data.config.debugging === true) setuptools.app.uaTiming('mule', 'parseSsnlpetinv', 'stop', this.guid);
+
+ }
+
+ // petinv couting for totals
+ var petinv;
+ if (!(d.Char === undefined)){
+ for (let index = 0; index < d.Char.length; index++)
+ if(d.Char[index].Seasonal === "False" && d.Char[index].Pet !== undefined && d.Char[index].Pet.inv !== undefined)
+ petinv = d.Char[index].Pet.inv.split(';')[2];
+
+ var items = (typeof petinv === 'string') ? petinv.split(',').reverse() : undefined;
+ if (Array.isArray(items) === true && this.totals.cache === false) {
+ for (var tg = 0; tg < items.length; tg++)
+ this.totals.count(items[tg], 'petinv');
+ }
+ }
+
+ // display petinv
+ if (this.opt('petinv') && !(d.Char === undefined)) {
+
+ if (setuptools.data.config.debugging === true) setuptools.app.uaTiming('mule', 'parsePetinv', 'start', this.guid, false, setuptools.app.uaTimingAggregate);
+ if (this.loginOnly === false && !this.opt('shrink')) this.dom.append($('
'));
+ if (Array.isArray(items) === true) {
+
+ var sarr = [];
+ while (items.length) {
+ sarr.push(makechest(items, 'petinv'));
+ items = items.slice(8);
+ }
+ if (this.loginOnly === false && !this.opt('shrink')) maketable('petinv', sarr, ((setuptools.data.config.giftChestWidth === 0) ? currentMuleEffectiveROW : setuptools.data.config.giftChestWidth)).appendTo(this.dom);
+ }
+ if (setuptools.data.config.debugging === true) setuptools.app.uaTiming('mule', 'parsePetinv', 'stop', this.guid);
+
+ }
+
+
// gift chests counting for totals
var gifts = d.Account.Gifts;
var items = (typeof gifts === 'string') ? gifts.split(',').reverse() : undefined;
@@ -2166,18 +2564,21 @@
if (setuptools.data.config.debugging === true) setuptools.app.uaTiming('mule', 'parseGifts', 'start', this.guid, false, setuptools.app.uaTimingAggregate);
if (this.loginOnly === false && !this.opt('shrink')) this.dom.append($('
'));
- if (Array.isArray(items) === true) {
+ if (Array.isArray(items) === true) { // items here refers to gifts
var garr = [];
while (items.length) {
- while (items.length < 8) items.push("-1");
- garr.push(makechest(items, 'gifts'));
- items = items.slice(8);
- }
- if (this.loginOnly === false && !this.opt('shrink')) maketable('gifts', garr, ((setuptools.data.config.giftChestWidth === 0) ? setuptools.data.config.rowlength : setuptools.data.config.giftChestWidth)).appendTo(this.dom);
+ // The makechest function itself doesn't take a width,
+ // it's assumed to be a single chest's content.
+ // The width is applied by maketable to the array of chests.
+ while (items.length < 8) items.push("-1"); // Ensure items has 8 elements for makechest
+ garr.push(makechest(items.slice(0, 8), 'gifts')); // makechest takes first 8
+ items = items.slice(8); // Prepare for next chest
+ }
+ // Apply the new logic to the maketable call for gifts
+ if (this.loginOnly === false && !this.opt('shrink')) maketable('gifts', garr, ((setuptools.data.config.giftChestWidth === 0) ? currentMuleEffectiveROW : setuptools.data.config.giftChestWidth)).appendTo(this.dom);
}
if (setuptools.data.config.debugging === true) setuptools.app.uaTiming('mule', 'parseGifts', 'stop', this.guid);
-
}
setuptools.app.uaTiming('mule', 'parse', 'stop', this.guid);
@@ -2233,4 +2634,4 @@
window.Mule = Mule
-})($, window);
+})($, window);
\ No newline at end of file
diff --git a/lib/muledump/muledump.js b/lib/muledump/muledump.js
index c2689c8f..8faf0916 100644
--- a/lib/muledump/muledump.js
+++ b/lib/muledump/muledump.js
@@ -49,7 +49,7 @@ setuptools.app.mulecrypt.init(function() {
// update Muledump intro
if ( setuptools.state.preview === false ) {
- $('#intro > .version').html('Jakcodex [BR Update] / Muledump ' + ( ( setuptools.state.hosted === false ) ? 'Local' : 'Online' ) + '
v' + setuptools.version.major + '.' + setuptools.version.minor + '.' + setuptools.version.patch + ' ');
+ $('#intro > .version').html('Jakcodex BR Update - TadusMod / Muledump ' + ( ( setuptools.state.hosted === false ) ? 'Local' : 'Online' ) + '
v' + setuptools.version.major + '.' + setuptools.version.minor + '.' + setuptools.version.patch + ' ');
} else {
$('#intro > .version').text('Muledump is Ready');
}
@@ -94,8 +94,6 @@ setuptools.app.mulecrypt.init(function() {
setuptools.app.upgrade.version();
}
- $('#vaultbuilderButton').on('click.vaultbuilderButton', setuptools.app.muledump.vaultbuilder.ui);
-
var modes = ['account', 'items'];
$('#pagesearchButton > div').addClass(modes[setuptools.data.config.pagesearchMode]);
@@ -158,11 +156,22 @@ setuptools.app.mulecrypt.init(function() {
function relayout(doTotals) {
if (mtimer) return;
mtimer = setTimeout(function (doTotals) {
+ // ADD THIS CALL to ensure stageWidth is calculated during relayout
+ if (typeof setuptools === 'object' &&
+ typeof setuptools.app === 'object' &&
+ typeof setuptools.app.muledump === 'object' &&
+ typeof setuptools.app.muledump.stageWidth === 'function' &&
+ typeof window.stage !== 'undefined') {
+ setuptools.app.muledump.stageWidth(window.stage);
+ }
+
if ( doTotals !== false ) {
window.update_totals();
window.update_filter();
}
- if (!window.nomasonry) setuptools.tmp.masonry.layout();
+ if (!window.nomasonry && setuptools.tmp.masonry) { // Ensure masonry object exists
+ setuptools.tmp.masonry.layout();
+ }
mtimer = 0;
}, 0, doTotals);
}
diff --git a/lib/muledump/options.js b/lib/muledump/options.js
index b7d4bedd..11b213e8 100644
--- a/lib/muledump/options.js
+++ b/lib/muledump/options.js
@@ -10,13 +10,16 @@
equipment: true,
hpmp: true,
inv: true,
+ petinv: true,
+ ssnlpetinv: true,
vaults: true,
- vaultlayout: '0',
+ spoils: true,
+ materials: true,
stats: true,
classstats: false,
sttype: 'base',
- pcstats: true,
- goals: true,
+ pcstats: false,
+ goals: false,
backpack: true,
potions: true,
gifts: false,
@@ -43,10 +46,6 @@
var optionsCopy = JSON.parse(JSON.stringify(options));
// generate our list of available vault layouts from the default list
- var AvailableVaultLayouts = {};
- for ( var i = 0; i < window.vaultorders.length; i++ )
- AvailableVaultLayouts[i] = window.vaultorders[i].layoutname;
-
var options_layout = {
'email': 'Email',
'accountName': 'Account Name',
@@ -57,14 +56,15 @@
'radio': ['chsort', {0: 'ID', 1: 'Base Fame', 2: 'Total Fame', 3: 'Base Exp', 4: 'Class', 5: 'Active Time', 6: 'Maxed Stats', 100: 'Custom'}] //7: 'Character Value',
},
'equipment': 'Equipment',
- 'hpmp': 'HP/MP Pots',
+ 'hpmp': 'Quickslots',
'inv': 'Inventory',
'backpack': 'Backpacks',
- 'vaults': {
- 'label': 'Vaults',
- 'radio': ['vaultlayout', AvailableVaultLayouts]
- },
+ 'vaults': 'Vaults',
'potions': 'Potion Storage',
+ 'petinv': 'Pet Inventory',
+ 'ssnlpetinv': 'SSNL Pet Inventory',
+ 'spoils': 'SSNL Spoils',
+ 'materials': 'Material Storage',
'gifts': 'Gift Chests',
'stats': {
'label': 'Character Stats',
@@ -77,13 +77,12 @@
},
'classstats': 'Class Stats',
'pcstats': 'Additional Stats',
- 'goals': 'Achievement Progress',
- 'wawawa': 'Wawawa\'s Progress Tracker',
+ 'goals': 'Achievement progress',
'shrink': 'Shrink Mules',
};
var globalopts = { 'totals': 1, 'famefilter': 1, 'feedfilter': 1, 'sbfilter': 1, 'nonsbfilter': 1, 'utfilter': 1, 'stfilter': 1, 'wbfilter': 1 };
- var hiddenopts = { 'sttype': 1, 'fameamount': 1, 'feedpower': 1, 'vaultlayout': 1, 'chsort': 1, 'chsortchoice': 1, 'vaults': 1};
+ var hiddenopts = { 'sttype': 1, 'fameamount': 1, 'feedpower': 1, 'chsort': 1, 'chsortchoice': 1, 'vaults': 1};
function gen_option(o, $targ, guid) {
var opt = options_layout[o];
@@ -181,9 +180,6 @@
// update everything with single option
function option_updated(o) {
- // update vault layout option
- if ( o === 'vaultlayout' ) window.vaultlayout = options.vaultlayout;
-
// update totals display on/off
if (o === 'totals') {
$('#totals').toggle(!!options.totals);
diff --git a/lib/muledump/pcstats.js b/lib/muledump/pcstats.js
index e8a60d58..291bad9d 100644
--- a/lib/muledump/pcstats.js
+++ b/lib/muledump/pcstats.js
@@ -1,206 +1,2369 @@
-var pcstatnames = {
- 0: 'Shots',
- 1: 'Damaging Shots',
- 2: 'Ability Uses',
- 3: 'Tiles Uncovered',
+var STATTAGS = 'MaxHitPoints MaxMagicPoints Attack Defense Speed Dexterity HpRegen MpRegen'.split(' ');
+var pcstats = {
+ 0: 'Shots fired',
+ 1: 'Hits',
+ 2: 'Ability uses',
+ 3: 'Tiles discovered',
4: 'Teleports',
- 5: 'Potions Drunk',
- 6: 'Monster Kills',
- 7: 'Monster Assists',
- 8: 'God Kills',
- 9: 'God Assists',
- 10: 'Cube Kills',
- 11: 'Oryx Kills',
- 12: 'Quests Completed',
+ 5: 'Potions drunk',
+ 6: 'Kills',
+ 7: 'Assists',
+ 8: 'God kills',
+ 9: 'Assists against Gods',
+ 10: 'Cube kills',
+ 11: 'Oryx kills',
+ 12: 'Quests completed',
13: 'Pirate Caves',
14: 'Undead Lairs',
15: 'Abyss of Demons',
16: 'Snake Pits',
17: 'Spider Dens',
- 18: 'Sprites',
- 19: 'Level Up Assists',
- 20: 'Minutes Active',
- 21: 'Tombs',
- 22: 'Trenches',
- 23: 'Jungles',
- 24: 'Manors',
+ 18: 'Sprite Worlds',
+ 20: 'Minutes active',
+ 21: 'Tomb of the Ancients',
+ 22: 'Ocean Trenches',
+ 23: 'Forbidden Jungles',
+ 24: 'Manor of the Immortals',
25: 'Forest Mazes',
- 26: 'LODs',
- 27: 'Candylands',
- 28: 'Cemeteries',
- 29: 'Cave of Treasure',
+ 26: 'Lair of Draconis',
+ 27: 'Candyland Hunting Grounds',
+ 28: 'Haunted Cemeteries',
+ 29: 'Cave of A Thousand Treasures',
30: 'Mad Labs',
- 31: 'Lockers',
- //32,
- //33,
+ 31: 'Davy Jones\' Lockers',
34: 'Ice Caves',
- 35: 'Docks',
- 36: 'Depths',
- 37: 'Labyrinths',
- 38: 'Battle For Nexus',
- 39: 'Shatters',
- 40: 'Belladonna',
- 41: 'Theatres',
- 42: 'Sewers',
- 43: 'Hives',
- 44: 'Mountain Temples',
- 45: 'Nests',
- 46: 'Hard LODs',
+ 35: 'Deadwater Docks',
+ 36: 'The Crawling Depths',
+ 37: 'Woodland Labyrinths',
+ 38: 'Battle for the Nexus',
+ 39: 'The Shatters',
+ 40: 'Belladonna\'s Garden',
+ 41: 'Puppet Master\'s Theatre',
+ 42: 'Toxic Sewers',
+ 43: 'The Hive',
+ 44: 'Mountain Temple',
+ 45: 'The Nest',
47: 'Lost Halls',
48: 'Cultist Hideouts',
- 49: 'Voids',
- 50: 'Encores',
- 51: 'Shaitans',
- 52: 'Chambers',
+ 49: 'The Void',
+ 50: 'Puppet Master\'s Encore',
+ 51: 'Lair of Shaitan',
+ 52: 'Parasite Chambers',
53: 'Magic Woods',
- 54: 'Reefs',
- 55: 'Thickets',
- 56: 'Libraries',
- 57: 'Fungal Caverns',
- 58: 'Crystal Caverns',
- 59: 'Ancient Ruins'
+ 54: 'Cnidarian Reef',
+ 55: 'Secluded Thicket',
+ 56: 'Cursed Library',
+ 57: 'Fungal Cavern',
+ 58: 'Crystal Cavern',
+ 59: 'Ancient Ruins',
+ 60: 'Dungeon types',
+ 61: 'Forax',
+ 62: 'Heroic Abyss of Demons',
+ 63: 'Heroic Undead Lair',
+ 64: 'High Tech Terror',
+ 65: 'Ice Tomb',
+ 66: 'Katalund',
+ 67: 'Mad God Mayhems',
+ 68: 'Malogia',
+ 69: 'Oryx\'s Castle',
+ 70: 'Oryx\'s Chamber',
+ 71: 'Oryx\'s Sanctuary',
+ 72: 'Rainbow Road',
+ 73: 'Santa Workshop',
+ 74: 'The Machine',
+ 75: 'Untaris',
+ 76: 'Wine Cellar',
+ 77: 'Party level-ups',
+ 78: 'Lesser Gods kills',
+ 79: 'Encounter kills',
+ 80: 'Hero kills',
+ 82: 'Critter kills',
+ 83: 'Beast kills',
+ 84: 'Humanoid kills',
+ 85: 'Undead kills',
+ 86: 'Nature kills',
+ 87: 'Construct kills',
+ 88: 'Grotesque kills',
+ 89: 'Structure kills',
+ 90: 'The Third Dimension',
+ 91: 'Beachzone',
+ 92: 'Hidden Interregnum',
+ 93: 'Sulfurous Wetlands',
+ 94: 'Kogbold Steamworks',
+ 95: 'Moonlight Village',
+ 96: 'Advanced Kogbold Steamworks',
+ 97: 'Advanced Nest',
+ 98: 'The Tavern',
+ 99: 'Queen Bunny Chamber',
+ 100: 'Stat Potions consumed',
};
+var shortpcstats = {
+ 13: 'pcave',
+ 14: 'udl',
+ 15: 'abby',
+ 16: 'snake',
+ 17: 'spider',
+ 18: 'sprite',
+ 21: 'tomb',
+ 22: 'ot',
+ 23: 'jungle',
+ 24: 'manor',
+ 25: 'forest',
+ 26: 'lod',
+ 27: 'cland',
+ 28: 'cem',
+ 29: 'tcave',
+ 30: 'lab',
+ 31: 'davy',
+ 34: 'Ice Caves',
+ 35: 'ddocks',
+ 36: 'cdepths',
+ 37: 'wlab',
+ 38: 'bnex',
+ 39: 'shats',
+ 40: 'bella',
+ 41: 'pup',
+ 42: 'sew',
+ 43: 'hive',
+ 44: 'temple',
+ 45: 'nest',
+ 47: 'lh',
+ 48: 'cult',
+ 49: 'void',
+ 50: 'encore',
+ 51: 'shaitan',
+ 52: 'para',
+ 53: 'mwoods',
+ 54: 'reef',
+ 55: 'thicket',
+ 56: 'lib',
+ 57: 'fungal',
+ 58: 'crystal',
+ 59: 'ruins',
+ 61: 'Forax',
+ 62: 'habby',
+ 63: 'hudl',
+ 64: 'htt',
+ 65: 'Ice Tomb',
+ 66: 'Katalund',
+ 67: 'mgm',
+ 68: 'Malogia',
+ 69: 'castle',
+ 70: 'o1',
+ 71: 'o3',
+ 72: 'rroad',
+ 73: 'workshop',
+ 74: 'machine',
+ 75: 'Untaris',
+ 76: 'o2',
+ 90: '3d',
+ 91: 'Beachzone',
+ 92: 'interregnum',
+ 93: 'wetland',
+ 94: 'kog',
+ 95: 'mv',
+ 96: 'akog',
+ 97: 'anest',
+ 98: 'tavern',
+ 99: 'bunny'
+};
+var tunnelrat = [13, 23, 17, 16, 18, 24, 14, 15, 22, 21];
+
+var explosivejourney = [31, 30, 27, 28, 29, 26, 35, 37, 36, 39, 51, 40];
+
+var travelofthedecade = [50, 42, 43, 44, 90, 45, 47, 48, 49, 54, 52, 53, 55, 56, 71, 59, 64, 93];
+
+var firststeps = [13, 25, 23, 17, 42];
+
+var kingofthemountains = [16, 18, 15, 43, 30, 53, 41, 28, 56, 59, 93];
+
+var conqueroroftherealm = [31, 40, 26, 44, 90, 24, 21, 39, 45, 57, 58, 47, 94];
+
+var enemyofthecourt = [51, 50, 54, 55, 64];
+
+var epicbattles = [35, 37, 36, 45, 55];
+
+var farout = [68, 75, 61, 66];
+
+var heroofthenexus = [
+ 13, 25, 17, 16, 23, 42, 59, 53, 18, 27, 29, 14, 15, 24, 41, 43, 56, 28, 30,
+ 52, 31, 44, 90, 26, 35, 37, 36, 24, 40, 21, 57, 58, 47, 48, 49, 93, 94, 69,
+ 51, 50, 54, 55, 64, 71, 72, 91
+];
+
+var seasonsbeatins = [40, 67, 38, 73, 74, 68, 75, 61, 66, 72, 91];
+
+var realmofthemadgod = [
+ 13, 25, 17, 16, 23, 42, 59, 53, 18, 27, 29, 14, 15, 24, 41, 43, 56, 28, 30,
+ 52, 31, 44, 90, 26, 35, 37, 36, 24, 40, 21, 57, 58, 47, 48, 49, 93, 94, 69,
+ 51, 50, 54, 55, 64, 71, 72, 91
+];
+var bonuses = {
+ 'Ancestor': function (s, c, d) {
+ return (parseInt(d.Account.Stats.TotalFame) === 0) ? { mul: 0, add: 20 } : 0;
+ },
+ 'Maxed': function (s, c, d) {
+ return 0;
+ var bonus = { mul: 0, add: 0 };
+ var hasBonus = false;
+
+ for (var t = 0; t < STATTAGS.length; t++) {
+ var stat = c[STATTAGS[t]] || 0;
+ var carrcl = classes[c.ObjectType];
+ if (carrcl && parseInt(stat) === carrcl[3][t]) {
+ hasBonus = true;
+ if (STATTAGS[t] === 'MaxHitPoints' || STATTAGS[t] === 'MaxMagicPoints') {
+ bonus.mul += 0.05;
+ bonus.add += 200;
+ } else {
+ bonus.mul += 0.025;
+ bonus.add += 100;
+ }
+ }
+ }
+
+ return hasBonus ? bonus : 0;
+ },
+ 'life': function (s, c, d) {
+ var bonus = { mul: 0.05, add: 200 };
+ var stat = c.MaxHitPoints || 0;
+ var carrcl = classes[c.ObjectType];
+
+ if (carrcl && parseInt(stat) === carrcl[3][STATTAGS.indexOf('MaxHitPoints')]) {
+ return bonus;
+ } else {
+ return 0;
+ }
+ },
+ 'mana': function (s, c, d) {
+ var bonus = { mul: 0.05, add: 200 };
+ var stat = c.MaxMagicPoints || 0;
+ var carrcl = classes[c.ObjectType];
+ if (carrcl && parseInt(stat) === carrcl[3][STATTAGS.indexOf('MaxMagicPoints')]) {
+ return bonus;
+ } else {
+ return 0;
+ }
+ },
+ 'attack': function (s, c, d) {
+ var bonus = { mul: 0.025, add: 100 };
+ var stat = c.Attack || 0;
+ var carrcl = classes[c.ObjectType];
+ if (carrcl && parseInt(stat) === carrcl[3][STATTAGS.indexOf('Attack')]) {
+ return bonus;
+ } else {
+ return 0;
+ }
+ },
+ 'defense': function (s, c, d) {
+ var bonus = { mul: 0.025, add: 100 };
+ var stat = c.Defense || 0;
+ var carrcl = classes[c.ObjectType];
+ if (carrcl && parseInt(stat) === carrcl[3][STATTAGS.indexOf('Defense')]) {
+ return bonus;
+ } else {
+ return 0;
+ }
+ },
+ 'speed': function (s, c, d) {
+ var bonus = { mul: 0.025, add: 100 };
+ var stat = c.Speed || 0;
+ var carrcl = classes[c.ObjectType];
+ if (carrcl && parseInt(stat) === carrcl[3][STATTAGS.indexOf('Speed')]) {
+ return bonus;
+ } else {
+ return 0;
+ }
+ },
+ 'dexterity': function (s, c, d) {
+ var bonus = { mul: 0.025, add: 100 };
+ var stat = c.Dexterity || 0;
+ var carrcl = classes[c.ObjectType];
+
+ if (carrcl && parseInt(stat) === carrcl[3][STATTAGS.indexOf('Dexterity')]) {
+ return bonus;
+ } else {
+ return 0;
+ }
+ },
+ 'vit': function (s, c, d) {
+ var bonus = { mul: 0.025, add: 100 };
+ var stat = c.HpRegen || 0;
+ var carrcl = classes[c.ObjectType];
+ if (carrcl && parseInt(stat) === carrcl[3][STATTAGS.indexOf('HpRegen')]) {
+ return bonus;
+ } else {
+ return 0;
+ }
+ },
+ 'wis': function (s, c, d) {
+ var bonus = { mul: 0.025, add: 100 };
+ var stat = c.MpRegen || 0;
+ var carrcl = classes[c.ObjectType];
+ if (carrcl && parseInt(stat) === carrcl[3][STATTAGS.indexOf('MpRegen')]) {
+ return bonus;
+ } else {
+ return 0;
+ }
+ },
+ 'Cartography': function (s) {
+ var tiles = s[3];
+ var bonus = 0;
+
+ if (tiles >= 25000000) {
+ bonus += Math.floor(tiles / 25000000) * 2500;
+ }
+ if (tiles >= 10000000) {
+ bonus += 1000;
+ }
+ if (tiles >= 4000000) {
+ bonus += 400;
+ }
+ if (tiles >= 1000000) {
+ bonus += 100;
+ }
+ if (tiles >= 200000) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'QuestCompletes': function (s) {
+ var quests = s[12];
+ var bonus = 0;
+
+ if (quests >= 2000) {
+ bonus += Math.floor(quests / 2000) * 5000;
+ }
+ if (quests >= 1000) {
+ bonus += 2000;
+ }
+ if (quests >= 400) {
+ bonus += 800;
+ }
+ if (quests >= 100) {
+ bonus += 200;
+ }
+ if (quests >= 25) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'EnemyHit': function (s) {
+ var hits = s[1];
+ var bonus = 0;
+
+ if (hits >= 2000000) {
+ bonus += Math.floor(hits / 2000000) * 2500;
+ }
+ if (hits >= 800000) {
+ bonus += 1000;
+ }
+ if (hits >= 200000) {
+ bonus += 400;
+ }
+ if (hits >= 40000) {
+ bonus += 100;
+ }
+ if (hits >= 8000) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'PartyLevelUps': function (s) {
+ var levelUps = s[77];
+ var bonus = 0;
+
+ if (levelUps >= 1000) {
+ bonus += Math.floor(levelUps / 1000) * 1000;
+ }
+ if (levelUps >= 400) {
+ bonus += 400;
+ }
+ if (levelUps >= 100) {
+ bonus += 200;
+ }
+ if (levelUps >= 50) {
+ bonus += 50;
+ }
+ if (levelUps >= 25) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'PotionDrinker': function (s) {
+ var potions = s[5];
+ var bonus = 0;
+
+ if (potions >= 2000) {
+ bonus += Math.floor(potions / 2000) * 1000;
+ }
+ if (potions >= 1000) {
+ bonus += 400;
+ }
+ if (potions >= 400) {
+ bonus += 200;
+ }
+ if (potions >= 100) {
+ bonus += 50;
+ }
+ if (potions >= 25) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'AbilityUse': function (s) {
+ var abilities = s[2];
+ var bonus = 0;
+
+ if (abilities >= 25000) {
+ bonus += Math.floor(abilities / 25000) * 1000;
+ }
+ if (abilities >= 10000) {
+ bonus += 400;
+ }
+ if (abilities >= 2500) {
+ bonus += 200;
+ }
+ if (abilities >= 500) {
+ bonus += 50;
+ }
+ if (abilities >= 100) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'Teleports': function (s) {
+ var teleports = s[4];
+ var bonus = 0;
+
+ if (teleports >= 2500) {
+ bonus += Math.floor(teleports / 2500) * 1000;
+ }
+ if (teleports >= 1000) {
+ bonus += 400;
+ }
+ if (teleports >= 500) {
+ bonus += 200;
+ }
+ if (teleports >= 200) {
+ bonus += 50;
+ }
+ if (teleports >= 50) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'MonsterKills': function (s) {
+ var kills = s[6]; // replace monsterKillIndex with the actual index for monster kills in s
+ var bonus = 0;
+
+ if (kills >= 100000) {
+ bonus += Math.floor(kills / 100000) * 1000;
+ }
+ if (kills >= 50000) {
+ bonus += 400;
+ }
+ if (kills >= 10000) {
+ bonus += 200;
+ }
+ if (kills >= 5000) {
+ bonus += 50;
+ }
+ if (kills >= 2000) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'GodKills': function (s) {
+ var godKills = s[8]; // replace godKillIndex with the actual index for god kills in s
+ var bonus = 0;
+
+ if (godKills >= 50000) {
+ bonus += Math.floor(godKills / 50000) * 2500;
+ }
+ if (godKills >= 10000) {
+ bonus += 1000;
+ }
+ if (godKills >= 5000) {
+ bonus += 400;
+ }
+ if (godKills >= 1000) {
+ bonus += 100;
+ }
+ if (godKills >= 200) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'LesserGodKills': function (s) {
+ var lesserGodKills = s[78]; // replace lesserGodKillIndex with the actual index for lesser god kills in s
+ var bonus = 0;
+
+ if (lesserGodKills >= 25000) {
+ bonus += Math.floor(lesserGodKills / 25000) * 2500;
+ }
+ if (lesserGodKills >= 5000) {
+ bonus += 1000;
+ }
+ if (lesserGodKills >= 2000) {
+ bonus += 400;
+ }
+ if (lesserGodKills >= 500) {
+ bonus += 100;
+ }
+ if (lesserGodKills >= 100) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'OryxKills': function (s) {
+ var oryxKills = s[11]; // replace oryxKillIndex with the actual index for Oryx kills in s
+ var bonus = 0;
+
+ if (oryxKills >= 500) {
+ bonus += Math.floor(oryxKills / 500) * 8000;
+ }
+ if (oryxKills >= 250) {
+ bonus += 3000;
+ }
+ if (oryxKills >= 100) {
+ bonus += 1000;
+ }
+ if (oryxKills >= 20) {
+ bonus += 500;
+ }
+ if (oryxKills >= 1) {
+ bonus += 200;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'EncounterKills': function (s) {
+ var encounterKills = s[79]; // replace encounterKillIndex with the actual index for encounter kills in s
+ var bonus = 0;
+
+ if (encounterKills >= 1250) {
+ bonus += Math.floor(encounterKills / 1250) * 5000;
+ }
+ if (encounterKills >= 500) {
+ bonus += 2000;
+ }
+ if (encounterKills >= 200) {
+ bonus += 800;
+ }
+ if (encounterKills >= 50) {
+ bonus += 200;
+ }
+ if (encounterKills >= 5) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'HeroKills': function (s) {
+ var heroKills = s[80]; // replace heroKillIndex with the actual index for hero kills in s
+ var bonus = 0;
+
+ if (heroKills >= 2500) {
+ bonus += Math.floor(heroKills / 2500) * 2500;
+ }
+ if (heroKills >= 1250) {
+ bonus += 1000;
+ }
+ if (heroKills >= 500) {
+ bonus += 400;
+ }
+ if (heroKills >= 100) {
+ bonus += 100;
+ }
+ if (heroKills >= 5) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'CubeKills': function (s) {
+ var cubeKills = s[10]; // replace cubeKillIndex with the actual index for cube kills in s
+ var bonus = 0;
+
+ if (cubeKills >= 50000) {
+ bonus += Math.floor(cubeKills / 50000) * 2500;
+ }
+ if (cubeKills >= 10000) {
+ bonus += 1000;
+ }
+ if (cubeKills >= 5000) {
+ bonus += 400;
+ }
+ if (cubeKills >= 1000) {
+ bonus += 100;
+ }
+ if (cubeKills >= 200) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'CritterKills': function (s) {
+ var critterKills = s[82]; // Replace critterKillIndex with the actual index for critter kills in s
+ var bonus = 0;
+
+ if (critterKills >= 50000) {
+ bonus += Math.floor(critterKills / 50000) * 2500;
+ }
+ if (critterKills >= 10000) {
+ bonus += 1000;
+ }
+ if (critterKills >= 5000) {
+ bonus += 400;
+ }
+ if (critterKills >= 1000) {
+ bonus += 100;
+ }
+ if (critterKills >= 200) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'BeastKills': function (s) {
+ var beastKills = s[83]; // Replace beastKillIndex with the actual index for beast kills in s
+ var bonus = 0;
+
+ if (beastKills >= 50000) {
+ bonus += Math.floor(beastKills / 50000) * 2500;
+ }
+ if (beastKills >= 10000) {
+ bonus += 1000;
+ }
+ if (beastKills >= 5000) {
+ bonus += 400;
+ }
+ if (beastKills >= 1000) {
+ bonus += 100;
+ }
+ if (beastKills >= 200) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'HumanoidKills': function (s) {
+ var humanoidKills = s[84]; // Replace humanoidKillIndex with the actual index for humanoid kills in s
+ var bonus = 0;
+
+ if (humanoidKills >= 50000) {
+ bonus += Math.floor(humanoidKills / 50000) * 2500;
+ }
+ if (humanoidKills >= 10000) {
+ bonus += 1000;
+ }
+ if (humanoidKills >= 5000) {
+ bonus += 400;
+ }
+ if (humanoidKills >= 1000) {
+ bonus += 100;
+ }
+ if (humanoidKills >= 200) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'UndeadKills': function (s) {
+ var undeadKills = s[85]; // Replace undeadKillIndex with the actual index for undead kills in s
+ var bonus = 0;
+
+ if (undeadKills >= 50000) {
+ bonus += Math.floor(undeadKills / 50000) * 2500;
+ }
+ if (undeadKills >= 10000) {
+ bonus += 1000;
+ }
+ if (undeadKills >= 5000) {
+ bonus += 400;
+ }
+ if (undeadKills >= 1000) {
+ bonus += 100;
+ }
+ if (undeadKills >= 200) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'NatureKills': function (s) {
+ var natureKills = s[86]; // Replace natureKillIndex with the actual index for nature kills in s
+ var bonus = 0;
+
+ if (natureKills >= 50000) {
+ bonus += Math.floor(natureKills / 50000) * 2500;
+ }
+ if (natureKills >= 10000) {
+ bonus += 1000;
+ }
+ if (natureKills >= 5000) {
+ bonus += 400;
+ }
+ if (natureKills >= 1000) {
+ bonus += 100;
+ }
+ if (natureKills >= 200) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'ConstructKills': function (s) {
+ var constructKills = s[87]; // Replace constructKillIndex with the actual index for construct kills in s
+ var bonus = 0;
+
+ if (constructKills >= 50000) {
+ bonus += Math.floor(constructKills / 50000) * 2500;
+ }
+ if (constructKills >= 10000) {
+ bonus += 1000;
+ }
+ if (constructKills >= 5000) {
+ bonus += 400;
+ }
+ if (constructKills >= 1000) {
+ bonus += 100;
+ }
+ if (constructKills >= 200) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'GrotesqueKills': function (s) {
+ var grotesqueKills = s[88]; // Replace grotesqueKillIndex with the actual index for grotesque kills in s
+ var bonus = 0;
+
+ if (grotesqueKills >= 50000) {
+ bonus += Math.floor(grotesqueKills / 50000) * 2500;
+ }
+ if (grotesqueKills >= 10000) {
+ bonus += 1000;
+ }
+ if (grotesqueKills >= 5000) {
+ bonus += 400;
+ }
+ if (grotesqueKills >= 1000) {
+ bonus += 100;
+ }
+ if (grotesqueKills >= 200) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'StructureKills': function (s) {
+ var structureKills = s[89]; // Replace structureKillIndex with the actual index for structure kills in s
+ var bonus = 0;
+
+ if (structureKills >= 50000) {
+ bonus += Math.floor(structureKills / 50000) * 2500;
+ }
+ if (structureKills >= 10000) {
+ bonus += 1000;
+ }
+ if (structureKills >= 5000) {
+ bonus += 400;
+ }
+ if (structureKills >= 1000) {
+ bonus += 100;
+ }
+ if (structureKills >= 200) {
+ bonus += 20;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'PirateCaves': function (s) {
+ var pirateCaves = s[13]; // Replace 45 with the actual index for Pirate Caves in s
+ var bonus = 0;
+
+ if (pirateCaves >= 100) {
+ bonus += Math.floor(pirateCaves / 100) * 60;
+ }
+ if (pirateCaves >= 40) {
+ bonus += 20;
+ }
+ if (pirateCaves >= 20) {
+ bonus += 10;
+ }
+ if (pirateCaves >= 10) {
+ bonus += 5;
+ }
+ if (pirateCaves >= 1) {
+ bonus += 2;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'ForestMazes': function (s) {
+ var forestMazes = s[25]; // Replace 45 with the actual index for Forest Mazes in s
+ var bonus = 0;
+
+ if (forestMazes >= 100) {
+ bonus += Math.floor(forestMazes / 100) * 60;
+ }
+ if (forestMazes >= 40) {
+ bonus += 20;
+ }
+ if (forestMazes >= 20) {
+ bonus += 10;
+ }
+ if (forestMazes >= 10) {
+ bonus += 5;
+ }
+ if (forestMazes >= 1) {
+ bonus += 2;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'ForbiddenJungles': function (s) {
+ var forbiddenJungles = s[23]; // Replace 45 with the actual index for Forbidden Jungles in s
+ var bonus = 0;
+
+ if (forbiddenJungles >= 100) {
+ bonus += Math.floor(forbiddenJungles / 100) * 80;
+ }
+ if (forbiddenJungles >= 40) {
+ bonus += 30;
+ }
+ if (forbiddenJungles >= 20) {
+ bonus += 15;
+ }
+ if (forbiddenJungles >= 10) {
+ bonus += 8;
+ }
+ if (forbiddenJungles >= 1) {
+ bonus += 4;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'TheHive': function (s) {
+ var theHive = s[43]; // Replace 45 with the actual index for The Hive in s
+ var bonus = 0;
+
+ if (theHive >= 100) {
+ bonus += Math.floor(theHive / 100) * 80;
+ }
+ if (theHive >= 40) {
+ bonus += 30;
+ }
+ if (theHive >= 20) {
+ bonus += 15;
+ }
+ if (theHive >= 10) {
+ bonus += 8;
+ }
+ if (theHive >= 1) {
+ bonus += 4;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'SpiderDen': function (s) {
+ var spiderDen = s[17];
+ var bonus = 0;
+
+ if (spiderDen >= 100) {
+ bonus += Math.floor(spiderDen / 100) * 100;
+ }
+ if (spiderDen >= 40) {
+ bonus += 40;
+ }
+ if (spiderDen >= 20) {
+ bonus += 20;
+ }
+ if (spiderDen >= 10) {
+ bonus += 10;
+ }
+ if (spiderDen >= 1) {
+ bonus += 5;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'AncientRuins': function (s) {
+ var ancientRuins = s[59];
+ var bonus = 0;
+
+ if (ancientRuins >= 100) {
+ bonus += Math.floor(ancientRuins / 100) * 800;
+ }
+ if (ancientRuins >= 40) {
+ bonus += 300;
+ }
+ if (ancientRuins >= 20) {
+ bonus += 150;
+ }
+ if (ancientRuins >= 10) {
+ bonus += 80;
+ }
+ if (ancientRuins >= 1) {
+ bonus += 40;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'SnakePit': function (s) {
+ var snakePit = s[16];
+ var bonus = 0;
+
+ if (snakePit >= 100) {
+ bonus += Math.floor(snakePit / 100) * 500;
+ }
+ if (snakePit >= 40) {
+ bonus += 200;
+ }
+ if (snakePit >= 20) {
+ bonus += 100;
+ }
+ if (snakePit >= 10) {
+ bonus += 50;
+ }
+ if (snakePit >= 1) {
+ bonus += 25;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'SpriteWorld': function (s) {
+ var spriteWorld = s[18];
+ var bonus = 0;
+
+ if (spriteWorld >= 100) {
+ bonus += Math.floor(spriteWorld / 100) * 500;
+ }
+ if (spriteWorld >= 40) {
+ bonus += 200;
+ }
+ if (spriteWorld >= 20) {
+ bonus += 100;
+ }
+ if (spriteWorld >= 10) {
+ bonus += 50;
+ }
+ if (spriteWorld >= 1) {
+ bonus += 25;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'MagicWoods': function (s) {
+ var magicWoods = s[53];
+ var bonus = 0;
+
+ if (magicWoods >= 100) {
+ bonus += Math.floor(magicWoods / 100) * 700;
+ }
+ if (magicWoods >= 40) {
+ bonus += 280;
+ }
+ if (magicWoods >= 20) {
+ bonus += 140;
+ }
+ if (magicWoods >= 10) {
+ bonus += 70;
+ }
+ if (magicWoods >= 1) {
+ bonus += 35;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'UndeadLair': function (s) {
+ var undeadLair = s[14];
+ var bonus = 0;
+
+ if (undeadLair >= 100) {
+ bonus += Math.floor(undeadLair / 100) * 700;
+ }
+ if (undeadLair >= 40) {
+ bonus += 280;
+ }
+ if (undeadLair >= 20) {
+ bonus += 140;
+ }
+ if (undeadLair >= 10) {
+ bonus += 70;
+ }
+ if (undeadLair >= 1) {
+ bonus += 35;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'AbyssOfDemons': function (s) {
+ var abyssOfDemons = s[15];
+ var bonus = 0;
+
+ if (abyssOfDemons >= 100) {
+ bonus += Math.floor(abyssOfDemons / 100) * 800;
+ }
+ if (abyssOfDemons >= 40) {
+ bonus += 300;
+ }
+ if (abyssOfDemons >= 20) {
+ bonus += 150;
+ }
+ if (abyssOfDemons >= 10) {
+ bonus += 80;
+ }
+ if (abyssOfDemons >= 1) {
+ bonus += 40;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'CursedLibrary': function (s) {
+ var cursedLibrary = s[56];
+ var bonus = 0;
+
+ if (cursedLibrary >= 100) {
+ bonus += Math.floor(cursedLibrary / 100) * 1000;
+ }
+ if (cursedLibrary >= 40) {
+ bonus += 400;
+ }
+ if (cursedLibrary >= 20) {
+ bonus += 200;
+ }
+ if (cursedLibrary >= 10) {
+ bonus += 100;
+ }
+ if (cursedLibrary >= 1) {
+ bonus += 50;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'ToxicSewers': function (s) {
+ var toxicSewers = s[42];
+ var bonus = 0;
+
+ if (toxicSewers >= 100) {
+ bonus += Math.floor(toxicSewers / 100) * 800;
+ }
+ if (toxicSewers >= 40) {
+ bonus += 300;
+ }
+ if (toxicSewers >= 20) {
+ bonus += 150;
+ }
+ if (toxicSewers >= 10) {
+ bonus += 80;
+ }
+ if (toxicSewers >= 1) {
+ bonus += 40;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'MadLab': function (s) {
+ var madLab = s[30];
+ var bonus = 0;
+
+ if (madLab >= 100) {
+ bonus += Math.floor(madLab / 100) * 1000;
+ }
+ if (madLab >= 40) {
+ bonus += 400;
+ }
+ if (madLab >= 20) {
+ bonus += 200;
+ }
+ if (madLab >= 10) {
+ bonus += 100;
+ }
+ if (madLab >= 1) {
+ bonus += 50;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'PuppetMastersTheatre': function (s) {
+ var puppetMastersTheatre = s[41];
+ var bonus = 0;
+
+ if (puppetMastersTheatre >= 100) {
+ bonus += Math.floor(puppetMastersTheatre / 100) * 800;
+ }
+ if (puppetMastersTheatre >= 40) {
+ bonus += 300;
+ }
+ if (puppetMastersTheatre >= 20) {
+ bonus += 150;
+ }
+ if (puppetMastersTheatre >= 10) {
+ bonus += 80;
+ }
+ if (puppetMastersTheatre >= 1) {
+ bonus += 40;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'ManorOfTheImmortals': function (s) {
+ var manorOfTheImmortals = s[24];
+ var bonus = 0;
+
+ if (manorOfTheImmortals >= 100) {
+ bonus += Math.floor(manorOfTheImmortals / 100) * 800;
+ }
+ if (manorOfTheImmortals >= 40) {
+ bonus += 300;
+ }
+ if (manorOfTheImmortals >= 20) {
+ bonus += 150;
+ }
+ if (manorOfTheImmortals >= 10) {
+ bonus += 80;
+ }
+ if (manorOfTheImmortals >= 1) {
+ bonus += 40;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'HauntedCemetery': function (s) {
+ var hauntedCemetery = s[28];
+ var bonus = 0;
+
+ if (hauntedCemetery >= 100) {
+ bonus += Math.floor(hauntedCemetery / 100) * 1200;
+ }
+ if (hauntedCemetery >= 40) {
+ bonus += 500;
+ }
+ if (hauntedCemetery >= 20) {
+ bonus += 250;
+ }
+ if (hauntedCemetery >= 10) {
+ bonus += 120;
+ }
+ if (hauntedCemetery >= 1) {
+ bonus += 60;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'CaveOfAThousandTreasures': function (s) {
+ var caveOfAThousandTreasures = s[29];
+ var bonus = 0;
+
+ if (caveOfAThousandTreasures >= 100) {
+ bonus += Math.floor(caveOfAThousandTreasures / 100) * 1200;
+ }
+ if (caveOfAThousandTreasures >= 40) {
+ bonus += 500;
+ }
+ if (caveOfAThousandTreasures >= 20) {
+ bonus += 250;
+ }
+ if (caveOfAThousandTreasures >= 10) {
+ bonus += 120;
+ }
+ if (caveOfAThousandTreasures >= 1) {
+ bonus += 60;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'CandylandHuntingGrounds': function (s) {
+ var candylandHuntingGrounds = s[27];
+ var bonus = 0;
+
+ if (candylandHuntingGrounds >= 100) {
+ bonus += Math.floor(candylandHuntingGrounds / 100) * 1200;
+ }
+ if (candylandHuntingGrounds >= 40) {
+ bonus += 500;
+ }
+ if (candylandHuntingGrounds >= 20) {
+ bonus += 250;
+ }
+ if (candylandHuntingGrounds >= 10) {
+ bonus += 120;
+ }
+ if (candylandHuntingGrounds >= 1) {
+ bonus += 60;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'ParasiteChambers': function (s) {
+ var parasiteChambers = s[52];
+ var bonus = 0;
+
+ if (parasiteChambers >= 100) {
+ bonus += Math.floor(parasiteChambers / 100) * 3000;
+ }
+ if (parasiteChambers >= 40) {
+ bonus += 1200;
+ }
+ if (parasiteChambers >= 20) {
+ bonus += 600;
+ }
+ if (parasiteChambers >= 10) {
+ bonus += 300;
+ }
+ if (parasiteChambers >= 1) {
+ bonus += 150;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'DeadwaterDocks': function (s) {
+ var deadwaterDocks = s[35];
+ var bonus = 0;
+
+ if (deadwaterDocks >= 100) {
+ bonus += Math.floor(deadwaterDocks / 100) * 2000;
+ }
+ if (deadwaterDocks >= 40) {
+ bonus += 800;
+ }
+ if (deadwaterDocks >= 20) {
+ bonus += 400;
+ }
+ if (deadwaterDocks >= 10) {
+ bonus += 200;
+ }
+ if (deadwaterDocks >= 1) {
+ bonus += 100;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'WoodlandLabyrinth': function (s) {
+ var woodlandLabyrinth = s[37];
+ var bonus = 0;
+
+ if (woodlandLabyrinth >= 100) {
+ bonus += Math.floor(woodlandLabyrinth / 100) * 2000;
+ }
+ if (woodlandLabyrinth >= 40) {
+ bonus += 800;
+ }
+ if (woodlandLabyrinth >= 20) {
+ bonus += 400;
+ }
+ if (woodlandLabyrinth >= 10) {
+ bonus += 200;
+ }
+ if (woodlandLabyrinth >= 1) {
+ bonus += 100;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'TheCrawlingDepths': function (s) {
+ var theCrawlingDepths = s[36];
+ var bonus = 0;
+
+ if (theCrawlingDepths >= 100) {
+ bonus += Math.floor(theCrawlingDepths / 100) * 2000;
+ }
+ if (theCrawlingDepths >= 40) {
+ bonus += 800;
+ }
+ if (theCrawlingDepths >= 20) {
+ bonus += 400;
+ }
+ if (theCrawlingDepths >= 10) {
+ bonus += 200;
+ }
+ if (theCrawlingDepths >= 1) {
+ bonus += 100;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'SulfurousWetlands': function (s) {
+ var sulfurousWetlands = s[93];
+ var bonus = 0;
+
+ if (sulfurousWetlands >= 100) {
+ bonus += Math.floor(sulfurousWetlands / 100) * 2000;
+ }
+ if (sulfurousWetlands >= 40) {
+ bonus += 800;
+ }
+ if (sulfurousWetlands >= 20) {
+ bonus += 400;
+ }
+ if (sulfurousWetlands >= 10) {
+ bonus += 200;
+ }
+ if (sulfurousWetlands >= 1) {
+ bonus += 100;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'DavyJonesLocker': function (s) {
+ var davyJonesLocker = s[31];
+ var bonus = 0;
+
+ if (davyJonesLocker >= 100) {
+ bonus += Math.floor(davyJonesLocker / 100) * 2000;
+ }
+ if (davyJonesLocker >= 40) {
+ bonus += 800;
+ }
+ if (davyJonesLocker >= 20) {
+ bonus += 400;
+ }
+ if (davyJonesLocker >= 10) {
+ bonus += 200;
+ }
+ if (davyJonesLocker >= 1) {
+ bonus += 100;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'MountainTemple': function (s) {
+ var mountainTemple = s[44];
+ var bonus = 0;
+
+ if (mountainTemple >= 100) {
+ bonus += Math.floor(mountainTemple / 100) * 3000;
+ }
+ if (mountainTemple >= 40) {
+ bonus += 1200;
+ }
+ if (mountainTemple >= 20) {
+ bonus += 600;
+ }
+ if (mountainTemple >= 10) {
+ bonus += 300;
+ }
+ if (mountainTemple >= 1) {
+ bonus += 150;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'LairOfDraconis': function (s) {
+ var lairOfDraconis = s[26];
+ var bonus = 0;
+
+ if (lairOfDraconis >= 100) {
+ bonus += Math.floor(lairOfDraconis / 100) * 3500;
+ }
+ if (lairOfDraconis >= 40) {
+ bonus += 1400;
+ }
+ if (lairOfDraconis >= 20) {
+ bonus += 700;
+ }
+ if (lairOfDraconis >= 10) {
+ bonus += 350;
+ }
+ if (lairOfDraconis >= 1) {
+ bonus += 175;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'TheThirdDimension': function (s) {
+ var theThirdDimension = s[90];
+ var bonus = 0;
+
+ if (theThirdDimension >= 100) {
+ bonus += Math.floor(theThirdDimension / 100) * 3000;
+ }
+ if (theThirdDimension >= 40) {
+ bonus += 1200;
+ }
+ if (theThirdDimension >= 20) {
+ bonus += 600;
+ }
+ if (theThirdDimension >= 10) {
+ bonus += 300;
+ }
+ if (theThirdDimension >= 1) {
+ bonus += 150;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'IceCave': function (s) {
+ var iceCave = s[34];
+ var bonus = 0;
+
+ if (iceCave >= 100) {
+ bonus += Math.floor(iceCave / 100) * 2500;
+ }
+ if (iceCave >= 40) {
+ bonus += 1000;
+ }
+ if (iceCave >= 20) {
+ bonus += 500;
+ }
+ if (iceCave >= 10) {
+ bonus += 250;
+ }
+ if (iceCave >= 1) {
+ bonus += 120;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'OceanTrench': function (s) {
+ var oceanTrench = s[22];
+ var bonus = 0;
+
+ if (oceanTrench >= 100) {
+ bonus += Math.floor(oceanTrench / 100) * 3500;
+ }
+ if (oceanTrench >= 40) {
+ bonus += 1400;
+ }
+ if (oceanTrench >= 20) {
+ bonus += 700;
+ }
+ if (oceanTrench >= 10) {
+ bonus += 350;
+ }
+ if (oceanTrench >= 1) {
+ bonus += 175;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'TombOfTheAncients': function (s) {
+ var tombOfTheAncients = s[21];
+ var bonus = 0;
+
+ if (tombOfTheAncients >= 100) {
+ bonus += Math.floor(tombOfTheAncients / 100) * 4000;
+ }
+ if (tombOfTheAncients >= 40) {
+ bonus += 1600;
+ }
+ if (tombOfTheAncients >= 20) {
+ bonus += 800;
+ }
+ if (tombOfTheAncients >= 10) {
+ bonus += 400;
+ }
+ if (tombOfTheAncients >= 1) {
+ bonus += 200;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'TheShatters': function (s) {
+ var theShatters = s[39];
+ var bonus = 0;
+
+ if (theShatters >= 100) {
+ bonus += Math.floor(theShatters / 100) * 10000;
+ }
+ if (theShatters >= 40) {
+ bonus += 4000;
+ }
+ if (theShatters >= 20) {
+ bonus += 2000;
+ }
+ if (theShatters >= 10) {
+ bonus += 1000;
+ }
+ if (theShatters >= 1) {
+ bonus += 500;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'TheNest': function (s) {
+ var theNest = s[45];
+ var bonus = 0;
+
+ if (theNest >= 100) {
+ bonus += Math.floor(theNest / 100) * 4000;
+ }
+ if (theNest >= 40) {
+ bonus += 1600;
+ }
+ if (theNest >= 20) {
+ bonus += 800;
+ }
+ if (theNest >= 10) {
+ bonus += 400;
+ }
+ if (theNest >= 1) {
+ bonus += 200;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'FungalCavern': function (s) {
+ var fungalCavern = s[57];
+ var bonus = 0;
+
+ if (fungalCavern >= 100) {
+ bonus += Math.floor(fungalCavern / 100) * 5000;
+ }
+ if (fungalCavern >= 40) {
+ bonus += 2000;
+ }
+ if (fungalCavern >= 20) {
+ bonus += 1000;
+ }
+ if (fungalCavern >= 10) {
+ bonus += 500;
+ }
+ if (fungalCavern >= 1) {
+ bonus += 250;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'CrystalCavern': function (s) {
+ var crystalCavern = s[58];
+ var bonus = 0;
+
+ if (crystalCavern >= 100) {
+ bonus += Math.floor(crystalCavern / 100) * 6000;
+ }
+ if (crystalCavern >= 40) {
+ bonus += 2400;
+ }
+ if (crystalCavern >= 20) {
+ bonus += 1200;
+ }
+ if (crystalCavern >= 10) {
+ bonus += 600;
+ }
+ if (crystalCavern >= 1) {
+ bonus += 300;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'LostHalls': function (s) {
+ var lostHalls = s[47];
+ var bonus = 0;
+
+ if (lostHalls >= 100) {
+ bonus += Math.floor(lostHalls / 100) * 6000;
+ }
+ if (lostHalls >= 40) {
+ bonus += 2400;
+ }
+ if (lostHalls >= 20) {
+ bonus += 1200;
+ }
+ if (lostHalls >= 10) {
+ bonus += 600;
+ }
+ if (lostHalls >= 1) {
+ bonus += 300;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'CultistHideout': function (s) {
+ var cultistHideout = s[48];
+ var bonus = 0;
+
+ if (cultistHideout >= 100) {
+ bonus += Math.floor(cultistHideout / 100) * 7000;
+ }
+ if (cultistHideout >= 40) {
+ bonus += 3000;
+ }
+ if (cultistHideout >= 20) {
+ bonus += 1500;
+ }
+ if (cultistHideout >= 10) {
+ bonus += 700;
+ }
+ if (cultistHideout >= 1) {
+ bonus += 350;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'TheVoid': function (s) {
+ var theVoid = s[49];
+ var bonus = 0;
+
+ if (theVoid >= 100) {
+ bonus += Math.floor(theVoid / 100) * 8000;
+ }
+ if (theVoid >= 40) {
+ bonus += 3200;
+ }
+ if (theVoid >= 20) {
+ bonus += 1600;
+ }
+ if (theVoid >= 10) {
+ bonus += 800;
+ }
+ if (theVoid >= 1) {
+ bonus += 400;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'KogboldSteamworks': function (s) {
+ var kogboldSteamworks = s[94];
+ var bonus = 0;
-var shortdungeonnames = { // sorted by "tier"
- 13: 'Pirate',
- 23: 'Jungle',
- 17: 'Spider',
- 16: 'Snake',
- 18: 'Sprite',
- 24: 'Manor',
- 14: 'UDL',
- 15: 'Abyss',
- 22: 'Trench',
- 21: 'Tomb'
-};
+ if (kogboldSteamworks >= 100) {
+ bonus += Math.floor(kogboldSteamworks / 100) * 8000;
+ }
+ if (kogboldSteamworks >= 40) {
+ bonus += 3200;
+ }
+ if (kogboldSteamworks >= 20) {
+ bonus += 1600;
+ }
+ if (kogboldSteamworks >= 10) {
+ bonus += 800;
+ }
+ if (kogboldSteamworks >= 1) {
+ bonus += 400;
+ }
-var bonuses = {
- 'Ancestor': function(s, c, d) {
- return (parseInt(d.Account.Stats.TotalFame) === 0) ? {mul: 0.1, add: 20} : 0;
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'MoonlightVillage': function (s) {
+ var moonlightVillage = s[95];
+ var bonus = 0;
+
+ if (moonlightVillage >= 100) {
+ bonus += Math.floor(moonlightVillage / 100) * 6000;
+ }
+ if (moonlightVillage >= 40) {
+ bonus += 2400;
+ }
+ if (moonlightVillage >= 20) {
+ bonus += 1200;
+ }
+ if (moonlightVillage >= 10) {
+ bonus += 600;
+ }
+ if (moonlightVillage >= 1) {
+ bonus += 300;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'AdvancedKogboldSteamworks': function (s) {
+ var advancedKogboldSteamworks = s[96];
+ var bonus = 0;
+
+ if (advancedKogboldSteamworks >= 100) {
+ bonus += Math.floor(advancedKogboldSteamworks / 100) * 8000;
+ }
+ if (advancedKogboldSteamworks >= 40) {
+ bonus += 3200;
+ }
+ if (advancedKogboldSteamworks >= 20) {
+ bonus += 1600;
+ }
+ if (advancedKogboldSteamworks >= 10) {
+ bonus += 800;
+ }
+ if (advancedKogboldSteamworks >= 1) {
+ bonus += 400;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'AdvancedNest': function (s) {
+ var advancedNest = s[97];
+ var bonus = 0;
+
+ if (advancedNest >= 100) {
+ bonus += Math.floor(advancedNest / 100) * 4000;
+ }
+ if (advancedNest >= 40) {
+ bonus += 1600;
+ }
+ if (advancedNest >= 20) {
+ bonus += 800;
+ }
+ if (advancedNest >= 10) {
+ bonus += 400;
+ }
+ if (advancedNest >= 1) {
+ bonus += 200;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'TheTavern': function (s) {
+ var theTavern = s[98];
+ var bonus = 0;
+
+ if (theTavern >= 100) {
+ bonus += Math.floor(theTavern / 100) * 3000;
+ }
+ if (theTavern >= 40) {
+ bonus += 1200;
+ }
+ if (theTavern >= 20) {
+ bonus += 600;
+ }
+ if (theTavern >= 10) {
+ bonus += 300;
+ }
+ if (theTavern >= 1) {
+ bonus += 150;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'OryxsCastle': function (s) {
+ var oryxsCastle = s[69];
+ var bonus = 0;
+
+ if (oryxsCastle >= 100) {
+ bonus += Math.floor(oryxsCastle / 100) * 2000;
+ }
+ if (oryxsCastle >= 40) {
+ bonus += 800;
+ }
+ if (oryxsCastle >= 20) {
+ bonus += 400;
+ }
+ if (oryxsCastle >= 10) {
+ bonus += 200;
+ }
+ if (oryxsCastle >= 1) {
+ bonus += 100;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'LairOfShaitan': function (s) {
+ var lairOfShaitan = s[51];
+ var bonus = 0;
+
+ if (lairOfShaitan >= 100) {
+ bonus += Math.floor(lairOfShaitan / 100) * 2000;
+ }
+ if (lairOfShaitan >= 40) {
+ bonus += 800;
+ }
+ if (lairOfShaitan >= 20) {
+ bonus += 400;
+ }
+ if (lairOfShaitan >= 10) {
+ bonus += 200;
+ }
+ if (lairOfShaitan >= 1) {
+ bonus += 100;
+ }
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'PuppetMastersEncore': function (s) {
+ var puppetMastersEncore = s[50];
+ var bonus = 0;
+
+ if (puppetMastersEncore >= 100) {
+ bonus += Math.floor(puppetMastersEncore / 100) * 2000;
+ }
+ if (puppetMastersEncore >= 40) {
+ bonus += 800;
+ }
+ if (puppetMastersEncore >= 20) {
+ bonus += 400;
+ }
+ if (puppetMastersEncore >= 10) {
+ bonus += 200;
+ }
+ if (puppetMastersEncore >= 1) {
+ bonus += 100;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Legacy Builder': function(s, c, d) {
- // 0.1
+ 'CnidarianReef': function (s) {
+ var cnidarianReef = s[54];
+ var bonus = 0;
+
+ if (cnidarianReef >= 100) {
+ bonus += Math.floor(cnidarianReef / 100) * 2000;
+ }
+ if (cnidarianReef >= 40) {
+ bonus += 800;
+ }
+ if (cnidarianReef >= 20) {
+ bonus += 400;
+ }
+ if (cnidarianReef >= 10) {
+ bonus += 200;
+ }
+ if (cnidarianReef >= 1) {
+ bonus += 100;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Pacifist': function(s) {
- return s[1] ? 0 : 0.25;
+ 'SecludedThicket': function (s) {
+ var secludedThicket = s[55];
+ var bonus = 0;
+
+ if (secludedThicket >= 100) {
+ bonus += Math.floor(secludedThicket / 100) * 2500;
+ }
+ if (secludedThicket >= 40) {
+ bonus += 1000;
+ }
+ if (secludedThicket >= 20) {
+ bonus += 500;
+ }
+ if (secludedThicket >= 10) {
+ bonus += 250;
+ }
+ if (secludedThicket >= 1) {
+ bonus += 125;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Thirsty': function(s) {
- return s[5] ? 0 : 0.25;
+ 'HighTechTerror': function (s) {
+ var highTechTerror = s[64];
+ var bonus = 0;
+
+ if (highTechTerror >= 100) {
+ bonus += Math.floor(highTechTerror / 100) * 2500;
+ }
+ if (highTechTerror >= 40) {
+ bonus += 1000;
+ }
+ if (highTechTerror >= 20) {
+ bonus += 500;
+ }
+ if (highTechTerror >= 10) {
+ bonus += 250;
+ }
+ if (highTechTerror >= 1) {
+ bonus += 125;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Mundane': function(s) {
- return s[2] ? 0 : 0.25;
+ 'OryxsChamber': function (s) {
+ var oryxsChamber = s[70];
+ var bonus = 0;
+
+ if (oryxsChamber >= 100) {
+ bonus += Math.floor(oryxsChamber / 100) * 2500;
+ }
+ if (oryxsChamber >= 40) {
+ bonus += 1000;
+ }
+ if (oryxsChamber >= 20) {
+ bonus += 500;
+ }
+ if (oryxsChamber >= 10) {
+ bonus += 250;
+ }
+ if (oryxsChamber >= 1) {
+ bonus += 125;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Boots on the Ground': function(s) {
- return s[4] ? 0 : 0.25;
+ 'WineCellar': function (s) {
+ var wineCellar = s[76];
+ var bonus = 0;
+
+ if (wineCellar >= 100) {
+ bonus += Math.floor(wineCellar / 100) * 4000;
+ }
+ if (wineCellar >= 40) {
+ bonus += 1600;
+ }
+ if (wineCellar >= 20) {
+ bonus += 800;
+ }
+ if (wineCellar >= 10) {
+ bonus += 400;
+ }
+ if (wineCellar >= 1) {
+ bonus += 200;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Tunnel Rat': function(s) {
- for (var i in shortdungeonnames) if (!s[i]) return 0;
- return 0.1;
+ 'OryxsSanctuary': function (s) {
+ var oryxsSanctuary = s[71];
+ var bonus = 0;
+
+ if (oryxsSanctuary >= 100) {
+ bonus += Math.floor(oryxsSanctuary / 100) * 10000;
+ }
+ if (oryxsSanctuary >= 40) {
+ bonus += 4000;
+ }
+ if (oryxsSanctuary >= 20) {
+ bonus += 2000;
+ }
+ if (oryxsSanctuary >= 10) {
+ bonus += 1000;
+ }
+ if (oryxsSanctuary >= 1) {
+ bonus += 500;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Enemy of the Gods': function(s) {
- return (s[8] / (s[6] + s[8]) > 0.1) ? 0.1 : 0;
+ 'BelladonnasGarden': function (s) {
+ var belladonnasGarden = s[40];
+ var bonus = 0;
+
+ if (belladonnasGarden >= 100) {
+ bonus += Math.floor(belladonnasGarden / 100) * 3000;
+ }
+ if (belladonnasGarden >= 40) {
+ bonus += 1200;
+ }
+ if (belladonnasGarden >= 20) {
+ bonus += 600;
+ }
+ if (belladonnasGarden >= 10) {
+ bonus += 300;
+ }
+ if (belladonnasGarden >= 1) {
+ bonus += 150;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Slayer of the Gods': function(s) {
- return (s[8] / (s[6] + s[8]) > 0.5) ? 0.1 : 0;
+ 'TheMachine': function (s) {
+ var theMachine = s[74];
+ var bonus = 0;
+
+ if (theMachine >= 100) {
+ bonus += Math.floor(theMachine / 100) * 2000;
+ }
+ if (theMachine >= 40) {
+ bonus += 800;
+ }
+ if (theMachine >= 20) {
+ bonus += 400;
+ }
+ if (theMachine >= 10) {
+ bonus += 200;
+ }
+ if (theMachine >= 1) {
+ bonus += 100;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Oryx Slayer': function(s) {
- return s[11] ? 0.1 : 0;
+ 'RainbowRoad': function (s) {
+ var rainbowRoad = s[72];
+ var bonus = 0;
+
+ if (rainbowRoad >= 100) {
+ bonus += Math.floor(rainbowRoad / 100) * 100;
+ }
+ if (rainbowRoad >= 40) {
+ bonus += 40;
+ }
+ if (rainbowRoad >= 20) {
+ bonus += 20;
+ }
+ if (rainbowRoad >= 10) {
+ bonus += 10;
+ }
+ if (rainbowRoad >= 1) {
+ bonus += 5;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Accurate': function(s) {
- return (s[1] / s[0] > 0.25) ? 0.1 : 0;
+ 'MadGodMayhem': function (s) {
+ var madGodMayhem = s[67];
+ var bonus = 0;
+
+ if (madGodMayhem >= 100) {
+ bonus += Math.floor(madGodMayhem / 100) * 3000;
+ }
+ if (madGodMayhem >= 40) {
+ bonus += 1200;
+ }
+ if (madGodMayhem >= 20) {
+ bonus += 600;
+ }
+ if (madGodMayhem >= 10) {
+ bonus += 300;
+ }
+ if (madGodMayhem >= 1) {
+ bonus += 150;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Sharpshooter': function(s) {
- return (s[1] / s[0] > 0.5) ? 0.1 : 0;
+ 'Malogia': function (s) {
+ var malogia = s[68];
+ var bonus = 0;
+
+ if (malogia >= 100) {
+ bonus += Math.floor(malogia / 100) * 2500;
+ }
+ if (malogia >= 40) {
+ bonus += 1000;
+ }
+ if (malogia >= 20) {
+ bonus += 500;
+ }
+ if (malogia >= 10) {
+ bonus += 250;
+ }
+ if (malogia >= 1) {
+ bonus += 125;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Sniper': function(s) {
- return (s[1] / s[0] > 0.75) ? 0.1 : 0;
+ 'Untaris': function (s) {
+ var untaris = s[75];
+ var bonus = 0;
+
+ if (untaris >= 100) {
+ bonus += Math.floor(untaris / 100) * 2500;
+ }
+ if (untaris >= 40) {
+ bonus += 1000;
+ }
+ if (untaris >= 20) {
+ bonus += 500;
+ }
+ if (untaris >= 10) {
+ bonus += 250;
+ }
+ if (untaris >= 1) {
+ bonus += 125;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Explorer': function(s) {
- return (s[3] > 1e6) ? 0.05 : 0;
+ 'Forax': function (s) {
+ var forax = s[61];
+ var bonus = 0;
+
+ if (forax >= 100) {
+ bonus += Math.floor(forax / 100) * 2500;
+ }
+ if (forax >= 40) {
+ bonus += 1000;
+ }
+ if (forax >= 20) {
+ bonus += 500;
+ }
+ if (forax >= 10) {
+ bonus += 250;
+ }
+ if (forax >= 1) {
+ bonus += 125;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Cartographer': function(s) {
- return (s[3] > 4e6) ? 0.05 : 0;
+ 'Katalund': function (s) {
+ var katalund = s[66];
+ var bonus = 0;
+
+ if (katalund >= 100) {
+ bonus += Math.floor(katalund / 100) * 2500;
+ }
+ if (katalund >= 40) {
+ bonus += 1000;
+ }
+ if (katalund >= 20) {
+ bonus += 500;
+ }
+ if (katalund >= 10) {
+ bonus += 250;
+ }
+ if (katalund >= 1) {
+ bonus += 125;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Team Player': function(s) {
- return (s[19] > 100) ? 0.1 : 0;
+ 'BattleForTheNexus': function (s) {
+ var battleForTheNexus = s[38];
+ var bonus = 0;
+
+ if (battleForTheNexus >= 100) {
+ bonus += Math.floor(battleForTheNexus / 100) * 3000;
+ }
+ if (battleForTheNexus >= 40) {
+ bonus += 1200;
+ }
+ if (battleForTheNexus >= 20) {
+ bonus += 600;
+ }
+ if (battleForTheNexus >= 10) {
+ bonus += 300;
+ }
+ if (battleForTheNexus >= 1) {
+ bonus += 150;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Leader of Men': function(s) {
- return (s[19] > 1000) ? 0.1 : 0;
+ 'IceTomb': function (s) {
+ var iceTomb = s[65];
+ var bonus = 0;
+
+ if (iceTomb >= 100) {
+ bonus += Math.floor(iceTomb / 100) * 3000;
+ }
+ if (iceTomb >= 40) {
+ bonus += 1200;
+ }
+ if (iceTomb >= 20) {
+ bonus += 600;
+ }
+ if (iceTomb >= 10) {
+ bonus += 300;
+ }
+ if (iceTomb >= 1) {
+ bonus += 150;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Doer of Deeds': function(s) {
- return (s[12] > 1000) ? 0.1 : 0;
+ 'SantasWorkshop': function (s) {
+ var santasWorkshop = s[73];
+ var bonus = 0;
+
+ if (santasWorkshop >= 100) {
+ bonus += Math.floor(santasWorkshop / 100) * 100;
+ }
+ if (santasWorkshop >= 40) {
+ bonus += 40;
+ }
+ if (santasWorkshop >= 20) {
+ bonus += 20;
+ }
+ if (santasWorkshop >= 10) {
+ bonus += 10;
+ }
+ if (santasWorkshop >= 1) {
+ bonus += 5;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Friend of the Cubes': function(s) {
- return s[10] ? 0 : 0.1;
+ 'Beachzone': function (s) {
+ var beachzone = s[91];
+ var bonus = 0;
+
+ if (beachzone >= 100) {
+ bonus += Math.floor(beachzone / 100) * 100;
+ }
+ if (beachzone >= 40) {
+ bonus += 40;
+ }
+ if (beachzone >= 20) {
+ bonus += 20;
+ }
+ if (beachzone >= 10) {
+ bonus += 10;
+ }
+ if (beachzone >= 1) {
+ bonus += 5;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
},
- 'Well Equipped': function(s, c) {
- // sometimes we encounter bad account data and it breaks muledump
- if ( typeof c !== 'object' || typeof c.Equipment === 'undefined' ) return -1;
- var eq = c.Equipment.split(',');
- var b = 0;
- for (var i = 0; i < 4; i++) {
- var it = items[+eq[i]] || items[-1];
- b += it[5];
+ 'HiddenInterregnum': function (s) {
+ var hiddenInterregnum = s[92];
+ var bonus = 0;
+
+ if (hiddenInterregnum >= 100) {
+ bonus += Math.floor(hiddenInterregnum / 100) * 100;
+ }
+ if (hiddenInterregnum >= 40) {
+ bonus += 40;
+ }
+ if (hiddenInterregnum >= 20) {
+ bonus += 20;
}
- return b * 0.01;
+ if (hiddenInterregnum >= 10) {
+ bonus += 10;
+ }
+ if (hiddenInterregnum >= 1) {
+ bonus += 5;
+ }
+
+ return bonus > 0 ? { mul: 0, add: bonus } : 0;
+ },
+ 'Tunnel Rat': function (s) {
+ for (var i in tunnelrat) if (!s[i]) return 0;
+ return { mul: 0.075, add: 3000 };
+ },
+ 'Explosive Journey': function (s) {
+ for (var i in explosivejourney) if (!s[i]) return 0;
+ return { mul: 0.075, add: 3000 };
+ },
+ 'Travel of the Decade': function (s) {
+ for (var i in travelofthedecade) if (!s[i]) return 0;
+ return { mul: 0.1, add: 5000 };
+ },
+ 'First Steps': function (s) {
+ for (var i in firststeps) if (!s[i]) return 0;
+ return { mul: 0.025, add: 100 };
+ },
+ 'King of the Mountains': function (s) {
+ for (var i in kingofthemountains) if (!s[i]) return 0;
+ return { mul: 0.05, add: 1000 };
},
- 'First Born': function(s, c, d, f) {
- if ( typeof d !== 'object' || typeof d.Account === 'undefined' ) return -1;
- return (d.Account.Stats.BestCharFame < f) ? 0.1: 0;
+ 'Conqueror of the Realm': function (s) {
+ for (var i in conqueroroftherealm) if (!s[i]) return 0;
+ return { mul: 0.1, add: 4000 };
},
+ 'Enemy of the Court': function (s) {
+ for (var i in enemyofthecourt) if (!s[i]) return 0;
+ return { mul: 0.075, add: 3000 };
+ },
+ 'Epic Battles': function (s) {
+ for (var i in epicbattles) if (!s[i]) return 0;
+ return { mul: 0.075, add: 2000 };
+ },
+ 'Far Out': function (s) {
+ for (var i in farout) if (!s[i]) return 0;
+ return { mul: 0.05, add: 2000 };
+ },
+ 'Hero of the Nexus': function (s) {
+ for (var i in heroofthenexus) if (!s[i]) return 0;
+ return { mul: 0.125, add: 5000 };
+ },
+ 'Season’s Beatins': function (s) {
+ for (var i in seasonsbeatins) if (!s[i]) return 0;
+ return { mul: 0.125, add: 5000 };
+ },
+ 'Realm of the Mad God': function (s) {
+ for (var i in realmofthemadgod) if (!s[i]) return 0;
+ return { mul: 0.25, add: 10000 };
+ }
}
-
var goals = {
- 'Tunnel Rat': function(s) {
+ 'Tunnel Rat': function (s) {
var r = [];
- for (var i in shortdungeonnames) {
- if (!s[i]) r.push(shortdungeonnames[i]);
+ for (var i of tunnelrat) {
+ if (!s[i]) r.push(getDisplayDugeon(i, shortpcstats, pcstats));
}
return [r.join(', '), 'dungeons'];
},
- 'Enemy of the Gods': function(s) {
- var x = s[6] / 9 - s[8];
- if (Math.ceil(x) === x) x += 1;
- return [Math.ceil(x), 'god kills'];
- },
- 'Slayer of the Gods': function(s) {
- return [s[6] - s[8] + 1, 'god kills'];
+ 'Explosive Journey': function (s) {
+ var r = [];
+ for (var i of explosivejourney) {
+ if (!s[i]) r.push(getDisplayDugeon(i, shortpcstats, pcstats));
+ }
+ return [r.join(', '), 'dungeons'];
},
- 'Oryx Slayer': function(s) {
- return s[11] ? 0 : [1, 'Oryx kill'];
+ 'Travel of the Decade': function (s) {
+ var r = [];
+ for (var i of travelofthedecade) {
+ if (!s[i]) r.push(getDisplayDugeon(i, shortpcstats, pcstats));
+ }
+ return [r.join(', '), 'dungeons'];
},
- 'Accurate': function(s) {
- var x = (0.25 * s[0] - s[1]) / 0.75;
- if (Math.ceil(x) === x) x += 1;
- return [Math.ceil(x), 'shots'];
+ 'First Steps': function (s) {
+ var r = [];
+ for (var i of firststeps) {
+ if (!s[i]) r.push(getDisplayDugeon(i, shortpcstats, pcstats));
+ }
+ return [r.join(', '), 'dungeons'];
},
- 'Sharpshooter': function(s) {
- var x = (0.5 * s[0] - s[1]) / 0.5;
- if (Math.ceil(x) === x) x += 1;
- return [Math.ceil(x), 'shots'];
+ 'King of the Mountains': function (s) {
+ var r = [];
+ for (var i of kingofthemountains) {
+ if (!s[i]) r.push(getDisplayDugeon(i, shortpcstats, pcstats));
+ }
+ return [r.join(', '), 'dungeons'];
},
- 'Sniper': function(s) {
- var x = (0.75 * s[0] - s[1]) / 0.25;
- if (Math.ceil(x) === x) x += 1;
- return [Math.ceil(x), 'shots'];
+ 'Conqueror of the Realm': function (s) {
+ var r = [];
+ for (var i of conqueroroftherealm) {
+ if (!s[i]) r.push(getDisplayDugeon(i, shortpcstats, pcstats));
+ }
+ return [r.join(', '), 'dungeons'];
},
- 'Explorer': function(s) {
- return [1e6 - s[3] + 1, 'tiles'];
+ 'Enemy of the Court': function (s) {
+ var r = [];
+ for (var i of enemyofthecourt) {
+ if (!s[i]) r.push(getDisplayDugeon(i, shortpcstats, pcstats));
+ }
+ return [r.join(', '), 'dungeons'];
},
- 'Cartographer': function(s) {
- return [4e6 - s[3] + 1, 'tiles'];
+ 'Epic Battles': function (s) {
+ var r = [];
+ for (var i of epicbattles) {
+ if (!s[i]) r.push(getDisplayDugeon(i, shortpcstats, pcstats));
+ }
+ return [r.join(', '), 'dungeons'];
},
- 'Team Player': function(s) {
- return [100 - s[19] + 1, 'party levelups'];
+ 'Far Out': function (s) {
+ var r = [];
+ for (var i of farout) {
+ if (!s[i]) r.push(getDisplayDugeon(i, shortpcstats, pcstats));
+ }
+ return [r.join(', '), 'dungeons'];
},
- 'Leader of Men': function(s) {
- return [1000 - s[19] + 1, 'party levelups'];
+ 'Hero of the Nexus': function (s) {
+ var r = [];
+ for (var i of heroofthenexus) {
+ if (!s[i]) r.push(getDisplayDugeon(i, shortpcstats, pcstats));
+ }
+ return [r.join(', '), 'dungeons'];
},
- 'Doer of Deeds': function(s) {
- return [1000 - s[12] + 1, 'quests'];
+ 'Season’s Beatins': function (s) {
+ var r = [];
+ for (var i of seasonsbeatins) {
+ if (!s[i]) r.push(getDisplayDugeon(i, shortpcstats, pcstats));
+ }
+ return [r.join(', '), 'dungeons'];
},
-}
+ 'Realm of the Mad God': function (s) {
+ var r = [];
+ for (var i of realmofthemadgod) {
+ if (!s[i]) r.push(getDisplayDugeon(i, shortpcstats, pcstats));
+ }
+ return [r.join(', '), 'dungeons'];
+ }
+};
+function getDisplayDugeon(num, shortpcstats, pcstats) {
+ if (shortpcstats[num]) {
+ return shortpcstats[num];
+ } else if (pcstats[num]) {
+ return pcstats[num];
+ } else {
+ return num;
+ }
+}
function readstats(pcstats) {
function readInt32BE(str, idx) {
@@ -222,11 +2385,10 @@ function readstats(pcstats) {
const statsFlagged = [];
let totalFlagsRead = 0;
while (i < end_of_flags) {
- const t = readInt32BE(b,i); i += 4;
- totalFlagsRead += 8*4;
+ const t = readInt32BE(b, i); i += 4;
+ totalFlagsRead += 8 * 4;
while (statsCount < totalFlagsRead) {
- if(t & (1<<(statsCount%(8*4))))
- {
+ if (t & (1 << (statsCount % (8 * 4)))) {
statsFlagged.push(statsCount);
}
statsCount++
@@ -254,7 +2416,7 @@ function readstats(pcstats) {
}
}
else {
- console.error("Failed to properly read PCStats. Found hex (0x"+r.toString(16).padStart(2,'0')+") at the begining of a number. Number was expected to be between 0x00 and 0x3F or between 0x80 and 0xBF. The rest of the PCString read will be corrupted.");
+ console.error("Failed to properly read PCStats. Found hex (0x" + r.toString(16).padStart(2, '0') + ") at the begining of a number. Number was expected to be between 0x00 and 0x3F or between 0x80 and 0xBF. The rest of the PCString read will be corrupted.");
return r;
}
}
@@ -262,17 +2424,16 @@ function readstats(pcstats) {
while (i < b.length) {
stats.push(readNextStat());
}
- if (statsFlagged.length !== stats.length)
- {
- console.error("The falg vector is not consistent with the number of values read from PCStats. There are a different number of flags set ("+statsFlagged.length+") than values in PCStats ("+stats.length+"). The values read from PCStats may be corrupted.")
+ if (statsFlagged.length !== stats.length) {
+ console.error("The falg vector is not consistent with the number of values read from PCStats. There are a different number of flags set (" + statsFlagged.length + ") than values in PCStats (" + stats.length + "). The values read from PCStats may be corrupted.")
}
const r = [];
- for (let j=0; j < statsFlagged.length; j++) {
+ for (let j = 0; j < statsFlagged.length; j++) {
r[statsFlagged[j]] = stats[j];
}
- for (var i in pcstatnames) if (!r[i]) r[i] = 0;
+ for (var i in pcstats) if (!r[i]) r[i] = 0;
return r;
}
@@ -315,7 +2476,7 @@ function printstats(c, d, dogoals, dostats, Mule) {
//tline('', date[2]);
for (var i in st) {
if (!st[i]) continue;
- var sname = pcstatnames[i] || '#' + i;
+ var sname = pcstats[i] || '#' + i;
tline(sname, st[i]);
}
if (st[20] > 59) {
@@ -329,32 +2490,48 @@ function printstats(c, d, dogoals, dostats, Mule) {
}
tline('Active', r.join(' '), 'info');
}
- if (st[0] && st[1]) {
- tline('Accuracy', Math.round(10000 * st[1] / st[0]) / 100 + '%', 'info');
- }
- if (st[8]) {
- tline('God kill ratio', Math.round(10000 * st[8] / (st[6] + st[8])) / 100 + '%', 'info');
- }
if (!fame) return $c;
- for (var k in bonuses) {
- var b = bonuses[k](st, c, d, fame);
- if ( b === -1 ) {
- tline(k, 'Error');
- setuptools.app.muledump.warnData(Mule, 'bonuses', k);
+ var additiveBonus = 0;
+ var multiplicativeBonus = 1;
+ var bonusIncrements = [];
+
+ for (var bonus in bonuses) {
+ var curBonusValue = bonuses[bonus](st, c, d, fame);
+ if (curBonusValue === -1) {
+ tline(bonus, 'Error');
+ setuptools.app.muledump.warnData(Mule, 'bonuses', bonus);
continue;
}
- if (!b) continue;
+ if (!curBonusValue) continue;
+
var incr = 0;
- if (typeof b === 'object') {
- incr += b.add;
- b = b.mul;
+ if (typeof curBonusValue === 'object') {
+ additiveBonus += curBonusValue.add || 0;
+ multiplicativeBonus *= curBonusValue.mul || 1;
+ incr = Math.ceil(fame * curBonusValue.mul) + (curBonusValue.add || 0);
+ } else {
+ additiveBonus += curBonusValue;
+ incr = curBonusValue;
}
- incr += Math.floor(fame * b);
- fame += incr;
- tline(k, '+' + incr, 'bonus');
+
+ bonusIncrements.push({
+ bonus: bonus,
+ incr: incr
+ });
+
+ tline(bonus, '+' + incr, 'bonus');
}
+
+ // Calculate the final fame
+ var calcfame = 0;
+ for (var i = 0; i < bonusIncrements.length; i++) {
+ calcfame += bonusIncrements[i].incr;
+ }
+ fame += calcfame;
+
+ // Log the total fame after applying all bonuses
tline('Total Fame', fame, 'bonus');
return $c;
-}
+}
\ No newline at end of file
diff --git a/lib/muledump/portrait.js b/lib/muledump/portrait.js
index c096037c..396cea9e 100644
--- a/lib/muledump/portrait.js
+++ b/lib/muledump/portrait.js
@@ -174,32 +174,37 @@
});
// apply texture tooltip
- if ( setuptools.data.config.tooltip > 0 && (textures[tex1] || textures[tex2]) ) {
-
- var large;
- var small;
- if ( textures[tex1] ) large = items[textures[tex1][1]];
- if ( textures[tex2] ) small = items[textures[tex2][3]];
-
- if ( setuptools.data.config.tooltipClothing === 1 ) setuptools.app.muledump.tooltip(img, 'mb5 autoHeight', ' \
-
\
- ' + ( (textures[tex1] ) ?
- '
\
-
\
-
' + (textures[tex1][0] || 'Default') + '
\
-
' : ''
- ) + ' \
- ' + ( (textures[tex2] ) ?
- '
\
-
\
-
' + (textures[tex2][2] || 'Default') + '
\
-
' : ''
- ) + '\
-
\
- ');
-
+ if (setuptools.data.config.tooltip > 0 && (textures[tex1] || textures[tex2])) {
+
+ let large = (textures[tex1] && items[textures[tex1][1]])
+ ? items[textures[tex1][1]]
+ : null;
+
+ let small = (textures[tex2] && items[textures[tex2][3]])
+ ? items[textures[tex2][3]]
+ : null;
+
+ if (setuptools.data.config.tooltipClothing === 1) {
+ setuptools.app.muledump.tooltip(
+ img,
+ 'mb5 autoHeight',
+ '
' +
+ (large ?
+ '
' +
+ '
' +
+ '
' + (textures[tex1][0] || 'Default') + '
' +
+ '
' : '') +
+ (small ?
+ '
' +
+ '
' +
+ '
' + (textures[tex2][2] || 'Default') + '
' +
+ '
' : '') +
+ '
'
+ );
+ }
}
+
if (c) return img.attr('src', c);
diff --git a/lib/muledump/staticvars.js b/lib/muledump/staticvars.js
index 478cd491..13eb1485 100644
--- a/lib/muledump/staticvars.js
+++ b/lib/muledump/staticvars.js
@@ -17,103 +17,6 @@ var giftorders = [
}
];
-// predefined vault layouts
-// see https://github.com/jakcodex/muledump/wiki/Vault+Builder for usage information and warnings
-var vaultorders = [
- // vaultlayout=0; compact view
- {
- layoutname: "Compact",
- vaultshowempty: false,
- vaultcompressed: true,
- vaultwidth: 9,
- vaultorder:
- [
- 0, 0, 94, 88, 83, 89, 95, 0, 0,
- 0, 0, 77, 70, 66, 71, 78, 0, 0,
- 0, 0, 58, 53, 49, 54, 59, 0, 0,
- 0, 0, 41, 36, 31, 37, 42, 0, 0,
- 0, 0, 26, 21, 17, 22, 27, 0, 0,
- 0, 0, 14, 12, 11, 13, 15, 0, 0,
- 0, 0, 9, 6, 4, 7, 10, 0, 0,
- 0, 0, 5, 2, 1, 3, 8, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 127,115,103,85, 68, 51, 34, 19,
- 0, 125,113,101,82, 65, 48, 29, 16,
- 137,128,116,104,86, 69, 52, 35, 20,
- 139,131,119,107,93, 76, 57, 40, 25,
- 0, 133,121,109,97, 80, 63, 46, 30,
- 0, 135,123,111,99, 87, 74, 61, 44,
- 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 23, 38, 55, 72, 91, 105,118,130,0,
- 18, 33, 50, 67, 84, 102,114,126,0,
- 24, 39, 56, 73, 92, 106,117,129,138,
- 28, 43, 60, 79, 96, 108,120,132,140,
- 32, 47, 64, 81, 98, 110,122,134,0,
- 45, 62, 75, 90, 100,112,124,136,0
- ]
- },
- // vaultlayout=1; full view
- {
- layoutname: "Full",
- vaultshowempty: false,
- vaultcompressed: true,
- vaultwidth: 19,
- vaultorder:
- [
- 0, 0, 0, 0, 0, 0, 0, 94, 88, 83, 89, 95, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 77, 70, 66, 71, 78, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 58, 53, 49, 54, 59, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 41, 36, 31, 37, 42, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 26, 21, 17, 22, 27, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 14, 12, 11, 13, 15, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 9, 6, 4, 7, 10, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 5, 2, 1, 3, 8, 0, 0, 0, 0, 0, 0, 0,
- 0, 127, 115, 103, 85, 68, 51, 34, 19, 0, 23, 38, 55, 72, 91, 105, 118, 130, 0,
- 0, 125, 113, 101, 82, 65, 48, 29, 16, 0, 18, 33, 50, 67, 84, 102, 114, 126, 0,
- 137, 128, 116, 104, 86, 69, 52, 35, 20, 0, 24, 39, 56, 73, 92, 106, 117, 129, 138,
- 139, 131, 119, 107, 93, 76, 57, 40, 25, 0, 28, 43, 60, 79, 96, 108, 120, 132, 140,
- 0, 133, 121, 109, 97, 80, 63, 46, 30, 0, 32, 47, 64, 81, 98, 110, 122, 134, 0,
- 0, 135, 123, 111, 99, 87, 74, 61, 44, 0, 45, 62, 75, 90, 100,112, 124, 136, 0
- ]
-
- },
- // vaultlayout=2; full view, wide
- {
- layoutname: "Wide",
- vaultshowempty: false,
- vaultcompressed: true,
- vaultwidth: 23,
- vaultorder:
- [
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 94, 88, 83, 89, 95, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 77, 70, 66, 71, 78, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 58, 53, 49, 54, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 36, 31, 37, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 21, 17, 22, 27, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 14, 12, 11, 13, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 6, 4, 7, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 2, 1, 3, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 127, 115, 103, 85, 68, 51, 34, 19, 0, 0, 0, 0, 0, 23, 38, 55, 72, 91, 105, 118, 130, 0,
- 0, 125, 113, 101, 82, 65, 48, 29, 16, 0, 0, 0, 0, 0, 18, 33, 50, 67, 84, 102, 114, 126, 0,
- 137, 128, 116, 104, 86, 69, 52, 35, 20, 0, 0, 0, 0, 0, 24, 39, 56, 73, 92, 106, 117, 129, 138,
- 139, 131, 119, 107, 93, 76, 57, 40, 25, 0, 0, 0, 0, 0, 28, 43, 60, 79, 96, 108, 120, 132, 140,
- 0, 133, 121, 109, 97, 80, 63, 46, 30, 0, 0, 0, 0, 0, 32, 47, 64, 81, 98, 110, 122, 134, 0,
- 0, 135, 123, 111, 99, 87, 74, 61, 44, 0, 0, 0, 0, 0, 45, 62, 75, 90, 100,112, 124, 136, 0
- ]
- },
- // vaultlayout=3; simple view
- {
- layoutname: "Simple",
- vaultshowempty: false,
- vaultcompressed: true,
- vaultwidth: 5,
- vaultorder: []
- }
-];
-
-// populate simple view vaultorder
-for ( var i = 1; i <= 250; i++ ) vaultorders[3].vaultorder.push(i);
-
// used for rate limiting management
var RateLimitExpiration = '';
try {
diff --git a/lib/muledump/totals.js b/lib/muledump/totals.js
index 75957d81..50b45c82 100644
--- a/lib/muledump/totals.js
+++ b/lib/muledump/totals.js
@@ -47,7 +47,7 @@ function init_totals() {
}
// count types totals
- var types = ['inv', 'backpack', 'equipment', 'vaults', 'potions', 'gifts'];
+ var types = ['inv', 'backpack', 'equipment', 'vaults', 'potions', 'gifts', 'spoils', 'materials', 'petinv', 'ssnlpetinv', 'hpmp'];
for (var x = 0; x < types.length; x++) {
// if totalsGlobal is false then we only display items enabled in options
@@ -190,7 +190,7 @@ function update_totals() {
// count items
*/
setuptools.app.uaTiming('totals', 'calculate', 'start', 'aggregate');
- var types = ['inv', 'backpack', 'equipment', 'vaults', 'potions', 'gifts'];
+ var types = ['inv', 'backpack', 'equipment', 'vaults', 'potions', 'gifts', 'spoils', 'materials', 'petinv', 'ssnlpetinv', 'hpmp'];
// scan over each mule's precalculated items to determine totals display
if ( setuptools.data.options.totalsGlobal === false ) {
diff --git a/lib/mulelogin.au3 b/lib/mulelogin.au3
deleted file mode 100644
index 1b5b1445..00000000
--- a/lib/mulelogin.au3
+++ /dev/null
@@ -1,339 +0,0 @@
-;;
-;; One Click Login v2
-;; + Runtime parameter support
-;; + https://github.com/jakcodex/muledump/wiki/One+Click+Login for more information
-;;
-;; If configuring via Muledump then you don't need to change anything in this file.
-;; Be sure to run the script with AutoIt and choose "reinstall" if prompted.
-;;
-
-Global $config = ObjCreate("Scripting.Dictionary")
-
-;; select mode (accepts: browser, flash)
-$config.Add("mode", "browser");
-
-;; path to use for browser
-$config.Add("path", "https://www.realmofthemadgod.com/legacy");
-
-;; path to use for flash projector
-;; $config.Add("path", "c:\users\me\Downloads\flashplayer_18.exe");
-
-;; path to the game client
-$config.Add("client", "https://www.realmofthemadgod.com/client");
-
-;; run in admin mode
-$config.Add("admin", "false");
-
-;; enable runtime parameter support
-$config.Add("params", "true")
-
-;; enable setting admin permissions via runtime params
-$config.Add("adminparams", "false")
-
-;; enforce parameter security
-$config.Add("paramsecurity", "true")
-
-;; parameter separator
-$config.Add("paramseparator", "++++")
-
-;; output debugging information
-$config.Add("debug", "false")
-
-;; search paths
-$config.Add("paths", "localhost,www.realmofthemadgod.com,test.realmofthemadgod.com,#localWithNet")
-
-;; default window title
-$config.Add("title", "Muledump One Click Login")
-
-;; account ign (included by request)
-$config.Add("ign", "");
-
-#include
-#include
-#include
-
-Global $string, $password, $email, $data, $path, $search, $file, $root
-$root = "HKEY_CLASSES_ROOT\muledump"
-$title = "Muledump One Click Login Installer"
-$adminRightsError = "Error - Requires Admin Privileges" & @CRLF & @CRLF & "Either edit mulelogin.au3 in a text editor and set 'admin' to true in the config or update your request parameters" & @CRLF & @CRLF & "For more help see:" & @CRLF & "https://github.com/jakcodex/muledump/wiki/One-Click-Login"
-
-Func _GetAdminRights()
- If Not IsAdmin() and $config.Item("admin") == "true" Then
- ShellExecute(@AutoItExe, $CmdLineRaw, "", "runas")
- ProcessClose(@AutoItPID)
- Exit
- EndIf
-EndFunc
-
-Func _error($msg='There was an error')
- MsgBox(0, "Error", $msg)
- ConsoleWrite("state:false")
- Exit
-EndFunc
-
-Func _write()
- RegWrite($root,"","REG_SZ","URL: muledump Protocol")
- RegWrite($root,"URL Protocol","REG_SZ","")
- RegWrite($root & "\shell")
- RegWrite($root & "\shell\open")
- RegWrite($root & "\shell\open\command","","REG_SZ", @AutoItExe & ' "' & @ScriptFullPath & '" %1')
- If RegRead("HKEY_CLASSES_ROOT\muledump","") Then
- MsgBox(64,$title,"One Click Login: installed" & @CRLF & @CRLF & "Now go to Muledump and click Setup > Settings > One Click Login to finish setup")
- Else
- MsgBox(16,$title,$adminRightsError)
- EndIf
- Exit
-EndFunc
-
-Func _install()
- $config.Item('admin') = 'true';
- _GetAdminRights()
- Local $k
- $k = RegEnumKey($root, 1)
- If @error == 2 Then
- MsgBox(16,$title,$adminRightsError)
- Exit
- EndIf
- If @error == 1 Then _write()
- $k = MsgBox(6 + 32, $title, _
- 'One Click Login is already installed.' & @CRLF & @CRLF & 'What would you like to do?' & @CRLF & @CRLF & _
- '"Cancel" to do nothing' & @CRLF & _
- '"Try Again" to reinstall' & @CRLF & _
- '"Continue" to uninstall')
- If $k == 10 Then _write()
- If $k == 11 Then
- RegDelete($root)
- if @error <> 0 Then
- MsgBox(16,$title,$adminRightsError)
- Else
- MsgBox(64,$title,"One Click Login: uninstalled")
- EndIf
- EndIf
- Exit
-EndFunc
-
-Func _length($string)
- Local $binlength, $declength, $array, $result
- $declength = StringLen($string)/2
- While $declength > 0
- $binlength &= Mod($declength,2)
- $declength = Floor($declength/2)
- WEnd
- $binlength = StringReverse($binlength)
- if @error <> 0 Then
- $binlength = _StringReverse($binlength)
- EndIf
- $binlength = $binlength & "1"
- $array = StringSplit($binlength,"")
- For $i = 1 To $array[0]
- $array[0] -= 1
- If $array[$i] = "1" Then $result += 2 ^ ($array[0])
- Next
- Return Hex(Int($result),2)
-EndFunc
-
-Func _build()
- ;header
- $string = "0x 00 BF" ;Magic Number 2 bytes
- $string &= "?? ?? ?? ??" ;Size 4 bytes
- $string &= "54 43 53 4F 00 04 00 00 00 00" ;Marker 10 bytes
- $string &= "00 05" ;Name Size 2 bytes
- $string &= "52 6F 74 4D 47" ;"RotMG" 5 bytes
- $string &= "00 00 00" ;Padding 3 bytes
- $string &= "03" ;AMF Version 1 byte
-
- ;data
- $string &= "11" ;Length 1 byte
- $string &= "50 61 73 73 77 6F 72 64" ;"Password" 8 bytes
- $string &= "06" ;Type (string) 1 byte
- $string &= _length($password) ;Length 1 byte
- $string &= $password ;Actual Password ? bytes
- $string &= "00" ;AMF Padding 1 byte
-
- $string &= "09" ;Length 1 byte
- $string &= "47 55 49 44" ;"GUID" 4 bytes
- $string &= "06" ;Type (string) 1 byte
- $string &= _length($email) ;Length 1 byte
- $string &= $email ;Email ? bytes
- $string &= "00" ;AMF Padding 1 byte
-
- $string = StringReplace($string," ","")
- $string = StringRegExpReplace($string,"\?{8}",Hex(Int(StringLen(StringMid($string,15))/2)))
-EndFunc
-
-Func _ProcessGetHWnd($iPid, $iOption = 1, $sTitle = "", $iTimeout = 2000)
- Local $aReturn[1][1] = [[0]], $aWin, $hTimer = TimerInit()
-
- While 1
-
- ; Get list of windows
- $aWin = WinList($sTitle)
-
- ; Searches thru all windows
- For $i = 1 To $aWin[0][0]
-
- ; Found a window owned by the given PID
- If $iPid = WinGetProcess($aWin[$i][1]) Then
-
- ; Option 0 or 1 used
- If $iOption = 1 OR ($iOption = 0 And $aWin[$i][0] <> "") Then
- Return $aWin[$i][1]
-
- ; Option 2 is used
- ElseIf $iOption = 2 Then
- ReDim $aReturn[UBound($aReturn) + 1][2]
- $aReturn[0][0] += 1
- $aReturn[$aReturn[0][0]][0] = $aWin[$i][0]
- $aReturn[$aReturn[0][0]][1] = $aWin[$i][1]
- EndIf
- EndIf
- Next
-
- ; If option 2 is used and there was matches then the list is returned
- If $iOption = 2 And $aReturn[0][0] > 0 Then Return $aReturn
-
- ; If timed out then give up
- If TimerDiff($hTimer) > $iTimeout Then ExitLoop
-
- ; Waits before new attempt
- Sleep(Opt("WinWaitDelay"))
- WEnd
-
-
- ; No matches
- SetError(1)
- Return 0
-EndFunc
-
-If $CmdLine[0] = 0 Then _install()
-
-;; process the command input
-$data = StringReplace($CmdLine[1],"muledump:","")
-$data = StringSplit($data,"-")
-$email = $data[1]
-$password = $data[2]
-
-;; if parameters were passed we will parse them into the runtime config
-If UBound($data) == 4 and $config.Item("params") == "true" Then
-
- $params = StringSplit($data[3], $config.Item("paramseparator"))
- If IsArray($params) Then
-
- Local Const $paramsLength = UBound($params)
- For $i = 0 To $paramsLength-1
-
- $paramPieces = StringSplit($params[$i], "=")
- If IsArray($paramPieces) Then
- If $config.Exists($paramPieces[1]) Then
-
- If $paramPieces[1] == "paramsecurity" Then ContinueLoop
-
- ;; supplied path must be one of the already configured paths
- If $config.Item("paramsecurity") == "true" and $paramPieces[1] == "paths" Then
- Local $result = StringInStr($config.Item("paths"), $paramPieces[2])
- If @error or $result == 0 Then _error("Invalid paths provided")
- EndIf
-
- If $config.Item("paramsecurity") == "true" and $paramPieces[1] == "admin" and $config.Item("adminparams") == "false" Then ContinueLoop
- If $paramPieces[2] == "" Then ContinueLoop
-
- $config.Item($paramPieces[1]) = $paramPieces[2]
- $config.Item($paramPieces[1]) = StringReplace($config.Item($paramPieces[1]), "%5C", "\")
- $config.Item($paramPieces[1]) = StringReplace($config.Item($paramPieces[1]), "%2F", "/")
-
- EndIf
- EndIf
-
- Next
- EndIf
-EndIf
-
-;; obtain admin privileges if enabled
-_GetAdminRights()
-
-;; display debugging information
-If $config.Item("debug") == "true" Then
- MsgBox(0, "Config", "admin => " & $config.Item("admin") & @CRLF & "mode => " & $config.Item("mode") & @CRLF & "path => " & $config.Item("path") & @CRLF & "paths => " & $config.Item("paths") & @CRLF);
-EndIf
-
-_build()
-
-Local $paths_base[2] = [ _
- @AppDataDir & "\Macromedia\Flash Player\#SharedObjects\", _
- @LocalAppDataDir & "\Google\Chrome\User Data\Default\Pepper Data\Shockwave Flash\WritableRoot\#SharedObjects\" _
-]
-Local $paths = StringSplit($config.Item("paths"), ",", 2)
-For $path_base In $paths_base
- $search = FileFindFirstFile($path_base & "*")
-
- ; flash was never run from this application,
- ; prevent generating degenerate folder stucture
- if @error Then ContinueLoop
-
- While 1
- $sandbox = FileFindNextFile($search)
-
- ; no more sandboxes
- If @error Then ExitLoop
-
- ; verify that the folder name corresponds to a sandbox id (8 uppercase chars)
- if StringLen($sandbox) = 8 And StringUpper($sandbox) == $sandbox Then
- For $gameDir In $paths
- $gameFilePath = $path_base & $sandbox & "\" & $gameDir & "\RotMG.sol"
- $file = FileOpen($gameFilePath,26)
- FileWrite($file,$string)
- FileClose($file)
- Next
- EndIf
- WEnd
-Next
-FileClose($search)
-
-;;
-; launch one-click login
-;;
-
-Global $pid = 0
-If $config.Item("mode") == "browser" Then
-
- If $config.Item("params") == "true" and $config.Item("paramsecurity") == "true" Then
- Local $result = StringRegExp($config.Item("path"), "^https://(realmofthemadgodhrd\.appspot.com|(([a-zA-Z0-9]*)\.(realmofthemadgod\.com)))(\/?|\/[a-zA-Z0-9-_]*?)$");
- If @error or $result == 0 Then _error("Invalid path provided: " & $config.Item("path") & @CRLF & @CRLF & "If the value is correct then try disabling param security in the au3 file config.")
- EndIf
-
- ShellExecute($config.Item("path"))
-
-ElseIf $config.Item("mode") == "flash" Then
-
- If $config.Item("params") == "true" and $config.Item("paramsecurity") == "true" Then
- Local $result
- $result = StringRegExp($config.Item("path"), "^[a-zA-Z]:\\[a-zA-Z0-9-_\\]*?(flashplayer|flash|flashprojector|flashplayer_[a-zA-Z0-9-_\.]*?)\.exe$");
- If @error or $result == 0 Then _error("Invalid path provided: " & $config.Item("path") & @CRLF & @CRLF & "If the value is correct then try disabling param security in the au3 file config.")
-
- $result = StringRegExp($config.Item("client"), "^(https://([a-zA-Z0-9]*)\.(realmofthemadgod\.com)(\/?|\/.*)|[a-zA-Z]:\\.*?AssembleeGameClient[0-9]*\.swf)$");
- If @error or $result == 0 Then _error("Invalid client provided: " & $config.Item("client") & @CRLF & @CRLF & "If the value is correct then try disabling param security in the au3 file config.")
- EndIf
-
- $pid = Run($config.Item("path") & " " & $config.Item("client"))
-
- If $pid > 0 And Not($config.Item("title") == "" Or $config.Item("title") == "false") Then
- Local $name = $config.Item("title")
- If Not($config.Item("ign") == "") Then
- $name &= " - " & $config.Item("ign")
- EndIf
- Local $win = _ProcessGetHWnd($pid)
- WinSetTitle($win, "", $name)
- EndIf
-
-Else
-
- MsgBox(0, "Error", "Invalid mode provided. Valid modes are: browser, flash")
-
-EndIf
-
-;;
-;; Are you looking to customize your One Click Login? This new version can be customized in Muledump!
-;; Check out the wiki for more information: https://github.com/jakcodex/muledump/wiki/One-Click-Login
-;;
-;; Don't want to customize in Muledump? Head up to the top of the file to modify the configuration.
-;;
diff --git a/lib/ocl-exalt.au3 b/lib/ocl-exalt.au3
index 0302297c..34ac7275 100644
--- a/lib/ocl-exalt.au3
+++ b/lib/ocl-exalt.au3
@@ -265,10 +265,23 @@ EndFunc ;==>_ComputeClientTokenOld
Func _GetLoginData($guid, $password, $clientToken)
$verify_url = "https://www.realmofthemadgod.com/account/verify"
- $verify_data = _
+ ;if guid contains : and no @ steam check
+ If StringInStr($guid, ":") > 0 And StringInStr($guid, "@") == 0 Then
+ $verify_data = _
+ "guid=" & $guid & _
+ "&secret=" & $password & _
+ "&clientToken=" & $clientToken & _
+ "&game_net=" & "Unity_steam" & _
+ "&play_platform=" & "Unity_steam"
+ ;"&steamid=" & StringSplit($guid, ":")[2] & _
+ ;"&game_net_user_id=" & StringSplit($guid, ":")[2]
+ Else
+ $verify_data = _
"guid=" & _URLEncode($guid) & _
"&password=" & _URLEncode($password) & _
"&clientToken=" & $clientToken
+ EndIf
+
$verify_resp = _POST($verify_url, $verify_data)
$accessToken = StringRegExp($verify_resp, "(.+) ", $STR_REGEXPARRAYMATCH)
@@ -316,7 +329,6 @@ $password = _HexToString($data[2])
;; if parameters were passed we will parse them into the runtime config
If UBound($data) == 4 and $config.Item("params") == "true" Then
-
$params = StringSplit($data[3], $config.Item("paramseparator"))
If IsArray($params) Then
@@ -344,6 +356,7 @@ If UBound($data) == 4 and $config.Item("params") == "true" Then
EndIf
EndIf
+
;; obtain admin privileges if enabled
_GetAdminRights()
@@ -359,24 +372,28 @@ EndIf
Global $pid = 0
If $config.Item("mode") == "exalt" Then
+ ;; If no path is provided then we will use the default path
+ If StringInStr($config.Item("path"), "%USERPROFILE%") > 0 Then
+ $config.Item("path") = StringReplace($config.Item("path"), "%USERPROFILE%", @UserProfileDir)
+ EndIf
+
If $config.Item("params") == "true" and $config.Item("paramsecurity") == "true" Then
Local $result
- ;; the exe has a particular filename
$result = StringRegExp($config.Item("path"), "^[a-zA-Z]:\\[a-zA-Z0-9-_\\]*?RotMG Exalt\.exe$");
If @error or $result == 0 Then _error("Invalid path provided: " & $config.Item("path") & @CRLF & @CRLF & "If the value is correct then try disabling param security in the au3 file config.")
;; username should be valid base64
-;; $result = StringRegExp($username, "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$");
-;; If @error or $result == 0 Then _error("Invalid username provided. " & @CRLF & @CRLF & "If the value is correct then try disabling param security in the au3 file config.")
+ ;; $result = StringRegExp($username, "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$");
+ ;; If @error or $result == 0 Then _error("Invalid username provided. " & @CRLF & @CRLF & "If the value is correct then try disabling param security in the au3 file config.")
;; password should be valid base64
-;; $result = StringRegExp($password, "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$");
-;; If @error or $result == 0 Then _error("Invalid password provided. " & @CRLF & @CRLF & "If the value is correct then try disabling param security in the au3 file config.")
-
+ ;; $result = StringRegExp($password, "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$");
+ ;; If @error or $result == 0 Then _error("Invalid password provided. " & @CRLF & @CRLF & "If the value is correct then try disabling param security in the au3 file config.")
EndIf
+
$args = _GetLoginData($username, $password, $CmdLine[2])
$pid = ShellExecute($config.Item("path"), $args, "c:\")
diff --git a/lib/renders.png b/lib/renders.png
index 2ed1bcdd..652edc00 100644
Binary files a/lib/renders.png and b/lib/renders.png differ
diff --git a/lib/setuptools/css/setuptools.css b/lib/setuptools/css/setuptools.css
index 3c60f070..8331b12c 100644
--- a/lib/setuptools/css/setuptools.css
+++ b/lib/setuptools/css/setuptools.css
@@ -2072,101 +2072,6 @@ div.wbimportoptions > div {
justify-content: space-between;
}
-#vaultbuilder > div.manager > div {
- width: 46px;
- height: 46px;
- margin: 5px;
- padding: 2px 4px;
- font-weight: bold;
- display: flex;
- justify-content: flex-start;
- align-items: flex-start;
- cursor: pointer;
- transition: 0.15s linear;
-}
-
-#vaultbuilder > div.manager > div:hover {
- box-shadow: 0 0 6px #000000 inset;
-}
-
-#vaultbuilder > div.manager > div > span {
- width: 42px;
- height: 14px;
-}
-
-#vaultbuilder > div.manager > div > span > input {
- width: 100%;
- height: 100%;
- background-color: transparent;
- border: 0;
- padding: 0;
-}
-
-#vaultbuilder > div.manager > div.blank {
- background-color: #444;
-}
-
-#vaultbuilder > div.manager > div.blank:hover {
- background-color: #555;
-}
-
-#vaultbuilder > div.manager > div.blank.drag.bright:hover {
- background-color: #777;
-}
-
-#vaultbuilder > div.manager > div.opened {
- background: url(../../media/chest-opened.png) #3a88a5;
-}
-
-#vaultbuilder > div.manager > div.opened:hover {
- background-color: #8cc1cd;
-}
-
-#vaultbuilder > div.manager > div.opened.drag.bright:hover {
- background-color: #a4dae6;
-}
-
-#vaultbuilder > div.manager > div.closed {
- background: url(../../media/chest-closed.png) #666;
-}
-
-#vaultbuilder > div.manager > div.closed:hover {
- background-color: #a58c36;
-}
-
-#vaultbuilder > div.manager > div.closed.drag.bright:hover {
- background-color: #cdb43a;
-}
-
-#vaultbuilder div.uimenu {
- justify-content: space-evenly;
- width: 600px;
- height: 120px;
- background-color: #333;
- border: #555 solid 2px;
- padding: 10px;
- flex-wrap: wrap;
-}
-
-#vaultbuilder div.uimenu > div {
- height: 100%;
- justify-content: space-evenly;
- align-items: flex-start;
-}
-
-#vaultbuilder div.uimenu > div > div:not(:last-child) {
- width: 33%;
- flex-flow: column;
- justify-content: flex-start;
-}
-
-#vaultbuilder div.uimenu > div > div:last-child {
- width: 33%;
- flex-flow: column;
- justify-content: space-between;
- height: 100%;
-}
-
div.simpleForm.vaultbuilder input,
div.simpleForm.vaultbuilder select {
width: 100%;
@@ -2182,168 +2087,4 @@ div.simpleForm.vaultbuilder div.menuStyle.half {
height: 17px;
}
-.conflict {
- border: 2px red dashed !important;
-}
-
-.simpleForm .selected {
- border: 2px #BBBBBB dashed !important;
-}
-
-div.simpleForm > div.input > div {
- display: flex;
- width: 100%;
- justify-content: center;
- align-items: center;
- flex-wrap: wrap;
-}
-
-div.simpleForm input,
-div.simpleForm select {
- background-color: transparent;
- outline: 0;
- border: solid 2px #707070;
- padding: 4px;
- color: #ffffff;
-}
-
-.inputfile {
- width: 0.1px;
- height: 0.1px;
- opacity: 0;
- overflow: hidden;
- position: absolute;
- z-index: -1;
-}
-
-/*
-.inputfile + label {
- font-size: 1.25em;
- font-weight: 700;
- color: white;
- background-color: black;
- display: inline-block;
-}
-
-.inputfile:focus + label,
-.inputfile + label:hover {
- background-color: red;
-}
-*/
-
-div.ocl.manager {
- display: flex;
- width: 100%;
- justify-content: center;
- align-items: flex-start;
-}
-
-div.ocl.manager input {
- padding-left: 7px;
-}
-
-div.ocl.manager select,
-div.ocl.manager input {
- width: 100%;
- display: flex;
- flex-shrink: 1;
-}
-
-div.ocl.manager > div {
- display: flex;
- justify-content: center;
- align-items: center;
- flex-wrap: wrap;
-}
-
-div.ocl.manager > div:first-child {
- width: 60%;
-}
-
-div.ocl.manager > div:last-child {
- width: 40%;
-}
-
-div.ocl.configuration > div {
- justify-content: flex-start;
- display: flex;
- width: 100%;
-}
-
-div.ocl.configuration > div:not(:last-child) {
- margin-bottom: 5px;
-}
-
-div.ocl.configuration > div > div {
- display: flex;
- align-items: center;
-}
-
-div.ocl.configuration > div > div:first-child {
- width: 30%;
-}
-
-div.ocl.configuration > div > div:last-child {
- justify-content: center;
- width: 70%;
-}
-
-div.ocl.profiles {
- margin-left: 20px;
- border: #00b0fc solid 2px;
- flex-wrap: wrap;
- max-height: 250px;
-}
-
-div.ocl.profiles > div:not(:first-child) {
- cursor: pointer;
-}
-
-div.ocl.profiles > div:first-child {
- background-color: #1f2a34;
- font-size: 14px;
-}
-
-div.ocl.profiles > div.link {
- background-color: #28333b;
- transition: 0.2s linear;
-}
-
-div.ocl.profiles > div.link:hover {
- background-color: #2b3441;
-}
-
-div.ocl.profiles > div {
- display: flex;
- width: 100%;
- justify-content: center;
- align-items: center;
- padding: 5px;
- transition: 0.2s linear;
-}
-
-div.ocl.profiles > div:not(:first-child):not(.link):nth-child(even) {
- background-color: #333333;
-}
-
-div.ocl.profiles > div:not(:first-child):not(.link):nth-child(even):hover {
- background-color: #393939;
-}
-
-div.ocl.profiles > div:not(:first-child):not(.link):nth-child(odd) {
- background-color: #222222;
-}
-
-div.ocl.profiles > div:not(:first-child):not(.link):nth-child(odd):hover {
- background-color: #292929;
-}
-
-div.muledump.configviewer:nth-child(even),
-div.muledump.consoleviewer:nth-child(even){
- background-color: #444444;
-}
-
-div.muledump.configviewer:nth-child(odd),
-div.muledump.consoleviewer:nth-child(odd){
- background-color: #333333;
-}
+/* ...existing code... */
diff --git a/lib/setuptools/src/accounts.js b/lib/setuptools/src/accounts.js
index 7b181e46..7f0001ce 100644
--- a/lib/setuptools/src/accounts.js
+++ b/lib/setuptools/src/accounts.js
@@ -244,8 +244,7 @@ setuptools.app.accounts.manager = function() {
timer: 'accountMenuHoverClose'
}
];
-
- if ( setuptools.data.config.mulelogin === 1 && AccountsList[listPos].username.match(setuptools.config.regex.guid) === null ) options.push({
+ if ( setuptools.data.config.mulelogin === 1 ) options.push({
class: 'OCLMenuOpen',
name: "OCL: " + ( ( setuptools.app.muledump.ocl.get(AccountsList[listPos].oclProfile) !== false ) ? AccountsList[listPos].oclProfile : 'Default' ),
callback: function() {
diff --git a/lib/setuptools/src/classes.js b/lib/setuptools/src/classes.js
index f947522c..c4316ffc 100644
--- a/lib/setuptools/src/classes.js
+++ b/lib/setuptools/src/classes.js
@@ -150,7 +150,12 @@ class Muledump_TotalsCounter {
backpack: {},
vaults: {},
potions: {},
- gifts: {}
+ gifts: {},
+ spoils: {},
+ materials: {},
+ ssnlpetinv: {},
+ petinv: {},
+ hpmp: {}
},
totals: {}
});
diff --git a/lib/setuptools/src/config.js b/lib/setuptools/src/config.js
index aae1c1ef..f9f2ed0b 100644
--- a/lib/setuptools/src/config.js
+++ b/lib/setuptools/src/config.js
@@ -53,6 +53,16 @@ setuptools.app.config.settings = function(highlight, section) {
' + i + ' \
');
+ setuptools.lightbox.build('settings', ' \
+ \
+ \
@@ -759,6 +769,8 @@ setuptools.app.config.settings = function(highlight, section) {
settings.automaticBackups = ( $('.setuptools.app.config.settings select[name="automaticBackups"]').val() === '1' );
settings.badaccounts = Number($('.setuptools.app.config.settings select[name="badaccounts"]').val());
settings.rowlength = Number($('.setuptools.app.config.settings select[name="rowlength"]').val());
+ settings.rowwrap = ($('.setuptools.app.config.settings select[name="rowwrap"]').val() === 'yes' ? true : false);
+ console.log(($('.setuptools.app.config.settings select[name="rowwrap"]').val() === 'yes' ? true : false));
settings.accountLoadDelay = Number($('.setuptools.app.config.settings select[name="accountLoadDelay"]').val());
settings.totalswidth = Number($('.setuptools.app.config.settings select[name="totalswidth"]').val());
settings.mulelogin = ( $('.setuptools.app.config.settings select[name="mulelogin"]').val() === '1' ) ? 1 : 0;
@@ -807,6 +819,8 @@ setuptools.app.config.settings = function(highlight, section) {
// not all settings are managed here
settings.mqDisplayIgn = setuptools.data.config.mqDisplayIgn;
+ settings.temprowlength = 0;
+
// for validation
setuptools.tmp.settingsKeysSave = {};
Object.keys(settings).forEach(function(key) {
diff --git a/lib/setuptools/src/devtools.js b/lib/setuptools/src/devtools.js
index b16ae242..08042272 100644
--- a/lib/setuptools/src/devtools.js
+++ b/lib/setuptools/src/devtools.js
@@ -149,9 +149,13 @@ setuptools.app.devtools.viewSystemsReport = function() {
setuptools.app.devtools.ui = function() {
setuptools.lightbox.build('devtools', ' \
-