About: Calculators/Code   Sponge Permalink

An Entity of Type : owl:Thing, within Data Space : 134.155.108.49:8890 associated with source dataset(s)

// {{protected|reason}} /*jslint devel: true, browser: true, white: true, indent: 2, plusplus: true, bitwise: true*/ /*global $, wgUserName, mw */ (function () { //__NOWYSIWYG__ calculator_numcs = function (n) { n = String(n); while ((/\d{4}/).test(n)) { n = n.replace(/(\d{3},|\d{3}$)/, ',$1'); } return n; }, calculator_btn_m = function (o) { $(o).prev().val(parseInt($(o).prev().val(), 10) - 1); $(o).prev().keyup(); }, calculator_btn_p = function (o) { $(o).prev().prev().val(parseInt($(o).prev().prev().val(), 10) + 1); $(o).prev().prev().keyup(); }, calculator_array_sort = function (inputArr, numeric, by_key, reverse, sub_key) { var tmp_arr = {}, valArr = [], keyArr = [], keys = [], sorter, i, k, populateArr = [], is_numeric = function (v) { v = parseFloat(v); return (typeof v === 'numbe

AttributesValues
rdfs:label
  • Calculators/Code
rdfs:comment
  • // {{protected|reason}} /*jslint devel: true, browser: true, white: true, indent: 2, plusplus: true, bitwise: true*/ /*global $, wgUserName, mw */ (function () { //__NOWYSIWYG__ calculator_numcs = function (n) { n = String(n); while ((/\d{4}/).test(n)) { n = n.replace(/(\d{3},|\d{3}$)/, ',$1'); } return n; }, calculator_btn_m = function (o) { $(o).prev().val(parseInt($(o).prev().val(), 10) - 1); $(o).prev().keyup(); }, calculator_btn_p = function (o) { $(o).prev().prev().val(parseInt($(o).prev().prev().val(), 10) + 1); $(o).prev().prev().keyup(); }, calculator_array_sort = function (inputArr, numeric, by_key, reverse, sub_key) { var tmp_arr = {}, valArr = [], keyArr = [], keys = [], sorter, i, k, populateArr = [], is_numeric = function (v) { v = parseFloat(v); return (typeof v === 'numbe
  • // File:Lock Icon.png This page is protected to prevent harmful edits. Contact an administrator if you want to suggest changes to the page. If you think this page should be unprotected, then use {{unprotect}} on the talk page. Reason: this page contains javascript and therefor VERY vulnerable to vandalism or hackers /*jslint devel: true, browser: true, white: true, indent: 2, plusplus: true, bitwise: true*/ /*global $, wgUserName, mw */ (function () { //__NOWYSIWYG__ /*General*/ 'use strict'; var npcs_locations = { /* Took from Template:NPC_Trades/City */ 'A Bearded Woman': 'Carlin*', 'A Beautiful Girl': 'Yalahar*', 'A Confused Frog': 'Thais*', 'A Dark Priestess': 'Edron*', 'A Dead Bureaucrat': 'Venore*', 'A Dwarven Ghost': 'Kazordoon*', 'A Fading Memory': 'Yalahar*', 'A Fluffy Squi
dbkwik:necronianew...iPageUsesTemplate
dbkwik:tibia/prope...iPageUsesTemplate
abstract
  • // {{protected|reason}} /*jslint devel: true, browser: true, white: true, indent: 2, plusplus: true, bitwise: true*/ /*global $, wgUserName, mw */ (function () { //__NOWYSIWYG__ calculator_numcs = function (n) { n = String(n); while ((/\d{4}/).test(n)) { n = n.replace(/(\d{3},|\d{3}$)/, ',$1'); } return n; }, calculator_btn_m = function (o) { $(o).prev().val(parseInt($(o).prev().val(), 10) - 1); $(o).prev().keyup(); }, calculator_btn_p = function (o) { $(o).prev().prev().val(parseInt($(o).prev().prev().val(), 10) + 1); $(o).prev().prev().keyup(); }, calculator_array_sort = function (inputArr, numeric, by_key, reverse, sub_key) { var tmp_arr = {}, valArr = [], keyArr = [], keys = [], sorter, i, k, populateArr = [], is_numeric = function (v) { v = parseFloat(v); return (typeof v === 'number' && !isNaN(v)); }, bubbleSort = function (keyArr, inputArr, sub_key) { var i, j, tempValue, tempKeyVal, ret; for (i = inputArr.length - 2; i >= 0; i--) { for (j = 0; j <= i; j++) { ret = (sub_key === '') ? sorter(inputArr[j + 1], inputArr[j]) : sorter((typeof inputArr[j + 1].resist[sub_key] === 'undefined' ? inputArr[j + 1][sub_key] : inputArr[j + 1].resist[sub_key]), (typeof inputArr[j].resist[sub_key] === 'undefined' ? inputArr[j][sub_key] : inputArr[j].resist[sub_key])); if (ret < 0) { tempValue = inputArr[j]; inputArr[j] = inputArr[j + 1]; inputArr[j + 1] = tempValue; tempKeyVal = keyArr[j]; keyArr[j] = keyArr[j + 1]; keyArr[j + 1] = tempKeyVal; } } } }; if (typeof numeric === 'undefined') { numeric = false; } if (typeof by_key === 'undefined') { by_key = false; } if (typeof reverse === 'undefined') { reverse = false; } if (typeof sub_key === 'undefined') { sub_key = ''; } if (numeric) { sorter = function (a, b) { return (reverse ? b - a : a - b); }; } else { sorter = function (a, b) { var x = a, y = b, tmp; if (!is_numeric(a) && !is_numeric(b)) { tmp = (function (a, b) {a = a.search(/[a-z]/); b = b.search(/[a-z]/); if ((a !== 0 && b !== 0) || a === b) {return 0; } if (a === 0) {return -1; } if (b === 0) {return 1; } }(x, y)); if (tmp !== 0) { return tmp * (reverse ? -1 : 1); } if (a === b) { return 0; } if (a > b) { return (reverse ? -1 : 1); } return (reverse ? 1 : -1); } a = parseFloat(a) || 0; b = parseFloat(b) || 0; return (reverse ? b - a : a - b); }; } if (by_key) { for (k in inputArr) { if (inputArr.hasOwnProperty(k)) { keys.push(k); } }/*Make a list of key names*/ keys.sort(sorter); for (i = 0; i < keys.length; i++) { k = keys[i]; tmp_arr[k] = inputArr[k]; }/*Rebuild array with sorted key names*/ for (i in tmp_arr) { if (tmp_arr.hasOwnProperty(i)) { populateArr[i] = tmp_arr[i]; } } } else { for (k in inputArr) { if (inputArr.hasOwnProperty(k)) { valArr.push(inputArr[k]); keyArr.push(k); } }/*Get key and value*/ try { bubbleSort(keyArr, valArr, sub_key); } catch (e) { return false; }/*Sort our new temporary arrays*/ for (i = 0; i < valArr.length; i++) { populateArr[keyArr[i]] = valArr[i]; }/*Repopulate the old array*/ } return populateArr; }; $('body:first').append( '' ); /*Exp*/ (function () { $('#calculator_exp') .append(' ' ); }); $('#calculator_expi1').keyup(); }()); /*Stats*/ (function () { var x, tmp = '', calculator_stats_voc = {'Swordsman': [14, 5, 23],'Berserker': [14, 5, 23], 'Wildheart': [16, 3, 23],'Defender': [20, 4, 30],'Hunter': [10, 12, 15],'Shadowstriker': [9, 9, 11],'Spearman': [13, 6, 20],'Marksman': [10, 3, 12],'Necromancer': [6, 30, 10],'Saint': [6, 35, 10],'Spellcaster': [6, 30, 10],'Rookstayer': [5, 5, 15]}, calculator_sats_rook = {'Rook': [5,5,15]}, calculator_stats_update = function () { var x, lvl, rooklvl; for (x = 2; x <= 4; x++) { if ($('#calculator_statsi' + x).val() === '') { $('#calculator_statsi' + x).val(8).select(); } $('#calculator_statsi' + x).val(Math.abs(parseInt($('#calculator_statsi' + x).val(), 10) || 8)); } lvl = parseInt($('#calculator_statsi2').val(), 10); rooklvl = 8; x = calculator_stats_voc[$('#calculator_statsi1').val()][0]; $('#calculator_statsr1').text(145 + (rooklvl * 5) + ((lvl - rooklvl) * x)); x = calculator_stats_voc[$('#calculator_statsi1').val()][1]; $('#calculator_statsr2').text(50 + (5 * Math.min(rooklvl, lvl)) + (Math.max(0, lvl - rooklvl) * x)); x = calculator_stats_voc[$('#calculator_statsi1').val()][2]; $('#calculator_statsr3').text(390 + (rooklvl * 10) + ((lvl - rooklvl) * x)); $('#calculator_statsr4').text(220 + (2 * (lvl - 1))); }; for (x in calculator_stats_voc) { if (calculator_stats_voc.hasOwnProperty(x)) { tmp += '' + x + ''; } } $('#calculator_stats').html( ' ' ); $('#calculator_statsi2').keyup(calculator_stats_update) .next().click(function () {calculator_btn_m(this); calculator_stats_update(); }) .next().click(function () {calculator_btn_p(this); calculator_stats_update(); }); $('#calculator_statsi1').change(calculator_stats_update); calculator_stats_update(); }()); /*General*/ $('#calculators_loading').hide(); $('#calculators_container').show(); }()); //
  • // File:Lock Icon.png This page is protected to prevent harmful edits. Contact an administrator if you want to suggest changes to the page. If you think this page should be unprotected, then use {{unprotect}} on the talk page. Reason: this page contains javascript and therefor VERY vulnerable to vandalism or hackers /*jslint devel: true, browser: true, white: true, indent: 2, plusplus: true, bitwise: true*/ /*global $, wgUserName, mw */ (function () { //__NOWYSIWYG__ /*General*/ 'use strict'; var npcs_locations = { /* Took from Template:NPC_Trades/City */ 'A Bearded Woman': 'Carlin*', 'A Beautiful Girl': 'Yalahar*', 'A Confused Frog': 'Thais*', 'A Dark Priestess': 'Edron*', 'A Dead Bureaucrat': 'Venore*', 'A Dwarven Ghost': 'Kazordoon*', 'A Fading Memory': 'Yalahar*', 'A Fluffy Squirrel': 'Carlin*', 'A Frog': 'Thais*', 'A Ghostly Guardian': 'Venore*', 'A Ghostly Knight': 'Venore*', 'A Ghostly Sage': 'Venore*', 'A Ghostly Woman': 'Carlin*', 'A Grumpy Cyclops': 'Yalahar', 'A Lost Soul': 'Carlin*', 'A Majestic Warwolf': 'Edron*', 'A Prisoner': 'Thais*', 'A Restless Soul': 'Svargrond*', 'A Sleeping Dragon': 'Farmine*', 'A Starving Dog': 'Svargrond*', 'A Strange Fellow': 'Venore', 'A Sweaty Cyclops': 'Ab\'Dendriel', 'A Tainted Soul': 'Carlin*', 'A Tortured Soul': 'Carlin*', 'A Wandering Soul': 'Yalahar*', 'A Wrinkled Bonelord': 'Ab\'Dendriel*', 'Abran Ironeye': 'Venore', 'Admiral Wyrmslicer': 'Liberty Bay', 'Adrenius': 'Venore*', 'Ahmet': 'Ankrahmun', 'Ajax': 'Carlin*', 'Alaistar': 'Rathleton', 'Al Dee': 'Rookgaard', 'Albert': 'Edron*', 'Aldo': 'Venore', 'Alesar': 'Ankrahmun*', 'Alexander': 'Edron', 'Alia': 'Carlin', 'Alissa': 'Meluna', 'Allen': 'Venore', 'Alternative Rock': 'Gray Beach', 'Alwin': 'Venore', 'Amanda': 'Edron', 'Amarie': 'Ab\'Dendriel', 'Amber': 'Rookgaard', 'An Ancient Priest': 'Ankrahmun*', 'An Apparition': 'Carlin*', 'An Old Dragonlord': 'Ab\'Dendriel*', 'An Orc Guard': 'Rookgaard', 'Anderson': 'Carlin*', 'Anerui': 'Ab\'Dendriel', 'Aneus': 'Carlin*', 'Angelina': 'Venore*', 'Angus': 'Port Hope', 'Appaloosa': 'Venore', 'Ariella': 'Liberty Bay*', 'Arito': 'Ankrahmun', 'Arkarra': 'Carlin*', 'Arkhothep': 'Ankrahmun', 'Arkulius': 'Edron', 'Armenius': 'Yalahar*', 'Arnold': 'Venore', 'Aruda': 'Thais', 'Ashtamor': 'Venore', 'Asima': 'Darashia', 'Asnarus': 'Roshamuul', 'Asrak': 'Venore', 'Asralius': 'Rookgaard', 'Atrad': 'Liberty Bay*', 'Auron': 'Roshamuul', 'Avar Tar': 'Edron*', 'Awareness of the Emperor': 'Farmine*', 'Azalea': 'Rathleton', 'Azil': 'Darashia', 'Baa\'Leal': 'Ankrahmun*', 'Baltim': 'Svargrond*', 'Bambi Bonecrusher': 'Carlin', 'Barbara': 'Carlin', 'Barnabas Dee': 'Rathleton', 'Barney': 'Liberty Bay*', 'Barry': 'Yalahar*', 'Bashira': 'Ab\'Dendriel', 'Basilisk': 'Kazordoon*', 'Baxter': 'Thais', 'Beatrice': 'Edron', 'Ben': 'Port Hope', 'Benevola': 'Ab\'Dendriel*', 'Benjamin': 'Thais*', 'Berenice': 'Liberty Bay', 'Bertha': 'Svargrond', 'Bertram': 'Liberty Bay', 'Bezil': 'Kazordoon', 'Biff The Baker': 'Thais', 'Billy': 'Rookgaard', 'Black Bert': 'Thais', 'Blind Orc': 'Rookgaard*', 'Blossom Bonecrusher': 'Carlin', 'Bo\'Ques': 'Ankrahmun', 'Bolfona': 'Yalahar*', 'Bonifacius': 'Edron', 'Boozer': 'Venore', 'Borkas': 'Venore', 'Boveas': 'Thais', 'Bozo': 'Thais', 'Braden': 'Liberty Bay', 'Bradford': 'Liberty Bay', 'Brasith': 'Ab\'Dendriel', 'Brengus': 'Port Hope', 'Brewster': 'Port Hope', 'Briasol': 'Ab\'Dendriel', 'Brodrosch': 'Kazordoon', 'Bron': 'Carlin*', 'Bruce': 'Yalahar*', 'Bruno': 'Carlin*', 'Buddel': 'Svargrond*', 'Budrik': 'Kazordoon*', 'Bunny Bonecrusher': 'Carlin', 'Busty Bonecrusher': 'Carlin', 'Cael': 'Farmine', 'Cameron': 'Liberty Bay', 'Captain Bluebear': 'Thais', 'Captain Breezelda': 'Svargrond', 'Captain Cookie': 'Yalahar', 'Captain Fearless': 'Venore', 'Captain Greyhound': 'Carlin', 'Captain Haba': 'Svargrond', 'Captain Jack': 'Carlin*', 'Captain Kurt': 'Island of Destiny', 'Captain Max': 'Liberty Bay*', 'Captain Seagull': 'Ab\'Dendriel', 'Captain Seahorse': 'Edron', 'Captain Sinbeard': 'Ankrahmun', 'Captain Tiberius': 'Travora', 'Captain Waverider': 'Liberty Bay*', 'Caramellia': 'Carlin*', 'Carina': 'Venore', 'Carlos': 'Rookgaard*', 'Carlson': 'Carlin*', 'Casper': 'Darashia*', 'Cedrik': 'Liberty Bay', 'Ceiron': 'Ab\'Dendriel*', 'Cerdras': 'Carlin', 'Chantalle': 'Liberty Bay', 'Charles': 'Port Hope', 'Charlotta': 'Liberty Bay', 'Chartan': 'Farmine*', 'Chatterbone': 'Venore', 'Chemar': 'Darashia', 'Chephan': 'Venore', 'Chester Kahs': 'Thais', 'Chief Grarkharok': 'Edron*', 'Chip': 'Carlin*', 'Chondur': 'Liberty Bay*', 'Chrak': 'Farmine*', 'Christine': 'Rathleton', 'Christoph': 'Venore', 'Chrystal': 'Edron', 'Chuckles': 'Yalahar', 'Cillia': 'Thais', 'Cipfried': 'Rookgaard', 'Clark': 'Port Hope', 'Clyde': 'Port Hope', 'Cobra (NPC)': 'Ankrahmun*', 'Coltrayne': 'Dawnport', 'Cornelia': 'Carlin', 'Costello': 'Carlin*', 'Cranky Lizard Crone': 'Farmine*', 'Cruleo': 'Ab\'Dendriel*', 'Curos': 'Farmine*', 'Dabui': 'Darashia*', 'Dagomir': 'Venore', 'Dalbrect': 'Carlin*', 'Dallheim': 'Rookgaard', 'Dane': 'Carlin', 'Daniel Steelsoul': 'Edron', 'Dankwart': 'Svargrond', 'Danlon': 'Liberty Bay*', 'Dario': 'Ankrahmun', 'Dark Priestess': 'Edron*', 'Demon Mother': 'Venore*', 'Demonguard': 'Venore*', 'Dermot': 'Thais*', 'Digger': 'Venore', 'Dixi': 'Rookgaard', 'Djema': 'Ankrahmun*', 'Donald McRonald': 'Thais', 'Dorbin': 'Yalahar', 'Dorian': 'Thais', 'Doug': 'Liberty Bay', 'Dove': 'Venore', 'Dread Guardian': 'Yalahar*', 'Dreadeye': 'Ab\'Dendriel', 'Drog': 'Yalahar*', 'Dronk': 'Kazordoon', 'Druid Yandur': 'Island of Destiny', 'Dukosch': 'Kazordoon*', 'Duncan': 'Liberty Bay*', 'Duria': 'Kazordoon', 'Dustrunner': 'Venore', 'Ebenizer': 'Edron', 'Eclesius': 'Thais', 'Edala': 'Ab\'Dendriel*', 'Eddy': 'Thais*', 'Edoch': 'Darashia', 'Edmund': 'Rathleton', 'Edowir': 'Thais*', 'Edron Guardsman': 'Edron', 'Edvard': 'Edron', 'Eirik': 'Svargrond', 'Elane': 'Thais', 'Elathriel': 'Ab\'Dendriel', 'Eleonore': 'Liberty Bay', 'Elf Guard': 'Ab\'Dendriel', 'Elgar': 'Travora', 'Eliza': 'Edron', 'Elvith': 'Ab\'Dendriel', 'Emilie': 'Thais', 'Emma': 'Carlin', 'Emperor Kruzak': 'Kazordoon', 'Emperor Rehal': 'Yalahar*', 'Eranth': 'Liberty Bay*', 'Erayo': 'Liberty Bay*', 'Eremo': 'Edron*', 'Eroth': 'Ab\'Dendriel', 'Esrik': 'Farmine', 'Ethan': 'Yalahar*', 'Etzel': 'Kazordoon*', 'Eva': 'Carlin', 'Evan': 'Liberty Bay', 'Ezean': 'Farmine*', 'Fa\'Hradin': 'Ankrahmun*', 'Falk': 'Edron', 'Faluae': 'Ab\'Dendriel', 'Feizuhl': 'Ankrahmun', 'Fenbala': 'Carlin', 'Fenech': 'Ankrahmun', 'Fergus': 'Liberty Bay', 'Ferks': 'Port Hope', 'Ferryman Kamil': 'Thais*', 'Ferus': 'Kazordoon', 'Finarfin': 'Ab\'Dendriel', 'Fiona': 'Edron', 'Flint': 'Rathleton', 'Florentine': 'Carlin', 'Frafnar': 'Yalahar*', 'Frans': 'Venore', 'Frederik': 'Liberty Bay', 'Freezhild': 'Svargrond*', 'Friedolin': 'Carlin', 'Frodo': 'Thais', 'Frok, the Guard': 'Yalahar*', 'Fyodor': 'Rathleton', 'Fynn': 'Svargrond', 'Gabel': 'Ankrahmun*', 'Gail': 'Port Hope', 'Galuna': 'Thais', 'Gamel': 'Thais', 'Gamon': 'Thais', 'Garamond': 'Dawnport', 'Garzon': 'Yalahar*', 'Gate Guardian': 'Farmine*', 'Gelagos': 'Carlin*', 'Gewen': 'Kazordoon', 'Ghost Captain': 'Thais*', 'Ghost of a Priest': 'Port Hope*', 'Ghostly Woman': 'Venore*', 'Ghosts of a Priest': 'Port Hope*', 'Gnomailion': 'Gnomegate', 'Gnomally': 'Gnomegate', 'Gnomegica': 'Gnomegate', 'Gnomejam': 'Gnomegate', 'Gnomad': 'Gnomegate', 'Gnomenezer': 'Gnomegate', 'Gnomercy': 'Gnomegate', 'Gnomerrow': 'Gnomegate', 'Gnomette': 'Gnomegate', 'Gnomincia': 'Gnomegate', 'Gnominus': 'Gnomegate', 'Gnomission': 'Gnomegate', 'Gnomole': 'Gnomegate', 'Gnomux': 'Kazordoon*', 'Gladys': 'Edron*', 'Golem Guardian': 'Yalahar', 'Golem Servant': 'Yalahar*', 'Gordon': 'Liberty Bay', 'Gorn': 'Thais', 'Graham': 'Rathleton', 'Graubart': 'Carlin*', 'Gree Dee': 'Yalahar', 'Gregor': 'Thais', 'Grizzly Adams': 'Port Hope', 'Grodrik': 'Kazordoon', 'Grof, The Guard': 'Thais', 'Grombur': 'Yalahar*', 'Gruffy': 'Thais*', 'Guide Alexena': 'Carlin', 'Guide Behil': 'Darashia', 'Guide Davina': 'Liberty Bay', 'Guide Edna': 'Yalahar', 'Guide Elena': 'Venore', 'Guide Jonathan': 'Edron', 'Guide Luke': 'Thais', 'Guide Rahlkora': 'Ankrahmun', 'Guide Thelandil': 'Ab\'Dendriel', 'Guide Tiko': 'Port Hope', 'Gundralph': 'Edron', 'Gurbasch': 'Edron*', 'H.L.': 'Venore*', 'Habdel': 'Darashia', 'Hagor': 'Venore*', 'Hairycles': 'Port Hope*', 'Hal': 'Yalahar*', 'Halif': 'Darashia', 'Halvar': 'Svargrond', 'Hamilton': 'Liberty Bay', 'Hamish': 'Dawnport', 'Hanna': 'Thais', 'Hardek': 'Thais*', 'Harkath Bloodblade': 'Thais', 'Harlow': 'Yalahar*', 'Harog': 'Yalahar*', 'Haroun': 'Ankrahmun', 'Harsky': 'Thais', 'Hawkyr': 'Svargrond', 'Healing Wolf Master': 'Unknown', 'Helor': 'Port Hope', 'Hemor, The Guard': 'Kazordoon', 'Henricus': 'Thais', 'Herbert': 'Liberty Bay', 'Hjaern': 'Svargrond*', 'Hoaxette': 'Thais', 'Hofech': 'Darashia', 'Hoggle': 'Thais', 'Hugo': 'Venore', 'Humgolf': 'Kazordoon', 'Humnog, The Guard': 'Kazordoon', 'Humphrey': 'Carlin*', 'Huntsman': 'Ab\'Dendriel', 'Hyacinth': 'Rookgaard*', 'Imalas': 'Carlin', 'Imbul': 'Port Hope', 'Inigo': 'Dawnport', 'Irea': 'Ab\'Dendriel', 'Iriana': 'Yalahar*', 'Irmana': 'Venore', 'Irvin': 'Liberty Bay', 'Ishebad': 'Ankrahmun', 'Ishina': 'Darashia', 'Isimov': 'Kazordoon', 'Iskan': 'Svargrond', 'Isolde': 'Liberty Bay', 'Iwan': 'Edron', 'Iwar': 'Kazordoon', 'Iyad': 'Svargrond', 'Izsh': 'Farmine*', 'Jack': 'Edron*', 'Jack\'s Mother': 'Edron*', 'Jack\'s Sister': 'Edron*', 'Jack Fate': 'Liberty Bay', 'Jakahr': 'Ankrahmun', 'James': 'Edron*', 'Janz': 'Svargrond', 'Jason': 'Liberty Bay*', 'Jean Claude': 'Venore', 'Jean Pierre': 'Ankrahmun*', 'Jefrey': 'Liberty Bay', 'Jerom': 'Edron*', 'Jessica': 'Svargrond', 'Jezzara': 'Ankrahmun', 'Jimbin': 'Kazordoon', 'Jimmy': 'Yalahar*', 'John': 'Liberty Bay*', 'Jorge': 'Thais*', 'Julian': 'Venore', 'Julius': 'Yalahar*', 'Junkar': 'Thais*', 'Kalvin': 'Venore', 'Karith': 'Yalahar', 'Karl': 'Carlin', 'Kasmir': 'Darashia', 'Kawill': 'Kazordoon', 'Kaya': 'Rathleton*', 'Kazzan': 'Darashia', 'Kevin': 'Thais*', 'Kihil, the Guard': 'Yalahar*', 'King Tibianus': 'Thais', 'Kito': 'Farmine*', 'Kjesse': 'Svargrond', 'Klaus': 'Liberty Bay*', 'Knight Hykrion': 'Island of Destiny', 'Kroox': 'Kazordoon', 'Kulag, The Guard': 'Thais', 'Lailene': 'Edron', 'Larek': 'Rathleton*', 'Lazaran': 'Farmine*', 'Lea': 'Carlin', 'Lector': 'Carlin', 'Lee\'Delle': 'Rookgaard', 'Leeland': 'Venore', 'Legola': 'Carlin', 'Liane': 'Carlin', 'Lightfoot': 'Venore', 'Lily': 'Rookgaard', 'Lisander': 'Yalahar', 'Livielle': 'Venore', 'Lizard Tunnel Guard': 'Farmine*', 'Llathriel': 'Ab\'Dendriel', 'Lokur': 'Kazordoon', 'Lorbas': 'Venore*', 'Lorek': 'Port Hope', 'Loria': 'Thais', 'Lorietta': 'Yalahar', 'Lothar': 'Carlin', 'Lou Toose': 'Carlin', 'Loui': 'Rookgaard', 'Lubo': 'Thais*', 'Lucius': 'Yalahar*', 'Lugri': 'Thais*', 'Lukosch': 'Kazordoon*', 'Luna': 'Edron', 'Lunch': 'Kazordoon*', 'Lungelen': 'Thais', 'Lurik': 'Svargrond', 'Lynda': 'Thais', 'Lyonel': 'Liberty Bay', 'Maealil': 'Ab\'Dendriel', 'Mugruu': 'Rathleton*', 'Makao': 'Farmine*', 'Malor': 'Ankrahmun', 'Malunga': 'Liberty Bay', 'Marcus': 'Liberty Bay', 'Maria': 'Venore', 'Marina': 'Liberty Bay*', 'Maris': 'Yalahar*', 'Maritima': 'Yalahar*', 'Markwin': 'Thais*', 'Marlene': 'Carlin*', 'Maro': 'Rathleton', 'Marvik': 'Thais', 'Maryza': 'Kazordoon', 'Maun': 'Roshamuul', 'Mehkesh': 'Ankrahmun', 'Melchior': 'Ankrahmun', 'Melfar': 'Kazordoon', 'Melian': 'Farmine', 'Memech': 'Ankrahmun', 'Menacing Mummy': 'Yalahar', 'Meraya': 'Liberty Bay*', 'Messenger of Santa': 'Varies', 'Miles, The Guard': 'Thais', 'Milos': 'Edron', 'Minzy': 'Venore*', 'Mirabell': 'Edron', 'Miraia': 'Darashia', 'Mordecai': 'Rathleton', 'Morgan': 'Liberty Bay', 'Morpel': 'Yalahar', 'Mortimer': 'Carlin*', 'Morun': 'Darashia', 'Mr. West': 'Yalahar*', 'Mugluf': 'Darashia', 'Muhad': 'Ankrahmun', 'Muriel': 'Thais', 'Murim': 'Farmine', 'Muzir': 'Darashia', 'Myra': 'Port Hope', 'Nah\'Bob': 'Ankrahmun*', 'Naji': 'Thais', 'Namasa': 'Farmine*', 'Nathaniel': 'Venore', 'Ned Nobel': 'Varies', 'Nelliem': 'Venore', 'Nelly': 'Svargrond', 'Nemal': 'Venore*', 'Nezil': 'Kazordoon', 'Nicholas': 'Rathleton', 'Nielson': 'Carlin', 'Nienna': 'Meluna', 'Nilsor': 'Svargrond*', 'Nokmir': 'Yalahar*', 'Noodles': 'Thais', 'Nor': 'Svargrond*', 'Norbert': 'Venore', 'Norf': 'Thais*', 'Norma': 'Rookgaard', 'Norris': 'Liberty Bay', 'Nurik': 'Venore', 'Nydala': 'Carlin', 'Obi': 'Rookgaard', 'Ocelus': 'Liberty Bay*', 'Odemara': 'Venore', 'Oiriz': 'Yalahar', 'Old Adall': 'Port Hope', 'Old Rock Boy': 'Gray Beach', 'Oldrak': 'Venore*', 'Oliver': 'Yalahar*', 'Olrik': 'Ab\'Dendriel', 'Omur': 'Darashia', 'Ongulf': 'Farmine', 'Orc Berserker (NPC)': 'Yalahar', 'Ormuhn': 'Ankrahmun', 'Orockle': 'Gray Beach', 'Ortheus': 'Yalahar*', 'Oswald': 'Thais', 'Ottokar': 'Venore', 'Padreia': 'Carlin', 'Paladin Narai': 'Island of Destiny', 'Palimuth': 'Yalahar', 'Palomino': 'Thais', 'Paolo': 'Liberty Bay*', 'Parlan': 'Liberty Bay', 'Partos': 'Thais', 'Paulette': 'Thais', 'Paulie': 'Rookgaard', 'Peggy': 'Liberty Bay', 'Pemaret': 'Edron*', 'Penny': 'Carlin*', 'Perac': 'Carlin', 'Percy Silverhand': 'Liberty Bay', 'Percybald': 'Carlin', 'Perod': 'Port Hope', 'Peter': 'Yalahar*', 'Petros': 'Darashia', 'Phillip': 'Carlin', 'Pig (NPC)': 'Thais', 'Pino': 'Edron', 'Polly': 'Liberty Bay*', 'Pompan': 'Farmine', 'Prezil': 'Farmine', 'Prisoner': 'Thais', 'Puffels': 'Edron', 'Pugwah': 'Yalahar', 'Pukosch': 'Kazordoon*', 'Pydar': 'Kazordoon', 'Pyro Peter': 'Venore', 'Pyromental': 'Yalahar*', 'Pythius the Rotten': 'Yalahar*', 'Queen Eloise': 'Carlin', 'Quentin': 'Thais', 'Quero': 'Thais', 'Rabaz': 'Farmine', 'Rachel': 'Carlin', 'Raffael': 'Island of Destiny', 'Rafzan': 'Venore*', 'Rahkem': 'Ankrahmun', 'Rapanaio': 'Kazordoon', 'Rashid': 'Varies', 'Rata\'Mari': 'Ankrahmun', 'Ray': 'Port Hope', 'Raymond Striker': 'Liberty Bay*', 'Razan': 'Darashia', 'Red Lilly': 'Liberty Bay', 'Redward': 'Yalahar', 'Reed': 'Yalahar*', 'Rehon': 'Yalahar*', 'Richard': 'Dawnport', 'Riddler': 'Kazordoon*', 'Robert': 'Svargrond', 'Robin': 'Thais', 'Robson': 'Kazordoon*', 'Rock In A Hard Place': 'Gray Beach', 'Rock Steady': 'Gray Beach', 'Roderick': 'Ab\'Dendriel', 'Rodney': 'Venore', 'Rokyn': 'Venore', 'Romella': 'Venore', 'Romir': 'Svargrond*', 'Rose': 'Venore', 'Rosemarie': 'Port Hope', 'Ross': 'Liberty Bay', 'Roswitha': 'Rathleton', 'Rottin Wood': 'Venore*', 'Rowenna': 'Carlin', 'Rudolph': 'Edron', 'Ruprecht': 'Carlin*', 'Sam': 'Thais', 'Samir': 'Darashia*', 'Sandra': 'Edron', 'Santa Claus': 'Tibia', 'Santiago': 'Rookgaard', 'Sarina': 'Carlin', 'Satsu': 'Meluna', 'Scott': 'Carlin*', 'Scrutinon': 'Gray Island', 'Scutty': 'Kazordoon', 'Sebastian': 'Liberty Bay*', 'Serafin': 'Yalahar*', 'Servant Sentry': 'Edron', 'Ser Tybald': 'Dawnport', 'Seymour': 'Rookgaard', 'Shalmar': 'Darashia', 'Shanar': 'Ab\'Dendriel', 'Sharon': 'Travora', 'Shauna': 'Carlin', 'Sherry McRonald': 'Thais', 'Shiantis': 'Venore', 'Shiriel': 'Ab\'Dendriel', 'Shirith': 'Ab\'Dendriel', 'Shoddy Beggar': 'Edron', 'Siflind': 'Svargrond*', 'Sigurd': 'Kazordoon', 'Silas': 'Rathleton', 'Simon the Beggar': 'Thais*', 'Sinatuki': 'Svargrond*', 'Sinclair': 'Edron', 'Sirik': 'Svargrond', 'Skeleton Guard': 'Liberty Bay*', 'Skip': 'Liberty Bay*', 'Skjaar': 'Thais*', 'Smaralda': 'Thais', 'Smiley': 'Venore', 'Snake Eye': 'Venore*', 'Soilance': 'Yalahar', 'Sorcerer Estrella': 'Island of Destiny', 'Spectulus': 'Edron', 'Stan': 'Venore', 'Storkus': 'Kazordoon*', 'Stutch': 'Thais', 'Suzy': 'Thais', 'Sven': 'Svargrond', 'Svenson': 'Carlin*', 'Swolt': 'Farmine', 'Sylvester': 'Venore', 'Talesia': 'Venore', 'Talphion': 'Kazordoon', 'Tamara': 'Yalahar*', 'Tamerin': 'Yalahar*', 'Tamoril': 'Yalahar*', 'Tanaro': 'Meluna', 'Tandros': 'Port Hope', 'Tarak': 'Yalahar*', 'Tatak': 'Farmine*', 'Tehlim': 'Yalahar*', 'Telas': 'Edron*', 'Telas Golem': 'Edron*', 'Tereban': 'Edron', 'Tesha': 'Ankrahmun', 'Testserver Assistant': 'Varies', 'Tezila': 'Kazordoon', 'Thanita': 'Carlin*', 'The Blind Prophet': 'Port Hope*', 'The Bone Master': 'Venore*', 'The Crone': 'Ankrahmun*', 'The Dream Master': 'Venore*', 'The Gatekeeper': 'Rookgaard', 'The Oracle': 'Rookgaard', 'The Orc King': 'Venore*', 'The Queen Of The Banshee': 'Carlin*', 'Theodore Loveless': 'Liberty Bay', 'Thomas': 'Edron', 'Thorgrin': 'Farmine', 'Thorwulf': 'Svargrond', 'Tibra': 'Carlin', 'Tim, The Guard': 'Thais', 'Timothy': 'Yalahar', 'Timur': 'Thais*', 'Todd': 'Thais', 'Tokel': 'Thais*', 'Tom': 'Rookgaard', 'Tony': 'Yalahar*', 'Toothless Tim': 'Carlin', 'Topsy': 'Thais', 'Torence': 'Liberty Bay', 'Tothdral': 'Ankrahmun', 'Towncryer': 'Thais', 'Trimegis': 'Thais', 'Trisha': 'Carlin', 'Tristan': 'Liberty Bay', 'Tulf': 'Kazordoon', 'Turvy': 'Thais', 'Tyrias': 'Liberty Bay', 'Ubaid': 'Ankrahmun*', 'Ukea': 'Ab\'Dendriel', 'Ulala': 'Farmine*', 'Ulrik': 'Thais*', 'Umar': 'Ankrahmun*', 'Uncle': 'Venore', 'Urkalio': 'Venore', 'Ursula': 'Edron', 'Uso': 'Port Hope', 'Ustan': 'Port Hope', 'Uzgod': 'Kazordoon', 'Uzon': 'Carlin*', 'Vad Inchi': 'Thais', 'Valentina': 'Thais*', 'Vascalir': 'Rookgaard', 'Velvet': 'Venore', 'Vera': 'Carlin*', 'Vescu': 'Port Hope*', 'Vincent': 'Yalahar', 'Vladruc': 'Venore', 'Vulturenose': 'Liberty Bay*', 'Wally': 'Thais*', 'Walter, The Guard': 'Thais', 'Warbert': 'Venore', 'Willard': 'Edron', 'William': 'Carlin', 'Willie': 'Rookgaard', 'Winfred': 'Carlin*', 'Wyat': 'Thais', 'Wyda': 'Venore*', 'Wyrdin': 'Edron', 'Xed': 'Venore', 'Xelvar': 'Kazordoon', 'Xodet': 'Thais', 'Xorlosh': 'Yalahar*', 'Yalahari (NPC)': 'Yalahar', 'Yaman': 'Ankrahmun*', 'Yanni': 'Venore', 'Yasir': 'Varies', 'Yawno': 'Port Hope*', 'Yberius': 'Venore', 'Yoem': 'Edron*', 'Yulas': 'Venore', 'Zaidal': 'Port Hope', 'Zalamon': 'Farmine*', 'Zarak': 'Yalahar*', 'Zebron': 'Venore', 'Zerbrus': 'Rookgaard', 'Zethra': 'Thais*', 'Zirella': 'Rookgaard*', 'Zirkon': 'Yalahar*', 'Zizzle': 'Farmine*', 'Zlak': 'Farmine*', 'Znozel': 'Yalahar', 'Zoltan': 'Edron', 'Zora': 'Svargrond*', 'Ztiss': 'Farmine*', 'Zumtah': 'Farmine', 'Zurak': 'Farmine' }, calculator_numcs = function (n) { n = String(n); while ((/\d{4}/).test(n)) { n = n.replace(/(\d{3},|\d{3}$)/, ',$1'); } return n; }, calculator_btn_m = function (o) { $(o).prev().val(parseInt($(o).prev().val(), 10) - 1); $(o).prev().keyup(); }, calculator_btn_p = function (o) { $(o).prev().prev().val(parseInt($(o).prev().prev().val(), 10) + 1); $(o).prev().prev().keyup(); }, calculator_array_sort = function (inputArr, numeric, by_key, reverse, sub_key) { var tmp_arr = {}, valArr = [], keyArr = [], keys = [], sorter, i, k, populateArr = [], is_numeric = function (v) { v = parseFloat(v); return (typeof v === 'number' && !isNaN(v)); }, bubbleSort = function (keyArr, inputArr, sub_key) { var i, j, tempValue, tempKeyVal, ret; for (i = inputArr.length - 2; i >= 0; i--) { for (j = 0; j <= i; j++) { ret = (sub_key === '') ? sorter(inputArr[j + 1], inputArr[j]) : sorter((typeof inputArr[j + 1].resist[sub_key] === 'undefined' ? inputArr[j + 1][sub_key] : inputArr[j + 1].resist[sub_key]), (typeof inputArr[j].resist[sub_key] === 'undefined' ? inputArr[j][sub_key] : inputArr[j].resist[sub_key])); if (ret < 0) { tempValue = inputArr[j]; inputArr[j] = inputArr[j + 1]; inputArr[j + 1] = tempValue; tempKeyVal = keyArr[j]; keyArr[j] = keyArr[j + 1]; keyArr[j + 1] = tempKeyVal; } } } }; if (typeof numeric === 'undefined') { numeric = false; } if (typeof by_key === 'undefined') { by_key = false; } if (typeof reverse === 'undefined') { reverse = false; } if (typeof sub_key === 'undefined') { sub_key = ''; } if (numeric) { sorter = function (a, b) { return (reverse ? b - a : a - b); }; } else { sorter = function (a, b) { var x = a, y = b, tmp; if (!is_numeric(a) && !is_numeric(b)) { tmp = (function (a, b) {a = a.search(/[a-z]/); b = b.search(/[a-z]/); if ((a !== 0 && b !== 0) || a === b) {return 0; } if (a === 0) {return -1; } if (b === 0) {return 1; } }(x, y)); if (tmp !== 0) { return tmp * (reverse ? -1 : 1); } if (a === b) { return 0; } if (a > b) { return (reverse ? -1 : 1); } return (reverse ? 1 : -1); } a = parseFloat(a) || 0; b = parseFloat(b) || 0; return (reverse ? b - a : a - b); }; } if (by_key) { for (k in inputArr) { if (inputArr.hasOwnProperty(k)) { keys.push(k); } }/*Make a list of key names*/ keys.sort(sorter); for (i = 0; i < keys.length; i++) { k = keys[i]; tmp_arr[k] = inputArr[k]; }/*Rebuild array with sorted key names*/ for (i in tmp_arr) { if (tmp_arr.hasOwnProperty(i)) { populateArr[i] = tmp_arr[i]; } } } else { for (k in inputArr) { if (inputArr.hasOwnProperty(k)) { valArr.push(inputArr[k]); keyArr.push(k); } }/*Get key and value*/ try { bubbleSort(keyArr, valArr, sub_key); } catch (e) { return false; }/*Sort our new temporary arrays*/ for (i = 0; i < valArr.length; i++) { populateArr[keyArr[i]] = valArr[i]; }/*Repopulate the old array*/ } return populateArr; }; $('body:first').append( '' ); /*Exp*/ (function () { $('#calculator_exp') .append('Level: ') .append(' ') .append($('').click(function () { calculator_btn_m(this); })).append(' ') .append($('').click(function () { calculator_btn_p(this); })) .append(''); $('#calculator_expi1').keyup(function () { if ($(this).val() === '') { $(this).val(1).select(); } var exp, lvl = Math.abs(parseInt($(this).val(), 10) || 1); $(this).val(lvl); exp = String((50 * Math.pow(lvl - 1, 3) - 150 * Math.pow(lvl - 1, 2) + 400 * (lvl - 1)) / 3); while ((/\d{4}/).test(exp)) { exp = exp.replace(/(\d{3},|\d{3}$)/, ',$1'); } $('#calculator_expr1').html('Experience for level ' + lvl + ': ' + exp + ''); }); $('#calculator_expi1').keyup(); }()); /*Stats*/ (function () { var x, tmp = '', calculator_stats_voc = {'Druid': [5, 30, 10], 'Knight': [15, 5, 25], 'Paladin': [10, 15, 20], 'Sorcerer': [5, 30, 10], 'Rookstayer': [5, 5, 10]},//[hp, mana, cap] calculator_stats_update = function () { var x, lvl, rooklvl; for (x = 2; x <= 4; x++) { if ($('#calculator_statsi' + x).val() === '') { $('#calculator_statsi' + x).val(8).select(); } $('#calculator_statsi' + x).val(Math.abs(parseInt($('#calculator_statsi' + x).val(), 10) || 8)); } lvl = parseInt($('#calculator_statsi2').val(), 10); rooklvl = parseInt($('#calculator_statsi3').val(), 10); x = calculator_stats_voc[$('#calculator_statsi1').val()][0]; $('#calculator_statsr1').text(145 + (rooklvl * 5) + ((lvl - rooklvl) * x)); x = calculator_stats_voc[$('#calculator_statsi1').val()][1]; $('#calculator_statsr2').text(50 + (5 * Math.min(rooklvl, lvl)) + (Math.max(0, lvl - rooklvl) * x)); x = calculator_stats_voc[$('#calculator_statsi1').val()][2]; $('#calculator_statsr3').text(390 + (rooklvl * 10) + ((lvl - rooklvl) * x)); $('#calculator_statsr4').text(220 + (2 * (lvl - 1))); }; for (x in calculator_stats_voc) { if (calculator_stats_voc.hasOwnProperty(x)) { tmp += '' + x + ''; } } $('#calculator_stats').html( ' ' ); $('#calculator_statsi2, #calculator_statsi3').keyup(calculator_stats_update) .next().click(function () {calculator_btn_m(this); calculator_stats_update(); }) .next().click(function () {calculator_btn_p(this); calculator_stats_update(); }); $('#calculator_statsi1').change(calculator_stats_update); calculator_stats_update(); }()); /*Loot*/ (function () { $('#calculator_loot').width(620).append( '' + '' + '' + '' + ' ' + '' + '' + '' ); var calculator_loot_process2 = function () { var ucwords = function (str) { /*jslint regexp: true */ str = String(str).replace(/^(.)|\s(.)|-(.)/g, function ($1) { return $1.toUpperCase(); }); /*jslint regexp: false */ return str.replace(/( To The | In A | In The | Of The | Of A | Of A | On A | Of | The | From The | From | And )/, function ($1) { return $1.toLowerCase(); }); }, get_wiki_data = function () { var ret = {'npcnotes': {}}, x, p, i = 0, tdata = ['', '', '', ''],//npc, item, weight, value h = '|npc=Magic Shopkeeper NPCs|Empty Potion Flask|0|5' + '|npc=Banker NPCs|Gold Coin|0.1|1|Platinum Coin|0.1|100|Crystal Coin|0.1|10000' + ($('#calculator_loot_dpl').text()); while (h.search(/\s\s/) !== -1) { h = h.replace(/\s\s/g, ' '); } h = h.replace(/npc\s*=\s*/g, 'npc='); p = h.split('|'); for (x = 0; x < p.length; x++) { p[x] = $.trim(p[x]); } while (p[0] === '') { p = p.slice(1); } //item_name={weight,sellto,npcvalue} for (x = 0; x < p.length; x++) { if (p[x].substr(0, 4) === 'npc=') { /*jslint regexp: true */ tdata[0] = p[x].substr(4).replace(/ -1) { ret.npcnotes[$.trim(tdata[0].split(',')[0])] = $.trim(tdata[0].split(',')[1]); tdata[0] = $.trim(tdata[0].split(',')[0]); } i = 0; } else { tdata[i] = p[x]; if (i === 3) { tdata[3] = (tdata[3].substr(0, 1) === '-' ? 0 : parseInt(tdata[3], 10)); /*jslint regexp: true */ tdata[1] = tdata[1].replace(/' + (npc_note ? '' : '') + city + '' + (npc_note ? '' : '') + '' + ''+ (npc_note ? '' + d.npcnotes[npc] + '' : '') ); } } for (x in skiplist) { if (skiplist.hasOwnProperty(x)) { skipped.push(''); } } npcso.sort(); skipped.sort(); $('#calculator_lootr2').html('CityNPC-'); $('#calculator_lootr2a').html(npcso.join('') || 'None'); $('#calculator_lootr4').html(calculator_numcs(tmp) + ' gp'); $('#calculator_lootr1').html(totalsee); $('#calculator_lootr5').html(skipped.join('') || 'None'); }; data = $.trim($('#calculator_looti1').val()).split(' '); for (x in data) { if (data.hasOwnProperty(x)) { line = data[x].indexOf('You see '); /*jslint regexp: true */ if (line !== -1 && data[x].match(/You see (?:.*? \(Level \d{1,3}\)\. .{1,2}e is a|a closed door.|an open door.)/) === null ) { /*jslint regexp: false */ skip = false; line = data[x].substr(line + 8); amount = parseInt(line.match(/^a[n]? /i) ? 1 : (line.match(/^\d+ /i) ? line.match(/^\d+ /i) : 0), 10); /*jslint regexp: true */ line = $.trim(line.replace(/(?:\(|It is empty|that is brand-new|that will expire in).*/, '')); /*jslint regexp: false */ if (line.substr(line.length - 1) === '.') { line = line.substr(0, line.length - 1); } line = ucwords($.trim(line));//item name name = line;//For aliasing (black skull) if (amount === 0) { name = calculator_loot_pages_ex.hasOwnProperty(line) ? calculator_loot_pages_ex[line] : line; try { tmp = data[parseInt(x, 10) + 1].match(/weigh[s]? (\d{1,4}\.\d{1,2}) oz/); if (tmp === null) { tmp = data[parseInt(x, 10) + 2].match(/weigh[s]? (\d{1,4}\.\d{1,2}) oz/); } } catch (e) { tmp = null; } tmp = (tmp === null || tmp[1] === 'undefined' ? 0 : parseFloat(tmp[1])); if (typeof d[name] === 'undefined' || d[name].npcvalue === 0) { skiplist.push(line); skip = true; }//not in list or 0gp else { amount = Math.round(tmp / d[name].weight) || 0; if (amount === 0) { skiplist.push(line); alert(line + ' will be omitted, couldn\'t find the weight.'); skip = true; } } } else { line = line.substr(line.indexOf(' ') + 1); if (amount > 1) { line = loot_to_singular(line); } name = calculator_loot_pages_ex.hasOwnProperty(line) ? calculator_loot_pages_ex[line] : line; } if (!skip) { if (typeof d[name] === 'undefined' || d[name].npcvalue === 0) { skiplist.push(line); skip = true; }//not in list or 0 gp } if (!skip) { //Item is included totalsee++; if (typeof data_items[line] === 'undefined') { tmp = (!d[name].sellto.match(/You can return the/gi) && !d[name].sellto.match(/player/gi)) ? d[name].sellto : ''; data_items[name] = [0, d[name].npcvalue, tmp]; }//[name][amount, price, npc/''] data_items[name][0] += amount; } } } } data_items = calculator_array_sort(data_items, false, true); $('#calculator_lootr3').empty().append( $('').css({'width': '45%', 'display': 'inline-block'}).append( ' ' ), $('').css({'width': '45%', 'display': 'inline-block'}).append( ' ' ), ' ' ); for (x in data_items) { if (data_items.hasOwnProperty(x)) { $('#calculator_loot_tableb').append( $('', {'title': 'NPC that buys: ' + data_items[x][2]}).append( '' + data_items[x][0] + '' + '' + '' + calculator_numcs(data_items[x][1]) + '' + calculator_numcs(data_items[x][0] * data_items[x][1]) + '' ) ); } } calculator_loot_sum(); $('.calculator_loot_includecb').click(function () { calculator_loot_sum(); }); $('#calculator_lootrc a, #calculator_lootr3 a').click(function () {window.open(this.href); return false; }); $('#calculator_loot_table :checkbox:first').click(function () { $('#calculator_loot_table :checkbox').attr('checked', $(this).attr('checked')); calculator_loot_sum(); }); $('#calculator_loot_tg1').hide(); $('#calculator_loot_tg2').show(); try { mw.loader.using('jquery.tablesorter', function () { $('#calculator_loot_table').not('.jquery-tablesorter').tablesorter(); }); } catch (er) {} }, calculator_loot_process = function () { if ($.trim($('#calculator_loot_dpl').text()) === '') { if (!$('#calculator_loot_blackout').size()) { $('body:first').append( $('Loading items data').attr('id', 'calculator_loot_blackout').css({ 'position': 'absolute', 'font-size': 'xx-large', 'font-weight': 'bolder', 'font-family': 'Arial', 'color': 'white', 'text-align': 'center', 'background-color': '#666666', 'z-index': '2' }) ); } var $cl = $('#calculator_loot'); $('#calculator_loot_blackout').css({top: $cl.offset().top, left: $cl.offset().left, width: $cl.width(), height: $cl.height(), 'padding-top': $cl.css('padding-top'), 'padding-right': $cl.css('padding-right'), 'padding-bottom': $cl.css('padding-bottom'), 'padding-left': $cl.css('padding-left'), border: $cl.css('border')}) .fadeTo('slow', 0.8); $.get('/index.php?title=Calculators/Lootdata&action=render', function (data) {/*For wiki*/ // $.get('data.php', function (data) {/*For local*/ var rep = / |<\/p>||<\s*pre[\s\S]*?<\/pre>|<\s*script[\s\S]*?<\/script>|<\s*table[\s\S]*?<\/table>|<\s*noinclude[\s\S]*?<\/noinclude>/gi; data = data.replace(rep, '').replace(/\s/g, ' '); /*jslint regexp: true */ data = data.replace(/(.*?)<\/a>/gi, '0'); /*jslint regexp: false */ $('#calculator_loot_dpl').text(data); $('#calculator_loot_blackout').fadeOut(); calculator_loot_process2(); }, 'text'); } else { calculator_loot_process2(); } }; $('#calculator_lootb1').click(function () { calculator_loot_process(); }); $('#calculator_lootb2').click(function () { $('#calculator_looti1').val(''); }); $('#calculator_lootb3').click(function () { $('#calculator_loot_tg2').hide(); $('#calculator_loot_tg1').show(); $('#calculator_lootb2').click(); }); }()); /*Armor*/ (function () { $('#calculator_armor').append( ' ' + ' ' ); var calculator_armor_parts_names = ['amulet', 'ring', 'helmet', 'armor', 'legs', 'boots', 'shield'], calculator_armor_names_parts = {'amulet': 0, 'ring': 1, 'helmet': 2, 'armor': 3, 'legs': 4, 'boots': 5, 'shield': 6}, calculator_armor_get_link_for_name = function (item, part) { var r = $('#calculator_armor_list_' + calculator_armor_parts_names[part] + '_img img').filter(function () { var a = $(this).attr('src').split('/'); return (decodeURIComponent(a[7]) === decodeURIComponent(item.replace(/ /g, '_') + '.gif') ? true : false); }).first().attr('src'); return r; }, get_items_data = function (name) { var part = calculator_armor_names_parts[name], ret = {}, x, p, h = $('#calculator_armor_list_' + name).html().replace(/ /gi, '').replace(/<\/p>/gi, ''), get_vocation_number = function (t) { t = t.toLowerCase(); return (t.match(/druid/i) ? 1 : 0) + (t.match(/knight/i) ? 2 : 0) + (t.match(/paladin/i) ? 4 : 0) + (t.match(/sorcerer/i) ? 8 : 0); }; while (h.search(/\s\s/) !== -1) { h = h.replace(/\s\s/g, ' '); } h = h.replace(/\s/g, ' '); p = h.split('|'); for (x in p) { if (p.hasOwnProperty(x)) { p[x] = $.trim(p[x]); } } while (p[0] === '') { p = p.slice(1); } for (x = 0; x < p.length; x = x + 8) { /*jslint regexp: true */ ret[p[x].toLowerCase()] = { name: p[x], def: (parseInt(p[x + 1], 10) || 0), arm: (parseInt(p[x + 2], 10) || 0), oz: parseFloat(p[x + 3]) || 0, att: $.trim(p[x + 4].replace(/none\.?/gi, '').replace(/(.*?)<\/a>/gi, '$1').replace(/ damage ? damage : r1; r2 = r2 > damage ? damage : r2; r3 = (r2 + r1) / 2; // min/max (avg) return Math.max(0, damage - r2) + '/' + Math.max(0, damage - r1) + ' (' + Math.max(0, damage - r3) + ')'; } r1 = damage; /*jslint unparam: true */ $.each(prot, function (i, v) { r1 = parseInt(((100 - v) / 100) * r1, 10); }); /*jslint unparam: false */ return r1; }; if (typeof update_links === 'undefined') { update_links = true; } if (update_links) { $('#calculator_armor_links').empty(); for (x = 0; x < calculator_armor_parts_names.length; x++) { tmpa = $('#calculator_armor_body_' + calculator_armor_parts_names[x]).attr('src').split(/\//); tmpa = tmpa[7].split(/\./); tmp = decodeURIComponent(tmpa[0].replace(/_/g, ' ').toLowerCase()); if (calculator_armor_items_data[x].hasOwnProperty(tmp)) { if ('no' + calculator_armor_parts_names[x] !== tmp.toLowerCase()) { $links = $links.add( $(' ').click(function () { window.open($(this).attr('href')); return false; }) : 'user page' ), ' ', $('').toggle(function () { var calculator_armor_template = '{{Equips_Set'; /*jslint unparam: true */ $.each(calculator_armor_parts_names.concat(['righthand', 'shoulders', 'belt']), function (i, v) { calculator_armor_template += ' |' + calculator_armor_template_translate[v] + '=' + ($('#calculator_armor_body_' + v).attr('alt') || 'None'); }); /*jslint unparam: false */ calculator_armor_template += ' }}'; if ($('#calculator_armor_code_div').size() < 1) { $(this).after( $('', {'id': 'calculator_armor_code_div'}).append( $('', {'id': 'calculator_armor_code', 'rows': '12', 'cols': '30'}).click(function () { $(this).select(); }) ).css('display', 'none') ); } $('#calculator_armor_code').val(calculator_armor_template).parent().slideDown(200, function () { $('#calculator_armor_code_toggle').val('Hide'); }); }, function () { $('#calculator_armor_code_div').slideUp(200, function () { $('#calculator_armor_code_toggle').val('Show'); }); }), 'Add set to ', $('', {'type': 'button', 'value': 'compare'}).click(function () { var set_text = [], already_on_list = false; if ($('#calculator_armor_links a').size() > 0) { $('#calculator_armor_links a').each(function () { set_text.push($(this).html()); }); if ($('#calculator_armor_compare').size() === 0) { $('#calculator_armor_damages').after($('
Alternative Linked Data Views: ODE     Raw Data in: CXML | CSV | RDF ( N-Triples N3/Turtle JSON XML ) | OData ( Atom JSON ) | Microdata ( JSON HTML) | JSON-LD    About   
This material is Open Knowledge   W3C Semantic Web Technology [RDF Data] Valid XHTML + RDFa
OpenLink Virtuoso version 07.20.3217, on Linux (x86_64-pc-linux-gnu), Standard Edition
Data on this page belongs to its respective rights holders.
Virtuoso Faceted Browser Copyright © 2009-2012 OpenLink Software