Mutik's DotD Script

Fork of ForTheGoodOfAll DotD script with new look and strongly optimized js code

  1. // ==UserScript==
  2. // @name Mutik's DotD Script
  3. // @namespace tag://kongregate
  4. // @description Fork of ForTheGoodOfAll DotD script with new look and strongly optimized js code
  5. // @author Mutik
  6. // @version 1.1.72
  7. // @grant GM_xmlhttpRequest
  8. // @grant GM_setValue
  9. // @grant GM_getValue
  10. // @grant unsafeWindow
  11. // @include http://www.kongregate.com/games/5thPlanetGames/dawn-of-the-dragons*
  12. // @include *50.18.191.15/kong/?DO_NOT_SHARE_THIS_LINK*
  13. // @connect 50.18.191.15
  14. // @connect mutik.erley.org
  15. // @hompage http://mutik.erley.org
  16. // ==/UserScript==
  17.  
  18. //best loop atm: for(var i=0, l=obj.length; i<l; ++i) - for with caching and pre-increment
  19.  
  20. if (window.location.host == "www.kongregate.com") {
  21. function main() {
  22.  
  23. if (typeof GM_setValue == 'undefined') {
  24. var GM_setValue = function (name, value) {
  25. localStorage.setItem(name, (typeof value).substring(0, 1) + value);
  26. };
  27. }
  28. if (typeof GM_getValue == 'undefined') {
  29. var GM_getValue = function (name, dvalue) {
  30. var value = localStorage.getItem(name);
  31. if (typeof value != 'string') return dvalue;
  32. else {
  33. var type = value.substring(0, 1);
  34. value = value.substring(1);
  35. if (type == 'b') return (value == 'true');
  36. else if (type == 'n') return Number(value);
  37. else return value;
  38. }
  39. };
  40. }
  41. //if (typeof GM_deleteValue == 'undefined') var GM_deleteValue = function(name) { localStorage.removeItem(name) };
  42.  
  43. window.FPX = {
  44. LandBasePrices: [4000, 15000, 25000, 50000, 75000, 110000, 300000, 600000, 1200000],
  45. LandBaseIncome: [100, 300, 400, 700, 900, 1200, 2700, 4500, 8000],
  46. LandCostRatio: function (owned) {
  47. var landCosts = [4000, 15000, 25000, 50000, 75000, 110000, 300000, 600000, 1200000];
  48. var icr = [1, 1, 1, 1, 1, 1, 1, 1, 1];
  49. /*Income/Cost ratio*/
  50. var i = 9;
  51. while (i--) {
  52. landCosts[i] += FPX.LandBasePrices[i] * owned[i] / 10;
  53. icr[i] = FPX.LandBaseIncome[i] / landCosts[i];
  54. }
  55. return icr;
  56. }
  57. };
  58. window.timeSince = function (date, after) {
  59. if (typeof date === 'number') date = new Date(date);
  60. var seconds = Math.abs(Math.floor((new Date().getTime() - date.getTime()) / 1000));
  61. var interval = Math.floor(seconds / 31536000);
  62. var pretext = 'about ', posttext = after ? ' left' : ' ago';
  63. if (interval >= 1) return pretext + interval + ' year' + (interval == 1 ? '' : 's') + posttext;
  64. interval = Math.floor(seconds / 2592000);
  65. if (interval >= 1) return pretext + interval + ' month' + (interval == 1 ? '' : 's') + posttext;
  66. interval = Math.floor(seconds / 86400);
  67. if (interval >= 1) return pretext + interval + ' day' + (interval == 1 ? '' : 's') + posttext;
  68. interval = Math.floor(seconds / 3600);
  69. if (interval >= 1) return pretext + interval + ' hour' + (interval == 1 ? '' : 's') + posttext;
  70. interval = Math.floor(seconds / 60);
  71. if (interval >= 1) return interval + ' minute' + (interval == 1 ? '' : 's') + posttext;
  72. return Math.floor(seconds) + ' second' + (seconds == 1 ? '' : 's') + posttext;
  73. };
  74. window.isNumber = function (n) {
  75. return !isNaN(parseFloat(n)) && isFinite(n);
  76. };
  77. window.SRDotDX = {
  78. version: { major: "1.1.72", minor: 'Mutik\'s DotD Extension' },
  79. c: function (ele) {
  80. function Cele(ele) {
  81. this._ele = ele;
  82. this.ele = function() {return this._ele};
  83. this.set = function(param) {for (var attr in param) if (param.hasOwnProperty(attr)) this._ele.setAttribute(attr,param[attr]); return this};
  84. this.text = function(text) {this._ele.appendChild(document.createTextNode(text)); return this};
  85. this.html = function(text,overwrite) {this._ele.innerHTML = overwrite ? text : (this._ele.innerHTML + text); return this};
  86. this.on = function(event,func,bubble) {this._ele.addEventListener(event, func, bubble); return this};
  87. this.off = function(event,func,bubble) {this._ele.removeEventListener(event, func, bubble); return this};
  88. this.del = function() {this._ele.parentNode.removeChild(this._ele); return null};
  89. this.attach = function(method,dele) {
  90. if (typeof dele === 'string') dele = document.getElementById(dele);
  91. if (!(dele instanceof Node)) throw 'Invalid attachment element specified';
  92. else if (!/^(?:to|before|after)$/i.test(method)) throw 'Invalid append method specified';
  93. else if (method === 'to') dele.appendChild(this._ele);
  94. else if (method === 'before') dele.parentNode.insertBefore(this._ele, dele);
  95. else if (dele.nextSibling === null) dele.parentNode.appendChild(this._ele);
  96. else dele.parentNode.insertBefore(this._ele, dele.nextSibling);
  97. return this
  98. };
  99. }
  100. if (typeof ele === 'string') ele = ele.charAt(0) === '#' ? document.getElementById(ele.substring(1)) : document.createElement(ele);
  101. if (ele instanceof Node) return new Cele(ele);
  102. throw 'Invalid element type specified';
  103. },
  104. util: {
  105. isArrEq: function(a,b) {
  106. if(a.length !== b.length) return false;
  107. var ca = a.slice().sort().join(",");
  108. var cb = b.slice().sort().join(",");
  109. return ca === cb;
  110. },
  111. crc32: function(str) {
  112. var crcTable = [];
  113. for (var i = 0, c = i; i < 256; ++i, c = i) {
  114. for(var k =0; k < 8; k++) c = ((c&1)?(0xEDB88320^(c>>>1)):(c>>>1));
  115. crcTable[i] = c;
  116. }
  117. var crc = 0 ^ (-1);
  118. for (i = 0; i < str.length; ++i) crc = (crc >>> 8) ^ crcTable[(crc ^ str.charCodeAt(i)) & 0xFF];
  119. return ((crc^(-1))>>>0).toString(16);
  120. },
  121. getChatLinks: function() {
  122. var obj, out = '<p style="font: normal 9pt \'Trebuchet MS\'">';
  123. for(var i = 0; i < SRDotDX.linksHistory.length; i++) {
  124. obj = SRDotDX.linksHistory[i];
  125. out += '('+(new Date(obj.t).toLocaleTimeString())+') <b>'+obj.u+'</b>: '+obj.m+'<br>';
  126. }
  127. out += '</p>';
  128. var x = window.open();
  129. x.document.open();
  130. x.document.write(out);
  131. x.document.close();
  132. },
  133. getChatNumber: function() {
  134. var cont = document.getElementById('chat_rooms_container').children, i = 0;
  135. for (i = 0; i < cont.length; i++) {
  136. if (cont[i].style.display === 'none' || cont[i].id.indexOf('alliance') === 0) continue;
  137. return i
  138. }
  139. return i;
  140. },
  141. getQueryVariable: function(v,s) {
  142. var query = String(s || window.location.search.substring(1));
  143. if (query.indexOf('?') > -1) query = query.substring(query.indexOf('?') + 1);
  144. var vars = query.split('&');
  145. var i = vars.length;
  146. while(i--) {
  147. var pair = vars[i].split('=');
  148. if (decodeURIComponent(pair[0]) == v) return decodeURIComponent(pair[1]);
  149. }
  150. return '';
  151. },
  152. getRaidFromUrl: function(url) {
  153. var r = {id: 0, boss: '', hash: '', diff: 0, sid: 1}, cnt = 0, i;
  154. var reg = /[?&]([^=]+)=([^?&]+)/ig, p = url.replace(/&amp;/gi, '&').replace(/kv_&/gi, '&kv_').replace(/http:?/gi, '');
  155. while ((i = reg.exec(p)) !== null) {
  156. switch (i[1]) {
  157. case 'kv_raid_id':
  158. case 'raid_id': r.id = parseInt(i[2]); cnt++; break;
  159. case 'kv_difficulty':
  160. case 'difficulty': r.diff = parseInt(i[2]); cnt++; break;
  161. case 'kv_raid_boss':
  162. case 'raid_boss': r.boss = i[2]; cnt++; break;
  163. case 'kv_hash':
  164. case 'hash': r.hash = i[2]; cnt++; break;
  165. case 'kv_serverid':
  166. case 'serverid': r.sid = parseInt(i[2]); cnt++; break;
  167. }
  168. }
  169. if (cnt < 4) return null;
  170. return r;
  171. },
  172. userListChanged: function(user, ign, guild) {
  173. //console.log('IGN handle: '+user+'|'+ign+'|'+guild);
  174. if (user && ign && guild) {
  175. if (typeof SRDotDX.config.ignUsers[user] === 'undefined') SRDotDX.config.ignUsers[user] = { ign: ign, gld: guild };
  176. else {
  177. if (SRDotDX.config.ignUsers[user].ign !== ign) SRDotDX.config.ignUsers[user].ign = ign;
  178. if (SRDotDX.config.ignUsers[user].gld !== guild) SRDotDX.config.ignUsers[user].gld = guild;
  179. }
  180. }
  181. else { user&&console.log(user); ign&&console.log(ign); guild&&console.log(guild); }
  182. },
  183. getGameRoomNumber: function() {
  184. if(typeof holodeck === 'object' && typeof holodeck.chatWindow === 'function')
  185. return parseInt(holodeck.chatWindow()._rooms_by_type.game._room.name.slice(-2));
  186. return 0;
  187. },
  188. getShortNum: function(num, p) {
  189. p = p || 4;
  190. if (isNaN(num) || num < 0) return num;
  191. if (num >= 1000000000000) return (num / 1000000000000).toPrecision(p) + 't';
  192. if (num >= 1000000000) return (num / 1000000000).toPrecision(p) + 'b';
  193. if (num >= 1000000) return (num / 1000000).toPrecision(p) + 'm';
  194. if (num >= 1000) return (num / 1000).toPrecision(p) + 'k';
  195. return num + ''
  196. },
  197. getShortNumMil: function(num) {
  198. if (isNaN(num) || num < 0) return num;
  199. if (num >= 1000000) return (num / 1000000).toPrecision(4) + 't';
  200. if (num >= 1000) return (num / 1000).toPrecision(4) + 'b';
  201. return num.toPrecision(4) + 'm'
  202. },
  203. objToUriString: function(obj) {
  204. if (typeof obj === 'object') {
  205. var str = '';
  206. for (var i in obj) if (obj.hasOwnProperty(i)) str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]) + '&';
  207. str = str.substring(0, str.length - 1);
  208. return str
  209. }
  210. return '';
  211. },
  212. deRomanize: function(roman) {
  213. var lut = {I:1, V:5, X:10, L:50, C:100, D:500, M:1000};
  214. var arabic = 0, i = roman.length;
  215. while (i--) {
  216. if (lut[roman[i]] < lut[roman[i+1]]) arabic -= lut[roman[i]];
  217. else arabic += lut[roman[i]];
  218. }
  219. return arabic;
  220. },
  221. extEcho: function(msg) {
  222. var cw;
  223. if (SRDotDX.alliance.isActive) cw = document.getElementById('alliance_chat_window');
  224. else {
  225. var cn = SRDotDX.util.getChatNumber();
  226. cw = document.getElementById('chat_rooms_container').children[SRDotDX.util.getChatNumber()].getElementsByClassName('chat_message_window')[0];
  227. }
  228. var p = cw.getElementsByTagName('p');
  229. var m;
  230. if (p.length > 0 && p[p.length-1].className.indexOf('script') > -1) {
  231. m = p[p.length-1].getElementsByClassName('message')[0];
  232. m.innerHTML = m.innerHTML + '<hr>' + msg;
  233. }
  234. else {
  235. m = SRDotDX.c('div').ele();
  236. var mi = SRDotDX.c('div').attach('to',m).ele();
  237. var mi2 = SRDotDX.c('p').set({class: 'script'}).attach('to',mi).ele();
  238. SRDotDX.c('span').set({class: 'username DotDeXtension'}).html("DotDeXtension",true).attach('to',mi2);
  239. SRDotDX.c('span').set({class: 'separator'}).html(": ",true).attach('to',mi2);
  240. SRDotDX.c('span').set({class: 'message', name: 'SRDotDX_DotDeXtension'}).html('<br>'+msg,true).attach('to',mi2);
  241. SRDotDX.c('span').set({class: 'clear'}).attach('to',mi2);
  242. var div = cw.lastChild;
  243. if(div) div.appendChild(mi);
  244. else cw.appendChild(m);
  245. }
  246. setTimeout(SRDotDX.gui.scrollChat, 100, true);
  247. },
  248. serialize: function(obj) {
  249. var str = [];
  250. for (var p in obj) if (obj.hasOwnProperty(p)) if (obj[p] !== null)
  251. str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
  252. return str.join("&");
  253. },
  254. stringFormat: function() {
  255. var s = arguments[0];
  256. for (var i = 0; i < arguments.length - 1; i++) {
  257. var reg = new RegExp("\\{" + i + "\\}", "gm");
  258. s = s.replace(reg, arguments[i + 1]);
  259. }
  260. return s;
  261. }
  262. },
  263. config: (function() {
  264. var tmp, reqSave = false;
  265. try {tmp = JSON.parse(GM_getValue('SRDotDX', '{}'));}
  266. catch (e) {tmp = {};reqSave = true }
  267.  
  268. //Raids tab vars
  269. tmp.filterSearchStringR = typeof tmp.filterSearchStringR === 'string' ? tmp.filterSearchStringR : '';
  270. tmp.fltIncVis = typeof tmp.fltIncVis === 'boolean' ? tmp.fltIncVis : false;
  271. tmp.fltExclFull = typeof tmp.fltExclFull === 'boolean' ? tmp.fltExclFull : false;
  272. tmp.fltShowAll = typeof tmp.fltShowAll === 'boolean' ? tmp.fltShowAll : false;
  273.  
  274. //Options tab vars
  275. tmp.importFiltered = typeof tmp.importFiltered === 'boolean' ? tmp.importFiltered : true;
  276. tmp.hideRaidLinks = typeof tmp.hideRaidLinks === 'boolean' ? tmp.hideRaidLinks : false;
  277. tmp.hideBotLinks = typeof tmp.hideBotLinks === 'boolean' ? tmp.hideBotLinks : false;
  278. tmp.hideVisitedRaids = typeof tmp.hideVisitedRaids === 'boolean' ? tmp.hideVisitedRaids : false;
  279. tmp.hideVisitedRaidsInRaidList = typeof tmp.hideVisitedRaidsInRaidList === 'boolean' ? tmp.hideVisitedRaidsInRaidList : false;
  280. tmp.markMyRaidsVisted = typeof tmp.markMyRaidsVisted === 'boolean' ? tmp.markMyRaidsVisted : false;
  281. tmp.markImportedVisited = typeof tmp.markImportedVisited === 'boolean' ? tmp.markImportedVisited : false;
  282. tmp.FPXLandOwnedCount = typeof tmp.FPXLandOwnedCount === 'object' ? tmp.FPXLandOwnedCount : [0, 0, 0, 0, 0, 0, 0, 0, 0];
  283. tmp.prettyPost = typeof tmp.prettyPost === 'boolean' ? tmp.prettyPost : false;
  284. tmp.clearRMB = typeof tmp.clearRMB === 'boolean' ? tmp.clearRMB : false;
  285. tmp.showStatusOverlay = typeof tmp.showStatusOverlay === 'boolean' ? tmp.showStatusOverlay : false;
  286. tmp.confirmDeletes = typeof tmp.confirmDeletes === 'boolean' ? tmp.confirmDeletes : true;
  287. tmp.autoPostPaste = typeof tmp.autoPostPaste === 'boolean' ? tmp.autoPostPaste : false;
  288. tmp.whisperTo = typeof tmp.whisperTo === 'string' ? tmp.whisperTo : '';
  289. tmp.formatLinkOutput = typeof tmp.formatLinkOutput === 'boolean' ? tmp.formatLinkOutput : false;
  290. tmp.linkShowFs = typeof tmp.linkShowFs === 'boolean' ? tmp.linkShowFs : false;
  291. tmp.linkShowAp = typeof tmp.linkShowAp === 'boolean' ? tmp.linkShowAp : false;
  292. tmp.unvisitedRaidPruningMode = typeof tmp.unvisitedRaidPruningMode === 'number' ? tmp.unvisitedRaidPruningMode : 1;
  293. tmp.selectedRaids = typeof tmp.selectedRaids === 'string' ? tmp.selectedRaids : '';
  294. tmp.pastebinUrl = typeof tmp.pastebinUrl === 'string' ? tmp.pastebinUrl : '';
  295. tmp.bckColor = typeof tmp.bckColor === 'string' ? tmp.bckColor : 'fff';
  296. tmp.lastImported = typeof tmp.lastImported === 'number' ? tmp.lastImported : (new Date().getTime() - 1728000000);
  297. tmp.hideKongForum = typeof tmp.hideKongForum === 'boolean' ? tmp.hideKongForum : false;
  298. tmp.hideGameDetails = typeof tmp.hideGameDetails === 'boolean' ? tmp.hideGameDetails : false;
  299. tmp.hideGameTitle = typeof tmp.hideGameTitle === 'boolean' ? tmp.hideGameTitle : true;
  300. tmp.chatFilterString = typeof tmp.chatFilterString === 'string' ? tmp.chatFilterString : '';
  301. tmp.filterSearchStringC = typeof tmp.filterSearchStringC === 'string' ? tmp.filterSearchStringC : '';
  302. tmp.chatSize = typeof tmp.chatSize === 'number' ? tmp.chatSize : 300;
  303. tmp.sbEnable = typeof tmp.sbEnable === 'boolean' ? tmp.sbEnable : true;
  304. tmp.sbSlim = typeof tmp.sbSlim === 'boolean' ? tmp.sbSlim : false;
  305. tmp.sbRightSide = typeof tmp.sbRightSide === 'boolean' ? tmp.sbRightSide : false;
  306. tmp.formatLinks = typeof tmp.formatLinks === 'boolean' ? tmp.formatLinks : false;
  307. tmp.slimKongBar = typeof tmp.slimKongBar === 'boolean' ? tmp.slimKongBar : false;
  308. tmp.kongUser = typeof tmp.kongUser === 'string' ? tmp.kongUser : 'Guest';
  309. tmp.kongAuth = typeof tmp.kongAuth === 'string' ? tmp.kongAuth : '0';
  310. tmp.kongId = typeof tmp.kongId === 'string' ? tmp.kongId : '0';
  311. tmp.kongMsg = typeof tmp.kongMsg === 'boolean' ? tmp.kongMsg : false;
  312. tmp.hideGameTab = typeof tmp.hideGameTab === 'boolean' ? tmp.hideGameTab : false;
  313. tmp.hideAccTab = typeof tmp.hideAccTab === 'boolean' ? tmp.hideAccTab : false;
  314. tmp.dotdxTabName = typeof tmp.dotdxTabName === 'string' ? tmp.dotdxTabName : 'Raids';
  315. tmp.themeNum = typeof tmp.themeNum === 'number' ? tmp.themeNum : 1;
  316. tmp.fontNum = typeof tmp.fontNum === 'number' ? tmp.fontNum : 0;
  317. tmp.ignMode = typeof tmp.ignMode === 'number' ? tmp.ignMode : 1;
  318. tmp.hideScrollBar = typeof tmp.hideScrollBar === 'boolean' ? tmp.hideScrollBar : false;
  319. tmp.allianceChat = typeof tmp.allianceChat === 'boolean' ? tmp.allianceChat : false;
  320. tmp.allianceServer = typeof tmp.allianceServer === 'string' ? tmp.allianceServer : '';
  321. tmp.allianceIsExternal = typeof tmp.allianceIsExternal === 'boolean' ? tmp.allianceIsExternal : tmp.allianceServer&&true||false;
  322. tmp.allianceChannel = typeof tmp.allianceChannel === 'string' ? tmp.allianceChannel : '';
  323. tmp.alliancePass = typeof tmp.alliancePass === 'string' ? tmp.alliancePass : '';
  324. tmp.allianceName = typeof tmp.allianceName === 'string' ? tmp.allianceName : 'Alliance';
  325. tmp.hideWChat = typeof tmp.hideWChat === 'boolean' ? tmp.hideWChat : false;
  326. tmp.leftWChat = typeof tmp.leftWChat === 'boolean' ? tmp.leftWChat : false;
  327. tmp.removeWChat = typeof tmp.removeWChat === 'boolean' ? tmp.removeWChat : false;
  328. tmp.filterChatLinks = typeof tmp.filterChatLinks === 'boolean' ? tmp.filterChatLinks : true;
  329. tmp.filterRaidList = typeof tmp.filterRaidList === 'boolean' ? tmp.filterRaidList : true;
  330. tmp.newRaidsAtTopOfList = typeof tmp.newRaidsAtTopOfList === 'boolean' ? tmp.newRaidsAtTopOfList : false;
  331. tmp.serverMode = typeof tmp.serverMode === 'number' ? tmp.serverMode : 1;
  332. tmp.sbConfig = typeof tmp.sbConfig === 'object' ? tmp.sbConfig : [
  333. {"type": "label", "name": "Camps"},
  334. {"type": "btn", "name": "NMQ", "cmd": "/camp nmq"},
  335. {"type": "btn", "name": "MaM", "cmd": "/camp mam"},
  336. {"type": "btn", "name": "FW", "cmd": "/camp fw"},
  337. {"type": "label", "name": "Tiers"},
  338. {"type": "btn", "name": "Bella", "cmd": "/raid bella"},
  339. {"type": "btn", "name": "Xerk", "cmd": "/raid xerkara"},
  340. {"type": "btn", "name": "Tisi", "cmd": "/raid tisi"},
  341. {"type": "label", "name": "Join"},
  342. {"type": "btn", "name": "Farms", "cmd": "SRDotDX.gui.quickImportAndJoin(\'farm:nnm\',false)"},
  343. {"type": "label", "name": "Utils"},
  344. {"type": "btn", "color": "g", "name": "(Re)Load", "sname": "Reld", "cmd": "SRDotDX.reload()"},
  345. {"type": "btn", "color": "r", "name": "Unload", "sname": "Kill", "cmd": "/kill"},
  346. {"type": "btn", "name": "Room 1", "sname": "CR1", "cmd": "SRDotDX.gui.gotoRoom(1)"},
  347. {"type": "btn", "name": "Room 2", "sname": "CR2", "cmd": "SRDotDX.gui.gotoRoom(2)"},
  348. {"type": "btn", "name": "Room 8", "sname": "CR8", "cmd": "SRDotDX.gui.gotoRoom(8)"},
  349. {"type": "label", "name": "Sheets", "sname": "Help"},
  350. {"type": "btn", "name": "Magic", "sname": "Mag", "cmd": "https://docs.google.com/spreadsheets/d/1O0eVSnzlACP9XJDq0VN4kN51ESUusec3-gD4dKPHRNU"},
  351. {"type": "btn", "name": "Mount", "sname": "Mnt", "cmd": "https://docs.google.com/spreadsheet/ccc?key=0AiSpM5yAo8atdER2NEhHY3VjckRhdWctWV8yampQZUE"},
  352. {"type": "btn", "name": "Gear", "cmd": "https://docs.google.com/spreadsheet/lv?key=0AvP2qXrWcHBxdHpXZkUzTHNGNkVWbjE5c2VEZUNNMUE"},
  353. {"type": "label", "name": "Raids"},
  354. {"type": "jtxt"},
  355. {"type": "btn", "color": "g", "name": "Join", "cmd": "SRDotDX.gui.joinSelectedRaids(true)"},
  356. {"type": "btn", "color": "b", "name": "Import", "sname": "Imp", "cmd": "SRDotDX.gui.importFromServer()"},
  357. {"type": "btn", "color": "y", "name": "RaidBot", "sname": "Bot", "cmd": "SRDotDX.gui.switchBot()"} ];
  358.  
  359. if (typeof tmp.mutedUsers !== 'object') tmp.mutedUsers = {};
  360. if (typeof tmp.ignUsers !== 'object') tmp.ignUsers = {};
  361. else {
  362. var uk = Object.keys(tmp.ignUsers);
  363. if (uk.length > 0 && typeof tmp.ignUsers[uk[0]].ign !== 'string')
  364. for (var k in uk) { if(tmp.ignUsers.hasOwnProperty(uk[k])) tmp.ignUsers[uk[k]] = { ign: tmp.ignUsers[uk[k]], gld: '*unknown*' }; }
  365. }
  366. if (typeof tmp.friendUsers !== 'object') tmp.friendUsers = {};
  367. if (typeof tmp.raidList !== 'object') tmp.raidList = {};
  368. if (typeof tmp.filters !== 'object') tmp.filters = [{},{}];
  369. if (typeof tmp.lastFilter !== 'object') tmp.lastFilter = typeof tmp.lastFilter === 'string' ? [tmp.lastFilter, tmp.lastFilter] : ["",""];
  370. if (tmp.filters.length !== 2) tmp.filters = [tmp.filters, tmp.filters];
  371. if (tmp.lastImported > (new Date().getTime())) tmp.lastImported = (new Date().getTime() - 1728000000);
  372. if (reqSave) GM_setValue('SRDotDX', JSON.stringify(tmp));
  373.  
  374. // Delete expired raids
  375. for (var id in tmp.raidList) {
  376. if(tmp.raidList.hasOwnProperty(id)) {
  377. if (typeof tmp.raidList[id].magic === "undefined") tmp.raidList[id].magic = [0, 0, 0, 0, 0, 0];
  378. if (typeof tmp.raidList[id].hp === "undefined") tmp.raidList[id].hp = 1.0;
  379. if (typeof tmp.raidList[id].sid === "undefined") tmp.raidList[id].sid = 1;
  380. if (typeof tmp.raidList[id].ppl === "undefined") tmp.raidList[id].ppl = 0;
  381. if (typeof tmp.raidList[id].isFull === "undefined") tmp.raidList[id].isFull = false;
  382. }
  383. }
  384.  
  385. tmp.addRaid = function (hash, id, boss, diff, sid, visited, user, ts, magic, hp, ppl) {
  386. if (typeof SRDotDX.config.raidList[id] !== 'object') {
  387. var tStamp = typeof ts === 'undefined' || ts === null ? parseInt(new Date().getTime() / 1000) : parseInt(ts);
  388. SRDotDX.config.raidList[id] = {
  389. hash: hash, id: id, boss: boss, diff: diff, sid: sid, visited: visited, user: user, timeStamp: tStamp,
  390. expTime: (typeof SRDotDX.raids[boss] === 'object' ? SRDotDX.raids[boss].duration : 24) * 3600 + tStamp,
  391. magic: magic === undefined || magic === null ? [0,0,0,0,0,0] : magic,
  392. hp: hp === undefined || hp === null ? 1.0 : parseFloat(hp),
  393. ppl: ppl === undefined || ppl === null ? 0 : parseInt(ppl),
  394. isFull: ppl && typeof SRDotDX.raids[boss] === 'object' && SRDotDX.raids[boss].size === parseInt(ppl),
  395. ni: magic === undefined
  396. };
  397. SRDotDX.gui.addRaid(id);
  398. }
  399. return SRDotDX.config.raidList[id]
  400. };
  401. tmp.save = function (b) {
  402. b = typeof b == 'undefined' ? true : b;
  403. GM_setValue('SRDotDX', JSON.stringify(SRDotDX.config));
  404. if(b) setTimeout(SRDotDX.config.save, 60000, true);
  405. else console.log('[DotDX] Manual config save invoked');
  406. };
  407. tmp.extSave = function(){SRDotDX.gframe('dotdx.save#'+JSON.stringify({'removeWChat':SRDotDX.config.removeWChat,'leftWChat':SRDotDX.config.leftWChat,'hideWChat':SRDotDX.config.hideWChat}));};
  408. return tmp;
  409. })(),
  410. alliance: {
  411. chat: null,
  412. chatcnt: 0,
  413. isActive: false,
  414. isExternal: false,
  415. rFlag: false,
  416. unkVal: null,
  417. user: null,
  418. getGuildTag: function(guild) {
  419. var roman = /^(.+\s)([IXV]+)$/.exec(guild);
  420. if (roman) guild = roman[1] + SRDotDX.util.deRomanize(roman[2]);
  421. var reg = /([A-Z]+|\w)\w*/g;
  422. var tag = '', part;
  423. while (part = reg.exec(guild)) tag += part[1];
  424. return tag
  425. },
  426. processMessage: function(user, inGameName, cls, time, message, pfx) {
  427. //console.log("[DotDX] aChat: " + time +"|"+user+"|"+inGameName+"|"+message);
  428. var usrCls = ["chat_message_window_username"];
  429. var curTs = new Date().getTime().toString();
  430. var isSelf = user === SRDotDX.config.kongUser;
  431. var usr = user;
  432. if ((this.chatcnt++) % 2) cls.push('even');
  433. if (pfx === 'u ') pfx = '';
  434. var ts = '', ign = '';
  435. var pClass = cls.join(' ');
  436. if (pClass.indexOf('emote') < 0 && pClass.indexOf('script') < 0) {
  437. var raid = SRDotDX.getRaidLink(message, user, true);
  438. if (raid) {
  439. cls.push('DotDX_raid');
  440. cls.push('DotDX_sid_' + raid.sid);
  441. cls.push('DotDX_diff_' + raid.diff);
  442. cls.push('DotDX_raidId_' + raid.id);
  443. if (raid.visited) cls.push('DotDX_visitedRaid');
  444. cls.push('DotDX_fltChat_' + raid.boss + '_' + (raid.diff - 1));
  445. message = raid.ptext + '<a href="' + raid.url + '" class="chatRaidLink ' + raid.id + '|' + raid.hash + '|' + raid.boss + '|' + raid.diff + '|' + raid.sid +
  446. '" style="float:right;" onmouseout="SRDotDX.gui.helpBox(\'chat_raids_overlay\',\'dotdm_' + curTs + '\',\'\',true);" onmouseover="SRDotDX.gui.helpBox(\'chat_raids_overlay\',\'dotdm_' + curTs + '\',' + raid.id + ',false);">' + raid.linkText() + '</a>' + raid.ntext;
  447. SRDotDX.gui.toggleRaid('visited', raid.id, raid.visited);
  448. SRDotDX.gui.joining ? SRDotDX.gui.pushRaidToJoinQueue(raid.id) : SRDotDX.gui.selectRaidsToJoin('chat');
  449. }
  450. else {
  451. var reg = /(^|.+?)(\s|\,|$|^)(https?:\/\/[^\,\s]+|$)/g;
  452. var part, msg = '';
  453. while (part = reg.exec(message)) {
  454. msg += part[1] + part[2];
  455. if (part[3].length > 0) {
  456. if (part[3].indexOf('http') === 0) msg += '<a href="' + part[3] + '" target="_blank" class="chat_link">' + part[3] + '</a>';
  457. else msg += part[3];
  458. }
  459. }
  460. message = msg;
  461. }
  462.  
  463. if (SRDotDX.config.mutedUsers[usr]) cls.push('DotDX_hidden');
  464. isSelf && usrCls.push('is_self');
  465.  
  466. if (inGameName && inGameName !== SRDotDX.alliance.unkVal) if (SRDotDX.config.ignUsers[usr] && SRDotDX.config.ignUsers[usr].ign !== inGameName) SRDotDX.config.ignUsers[usr].ign = inGameName;
  467.  
  468. if (SRDotDX.config.ignUsers[usr] && SRDotDX.config.ignUsers[usr].ign !== SRDotDX.alliance.unkVal) {
  469. switch (SRDotDX.config.ignMode) {
  470. case 2: ign = ' (' + SRDotDX.config.ignUsers[usr].ign + ')'; break;
  471. case 1: usr = SRDotDX.config.ignUsers[usr].ign; usrCls.push('ign'); break;
  472. }
  473. }
  474. ts = '(' + time.slice(0, 5) + ')&ensp;';
  475. }
  476. else if (pClass.indexOf('emote') > -1 && user !== SRDotDX.alliance.unkVal) message = user + ' ' + message;
  477.  
  478. return SRDotDX.alliance.formatMessage(cls, curTs, ts, usrCls, user, pfx, usr, ign, message);
  479.  
  480. },
  481. formatMessage: function(cls, curTs, ts, usrCls, user, pfx, usr, ign, message) {
  482. return '<p class="'+cls.join(' ')+'">' +
  483. '<span id="dotdm_'+curTs+'" class="slider" style="max-width:0" onmouseleave="this.style.maxWidth=\'0\'"></span>' +
  484. '<span class="timestamp">'+ts+'</span>' +
  485. '<span class="username '+usrCls.join(' ')+' dotdm_'+curTs+'" username="'+user+'" dotdxname="'+user+'" oncontextmenu="return false;">'+pfx+usr+'</span>' +
  486. '<span class="ign ingamename">'+ign+'</span>' +
  487. '<span class="separator">: </span>' +
  488. '<span name="SRDotDX_'+usr+'" class="message">'+message.trim()+'</span>' +
  489. '<span class="clear"></span></p>';
  490. },
  491. handleMessage: function(d) {
  492. var node = '';
  493. switch(d.type) {
  494. case 0:
  495. node = SRDotDX.alliance.processMessage(d.usr.usr, d.usr.ign, [], new Date(d.ts).toLocaleTimeString(), d.txt, SRDotDX.alliance.getGuildTag(d.usr.gld) + ' ');
  496. break;
  497. case 1: case 2:
  498. node = SRDotDX.alliance.processMessage(d.usr.usr, d.usr.ign, ['whisper'], new Date(d.ts).toLocaleTimeString(), d.txt, ['','From ','To '][d.type]);
  499. break;
  500. case 3:
  501. node = SRDotDX.alliance.processMessage(d.usr.usr, '', ['emote'], new Date(d.ts).toLocaleTimeString(), d.txt, '');
  502. break;
  503. case 4:
  504. node = SRDotDX.alliance.processMessage('', '', ['emote'], new Date().toLocaleTimeString(), d.txt, '');
  505. break;
  506. default : console.log(d);
  507. }
  508. if (node) SRDotDX.c('div').html(node, true).attach('to', 'alliance_chat_window');
  509. if (SRDotDX.alliance.isActive) {
  510. if (node.indexOf('<img src') > -1) setTimeout(SRDotDX.gui.scrollChat, 300);
  511. setTimeout(SRDotDX.gui.scrollChat, 10);
  512. }
  513. else if (document.getElementById('alliance_tab').className.indexOf('unread') < 0) document.getElementById('alliance_tab').className = 'unread';
  514. },
  515. handleService: function(d) {
  516. switch(d.act) {
  517. case 'loadData':
  518. // userList
  519. console.info('Loading users online...');
  520. SRDotDX.c('#alliance_users').html('',true);
  521. var sUsers = Object.keys(d.users).sort(), u;
  522. for (var m = 0; m < sUsers.length; m++) {
  523. u = d.users[sUsers[m]];
  524. if (!SRDotDX.config.ignUsers[u.usr] ||
  525. (u.ign && SRDotDX.config.ignUsers[u.usr].ign !== u.ign) ||
  526. (u.gld && SRDotDX.config.ignUsers[u.usr].gld !== u.gld)) SRDotDX.config.ignUsers[u.usr] = u;
  527. SRDotDX.alliance.addUserToList(u);
  528. }
  529. SRDotDX.c('#alliance_number').html(sUsers.length, true);
  530.  
  531. // messageLog
  532. console.info('Loading messages log...');
  533. var to = 0;
  534. for (m of d.log) setTimeout(SRDotDX.alliance.handleMessage, to++, m);
  535.  
  536. // allianceRaids
  537. console.info('Loading alliance raids...');
  538. //console.info(d.raids);
  539. //var r = JSON.parse(data['data']), raid, cnt = 0;
  540. var r, cnt = 0, swt = !SRDotDX.config.importFiltered, filter = SRDotDX.c('#DotDX_filters').ele().innerHTML;
  541. for (var i in d.raids) if (d.raids.hasOwnProperty(i)) {
  542. r = d.raids[i];
  543. if (!SRDotDX.config.raidList[i] && (swt || filter.indexOf('fltList_' + r.boss + '_' + (parseInt(r.diff) - 1)) < 0)) {
  544. SRDotDX.config.addRaid(r.hash, parseInt(r.id), r.boss, parseInt(r.diff), parseInt(r.sid), false, r.usr || 'Alliance', r.ts || null, '41');
  545. cnt++;
  546. }
  547. }
  548. SRDotDX.alliance.handleMessage({type:4, txt: 'Loaded '+cnt+' raids into local database.'});
  549. SRDotDX.gui.selectRaidsToJoin('alliance raids');
  550. break;
  551.  
  552. case 'userLeave':
  553. console.info('User', d.user.usr, 'has left.');
  554. var node = document.getElementById(d.user.sid);
  555. if (node) node.parentNode.removeChild(node);
  556. SRDotDX.c('#alliance_number').html(d.num, true);
  557. break;
  558.  
  559. case 'userJoin':
  560. console.info('User', d.user.usr, 'just logged in.');
  561. if (!SRDotDX.config.ignUsers[d.user.usr] ||
  562. (d.user.ign && SRDotDX.config.ignUsers[d.user.usr].ign !== d.user.ign) ||
  563. (d.user.gld && SRDotDX.config.ignUsers[d.user.usr].gld !== d.user.gld)) SRDotDX.config.ignUsers[d.user.usr] = d.user;
  564. SRDotDX.alliance.addUserToList(d.user, true);
  565. SRDotDX.c('#alliance_number').html(d.num, true);
  566. break;
  567.  
  568. case 'deadRaid':
  569. if (!SRDotDX.gui.joining) {
  570. SRDotDX.gui.deleteRaidFromDB(d.id);
  571. setTimeout(SRDotDX.gui.selectRaidsToJoin, 100, 'alliance dead removal');
  572. }
  573. break;
  574.  
  575. default: console.warn(d);
  576. }
  577. },
  578. addUserToList: function(u,sort){
  579. if (document.getElementById(u.sid)) return;
  580. var m = 'to', d = 'alliance_users';
  581. sort = sort || false;
  582. if (sort) {
  583. var n = document.getElementById('alliance_users');
  584. if (n) {
  585. n = n.children;
  586. for (var i = 0; i < n.length; i++) if (u.usr < n[i].getAttribute('usr')) { m = 'before'; d = n[i]; break; }
  587. }
  588. }
  589. SRDotDX.c('div').set({id:u.sid, usr:u.usr}).html('<span>' + ( u.gld === '' ? '???' : SRDotDX.alliance.getGuildTag(u.gld) ) + '</span><span>' + u.usr + '</span><span>' +
  590. ( u.ign === '' ? '' : '(' + u.ign + ')' ) + '</span>',true).attach(m,d);
  591. },
  592. reloadChat: function() {
  593. if (SRDotDX.alliance.isActive && SRDotDX.alliance.chat) {
  594. if (SRDotDX.alliance.chat.connected) SRDotDX.alliance.chat.disconnect();
  595. SRDotDX.alliance.chatcnt = 0;
  596. SRDotDX.alliance.chat.connect();
  597. }
  598. },
  599. destroyChat: function() {
  600. if (SRDotDX.alliance.chat) SRDotDX.alliance.chat.disconnect();
  601.  
  602. if (SRDotDX.alliance.isActive) document.getElementById('guild_room_tab').children[0].dispatchEvent(new MouseEvent('click', { button: 1, cancelable: true}));
  603.  
  604. SRDotDX.alliance.isActive = false;
  605. SRDotDX.alliance.chatcnt = 0;
  606. document.getElementsByClassName('room_name_container')[0].className = 'room_name_container h6_alt mbs';
  607.  
  608. var node = document.getElementById('alliance_tab');
  609. if (node) node.parentNode.removeChild(node);
  610. node = document.getElementById('alliance_room');
  611. if (node) node.parentNode.removeChild(node);
  612. node = document.getElementById('alliance_number');
  613. if (node) node.parentNode.removeChild(node);
  614.  
  615. SRDotDX.c('#chat_room_tabs').off('mouseup', SRDotDX.alliance.kongTabsEvent);
  616.  
  617. SRDotDX.config.allianceChat = false;
  618. SRDotDX.c('#options_enableAllianceChat').ele().checked = false;
  619.  
  620. if (SRDotDX.alliance.isExternal) SRDotDX.alliance.chat.removeAllListeners();
  621. SRDotDX.alliance.chat = null;
  622. SRDotDX.c('#alliance_script').del();
  623. delete io;
  624.  
  625. },
  626. createChat: function() {
  627. if ((SRDotDX.alliance.isExternal && typeof ioo === 'undefined') ||
  628. (!SRDotDX.alliance.isExternal && typeof io === 'undefined') ) {
  629. setTimeout(SRDotDX.alliance.createChat,1000);
  630. console.warn('[DotDX] socket.io not found, trying again in 1s...');
  631. return;
  632. }
  633. SRDotDX.alliance.unkVal = SRDotDX.alliance.isExternal ? '*unknown*' : '';
  634. SRDotDX.alliance.user = { usr: SRDotDX.config.kongUser || SRDotDX.alliance.unkVal,
  635. ign: SRDotDX.config.ignUsers[SRDotDX.config.kongUser].ign || SRDotDX.alliance.unkVal,
  636. gld: SRDotDX.config.ignUsers[SRDotDX.config.kongUser].gld || SRDotDX.alliance.unkVal };
  637.  
  638. if (SRDotDX.alliance.chat && SRDotDX.alliance.chat.connected) SRDotDX.alliance.chat.disconnect();
  639.  
  640. if (SRDotDX.alliance.isExternal) {
  641. SRDotDX.alliance.chat = ioo.connect(SRDotDX.config.allianceServer, {'reconnection delay': 1000});
  642. if (SRDotDX.alliance.rFlag) SRDotDX.alliance.chat.socket.reconnect();
  643. }
  644. else SRDotDX.alliance.chat = io.connect('http://remote.erley.org:3000/'+SRDotDX.config.allianceChannel,{query:'token='+SRDotDX.util.crc32(SRDotDX.config.alliancePass), multiplex: false});
  645. SRDotDX.alliance.rFlag = false;
  646.  
  647. SRDotDX.alliance.chat.on('error',function(d) {
  648. console.warn(d);
  649. SRDotDX.alliance.destroyChat();
  650. });
  651.  
  652. SRDotDX.alliance.chat.on('disconnect', function() {
  653. console.warn('Chat client disconnected!');
  654. if (SRDotDX.alliance.isExternal) SRDotDX.alliance.rFlag = true;
  655. });
  656.  
  657. SRDotDX.alliance.chat.on(SRDotDX.alliance.isExternal?'conn':'connect', function(){
  658. console.info('Chat socket connection established, joining...');
  659. SRDotDX.c('#alliance_chat_window').html('',true);
  660. var user = SRDotDX.alliance.user;
  661. if (SRDotDX.alliance.isExternal) user = {data: user.usr, ign: user.ign, guild: user.gld};
  662. SRDotDX.alliance.chat.emit('join', user);
  663. });
  664.  
  665. if (!SRDotDX.alliance.isExternal) {
  666. SRDotDX.alliance.chat.on('msg', SRDotDX.alliance.handleMessage);
  667. SRDotDX.alliance.chat.on('service', SRDotDX.alliance.handleService);
  668. }
  669. else {
  670. SRDotDX.alliance.chat.on('raids', function (data) {
  671. //console.log(data);
  672. var r = JSON.parse(data['data']), raid, cnt = 0;
  673. var swt = !SRDotDX.config.importFiltered, filter = SRDotDX.c('#DotDX_filters').ele().innerHTML;
  674. for (var i in r) if (r.hasOwnProperty(i)) {
  675. raid = r[i]; //console.log("[DotDX] blinkRC processing: " + raid.join('|'));
  676. if (!SRDotDX.config.raidList[i] && (swt || filter.indexOf('fltList_' + raid[0] + '_' + (parseInt(raid[1]) - 1)) < 0)) {
  677. SRDotDX.config.addRaid(raid[3], parseInt(raid[2]), raid[0], parseInt(raid[1]), parseInt(raid[4]), false, 'Alliance', null, '41');
  678. cnt++;
  679. }
  680. }
  681. var text = SRDotDX.alliance.processMessage('*unknown*', '*unknown*', ['emote'], '', 'Loaded ' + cnt + ' alliance raids into local database.', '');
  682. SRDotDX.c('div').html(text, true).attach('to', 'alliance_chat_window');
  683. SRDotDX.gui.selectRaidsToJoin('alliance raids');
  684. });
  685. SRDotDX.alliance.chat.on('dead', function (data) {
  686. //console.log("[DotDX] Dead alliance raid: " + data['raid']);
  687. if (!SRDotDX.gui.joining) {
  688. SRDotDX.gui.deleteRaidFromDB(data['raid']);
  689. setTimeout(SRDotDX.gui.selectRaidsToJoin, 100, 'alliance dead removal');
  690. }
  691. //console.log(data);
  692. });
  693. SRDotDX.alliance.chat.on('join', function (data) {
  694. //console.log(data);
  695. if (data.here) {
  696. var userName = data.name || null;
  697. var inGameName = data.ign && data.ign !== '*unknown*' ? data.ign : null;
  698. var guild = data.guild && data.guild !== '*unknown*' ? data.guild : null;
  699. if (userName) {
  700. if (SRDotDX.config.ignUsers[userName] !== 'object') SRDotDX.config.ignUsers[userName] = {
  701. ign: (inGameName || '*unknown*'),
  702. gld: (guild || '*unknown*')
  703. };
  704. else {
  705. if (inGameName && SRDotDX.config.ignUsers[userName].ign === '*unknown*') SRDotDX.config.ignUsers[userName].ign = inGameName;
  706. if (guild && SRDotDX.config.ignUsers[userName].gld === '*unknown*') SRDotDX.config.ignUsers[userName].gld = guild;
  707. }
  708. }
  709. }
  710.  
  711. var userList = null;
  712. try {
  713. userList = JSON.parse(data.names);
  714. } catch (e) {
  715. console.log(e);
  716. return;
  717. }
  718.  
  719. var prevItem = '', content = '', userData, cnt = 0;
  720. for (var usr in userList) {
  721. if (userList.hasOwnProperty(usr)) {
  722. if (userList[usr] === prevItem) continue;
  723. prevItem = userList[usr];
  724. cnt++;
  725. userData = SRDotDX.config.ignUsers[userList[usr]] || null;
  726. if (userData)
  727. content += '<div><span>' + ( userData.gld === '*unknown*' ? '???' : SRDotDX.alliance.getGuildTag(userData.gld) ) + '</span><span>' + userList[usr] + '</span><span>' +
  728. ( userData.ign === '*unknown*' ? '' : '(' + userData.ign + ')' ) + '</span></div>';
  729. else
  730. content += '<div><span>???</span><span>' + userList[usr] + '</span><span></span></div>';
  731. }
  732. }
  733. SRDotDX.c('#alliance_number').html(cnt, true);
  734. SRDotDX.c('#alliance_users').html(content, true);
  735. });
  736. SRDotDX.alliance.chat.on('chat', function (data) {
  737. var msgPatt = /^.+<abbr.+'K:(.+?) D:(.+?) \((.+?)\s?\).+?<font.+?>([\S\s]*)<\/font>.*$/;
  738. var wToPatt = /^.+\n?.+?Sent to <y>(.+?)<\/y>.+>([\S\s]*)<.+$/;
  739. var wFromPatt = /^.+>(.+?)<\/a>.+PM'd.+>([\S\s]*)<.+$/;
  740. var userUnavail = /^.*<glowy>(.+)<\/glowy> not online.+$/;
  741. var match, text;
  742. if ((match = msgPatt.exec(data['data'])) !== null) {
  743. if (typeof SRDotDX.config.ignUsers[match[1]] !== "object") SRDotDX.config.ignUsers[match[1]] = {
  744. ign: match[2],
  745. gld: match[3]
  746. };
  747. else if (match[3] !== '*unknown*' && SRDotDX.config.ignUsers[match[1]].gld !== match[3]) SRDotDX.config.ignUsers[match[1]].gld = match[3];
  748. text = SRDotDX.alliance.processMessage(match[1], match[2], [], data['time'][0], match[4].trim().replace(/\n/g,""), SRDotDX.alliance.getGuildTag(match[3]) + ' ');
  749. }
  750. else if ((match = wToPatt.exec(data['data'])) !== null) {
  751. //console.log(data['data']);
  752. text = SRDotDX.alliance.processMessage(match[1], '*unknown*', ['whisper'], data['time'][0], match[2], 'To ');
  753. }
  754. else if ((match = wFromPatt.exec(data['data'])) !== null) {
  755. //console.log(data['data']);
  756. text = SRDotDX.alliance.processMessage(match[1], '*unknown*', ['whisper'], data['time'][0], match[2], 'From ');
  757. }
  758. else if ((match = userUnavail.exec(data['data'])) !== null)
  759. text = SRDotDX.alliance.processMessage(match[1], '*unknown*', ['whisper', 'emote'], '', 'is offline', '');
  760. else {
  761. text = SRDotDX.alliance.processMessage('*unknown*', '*unknown*', ['emote'], '', data['data'], '');
  762. console.log(data);
  763. }
  764. //console.log(text);
  765. SRDotDX.c('div').html(text, true).attach('to', 'alliance_chat_window');
  766. //SRDotDX.c('#alliance_chat_window').html(text,false);
  767. if (SRDotDX.alliance.isActive) {
  768. if (text.indexOf('<img src') > -1) setTimeout(SRDotDX.gui.scrollChat, 300);
  769. setTimeout(SRDotDX.gui.scrollChat, 10);
  770. }
  771. else if (document.getElementById('alliance_tab').className.indexOf('unread') < 0) document.getElementById('alliance_tab').className += 'unread';
  772. });
  773. }
  774.  
  775. },
  776. sendMessage: function(msg) {
  777. //console.log("[DotDX] Sending message: " + msg);
  778. if (this.isExternal) {
  779. var user = SRDotDX.alliance.user;
  780. var gTag = SRDotDX.alliance.getGuildTag(user.gld);
  781. var pic = document.getElementById('welcome_box_small_user_avatar').getAttribute('src') || '#';
  782. SRDotDX.alliance.chat.emit('chat', {
  783. data: "<img class='img' src='" + pic + "' /><z>(<y><abbr title='K:" + user.usr +
  784. " D:" + user.ign + " (" + user.gld + ")'>" + (gTag === 'u' ? '' : (gTag + ': ') ) + (user.ign || user.usr) + "</abbr></y>): </z> " +
  785. '<font style="font-size: 12px; color: #ddd">' + msg.replace(/(\n|\r)/g, '') + ' </font>'
  786. });
  787. }
  788. else {
  789. var pm;
  790. if (pm = /^\/w\s(.+?)\s([\s\S]+)$/.exec(msg)) pm[1] && pm[2] && SRDotDX.alliance.chat.emit('msg', {type: 1, user: pm[1], text: pm[2]});
  791. else if (pm = /^\*([^*].*)\*$/.exec(msg)) pm[1] && SRDotDX.alliance.chat.emit('msg', {type: 3, text: pm[1]});
  792. else SRDotDX.alliance.chat.emit('msg', {type: 0, text: msg});
  793. }
  794. },
  795. processImage: function(imgLink) {
  796. if (/^https?:\/\/.+?\.(png|gif|jpe?g)$/.test(imgLink)) SRDotDX.alliance.sendMessage('<br><img src="'+imgLink+'"/>');
  797. else SRDotDX.util.extEcho('Provided image link is not valid -> ' + imgLink);
  798. },
  799. allianceTabEvent: function(e) {
  800. if (e.which === 1) {
  801. e.stopPropagation(); e.preventDefault();
  802. // hide other chats
  803. var children = document.getElementById('chat_room_tabs').children, i, cl;
  804. for (i = 0, cl = children.length; i < cl; ++i) children[i].className = 'chat_room_tab';
  805. children = document.getElementsByClassName('chat_room_template');
  806. for (i = 0, cl = children.length; i < cl; ++i) children[i].style.display = "none";
  807. children = document.getElementById('chat_actions_container').children;
  808. for (i = 0, cl = children.length; i < cl; ++i) children[i].style.display = "none";
  809. holodeck._chat_window._active_room = null;
  810. // make alliance active
  811. document.getElementsByClassName('room_name_container')[0].className += ' alliance';
  812. document.getElementById('alliance_tab').className = 'active';
  813. document.getElementById('alliance_room').className = 'active';
  814. document.getElementsByClassName('room_name_container')[0].children[0].innerHTML = SRDotDX.config.allianceName;
  815. SRDotDX.alliance.isActive = true;
  816. // scroll to the bottom
  817. setTimeout(SRDotDX.gui.scrollChat, 10, true);
  818. }
  819. return false;
  820. },
  821. kongTabsEvent: function(e) {
  822. if (e.which === 1) {
  823. SRDotDX.alliance.isActive = false;
  824. document.getElementsByClassName('room_name_container')[0].className = 'room_name_container h6_alt mbs';
  825. var aTab = document.getElementById('alliance_tab');
  826. if (aTab.className.indexOf('unread') < 0) aTab.className = ''; else aTab.className = 'unread';
  827. document.getElementById('alliance_room').removeAttribute('class');
  828. }
  829. },
  830. createRoom: function() {
  831. if (document.getElementById('chat_room_tabs') !== null) {
  832. SRDotDX.alliance.isExternal = SRDotDX.config.allianceIsExternal;
  833. SRDotDX.c('script').set({id: 'alliance_script', src: SRDotDX.alliance.isExternal?'http://mutik.erley.org/chat/socket.ioo.js?'+new Date().getTime():'http://cdn.socket.io/socket.io-1.3.6.js'}).attach('to', document.head);
  834.  
  835. SRDotDX.c('div').set({id: 'alliance_tab', class: ''}).html('<a href="#">Alliance</a>', true).on('click', SRDotDX.alliance.allianceTabEvent).attach('after','chat_room_tabs');
  836. SRDotDX.c('div').set({id: 'alliance_room'}).html('<div id="alliance_users"></div><div class="chat_message_window" id="alliance_chat_window" style="height:456px"></div><div class="chat_controls"><textarea id="alliance_input" class="chat_input"></textarea></div>', true).attach('to','chat_rooms_container');
  837. SRDotDX.c('span').set({id: 'alliance_number'}).attach('before', document.getElementsByClassName('room_name_container')[0].children[1]);
  838. SRDotDX.c('#chat_room_tabs').on('mouseup', SRDotDX.alliance.kongTabsEvent);
  839. SRDotDX.c('#alliance_users').on('click', function(e){
  840. e.stopPropagation(); e.preventDefault();
  841. var usr = e.target.tagName === 'DIV' ? e.target.children[1].innerHTML : e.target.parentNode.children[1].innerHTML;
  842. var txt = document.getElementById('alliance_input');
  843. txt.value = '/w ' + usr + ' ';
  844. txt.focus();
  845. });
  846. SRDotDX.c('#alliance_input').on('keypress',function(e){
  847. if (e.keyCode === 13) {
  848. e.stopPropagation(); e.preventDefault();
  849. if (e.shiftKey) e.target.value += "<br>\n";
  850. else {
  851. if (e.target.value !== "") {
  852. if (e.target.value.charAt(0) === '/' && !(e.target.value.charAt(1) === 'w' && e.target.value.charAt(2) === ' ')) {
  853. console.log("[DotDX] Chat command: " + e.target.value);
  854. var link, i, data;
  855. if (e.target.value.indexOf('/img ') === 0) {
  856. link = e.target.value.split(' ')[1];
  857. if (link.indexOf('prntscr.com/') > 0) SRDotDX.request.image(false, link);
  858. else if (i = /^.*gyazo.com\/([a-z0-9]{32}).*$/.exec(link)) SRDotDX.alliance.processImage('https://i.gyazo.com/' + i[1] + '.png');
  859. else SRDotDX.alliance.processImage(link);
  860. }
  861. else if (e.target.value.indexOf('/vid ') === 0) {
  862. link = e.target.value.split(' ')[1];
  863. if (i = /^https?:\/\/.+\.(mp4|ogg|webm)$/.exec(link)) {
  864. data = '<video controls="true" preload="metadata" muted="muted"><source src="' + i [0] + '" type="video/' + i[1] + '"></video>';
  865. SRDotDX.alliance.sendMessage(data);
  866. }
  867. else if (i = /(^.+youtube.+|^watch.+|^v=|^)([A-Za-z0-9\-_]{11})$/.exec(link)) {
  868. data = '<embed wmode="opaque" src="http://www.youtube.com/v/'+i[2]+'?version=3&rel=0&fs=1&showinfo=1&disablekb=0&modestbranding=1&controls=1&color=#333" type="application/x-shockwave-flash" allowfullscreen="true" width="100%" height="480" allowscriptaccess="always"></embed>';
  869. SRDotDX.alliance.sendMessage(data);
  870. }
  871. else SRDotDX.util.extEcho('Provided video hash/link is not valid or supported -> ' + link);
  872. }
  873. else if (e.target.value.indexOf('/aud ') === 0) {
  874. link = e.target.value.split(' ')[1];
  875. if (i = /^https?:\/\/.+\.(mp3|ogg|wav)$/.exec(link)) {
  876. data = '<audio controls="true"><source src="' + i [0] + '" type="audio/' + i[1] + '"></audio>';
  877. SRDotDX.alliance.sendMessage(data);
  878. }
  879. else SRDotDX.util.extEcho('Provided audio link is not valid or supported -> ' + link);
  880. }
  881. else holodeck.processChatCommand(e.target.value);
  882. }
  883. else SRDotDX.alliance.sendMessage(e.target.value);
  884. e.target.value = "";
  885. }
  886. }
  887. return false;
  888. }
  889. });
  890. SRDotDX.c('#chat_room_tabs').on('mouseup', SRDotDX.alliance.kongTabsEvent);
  891. SRDotDX.alliance.createChat();
  892. }
  893. }
  894. },
  895. linksHistory: [],
  896. request: {
  897. importLock: false,
  898. joinAfterImport: false,
  899. fromChat: false,
  900. quickBtnLock: true,
  901. filterSearchStringT: "",
  902. raids: function (isinit, hours) {
  903. if (!SRDotDX.gui.joining) {
  904. var secs = 15 - parseInt((new Date().getTime() - SRDotDX.config.lastImported) / 1000);
  905. if (secs > 0) {
  906. SRDotDX.util.extEcho("You can import again in " + secs + " seconds.");
  907. return
  908. }
  909. console.log("[DotDX] Importing raids from raids server ...");
  910. if (!isinit) this.initialize("Requesting raids");
  911. else SRDotDX.request.tries++;
  912. var h = hours ? ('&h=' + hours) : '';
  913. SRDotDX.request.req({ eventName: "dotd.getraids", url: "http://mutik.erley.org/import_kong.php?u=" + SRDotDX.config.kongUser + h, method: "GET", headers: {"Content-Type": "application/JSON"}, timeout: 30000 });
  914. }
  915. },
  916. poster: function (isInit) {
  917. var txt = document.getElementById('DotDX_checkRaidPoster').value, id;
  918. if (txt.length < 1) return;
  919. if (isNaN(txt)) {
  920. var r = SRDotDX.util.getRaidFromUrl(txt);
  921. if (r === null) return;
  922. id = r.id;
  923. }
  924. else id = parseInt(txt);
  925. console.log("[DotDX] Requesting raid poster info from server...");
  926. if (!isInit) this.initialize("Requesting raid poster data");
  927. else SRDotDX.request.tries++;
  928. SRDotDX.request.req({ eventName: "dotd.getposter", url: "http://mutik.erley.org/getposter.php?i=" + id, method: "GET", headers: {"Content-Type": "application/JSON"}, timeout: 30000 });
  929. },
  930. version: function(isInit) {
  931. console.log("[DotDX] Requesting available script version from greasyfork...");
  932. if(!isInit) this.initialize("Requesting script version");
  933. else SRDotDX.request.tries++;
  934. SRDotDX.request.req({ eventName: "dotd.getversion", url: "https://greasyfork.org/en/scripts/406-mutik-s-dotd-script", method: "GET", timeout: 30000 });
  935. },
  936. image: function(isInit, url) {
  937. console.log("[DotDX] Request image from external service...");
  938. if(!isInit) this.initialize("Requesting image");
  939. else SRDotDX.request.tries++;
  940. SRDotDX.request.req({ eventName: "dotd.getimage", url: url, method: "GET", timeout: 30000 });
  941. },
  942. initialize: function (str) {
  943. SRDotDX.gui.doStatusOutput(str + "...", 3000, true);
  944. SRDotDX.request.tries = 0;
  945. SRDotDX.request.seconds = 0;
  946. SRDotDX.request.complete = false;
  947. SRDotDX.request.timer = setTimeout(SRDotDX.request.tick, 1000, str);
  948. },
  949. tick: function (str) {
  950. if (!SRDotDX.request.complete) {
  951. if (SRDotDX.request.seconds > 25) {
  952. SRDotDX.gui.doStatusOutput("Request failed.", 3000, true);
  953. return;
  954. }
  955. SRDotDX.request.seconds++;
  956. SRDotDX.gui.doStatusOutput(str + " (" + SRDotDX.request.seconds + ")...", 1500, true);
  957. SRDotDX.request.timer = setTimeout(SRDotDX.request.tick, 1000, str);
  958. }
  959. },
  960. complete: false,
  961. seconds: 0,
  962. timer: 0,
  963. tries: 0,
  964. req: function (param) {
  965. var a = document.createEvent("MessageEvent");
  966. if (a.initMessageEvent) a.initMessageEvent("dotd.req", false, false, JSON.stringify(param), document.location.protocol + "//" + document.location.hostname, 0, window, null);
  967. else a = new MessageEvent("dotd.req", {"origin": document.location.protocol + "//" + document.location.hostname, "lastEventId": 0, "source": window, "data": JSON.stringify(param)});
  968. document.dispatchEvent(a);
  969. },
  970. init: function () {
  971. document.addEventListener("dotd.joinraid", SRDotDX.request.joinRaidResponse, false);
  972. document.addEventListener("dotd.getraids", SRDotDX.request.addRaids, false);
  973. document.addEventListener("dotd.getposter", SRDotDX.request.getPoster, false);
  974. document.addEventListener("dotd.getversion", SRDotDX.request.getVersion, false);
  975. document.addEventListener("dotd.getimage", SRDotDX.request.getImage, false);
  976. delete this.init;
  977. },
  978. joinRaid: function (r) {
  979. if (typeof r == 'object') {
  980. if (!SRDotDX.gui.joining) SRDotDX.request.initialize("Joining " + (!SRDotDX.raids[r.boss] ? r.boss.capitalize().replace(/_/g, ' ') : SRDotDX.raids[r.boss].shortname));
  981. var joinData = 'kongregate_username=' + SRDotDX.config.kongUser + '&kongregate_user_id=' + SRDotDX.config.kongId + '&kongregate_game_auth_token=' + SRDotDX.config.kongAuth;
  982. SRDotDX.request.req({ eventName: "dotd.joinraid", url: SRDotDX.util.stringFormat('http://50.18.191.15/kong/raidjoin.php?' + joinData + '&kv_action_type=raidhelp&kv_raid_id={0}&kv_hash={1}&serverid={2}', r.id, r.hash, r.sid), method: "GET", timeout: 30000 });
  983. }
  984. },
  985. getImage: function (e) {
  986. var r, data = JSON.parse(e.data);
  987. if (data.status !== 200) {
  988. SRDotDX.request.complete = true;
  989. SRDotDX.gui.doStatusOutput("Image server busy. Please try again in a moment.");
  990. console.log('[DotDX] Image request failed (url: ' + data.url + ')');
  991. console.log(JSON.stringify(data));
  992. return;
  993. }
  994. SRDotDX.request.complete = true;
  995.  
  996. var reg = /^.*<meta content="(.+)" property="og:image".*$/m;
  997. var reg2 = /^.*<meta property="og:image" content="(.+?)".*$/m;
  998. var link = reg.exec(data.responseText) || reg2.exec(data.responseText);
  999. if (link) SRDotDX.alliance.processImage(link[1]);
  1000. else {
  1001. SRDotDX.util.extEcho('Provided LightShot link is not valid');
  1002. console.log('[DotDX] xAjax resp: '+ data.responseText);
  1003. }
  1004. },
  1005. getPoster: function (e) {
  1006. var r, data = JSON.parse(e.data);
  1007. if (data.status != 200) {
  1008. if (SRDotDX.request.tries >= 3) {
  1009. SRDotDX.request.complete = true;
  1010. SRDotDX.gui.doStatusOutput("Raids server busy. Please try again in a moment.");
  1011. console.log('[DotDX] Raids request failed (url: ' + data.url + ')');
  1012. console.log(JSON.stringify(data));
  1013. } else {
  1014. console.log("[DotDX] Raids server unresponsive (status " + data.status + "). Trying again, " + SRDotDX.request.tries + " tries.");
  1015. }
  1016. return;
  1017. }
  1018. SRDotDX.request.complete = true;
  1019. try {
  1020. r = JSON.parse(data.responseText)
  1021. }
  1022. catch (ex) {
  1023. console.log("[DotDX] Checking raid poster request error");
  1024. console.log('[DotDX] responseText: ' + data.responseText);
  1025. return;
  1026. }
  1027. document.getElementById('DotDX_whoPosted_Raid').innerHTML = r.r;
  1028. document.getElementById('DotDX_whoPosted_Time').innerHTML = new Date(r.t * 1000).toLocaleString();
  1029. document.getElementById('DotDX_whoPosted_Poster').innerHTML = r.p;
  1030. },
  1031. getVersion: function(e) {
  1032. var r, data = JSON.parse(e.data);
  1033. SRDotDX.request.complete = true;
  1034. var remoteVersion = "Unknown";
  1035. if (data.status !== 200) {
  1036. SRDotDX.gui.doStatusOutput("Greasyfork unresponsive.");
  1037. console.log('[DotDX] Version request failed (url: ' + data.url + ')');
  1038. console.log(JSON.stringify(data));
  1039. }
  1040. else remoteVersion = /<dd.+version.+>([\d\.]+)<.+dd>/.exec(data.responseText)[1];
  1041. var d = '<span class="emph bold">' + SRDotDX.version.minor + '</span><br>';
  1042. d += '<span class="bold">Installed version</span>: <span class="emph">' + SRDotDX.version.major + '</span><br>';
  1043. d += '<span class="bold">Available version</span>: <span class="emph">' + remoteVersion + '</span><br>';
  1044. if(SRDotDX.version.major === remoteVersion) d += 'Your script version is up to date.';
  1045. else d += 'You can <a href="https://greasyfork.org/scripts/406-mutik-s-dotd-script" target="_blank">click here</a> to open greasyfork page with script and update.';
  1046. SRDotDX.util.extEcho(d);
  1047. },
  1048. addRaids: function(e) {
  1049. var r, data = JSON.parse(e.data);
  1050. if (data.status != 200) {
  1051. if (SRDotDX.request.tries >= 3) {
  1052. SRDotDX.request.complete = true;
  1053. SRDotDX.gui.doStatusOutput("Raids server busy. Please try again in a moment.");
  1054. console.log('[DotDX] Raids request failed (url: ' + data.url + ')');
  1055. console.log(JSON.stringify(data));
  1056. } else {
  1057. console.log("[DotDX] Raids server unresponsive (status " + data.status + "). Trying again, " + SRDotDX.request.tries + " tries.");
  1058. }
  1059. return;
  1060. }
  1061. SRDotDX.request.complete = true;
  1062. try {
  1063. r = JSON.parse(data.responseText)
  1064. }
  1065. catch (ex) {
  1066. console.log("[DotDX] Raids importing error or no raids imported");
  1067. console.log('[DotDX] responseText: ' + data.responseText);
  1068. return;
  1069. }
  1070. SRDotDX.gui.doStatusOutput("Importing " + r.raids.length + " raids...");
  1071. var raid, n = 0, t = 0, i, il, j, jl;
  1072. var swt = !SRDotDX.config.importFiltered, filter = SRDotDX.c('#DotDX_filters').ele().innerHTML;
  1073. for(j = 0, jl = r.raids.length; j < jl; ++j) {
  1074. raid = r.raids[j];
  1075. if (swt || filter.indexOf('fltList_' + raid.b + '_' + (raid.d - 1)) < 0) {
  1076. t++;
  1077. if (typeof SRDotDX.config.raidList[raid.i] !== 'object') {
  1078. n++;
  1079. SRDotDX.config.addRaid(raid.h, parseInt(raid.i), raid.b, parseInt(raid.d), parseInt(raid.s), false, raid.p, raid.t, raid.m.split("_").map(function (x) {return parseInt(x)}), parseFloat(raid.hp), raid.pp);
  1080. }
  1081. else {
  1082. var pp = parseInt(raid.pp) || 0;
  1083. SRDotDX.config.raidList[raid.i].magic = raid.m.split("_").map(function(x){return parseInt(x)});
  1084. SRDotDX.config.raidList[raid.i].hp = parseFloat(raid.hp);
  1085. SRDotDX.config.raidList[raid.i].ppl = pp;
  1086. SRDotDX.config.raidList[raid.i].isFull = pp && typeof SRDotDX.raids[raid.b] === 'object' && SRDotDX.raids[raid.b].size === pp;
  1087. }
  1088. }
  1089. }
  1090. console.log('[DotDX] Import raids from server complete');
  1091.  
  1092. //clean chat & db
  1093. var id = r.prune.length > 3 ? r.prune.split("_") : [];
  1094. il = id.length;
  1095. for(i = 0; i < il; ++i) SRDotDX.gui.deleteRaidFromDB(id[i]);
  1096. console.log('[DotDX] Removing dead raids on import complete');
  1097.  
  1098. SRDotDX.gui.selectRaidsToJoin('import response');
  1099. SRDotDX.config.lastImported = new Date().getTime();
  1100. SRDotDX.util.extEcho('Imported ' + t + ' raids, ' + n + ' new, ' + il + ' pruned.');
  1101. if (SRDotDX.request.joinAfterImport) {
  1102. SRDotDX.gui.selectRaidsToJoin();
  1103. SRDotDX.gui.joinSelectedRaids(false);
  1104. }
  1105. SRDotDX.gui.doStatusOutput('Imported ' + n + ' new raids, ' + il + ' pruned.', 5000, true);
  1106. },
  1107. joinRaidResponse: function (e) {
  1108. var data = JSON.parse(e.data);
  1109. var statustxt = '';
  1110. SRDotDX.request.complete = true;
  1111. SRDotDX.gui.joinRaidComplete++;
  1112. if (data && data.status === 200 && data.responseText && data.url) {
  1113. var raidid = SRDotDX.util.getQueryVariable('kv_raid_id', data.url);
  1114. if (typeof SRDotDX.config.raidList[raidid] === 'object') {
  1115. SRDotDX.config.raidList[raidid].visited = true;
  1116. SRDotDX.gui.toggleRaid('visited', raidid, true);
  1117. SRDotDX.gui.raidListItemUpdate(raidid);
  1118. if (/successfully (re-)?joined/i.test(data.responseText)) {
  1119. SRDotDX.gui.joinRaidSuccessful++;
  1120. statustxt = (SRDotDX.raids[SRDotDX.config.raidList[raidid].boss] ? SRDotDX.raids[SRDotDX.config.raidList[raidid].boss].shortname : SRDotDX.config.raidList[raidid].boss) + " joined successfully.";
  1121. }
  1122. else if (/already a member/i.test(data.responseText)) {
  1123. statustxt = "Join Failed. You are already a member.";
  1124. }
  1125. else if (/already completed/i.test(data.responseText)) {
  1126. SRDotDX.gui.joinRaidDead++;
  1127. statustxt = "Join failed. Raid is dead.";
  1128. SRDotDX.gui.deleteRaidFromDB(raidid);
  1129. if (SRDotDX.config.allianceChat && SRDotDX.alliance.chat) {
  1130. if (SRDotDX.alliance.isExternal) SRDotDX.alliance.chat.socket.connected && SRDotDX.alliance.chat.emit('dead', { raid: raidid });
  1131. else SRDotDX.alliance.chat.connected && SRDotDX.alliance.chat.emit('service', { act: 'deadRaid', id: parseInt(raidid) });
  1132. }
  1133. }
  1134. else if (/not a member of the guild/i.test(data.responseText)) {
  1135. SRDotDX.gui.joinRaidDead++;
  1136. statustxt = "Join failed. You are not member of that Guild.";
  1137. SRDotDX.gui.deleteRaidFromDB(raidid);
  1138. }
  1139. else if (/(invalid|find) raid (hash|ID)/i.test(data.responseText)) {
  1140. statustxt = "Join failed. Invalid hash or ID.";
  1141. SRDotDX.gui.joinRaidInvalid++;
  1142. SRDotDX.gui.deleteRaidFromDB(raidid);
  1143. }
  1144. else {
  1145. statustxt = 'Join failed. Unknown join response.';
  1146. }
  1147. }
  1148. else SRDotDX.gui.joinRaidInvalid++;
  1149. }
  1150. else {
  1151. console.log('[DotDX] Request timed out');
  1152. SRDotDX.gui.joinRaidInvalid++;
  1153. statustxt = "Join failed. Timeout.";
  1154. }
  1155. if (SRDotDX.gui.joining) {
  1156. if (SRDotDX.gui.joinRaidComplete >= SRDotDX.gui.joinRaidList.length) {
  1157. statustxt = "Finished joining. " + SRDotDX.gui.joinRaidSuccessful + " new, " + SRDotDX.gui.joinRaidDead + " dead.";
  1158. SRDotDX.gui.joinFinish(true);
  1159. if (SRDotDX.gui.joinRaidSuccessful > 2) SRDotDX.util.extEcho(statustxt);
  1160. setTimeout(SRDotDX.config.save, 3000, false)
  1161. }
  1162. else {
  1163. statustxt = "Joined " + SRDotDX.gui.joinRaidComplete + " of " + SRDotDX.gui.joinRaidList.length + ". " + SRDotDX.gui.joinRaidSuccessful + " new, " + SRDotDX.gui.joinRaidDead + " dead.";
  1164. if (SRDotDX.gui.joinRaidIndex < SRDotDX.gui.joinRaidList.length) SRDotDX.request.joinRaid(SRDotDX.gui.joinRaidList[SRDotDX.gui.joinRaidIndex++]);
  1165. }
  1166. }
  1167. else setTimeout(SRDotDX.config.save, 3000, false);
  1168. if (statustxt !== '') SRDotDX.gui.doStatusOutput(statustxt, 4000, true);
  1169. }
  1170. },
  1171. getRaidDetailsBase: function (url) {
  1172. var r = {diff: 0, hash: '', boss: '', id: 0, sid: 0}, i, cnt = 0;
  1173. var reg = /[?&]([^=]+)=([^?&]+)/ig, p = url.replace(/&amp;/gi, '&').replace(/kv_&/gi, '&kv_');
  1174. while ((i = reg.exec(p)) != null) {
  1175. switch (i[1]) {
  1176. case 'kv_raid_id':
  1177. case 'raid_id': r.id = parseInt(i[2]); cnt++; break;
  1178. case 'kv_difficulty':
  1179. case 'difficulty': r.diff = parseInt(i[2]); cnt++; break;
  1180. case 'kv_raid_boss':
  1181. case 'raid_boss': r.boss = i[2]; cnt++; break;
  1182. case 'kv_hash':
  1183. case 'hash': r.hash = i[2]; cnt++; break;
  1184. case 'kv_serverid':
  1185. case 'serverid': r.sid = parseInt(i[2]); cnt++; break;
  1186. }
  1187. }
  1188. if (cnt < 4) return false;
  1189.  
  1190. r.diffLongText = ['Normal', 'Hard', 'Legendary', 'Nightmare'][r.diff - 1];
  1191. r.diffShortText = ['N', 'H', 'L', 'NM'][r.diff - 1];
  1192. var stats = SRDotDX.raids[r.boss];
  1193. if (typeof stats === 'object') {
  1194. r.name = stats.name;
  1195. r.shortname = stats.shortname;
  1196. r.size = stats.size;
  1197. r.type = stats.type;
  1198. r.dur = stats.duration;
  1199. r.durText = stats.dur + "hrs";
  1200. r.stat = stats.stat;
  1201. r.statText = SRDotDX.getStatText(stats.stat);
  1202. }
  1203. else {
  1204. r.name = r.boss[0].toUpperCase() + r.boss.substring(1).replace(/_/g, " ");
  1205. r.shortname = r.name;
  1206. r.dur = 48;
  1207. }
  1208. return r;
  1209. },
  1210. getTierTxt: function (hp, ppl, ap) {
  1211. var num = hp / ppl;
  1212. num = ap ? num / 2 : num;
  1213. if (num >= 1000000000000) return (num / 1000000000000).toPrecision(3) + 't';
  1214. if (num >= 1000000000) return (num / 1000000000).toPrecision(3) + 'b';
  1215. if (num >= 1000000) return (num / 1000000).toPrecision(3) + 'm';
  1216. if (num >= 1000) return (num / 1000).toPrecision(3) + 'k';
  1217. return num + ''
  1218. },
  1219. getRaidDetails: function (url, user, visited, ts, room) {
  1220. user = user ? user : '';
  1221. var rVis = visited ? visited : user == SRDotDX.config.kongUser && SRDotDX.config.markMyRaidsVisted;
  1222. var r = SRDotDX.util.getRaidFromUrl(url);
  1223. if (r == null) return null;
  1224. //if (r && typeof r.diff == 'number' && typeof r.hash == 'string' && typeof r.boss == 'string' && typeof r.id == 'string') {
  1225. var filter = SRDotDX.c('#DotDX_filters').ele().innerHTML;
  1226. r.visited = rVis;
  1227. if (!SRDotDX.config.importFiltered || filter.indexOf('fltList_' + r.boss + '_' + (r.diff - 1)) < 0) {
  1228. var info = SRDotDX.config.raidList[r.id];
  1229. if (typeof info !== 'object') {
  1230. info = SRDotDX.config.addRaid(r.hash, r.id, r.boss, r.diff, r.sid, r.visited, user, ts);
  1231. if (typeof info === 'object') r.isNew = true;
  1232. else return null;
  1233. }
  1234. else r.isNew = false;
  1235. r.timeStamp = info.timeStamp;
  1236. r.visited = info.visited;
  1237. }
  1238. r.linkText = function () {
  1239. var raidInfo = SRDotDX.raids[r.boss];
  1240. var txt = '[&thinsp;' + ['', 'N', 'H', 'L', 'NM'][this.diff] + ' ';
  1241. txt += raidInfo ? raidInfo.shortname : r.boss.capitalize().replace(/_/g, ' ');
  1242. if (SRDotDX.config.linkShowFs) txt += raidInfo ? ', fs:' + SRDotDX.getTierTxt(raidInfo.health[this.diff - 1], raidInfo.size, false) : '';
  1243. if (SRDotDX.config.linkShowAp) txt += raidInfo ? ', ap:' + SRDotDX.getTierTxt(raidInfo.health[this.diff - 1], raidInfo.size, true) : '';
  1244. txt += (this.visited || r.visited) ? '|★' : '';
  1245. txt += '&thinsp;]';
  1246. return txt
  1247. };
  1248. return r;
  1249. },
  1250. getRaidLink: function (msg, user, all) {
  1251. msg = msg.replace(/[\r\n]/g, '');
  1252. a = all || false;
  1253. var patt = all ? /^(.*?)((?:(?:https?:\/\/)?(?:www\.)?kongregate\.com)?\/games\/5thPlanetGames\/dawn-of-the-dragons(\?\S+))(.*)$/i : /^((?:(?!<a[ >]).)*)<a.*? href="((?:(?:https?:\/\/)?(?:www\.)?kongregate\.com)?\/games\/5thPlanetGames\/dawn-of-the-dragons(\?[^"]+))".*?<\/a>((?:(?!<\/?a[ >]).)*(?:<a.*? class="reply_link"[> ].*)?)$/i;
  1254. var m = patt.exec(msg);
  1255.  
  1256. if (m) {
  1257. var raid = SRDotDX.getRaidDetails(m[3], user);
  1258. if (raid) {
  1259. raid.ptext = m[1] ? m[1] : "";
  1260. raid.url = m[2].replace(/kv_&amp;/ig, '&amp;kv_');
  1261. raid.ntext = m[4] ? m[4] : "";
  1262. return raid;
  1263. }
  1264. }
  1265. return null
  1266. },
  1267. getPastebinLink: function (msg, user) {
  1268. msg = msg.replace(/[\r\n]/g, '');
  1269. var m = /^((?:(?!<a[ >]).)*)?http:\/\/pastebin\.com\/\w{8}((?:(?!<\/?a[ >]).)*(?:<a.*? class="reply_link"[> ].*)?)$/i.exec(msg);
  1270. if (m) {
  1271. var pb = SRDotDX.getPasteDetails(/http:\/\/pastebin\.com\/\w{8}/i.exec(m[0]) + '', user);
  1272. if (typeof pb != 'undefined') {
  1273. pb.ptext = m[1] || '';
  1274. pb.ntext = m[2] || '';
  1275. }
  1276. return pb;
  1277. }
  1278. else return null;
  1279. },
  1280. getStatText: function (stat) {
  1281. stat = stat.toLowerCase();
  1282. var r = '';
  1283. if (stat == '?' || stat == 'Unknown') return 'Unknown';
  1284. if (stat.indexOf('s') > -1) r = 'Stamina';
  1285. if (stat.indexOf('h') > -1) r += (r != '' ? (stat.indexOf('e') > -1 ? ', ' : ' and ') : '') + 'Honor';
  1286. if (stat.indexOf('e') > -1) r += (r != '' ? ' and ' : '') + 'Energy';
  1287. return r;
  1288. },
  1289. getTimestamp: function () {
  1290. var date = new Date();
  1291. return '(' + ('0' + (new Date().getHours())).slice(-2) + ':' + ('0' + (new Date().getMinutes())).slice(-2) + ')';
  1292. },
  1293. refreshRaidTab: function () {
  1294. var el_out = document.getElementById('raid_list');
  1295. var el_in1 = document.getElementById('mainRaidsFrame');
  1296. var el_in2 = document.getElementById('topRaidPane');
  1297. el_out.style.height = (el_in1.offsetHeight - el_in2.offsetHeight - 8) + 'px';
  1298. },
  1299. isFirefox: navigator.userAgent.indexOf('Firefox') > 0,
  1300. gui: {
  1301. setMessagesCount: function () {
  1302. var num = active_user.unreadWhispersCount() + active_user.unreadShoutsCount();
  1303. var ele = document.getElementById('profile_control_unread_message_count');
  1304. ele.innerHTML = num;
  1305. ele.style.display = num == 0 ? 'none' : 'block';
  1306. setTimeout(SRDotDX.gui.setMessagesCount, 60000);
  1307. },
  1308. gotoRoom: function (num) {
  1309. var numInt = parseInt(num);
  1310. if (isNaN(numInt) || numInt < 1 || numInt > 13) holodeck.chatWindow().activateRoomChooser();
  1311. else {
  1312. var roomObj = JSON.parse('{"type": "game", "xmpp_name": "138636-dawn-of-the-dragons-' + num + '", "name": "Dawn of the Dragons - Room #' + ('0' + num).slice(-2) + '", "id": "138636-dawn-of-the-dragons-' + num + '"}');
  1313. holodeck.joinRoom(roomObj);
  1314. }
  1315. },
  1316. httpCommand: function (url) {
  1317. window.open(url);
  1318. },
  1319. applySidebarUI: function (mode) { //-1:remove, 0:redraw, 1:create, 2:recreate
  1320. if(mode == -1 || mode == 2) {
  1321. document.getElementById('dotdx_sidebar').remove();
  1322. if (mode == -1) SRDotDX.gui.chatResize(SRDotDX.config.chatSize), document.getElementsByClassName("links_connect")[0].setAttribute('colspan', '2');
  1323. }
  1324. if(mode > -1) {
  1325. var sbElemObj, sbElemTxt, i, il;
  1326. if(mode > 0) {
  1327. if (mode == 1) document.getElementsByClassName("links_connect")[0].setAttribute('colspan', '3');
  1328. if (!SRDotDX.config.sbRightSide) document.getElementById('chat_container').style.marginLeft = "0px";
  1329. SRDotDX.c('td').set({id: 'dotdx_sidebar', style: 'width: ' + (SRDotDX.config.sbSlim ? '40' : '70') + 'px'})
  1330. .html('<div id="dotdx_sidebar_container"' + (SRDotDX.config.sbSlim ? ' class="slim"' : '') + '></div>', true)
  1331. .attach('after', SRDotDX.config.sbRightSide ? 'chat_container_cell' : 'gameholder');
  1332. SRDotDX.gui.chatResize(SRDotDX.config.chatSize);
  1333. }
  1334. if(mode == 0) {
  1335. sbElemTxt = '[' + document.getElementById('options_sbConfig').value + ']';
  1336. sbElemObj = JSON.parse(sbElemTxt);
  1337. SRDotDX.config.sbConfig = sbElemObj;
  1338. SRDotDX.config.save(false);
  1339. }
  1340. else sbElemObj = SRDotDX.config.sbConfig;
  1341. var slim = SRDotDX.config.sbSlim ? " slim" : "";
  1342. var sLen = SRDotDX.config.sbSlim ? 0 : 1;
  1343. var stopper = parseInt((document.getElementById('gameholder').offsetHeight - 36) / 26);
  1344. var sName = [["Ely","Elyssa"],["Kas","Kasan"]];
  1345. var sidebarElemHtml = '<div id="serverButton" class="' + slim + '" onclick="SRDotDX.gui.switchServer()">' + sName[SRDotDX.config.serverMode - 1][sLen] + '</div>', sbCmd = "", sbCls = 'class="';
  1346. for(i = 0, il = sbElemObj.length; i < il; ++i) {
  1347. if (i == stopper) break;
  1348. if (typeof sbElemObj[i] == 'undefined' || sbElemObj[i] == null) {
  1349. sidebarElemHtml += '<div></div>'; continue
  1350. }
  1351. if(sbElemObj[i].type == 'jtxt') {
  1352. sidebarElemHtml += '<input id="sbJoinStr" onkeyup="SRDotDX.gui.updateFilterTxt(this.value)" class="dotdx_chat_filter' + slim + '" type="text" value=""><div class="'+slim+'"></div>';
  1353. continue
  1354. }
  1355. if(sbElemObj[i].type == 'label') {
  1356. sidebarElemHtml += '<div class="label' + slim + '">';
  1357. if (SRDotDX.config.sbSlim) {
  1358. if (typeof sbElemObj[i].sname == 'undefined') sidebarElemHtml += sbElemObj[i].name.substring(0, 4);
  1359. else sidebarElemHtml += sbElemObj[i].sname;
  1360. }
  1361. else sidebarElemHtml += sbElemObj[i].name;
  1362. sidebarElemHtml += '</div>';
  1363. continue;
  1364. }
  1365. if(typeof sbElemObj[i].cmd != 'undefined') {
  1366. if (sbElemObj[i].cmd.charAt(0) == '/') sbCmd = 'SRDotDX.gui.chatCommand(\'' + sbElemObj[i].cmd + '\')';
  1367. else if (sbElemObj[i].cmd.indexOf('://') > 2) sbCmd = 'SRDotDX.gui.httpCommand(\'' + sbElemObj[i].cmd + '\')';
  1368. else sbCmd = sbElemObj[i].cmd.replace("'", "\'");
  1369. }
  1370. if(typeof sbElemObj[i].color != 'undefined') {
  1371. if (sbElemObj[i].color.charAt(0).toLowerCase() == 'b' && sbElemObj[i].color.toLowerCase() != 'black') sbCls += 'b';
  1372. else if (sbElemObj[i].color.charAt(0).toLowerCase() == 'g') sbCls += 'g';
  1373. else if (sbElemObj[i].color.charAt(0).toLowerCase() == 'r') sbCls += 'r';
  1374. else if (sbElemObj[i].color.charAt(0).toLowerCase() == 'y') sbCls += 'y';
  1375. }
  1376. sidebarElemHtml += '<button ' + sbCls + slim + '" ' + 'onclick="' + sbCmd + '">';
  1377. if(typeof sbElemObj[i].name == 'undefined') {
  1378. if (SRDotDX.config.sbSlim) sidebarElemHtml += 'Btn' + (i + 1);
  1379. else sidebarElemHtml += 'Button ' + (i + 1);
  1380. }
  1381. else {
  1382. if (SRDotDX.config.sbSlim)
  1383. if (typeof sbElemObj[i].sname == 'undefined') sidebarElemHtml += sbElemObj[i].name.substring(0, 4);
  1384. else sidebarElemHtml += sbElemObj[i].sname;
  1385. else sidebarElemHtml += sbElemObj[i].name
  1386. }
  1387. sidebarElemHtml += '</button>';
  1388. sbCmd = "";
  1389. sbCls = 'class="';
  1390. }
  1391. SRDotDX.c('#dotdx_sidebar_container').html(sidebarElemHtml, true);
  1392. }
  1393. },
  1394. toggleSlimSB: function () {
  1395. if (SRDotDX.config.sbEnable) {
  1396. this.applySidebarUI(2);
  1397. this.chatResize();
  1398. }
  1399. },
  1400. restoreDefaultSB: function () {
  1401. document.getElementById('options_sbConfig').value = '{"type":"label","name":"Camps"},\n\
  1402. {"type":"btn","name":"GoC","cmd":"/camp goc"},\n\
  1403. {"type":"btn","name":"MaM","cmd":"/camp mam"},\n\
  1404. {"type":"btn","name":"GD","cmd":"/camp gd"},\n\
  1405. {"type":"label","name":"Tiers"},\n\
  1406. {"type":"btn","name":"Bella","cmd":"/raid bella"},\n\
  1407. {"type":"btn","name":"Xerk","cmd":"/raid xerkara"},\n\
  1408. {"type":"btn","name":"Tisi","cmd":"/raid tisi"},\n\
  1409. {"type":"label","name":"Join"},\n\
  1410. {"type":"btn","name":"Farms","cmd":"SRDotDX.gui.quickImportAndJoin(\'farm:nnm\')"},\n\
  1411. {"type":"label","name":"Utils"},\n\
  1412. {"type":"btn","color":"g","name":"(Re)Load","sname":"Reld","cmd":"SRDotDX.reload()"},\n\
  1413. {"type":"btn","color":"r","name":"Unload","sname":"Kill","cmd":"/kill"},\n\
  1414. {"type":"btn","name":"Room 1","sname":"CR1","cmd":"SRDotDX.gui.gotoRoom(1)"},\n\
  1415. {"type":"btn","name":"Room 2","sname":"CR2","cmd":"SRDotDX.gui.gotoRoom(2)"},\n\
  1416. {"type":"btn","name":"Room 8","sname":"CR8","cmd":"SRDotDX.gui.gotoRoom(8)"},\n\
  1417. {"type":"label","name":"Sheets","sname":"Help"},\n\
  1418. {"type":"btn","name":"Magic","sname":"Mag","cmd":"https://docs.google.com/spreadsheets/d/1O0eVSnzlACP9XJDq0VN4kN51ESUusec3-gD4dKPHRNU"},\n\
  1419. {"type":"btn","name":"Mount","sname":"Mnt","cmd":"https://docs.google.com/spreadsheet/ccc?key=0AiSpM5yAo8atdER2NEhHY3VjckRhdWctWV8yampQZUE"},\n\
  1420. {"type":"btn","name":"Gear","cmd":"https://docs.google.com/spreadsheet/lv?key=0AvP2qXrWcHBxdHpXZkUzTHNGNkVWbjE5c2VEZUNNMUE"},\n\
  1421. {"type":"label","name":"Raids"},\n\
  1422. {"type":"jtxt"},\n\
  1423. {"type":"btn","color":"g","name":"Join","cmd":"SRDotDX.gui.joinSelectedRaids(true)"},\n\
  1424. {"type":"btn","color":"b","name":"Import","sname":"Imp","cmd":"SRDotDX.gui.importFromServer()"},\n\
  1425. {"type":"btn","color":"y","name":"RaidBot","sname":"Bot","cmd":"SRDotDX.gui.switchBot()"}';
  1426. SRDotDX.gui.applySidebarUI(0);
  1427. },
  1428. hideWC: function (init) {
  1429. var offset;
  1430. if(init) offset = SRDotDX.config.hideWChat ? -265 : 0;
  1431. else {
  1432. offset = SRDotDX.config.hideWChat ? 265 : -265;
  1433. SRDotDX.config.hideWChat = !SRDotDX.config.hideWChat;
  1434. document.getElementById('hideWCtxt').innerHTML = SRDotDX.config.hideWChat ? 'Show World Chat' : 'Hide World Chat';
  1435. SRDotDX.config.extSave();
  1436. }
  1437. var gmWidth = document.getElementById('gameholder').offsetWidth + offset;
  1438. document.getElementById('gameholder').style.width = gmWidth + "px";
  1439. document.getElementById('game').style.width = gmWidth + "px";
  1440. this.chatResize();
  1441. },
  1442. removeWC: function(rly) {
  1443. if(rly) {
  1444. SRDotDX.config.removeWChat = true;
  1445. var li = SRDotDX.c('#wcbutton').ele();
  1446. li.parentNode.removeChild(li);
  1447. if(!SRDotDX.config.hideWChat) {
  1448. SRDotDX.config.hideWChat = true;
  1449. this.hideWC(true);
  1450. }
  1451. SRDotDX.config.extSave();
  1452. }
  1453. else {
  1454. SRDotDX.config.removeWChat = false;
  1455. SRDotDX.c('li').set({id: 'wcbutton', class: 'rate'}).html('<a id="hideWCtxt" class="spritegame" href="http://www.kongregate.com/games/5thPlanetGames/dawn-of-the-dragons" onclick="SRDotDX.gui.hideWC(false); return false;">' + (SRDotDX.config.hideWChat ? 'Show World Chat' : 'Hide World Chat') + '</a>', false).attach('after', 'quicklinks_play_later_block');
  1456. SRDotDX.config.extSave();
  1457. setTimeout(activateGame,1000);
  1458. }
  1459. },
  1460. chatResize: function (chatSize) {
  1461. var size = chatSize || SRDotDX.config.chatSize;
  1462. SRDotDX.config.chatSize = size;
  1463. var gmWidth = document.getElementById('game').offsetWidth;
  1464. var gmHeight = document.getElementById('game').offsetHeight;
  1465. var sbWidth = SRDotDX.config.sbEnable ? (SRDotDX.config.sbSlim ? 40 : 70) : 0;
  1466. var hScroll = SRDotDX.config.hideScrollBar ? SRDotDX.gui.getScrollbarWidth() : 0;
  1467. var chatWidthInc = size - 300;
  1468. var chatCorr = chatWidthInc / 75 * 2;
  1469. var overallWidth = (292 + gmWidth + sbWidth + chatWidthInc) + "px";
  1470. document.getElementById('maingame').style.width = overallWidth;
  1471. document.getElementById('maingamecontent').style.width = overallWidth;
  1472. document.getElementById('flashframecontent').style.width = overallWidth;
  1473. document.getElementById('chat_container').style.width = size + "px";
  1474. document.getElementById('raid_list').style.width = 282 + hScroll + "px";
  1475. document.getElementById('raid_list').style.overflowY = hScroll ? 'scroll' : 'auto';
  1476. document.getElementById('chat_tab_pane').style.width = (size - 16) + "px";
  1477. document.getElementById('DotDX_chatResizeElems').innerHTML = '#kong_game_ui textarea.chat_input { width: ' + (size - 30) + 'px !important; }\
  1478. #kong_game_ui div#chat_raids_overlay { width: ' + (size - 8) + 'px }\
  1479. #kong_game_ui div#chat_raids_overlay > span { width: ' + (size - 18 - chatCorr) + 'px }\
  1480. #kong_game_ui div.chat_message_window { height: ' + (gmHeight - 248) + 'px !important; width: ' + (size - 18 + hScroll) + 'px; overflow-y: ' + (hScroll ? 'scroll' : 'auto') + '; }\
  1481. #kong_game_ui div#chat_rooms_container div.chat_tabpane.users_in_room, #kong_game_ui div#chat_rooms_container div#alliance_users { width: ' + (size - 22 + hScroll) + 'px }\
  1482. div#dotdx_sidebar_container { height: ' + (gmHeight - 5) + 'px; ' + (SRDotDX.config.sbRightSide ? "text-align: left; padding-left: 1px; padding-right: 6px;" : "text-align: left; margin-left: 2px; padding-left: 6px") + ' }';
  1483. },
  1484. helpBox: function(boxId, magId, raidId, mouseOut) {
  1485. var boxDiv = document.getElementById(boxId);
  1486. var magSpan = document.getElementById(magId);
  1487. var i, il;
  1488. if(mouseOut) {
  1489. SRDotDX.gui.CurrentRaidsOutputTimer = setTimeout(function(){document.getElementById('chat_raids_overlay').className = "";}, 1500);
  1490. if(magSpan) {
  1491. magSpan.style.maxWidth = "0";
  1492. setTimeout(function(){ var m = document.getElementById(magId); if(m) m.innerHTML = ""; }, 100);
  1493. }
  1494. }
  1495. else {
  1496. var info = SRDotDX.config.raidList[raidId], msg = 'Unknown', mWidth = "0", raid;
  1497. if (typeof info !== 'object') msg = 'Raid not in db (removed?)';
  1498. else if (typeof SRDotDX.raids[info.boss] == 'undefined') {
  1499. msg = '<span style="font-size: 12px;">' + info.boss.capitalize().replace(/_/ig, ' ') + ' on ' + ['Normal', 'Hard', 'Legendary', 'Nightmare'][info.diff - 1] + '</span>';
  1500. }
  1501. else {
  1502. if (typeof info.magic === 'string') parseInt(info.magic);
  1503. if (typeof info.magic !== 'object') info.magic = [info.magic,0,0,0,0,0];
  1504. var magE = info.magic.reduce(function(a,b){return a+b;});
  1505. raid = SRDotDX.raids[info.boss];
  1506. var diff = info.diff - 1;
  1507. if (magE) {
  1508. var magI = "";
  1509. for (i = 0, il = raid.nd; i < il; ++i) magI += '<span class="magic" style="background-position: -' + info.magic[i] * 16 + 'px 0">&nbsp;</span>';
  1510. magSpan.innerHTML = magI;
  1511. mWidth = (raid.nd * 18 + 10) + "px";
  1512. }
  1513. msg = '<span style="font-size: 12px;">' + raid.name + ' on ' + ['Normal', 'Hard', 'Legendary', 'Nightmare'][diff] + '</span><br>';
  1514. msg += (raid.type === '' ? '' : raid.type + ' | ') + SRDotDX.raidSizes[raid.size].name + ' Raid';/* + (diff == 3 ? ' | AP' : '');*/
  1515. var size = raid.size < 15 ? 10 : raid.size;
  1516. var fs = raid.health[diff] / (raid.size == 101 ? 100 : raid.size);
  1517. if (typeof raid.lt !== 'object') {
  1518. var epicRatio = SRDotDX.raidSizes[size].ratios;
  1519. if (size === 15) msg += '<br>fs:&thinsp;' + SRDotDX.util.getShortNum(fs) + ' | 65d:&thinsp;' + SRDotDX.util.getShortNum(fs * epicRatio[0]) + ' | 338d:&thinsp;' + SRDotDX.util.getShortNum(fs * epicRatio[9]) + ' | 375d:&thinsp;' + SRDotDX.util.getShortNum(fs * epicRatio[10]);
  1520. else msg += '<br>fs: ' + SRDotDX.util.getShortNum(fs) + ' | 1e: ' + SRDotDX.util.getShortNum(fs * epicRatio[0]) + ' | 2e: ' + SRDotDX.util.getShortNum(fs * epicRatio[2]) + ' | 2/3e: ' + SRDotDX.util.getShortNum(fs * epicRatio[3]);
  1521. //msg += '<br>2e: ' + epicRatio[2] + ' | 3e: ' + epicRatio[4] + ' | fs: ' + fs;
  1522. }
  1523. else if (typeof raid.lt === 'object') {
  1524. if(raid.lt[0] !== 'u') {
  1525. var ele = SRDotDX.lootTiers[raid.lt[diff]];
  1526. var step = SRDotDX.config.chatSize === 450 ? 6 : (SRDotDX.config.chatSize === 375 ? 5 : 4);
  1527. var steplow = step - 1;
  1528. var tiers = ele['tiers'];
  1529. var epics = ele['epics'];
  1530. var best = ele['best'];
  1531. var e = ele['e'] ? 'E' : '';
  1532. var text = '</table>';
  1533. var tier;
  1534. for(i = tiers.length-1, il = -1; i > il; --i) {
  1535. tier = (i % step == steplow ? '</td></tr><tr><td>' : '</td><td>' ) + SRDotDX.util.getShortNum(epics[i], 2) + e + ':</td><td ' + (i === best ? 'class="best"' : '') + '>' + SRDotDX.util.getShortNumMil(tiers[i]);
  1536. text = tier + text;
  1537. }
  1538. msg += '<table><tr><td>FS:</td><td>' + SRDotDX.util.getShortNum(fs) + text;
  1539. }
  1540. else msg += '<br>FS: &nbsp;&nbsp;&thinsp;' + SRDotDX.util.getShortNum(fs) + ' | Tiers not yet known.';
  1541. }
  1542. else {
  1543. }
  1544. }
  1545. if(magE) magSpan.style.maxWidth = mWidth;
  1546. document.getElementById(boxId + '_text').innerHTML = msg;
  1547. if(!(boxDiv.className.indexOf('active') > 0)) boxDiv.className = "active";
  1548. clearTimeout(SRDotDX.gui.CurrentRaidsOutputTimer);
  1549. }
  1550. },
  1551. displayHint: function (hint) {
  1552. var helpEl = document.getElementById('helpBox');
  1553. if(hint) {
  1554. helpEl.children[0].innerHTML = hint;
  1555. helpEl.style.maxHeight = '50px';
  1556. helpEl.style.borderTopWidth = '1px';
  1557. }
  1558. else {
  1559. helpEl.style.maxHeight = '0';
  1560. helpEl.style.borderTopWidth = '0';
  1561. }
  1562. },
  1563. refreshRaidList: function () {
  1564. document.getElementById('raid_list').innerHTML = "";
  1565. for(var i = 0, il = SRDotDX.gui.joinRaidList.length; i < il; ++i) SRDotDX.gui.addRaid(SRDotDX.gui.joinRaidList[i]);
  1566. },
  1567. diffTxt: [['DotDX_U','U'],['DotDX_N','N'],['DotDX_H','H'],['DotDX_L','L'],['DotDX_NM','NM'],['DotDX_NM','NM'],['DotDX_NM','NM']],
  1568. addRaid: function (id) {
  1569. var r = typeof id === 'string' || typeof id === 'number' ? SRDotDX.config.raidList[id] : id;
  1570. var a = document.getElementById('raid_list');
  1571. if (r.boss) {
  1572. if (a !== null) {
  1573. var rd = typeof SRDotDX.raids[r.boss] != 'object' ? {shortname: r.boss.capitalize().replace(/_/ig, ' '), duration: 24} : SRDotDX.raids[r.boss];
  1574. var url = 'http://www.kongregate.com/games/5thPlanetGames/dawn-of-the-dragons?kv_action_type=raidhelp&kv_difficulty=' + r.diff + '&kv_hash=' + r.hash + '&kv_raid_boss=' + r.boss + '&kv_raid_id=' + r.id + '&kv_serverid=' + r.sid;
  1575. var hpr = (r.hp * 100).toPrecision(3), fCls = "";
  1576. var tlp = ((r.expTime - parseInt(new Date().getTime()/1000)) / (36 * rd.duration)).toPrecision(3);
  1577. var delta = hpr - tlp;
  1578. if (delta > 0) {
  1579. if (delta < 15) fCls = " failings";
  1580. else if (delta < 30) fCls = " failingm";
  1581. else fCls = " failingh";
  1582. }
  1583. var lii = SRDotDX.c('div').set({
  1584. class: 'raid_list_item ' + this.diffTxt[r.diff][0] + (r.visited ? ' DotDX_visitedRaidList' : ''),// + (r.nuked ? ' DotDX_nukedRaidList' : ''),
  1585. id: 'DotDX_' + r.id,
  1586. raidid: r.id
  1587. }).html(' \
  1588. <span class="DotDX_List_diff ' + this.diffTxt[r.diff][0] + '">' + this.diffTxt[r.diff][1] + '</span> \
  1589. <a class="DotDX_RaidLink" href="' + url + '">' + rd.shortname + '</a> \
  1590. <span class="DotDX_RaidListVisited">' + (r.visited ? '&#9733;' : '') + (r.isFull ? ' !' : '') + '</span> \
  1591. '+ //<a class="dotdxRaidListDelete" href="#">DEL</a>\
  1592. '<span class="DotDX_extInfo' + fCls + '">h|t: ' + hpr.slice(0,4) + '|' + tlp.slice(0,4) + ' %</span>\
  1593. ', true);
  1594. lii.attach('to', a);
  1595. }
  1596. }
  1597. else SRDotDX.gui.deleteRaidFromDB(id);
  1598. },
  1599. toggleRaidListDesc: function (el, mode) {
  1600. if(mode) {
  1601. clearTimeout(el.timerout);
  1602. el.timerin = setTimeout(function(){el.lastElementChild.style.display = "block";}, 500)
  1603. }
  1604. else {
  1605. clearTimeout(el.timerin);
  1606. el.timerout = setTimeout(function (){el.lastElementChild.style.display = "none";}, 50)
  1607. }
  1608. return false;
  1609. },
  1610. errorMessage: function (s, tag) {
  1611. tag = typeof tag === 'undefined' ? 'b' : tag;
  1612. SRDotDX.gui.doStatusOutput('<' + tag + '>' + s + '</' + tag + '>')
  1613. },
  1614. updateMessage: function () { SRDotDX.gui.doStatusOutput(SRDotDX.gui.standardMessage(), false, true) },
  1615. postingMessage: function (i, ct) { SRDotDX.gui.doStatusOutput('Posting message ' + i + (typeof ct == 'undefined' ? '' : ' of ' + ct + '...'), false) },
  1616. standardMessage: function () { return Object.keys(SRDotDX.config.raidList).length + ' raids in db, ' + SRDotDX.gui.joinRaidList.length + ' selected to join'; },
  1617. CurrentStatusOutputTimer: 0,
  1618. doStatusOutput: function (str, msecs, showInChat) {
  1619. showInChat = showInChat === undefined ? true : showInChat;
  1620. msecs = msecs || 4000;
  1621. var rel = document.getElementById('StatusOutput');
  1622. var cel = document.getElementById('dotdx_chat_overlay');
  1623. if(rel !== null) rel.innerHTML = str;
  1624. if(showInChat && cel !== null) cel.innerHTML = str;
  1625. if(msecs) {
  1626. if (SRDotDX.gui.CurrentStatusOutputTimer) clearTimeout(SRDotDX.gui.CurrentStatusOutputTimer);
  1627. SRDotDX.gui.CurrentStatusOutputTimer = setTimeout(function () {
  1628. var rel = document.getElementById('StatusOutput');
  1629. var cel = document.getElementById('dotdx_chat_overlay');
  1630. if(rel !== null) rel.innerHTML = SRDotDX.gui.standardMessage();
  1631. if(cel !== null) cel.innerHTML = SRDotDX.gui.standardMessage();
  1632. }, msecs);
  1633. }
  1634. },
  1635. toggleDisplay: function (elem, sender, el2) {
  1636. if (typeof elem == 'undefined') return;
  1637. var el = document.getElementById(elem);
  1638. var alls = document.getElementsByName(sender.getAttribute('name'));
  1639. if (alls.length > 0) {
  1640. for (var i = 0; i < alls.length; i++) {
  1641. if (alls[i].nodeName == 'P') alls[i].getElementsByTagName('span')[0].innerHTML = '+';
  1642. else alls[i].style.display = 'none';
  1643. }
  1644. el.style.display = 'block';
  1645. sender.getElementsByTagName('span')[0].innerHTML = '&minus;';
  1646. }
  1647. else {
  1648. if (el.style.display == 'none') {
  1649. el.style.display = 'block';
  1650. sender.getElementsByTagName('span')[0].innerHTML = '&minus;';
  1651. }
  1652. else {
  1653. el.style.display = 'none';
  1654. sender.getElementsByTagName('span')[0].innerHTML = '+';
  1655. }
  1656. }
  1657. if (typeof el2 == 'string') {
  1658. switch (el2) {
  1659. case 'raid_list': SRDotDX.refreshRaidTab(); break;
  1660. case 'share_list': document.getElementById('DotDX_raidsToSpam').style.height = ( 526 - document.getElementById('FPXShare').offsetHeight - document.getElementById('FPXImport').offsetHeight ) + "px";
  1661. }
  1662. }
  1663. },
  1664. Importing: false,
  1665. deleteRaid: function(ele) {
  1666. var id = ele.getAttribute('raidid');
  1667. SRDotDX.gui.deleteRaidFromDB(id);
  1668. if(!SRDotDX.gui.joining) SRDotDX.gui.refreshRaidList();
  1669. },
  1670. deleteRaidFromDB: function(id) {
  1671. var p = document.getElementsByClassName('DotDX_raidId_'+id);
  1672. for (var c = 0, cc = p.length; c < cc; ++c) if (p[c]) p[c].parentNode.removeChild(p[c]);
  1673. if(SRDotDX.config.raidList[id]) delete SRDotDX.config.raidList[id];
  1674. },
  1675. FPXdeleteAllRaids: function() {
  1676. if (!SRDotDX.config.confirmDeletes || confirm('This will delete all ' + SRDotDX.config.raidList.length + ' raids stored. Continue? \n (This message can be disabled on the options tab.)')) {
  1677. for(var id in SRDotDX.config.raidList) if(SRDotDX.config.raidList[id]) delete SRDotDX.config.raidList[id];
  1678. var raidlistDIV = document.getElementById('raid_list');
  1679. while (raidlistDIV.hasChildNodes()) raidlistDIV.removeChild(raidlistDIV.lastChild);
  1680. localStorage.removeItem('raidList');
  1681. SRDotDX.gui.updateMessage();
  1682. console.log('[SRDotDX] Delete all raids finished.');
  1683. }
  1684. },
  1685. chatCommand: function (text) {
  1686. var elems = document.getElementsByClassName('chat_input');
  1687. var txt = [], i = elems.length;
  1688. while (i--) { txt[i] = elems[i].value; elems[i].value = text; }
  1689. holodeck.activeDialogue().sendInput();
  1690. i = txt.length;
  1691. while (i--) elems[i].value = txt[i];
  1692. },
  1693. sendChatMsg: function (msg, whisper) {
  1694. if (whisper && whisper != '') msg = '/w ' + whisper + ' ' + msg;
  1695. if (SRDotDX.alliance.isActive) {
  1696. SRDotDX.alliance.sendMessage(msg);
  1697. return;
  1698. }
  1699. var elems = document.getElementsByClassName('chat_input');
  1700. var txt = [], i = elems.length;
  1701. while (i--) { txt[i] = elems[i].value; elems[i].value = msg; }
  1702. holodeck.activeDialogue().sendInput();
  1703. i = txt.length;
  1704. while (i--) elems[i].value = txt[i];
  1705. },
  1706. FPXformatRaidOutput: function (url) {
  1707. var pre = ''; //user && room ? '['+room+'|'+user+'] ' : '';
  1708. if (!SRDotDX.config.formatLinkOutput) return pre + url;
  1709. var r = SRDotDX.getRaidDetailsBase(url);
  1710. return pre + r.shortname + ' ' + r.diffShortText + ' ' + url;
  1711. },
  1712. isPosting: false,
  1713. FPXTimerArray: [],
  1714. FPXStopPosting: function () {
  1715. SRDotDX.gui.endSpammingRaids();
  1716. console.log('[DotDX] Spamming raids to chat... [cancelled]');
  1717. SRDotDX.util.extEcho('Raid posting cancelled');
  1718. },
  1719. endSpammingRaids: function () {
  1720. for(var i = 0, il = SRDotDX.gui.FPXTimerArray.length; i < il; ++i) clearTimeout(SRDotDX.gui.FPXTimerArray[i]);
  1721. SRDotDX.gui.isPosting = false;
  1722. document.getElementById('PostRaidsButton').value = 'Post';
  1723. document.getElementById('dotdx_share_post_button').value = 'Post Links to Chat';
  1724. document.getElementById('dotdx_share_post_button').value = 'Friend Share links';
  1725. SRDotDX.gui.doStatusOutput('Posting raids finished');
  1726. SRDotDX.gui.FPXTimerArray = [];
  1727. SRDotDX.config.save(false);
  1728. },
  1729. prepareSpammingRaids: function () {
  1730. SRDotDX.gui.isPosting = true;
  1731. document.getElementById('PostRaidsButton').value = 'Cancel';
  1732. document.getElementById('dotdx_share_post_button').value = 'Cancel';
  1733. document.getElementById('dotdx_friend_post_button').value = 'Cancel';
  1734. SRDotDX.gui.doStatusOutput('Posting raids started', false);
  1735. },
  1736. spamRaidsToFriends: function () {
  1737. SRDotDX.gui.prepareSpammingRaids();
  1738. var userList = [[],[],[],[],[]], keys = Object.keys(SRDotDX.config.friendUsers);
  1739. for(var k = 0, kl = keys.length; k < kl; ++k) for(var i = 0; i < 5; ++i) if(SRDotDX.config.friendUsers[keys[k]][i]) userList[i].push(keys[k]);
  1740. console.log('[DotDX] Spamming raids to friends... [started]');
  1741. var linkList = document.getElementById('DotDX_raidsToSpam').value;
  1742. if(linkList.length > 100) {
  1743. document.getElementById('DotDX_raidsToSpam').value = '';
  1744. var patt = new RegExp('http...www.kongregate.com.games.5thPlanetGames.dawn.of.the.dragons.[\\w\\s\\d_=&]+[^,]', 'ig');
  1745. var link, ct = 0, sel = 4, r, rs;
  1746. i = 0;
  1747. var timer = 500, ttw = 3050;
  1748. while ((link = patt.exec(linkList)) && SRDotDX.gui.isPosting) {
  1749. link = typeof link !== "string" ? link[0] : link;
  1750. r = SRDotDX.util.getRaidFromUrl(link);
  1751. rs = SRDotDX.raids[r.boss].size;
  1752. if (r.boss === 'serpina') sel = 0;
  1753. else if (rs < 26) sel = 1;
  1754. else if (rs === 50) sel = 2;
  1755. else if (rs === 100) sel = 3;
  1756. if(userList[sel].length > 0) {
  1757. for(var u = 0, ul = userList[sel].length; u < ul; ++u) {
  1758. (function (p1, p2) {
  1759. return SRDotDX.gui.FPXTimerArray[i] = setTimeout(function () {
  1760. if (!SRDotDX.gui.isPosting) return;
  1761. SRDotDX.gui.sendChatMsg(SRDotDX.gui.FPXformatRaidOutput(p1), p2);
  1762. ++ct;
  1763. SRDotDX.gui.postingMessage(ct, i);
  1764. }, timer);
  1765. })(link, userList[sel][u]);
  1766. timer += ttw;
  1767. i++;
  1768. }
  1769. }
  1770. }
  1771. }
  1772. SRDotDX.gui.FPXTimerArray[SRDotDX.gui.FPXTimerArray.length] = setTimeout(function () {
  1773. SRDotDX.gui.endSpammingRaids();
  1774. console.log('[DotDX] Spamming raids to friends... [stopped]');
  1775. }, timer);
  1776. },
  1777. FPXspamRaids: function () {
  1778. SRDotDX.gui.prepareSpammingRaids();
  1779. console.log('[DotDX] Spamming raids to chat... [started]');
  1780. var linkList = document.getElementById('DotDX_raidsToSpam').value;
  1781. if (linkList.length > 100) {
  1782. document.getElementById('DotDX_raidsToSpam').value = '';
  1783. var patt = new RegExp('http...www.kongregate.com.games.5thPlanetGames.dawn.of.the.dragons.[\\w\\s\\d_=&]+[^,]', 'ig');
  1784. var link, ct = 0, i = 0;
  1785. var timer = 500, ttw = 1500;
  1786. var total = linkList.split(patt).length - 1;
  1787. while ((link = patt.exec(linkList)) && SRDotDX.gui.isPosting) {
  1788. (function (p1) {
  1789. return SRDotDX.gui.FPXTimerArray[i] = setTimeout(function () {
  1790. if (!SRDotDX.gui.isPosting) return;
  1791. SRDotDX.gui.sendChatMsg(SRDotDX.gui.FPXformatRaidOutput(p1), SRDotDX.config.whisperTo);
  1792. ++ct;
  1793. SRDotDX.gui.postingMessage(ct, total);
  1794. }, timer);
  1795. })(link);
  1796. timer += ttw;
  1797. i++;
  1798. }
  1799. }
  1800. SRDotDX.gui.FPXTimerArray[SRDotDX.gui.FPXTimerArray.length] = setTimeout(function() {
  1801. SRDotDX.gui.endSpammingRaids();
  1802. console.log('[DotDX] Spamming raids to chat... [stopped]');
  1803. }, timer);
  1804. },
  1805. quickImportAndJoin: function(joinStr, imp) {
  1806. SRDotDX.gui.updateFilterTxt(joinStr, false, true);
  1807. SRDotDX.request.quickBtnLock = false;
  1808. if(imp) {
  1809. SRDotDX.request.joinAfterImport = true;
  1810. SRDotDX.gui.importFromServer();
  1811. }
  1812. else SRDotDX.gui.joinSelectedRaids();
  1813. },
  1814. importFromServer: function () {
  1815. var h = Math.ceil(((new Date).getTime() - SRDotDX.config.lastImported) / 3600000);
  1816. SRDotDX.util.extEcho('Importing raids from server');
  1817. SRDotDX.request.raids(false, h);
  1818. },
  1819. sortRaids: function () {
  1820. var raidArray = [], i, sortFunc;
  1821. var selectedSort = document.getElementById('FPXRaidSortSelection').value;
  1822. var selectedDir = document.getElementById('FPXRaidSortDirection').value;
  1823. var raidlistDIV = document.getElementById('raid_list');
  1824. var raidList = raidlistDIV.childNodes;
  1825. console.log('[SRDotDX] Sorting started ' + selectedSort + ' : ' + selectedDir);
  1826. i = raidList.length;
  1827. while (i--) raidArray.push(SRDotDX.config.raidList[raidList[i].getAttribute('raidid')]);
  1828. switch (selectedSort) {
  1829. case 'Id':
  1830. if (selectedDir == 'asc') sortFunc = function (a, b) {
  1831. if (!(typeof a.id === 'undefined' || typeof b.id === 'undefined') && a.id > b.id) return -1;
  1832. return 1;
  1833. };
  1834. else sortFunc = function (a, b) {
  1835. if (!(typeof a.id === 'undefined' || typeof b.id === 'undefined') && a.id < b.id) return -1;
  1836. return 1;
  1837. };
  1838. break;
  1839. case 'Time':
  1840. if (selectedDir == 'asc') sortFunc = function (a, b) {
  1841. if (!(typeof a.timeStamp === 'undefined' || typeof b.timeStamp === 'undefined') && a.timeStamp > b.timeStamp) return -1;
  1842. return 1;
  1843. };
  1844. else sortFunc = function (a, b) {
  1845. if (!(typeof a.timeStamp === 'undefined' || typeof b.timeStamp === 'undefined') && a.timeStamp < b.timeStamp) return -1;
  1846. return 1;
  1847. };
  1848. break;
  1849. case 'Name':
  1850. if (selectedDir == 'asc') sortFunc = function (a, b) {
  1851. a = SRDotDX.raids[a.boss];
  1852. b = SRDotDX.raids[b.boss];
  1853. //console.log(a + ' : ' + b + ' : ' + (typeof a === 'undefined') + ' : ' + (typeof b === 'undefined'));
  1854. if (!(typeof a === 'undefined' || typeof b === 'undefined') && a.name > b.name) return -1;
  1855. return 1;
  1856. };
  1857. else sortFunc = function (a, b) {
  1858. a = SRDotDX.raids[a.boss];
  1859. b = SRDotDX.raids[b.boss];
  1860. if (!(typeof a === 'undefined' || typeof b === 'undefined') && a.name < b.name) return -1;
  1861. return 1;
  1862. };
  1863. break;
  1864. case 'Diff':
  1865. if (selectedDir == 'asc') sortFunc = function (a, b) {
  1866. if (a.diff > b.diff) return -1;
  1867. return 1
  1868. };
  1869. else sortFunc = function (a, b) {
  1870. if (a.diff < b.diff) return -1;
  1871. return 1
  1872. };
  1873. break;
  1874. }
  1875. try {
  1876. raidArray.sort(sortFunc)
  1877. }
  1878. catch (e) {
  1879. console.log('[SRDotDX] Sorting error: ' + e);
  1880. return
  1881. }
  1882. raidlistDIV = document.getElementById('raid_list');
  1883. if(raidlistDIV !== null) while(raidlistDIV.hasChildNodes()) raidlistDIV.removeChild(raidlistDIV.lastChild);
  1884. i = raidArray.length;
  1885. while (i--) SRDotDX.gui.addRaid(raidArray[i]);
  1886. //SRDotDX.gui.FPXFilterRaidListByName();
  1887. console.log('[SRDotDX] Sorting finished');
  1888. },
  1889. joinRaidList: [],
  1890. postRaidList: [],
  1891. updateFilterTimeout: 0,
  1892. filterSearchStringC: "",
  1893. filterSearchStringR: "",
  1894. updateFilterContext: true,
  1895. includeDiff: function(str, dv) {
  1896. var diff = isNaN(parseInt(dv)) ? ({'n': 1, 'h': 2, 'l': 3, 'nm': 4, 'nnm': 0})[dv] || 5 : parseInt(dv);
  1897. var out = "";
  1898. var string = str.toString();
  1899. switch(diff) {
  1900. case 0: out = string.replace(/,|$/g, '_1,') + string.replace(/,|$/g, '_4,'); break;
  1901. case 1: case 2: case 3: case 4: out = string.replace(/,|$/g, '_' + diff + ','); break;
  1902. default: for(var i = 1; i < 5; ++i) out += string.replace(/,|$/g, '_' + i + ','); break;
  1903. }
  1904. return out.slice(0, -1);
  1905. },
  1906. updateFilterTxt: function(txt, fromRT, quick) {
  1907. clearTimeout(this.updateFilterTimeout);
  1908. var foundRaids = [], field, rf, i, il;
  1909. if(txt !== "") {
  1910. var searchArray = txt.split(/\s?\|\s?|\sor\s|\s?,\s?/ig);
  1911. var keys = Object.keys(SRDotDX.raids);
  1912. for(i = 0, il = searchArray.length; i < il; ++i) {
  1913. field = searchArray[i].toLowerCase().split(':');
  1914. if (field[0] !== "") {
  1915. if(typeof SRDotDX.searchPatterns[field[0]] !== 'undefined') foundRaids.push(this.includeDiff(SRDotDX.searchPatterns[field[0]], field[1]));
  1916. else if(typeof SRDotDX.raids[field[0]] !== 'undefined') foundRaids.push(this.includeDiff(field[0], field[1]));
  1917. else {
  1918. for(var k = 0, kl = keys.length; k < kl; ++k) {
  1919. rf = (SRDotDX.raids[keys[k]].name + ':' + SRDotDX.raids[keys[k]].shortname + ':' + SRDotDX.raids[keys[k]].type).toLowerCase();
  1920. if (rf.indexOf(field[0]) >= 0) foundRaids.push(this.includeDiff(keys[k], field[1]));
  1921. }
  1922. }
  1923. }
  1924. }
  1925. }
  1926. var finalSearchString = foundRaids.length === 0 ? (txt !== "" ? "BREAK" : "" ) : "," + foundRaids.toString() + ",";
  1927. if(fromRT) {
  1928. SRDotDX.config.lastFilter[SRDotDX.config.serverMode - 1] = txt;
  1929. SRDotDX.config.filterSearchStringR = finalSearchString;
  1930. }
  1931. else if(quick) SRDotDX.request.filterSearchStringT = finalSearchString;
  1932. else {
  1933. var filterInputs = document.getElementsByClassName('dotdx_chat_filter');
  1934. for (i = 0, il = filterInputs.length; i < il; ++i) if(filterInputs[i].value !== txt) filterInputs[i].value = txt;
  1935. SRDotDX.config.chatFilterString = txt;
  1936. SRDotDX.config.filterSearchStringC = finalSearchString;
  1937. }
  1938. if(quick) {
  1939. SRDotDX.gui.selectRaidsToJoin('quick');
  1940. SRDotDX.config.save(false)
  1941. }
  1942. else this.updateFilterTimeout = setTimeout(function(){SRDotDX.gui.selectRaidsToJoin();SRDotDX.config.save(false)}, 300);
  1943. },
  1944. selectRaidsToJoin: function(from) {
  1945. if(SRDotDX.request.quickBtnLock) {
  1946. if(!SRDotDX.gui.joining) SRDotDX.gui.joinRaidList.length = 0;
  1947. SRDotDX.gui.updateFilterContext = document.getElementById('chat_tab').firstChild.className === 'active';
  1948. var searchString = from && from === 'quick' ? SRDotDX.request.filterSearchStringT : (SRDotDX.gui.updateFilterContext && SRDotDX.config.chatFilterString !== "" ? SRDotDX.config.filterSearchStringC : SRDotDX.config.filterSearchStringR);
  1949. var r, filter = SRDotDX.c('#DotDX_filters').ele().innerHTML, server = SRDotDX.config.serverMode, keys = Object.keys(SRDotDX.config.raidList);
  1950. if (searchString !== "BREAK") {
  1951. for (var k = 0, kl = keys.length; k < kl; ++k) {
  1952. r = SRDotDX.config.raidList[keys[k]];
  1953. if (SRDotDX.config.fltShowAll || (r.sid === server &&
  1954. ((!SRDotDX.config.fltExclFull || !r.isFull) && (SRDotDX.config.fltIncVis || !r.visited)) &&
  1955. filter.indexOf('fltList_' + r.boss + '_' + (r.diff - 1)) < 0 &&
  1956. (searchString === "" || searchString.indexOf("," + r.boss + "_" + r.diff + ",") >= 0) ))
  1957. SRDotDX.gui.joinRaidList.push(r);
  1958. }
  1959. }
  1960. if (!SRDotDX.gui.joining) {
  1961. SRDotDX.gui.updateMessage();
  1962. SRDotDX.gui.refreshRaidList();
  1963. }
  1964. }
  1965. },
  1966. pushRaidToJoinQueue: function(id) {
  1967. var searchString = SRDotDX.gui.updateFilterContext && SRDotDX.config.chatFilterString !== "" ? SRDotDX.config.filterSearchStringC : SRDotDX.config.filterSearchStringR;
  1968. var r, filter = SRDotDX.c('#DotDX_filters').ele().innerHTML;
  1969. r = SRDotDX.config.raidList[id];
  1970. if(typeof r === 'object') {
  1971. if (SRDotDX.config.fltShowAll || (r.sid === SRDotDX.config.serverMode &&
  1972. ((!SRDotDX.config.fltExclFull || !r.isFull) && (SRDotDX.config.fltIncVis || !r.visited)) &&
  1973. filter.indexOf('fltList_' + r.boss + '_' + (r.diff - 1)) < 0 &&
  1974. (searchString == "" || searchString.indexOf("," + r.boss + "_" + r.diff + ",") >= 0) ))
  1975. SRDotDX.gui.joinRaidList.push(r);
  1976. }
  1977. },
  1978. joining: false,
  1979. joinRaidIndex: 0,
  1980. joinRaidComplete: 0,
  1981. joinRaidSuccessful: 0,
  1982. joinRaidDead: 0,
  1983. joinRaidInvalid: 0,
  1984. joinSelectedRaids: function(fromChat) {
  1985. if (!this.joining) {
  1986. this.joining = true;
  1987. this.joinRaidIndex = 0;
  1988. this.joinRaidComplete = 0;
  1989. this.joinRaidSuccessful = 0;
  1990. this.joinRaidDead = 0;
  1991. this.joinRaidInvalid = 0;
  1992. if (SRDotDX.gui.joinRaidList.length == 0) {
  1993. this.joinFinish(true);
  1994. return
  1995. }
  1996. SRDotDX.c("#AutoJoinVisibleButton").ele().value = 'Cancel';
  1997. SRDotDX.c("#AutoImpJoinVisibleButton").ele().value = 'Cancel';
  1998. console.log('[DotDX] Joining ' + SRDotDX.gui.joinRaidList.length + ' raids');
  1999. while(SRDotDX.gui.joinRaidIndex < Math.min(20, SRDotDX.gui.joinRaidList.length))
  2000. SRDotDX.request.joinRaid(SRDotDX.gui.joinRaidList[SRDotDX.gui.joinRaidIndex++]);
  2001. }
  2002. else if(!fromChat) this.joinFinish();
  2003. },
  2004. joinFinish: function(recalc) {
  2005. this.joining = false;
  2006. SRDotDX.request.quickBtnLock = true;
  2007. SRDotDX.c("#AutoJoinVisibleButton").ele().value = 'Join';
  2008. SRDotDX.c("#AutoImpJoinVisibleButton").ele().value = 'Import & Join';
  2009. if (recalc) this.selectRaidsToJoin('joining finish');
  2010. },
  2011. refreshFriends: function() {
  2012. var content = "", ff, i, il, f = false, friend;
  2013. var parentDiv = SRDotDX.c('#FPXfsOptions');
  2014. var friends = Object.keys(SRDotDX.config.friendUsers);
  2015. parentDiv.html('<span class="generic">User</span><span class="share">Srp</span><span class="share">Sml</span><span class="share">Med</span><span class="share">Lrg</span><span class="share" style="margin-right: 27px">Oth</span><hr style="width: 270px; margin: 3px auto 4px; border: 0; height: 1px; background-color: #999;">', true);
  2016. for(i = 0, il = friends.length; i < il; ++i) {
  2017. content += (f ? '<br>' : '') + '<span class="generic">' + friends[i] + '</span>' +
  2018. '<input type="checkbox" id="fs:' + friends[i] + ':0' + '"/><label for="fs:' + friends[i] + ':0' + '"></label>' +
  2019. '<input type="checkbox" id="fs:' + friends[i] + ':1' + '"/><label for="fs:' + friends[i] + ':1' + '"></label>' +
  2020. '<input type="checkbox" id="fs:' + friends[i] + ':2' + '"/><label for="fs:' + friends[i] + ':2' + '"></label>' +
  2021. '<input type="checkbox" id="fs:' + friends[i] + ':3' + '"/><label for="fs:' + friends[i] + ':3' + '"></label>' +
  2022. '<input type="checkbox" id="fs:' + friends[i] + ':4' + '"/><label for="fs:' + friends[i] + ':4' + '"></label>';
  2023. f = true;
  2024. }
  2025. parentDiv.html('<div style="overflow-y: scroll; width: 277px; height: 414px">' + content + '</div>', false);
  2026. for(i = 0, il = friends.length; i < il; ++i) {
  2027. ff = SRDotDX.config.friendUsers[friends[i]];
  2028. SRDotDX.c('#fs:' + friends[i] + ':' + 0).on('click',SRDotDX.gui.fsEleClick).ele().checked = ff[0];
  2029. SRDotDX.c('#fs:' + friends[i] + ':' + 1).on('click',SRDotDX.gui.fsEleClick).ele().checked = ff[1];
  2030. SRDotDX.c('#fs:' + friends[i] + ':' + 2).on('click',SRDotDX.gui.fsEleClick).ele().checked = ff[2];
  2031. SRDotDX.c('#fs:' + friends[i] + ':' + 3).on('click',SRDotDX.gui.fsEleClick).ele().checked = ff[3];
  2032. SRDotDX.c('#fs:' + friends[i] + ':' + 4).on('click',SRDotDX.gui.fsEleClick).ele().checked = ff[4];
  2033. /*for (i = 0; i < 5; i++) SRDotDX.c('#fs:' + friends[i] + ':' + i).on('click', function (e) {
  2034. SRDotDX.gui.fsEleClick(e)
  2035. }).ele().checked = ff[i];*/
  2036. }
  2037. },
  2038. DeleteRaids: function() {
  2039. if(!this.joining) {
  2040. console.log('[DotDX] Erasing visible raids ...');
  2041. var rn = SRDotDX.gui.joinRaidList.length;
  2042. if(rn > 0 && (!SRDotDX.config.confirmDeletes || confirm('This will delete ' + rn + ' raids. Continue? \n (This message can be disabled on the options tab.)'))) {
  2043. for(var i = 0; i < rn; ++i) SRDotDX.gui.deleteRaidFromDB(SRDotDX.gui.joinRaidList[i].id);
  2044. SRDotDX.gui.doStatusOutput(i + ' raids deleted');
  2045. SRDotDX.gui.selectRaidsToJoin();
  2046. console.log('[DotDX] Erasing complete');
  2047. }
  2048. }
  2049. },
  2050. GetDumpText: function() {
  2051. var dumptext = "";
  2052. var pre = "http://www.kongregate.com/games/5thPlanetGames/dawn-of-the-dragons?kv_action_type=raidhelp";
  2053. var raid;
  2054. for(var i = 0, il = SRDotDX.gui.joinRaidList.length; i < il; ++i) {
  2055. raid = SRDotDX.gui.joinRaidList[i];
  2056. dumptext += pre + '&kv_raid_id=' + raid.id + '&kv_difficulty=' + raid.diff + '&kv_raid_boss=' + raid.boss + '&kv_hash=' + raid.hash + '&kv_serverid=' + raid.sid + ', ';
  2057. }
  2058. return dumptext;
  2059. },
  2060. RaidAction: function(f) {
  2061. switch(f) {
  2062. case 'share':
  2063. SRDotDX.gui.DumpRaidsToShare(true);
  2064. break;
  2065. case 'post':
  2066. if (SRDotDX.gui.isPosting) SRDotDX.gui.FPXStopPosting();
  2067. else { SRDotDX.gui.DumpRaidsToShare(); SRDotDX.gui.FPXspamRaids(); }
  2068. break;
  2069. case 'post_share':
  2070. if (SRDotDX.gui.isPosting) SRDotDX.gui.FPXStopPosting();
  2071. else SRDotDX.gui.FPXspamRaids();
  2072. break;
  2073. case 'post_friend':
  2074. if (SRDotDX.gui.isPosting) SRDotDX.gui.FPXStopPosting();
  2075. else SRDotDX.gui.spamRaidsToFriends();
  2076. break;
  2077. case 'delete':
  2078. SRDotDX.gui.DeleteRaids();
  2079. break;
  2080. }
  2081. },
  2082. DumpRaidsToShare: function(b) {
  2083. document.getElementById('DotDX_raidsToSpam').value = SRDotDX.gui.GetDumpText();
  2084. SRDotDX.gui.doStatusOutput('Copied ' + SRDotDX.gui.joinRaidList.length + ' raid links to share tab.');
  2085. console.log('[DotDX] Dumped ' + SRDotDX.gui.joinRaidList.length + ' to share');
  2086. if(b) {
  2087. var e = document.getElementById('lots_tab_pane').getElementsByTagName('li');
  2088. var i = e.length;
  2089. while (i--) if (e[i].getAttribute('class').indexOf('active') > -1) e[i].className = e[i].className.replace(/ active$/g, '');
  2090. (document.getElementById('FPXShareTab').parentNode).className += ' active';
  2091. }
  2092. },
  2093. BeginDeletingExpiredUnvisitedRaids: function() {
  2094. SRDotDX.gui.cleanRaidsDB();
  2095. setInterval(SRDotDX.gui.cleanRaidsDB, 600000)
  2096. },
  2097. cleanRaidsDB: function() {
  2098. var now = parseInt(new Date().getTime()/1000);
  2099. var r, st, cnt = 0, keys = Object.keys(SRDotDX.config.raidList);
  2100. for(var k = 0, kl = keys.length; k < kl; ++k) {
  2101. r = SRDotDX.config.raidList[keys[k]];
  2102. st = SRDotDX.raids[r.boss] !== undefined ? SRDotDX.raids[r.boss].stat : "S";
  2103. if(st === "H" && (now-r.timeStamp)/3600 > 8) {
  2104. SRDotDX.gui.deleteRaidFromDB(keys[k]);
  2105. cnt++;
  2106. }
  2107. else if(st !== "H" && (now >= r.expTime || (r.ni && (now-r.timeStamp)/3600 > 3))) {
  2108. SRDotDX.gui.deleteRaidFromDB(keys[k]);
  2109. cnt++;
  2110. }
  2111. }
  2112.  
  2113. var chat = document.getElementsByClassName('chat_message_window'), p, pe, i;
  2114. for(var c = 0, cl = chat.length; c < cl; ++c) {
  2115. p = chat[c].getElementsByTagName('div'); i = 0;
  2116. while(pe = p[i++]) if(pe.empty()) pe.parentNode.removeChild(pe);
  2117. }
  2118.  
  2119. if(cnt > 0) {
  2120. SRDotDX.gui.doStatusOutput(cnt + ' expired raids removed from db.');
  2121. console.log('[DotDX] Number of expired raids removed: ' + cnt);
  2122. SRDotDX.gui.selectRaidsToJoin('prune');
  2123. }
  2124. },
  2125. switchBot: function() {
  2126. //console.log('[SRDotDX] Bot button clicked');
  2127. var chkBot = document.getElementById('SRDotDX_options_hideBotLinks');
  2128. chkBot.checked = !SRDotDX.config.hideBotLinks;
  2129. SRDotDX.config.hideBotLinks = chkBot.checked;
  2130. SRDotDX.c('#SRDotDX_botClass').html('.bot {display: ' + (chkBot.checked ? 'none !important' : 'block') + '}', true);
  2131. setTimeout(SRDotDX.gui.scrollChat, 50, true);
  2132. },
  2133. scrollChat: function(force) {
  2134. force = force || false;
  2135. var c = null;
  2136. if (SRDotDX.alliance.isActive) c = document.getElementById('alliance_chat_window');
  2137. else {
  2138. var els = document.getElementById('chat_rooms_container').children;
  2139. var i = SRDotDX.util.getChatNumber();
  2140. if (els[i]) c = els[i].getElementsByClassName('chat_message_window')[0];
  2141. }
  2142. if (c&&(c.scrollHeight - c.scrollTop - c.offsetHeight < 400 || force)) c.scrollTop = c.scrollHeight - c.offsetHeight;
  2143. },
  2144. getScrollbarWidth: function() {
  2145. var scrollDiv = SRDotDX.c('div').set({id: "DotDX_scrollMeasure", style: "width:100px;height:100px;overflow:scroll;position:absolute;top:-9999px;"}).attach('to', document.body).ele();
  2146. var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
  2147. document.body.removeChild(document.getElementById('DotDX_scrollMeasure'));
  2148. return scrollbarWidth;
  2149. },
  2150. applyFontSize: function(num) {
  2151. var n = typeof num === 'number' ? num : SRDotDX.config.fontNum, s1, s2, mod = '';
  2152. //console.log("[DotDX] apply font size with id: " + n);
  2153. SRDotDX.config.fontNum = n;
  2154. switch(n) {
  2155. case 1: s1 = 12; s2 = 10; mod = '; vertical-align: top;'; break;
  2156. case 2: s1 = 10; s2 = 8; break;
  2157. default: s1 = 11; s2 = 9; break;
  2158. }
  2159. SRDotDX.c('#DotDX_fontClass').html('\
  2160. #kong_game_ui div.chat_message_window p span.message, #kong_game_ui div.chat_message_window p span.separator, #kong_game_ui div.chat_message_window p span.username {font-size: ' + s1 + 'px}\
  2161. #kong_game_ui div.chat_message_window p span.room, #kong_game_ui div.chat_message_window p span.timestamp {font-size: ' + s2 + 'px' + mod + '}\
  2162. ', true);
  2163. },
  2164. applyTabs: function() {
  2165. document.getElementById('lots_tab').firstChild.innerHTML = SRDotDX.config.dotdxTabName;
  2166. var elems = ["#DotDX_Dummy"];
  2167. if(SRDotDX.config.hideGameTab) elems.push("#kong_game_ui li#game_tab");
  2168. if(SRDotDX.config.hideAccTab) elems.push("#kong_game_ui li#accomplishments_tab");
  2169. SRDotDX.c('#DotDX_tabs').html(elems.join(", ") + ' { display: none !important }', true);
  2170. },
  2171. applyTheme: function(num) {
  2172. var n = typeof num == 'number' ? num : SRDotDX.config.themeNum;
  2173. //console.log("[DotDX] apply theme with id: " + n);
  2174. var c, check, radio;
  2175. SRDotDX.config.themeNum = n;
  2176. switch(n) {
  2177. case 1:
  2178. check = 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAcCAYAAABoMT8aAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuM4zml1AAAAJxSURBVEhL7VRLaxNRGL1QEIVs9AckDamZZPLOvDMzicZEjBltY5qnisFFKbgRVLoQEf0JVkShTUVQCl2oG9GNS0FcuXDpD3DrxneP3x0mfdimTXHjwoHDMN/cc+a73z1nmCAImVgs9joej39NJBLYAau07kM0Gu0EAoH9bHBR8W02m4WqqtB1fSg0TYMkSUgmkx+JI3l0xujLvzg5l8vBsizYtr0FvG6apiuSSqV4J8c8OmO8Pf4Fviifz6NQKGwLLmQYBtLpNEig5NHXBfiC7YgDcPH/ArsI/NUpbPTBMAx8wAWIsy5AxW8DJ/IFw8DfcyfKsvyTOi56dMYcx1nhWyCL/un9LeAC5XL5Xa1WEz06Y61Wa5zwst1uf+l0OtgBq7TmfbPZrDYajTGPzvacRup0jpAURdHnChDxzahpNNMZXCsWMJ+NfDoz7r/l8/n2cYEfo6RRz0i4YlpYadTxYrKClYOHPueCwXMj+SCXlXBZ1vG828SSU8Mj8sNsaAKq3x/c5ES7cASWTaahOydywbwk46qi41Wvi351CovUxUw48l0WonOhUGhsTcCkF8clBTOVMkqyCps/0/0GiTw728YikR9YeVwSIjAPR6/Tb+2AO0QuwAdUVXXcrVaozRbun3ZwPiPjdqmE5cY0+tT2gmFiNhKBFouDTmCzlblAMZPFPA2zf3IST2p1PO02sDxdd8lLioZeWIBFpzA0TIaqoRwWcS+Zcvf68BQRnSk8VhX0JsKwaBa7plHXdBwVRNxJpdE/4WBBN3CR9mzxmdCQR0qjQaSKGMNNql+g/ZqK6iZxb2nkJAqOIStrtX81jYz9Bt6mjYTW51PyAAAAAElFTkSuQmCC';
  2179. radio = 'iVBORw0KGgoAAAANSUhEUgAAAA0AAAAaCAYAAABsONZfAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuM4zml1AAAAI+SURBVDhPxZJNiBJhGMeHTgXdOrR0CUFdCTR1VscZW3W+Vs0P/JhZv2fVERSLukRBCEUHCRb6gKgg6tQlunrpVHSOztG9aLtsHQxcyv8+E22HcldvO/DjfWGe//M87/P8GfqO6Lp+PJ/P++m82Wg03vV6vXG/3//ZarW2isXiiP5dyGazvkwmc1LTtGPMH0GKgt92u90dEuBfOp3Oj0Kh8DKVSp2n8zRDgrPlcvkNZf1lmib2w/pPlUZUUWHocq1er08Mw8A8KpXKWJKkoSV6TZWwKCR6z6TT6S1qEYuSSCTGTDwe/04PxKKoqrrDRCKRD4qiYFFCodAnRhCEZyScRqNRzMOK83g8I0YUxUowGNwmMebhdru/yrI8YOhhZ3ief+z3+yeBQAD74fV6J9TaUxpckcnlcidoGDGWZZ9Tpm8+n29KYA8Knjqdzi/UzRMSVCmeZajXozT/UzSZVcp0dXl5+ZXD4fhst9u3bTbbR5fL9YJ2c92qYAnIdkuHaNh2s4lmrYYWYW4YMNvtgw1bL5Vgrq3hYiSKy6KIS5IIs6TBaDRmG7ak69igjQ84DnfOreIeLXOT53FFFFBb12cbNpNMwqQF3o3F8FBV/zLkWBhaEYVZho1LMprBEO7T+Yha3GOTW0FrXQMln2HYmIhqgMNtas2qYAkeyDJucT5UCzkr+H/DEpAFHgbL4kZIwJDEgxU/upk4EpTgAMPyiNCZVFQUs1lo6QwUSUI4HJ5vWEoCjqbIBbnf98MyrL60C6YGOtWmdTvcAAAAAElFTkSuQmCC';
  2180. c = ['#333', '#ddd', '#404040', '#fff', '#792c2c', '#333', '#101010', '0 0 5px #202020', '#333', '0 0 10px #000',
  2181. '#ccc', '#eee', '0 0 4px #555', '#000', '#444', '0 0 5px #888', '#fff', '#792c2c', '0 0 12px #fff', '#fff',
  2182. '#000', 'top,#aa4141,#5c2828', '0 0 5px #aaa;', '#555', '#000', '0 -2px 6px -3px #000', '#fff', '0 0 4px #000;', '#ccc', '#ddd',
  2183. 'none', '#000', '0 0 5px 1px #222', '#444', '#fff', '#000', '#333', '0 0 8px #000', '#ccc', '#222',
  2184. '#111', '#fff', '0 0 4px #111', '#333', '#ddd', '#111', '#444', '#3a3a3a', '#111', 'none',
  2185. '#111', 'none', '#111', 'none', '#111', 'none', '#404040', '#60cc60', '#60cc60', '0 0 5px #00aa1a',
  2186. '#d6c96a', '#d6c96a', '0 0 5px #7e7400', '#e47070', '#e47070', '0 0 5px #aa0000', '#c28ee6', '#c28ee6', '0 0 5px #9000ff', '#000',
  2187. 'top,#404040,#404040', '#000', 'top,#2a2a2a,#492c2c', '#78bcfa', '0 0 4px #000', '#6dc97c', '#ec6666', '#f8b60d', '0 0 5px #000', '#ccc',
  2188. '#fff', '0 0 6px #999', '#aaa', '#bbb', '#dfa160', '#ffb261', '0 0 4px #9b5812', '#000', '#404040', '0 0 6px #111',
  2189. '#eee', '#000', '0 0 3px #101010', '0 0 5px #000', 'top,#303030,#444', '#1a1a1a', '#000', '0 0 8px #fff', '#ddd', '#101010',
  2190. '0 0 3px #000', '0 0 5px #202020', 'top,#3a3a3a,#555', '#eee', '#000', '0 0 5px #000', '0 0 10px #111', 'top,#303030,#404040', '', '',
  2191. '', 'top,#303030,#406785', '', '', '', 'top,#303030,#306638', '', '', '', 'top,#303030,#693434',
  2192. '', '', '', 'top,#303030,#887E35', '#eaeaea', '0 0 5px #000', '#e0e0e0', '#101010', '0 0 5px #000', '0 0 5px #202020',
  2193. 'top,#303030,#444', '', '', 'top,#2a2a2a,#222', '#eee', '#111', '0 0 5px #000', '0 0 4px #303030', 'top,#333,#555', '0 0 6px #101010',
  2194. 'top,#2a2a2a,#404040', '#eee', '#1a1a1a', '0 0 5px #000', '0 0 5px #222', 'top,#333,#4a4a4a', '0 0 6px #111', '', 'top, #2a2a2a, #333', '0 0 6px #111',
  2195. '', 'top,#2a2a2a,#426B44', '0 0 6px #111', '', 'top,#2a2a2a,#40668d', '0 0 6px #111', '', 'top,#2a2a2a,#612525', '#e0e0e0', '#101010',
  2196. '0 0 5px #000', '0 0 8px #101010', 'top,#303030,#723434', 'top,#202020,#4d2424', '#eee', '0 0 4px #000', '#e0e0e0', '#888', 'top,#444,#555', '#eee',
  2197. '#000', '0 0 5px #000', '0 0 6px #111', 'left,#303030,#303030', '', '#aaa', '#000', '0 0 5px #000', 'top,#444,#444', '#606060',
  2198. '#101010', '#e5e5e5', '#f5f5f5', '0 0 6px #c0c0c0', '#eee', '#d83737', '0 0 3px #000', 'top,#404040,#556d52', 'top,#404040,#746c56', 'top,#404040,#664040',
  2199. 'top,#404040,#604c70', '#00bb00', '#dbb32e', '#d13c3c', '#d16ad1', '#eee', '0 0 6px #000', '#101010', '0 0 5px #000', 'top,#2a2a2a,#3a3a3a',
  2200. '#777', '#e0e0e0', '0 0 5px #000', '#f0f0f0', '0 0 8px #000', '#e0e0e0', '0 0 5px #000', '#000', '#3a3a3a', '#303030',
  2201. '#000', '#202020', '', '#552727', '#686868', '#303030', '#c0c0c0', '', '#111', '#222',
  2202. '#e0e0e0', '#fff', '0 0 6px #999', '#ffda8e', '#ff8080', '#ff4040', '#ccc', '#2a2a2a', '0,0,0,0.4', '0,0,0,0.2',
  2203. '0,0,0,0.3', '0,0,0,0.5', '#653838', '', '#792c2c', '#4a4a4a', '0 0 5px #000', '#f0f0f0', '#d0d0d0', ''];
  2204. break;
  2205. default:
  2206. check = 'iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuM4zml1AAAAC4SURBVDhPnZNRCsQgDAW9pPfxuCKICCIiyC62RPIksnEDU2zMlH7kGefc5xYzax5uas5ba19xjKEGxN67GhBba2pArLWqAbGUogbEnLMaEFNKakCMMaoBMYSgBkTvvRoQb3nEv0v64i/Wr94UiFIKToAopYDDZ0CUUkDMez4DIt/8PQkE7y2Rbz6905nfU3+JfPN3eDJoZon79hO8z++XKCVg7xEgSik4AaKUghMg3vKI83GLMcZ8AZMOnRQ6c3RxAAAAAElFTkSuQmCC';
  2207. radio = 'iVBORw0KGgoAAAANSUhEUgAAAA0AAAAaCAYAAABsONZfAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuM4zml1AAAAFpSURBVDhP1VJNi4IAEPV3durU1V/QJTAIT3WQopvRD4ggCTKrQ8d+gwkRlB+RKBHhW96sxUrrurdlBx7DvHnjqPOUr3E+nzGbzdDr9dBsNiWzJp9LirFYLNDpdLDdbnE6ncBgZk2e/Vz6GavVCsPhEEmSIMuyN5BnnzoZCIIA7XYbURTh8XiUgn3qqFcsy8Jms8H9fq8EddQr3W4Xh8MBt9utEtRRr2iahjAM5b2rQB31smm/3yOO40pQJ5t4h+VyicvlUgnqqJeDcqXnebK+DOxT9zo0/3+/38fxeITv+28gz/7rTs+Yz+fQdV1ewXVdcQMza/Ls59Ji8ImTyURsQ+8xsyafS97jnxh2vV5jPB5LrjQs/dVqtVCr1VCv1yWzJl9qWMdx0Gg0oKrqC6xt2y43rGmahYEnRqNRuWG5/rsh8qWGZcMwjMLAYDAQ/kfD8oN3ux2m06lk1r8y7PV6RZqmkv/SsIryAXc40Mw81bSxAAAAAElFTkSuQmCC';
  2208. c = ['#bbb', '#000', '#e0e0e0', '#fff', '#69a8e6', '#bbb', '#505050', '0 0 4px #707070', '#d5d5d5', '0 0 5px #333',
  2209. '#666', '#222', '0 0 3px #ccc', '#808080', '#eaeaea', '0 0 5px #888', '#fff', '#69a8e6', '0 0 3px #000', '#000',
  2210. '#888', 'top,#fff,#ddd', '0 0 5px #555;', '#f6f6f6', '#888', '0 -2px 6px -4px #444', '#222', '', '#777', '#888',
  2211. 'underline', '#888', '0 0 6px #999', '#e5e5e5', '#000', '#777', '#fff', '0 0 8px #999', '#4b4b4b', '#f0f0f0',
  2212. '#bbb', '#333', '0 0 4px #ddd', '#fff', '#222', '#d0d0d0', '#fff', '#f7f7f7', '#8ab389', 'top,#cbe7c4,#f3faf2',
  2213. '#adad68', 'top,#f7f0c8,#fcfbf8', '#b18780', 'top,#f3d7d1,#FCF7F7', '#a99abb', 'top,#ddd4e2,#f4f0f7', '#fff', '', '', '0 0 5px #aaa',
  2214. '', '', '0 0 5px #aaa', '', '', '0 0 5px #aaa', '', '', '0 0 5px #aaa', '#c0c0c0',
  2215. 'top,#f0f0f0,#fff', '#a1b4be', 'top,#dce8f1,#eff4f7', '#276594', 'none', '#267422', '#973131', '#085088', 'none', '#444',
  2216. '#000', '0 0 6px #888', '#666', '#666', '#946a3d', '#946a3d', '0 0 4px #f5Cc68Aa', '#777', '#eee', '0 0 7px #777',
  2217. '#000', '#606060', '0 0 3px #707070', '0 0 4px #ccc', 'top,#fff,#ddd', '#444', '#333', '0 0 5px #000', '#000', '#444',
  2218. '0 0 3px #bbb', '0 0 3px #707070', 'top,#f5f5f5,#ccc', '#fff', '#222', '0 0 3px #000', '0 0 3px #222', 'top,#999,#666', '#000', '0 0 10px #fff',
  2219. '0 0 7px #1c3a61', 'top,#dcf0fd,#6794b2', '#000', '0 0 10px #fff', '0 0 7px #3d6425', 'top,#effde5,#618d4f', '#000', '0 0 10px #fff', '0 0 7px #412222', 'top,#ffefef,#aa5858',
  2220. '#000', '0 0 10px #fff', '0 0 7px #807823', 'top,#fffbe0,#c9b41d', '#000', '0 0 3px #999', '#000', '#444', '0 0 3px #bbb', '0 0 3px #555',
  2221. 'top,#f5f5f5,#ccc', '', '', 'top,#ccc,#f5f5f5', '#222', '#999', '0 0 4px #ccc', '0 0 4px #ccc', 'top,#ccc,#eee', '0 0 4px #bbb',
  2222. 'top,#ccc,#ddd', '#444', '#aaa', '', '0 0 3px #ddd', 'top, #eee, #fff', '0 0 5px #bbb', '0 0 3px #bbb', 'top,#fff,#ccc', '0 0 5px #a7ca9c',
  2223. '0 0 3px #bbb', 'top, #fff, #b9daaf', '0 0 5px #a9d3ff', '0 0 3px #bbb', 'top, #fff, #a4c8ee', '0 0 5px #ffbaba', '0 0 3px #bbb', 'top,#fff,#f0a4a4', '#222', '#aaa',
  2224. '', '0 0 4px -1px #aaa', 'top,#fff,#d1dfee', 'top, #dfe8f1,#fff', '#333', '', '#bbb', '#ccc', 'top,#eee,#fff', '#444',
  2225. '#aaa', '1px 1px 2px #ddd', '0 0 4px #ccc', 'left,#fff,#eee', '0 0 3px #ddd', '#aaa', '#aaa', '0 0 3px #ccc', 'top,#f5f5f5,#f6f6f6', '#fff',
  2226. '#e0e0e0', '#111', '#111', '0 0 8px #777', '#000', '#bd0000', '0 0 2px #ff8e8e', 'top,#d8ecd3,#f5f5f5', 'top,#faf4d2,#f5f5f5', 'top,#fae4df,#f5f5f5',
  2227. 'top,#e9dcf3,#f5f5f5', '#00bb00', '#dbb32e', '#d13c3c', '#d16ad1', '#000', '0 0 6px #808080', '#808080', '0 0 5px #aaa', 'top,#d0d0d0,#f0f0f0',
  2228. '#ccc', '#222', '', '', '0 0 4px #ccc', '', '', '#bbb', '#fff', '',
  2229. '#bbb', '#efefef', '#fafafa', '#eff4f9', '#5f9ea0', '#eff4f9', '#606060', 'none', '#999', '#e5e5e5',
  2230. '#000', '#fff', '0 0 3px #000', '#b97c00', '#c82929', '#b10000', '', '', '0,0,0,0.2', '0,0,0,0.1',
  2231. '0,0,0,0.1', '0,0,0,0.25', '#afd7ff', 'brightness(1.3) drop-shadow(0px 0px 1px #000)','#609fd6', '#eaeaea', '0 0 3px #ccc', '#222', '#777', '0 0 3px #999'];
  2232. break;
  2233. }
  2234.  
  2235. SRDotDX.c('#DotDX_themeClass').html('\
  2236. ::-webkit-scrollbar { border-color: rgba(' + c[228] + '); }\
  2237. ::-webkit-scrollbar-track { background-color: rgba(' + c[229] + '); }\
  2238. ::-webkit-scrollbar-thumb { background-color: rgba(' + c[230] + '); }\
  2239. ::-webkit-scrollbar-thumb:hover { background-color: rgba(' + c[231] + '); }\
  2240. ::-webkit-scrollbar-corner { background-color: rgba(' + c[229] + '); }\
  2241. ::-webkit-resizer { background-color: rgba(' + c[229] + '); }\
  2242. #maingame, #quicklinks li, div.game_page_wrap, div#kong_game_ui, #kong_game_ui .tabpane {background-color:' + c[0] + ' !important;}\
  2243. #kong_game_ui ul.main_tabs li.tab a, div#serverButton {color:' + c[1] + '; background-color:' + c[2] + '; border-color:' + c[95] + ';}\
  2244. div#serverButton {text-shadow:' + c[100] + '; box-shadow:' + c[101] + ';}\
  2245. #kong_game_ui ul.main_tabs li.tab a.active, div#serverButton:hover {color:' + c[3] + '; background-color:' + c[4] + '; border-color:' + c[96] + '; text-shadow:' + c[97] + ';}\
  2246. #kong_game_ui div#chat_tab_pane, div#dotdx_sidebar_container, #kong_game_ui div#lots_tab_pane, #kong_game_ui ul.main_tabs {background-color:' + c[5] + ' !important;}\
  2247. #kong_game_ui div#chat_window, #kong_game_ui div#lots_tab_pane div#dotdx_shadow_wrapper {border-color:' + c[6] + '; box-shadow:' + c[7] + ';}\
  2248. #kong_game_ui div#chat_window_header, #kong_game_ui div#lots_tab_pane div#dotdx_shadow_wrapper {background-color:' + c[8] + ';}\
  2249. #kong_game_ui div#chat_window_header {box-shadow:' + c[9] + ';}\
  2250. #kong_game_ui div#chat_window_header div.dotdx_chat_overlay {border-color:' + c[175] + ';}\
  2251. #kong_game_ui div#chat_window_header div.room_name_container, #kong_game_ui div#dotdx_status_div, #kong_game_ui .panel_handle a, #kong_game_ui #accomplishments_pane_title {color:' + c[10] + ';}\
  2252. #kong_game_ui div#chat_window_header div.room_name_container .room_name, #kong_game_ui div#chat_window_header div.dotdx_chat_overlay > span, #kong_game_ui div#dotdx_status_div span, #kong_game_ui div#chat_room_tabs div a, #kong_game_ui div#alliance_tab a, #kong_game_ui div#lots_tab_pane ul li.tab div.tab_head {color:' + c[11] + '; text-shadow:' + c[12] + ';}\
  2253. #kong_game_ui div#chat_window_header div.room_name_container, #kong_game_ui div#chat_room_tabs div a, #kong_game_ui div#alliance_tab a, #kong_game_ui div#dotdx_status_div, #kong_game_ui div#lots_tab_pane ul li.tab div.tab_head {border-color:' + c[13] + '; background-color:' + c[14] + ';}\
  2254. #kong_game_ui div#chat_room_tabs div a:hover, #kong_game_ui div#alliance_tab a:hover, #kong_game_ui div#lots_tab_pane ul li.tab div.tab_head:hover {text-shadow:' + c[15] + '}\
  2255. #kong_game_ui div#chat_room_tabs div.active a, #kong_game_ui div#alliance_tab.active a, #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_head {color:' + c[16] + '; background-color:' + c[17] + '; text-shadow:' + c[18] + ';}\
  2256. #kong_game_ui div.chat_actions_container span.btn {color:' + c[19] + ' !important; border-color:' + c[20] + '; background:-webkit-linear-gradient(' + c[21] + '); background:-moz-linear-gradient(' + c[21] + ');}\
  2257. #kong_game_ui div.chat_actions_container span.kong_ico.btn_target:active {text-shadow:' + c[22] + ';}\
  2258. #kong_game_ui div#chat_rooms_container div.chat_tabpane.users_in_room, #kong_game_ui div#chat_rooms_container div#alliance_users, #kong_game_ui div#lots_tab_pane ul li.tab div.tab_pane { background-color:' + c[23] + '; border-color:' + c[24] + ';}\
  2259. #kong_game_ui div#chat_rooms_container div.chat_tabpane.users_in_room, #kong_game_ui div#chat_rooms_container div#alliance_users { box-shadow: inset ' + c[25] + ';}\
  2260. #kong_game_ui .user_row .username, #kong_game_ui div#lots_tab_pane ul { color:' + c[26] + '; text-shadow:' + c[27] + ';}\
  2261. #kong_game_ui .user_row.away .username {color:' + c[28] + ';}\
  2262. #kong_game_ui .user_row .guild-name {color:' + c[29] + ';}\
  2263. #kong_game_ui .user_row .username {text-decoration:' + c[30] + ';}\
  2264. #kong_game_ui div.chat_controls {border-color:' + c[31] + '; box-shadow:' + c[32] + ';}\
  2265. #kong_game_ui div.chat_controls, #kong_game_ui textarea.chat_input {background-color:' + c[33] + ';}\
  2266. #kong_game_ui textarea.chat_input {color:' + c[34] + ';}\
  2267. #kong_game_ui div.chat_actions_container ul.chat_actions_list {border-color:' + c[35] + '; background-color:' + c[36] + '; box-shadow:' + c[37] + ';}\
  2268. #kong_game_ui div.chat_actions_container ul.chat_actions_list li {border-color:' + c[36] + '; color:' + c[38] + ';}\
  2269. #kong_game_ui div.chat_actions_container ul.chat_actions_list li:hover {background-color:' + c[39] + '; border-color:' + c[40] + '; color:' + c[41] + '; box-shadow:' + c[42] + ';}\
  2270. #kong_game_ui div.chat_message_window {background-color:' + c[43] + '; color:' + c[44] + ';}\
  2271. #kong_game_ui div.chat_message_window p {border-bottom-color:' + c[45] + '; border-top-color:' + c[46] + ';}\
  2272. #kong_game_ui div.chat_message_window p.even {background-color:' + c[47] + ';}\
  2273. #kong_game_ui div.chat_message_window p.DotDX_raid, #kong_game_ui div.chat_message_window p.whisper, #kong_game_ui div.chat_message_window p.script {border-top-color:' + c[56] + ';}\
  2274. #kong_game_ui div.chat_message_window p.DotDX_diff_1 {border-bottom-color:' + c[48] + '; background: -webkit-linear-gradient(' + c[49] + '); background: -moz-linear-gradient(' + c[49] + ');} \
  2275. #kong_game_ui div.chat_message_window p.DotDX_diff_2 {border-bottom-color:' + c[50] + '; background: -webkit-linear-gradient(' + c[51] + '); background: -moz-linear-gradient(' + c[51] + ');} \
  2276. #kong_game_ui div.chat_message_window p.DotDX_diff_3 {border-bottom-color:' + c[52] + '; background: -webkit-linear-gradient(' + c[53] + '); background: -moz-linear-gradient(' + c[53] + ');} \
  2277. #kong_game_ui div.chat_message_window p.DotDX_diff_4 {border-bottom-color:' + c[54] + '; background: -webkit-linear-gradient(' + c[55] + '); background: -moz-linear-gradient(' + c[55] + ');} \
  2278. #kong_game_ui div.chat_message_window p span.message a {color:' + c[79] + '}\
  2279. #kong_game_ui div.chat_message_window p span.message a:hover {color:' + c[80] + '; text-shadow:' + c[81] + ';}\
  2280. #kong_game_ui div.chat_message_window p.DotDX_diff_1 span.message a {color:' + c[57] + '; text-shadow:' + c[74] + ';}\
  2281. #kong_game_ui div.chat_message_window p.DotDX_diff_1 span.message a:hover {color:' + c[58] + '; text-shadow:' + c[59] + ';}\
  2282. #kong_game_ui div.chat_message_window p.DotDX_diff_2 span.message a {color:' + c[60] + '; text-shadow:' + c[74] + ';}\
  2283. #kong_game_ui div.chat_message_window p.DotDX_diff_2 span.message a:hover {color:' + c[61] + '; text-shadow:' + c[62] + ';}\
  2284. #kong_game_ui div.chat_message_window p.DotDX_diff_3 span.message a {color:' + c[63] + '; text-shadow:' + c[74] + ';}\
  2285. #kong_game_ui div.chat_message_window p.DotDX_diff_3 span.message a:hover {color:' + c[64] + '; text-shadow:' + c[65] + ';}\
  2286. #kong_game_ui div.chat_message_window p.DotDX_diff_4 span.message a {color:' + c[66] + '; text-shadow:' + c[74] + ';}\
  2287. #kong_game_ui div.chat_message_window p.DotDX_diff_4 span.message a:hover {color:' + c[67] + '; text-shadow:' + c[68] + ';}\
  2288. #kong_game_ui div.chat_message_window p.script {border-bottom-color:' + c[69] + '; background: -webkit-linear-gradient(' + c[70] + '); background: -moz-linear-gradient(' + c[70] + ');}\
  2289. #kong_game_ui div.chat_message_window p.whisper {border-bottom-color:' + c[71] + '; background: -webkit-linear-gradient(' + c[72] + '); background: -moz-linear-gradient(' + c[72] + '); }\
  2290. #kong_game_ui div.chat_message_window p span.username, #kong_game_ui div.chat_message_window p.script span.emph {color:' + c[73] + '; text-shadow:' + c[74] + ';}\
  2291. #kong_game_ui div.chat_message_window p span.username.ign {color:' + c[75] + ';}\
  2292. #kong_game_ui div.chat_message_window p.sent_whisper span.username, #kong_game_ui div.chat_message_window p span.username.is_self, #kong_game_ui div.chat_message_window p.script span.emph {color:' + c[76] + ';}\
  2293. #kong_game_ui div.chat_message_window p.emote {color:' + c[77] + '; text-shadow:' + c[78] + ';}\
  2294. #kong_game_ui div.chat_message_window p span.room {color:' + c[82] + ';}\
  2295. #kong_game_ui div.chat_message_window p span.timestamp, #kong_game_ui div.chat_message_window p span.ingamename {color:' + c[83] + ';}\
  2296. #kong_game_ui div.chat_message_window p span.message a.reply_link {color:' + c[79] + '}\
  2297. #kong_game_ui div.chat_message_window p span.message a.reply_link:hover {color:' + c[80] + '; text-shadow:' + c[81] + ';}\
  2298. #kong_game_ui div.chat_message_window p span.message a.chat_link {color:' + c[84] + ';}\
  2299. #kong_game_ui div.chat_message_window p span.message a.chat_link:hover {color:' + c[85] + '; text-shadow:' + c[86] + ';}\
  2300. #kong_game_ui div.chat_message_window p > span.slider {border-color:' + c[87] + '; background:' + c[88] + '; box-shadow:' + c[89] + ';}\
  2301. #kong_game_ui div#chat_raids_overlay {color:' + c[90] + '; border-color:' + c[91] + '; box-shadow:' + c[92] + '; text-shadow:' + c[93] + '; background: -webkit-linear-gradient(' + c[94] + '); background: -moz-linear-gradient(' + c[94] + ');}\
  2302. div#dotdx_sidebar_container > button {color:' + c[98] + '; border-color:' + c[99] + '; text-shadow:' + c[100] + '; box-shadow:' + c[101] + '; background: -webkit-linear-gradient(' + c[102] + '); background: -moz-linear-gradient(' + c[102] + ');}\
  2303. div#dotdx_sidebar_container > button:hover {color:' + c[103] + '; border-color:' + c[104] + '; text-shadow:' + c[105] + '; box-shadow:' + c[106] + '; background: -webkit-linear-gradient(' + c[107] + '); background: -moz-linear-gradient(' + c[107] + ');}\
  2304. div#dotdx_sidebar_container > button.b:hover {color:' + c[108] + '; text-shadow:' + c[109] + '; box-shadow:' + c[110] + '; background: -webkit-linear-gradient(' + c[111] + '); background: -moz-linear-gradient(' + c[111] + ');}\
  2305. div#dotdx_sidebar_container > button.g:hover {color:' + c[112] + '; text-shadow:' + c[113] + '; box-shadow:' + c[114] + '; background: -webkit-linear-gradient(' + c[115] + '); background: -moz-linear-gradient(' + c[115] + ');}\
  2306. div#dotdx_sidebar_container > button.r:hover {color:' + c[116] + '; text-shadow:' + c[117] + '; box-shadow:' + c[118] + '; background: -webkit-linear-gradient(' + c[119] + '); background: -moz-linear-gradient(' + c[119] + ');}\
  2307. div#dotdx_sidebar_container > button.y:hover {color:' + c[120] + '; text-shadow:' + c[121] + '; box-shadow:' + c[122] + '; background: -webkit-linear-gradient(' + c[123] + '); background: -moz-linear-gradient(' + c[123] + ');}\
  2308. div#dotdx_sidebar_container > div.label {color:' + c[124] + '; text-shadow:' + c[125] + ';}\
  2309. div#dotdx_sidebar_container > input[type=\"text\"] {color:' + c[126] + '; border-color:' + c[127] + '; text-shadow:' + c[128] + '; box-shadow:' + c[129] + '; background: -webkit-linear-gradient(' + c[130] + '); background: -moz-linear-gradient(' + c[130] + ');}\
  2310. div#dotdx_sidebar_container > input[type=\"text\"]:hover, div#dotdx_sidebar_container > input[type=\"text\"]:focus {color:' + c[131] + '; border-color:' + c[132] + '; background: -webkit-linear-gradient(' + c[133] + '); background: -moz-linear-gradient(' + c[133] + ');}\
  2311. #kong_game_ui div.tab_pane p.collapsingCategory {color:' + c[134] + '; border-color:' + c[135] + '; text-shadow:' + c[136] + '; box-shadow:' + c[137] + '; background: -webkit-linear-gradient(' + c[138] + '); background: -moz-linear-gradient(' + c[138] + ');}\
  2312. #kong_game_ui div.tab_pane p.collapsingCategory:hover {box-shadow:' + c[139] + '; background: -webkit-linear-gradient(' + c[140] + '); background: -moz-linear-gradient(' + c[140] + ');}\
  2313. #kong_game_ui div.tab_pane input[type=\"button\"] {color:' + c[141] + '; border-color:' + c[142] + '; text-shadow:' + c[143] + '; box-shadow:' + c[144] + '; background: -webkit-linear-gradient(' + c[145] + '); background: -moz-linear-gradient(' + c[145] + ');} \
  2314. #kong_game_ui div.tab_pane input[type=\"button\"].generic:hover {box-shadow:' + c[146] + '; text-shadow:' + c[147] + '; background: -webkit-linear-gradient(' + c[148] + '); background: -moz-linear-gradient(' + c[148] + ');}\
  2315. #kong_game_ui div.tab_pane input[type=\"button\"].green:hover, #kong_game_ui div.tab_pane input.landpmbuttonhigh {box-shadow:' + c[149] + '; text-shadow:' + c[150] + '; background: -webkit-linear-gradient(' + c[151] + '); background: -moz-linear-gradient(' + c[151] + ');}\
  2316. #kong_game_ui div.tab_pane input[type=\"button\"].blue:hover {box-shadow:' + c[152] + '; text-shadow:' + c[153] + '; background: -webkit-linear-gradient(' + c[154] + '); background: -moz-linear-gradient(' + c[154] + ');}\
  2317. #kong_game_ui div.tab_pane input[type=\"button\"].red:hover, #kong_game_ui div.tab_pane input[type=\"button\"][value=\"Cancel\"]:hover {box-shadow:' + c[155] + '; text-shadow:' + c[156] + '; background: -webkit-linear-gradient(' + c[157] + '); background: -moz-linear-gradient(' + c[157] + ');}\
  2318. #kong_game_ui input#raidsBossFilter {color:' + c[158] + '; border-color:' + c[159] + '; text-shadow:' + c[160] + '; box-shadow:' + c[161] + '; background: -webkit-linear-gradient(' + c[162] + '); background: -moz-linear-gradient(' + c[162] + ');}\
  2319. #kong_game_ui input#raidsBossFilter:hover, input#raidsBossFilter:focus {background: -webkit-linear-gradient(' + c[163] + '); background: -moz-linear-gradient(' + c[163] + ');}\
  2320. ul#SRDotDX_tabpane_tabs input[type="text"].generic {color:' + c[164] + '; text-shadow:' + c[165] + '; border-bottom-color:' + c[166] + ';}\
  2321. ul#SRDotDX_tabpane_tabs input[type="text"].generic:focus {border-color:' + c[167] + '; background: -webkit-linear-gradient(' + c[168] + '); background: -moz-linear-gradient(' + c[168] + ');}\
  2322. textarea#DotDX_raidsToSpam, textarea#options_sbConfig {color:' + c[169] + '; border-color:' + c[170] + '; text-shadow:' + c[171] + '; box-shadow:' + c[172] + '; background: -webkit-linear-gradient(' + c[173] + '); background: -moz-linear-gradient(' + c[173] + ');}\
  2323. #kong_game_ui span.notice {text-shadow:' + c[174] + ';}\
  2324. #kong_game_ui ul#SRDotDX_tabpane_tabs input[type="checkbox"] + label:before {background: url(data:image/png;base64,' + check + ') 0 0 no-repeat}\
  2325. #kong_game_ui ul#SRDotDX_tabpane_tabs input[type="checkbox"]:checked + label:before {background: url(data:image/png;base64,' + check + ') 0 -14px no-repeat}\
  2326. #kong_game_ui ul#SRDotDX_tabpane_tabs input[type="radio"] + label:before {background: url(data:image/png;base64,' + radio + ') 0 0 no-repeat}\
  2327. #kong_game_ui ul#SRDotDX_tabpane_tabs input[type="radio"]:checked + label:before {background: url(data:image/png;base64,' + radio + ') 0 -13px no-repeat}\
  2328. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list {border-top-color:' + c[176] + '; box-shadow:' + c[177] + '; background: -webkit-linear-gradient(' + c[178] + '); background: -moz-linear-gradient(' + c[178] + ');}\
  2329. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list .raid_list_item {border-top-color:' + c[179] + '; border-bottom-color:' + c[180] + ';}\
  2330. a.DotDX_RaidLink {color:' + c[181] + ';}\
  2331. a.DotDX_RaidLink:hover {color:' + c[182] + '; text-shadow:' + c[183] + ';}\
  2332. a.dotdxRaidListDelete {color:' + c[184] + ';}\
  2333. a.dotdxRaidListDelete:hover {color:' + c[185] + '; text-shadow:' + c[186] + ';}\
  2334. #raid_list .raid_list_item.DotDX_N:hover {background: -webkit-linear-gradient(' + c[187] + '); background: -moz-linear-gradient(' + c[187] + ');}\
  2335. #raid_list .raid_list_item.DotDX_H:hover {background: -webkit-linear-gradient(' + c[188] + '); background: -moz-linear-gradient(' + c[188] + ');}\
  2336. #raid_list .raid_list_item.DotDX_L:hover {background: -webkit-linear-gradient(' + c[189] + '); background: -moz-linear-gradient(' + c[189] + ');}\
  2337. #raid_list .raid_list_item.DotDX_NM:hover {background: -webkit-linear-gradient(' + c[190] + '); background: -moz-linear-gradient(' + c[190] + ');}\
  2338. span.DotDX_List_diff.DotDX_N {color:' + c[191] + ';}\
  2339. span.DotDX_List_diff.DotDX_H {color:' + c[192] + ';}\
  2340. span.DotDX_List_diff.DotDX_L {color:' + c[193] + ';}\
  2341. span.DotDX_List_diff.DotDX_NM {color:' + c[194] + ';}\
  2342. #kong_game_ui div#helpBox { color:' + c[195] + '; box-shadow:' + c[196] + '; border-top-color:' + c[197] + '; text-shadow:' + c[198] + '; background: -webkit-linear-gradient(' + c[199] + '); background: -moz-linear-gradient(' + c[199] + ');}\
  2343. #kong_game_ui div.chat_message_window p.script hr {background:' + c[200] + ';}\
  2344. #kong_game_ui div.chat_message_window p.script span .title {color:' + c[201] + '; text-shadow:' + c[202] + ';}\
  2345. #kong_game_ui div.chat_message_window p.script span .title:hover {color:' + c[203] + '; text-shadow:' + c[204] + ';}\
  2346. table.raids, table.camps {color:' + c[205] + '; text-shadow:' + c[206] + ';} \
  2347. table.raids td, table.camps td {border-color:' + c[207] + '; background:' + c[208] + ';}\
  2348. table.raids td.ep, table.camps td.ep {background:' + c[209] + ';} \
  2349. table.raids th, table.camps th {border-color:' + c[210] + '; background-color:' + c[211] + ';} \
  2350. table.raids tr.head, table.camps tr.head {background:' + c[212] + ';} \
  2351. table.raids tr.best td {background:' + c[213] + ';} \
  2352. table.raids colgroup col.selected {border-color:' + c[214] + ';}\
  2353. table.camps td.mark {background:' + c[215] + ';} \
  2354. div.raid_list_item > span.DotDX_extInfo {color:' + c[216] + '; text-shadow:' + c[217] + ';}\
  2355. #maingame, div.game_page_wrap {border-color:' + c[218] + ';}\
  2356. body {background-color:' + c[219] + ' !important}\
  2357. #quicklinks li a, #quicklinks li.rate, #play #maingame .user_connection .logged_in_user {color:' + c[220] + '; text-shadow: ' + c[239] + ';}\
  2358. #quicklinks li a:hover {color:' + c[221] + '; text-shadow:' + c[222] + ';}\
  2359. div.raid_list_item > span.DotDX_extInfo.failings {color:' + c[223] + ';}\
  2360. div.raid_list_item > span.DotDX_extInfo.failingm {color:' + c[224] + ';}\
  2361. div.raid_list_item > span.DotDX_extInfo.failingh {color:' + c[225] + ';}\
  2362. div.cntrNotify {color:' + c[226] + '; background-color:' + c[227] + '; border-bottom-color:' + c[45] + ';}\
  2363. .user_connection #chat_connected_indicator { -webkit-filter: ' + c[233] + '; filter: ' + c[233] + ';}\
  2364. #kong_game_ui div#alliance_users > div:hover {background-color: ' + c[235] + ';}\
  2365. #kong_game_ui div#alliance_users > div > span:first-child {background-color:' + c[234] + '; text-shadow: 0 0 5px #000;}\
  2366. #kong_game_ui div#alliance_users > div > span:not(:first-child) {text-shadow: ' + c[236] + ';}\
  2367. #kong_game_ui div#alliance_users > div > span:nth-child(2) {color: ' + c[237] + ';}\
  2368. #kong_game_ui div#alliance_users > div > span:nth-child(3) {color: ' + c[238] + ';}\
  2369. #kong_game_ui div#alliance_tab.unread a {background-color: transparent; animation: tabDim 3s linear infinite;}\
  2370. @keyframes tabDim { \
  2371. 0% { background-color: ' + c[14] + ' } \
  2372. 50% { background-color: ' + c[232] + ' } \
  2373. 100% { background-color: ' + c[14] + ' } \
  2374. } \
  2375. ', true); },
  2376. createFilterTab: function () {
  2377. var sm = SRDotDX.config.serverMode - 1;
  2378. var rdObj = Object.keys(SRDotDX.raids);
  2379. var i, il, raid, parentTableId = '', parentTable = '', cb;
  2380. var sectionID = ['Guild','Special','Small','Medium','Large','Epic','Colossal','Gigantic'];
  2381. for(i = 0; i < 8; ++i)
  2382. document.getElementById('FPXRaidFilterWhat' + sectionID[i]).innerHTML = '<div><div>Raid name</div><div>N</div><div>H</div><div>L</div><div>NM</div><div>All</div></div>';
  2383. for(i = 0, il = rdObj.length; i < il; ++i) {
  2384. raid = SRDotDX.raids[rdObj[i]];
  2385. parentTableId = 'FPX_options_cbs_' + raid.id;
  2386. parentTable = SRDotDX.c('div').set({id: parentTableId}).html(' \
  2387. <div>' + raid.name + '</div> \
  2388. <div><input type="checkbox" id="cb_filter_' + raid.id + '_0"/><label for="cb_filter_' + raid.id + '_0"></label></div> \
  2389. <div><input type="checkbox" id="cb_filter_' + raid.id + '_1"/><label for="cb_filter_' + raid.id + '_1"></label></div> \
  2390. <div><input type="checkbox" id="cb_filter_' + raid.id + '_2"/><label for="cb_filter_' + raid.id + '_2"></label></div> \
  2391. <div><input type="checkbox" id="cb_filter_' + raid.id + '_3"/><label for="cb_filter_' + raid.id + '_3"></label></div> \
  2392. <div><input type="checkbox" id="cb_filter_' + raid.id + '_all"/><label for="cb_filter_' + raid.id + '_all"></label></div>', true);
  2393.  
  2394. if (raid.stat === 'H') parentTable.attach('to', 'FPXRaidFilterWhatGuild');
  2395. else if (raid.size < 40) parentTable.attach('to', 'FPXRaidFilterWhatSmall');
  2396. else if (raid.size < 100) parentTable.attach('to', 'FPXRaidFilterWhatMedium');
  2397. else if (raid.size < 200) parentTable.attach('to', 'FPXRaidFilterWhatLarge');
  2398. else if (raid.size < 300) parentTable.attach('to', 'FPXRaidFilterWhatEpic');
  2399. else if (raid.size < 600) parentTable.attach('to', 'FPXRaidFilterWhatColossal');
  2400. else if (raid.size < 1000) parentTable.attach('to', 'FPXRaidFilterWhatGigantic');
  2401. else parentTable.attach('to', 'FPXRaidFilterWhatSpecial');
  2402.  
  2403. for(var j = 0; j < 4; ++j) {
  2404. cb = document.getElementById('cb_filter_' + raid.id + '_' + j);
  2405. cb.checked = !SRDotDX.config.filters[sm][raid.id][j];
  2406. cb.addEventListener("click", function(){
  2407. var s = SRDotDX.config.serverMode - 1;
  2408. var raidId = this.id.substr(10).slice(0,-2);
  2409. var diffIndex = parseInt(this.id.slice(-1));
  2410. SRDotDX.config.filters[s][raidId][diffIndex] = !this.checked;
  2411. var ele = document.getElementById('DotDX_filters');
  2412. var eletxt = ele.innerHTML;
  2413. var reg = new RegExp('.DotDX_fltChat_' + raidId + '_' + diffIndex + ', ', 'g');
  2414. if(SRDotDX.config.filterChatLinks) {
  2415. if (!this.checked && !reg.test(eletxt)) eletxt = '.DotDX_fltChat_' + raidId + '_' + diffIndex + ', ' + eletxt;
  2416. else if (this.checked) eletxt = eletxt.replace(reg, '');
  2417. }
  2418. reg = new RegExp('.DotDX_fltList_' + raidId + '_' + diffIndex + ', ', 'g');
  2419. if(SRDotDX.config.filterRaidList) {
  2420. if (!this.checked && !reg.test(eletxt)) eletxt = '.DotDX_fltList_' + raidId + '_' + diffIndex + ', ' + eletxt;
  2421. else if (this.checked) eletxt = eletxt.replace(reg, '');
  2422. }
  2423. ele.innerHTML = eletxt;
  2424.  
  2425. var f = SRDotDX.config.filters[s][raidId];
  2426. document.getElementById('cb_filter_' + raidId + '_all').checked = !f[0] && !f[1] && !f[2] && !f[3];
  2427. SRDotDX.config.save(false);
  2428. });
  2429. }
  2430. cb = document.getElementById('cb_filter_' + raid.id + '_all');
  2431. cb.checked = !(SRDotDX.config.filters[sm][raid.id][0] && SRDotDX.config.filters[sm][raid.id][1] && SRDotDX.config.filters[sm][raid.id][2] && SRDotDX.config.filters[sm][raid.id][3]);
  2432. cb.addEventListener('click', function(){
  2433. var s = SRDotDX.config.serverMode - 1;
  2434. var raidId = this.id.substr(10).slice(0,-4), reg;
  2435. var elem = document.getElementById('DotDX_filters');
  2436. var ele = elem.innerHTML;
  2437. var chk = this.checked;
  2438. for(j = 0; j < 4; ++j) {
  2439. document.getElementById('cb_filter_' + raidId + '_' + j).checked = chk;
  2440. SRDotDX.config.filters[s][raidId][j] = !chk;
  2441. reg = new RegExp('.DotDX_fltChat_' + raidId + '_' + j + ', ', 'g');
  2442. if (SRDotDX.config.filterChatLinks) {
  2443. if (!chk && !reg.test(ele)) ele = '.DotDX_fltChat_' + raidId + '_' + j + ', ' + ele;
  2444. else if (chk) ele = ele.replace(reg, '');
  2445. }
  2446. reg = new RegExp('.DotDX_fltList_' + raidId + '_' + j + ', ', 'g');
  2447. if (SRDotDX.config.filterRaidList) {
  2448. if (!chk && !reg.test(ele)) ele = '.DotDX_fltList_' + raidId + '_' + j + ', ' + ele;
  2449. else if (chk) ele = ele.replace(reg, '');
  2450. }
  2451. }
  2452. elem.innerHTML = ele;
  2453. SRDotDX.config.save(false);
  2454. });
  2455. }
  2456. },
  2457. toggleFiltering: function () {
  2458. var sm = SRDotDX.config.serverMode - 1;
  2459. var rdObj = Object.keys(SRDotDX.raids);
  2460. var fltObj = Object.keys(SRDotDX.config.filters[sm]);
  2461. var query = '.DotDX_filter_dummy_0 ', i, il, frcId;
  2462. if(!SRDotDX.util.isArrEq(rdObj, fltObj)) {
  2463. for(i = 0, il = rdObj.length; i < il; ++i) if(typeof SRDotDX.config.filters[sm][rdObj[i]] === 'undefined') SRDotDX.config.filters[sm][rdObj[i]] = [false, false, false, false];
  2464. for(i = 0, il = fltObj.length; i < il; ++i) if(rdObj.indexOf(fltObj[i]) < 0) delete SRDotDX.config.filters[sm][fltObj[i]];
  2465. console.log('[DotDX] Filters array has been altered!');
  2466. }
  2467. if(SRDotDX.config.filterChatLinks) {
  2468. frcId = '.DotDX_fltChat_';
  2469. for(i = 0, il = rdObj.length; i < il; ++i) {
  2470. if (SRDotDX.config.filters[sm][rdObj[i]][0]) query = frcId + rdObj[i] + '_0, ' + query;
  2471. if (SRDotDX.config.filters[sm][rdObj[i]][1]) query = frcId + rdObj[i] + '_1, ' + query;
  2472. if (SRDotDX.config.filters[sm][rdObj[i]][2]) query = frcId + rdObj[i] + '_2, ' + query;
  2473. if (SRDotDX.config.filters[sm][rdObj[i]][3]) query = frcId + rdObj[i] + '_3, ' + query;
  2474. }
  2475. }
  2476. if(SRDotDX.config.filterRaidList) {
  2477. frcId = '.DotDX_fltList_';
  2478. for(i = 0, il = rdObj.length; i < il; ++i) {
  2479. if (SRDotDX.config.filters[sm][rdObj[i]][0]) query = frcId + rdObj[i] + '_0, ' + query;
  2480. if (SRDotDX.config.filters[sm][rdObj[i]][1]) query = frcId + rdObj[i] + '_1, ' + query;
  2481. if (SRDotDX.config.filters[sm][rdObj[i]][2]) query = frcId + rdObj[i] + '_2, ' + query;
  2482. if (SRDotDX.config.filters[sm][rdObj[i]][3]) query = frcId + rdObj[i] + '_3, ' + query;
  2483. }
  2484. }
  2485. SRDotDX.c('#DotDX_filters').html(query + '{display: none !important}', true);
  2486. },
  2487. switchServer: function () {
  2488. if(confirm("You're attempting to switch server mode, continue?")) {
  2489. var sm = SRDotDX.config.serverMode;
  2490. SRDotDX.config.serverMode = sm === 1 ? 2 : 1;
  2491. this.toggleFiltering();
  2492. this.createFilterTab();
  2493. this.applySidebarUI(0);
  2494. SRDotDX.c('#raidsBossFilter').ele().value = SRDotDX.config.lastFilter[SRDotDX.config.serverMode - 1];
  2495. this.updateFilterTxt(SRDotDX.config.lastFilter[SRDotDX.config.serverMode - 1], true);
  2496. SRDotDX.c('#DotDX_serverModeRaids').html('#kong_game_ui p.DotDX_sid_' + (SRDotDX.config.serverMode == 2 ? '1' : '2') + ' {display: none !important}', true);
  2497. this.scrollChat(true);
  2498. SRDotDX.config.save(false);
  2499. }
  2500. },
  2501. applyKongBar: function() {
  2502. var styleElem = SRDotDX.c('#DotDX_kongBar');
  2503. if(SRDotDX.config.slimKongBar) styleElem.html('#header_logo, #new_nav_wrapper .main_navigation {display:none !important} #header {height:27px !important}',true);
  2504. else styleElem.html('',true);
  2505. },
  2506. load: function() {
  2507. if (typeof holodeck._tabs.addTab === 'function' && document.getElementById('chat_rooms_container') !== null) {
  2508. SRDotDX.c('li').set({class: 'control'}).html('<a href="#">'+(SRDotDX.config.slimKongBar?'Show':'Hide')+'</a>',true).on('click',function(e){e.preventDefault(); e.stopPropagation(); SRDotDX.config.slimKongBar=!SRDotDX.config.slimKongBar; e.target.innerHTML = (SRDotDX.config.slimKongBar?'Show':'Hide'); SRDotDX.gui.applyKongBar(); SRDotDX.config.save(false); return false}).attach('before',document.getElementById('nav_welcome_box').children[5]);
  2509. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_kongBar'}).attach('to', document.head);
  2510. SRDotDX.c('style').set({type: "text/css", id: 'SRDotDX_botClass'}).text('.bot{display:' + (SRDotDX.config.hideBotLinks ? 'none !important' : 'block') + '}').attach('to', document.head);
  2511. SRDotDX.c('style').set({type: "text/css", id: 'SRDotDX_raidClass'}).text('.DotDX_raid {display:' + (SRDotDX.config.hideRaidLinks ? 'none !important' : 'block') + '}').attach('to', document.head);
  2512. SRDotDX.c('style').set({type: "text/css", id: 'SRDotDX_visitedRaidClass'}).text('.DotDX_visitedRaid{display: ' + (SRDotDX.config.hideVisitedRaids ? 'none !important' : 'block') + '}').attach('to', document.head);
  2513. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_forum'}).text('div.game_page_wrap {padding-top: 16px; margin-top: 14px !important; background: #333 !important; display: ' + (SRDotDX.config.hideKongForum ? 'none' : 'block') + '}').attach('to', document.head);
  2514. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_details'}).text('div.game_details_outer {margin-top: 14px !important; width: 900px !important; border: solid 20px #333 !important; display: ' + (SRDotDX.config.hideGameDetails ? 'none' : 'block') + '}').attach('to', document.head);
  2515. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_filters'}).text('.DotDX_filter_dummy_0 {display: none !important}').attach('to', document.head);
  2516. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_serverModeRaids'}).text('#kong_game_ui p.DotDX_sid_' + (SRDotDX.config.serverMode == 2 ? '1' : '2') + ' {display: none !important}').attach('to', document.head);
  2517. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_chatResizeElems'}).text('#kong_game_ui textarea.chat_input { width: 270px !important; }\
  2518. #kong_game_ui div#chat_raids_overlay { width: 292px }\
  2519. #kong_game_ui div#chat_raids_overlay > span { width: 282px }\
  2520. div#dotdx_sidebar_container { ' + (SRDotDX.config.sbRightSide ? "text-align: left; padding-left: 1px" : "text-align: left; margin-left: 2px; padding-left: 6px") + ' }').attach('to', document.head);
  2521. SRDotDX.gui.applyKongBar();
  2522. SRDotDX.gui.toggleFiltering();
  2523.  
  2524. var elemPositionFix = "";
  2525. if (SRDotDX.isFirefox) {
  2526. elemPositionFix = " \
  2527. #kong_game_ui div#chat_room_tabs div a {padding: 3px 9px 4px 7px}\
  2528. #kong_game_ui div#alliance_tab a { padding: 5px 8px }\
  2529. #kong_game_ui div#lots_tab_pane ul li.tab div.tab_head {padding: 2px 7px 3px}\
  2530. #kong_game_ui span.generic {margin: 2px 6px 0}\
  2531. #kong_game_ui div#dotdx_status_div {padding: 5px 6px}\
  2532. #kong_game_ui div#chat_window_header div.dotdx_chat_overlay {margin-top: 4px; padding-top: 3px;}\
  2533. #kong_game_ui div#chat_raids_overlay {padding: 4px 0}\
  2534. #kong_game_ui div.chat_message_window p span.timestamp, #kong_game_ui div.chat_message_window p span.room {vertical-align: baseline}\
  2535. #kong_game_ui div.chat_message_window p {padding: 2px 5px 3px}\
  2536. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list .raid_list_item {padding: 2px;}\
  2537. .raid_list_item a.dotdxRaidListDelete {margin-top: 1px;}\
  2538. #kong_game_ui div.chat_message_window p span.ingamename {vertical-align: baseline;} \
  2539. a.DotDX_RaidLink {vertical-align: bottom}\
  2540. #kong_game_ui div#alliance_tab a { padding: 4px 8px; } \
  2541. #kong_game_ui div#alliance_users > div > span:nth-child(1) { padding-bottom: 1px; }\
  2542. ";
  2543. }
  2544. else {
  2545. elemPositionFix = " \
  2546. #kong_game_ui div#chat_room_tabs div a {padding: 4px 9px 3px 7px}\
  2547. #kong_game_ui div#alliance_tab a { padding: 5px 8px }\
  2548. #kong_game_ui div#lots_tab_pane ul li.tab div.tab_head {padding: 3px 7px 2px}\
  2549. #kong_game_ui span.generic {margin: 3px 6px 0}\
  2550. #kong_game_ui div#dotdx_status_div {padding: 6px 6px 4px}\
  2551. #kong_game_ui div#chat_window_header div.dotdx_chat_overlay {margin-top: 3px; padding-top: 4px;}\
  2552. #kong_game_ui div#chat_raids_overlay {padding: 5px 0 3px}\
  2553. #kong_game_ui div.chat_message_window p span.timestamp, #kong_game_ui div.chat_message_window p span.room {vertical-align: text-top}\
  2554. #kong_game_ui div.chat_message_window p {padding: 3px 5px}\
  2555. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list .raid_list_item {padding: 3px 2px 1px;}\
  2556. #kong_game_ui div.chat_message_window p span.ingamename {vertical-align: top;} \
  2557. a.DotDX_RaidLink {vertical-align: text-bottom}\
  2558. ";
  2559. }
  2560. SRDotDX.c('style').set({type: "text/css"}).text(" \
  2561. " + (SRDotDX.config.hideGameTitle ? "ul#gamepage_categories_list, .horizontal_ad, span#kong_game_bf_300x250_2_holder, div#gamespotlight, div#dealspot_banner_holder, div#kong_bumper_preroll_600x400-ad-slot, div#gamepage_header, #kong_game_ui div#chat_default_content, div.tracking_pixel_ad {display:none; !important} \
  2562. div.gamepage_header_outer, div.gamepage_header_inner, div.gamepage_header_outer h1 {height: 0 !important; padding: 0 !important; margin: 0 !important} \
  2563. #primarylayout .maincontent {padding: 6px 0 !important} \
  2564. " : "") + "div.raid_list_item.hidden, .DotDX_hidden, div.game_page_admindev_controls, div#subwrap, li#quicklinks_facebook, #shim {display:none !important} \
  2565. #primarywrap {background-image: none !important; background-color: transparent !important;} \
  2566. html {margin: 0 !important;} \
  2567. body {min-width: auto !important;} \
  2568. ::-webkit-scrollbar { width:10px; height: 10px; border-style: solid; }\
  2569. ::-webkit-scrollbar:vertical { border-width: 0 0 0 1px; }\
  2570. ::-webkit-scrollbar:horizontal { border-width: 1px 0 0 0; } \
  2571. ::-webkit-scrollbar-thumb { min-height: 30px; min-width: 30px; }\
  2572. ul#nav_welcome_box { display: block !important; }\
  2573. #maingame { border: 1px solid transparent }\
  2574. #maingame .user_connection {margin-right: 10px;}\
  2575. div#game { overflow:hidden }\
  2576. div.upper_gamepage { background: transparent !important; padding: 0 !important; }\
  2577. .user_connection #chat_connected_indicator {margin-right: 10px}\
  2578. #FPXtt { position:absolute; display:block; } \
  2579. #FPXtttop { display:block; height:5px; margin-left:5px; } \
  2580. #FPXttcont { display:block; padding:2px 12px 3px 7px; margin-left:5px; background:#666; color:#fff; } \
  2581. #FPXttbot {display:block;height:5px;margin-left:5px;} \
  2582. .welcome-user>li {background-color: #710000}\
  2583. .welcome-user>li:hover {background-color: #423f3e}\
  2584. #kong_game_ui ul.main_tabs {height:30px; padding-left:7px}\
  2585. #kong_game_ui ul.main_tabs li.tab:first-child { margin-left: 1px; }\
  2586. #kong_game_ui ul.main_tabs li.tab a { padding: 6px 6px 4px; margin-top: 6px; border: 1px solid #000; margin-right: 3px; transition: all .3s;}\
  2587. #kong_game_ui ul.main_tabs li.tab a.active {margin-top: 5px; padding: 7px 6px 5px; border-radius: 5px 0 5px 0;}\
  2588. /*#kong_game_ui div#chat_tab_pane {height: 645px !important}*/ \
  2589. #kong_game_ui div#lots_tab_pane {padding: 8px; text-align: left; background-color: #777; height: 644px}\
  2590. #kong_game_ui div#lots_tab_pane div#dotdx_shadow_wrapper { width: 282px; border: 1px solid #222; box-shadow: 0 0 12px #111; height: 643px; overflow: hidden; background-color: #ddd;}\
  2591. #kong_game_ui div#chat_window { background-color: #fff; border: 1px solid #333; overflow: hidden; box-shadow: 0 0 8px 1px #333; }\
  2592. #kong_game_ui div#chat_window_header { height: 69px; box-shadow: 0 0 5px #333; position: relative; background-color: #ddd; }\
  2593. #kong_game_ui div#chat_window_header div.room_name_container { border-bottom: 1px solid #aaa; padding: 5px 7px 3px; margin: 0 !important; background-color: #e6e6e6; font-family: \"Trebuchet MS\", Helvetica, sans-serif }\
  2594. #kong_game_ui div#chat_window_header div.room_name_container .room_name { font-family: \"Trebuchet MS\", Helvetica, sans-serif; color: #333; text-shadow: 0 0 3px #ccc; }\
  2595. #kong_game_ui div#chat_window_header div.room_name_container #alliance_number { display: none; }\
  2596. #kong_game_ui div#chat_window_header div.room_name_container.alliance #alliance_number { display: inline; }\
  2597. #kong_game_ui div#chat_window_header div.room_name_container.alliance .number_in_room { display: none; }\
  2598. #kong_game_ui div.chat_actions_container span.kong_ico { font-size: 12px !important; }\
  2599. #kong_game_ui div.chat_actions_container ul.chat_actions_list { right: -1px; padding: 4px 0; border-radius: 5px 0 0 5px; top: 22px; border-color: #777; box-shadow: 0 0 8px #999; min-width: 122px; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 11px; }\
  2600. #kong_game_ui div.chat_actions_container ul.chat_actions_list li { line-height: 20px; padding: 0 10px; border-width: 1px 0; border-color: #fff; border-style: solid; transition: box-shadow .5s;}\
  2601. #kong_game_ui .chat_actions_container .chat_actions_list li:hover { background-color: #f0f0f0; border-color: #bbb; color: #333; box-shadow: 0 0 4px #ddd; position: relative; }\
  2602. #kong_game_ui div.chat_actions_container span.btn_tools { height: 16px; line-height: initial !important; width: 20px; margin: 2px 3px; } \
  2603. #kong_game_ui div#chat_window_header div.dotdx_chat_overlay { border-top: 1px solid #bbb; overflow: hidden; white-space: nowrap; } \
  2604. #kong_game_ui div.chat_actions_container select { width: 92px; margin-top: 2px; font-family: \"Trebuchet MS\",Helvetica,sans-serif; font-style: italic; outline: none; background-color: #ddd; margin-right: 2px; } \
  2605. #kong_game_ui div#chat_room_tabs div a, #kong_game_ui div#alliance_tab a { margin: 0; background: none; text-decoration: none; font-family: \"Trebuchet MS\",Helvetica,sans-serif; font-size: 11px; font-style: italic; transition: text-shadow .2s; border-right: 1px solid #aaa; } \
  2606. #kong_game_ui div#chat_rooms_container div.chat_tabpane.users_in_room, #kong_game_ui div#chat_rooms_container div#alliance_users { height: 89px; border: 1px solid #999; border-width: 1px 0; border-bottom-color: #888; box-shadow: inset 0 -2px 6px -4px #444; overflow: auto; padding: 2px } \
  2607. #kong_game_ui div#alliance_tab { position: relative; top: 3px; height: 0; }\
  2608. #kong_game_ui div#alliance_room { display: none; }\
  2609. #kong_game_ui div#alliance_room.active { display: block; }\
  2610. #kong_game_ui div#alliance_users > div { font-size: 11px; cursor: pointer; } \
  2611. #kong_game_ui div#alliance_users > div > span { display: inline-block; margin: 1px 2px; }\
  2612. #kong_game_ui div#alliance_users > div > span:nth-child(1) { border: 1px solid #303030; padding: 0 5px 0 4px; font-weight: bold; font-size: 10px; border-radius: 0 7px 7px 0; color: #FFF; }\
  2613. #kong_game_ui div#alliance_users > div > span:nth-child(2) { margin-left: 5px; }\
  2614. #kong_game_ui div#alliance_users > div > span:nth-child(3) { font-style: italic; }\
  2615. #kong_game_ui div#chat_raids_overlay { display:none; position: absolute; overflow: hidden; bottom: 492px; left: 3px; background-color: #e0e0e0; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 11px; border-width: 1px; border-style: solid; border-radius: 2px;}\
  2616. #kong_game_ui div#chat_raids_overlay.active { display: block } \
  2617. #kong_game_ui div#chat_raids_overlay > span { display: block; margin: 0 auto }\
  2618. #kong_game_ui div.chat_controls {border-top: 1px solid #000; position: relative; }\
  2619. #kong_game_ui div#lots_tab_pane ul { margin: 0px; padding: 0px; list-style-type: none; position: relative;} \
  2620. #kong_game_ui div#lots_tab_pane ul li.tab { float: left; height: 100%; } \
  2621. #kong_game_ui div#lots_tab_pane ul li.tab div.tab_head { font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 11px; font-style: italic; cursor: pointer; border-right: 1px solid #aaa; transition: text-shadow .2s} \
  2622. #kong_game_ui div#lots_tab_pane ul li.tab div.tab_pane { display: none; border-top: 1px solid #888; width: 282px; height: 600px; padding-top: 2px;} \
  2623. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_head { cursor: default; }\
  2624. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane { position: absolute; display: block; left: 0px; }\
  2625. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list, \
  2626. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #paste_list {overflow-y: auto; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; height: 449px; border-top: 1px solid #aaa; box-shadow: 0 0 3px #ccc; background: -webkit-linear-gradient(left, #fff, #eee); background: -moz-linear-gradient(left, #fff, #eee);} \
  2627. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list .raid_list_item {cursor: pointer; position: relative; border-width: 1px 0; border-style: solid; border-top-color: transparent; border-bottom-color: #ddd;} \
  2628. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list .raid_list_item.hidden {display:none;} \
  2629. a.FPXImportLink, a.FPXDeleteLink { font: normal 10px Arial; border: 1px solid #c0c0c0; color:black; text-decoration:none; cursor:pointer; font-variant: small-caps; display: block; width: 40px; text-align: center; margin-right: 2px; background-color: #fff} \
  2630. a.dotdxRaidListDelete { font: 10px \"Trebuchet MS\"; text-decoration: none; cursor: pointer; margin-right: 2px; float:right; display: inline} \
  2631. a.DotDX_RaidLink {text-decoration:none; overflow: hidden; max-width: 135px; white-space: nowrap; text-overflow: ellipsis; display: inline-block; } \
  2632. div.DotDX_ListPanel {border-top: 1px dashed #999; margin-top: 2px; padding-top: 2px; }\
  2633. div.DotDX_ListPanel > span.raidListContent {font-style: italic} \
  2634. #kong_game_ui p.user_count.full { color: crimson; } \
  2635. #kong_game_ui div#lots_tab_pane a.pastebinlink {font: normal 11px Verdana; color:#333; text-decoration:none; cursor:pointer;} \
  2636. #kong_game_ui div#lots_tab_pane a.pastebinlink:hover { text-decoration: underline; color: black } \
  2637. #kong_game_ui div#lots_tab_pane span.pasteright, #kong_game_ui div#lots_tab_pane span.pasteleft {font: normal 11px Verdana; color: #333} \
  2638. #kong_game_ui div#lots_tab_pane span.pasteright {float:right; padding-right: 6px} \
  2639. #kong_game_ui div#lots_tab_pane span.pasteleft {float:left} \
  2640. #kong_game_ui div.chat_message_window { position: relative; margin: 0; } \
  2641. #kong_game_ui div.chat_message_window p {border-width: 1px 0; border-style: solid; margin: 0; overflow:auto;} \
  2642. #kong_game_ui div.chat_message_window p.DotDX_raid, #kong_game_ui div.chat_message_window p.whisper, #kong_game_ui div.chat_message_window p.script { border-top-color: #e5e5e5; }\
  2643. #raid_list .raid_list_item.DotDX_N:hover {border-bottom-color: rgb(138, 179, 137); background: -webkit-linear-gradient(top,#CBE7C4,#F3FAF2); background: -moz-linear-gradient(top,#CBE7C4,#F3FAF2);} \
  2644. #raid_list .raid_list_item.DotDX_H:hover {border-bottom-color: rgb(173, 173, 104); background: -webkit-linear-gradient(top,#F7F0C8,#FCFBF8); background: -moz-linear-gradient(top,#F7F0C8,#FCFBF8);} \
  2645. #raid_list .raid_list_item.DotDX_L:hover {border-bottom-color: rgb(177, 135, 128); background: -webkit-linear-gradient(top,#F3D7D1,#FCF7F7); background: -moz-linear-gradient(top,#F3D7D1,#FCF7F7);} \
  2646. #raid_list .raid_list_item.DotDX_NM:hover {border-bottom-color: rgb(169, 154, 187); background: -webkit-linear-gradient(top,#DDD4E2,#F4F0F7); background: -moz-linear-gradient(top,#DDD4E2,#F4F0F7);} \
  2647. #kong_game_ui div.chat_message_window div.cntrNotify {border-width: 0px 0px 1px; border-style: solid;}\
  2648. #kong_game_ui div.chat_message_window p.whisper {margin:0; border-bottom-color: #A1B4BE; background: -webkit-linear-gradient(top,#DCE8F1,#EFF4F7); background: -moz-linear-gradient(top,#DCE8F1,#EFF4F7); } \
  2649. #kong_game_ui div.chat_message_window p.script {border-bottom-color: rgb(165, 165, 165); background: -webkit-linear-gradient(left,#f3f3f3,#fff); background: -moz-linear-gradient(left,#f3f3f3,#fff);} \
  2650. #kong_game_ui div.chat_message_window p.script hr { height: 1px; border: 0; background: #ccc; margin: 4px 0 3px; }\
  2651. #kong_game_ui div.chat_message_window p.script span { font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 11px} \
  2652. #kong_game_ui div.chat_message_window p.script span .title { text-decoration: none; font-size: 12px; font-weight: bold; color: #222 } \
  2653. #kong_game_ui div.chat_message_window p.script span.bold {font-weight: bold}\
  2654. #kong_game_ui div.chat_message_window p span.separator { margin-right: 0px; display:inline; float: none} \
  2655. #kong_game_ui div.chat_message_window p span.username { color: rgb(39, 101, 148); text-decoration: none; cursor: pointer; display:inline; float: none } \
  2656. #kong_game_ui div.chat_message_window p span.username.ign { color: rgb(38, 116, 34); }\
  2657. #kong_game_ui div.chat_message_window p span.username.is_self { color: rgb(151, 49, 49); }\
  2658. #kong_game_ui div.chat_message_window p span.username:hover { text-decoration: underline } \
  2659. #kong_game_ui div.chat_message_window p span.timestamp { font: inherit; text-transform: none; display: inline; font-style: italic; font-size: 9px; color: #666;} \
  2660. #kong_game_ui div.chat_message_window p span.ingamename {font-style: italic; font-size: 11px; color: #666;} \
  2661. #kong_game_ui div.chat_message_window p span.message {line-height: 16px; word-wrap: break-word; display:inline; float: none} \
  2662. #kong_game_ui div.chat_message_window p span.message > img { max-width: 100%; max-height: 250px; margin: 2px auto; display: block; cursor: pointer; } \
  2663. #kong_game_ui div.chat_message_window p span.message > embed {width: 100%; height: auto; margin: 2px 0; display: block;} \
  2664. #kong_game_ui div.chat_message_window p span.message > audio, \
  2665. #kong_game_ui div.chat_message_window p span.message > video {width: 100%; display: block; margin: 2px 0;}\
  2666. #kong_game_ui div.chat_message_window p span.message a { text-decoration: none; color: #444; font-style: normal } \
  2667. #kong_game_ui div.chat_message_window p span.message a:hover { color: #000; text-shadow: 0 0 6px #888; } \
  2668. #kong_game_ui div.chat_message_window p span.message a.chat_link:hover { text-shadow: 0 0 4px #F5C68A; text-decoration: none; } \
  2669. #kong_game_ui div.chat_message_window p span.message a.chat_link { color: #946A3D; } \
  2670. #kong_game_ui div.chat_message_window p span.message a.reply_link {font-style: italic} \
  2671. #kong_game_ui div.chat_message_window p > span.slider {position: absolute; display: inline-block; border: 1px solid #777; border-left: 0; height: 24px; left: -2px; margin-top: -5px; border-radius: 0 5px 5px 0; background: #eee; box-shadow: 0 0 7px #777; transition: max-width .3s; overflow: hidden; white-space: nowrap;}\
  2672. #kong_game_ui div.chat_message_window p > span.slider > span.magic, div.raid_list_item span.DotDX_extMagics > span { background-image: url('http://mutik.erley.org/img/16.png?"+(new Date().getTime())+"'); background-position-y: 0; width: 16px; display: inline-block; height: 16px; margin-right: 2px; margin-top: 4px }\
  2673. div.raid_list_item span.DotDX_extMagics > span {margin-top: 0; vertical-align: text-top; margin-right: 1px; } \
  2674. div.raid_list_item span.DotDX_extMagics {float:right}\
  2675. #kong_game_ui div.chat_message_window p > span.slider > span.magic:first-child { margin-left: 5px; } \
  2676. #kong_game_ui div.chat_message_window p > span.slider > span.magic:last-child { margin-right: 5px; } \
  2677. #kong_game_ui div.chat_message_window p > span.slider > span.user { display: inline-block; height: 16px; margin-left: 5px; margin-top: 4px; vertical-align: text-top; font-style: italic; cursor: pointer}\
  2678. #kong_game_ui div.chat_message_window p > span.slider > span.user:first-child { text-overflow: ellipsis; max-width: 80px; white-space: nowrap; overflow: hidden; padding: 0 3px; font-style: normal; }\
  2679. #kong_game_ui div.chat_message_window p > span.slider > span.user:last-child { margin-right: 10px; } \
  2680. #kong_game_ui div.chat_message_window p > span.slider > span.user:hover { text-shadow: 0 0 6px #888; } \
  2681. #kong_game_ui div.chat_message_window p.emote {font-style: italic; color: #085088; text-align: center;} \
  2682. #kong_game_ui div.chat_message_window p.emote span.username, #kong_game_ui div.chat_message_window p.emote span.separator { display: none; } \
  2683. #kong_game_ui div.chat_message_window p span.room { color: #666; font-size: 9px;} \
  2684. #kong_game_ui div.chat_message_window div.error_msg { background-color: #FFF8E0; margin: 0; padding: 3px 5px; border-bottom: 1px solid #ddd; font-size: 9px; color: #555; } \
  2685. #kong_game_ui .chatOverlayMain {border-style: solid; border-color: #C2A71C; border-width: 1px 0; font-family: \"Trebuchet MS\", Helvetica, sans-serif; color: #fff; font-size: 11px; font-weight: normal; text-align: right} \
  2686. #kong_game_ui .chatOverlayMain > span {padding: 3px 10px; cursor: pointer;} \
  2687. #kong_game_ui .chatOverlayMain > span:hover {background-color: #C2A71C; font-style: italic; color: #555}\
  2688. #kong_game_ui textarea.chat_input { height: 30px !important; margin: 0 !important; outline: none; padding: 4px 6px 4px } \
  2689. #kong_game_ui div.dotdx_chat_buttons { position: relative; width: 100%; padding: " + (SRDotDX.isFirefox ? "0 0 1px" : "1px 0 0") + "; background-color: #eaeaea; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 11px; font-style: italic; color: #444; box-shadow: 0 0 6px -2px #333; border-width: 1px 0; border-style: solid; border-color: #888; background: -webkit-linear-gradient(top,#ddd,#f0f0f0); background: -moz-linear-gradient(top,#ddd,#f0f0f0);}\
  2690. #kong_game_ui div.dotdx_chat_buttons > span { display: inline-block; padding: 3px 7px; cursor: pointer; transition: text-shadow .2s; }\
  2691. #kong_game_ui input.dotdx_chat_filter { border: 1px solid #ccc; padding: 0 4px; display: inline-block; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 11px; font-style: italic; color: #333; width: 110px; background-color: #f7f7f7; outline: none; }\
  2692. #kong_game_ui input.dotdx_chat_filter:focus { background-color: #fff }\
  2693. div.dotdx_chat_buttons > span.active { text-shadow: 0 0 4px #aaa }\
  2694. div.dotdx_chat_buttons > span:hover { text-shadow: 0 0 4px #888 }\
  2695. div.tab_pane p.collapsingCategory { border: 1px solid #999; border-width: 1px 0; margin: 5px 0 0; cursor: pointer; background-color: #ddd; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; padding: 2px 6px 1px; padding-right: 10px; box-shadow: 0 0 4px #ccc; background: -webkit-linear-gradient(top, #ccc, #eee); background: -moz-linear-gradient(top, #ccc, #eee); transition: all .3s; } \
  2696. div.tab_pane p.collapsingCategory:hover { background: -webkit-linear-gradient(top, #ccc, #ddd); background: -moz-linear-gradient(top, #ccc, #ddd); box-shadow: 0 0 4px #bbb;}\
  2697. div.tab_pane div.collapsingField { padding-top: 3px; }\
  2698. xxx {display:block !important}\
  2699. span.DotDX_RaidListVisited {padding: 0 3px; vertical-align: text-bottom} \
  2700. span.DotDX_List_diff {display: inline-block; width: 20px; font-weight: bold; padding-left: 2px; vertical-align: text-bottom} \
  2701. span.DotDX_List_diff.DotDX_N {color: #00BB00;} \
  2702. span.DotDX_List_diff.DotDX_H {color: #DDAA00;} \
  2703. span.DotDX_List_diff.DotDX_L {color: #FF0000;} \
  2704. span.DotDX_List_diff.DotDX_NM {color: #BB00BB;} \
  2705. div.tab_pane input, div.tab_pane select {border: 1px solid #ccc; padding: 1px} \
  2706. div.tab_pane input {height: 14px;} \
  2707. div.tab_pane select {height: 18px} \
  2708. div.tab_pane input[type=\"button\"] {height: 26px; padding: 0 3px; color: #444; border: 1px solid #bbb; background-color: #f7f7f7; outline: none; box-shadow: 0 0 3px #ddd; background: -webkit-linear-gradient(top, #eee, #fff); background: -moz-linear-gradient(top, #eee, #fff); font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 11px; border-radius: 2px; transition: all .3s} \
  2709. div.tab_pane input[type=\"button\"].generic:hover {background: -webkit-linear-gradient(top, #fff, #ccc); background: -moz-linear-gradient(top, #fff, #ccc); box-shadow: 0 0 5px #bbb; text-shadow: 0 0 3px #bbb;}\
  2710. div.tab_pane input[type=\"button\"].green:hover {background: -webkit-linear-gradient(top, #fff, #b9daaf); background: -moz-linear-gradient(top, #fff, #b9daaf); box-shadow: 0 0 5px #a7ca9c; text-shadow: 0 0 3px #bbb;}\
  2711. div.tab_pane input[type=\"button\"].blue:hover {background: -webkit-linear-gradient(top, #fff, #a4c8ee); background: -moz-linear-gradient(top, #fff, #a4c8ee); box-shadow: 0 0 5px #a9d3ff; text-shadow: 0 0 3px #bbb;}\
  2712. div.tab_pane input[type=\"button\"].red:hover,\
  2713. div.tab_pane input[type=\"button\"][value=\"Cancel\"]:hover {background: -webkit-linear-gradient(top, #fff, #f0a4a4); background: -moz-linear-gradient(top, #fff, #f0a4a4); box-shadow: 0 0 5px #ffbaba; text-shadow: 0 0 3px #bbb;}\
  2714. div.tab_pane input.landpmbutton { height: 20px; width: 22px; } \
  2715. div.tab_pane input.landpmbuttonhigh { height: 20px; width: 22px; background-color: #82BA00; background: -webkit-linear-gradient(top,#8DC98D,#fff); background: -moz-linear-gradient(top,#8DC98D,#fff); } \
  2716. div.tab_pane input.landtxtfield { padding: 2px 0; width: 50px; text-align: center} \
  2717. div.tab_pane input.landtxtfieldc { padding: 2px 0; width: 100%; text-align: center } \
  2718. div.tab_pane td.landname { padding-top: 3px} \
  2719. div.tab_pane input.landsavebutton { height: 20px; width:100% } \
  2720. table.raids, table.camps { font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 10px; text-align: center; border-collapse: collapse; margin: 5px auto } \
  2721. table.raids td { border: 1px solid #bbb; width: 55px; background-color: #fff; }\
  2722. table.camps td { border: 1px solid #bbb; width: 20px; background-color: #fff; }\
  2723. table.raids td.ep, table.camps td.ep { text-align: right; width: auto; padding: 0 6px; } \
  2724. table.raids th, table.camps th { border: 1px solid #bbb; background-color: #efefef; } \
  2725. table.raids tr.head, table.camps tr.head { background-color: #fafafa; } \
  2726. table.raids tr.split td, table.camps th { border-bottom-width: 2px; } \
  2727. table.raids tr.best td, table.camps td.mark { background-color: #eff4f9; } \
  2728. table.camps .tb {border-right-width: 2px} \
  2729. table.raids colgroup col.selected { border: 2px solid #5f9ea0; }\
  2730. ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"] {display: none}\
  2731. ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"] + label {font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; cursor: pointer;}\
  2732. ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"] + label:before { content:\"\"; display:inline-block; width:18px; height:14px; position: relative; top: 3px; }\
  2733. ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"].generic + label:before { margin-left: 6px }\
  2734. ul#SRDotDX_tabpane_tabs input[type=\"radio\"] {display: none}\
  2735. ul#SRDotDX_tabpane_tabs input[type=\"radio\"] + label {font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; cursor: pointer;}\
  2736. ul#SRDotDX_tabpane_tabs input[type=\"radio\"] + label:before { content:\"\"; display:inline-block; width:16px; height:13px; position: relative; top: 2px; }\
  2737. ul#SRDotDX_tabpane_tabs input[type=\"radio\"].generic + label:before { margin-left: 5px }\
  2738. ul#SRDotDX_tabpane_tabs input[type=\"text\"].generic { border: 1px dashed transparent; border-bottom-color: #bbb; padding: 0 1px; background-color: transparent; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; color: #333; outline: none; height: 15px; text-align: center; }\
  2739. ul#SRDotDX_tabpane_tabs input[type=\"text\"].generic:hover { border-style: solid; }\
  2740. ul#SRDotDX_tabpane_tabs input[type=\"text\"].generic:focus {border-style: solid; border-color: #ccc; background: -webkit-linear-gradient(top,#eee,#fff); background: -moz-linear-gradient(top,#eee,#fff);}\
  2741. ul#SRDotDX_tabpane_tabs input[type=\"text\"][disabled].generic { color: #aaa; }\
  2742. ul#SRDotDX_tabpane_tabs input[type=\"text\"].color {float: right; margin-right: 6px; width: 40px;}\
  2743. input#raidsBossFilter {width: 260px; box-shadow: 0 0 4px -1px #aaa; outline: none; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; padding: 3px 5px; background: -webkit-linear-gradient(top, #fff, #d1dfee); background: -moz-linear-gradient(top, #fff, #d1dfee); border-color: #aaa; margin: 4px auto; display: block; border-radius: 2px;}\
  2744. input#raidsBossFilter:hover, input#raidsBossFilter:focus {background: -webkit-linear-gradient(top, #DFE8F1, #fff); background: -moz-linear-gradient(top, #DFE8F1, #fff);}\
  2745. textarea#DotDX_raidsToSpam, textarea#options_sbConfig { border: 1px solid #aaa; width: 254px; margin-left: 6px; margin-top: 5px; margin-bottom: 4px; padding: 3px 7px; resize: none; outline: none; font-size: 10px; font-style: italic; }\
  2746. #kong_game_ui div#dotdx_status_div {font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-style: italic; font-size: 11px; margin: 0; border-bottom: 1px solid #aaa; }\
  2747. #kong_game_ui div#helpBox { padding: 0; position: absolute; bottom: 8px; overflow: hidden; width: 282px; transition: max-height .5s; border-top-width: 0; border-top-style: solid; font-family: \"Trebuchet MS\",Helvetica,sans-serif; font-size: 12px; font-style: italic;}\
  2748. #kong_game_ui div#helpBox > span {display: inline-block; padding: 11px 8px 9px;}\
  2749. #kong_game_ui span.generic { display: inline-block; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; }\
  2750. #kong_game_ui span.notice { display: inline-block; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 10px; font-style: italic; margin: 3px 6px; }\
  2751. #kong_game_ui div#dotdx_usercontext { display: none; position: absolute; background-color: #eee; border: 1px solid #888; display: none; box-shadow: 0 0 8px #888; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; background: -webkit-linear-gradient(top,#e7e7e7,#fff); background: -moz-linear-gradient(top,#e7e7e7,#fff); cursor: pointer;}\
  2752. #kong_game_ui div#dotdx_usercontext span { display: inline-block; padding: 3px 6px 2px }\
  2753. #kong_game_ui div#dotdx_usercontext span:hover { text-shadow: 0 0 3px #aaa; }\
  2754. #kong_game_ui td {vertical-align: middle}\
  2755. div#FPXfsOptions span.generic {float:left; clear:both}\
  2756. div#FPXfsOptions span.share { font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 10px; margin-right: 10px; margin-right: 5px; display: inline-block; padding-top: 3px; }\
  2757. div#FPXfsOptions label { margin-right: 3px; }\
  2758. div#dotdx_sidebar_container { margin-top: 0; padding-top: 5px; overflow: hidden; }\
  2759. div#dotdx_sidebar_container > button {width: 60px; border: 1px solid #555; margin-bottom: 5px; font-size: 11px; font-family: \"Trebuchet MS\", Helvetica, sans-serif; height: 21px; transition-property: box-shadow, text-shadow, border-color, background; transition-duration: .5s; outline: none; position: relative; z-index: 9;}\
  2760. div#dotdx_sidebar_container > button:hover { position: relative; z-index: 40;}\
  2761. div#dotdx_sidebar_container > div.label { text-align: center; color: #fff; padding-top: 7px; height: 19px; text-shadow: 0 0 6px #fff; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; }\
  2762. div#dotdx_sidebar_container > div { width: 60px; height: 26px }\
  2763. div#dotdx_sidebar_container > input[type=\"text\"] { border: 1px solid #555; margin-bottom: 5px; display: inline-block; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 11px; font-style: italic; width: 46px; outline: none; height: 13px; text-align: center; position:absolute; z-index:3; padding: 3px 6px; transition: width .5s; }\
  2764. div#dotdx_sidebar_container > input[type=\"text\"].slim {width: 16px}\
  2765. div#dotdx_sidebar_container > input[type=\"text\"]:hover, div#dotdx_sidebar_container > input[type=\"text\"]:focus { width:250px; text-align: left; }\
  2766. div#dotdx_sidebar_container > div#serverButton {cursor: pointer; border-width: 1px; border-style: solid; text-align: center; height: auto; width: 58px; padding: 4px 0px; margin-bottom: 7px; transition: all .5s ease 0s;}\
  2767. div#dotdx_sidebar_container > div#serverButton:hover {border-radius: 5px;} \
  2768. div#dotdx_sidebar_container > button.slim, div#dotdx_sidebar_container > div.slim {width: 30px}\
  2769. div#dotdx_sidebar_container.slim {width: 32px}\
  2770. div#dotdx_sidebar_container > div#serverButton.slim {width: 28px}\
  2771. #kong_game_ui div#chat_room_tabs div a, #kong_game_ui div#alliance_tab a, #kong_game_ui div#lots_tab_pane ul li.tab div.tab_head {transition: all .3s;}\
  2772. div.raid_list_item > span.DotDX_extState { display: inline-block; width:27px; padding-top: 2px }\
  2773. div.raid_list_item > span.DotDX_extInfo { float: right; display:inline; margin-right: 5px; color:#c0c0c0; font-size: 11px }\
  2774. div.raid_list_item > br {clear:both}\
  2775. div.raid_list_item > span.DotDX_extInfo.failings {color: #ffda8e}\
  2776. div.raid_list_item > span.DotDX_extInfo.failingm {color: #ff8080}\
  2777. div.raid_list_item > span.DotDX_extInfo.failingh {color: #ff4040}\
  2778. #FPXRaidFilterWhatDiv div.collapsingField {max-height: 322px; overflow-y: auto;}\
  2779. #FPXRaidFilterWhatDiv div.collapsingField > div { margin: 0 5px; }\
  2780. #FPXRaidFilterWhatDiv div.collapsingField > div > div { flex-direction: row; display: flex; align-items: center; height: 18px; } \
  2781. #FPXRaidFilterWhatDiv div.collapsingField > div > div:first-child { font-weight: bold; }\
  2782. #FPXRaidFilterWhatDiv div.collapsingField > div > div:first-child > div:not(:first-child) { font-size: 10px; text-align: center; width: 21px; }\
  2783. #FPXRaidFilterWhatDiv div.collapsingField > div > div:not(first-child) > div:not(:first-child) { width: 20px; flex-shrink: 0; } \
  2784. #FPXRaidFilterWhatDiv div.collapsingField > div > div > div:first-child {text-overflow: ellipsis; white-space: pre; overflow-x: hidden; flex-grow: 1;}\
  2785. #chat_raids_overlay table {margin-top: 2px;}\
  2786. #chat_raids_overlay table td {line-height: 13px;}\
  2787. #chat_raids_overlay table td.best {text-decoration: underline;}\
  2788. #chat_raids_overlay table td:nth-child(odd) {text-align: right; padding-right: 2px; min-width: 18px;}\
  2789. #chat_raids_overlay table td:nth-child(even) {width: 45px;}\
  2790. " + elemPositionFix).attach("to", document.head);
  2791. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_themeClass'}).attach('to', document.head);
  2792. SRDotDX.gui.applyTheme();
  2793. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_tabs'}).attach('to', document.head);
  2794. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_fontClass'}).attach('to', document.head);
  2795. SRDotDX.gui.applyFontSize();
  2796. var link = SRDotDX.c('a').set({href: '#lots_tab_pane', class: ''}).html(SRDotDX.config.dotdxTabName, false).attach('to', SRDotDX.c('li').set({ class: 'tab', id: 'lots_tab' }).attach('after', 'chat_tab').ele()).ele();
  2797. var sbTmp = JSON.stringify(SRDotDX.config.sbConfig);
  2798. sbTmp = sbTmp.slice(1, sbTmp.length - 1).replace(/},/g, "},&#10;").replace(/l,/g, "l,&#10;");
  2799. var pane = SRDotDX.c('div').set({id: 'lots_tab_pane'}).html(' \
  2800. <div id="dotdx_shadow_wrapper">\
  2801. <div id="dotdx_status_div">DotDX: <span id="StatusOutput"></span></div> \
  2802. <div style="height: 617px; overflow: hidden;">\
  2803. <ul id="SRDotDX_tabpane_tabs"> \
  2804. <li class="tab active"> \
  2805. <div class="tab_head" id="raids_tab">Raids</div> \
  2806. <div class="tab_pane" id="mainRaidsFrame"> \
  2807. <div id="topRaidPane"> \
  2808. <div id="FPXRaidFilterDiv" class="collapsible_panel"> \
  2809. <p class="collapsingCategory" id="collapsingCat10" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidFiltering\', this, \'raid_list\')">Filtering<span style="float:right">&minus;</span></p> \
  2810. <div id="FPXRaidFiltering" style="display:block" class="collapsingField"> \
  2811. <input type="text" id="raidsBossFilter" name="FPXRaidBossNameFilter"> \
  2812. <input type="checkbox" id="dotdx_flt_vis"><label for="dotdx_flt_vis" style="margin-right: 9px; margin-left:5px; display: inline-block">Incl visited</label>\
  2813. <input type="checkbox" id="dotdx_flt_full"><label for="dotdx_flt_full" style="margin-right: 9px;">Excl full</label>\
  2814. <input type="checkbox" id="dotdx_flt_all"><label for="dotdx_flt_all">Bypass filters</label>\
  2815. </div> \
  2816. </div> \
  2817. <!-- <div id="FPXRaidSortingDiv" class="collapsible_panel"> \
  2818. <p class="collapsingCategory" id="collapsingCat11" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidSort\', this, \'raid_list\')">Sorting<span style="float:right">+</span></p> \
  2819. <div id="FPXRaidSort" style="display:none"> \
  2820. <table> \
  2821. <tr><td rowspan="2"><input type="button" class="regBtn" style="display:inline; height: 40px" id="SortRaidsButton" onClick="SRDotDX.gui.FPXSortRaids();return false;" value="Sort" onmouseout="SRDotDX.gui.turnNormal(this.id);" onmouseover="SRDotDX.gui.highlightButton(this.id,\'Sort raids based on selected criteria.\');"></td> \
  2822. <td>&nbsp;Sort by: \
  2823. <select style="width: 90px" id="FPXRaidSortSelection" tabIndex="-1"> \
  2824. <option value="Time" selected>TimeStamp</option> \
  2825. <option value="Name">Raid Name</option> \
  2826. <option value="Diff">Difficulty</option> \
  2827. <option value="Id">Raid Id</option> \
  2828. </select> \
  2829. <select style="width: 56px" id="FPXRaidSortDirection" tabIndex="-1"> \
  2830. <option value="asc" selected>Asc</option> \
  2831. <option value="desc">Desc</option> \
  2832. </select></td></tr> \
  2833. <tr><td style="padding: 2px"><input type="checkbox" id="SRDotDX_options_newRaidsAtTopOfRaidList"><div><label>New raids at top of raid list</label></div></td></tr> \
  2834. </table> \
  2835. </div> \
  2836. </div> --> \
  2837. <input style="width: 94px; margin-top: 6px; margin-left: 5px" name="ImportRaids" class="blue" id="ImportRaidsButton" onclick="SRDotDX.request.raids(false,1); return false;" tabIndex="-1" type="button" value="Import" onmouseout="SRDotDX.gui.displayHint();" onmouseover="SRDotDX.gui.displayHint(\'Import raids from server.\');">\
  2838. <input style="width: 55px;" name="DumpRaids" class="generic" id="DumpRaidsButton" onclick="SRDotDX.gui.RaidAction(\'share\');return false;" tabIndex="-1" type="button" value="Share" onmouseout="SRDotDX.gui.displayHint();" onmouseover="SRDotDX.gui.displayHint(\'Copy all displayed raids to the share tab.\');"> \
  2839. <input style="width: 55px;" name="PostRaids" class="generic" id="PostRaidsButton" onclick="SRDotDX.gui.RaidAction(\'post\');return false;" tabIndex="-1" type="button" value="Post" onmouseout="SRDotDX.gui.displayHint();" onmouseover="SRDotDX.gui.displayHint(\'Post all displayed raids to chat.\');"> \
  2840. <input style="width: 55px;" name="DeleteRaids" class="red" id="DeleteRaidsButton" onclick="SRDotDX.gui.RaidAction(\'delete\'); return false;" tabIndex="-1" type="button" value="Delete" onmouseout="SRDotDX.gui.displayHint();" onmouseover="SRDotDX.gui.displayHint(\'Delete displayed raids.\');"><br> \
  2841. <input style="width: 94px; margin-bottom: 7px; margin-left: 5px; margin-top: 4px"name="JoinRaids" class="green" id="AutoJoinVisibleButton" onclick="SRDotDX.gui.joinSelectedRaids(false) ;return false;" tabIndex="-1" type="button" value="Join" onmouseout="SRDotDX.gui.displayHint();" onmouseover="SRDotDX.gui.displayHint(\'Join all displayed (not dead) raids.\'); "> \
  2842. <input style="width: 173px; margin-bottom: 5px; margin-top: 4px" name="ImpJoinRaids" class="green" id="AutoImpJoinVisibleButton" onclick="SRDotDX.request.joinAfterImport = true; SRDotDX.request.raids(false,1);return false;" tabIndex="-1" type="button" value="Import & Join" onmouseout="SRDotDX.gui.displayHint();" onmouseover="SRDotDX.gui.displayHint(\'Import from server and join all selected (not dead) raids.\'); "> \
  2843. </div> \
  2844. <div style="" id="raid_list" tabIndex="-1"></div> \
  2845. </div> \
  2846. </li> \
  2847. <li class="tab"> \
  2848. <div class="tab_head">Opts</div> \
  2849. <div class="tab_pane"> \
  2850. <div id="FPXRaidOptionsDiv" class="collapsible_panel"> \
  2851. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat20" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidOptions\', this)">Raid Options<span style="float:right">+</span></p> \
  2852. <div id="FPXRaidOptions" name="dotdxOptsTabs" style="display:none" class="collapsingField"> \
  2853. <input type="checkbox" id="SRDotDX_options_markMyRaidsVisited" class="generic"><label for="SRDotDX_options_markMyRaidsVisited">Mark raids posted by me as visited</label><br> \
  2854. <input type="checkbox" id="SRDotDX_options_confirmWhenDeleting" class="generic"><label for="SRDotDX_options_confirmWhenDeleting">Confirm when manually deleting raids</label><br> \
  2855. <input type="checkbox" id="SRDotDX_options_importFiltered" class="generic"><label for="SRDotDX_options_importFiltered">Add to database filtered raids only</label><br> \
  2856. </div> \
  2857. </div> \
  2858. <div id="FPXChatOptionsDiv" class="collapsible_panel"> \
  2859. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat21" onclick="SRDotDX.gui.toggleDisplay(\'FPXChatOptions\', this)">Chat Options<span style="float:right">+</span></p> \
  2860. <div id="FPXChatOptions" name="dotdxOptsTabs" style="display:none" class="collapsingField"> \
  2861. <input type="checkbox" id="SRDotDX_options_hideRaidLinks" class="generic"><label for="SRDotDX_options_hideRaidLinks">Hide all raid links in chat</label><br> \
  2862. <input type="checkbox" id="SRDotDX_options_hideBotLinks" class="generic"><label for="SRDotDX_options_hideBotLinks">Hide bot raid links in chat</label><br> \
  2863. <input type="checkbox" id="SRDotDX_options_hideVisitedRaids" class="generic"><label for="SRDotDX_options_hideVisitedRaids">Hide visited raids in chat</label><br> \
  2864. <input type="checkbox" id="options_formatChatLinks" class="generic"><label for="options_formatChatLinks">Format all links in chat</label><br> \
  2865. <span class="generic">Chat size:</span>\
  2866. <input type="radio" id="SRDotDX_options_chatSizeNormal" name="chatSize" value="300"/><label for="SRDotDX_options_chatSizeNormal">Normal</label> \
  2867. <input type="radio" id="SRDotDX_options_chatSizePlus25" name="chatSize" value="375" class="generic"/><label for="SRDotDX_options_chatSizePlus25">+25%</label> \
  2868. <input type="radio" id="SRDotDX_options_chatSizePlus50" name="chatSize" value="400" class="generic"/><label for="SRDotDX_options_chatSizePlus50">+50%</label><br> \
  2869. <span class="generic">Font size:</span>\
  2870. <input type="radio" id="SRDotDX_options_fontSizeNormal" name="fontSize" value="0"/><label for="SRDotDX_options_fontSizeNormal">Normal</label> \
  2871. <input type="radio" id="SRDotDX_options_fontSizeSmaller" name="fontSize" value="2" class="generic"/><label for="SRDotDX_options_fontSizeSmaller">Smaller</label> \
  2872. <input type="radio" id="SRDotDX_options_chatSizeBigger" name="fontSize" value="1" class="generic"/><label for="SRDotDX_options_chatSizeBigger">Bigger</label><br> \
  2873. <span class="generic">IGN mode:</span>\
  2874. <input type="radio" id="SRDotDX_options_ignHide" name="ignMode" value="0"/><label for="SRDotDX_options_ignHide">Hide</label> \
  2875. <input type="radio" id="SRDotDX_options_ignReplace" name="ignMode" value="1" class="generic"/><label for="SRDotDX_options_ignReplace">Replace</label> \
  2876. <input type="radio" id="SRDotDX_options_ignAttach" name="ignMode" value="2" class="generic"/><label for="SRDotDX_options_ignAttach">Attach</label><br> \
  2877. <input type="checkbox" id="SRDotDX_options_hideScrollbar" class="generic"><label for="SRDotDX_options_hideScrollbar">Hide scrollbar for chat and user window</label><br> \
  2878. <span class="generic">More info in raid links:</span> \
  2879. <input type="checkbox" id="SRDotDX_options_showFS"><label for="SRDotDX_options_showFS">Show FS</label> \
  2880. <input type="checkbox" id="SRDotDX_options_showAP" class="generic"><label for="SRDotDX_options_showAP">Show AP</label> \
  2881. </div> \
  2882. </div> \
  2883. <div id="FPXAllianceOptionsDiv" class="collapsible_panel"> \
  2884. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat22" onclick="SRDotDX.gui.toggleDisplay(\'FPXAllianceOptions\', this)">Alliance Chat Options<span style="float:right">+</span></p> \
  2885. <div id="FPXAllianceOptions" name="dotdxOptsTabs" style="display:none" class="collapsingField"> \
  2886. <input type="checkbox" id="options_enableAllianceChat" class="generic"><label for="options_enableAllianceChat">Enable Alliance Chat</label><br>\
  2887. <input type="checkbox" id="options_enableExternalServer" class="generic"><label for="options_enableExternalServer">Use external chat server</label><br>\
  2888. <div id="options_allianceExternal">\
  2889. <span class="generic">Server address: </span>\
  2890. <input type="text" class="generic" id="options_allianceServer" style="width:160px; text-align: left; vertical-align: bottom; margin-top: 4px;"><br>\
  2891. </div>\
  2892. <div id="options_allianceInternal">\
  2893. <span class="generic">Channel: </span>\
  2894. <input type="text" class="generic" id="options_allianceChannel" style="width:40px; text-align: right; vertical-align: text-bottom; margin-top: 4px;">\
  2895. <span class="generic">Pass: </span>\
  2896. <input type="text" class="generic" id="options_alliancePass" style="width:105px; text-align: right; vertical-align: text-bottom; margin-top: 4px;"><br>\
  2897. </div>\
  2898. <span class="generic">Chat name: </span>\
  2899. <input type="text" class="generic" id="options_allianceName" style="width:183px; text-align: right; vertical-align: text-bottom; margin-top: 4px;"><br>\
  2900. </div> \
  2901. </div> \
  2902. <div id="FPXIntOptionsDiv" class="collapsible_panel"> \
  2903. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat23" onclick="SRDotDX.gui.toggleDisplay(\'FPXIntOptions\', this)">Interface Options<span style="float:right">+</span></p> \
  2904. <div id="FPXIntOptions" name="dotdxOptsTabs" style="display:none" class="collapsingField"> \
  2905. <input type="checkbox" id="options_hideGameTitle" class="generic"><label for="options_hideGameTitle">Hide titlebar above game window</label><br>\
  2906. <input type="checkbox" id="options_hideGameDetails" class="generic"><label for="options_hideGameDetails">Hide details under game window</label><br>\
  2907. <input type="checkbox" id="options_hideKongForum" class="generic"><label for="options_hideKongForum">Hide forum under game window</label><br>\
  2908. <input type="checkbox" id="options_trueMsgCount" class="generic"><label for="options_trueMsgCount">Display true kong messages count</label><br>\
  2909. <input type="checkbox" id="options_hideGameTab" class="generic"><label for="options_hideGameTab">Hide Game tab</label><br>\
  2910. <input type="checkbox" id="options_hideAccTab" class="generic"><label for="options_hideAccTab">Hide Achievements tab</label><br>\
  2911. <input type="checkbox" id="options_clearRMB" class="generic"><label for="options_clearRMB">Use RMB to clear chat input field</label><br>\
  2912. <span class="generic">Script tab name</span><input type="text" class="generic color" id="options_dotdxTabName"><br> \
  2913. <span class="generic">Background color</span><input type="text" class="generic color" id="SRDotDX_colors_background"><br> \
  2914. <span class="generic">Theme:</span>\
  2915. <input type="radio" id="theme_lightGrey" name="chatTheme" value="0"><label for="theme_lightGrey">Light Grey</label>\
  2916. <input type="radio" id="theme_crimsonBlack" name="chatTheme" value="1" class="generic"><label for="theme_crimsonBlack">Crimson Black</label>\
  2917. <span class="generic">World Chat:</span>\
  2918. <input type="checkbox" id="options_wcLeft" class="generic"><label for="options_wcLeft">Show on the left </label><input type="checkbox" id="options_wcRemove" class="generic"><label for="options_wcRemove">Remove</label>\
  2919. </div>\
  2920. </div> \
  2921. <div id="FPXsbOptionsDiv" class="collapsible_panel"> \
  2922. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat24" onclick="SRDotDX.gui.toggleDisplay(\'FPXsbOptions\', this)">Sidebar Options<span style="float:right">+</span></p> \
  2923. <div id="FPXsbOptions" name="dotdxOptsTabs" style="display:none" class="collapsingField"> \
  2924. <input type="checkbox" id="options_sbEnable" class="generic"><label for="options_sbEnable">Enable DotDX Sidebar</label><br>\
  2925. <input type="checkbox" id="options_sbSlim" class="generic"><label for="options_sbSlim">Use slim Sidebar</label><br>\
  2926. <input type="checkbox" id="options_sbRightSide" class="generic"><label for="options_sbRightSide">Show sidebar on the right side of chat</label><br> \
  2927. <textarea wrap="off" id="options_sbConfig" rows="25" style="overflow-y: hidden; overflow-x: scroll; white-space: nowrap">' + sbTmp + '</textarea> \
  2928. <input id="dotdx_sbConfigSave" style="margin: 0 0 2px 6px; width: 156px;" class="blue" type="button" value="Apply new sidebar layout" onclick="SRDotDX.gui.applySidebarUI(0); return false;">\
  2929. <input id="dotdx_sbConfigDefault" style="width: 110px;" class="red" type="button" value="Restore default" onclick="SRDotDX.gui.restoreDefaultSB(); return false;">\
  2930. </div> \
  2931. </div> \
  2932. <div id="FPXfsOptionsDiv" class="collapsible_panel"> \
  2933. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat25" onclick="SRDotDX.gui.toggleDisplay(\'FPXfsOptions\', this)">Friend Share Options<span style="float:right">+</span></p> \
  2934. <div id="FPXfsOptions" name="dotdxOptsTabs" style="display:none; text-align:right" class="collapsingField"> \
  2935. </div> \
  2936. </div> \
  2937. </div> \
  2938. </li> \
  2939. <li class="tab"> \
  2940. <div class="tab_head" id="FPXShareTab">Share</div> \
  2941. <div class="tab_pane"> \
  2942. <div id="FPXRaidSpamDiv"> \
  2943. <div id="FPXShareDiv" class="collapsible_panel"> \
  2944. <p class="collapsingCategory" id="collapsingCat30" onclick="SRDotDX.gui.toggleDisplay(\'FPXShare\', this, \'share_list\')">Share<span style="float:right">+</span></p> \
  2945. <div id="FPXShare" style="display:block" class="collapsingField"> \
  2946. <input type="checkbox" id="SRDotDX_options_formatLinkOutput" class="generic"><label for="SRDotDX_options_formatLinkOutput">Enable formatting of posted raid links</label><br> \
  2947. <span class="generic">Whisper to </span><input type="text" class="generic" id="SRDotDX_options_whisperTo"><br>\
  2948. <span class="notice">(if "whisper to" field is blank, raids will be posted public)</span> \
  2949. <input id="dotdx_share_post_button" style="margin: 3px 0 0 6px; width: 133px" name="Submit" class="generic" type="button" tabIndex="-1" value="Post Links to Chat" onclick="SRDotDX.gui.RaidAction(\'post_share\');return false;"/> \
  2950. <input id="dotdx_friend_post_button" style="width: 133px" name="Submit1" class="green" type="button" tabIndex="-1" value="Friend Share links" onclick="SRDotDX.gui.RaidAction(\'post_friend\');return false;"/><br> \
  2951. </div> \
  2952. </div> \
  2953. <div id="FPXImportDiv" class="collapsible_panel" class="collapsingField"> \
  2954. <p class="collapsingCategory" id="collapsingCat31" onclick="SRDotDX.gui.toggleDisplay(\'FPXImport\', this, \'share_list\')">Import<span style="float:right">+</span></p> \
  2955. <div id="FPXImport" style="display:none" class="collapsingField"> \
  2956. <input type="checkbox" id="SRDotDX_options_markImportedRaidsVisited" class="generic"><label for="SRDotDX_options_markImportedRaidsVisited">Mark imported raids visited</label><br> \
  2957. <input style="margin-left: 6px; margin-top: 6px; width: 133px" name="Submit2" class="blue" type="button" tabIndex="-1" value="Import to Raid Tab" onClick="SRDotDX.gui.FPXimportRaids();return false;"/> \
  2958. <input style="width: 133px" name="Submit3" class="blue" type="button" tabIndex="-1" value="Delete and Import" onClick="SRDotDX.gui.FPXdeleteAllRaids();SRDotDX.gui.FPXimportRaids();return false;"/> \
  2959. </div> \
  2960. </div> \
  2961. </div> \
  2962. <textarea id="DotDX_raidsToSpam" name="FPXRaidSpamInput" style="height:437px;"></textarea> \
  2963. </div> \
  2964. </li> \
  2965. <li class="tab"> \
  2966. <div class="tab_head">Filter</div> \
  2967. <div class="tab_pane"> \
  2968. <div id="FPXRaidFilterDiv"> \
  2969. <div id="FPXRaidFilterWhereDiv"> \
  2970. <p class="collapsingCategory" id="collapsingCat40" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidFilterWhere\', this)">Filtering options<span style="float:right">+</span></p> \
  2971. <div id="FPXRaidFilterWhere" style="display:block" class="collapsingField"> \
  2972. <input type="checkbox" id="SRDotDX_options_perRaidFilterLinks" class="generic"><label for="SRDotDX_options_perRaidFilterLinks">Activate filtering on raid links</label><br> \
  2973. <input type="checkbox" id="SRDotDX_options_perRaidFilterRaidList" class="generic"><label for="SRDotDX_options_perRaidFilterRaidList">Activate filtering on raid list tab</label><br> \
  2974. </div>\
  2975. </div> \
  2976. <div id="FPXRaidFilterWhatDiv"> \
  2977. <div id="FPXRaidTableSmallDiv" class="collapsible_panel"> \
  2978. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat41" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableSmall\', this)">Small Raids<span style="float:right">+</span></p> \
  2979. <div id="FPXRaidTableSmall" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  2980. <div id="FPXRaidFilterWhatSmall"> \
  2981. <!-- Dynamic content --> \
  2982. </div> \
  2983. </div> \
  2984. </div> \
  2985. <div id="FPXRaidTableMediumDiv" class="collapsible_panel"> \
  2986. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat42" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableMedium\', this)">Medium Raids<span style="float:right">+</span></p> \
  2987. <div id="FPXRaidTableMedium" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  2988. <div id="FPXRaidFilterWhatMedium"> \
  2989. <!-- Dynamic content --> \
  2990. </div> \
  2991. </div> \
  2992. </div> \
  2993. <div id="FPXRaidTableLargeDiv" class="collapsible_panel"> \
  2994. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat43" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableLarge\', this)">Large Raids<span style="float:right">+</span></p> \
  2995. <div id="FPXRaidTableLarge" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  2996. <div id="FPXRaidFilterWhatLarge"> \
  2997. <!-- Dynamic content --> \
  2998. </div> \
  2999. </div> \
  3000. </div> \
  3001. <div id="FPXRaidTableEpicDiv" class="collapsible_panel"> \
  3002. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat44" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableEpic\', this)">Epic Raids<span style="float:right">+</span></p> \
  3003. <div id="FPXRaidTableEpic" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  3004. <div id="FPXRaidFilterWhatEpic"> \
  3005. <!-- Dynamic content --> \
  3006. </div> \
  3007. </table> \
  3008. </div> \
  3009. <div id="FPXRaidTableColossalDiv" class="collapsible_panel"> \
  3010. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat45" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableColossal\', this)">Colossal Raids<span style="float:right">+</span></p> \
  3011. <div id="FPXRaidTableColossal" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  3012. <div id="FPXRaidFilterWhatColossal"> \
  3013. <!-- Dynamic content --> \
  3014. </div> \
  3015. </div> \
  3016. </div> \
  3017. <div id="FPXRaidTableGiganticDiv" class="collapsible_panel"> \
  3018. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat46" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableGigantic\', this)">Gigantic Raids<span style="float:right">+</span></p> \
  3019. <div id="FPXRaidTableGigantic" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  3020. <div id="FPXRaidFilterWhatGigantic"> \
  3021. <!-- Dynamic content --> \
  3022. </div> \
  3023. </div> \
  3024. </div> \
  3025. <div id="FPXRaidTableGuildDiv" class="collapsible_panel"> \
  3026. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat47" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableGuild\', this)">Guild Raids<span style="float:right">+</span></p> \
  3027. <div id="FPXRaidTableGuild" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  3028. <div id="FPXRaidFilterWhatGuild"> \
  3029. <!-- Dynamic content --> \
  3030. </div> \
  3031. </div> \
  3032. </div> \
  3033. <div id="FPXRaidTableSpecialDiv" class="collapsible_panel"> \
  3034. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat48" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableSpecial\', this)">World Raids<span style="float:right">+</span></p> \
  3035. <div id="FPXRaidTableSpecial" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  3036. <div id="FPXRaidFilterWhatSpecial"> \
  3037. <!-- Dynamic content --> \
  3038. </div> \
  3039. </div> \
  3040. </div> \
  3041. </div> \
  3042. </div> \
  3043. </div> \
  3044. </li> \
  3045. <li class="tab"> \
  3046. <div class="tab_head">Util</div> \
  3047. <div class="tab_pane"> \
  3048. <div id="FPXLandCalcDiv" class="collapsible_panel"> \
  3049. <p class="collapsingCategory" id="collapsingCat50" onclick="SRDotDX.gui.toggleDisplay(\'FPXLandCalc\', this)">Land Calculator<span style="float:right">+</span></p> \
  3050. <div id="FPXLandCalc" style="display:block" class="collapsingField"> \
  3051. <form id="FPXLand" name="FPXLandForm" onSubmit="return false;" style="padding-bottom:6px"> \
  3052. <table style="margin: 0 auto; padding-right: 10px;"> \
  3053. <tr><td class="landname" colspan="3">Cornfield</td><td style="width: 10px">&nbsp;</td><td class="landname" colspan="3">Stable</td></tr> \
  3054. <tr> \
  3055. <td> <input class="landpmbutton red" id="a_1" name="FPXminusTen_1" type="button" value=" - " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="10"/></td> \
  3056. <td> <input class="generic" maxlength="10" name="tf_1" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="1" /></td> \
  3057. <td> <input class="landpmbutton blue" id="b_1" name="FPXplusTen_1" type="button" value=" + " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="11"/></td> \
  3058. <td></td> \
  3059. <td> <input class="landpmbutton red" id="a_2" name="FPXminusTen_2" type="button" value=" - " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="12"/></td> \
  3060. <td> <input class="generic" maxlength="10" name="tf_2" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="2" /></td> \
  3061. <td> <input class="landpmbutton blue" id="b_2" name="FPXplusTen_2" type="button" value=" + " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="13"/></td> \
  3062. </tr> \
  3063. <tr><td class="landname" colspan="3">Barn</td><td></td><td class="landname" colspan="3">Store</td></tr> \
  3064. <tr> \
  3065. <td> <input class="landpmbutton red" id="a_3" name="FPXminusTen_3" type="button" value=" - " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="14"/></td> \
  3066. <td> <input class="generic" maxlength="10" name="tf_3" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="3" /></td> \
  3067. <td> <input class="landpmbutton blue" id="b_3" name="FPXplusTen_3" type="button" value=" + " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="15"/></td> \
  3068. <td></td> \
  3069. <td> <input class="landpmbutton red" id="a_4" name="FPXminusTen_4" type="button" value=" - " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="16"/></td> \
  3070. <td> <input class="generic" maxlength="10" name="tf_4" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="4" /></td> \
  3071. <td> <input class="landpmbutton blue" id="b_4" name="FPXplusTen_4" type="button" value=" + " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="17"/></td> \
  3072. </tr> \
  3073. <tr><td class="landname" colspan="3">Pub</td><td></td><td class="landname" colspan="3">Inn</td></tr> \
  3074. <tr> \
  3075. <td> <input class="landpmbutton red" id="a_5" name="FPXminusTen_5" type="button" value=" - " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="18"/></td> \
  3076. <td> <input class="generic" maxlength="10" name="tf_5" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="5" /></td> \
  3077. <td> <input class="landpmbutton blue" id="b_5" name="FPXplusTen_5" type="button" value=" + " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="19"/></td> \
  3078. <td></td> \
  3079. <td> <input class="landpmbutton red" id="a_6" name="FPXminusTen_6" type="button" value=" - " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="20"/></td> \
  3080. <td> <input class="generic" maxlength="10" name="tf_6" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="6" /></td> \
  3081. <td> <input class="landpmbutton blue" id="b_6" name="FPXplusTen_6" type="button" value=" + " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="21"/></td> \
  3082. </tr> \
  3083. <tr><td class="landname" colspan="3">Sentry</td><td></td><td class="landname" colspan="3">Fort</td></tr> \
  3084. <tr> \
  3085. <td> <input class="landpmbutton red" id="a_7" name="FPXminusTen_7" type="button" value=" - " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="22"/></td> \
  3086. <td> <input class="generic" maxlength="10" name="tf_7" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="7" /></td> \
  3087. <td> <input class="landpmbutton blue" id="b_7" name="FPXplusTen_7" type="button" value=" + " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="23"/></td> \
  3088. <td></td> \
  3089. <td> <input class="landpmbutton red" id="a_8" name="FPXminusTen_8" type="button" value=" - " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="24"/></td> \
  3090. <td> <input class="generic" maxlength="10" name="tf_8" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="8" /></td> \
  3091. <td> <input class="landpmbutton blue" id="b_8" name="FPXplusTen_8" type="button" value=" + " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="25"/></td> \
  3092. </tr> \
  3093. <tr><td class="landname" colspan="3">Castle</td></tr> \
  3094. <tr> \
  3095. <td> <input class="landpmbutton red" id="a_9" name="FPXminusTen_9" type="button" value=" - " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="26"/></td> \
  3096. <td> <input class="generic" maxlength="10" name="tf_9" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="9" /></td> \
  3097. <td> <input class="landpmbutton blue" id="b_9" name="FPXplusTen_9" type="button" value=" + " onClick="SRDotDX.gui.FPXLandButtonHandler(this, this.name);return false;" tabindex="27"/></td> \
  3098. <td></td> \
  3099. <td colspan="3"> <input class="landsavebutton green" id="lsbutton" type="button" value="Save" onClick="SRDotDX.gui.FPXLandButtonSave();return false;" tabindex="28"/></td> \
  3100. </tr> \
  3101. </table> \
  3102. </form> \
  3103. </div> \
  3104. </div>\
  3105. <div id="WhoPostedMyRaidDiv" class="collapsible_panel"> \
  3106. <p class="collapsingCategory" id="collapsingCat51" onclick="SRDotDX.gui.toggleDisplay(\'WhoPostedMyRaid\', this)">Who posted my raid?<span style="float:right">+</span></p> \
  3107. <div id="WhoPostedMyRaid" style="display:block" class="collapsingField"> \
  3108. <span class="generic" style="margin-top:6px; margin-right: 2px">Raid link or id: </span>\
  3109. <input type="text" class="generic" id="DotDX_checkRaidPoster" style="width:120px">\
  3110. <input class="green" type="button" value="Check" onClick="SRDotDX.request.poster(); return false;" style="height:20px; width:46px"><br>\
  3111. <span class="generic">Raid: </span><span class="generic" id="DotDX_whoPosted_Raid"></span><br> \
  3112. <span class="generic">Time: </span><span class="generic" id="DotDX_whoPosted_Time"></span><br> \
  3113. <span class="generic">Poster: </span><span class="generic" id="DotDX_whoPosted_Poster"></span><br> \
  3114. </div> \
  3115. </div>\
  3116. </div> \
  3117. </li> \
  3118. </ul> \
  3119. </div>\
  3120. <div id="helpBox" style="max-height:0"><span>Help message</span></div> \
  3121. </div>\
  3122. ', false).attach('to', 'kong_game_ui').ele();
  3123. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_colors'}).text(' \
  3124. .DotDX_filter_dummy_0 {display: none !important} \
  3125. ').attach('to', document.head);
  3126.  
  3127. //pane.style.height = document.getElementById('chat_tab_pane').style.height;
  3128. var e = pane.getElementsByClassName('tab_head');
  3129. for(var i = 0, il = e.length; i < il; ++i) {
  3130. e[i].addEventListener('click', function () {
  3131. if (!/\bactive\b/i.test(this.className)) {
  3132. var e = document.getElementById("lots_tab_pane").getElementsByTagName("li");
  3133. for(var i = 0, il = e.length; i < il; ++i) if(e[i].getAttribute("class").indexOf("active") > -1) e[i].className = e[i].className.replace(/ active$/g, "");
  3134. this.parentNode.className += ' active';
  3135. }
  3136. });
  3137. }
  3138. holodeck._tabs.addTab(link);
  3139. SRDotDX.gui.applyTabs();
  3140. //Set up custom chat size
  3141. SRDotDX.gui.hideWC(true);
  3142.  
  3143. //Chat raids overlay div
  3144. SRDotDX.c('div').set({id: 'chat_raids_overlay'}).html('<span id="chat_raids_overlay_text"></span>', true).attach("to", 'chat_tab_pane');
  3145.  
  3146. //Sidebar elements generator
  3147. if (SRDotDX.config.sbEnable) SRDotDX.gui.applySidebarUI(1);
  3148.  
  3149.  
  3150. //spam tab
  3151. var FPXimpSpam = SRDotDX.c('#DotDX_raidsToSpam');
  3152. var FPXSpamText = 'Paste raid links here to share or import\n\nLinks must be comma (,) separated.';
  3153. FPXimpSpam.ele().value = FPXSpamText;
  3154. FPXimpSpam.on('blur', function(){if(this.value === '') this.value = FPXSpamText});
  3155. FPXimpSpam.on('focus', function(){if(this.value === FPXSpamText) this.value = ''});
  3156.  
  3157. //chat global listener
  3158. var chat_window = document.getElementById('chat_rooms_container');
  3159. chat_window.addEventListener('click', SRDotDX.gui.chatWindowMouseDown, true);
  3160. chat_window.addEventListener('contextmenu', SRDotDX.gui.chatWindowContextMenu, false);
  3161.  
  3162. //land tab
  3163. els = document.FPXLandForm;
  3164. for(i = 0; i < 9; ++i) els.elements['tf_' + (i + 1)].value = SRDotDX.config.FPXLandOwnedCount[i];
  3165. SRDotDX.gui.FPXLandUpdater();
  3166.  
  3167. //raid tab
  3168. var raids_tab = document.getElementById('raids_tab');
  3169. raids_tab.addEventListener('click', function () {
  3170. SRDotDX.gui.refreshRaidList();
  3171. }, false);
  3172.  
  3173. var raidBossFilter = SRDotDX.c('#raidsBossFilter');
  3174. raidBossFilter.ele().value = SRDotDX.config.lastFilter[SRDotDX.config.serverMode - 1];
  3175. raidBossFilter.on("keyup", function () {
  3176. SRDotDX.gui.updateFilterTxt(this.value, true);
  3177. });
  3178.  
  3179. var filterIncVis = SRDotDX.c('#dotdx_flt_vis');
  3180. filterIncVis.ele().checked = SRDotDX.config.fltIncVis;
  3181. filterIncVis.on('click', function () {
  3182. SRDotDX.config.fltIncVis = this.checked;
  3183. if(!document.getElementById('dotdx_flt_all').checked) SRDotDX.gui.selectRaidsToJoin('checkbox');
  3184. });
  3185.  
  3186. var filterExclFull = SRDotDX.c('#dotdx_flt_full');
  3187. filterExclFull.ele().checked = SRDotDX.config.fltExclFull;
  3188. filterExclFull.on('click', function () {
  3189. SRDotDX.config.fltExclFull = this.checked;
  3190. if(!document.getElementById('dotdx_flt_all').checked) SRDotDX.gui.selectRaidsToJoin('checkbox');
  3191. });
  3192.  
  3193. var filterShowAll = SRDotDX.c('#dotdx_flt_all');
  3194. filterShowAll.ele().checked = SRDotDX.config.fltShowAll;
  3195. filterShowAll.on('click', function () {
  3196. SRDotDX.config.fltShowAll = this.checked;
  3197. SRDotDX.gui.selectRaidsToJoin('checkbox')
  3198. });
  3199.  
  3200. //raidlist global click listener
  3201. var raid_list = document.getElementById('raid_list');
  3202. raid_list.addEventListener('click', function (e) {
  3203. e.preventDefault();
  3204. e.stopPropagation();
  3205. return false
  3206. }, false);
  3207. raid_list.addEventListener('mousedown', function (e) {
  3208. SRDotDX.gui.FPXraidListMouseDown(e)
  3209. }, false);
  3210.  
  3211. //options tab
  3212. var optsImportFiltered = SRDotDX.c('#SRDotDX_options_importFiltered');
  3213. optsImportFiltered.ele().checked = SRDotDX.config.importFiltered;
  3214. optsImportFiltered.on('click', function () {
  3215. SRDotDX.config.importFiltered = this.checked;
  3216. SRDotDX.config.save(false)
  3217. });
  3218.  
  3219. var optsShowFs = SRDotDX.c('#SRDotDX_options_showFS');
  3220. optsShowFs.ele().checked = SRDotDX.config.linkShowFs;
  3221. optsShowFs.on('click', function () {
  3222. SRDotDX.config.linkShowFs = this.checked;
  3223. SRDotDX.config.save(false)
  3224. });
  3225.  
  3226. var optsShowAp = SRDotDX.c('#SRDotDX_options_showAP');
  3227. optsShowAp.ele().checked = SRDotDX.config.linkShowAp;
  3228. optsShowAp.on('click', function () {
  3229. SRDotDX.config.linkShowAp = this.checked;
  3230. SRDotDX.config.save(false)
  3231. });
  3232.  
  3233. var optsHideARaids = SRDotDX.c('#SRDotDX_options_hideRaidLinks');
  3234. var optsHideBRaids = SRDotDX.c('#SRDotDX_options_hideBotLinks');
  3235. var optsHideVRaids = SRDotDX.c('#SRDotDX_options_hideVisitedRaids');
  3236. var optsConfirmDeletes = SRDotDX.c('#SRDotDX_options_confirmWhenDeleting');
  3237. var optsMarkImportedVisited = SRDotDX.c('#SRDotDX_options_markImportedRaidsVisited');
  3238. var optsWhisperTo = SRDotDX.c('#SRDotDX_options_whisperTo');
  3239. var optsMarkMyRaidsVisited = SRDotDX.c('#SRDotDX_options_markMyRaidsVisited');
  3240. var optsFormatLinkOutput = SRDotDX.c('#SRDotDX_options_formatLinkOutput');
  3241.  
  3242. var optsChatSizeNormal = SRDotDX.c('#SRDotDX_options_chatSizeNormal').on('click', function(){ SRDotDX.gui.chatResize(300) });
  3243. var optsChatSizePlus25 = SRDotDX.c('#SRDotDX_options_chatSizePlus25').on('click', function(){ SRDotDX.gui.chatResize(375) });
  3244. var optsChatSizePlus50 = SRDotDX.c('#SRDotDX_options_chatSizePlus50').on('click', function(){ SRDotDX.gui.chatResize(450) });
  3245. switch (SRDotDX.config.chatSize) {
  3246. case 300: optsChatSizeNormal.ele().checked = true; break;
  3247. case 375: optsChatSizePlus25.ele().checked = true; break;
  3248. case 450: optsChatSizePlus50.ele().checked = true; break;
  3249. default: optsChatSizeNormal.ele().checked = true; break;
  3250. }
  3251.  
  3252. var optsChatFontNormal = SRDotDX.c('#SRDotDX_options_fontSizeNormal').on('click', function(){ SRDotDX.gui.applyFontSize(0) });
  3253. var optsChatFontSmaller = SRDotDX.c('#SRDotDX_options_fontSizeSmaller').on('click', function(){ SRDotDX.gui.applyFontSize(2) });
  3254. var optsChatFontBigger = SRDotDX.c('#SRDotDX_options_chatSizeBigger').on('click', function(){ SRDotDX.gui.applyFontSize(1) });
  3255. switch (SRDotDX.config.fontNum) {
  3256. case 2: optsChatFontSmaller.ele().checked = true; break;
  3257. case 1: optsChatFontBigger.ele().checked = true; break;
  3258. default: optsChatFontNormal.ele().checked = true; break;
  3259. }
  3260.  
  3261. var optsChatHideScrollbar = SRDotDX.c('#SRDotDX_options_hideScrollbar');
  3262. optsChatHideScrollbar.ele().checked = SRDotDX.config.hideScrollBar;
  3263. optsChatHideScrollbar.on('click', function () {
  3264. SRDotDX.config.hideScrollBar = this.checked;
  3265. SRDotDX.config.save(false);
  3266. SRDotDX.gui.chatResize();
  3267. });
  3268.  
  3269. var optsHideKongForum = SRDotDX.c('#options_hideKongForum');
  3270. optsHideKongForum.ele().checked = SRDotDX.config.hideKongForum;
  3271. optsHideKongForum.on('click', function () {
  3272. SRDotDX.config.hideKongForum = this.checked;
  3273. SRDotDX.c('#DotDX_forum').html('div.game_page_wrap {padding-top: 16px; margin-top: 14px !important; background: #333 !important; display: ' + (SRDotDX.config.hideKongForum ? 'none' : 'block') + '}', true)
  3274. });
  3275.  
  3276. var optsHideGameDetails = SRDotDX.c('#options_hideGameDetails');
  3277. optsHideGameDetails.ele().checked = SRDotDX.config.hideGameDetails;
  3278. optsHideGameDetails.on('click', function () {
  3279. SRDotDX.config.hideGameDetails = this.checked;
  3280. SRDotDX.c('#DotDX_details').html('div.game_details_outer {margin-top: 14px !important; width: 900px !important; border: solid 20px #333 !important; display: ' + (SRDotDX.config.hideGameDetails ? 'none' : 'block') + '}', true)
  3281. });
  3282.  
  3283. var optsHideGameTitle = SRDotDX.c('#options_hideGameTitle');
  3284. optsHideGameTitle.ele().checked = SRDotDX.config.hideGameTitle;
  3285. optsHideGameTitle.on('click', function () {
  3286. SRDotDX.config.hideGameTitle = this.checked
  3287. });
  3288.  
  3289. SRDotDX.c('#options_trueMsgCount')
  3290. .on('click', function(){
  3291. SRDotDX.config.kongMsg = this.checked;
  3292. if (this.checked) SRDotDX.gui.setMessagesCount();
  3293. }).ele().checked = SRDotDX.config.kongMsg;
  3294.  
  3295. if (SRDotDX.config.kongMsg) SRDotDX.gui.setMessagesCount();
  3296.  
  3297. SRDotDX.c('#options_hideGameTab')
  3298. .on('click', function(){ SRDotDX.config.hideGameTab = this.checked; SRDotDX.gui.applyTabs() })
  3299. .ele().checked = SRDotDX.config.hideGameTab;
  3300.  
  3301. SRDotDX.c('#options_hideAccTab')
  3302. .on('click', function(){ SRDotDX.config.hideAccTab = this.checked; SRDotDX.gui.applyTabs() })
  3303. .ele().checked = SRDotDX.config.hideAccTab;
  3304.  
  3305. SRDotDX.c('#options_dotdxTabName')
  3306. .on('keyup', function(){ SRDotDX.config.dotdxTabName = this.value; SRDotDX.gui.applyTabs() })
  3307. .ele().value = SRDotDX.config.dotdxTabName;
  3308.  
  3309. SRDotDX.c('#options_formatChatLinks')
  3310. .on('click', function(){ SRDotDX.config.formatLinks = this.checked })
  3311. .ele().checked = SRDotDX.config.formatLinks;
  3312.  
  3313. SRDotDX.c('#options_allianceExternal')
  3314. .set({style: 'display: ' + (SRDotDX.config.allianceIsExternal?'block':'none')});
  3315.  
  3316. SRDotDX.c('#options_allianceInternal')
  3317. .set({style: 'display: ' + (!SRDotDX.config.allianceIsExternal?'block':'none')});
  3318.  
  3319. SRDotDX.c('#options_enableExternalServer')
  3320. .on('click', function(){
  3321. SRDotDX.config.allianceIsExternal = this.checked;
  3322. SRDotDX.c('#options_allianceExternal').set({style: 'display: ' + (this.checked?'block':'none')});
  3323. SRDotDX.c('#options_allianceInternal').set({style: 'display: ' + (!this.checked?'block':'none')});
  3324. }).ele().checked = SRDotDX.config.allianceIsExternal;
  3325.  
  3326. SRDotDX.c('#options_allianceServer')
  3327. .on('keyup', function(){ SRDotDX.config.allianceServer = this.value })
  3328. .ele().value = SRDotDX.config.allianceServer;
  3329.  
  3330. SRDotDX.c('#options_allianceChannel')
  3331. .on('keyup', function(){ SRDotDX.config.allianceChannel = this.value })
  3332. .ele().value = SRDotDX.config.allianceChannel;
  3333.  
  3334. SRDotDX.c('#options_alliancePass')
  3335. .on('keyup', function(){ SRDotDX.config.alliancePass = this.value })
  3336. .ele().value = SRDotDX.config.alliancePass;
  3337.  
  3338. SRDotDX.c('#options_allianceName')
  3339. .on('keyup', function(){
  3340. SRDotDX.config.allianceName = this.value;
  3341. if (SRDotDX.alliance.isActive) document.getElementsByClassName('room_name_container')[0].children[0].innerHTML = this.value;
  3342. }).ele().value = SRDotDX.config.allianceName;
  3343.  
  3344. SRDotDX.c('#options_enableAllianceChat')
  3345. .on('click', function(){
  3346. if (SRDotDX.config.allianceIsExternal) {
  3347. SRDotDX.config.allianceServer = SRDotDX.config.allianceServer.trim().replace(/\/$/,'').toLowerCase();
  3348. SRDotDX.c('#options_allianceServer').ele().value = SRDotDX.config.allianceServer;
  3349. if (/^https?:\/\/.+?:\d{2,5}$/.test(SRDotDX.config.allianceServer)) {
  3350. SRDotDX.config.allianceChat = this.checked;
  3351. if (this.checked) SRDotDX.alliance.createRoom();
  3352. else SRDotDX.alliance.destroyChat();
  3353. }
  3354. else this.checked = false;
  3355. }
  3356. else {
  3357. if (SRDotDX.config.allianceChannel && SRDotDX.config.alliancePass) {
  3358. SRDotDX.config.allianceChat = this.checked;
  3359. if (this.checked) SRDotDX.alliance.createRoom();
  3360. else SRDotDX.alliance.destroyChat();
  3361. }
  3362. else this.checked = false;
  3363. }
  3364. }).ele().checked = SRDotDX.config.allianceChat;
  3365.  
  3366. var optsClearRMB = SRDotDX.c('#options_clearRMB');
  3367. optsClearRMB.ele().checked = SRDotDX.config.clearRMB;
  3368. optsClearRMB.on('click', function (){SRDotDX.config.clearRMB = this.checked;});
  3369.  
  3370. var optsChatIgnHide = SRDotDX.c('#SRDotDX_options_ignHide');
  3371. optsChatIgnHide.on('click', function(){SRDotDX.config.ignMode = 0});
  3372. var optsChatIgnReplace = SRDotDX.c('#SRDotDX_options_ignReplace');
  3373. optsChatIgnReplace.on('click', function(){SRDotDX.config.ignMode = 1});
  3374. var optsChatIgnAttach = SRDotDX.c('#SRDotDX_options_ignAttach');
  3375. optsChatIgnAttach.on('click', function(){SRDotDX.config.ignMode = 2});
  3376. switch(SRDotDX.config.ignMode) {
  3377. case 0: optsChatIgnHide.ele().checked = true; break;
  3378. case 1: optsChatIgnReplace.ele().checked = true; break;
  3379. case 2: optsChatIgnAttach.ele().checked = true; break;
  3380. }
  3381.  
  3382. var optsChatThemeLightGrey = SRDotDX.c('#theme_lightGrey');
  3383. optsChatThemeLightGrey.on('click', function(){SRDotDX.gui.applyTheme(0)});
  3384. var optsChatThemeCrimsonBlack = SRDotDX.c('#theme_crimsonBlack');
  3385. optsChatThemeCrimsonBlack.on('click', function(){SRDotDX.gui.applyTheme(1)});
  3386. switch(SRDotDX.config.themeNum) {
  3387. case 1: optsChatThemeCrimsonBlack.ele().checked = true; break;
  3388. case 0: optsChatThemeLightGrey.ele().checked = true; break;
  3389. }
  3390.  
  3391. var optsWcLeft = SRDotDX.c('#options_wcLeft');
  3392. optsWcLeft.ele().checked = SRDotDX.config.leftWChat;
  3393. optsWcLeft.on('click', function(){
  3394. SRDotDX.config.leftWChat = this.checked;
  3395. SRDotDX.config.extSave();
  3396. });
  3397.  
  3398. var optsWcRemove = SRDotDX.c('#options_wcRemove');
  3399. optsWcRemove.ele().checked = SRDotDX.config.removeWChat;
  3400. optsWcRemove.on('click', function(){SRDotDX.gui.removeWC(this.checked)});
  3401.  
  3402. //Opts -> Sidebar Options
  3403. var optsSbEnable = SRDotDX.c('#options_sbEnable');
  3404. optsSbEnable.ele().checked = SRDotDX.config.sbEnable;
  3405. optsSbEnable.on('click', function () {
  3406. SRDotDX.config.sbEnable = this.checked;
  3407. SRDotDX.gui.applySidebarUI(this.checked ? 1 : -1);
  3408. SRDotDX.config.save(false)
  3409. });
  3410.  
  3411. var optsSbRightSide = SRDotDX.c('#options_sbRightSide');
  3412. optsSbRightSide.ele().checked = SRDotDX.config.sbRightSide;
  3413. optsSbRightSide.on('click', function () {
  3414. SRDotDX.config.sbRightSide = this.checked;
  3415. SRDotDX.gui.applySidebarUI(2);
  3416. SRDotDX.config.save(false)
  3417. });
  3418.  
  3419. //var optsCbDisable = SRDotDX.c('#options_cbDisable');
  3420. //optsCbDisable.ele().checked = SRDotDX.config.cbDisable;
  3421. //optsCbDisable.on('click', function(){ SRDotDX.config.cbDisable = this.checked; SRDotDX.config.save(false) });
  3422.  
  3423. var optsSlimSB = SRDotDX.c('#options_sbSlim');
  3424. optsSlimSB.ele().checked = SRDotDX.config.sbSlim;
  3425. optsSlimSB.on('click', function () {
  3426. SRDotDX.config.sbSlim = this.checked;
  3427. SRDotDX.config.save(false);
  3428. SRDotDX.gui.toggleSlimSB();
  3429. });
  3430.  
  3431. optsMarkMyRaidsVisited.ele().checked = SRDotDX.config.markMyRaidsVisted;
  3432. optsFormatLinkOutput.ele().checked = SRDotDX.config.formatLinkOutput;
  3433. optsMarkImportedVisited.ele().checked = SRDotDX.config.markImportedVisited;
  3434. optsWhisperTo.ele().value = SRDotDX.config.whisperTo;
  3435. optsConfirmDeletes.ele().checked = SRDotDX.config.confirmDeletes;
  3436. SRDotDX.c('#SRDotDX_colors_background').ele().value = SRDotDX.config.bckColor;
  3437. optsHideVRaids.ele().checked = SRDotDX.config.hideVisitedRaids;
  3438. optsHideBRaids.ele().checked = SRDotDX.config.hideBotLinks;
  3439. if (SRDotDX.config.hideRaidLinks) {
  3440. optsHideARaids.ele().checked = true;
  3441. optsHideVRaids.ele().disabled = true;
  3442. optsHideBRaids.ele().disabled = true;
  3443. }
  3444.  
  3445. optsConfirmDeletes.on('click', function(){SRDotDX.config.confirmDeletes = this.checked});
  3446. optsMarkImportedVisited.on("click", function(){SRDotDX.config.markImportedVisited = this.checked;});
  3447. optsWhisperTo.on("change", function () {
  3448. console.log("[SRDotDX] Whisper person changed to " + this.value);
  3449. SRDotDX.config.whisperTo = this.value;
  3450. });
  3451. SRDotDX.c('#SRDotDX_colors_background').on("change", function(){SRDotDX.config.bckColor = this.value;});
  3452. optsFormatLinkOutput.on("click", function(){SRDotDX.config.formatLinkOutput = this.checked;});
  3453. optsMarkMyRaidsVisited.on("click", function(){SRDotDX.config.markMyRaidsVisted = this.checked;});
  3454. optsHideARaids.on("click", function(){
  3455. document.getElementById('SRDotDX_options_hideVisitedRaids').disabled = this.checked;
  3456. document.getElementById('SRDotDX_options_hideSeenRaids').disabled = this.checked;
  3457. SRDotDX.config.hideRaidLinks = this.checked;
  3458. SRDotDX.c('#SRDotDX_raidClass').html('.DotDX_raid {display: ' + (this.checked ? 'none !important' : 'block') + '}', true);
  3459. }, true);
  3460. optsHideBRaids.on("click", function(){SRDotDX.gui.switchBot()}, true);
  3461. optsHideVRaids.on("click", function(){
  3462. SRDotDX.config.hideVisitedRaids = this.checked;
  3463. SRDotDX.c('#SRDotDX_visitedRaidClass').html('.SRDotDX_visitedRaid {display: ' + (this.checked ? 'none !important' : 'block') + '}', true);
  3464. }, true);
  3465.  
  3466. //CHAT TAB CLICK SCROLL (id=chat_tab, class=chat_message_window)
  3467. document.getElementById('chat_tab').addEventListener("click", function() {
  3468. document.getElementById('lots_tab_pane').style.display = 'none';
  3469. setTimeout(function(){
  3470. SRDotDX.gui.scrollChat(true);
  3471. SRDotDX.gui.selectRaidsToJoin();
  3472. }, 50);
  3473. }, true);
  3474.  
  3475. //RAIDS TAB CLICK EVENT LISTENER
  3476. document.getElementById('lots_tab').addEventListener("click", function() {
  3477. setTimeout(SRDotDX.gui.selectRaidsToJoin, 50)
  3478. }, true);
  3479.  
  3480. //FriendShare
  3481. SRDotDX.gui.refreshFriends();
  3482.  
  3483. // Filtering tab
  3484. SRDotDX.gui.createFilterTab();
  3485.  
  3486. var filterChatCb = SRDotDX.c('#SRDotDX_options_perRaidFilterLinks');
  3487. filterChatCb.on("click", function () {
  3488. SRDotDX.config.filterChatLinks = this.checked;
  3489. SRDotDX.gui.toggleFiltering();
  3490. }, true).ele().checked = SRDotDX.config.filterChatLinks;
  3491.  
  3492. var filterListCb = SRDotDX.c('#SRDotDX_options_perRaidFilterRaidList');
  3493. filterListCb.on("click", function () {
  3494. SRDotDX.config.filterRaidList = this.checked;
  3495. SRDotDX.gui.toggleFiltering();
  3496. }, true).ele().checked = SRDotDX.config.filterRaidList;
  3497.  
  3498. SRDotDX.c('li').set({class: 'rate'}).html('<a class="spritegame" href="http://www.kongregate.com/games/5thPlanetGames/dawn-of-the-dragons" onclick="SRDotDX.reload(); return false;">Reload Game</a>', false).attach('after', 'quicklinks_favorite_block');
  3499. if(!SRDotDX.config.removeWChat) SRDotDX.c('li').set({id: 'wcbutton', class: 'rate'}).html('<a id="hideWCtxt" class="spritegame" href="http://www.kongregate.com/games/5thPlanetGames/dawn-of-the-dragons" onclick="SRDotDX.gui.hideWC(false); return false;">' + (SRDotDX.config.hideWChat ? 'Show World Chat' : 'Hide World Chat') + '</a>', false).attach('after', 'quicklinks_play_later_block');
  3500.  
  3501. //Chat buttons overlay div
  3502. var hd = document.getElementById('chat_window_header').getElementsByClassName('room_name_container')[0].innerHTML;
  3503. document.getElementById('chat_window_header').getElementsByClassName('room_name_container')[0].innerHTML = hd + '<div class="dotdx_chat_overlay">DotDX: <span id="dotdx_chat_overlay"></span></div>';
  3504. setTimeout(SRDotDX.gui.BeginDeletingExpiredUnvisitedRaids, 10000);
  3505. //SRDotDX.util.updateUser(true);
  3506. window.userInt = setInterval(function(){
  3507. if(typeof active_user == 'object' && active_user.username().toLowerCase() != 'guest') {
  3508. SRDotDX.config.kongUser = active_user.username();
  3509. SRDotDX.config.kongId = active_user.id();
  3510. SRDotDX.config.kongAuth = active_user.gameAuthToken();
  3511. console.log("[DotDX] Initialized user: " + SRDotDX.config.kongUser + " | " + SRDotDX.config.kongId);
  3512. clearInterval(window.userInt);
  3513. if(SRDotDX.config.allianceChat) setTimeout(SRDotDX.alliance.createRoom, 5000);
  3514. }
  3515. else console.log("[DotDX] User init failed... trying again");
  3516. },3000);
  3517.  
  3518. console.log('[DotDX] DotDeXtension loading complete');
  3519. SRDotDX.gui.doStatusOutput('Loaded successfully', 2000, false);
  3520.  
  3521. setTimeout(function(){delete SRDotDX.gui.load; delete SRDotDX.load},1000);
  3522. setTimeout(SRDotDX.config.save, 2000);
  3523.  
  3524. }
  3525. else {
  3526. setTimeout(SRDotDX.gui.load, 500)
  3527. }
  3528. },
  3529. fsEleClick: function (e) {
  3530. e = e || window.event;
  3531. var el = e.target.id.split(':');
  3532. if (el[0] == 'fs') {
  3533. SRDotDX.config.friendUsers[el[1]][el[2]] = e.target.checked;
  3534. }
  3535. },
  3536. FPXraidLinkClick: function(id) {
  3537. if (!SRDotDX.gui.joining) SRDotDX.request.joinRaid(SRDotDX.config.raidList[id]);
  3538. else SRDotDX.gui.joinRaidList.push(SRDotDX.config.raidList[id]);
  3539. },
  3540. FPXLandButtonHandler: function (ele, name) {
  3541. var x = name.charAt(name.length - 1), sign = 1;
  3542. if (name.charAt(3) != 'p')sign = -1;
  3543. document.FPXLandForm.elements["tf_" + x].value = parseInt(document.FPXLandForm.elements["tf_" + x].value, 10) + (10 * sign);
  3544. SRDotDX.gui.FPXLandUpdater();
  3545. },
  3546. FPXLandUpdater: function () {
  3547. var owned = [0, 0, 0, 0, 0, 0, 0, 0, 0], els = document.FPXLandForm, i = 9;
  3548. while (i--) owned[i] = parseInt(els.elements['tf_' + (i + 1)].value, 10);
  3549. var ratio = FPX.LandCostRatio(owned), best = 0, cn;
  3550. i = 9;
  3551. while (i--) {
  3552. cn = document.getElementById('b_' + (i + 1)).className;
  3553. if (cn.indexOf('landpmbutton ') == -1) document.getElementById('b_' + (i + 1)).className = cn.replace('landpmbuttonhigh', 'landpmbutton');
  3554. //document.getElementById('b_'+(i+1)).prevClassName = 'landpmbutton';
  3555. if (ratio[i] > ratio[best]) best = i;
  3556. }
  3557. cn = document.getElementById('b_' + (best + 1)).className;
  3558. document.getElementById('b_' + (best + 1)).className = cn.replace('landpmbutton', 'landpmbuttonhigh');
  3559. },
  3560. FPXLandButtonSave: function () {
  3561. var els = document.FPXLandForm, i = 9;
  3562. while (i--) SRDotDX.config.FPXLandOwnedCount[i] = els.elements['tf_' + (i + 1)].value;
  3563. SRDotDX.config.save(false);
  3564. SRDotDX.gui.doStatusOutput('Land count saved!');
  3565. },
  3566. FPXraidListMouseDown: function (e) {
  3567. e.preventDefault();
  3568. e.stopPropagation();
  3569. var classtype = e.target.className;
  3570. e = e || window.event;
  3571. if (e.which == 1) {
  3572. switch (classtype) {
  3573. case 'dotdxRaidListDelete':
  3574. SRDotDX.gui.deleteRaid(e.target.parentNode);
  3575. break;
  3576. case 'DotDX_RaidLink':
  3577. SRDotDX.gui.FPXraidLinkClick(e.target.parentNode.getAttribute("raidid"));
  3578. break;
  3579. }
  3580. }
  3581. },
  3582. chatWindowContextMenu: function (e) {
  3583. e = e || window.event;
  3584. var clickedClass = e.target.className.split(" "), nick = "";
  3585. console.log('[DotDX] Chat window menu [' + e.target.className + ']');
  3586. if (clickedClass[0] === 'username' && clickedClass[1] === 'chat_message_window_username') {
  3587. nick = e.target.getAttribute('dotdxname');
  3588. var frTxt = SRDotDX.config.friendUsers[nick]?'unFriend':'Friend';
  3589. var uMenu = document.getElementById(clickedClass[clickedClass.length - 1]);
  3590. if(uMenu !== null) {
  3591. uMenu.innerHTML = '<span class="user dotdx_name_' + nick + '">' + nick + '</span><span class="user dotdx_friend_' + nick + '">' + frTxt + '</span><span class="user dotdx_slap_' + nick + '">Slap</span><span class="user dotdx_mute_' + nick + '">Mute</span>';
  3592. uMenu.style.maxWidth = "220px";
  3593. }
  3594. e.preventDefault();
  3595. e.stopPropagation();
  3596. }
  3597. else if(clickedClass[0] === 'chat_input' && SRDotDX.config.clearRMB) {
  3598. e.target.value = '';
  3599. e.preventDefault();
  3600. e.stopPropagation();
  3601. }
  3602. return false;
  3603. },
  3604. chatWindowMouseDown: function (e) {
  3605. e = e || window.event;
  3606. var clickedClass = e.target.className.split(" "), nick = "";
  3607. //console.log('[DotDX] Chat window (' + e.which + ') [' + e.target.className + ']');
  3608. if(e.which === 1) {
  3609. switch(clickedClass[0]) {
  3610. case 'username':
  3611. if(clickedClass[1] === 'chat_message_window_username')
  3612. {
  3613. e.preventDefault();
  3614. e.stopPropagation();
  3615. nick = e.target.getAttribute('dotdxname');
  3616. console.log("[DotDX] Whisp to user with nick [" + nick + "]");
  3617. if (SRDotDX.alliance.isActive) {
  3618. var txt = document.getElementById('alliance_input');
  3619. txt.value = '/w ' + nick + ' ';
  3620. txt.focus();
  3621. }
  3622. else holodeck.chatWindow().insertPrivateMessagePrefixFor(nick);
  3623. }
  3624. break;
  3625. case 'chatRaidLink':
  3626. e.preventDefault();
  3627. e.stopPropagation();
  3628. var raid = clickedClass[1].split("|");
  3629. var rObj = {id: raid[0], hash: raid[1], boss: raid[2], diff: raid[3], sid: raid[4]};
  3630. if (!SRDotDX.gui.joining) SRDotDX.request.joinRaid(rObj);
  3631. else SRDotDX.gui.joinRaidList.push(rObj);
  3632. break;
  3633. case 'user':
  3634. e.preventDefault();
  3635. e.stopPropagation();
  3636. var classTokens = clickedClass[1].split("_");
  3637. switch (classTokens[1]) {
  3638. case 'slap':
  3639. var num = Math.round((Math.random() * (SRDotDX.slapSentences.length - 1)));
  3640. SRDotDX.gui.sendChatMsg('*' + SRDotDX.slapSentences[num].replace(/<nick>/g, classTokens[2]) + '*');
  3641. break;
  3642. case 'mute':
  3643. SRDotDX.config.mutedUsers[classTokens[2]] = true;
  3644. SRDotDX.config.save(false);
  3645. break;
  3646. case 'friend':
  3647. if (typeof SRDotDX.config.friendUsers[classTokens[2]] == 'object') delete SRDotDX.config.friendUsers[classTokens[2]];
  3648. else SRDotDX.config.friendUsers[classTokens[2]] = [false, false, false, false, true];
  3649. SRDotDX.config.save(false);
  3650. SRDotDX.gui.refreshFriends();
  3651. break;
  3652. case 'name':
  3653. holodeck.showMiniProfile(classTokens[2]);
  3654. break;
  3655. }
  3656. e.target.parentNode.style.maxWidth = "0";
  3657. break;
  3658. default:
  3659. //console.log('[DotDX] Chat window (' + e.which + ') Tag [' + e.target.tagName + ']');
  3660. if (e.target.tagName === 'IMG') {
  3661. var imgSrc = e.target.getAttribute('src');
  3662. if (/^https?:\/\/.+?\.(png|gif|jpe?g)$/.test(imgSrc)){
  3663. console.log("[DotDX] Open new tab with image: " + imgSrc);
  3664. window.open(imgSrc);
  3665. }
  3666. }
  3667. }
  3668. return false;
  3669. }
  3670. },
  3671. raidListItemUpdate: function (id) {
  3672. var ele = document.getElementById('DotDX_' + id);
  3673. var r = SRDotDX.config.raidList[id];
  3674. if(ele !== null && typeof r === 'object') ele.children[2].innerHTML = (r.visited ? '&#9733;' : '');
  3675. },
  3676. raidListItemRemoveById: function (id) {
  3677. var ele = document.getElementById('DotDX_' + id);
  3678. if(ele !== null) ele.parentNode.removeChild(ele);
  3679. },
  3680. toggleCSS: function (p) {
  3681. if (p) {
  3682. var ele = document.getElementById(p.id);
  3683. if(ele !== null) {
  3684. document.head.removeChild(ele);
  3685. SRDotDX.c("style").set({ type: "text/css", id: p.id }).text(p.cls).attach("to", document.head);
  3686. }
  3687. }
  3688. },
  3689. toggleRaid: function (type, id, tog) {
  3690. var d = document.getElementsByClassName("DotDX_raidId_" + id);
  3691. if (typeof SRDotDX.config.raidList[id] === 'object') {
  3692. var raid = SRDotDX.config.raidList[id];
  3693. raid = SRDotDX.getRaidDetails("&kv_difficulty=" + raid.diff + "&kv_hash=" + raid.hash + "&kv_raid_boss=" + raid.boss + "&kv_raid_id=" + raid.id);
  3694. }
  3695. for(var i = 0, il = d.length; i < il; ++i) {
  3696. if (tog && d[i].className.indexOf('DotDX_' + type + 'Raid') < 0) d[i].className += ' DotDX_' + type + 'Raid';
  3697. else if (!tog && d[i].className.indexOf('DotDX_' + type + 'Raid') >= 0) d[i].className = d[i].className.replace(new RegExp('DotDX_' + type + 'Raid( |$)', 'i'), '');
  3698. if (typeof raid === 'object') d[i].getElementsByTagName('a')[0].innerHTML = raid.linkText();
  3699. }
  3700. }
  3701. },
  3702. searchPatterns: {
  3703. z1: ['kobold', 'scorp', 'ogre'],
  3704. z2: ['rhino', 'alice', 'lurker'],
  3705. z3: ['4ogre', 'squid', 'batman', 'drag', 'tainted'],
  3706. z4: ['bmane', '3dawg', 'hydra', 'sircai', 'tyranthius'],
  3707. z5: ['ironclad', 'zombiehorde', 'stein', 'bogstench', 'nalagarst'],
  3708. z6: ['gunnar', 'nidhogg', 'kang', 'ulfrik', 'kalaxia'],
  3709. z7: ['maraak', 'erakka_sak', 'wexxa', 'guilbert', 'bellarius'],
  3710. z8: ['hargamesh', 'grimsly', 'rift', 'sisters', 'mardachus'],
  3711. z9: ['mesyra', 'nimrod', 'phaedra', 'tenebra', 'valanazes'],
  3712. 'z1_9': ['kobold', 'scorp', 'ogre', 'rhino', 'alice', 'lurker', '4ogre', 'squid', 'batman', 'drag', 'tainted', 'bmane', '3dawg', 'hydra', 'sircai', 'tyranthius', 'ironclad', 'zombiehorde', 'stein', 'bogstench', 'nalagarst', 'gunnar', 'nidhogg', 'kang', 'ulfrik', 'kalaxia', 'maraak', 'erakka_sak', 'wexxa', 'guilbert', 'bellarius', 'hargamesh', 'grimsly', 'rift', 'sisters', 'mardachus', 'mesyra', 'nimrod', 'phaedra', 'tenebra', 'valanazes'],
  3713. 'z9.5': ['pumpkin', 'jacksrevenge1'],
  3714. 'z9.7': ['hellemental', 'shadow'],
  3715. z10: ['krugnug', 'tomb_gargoyle', 'leonine_watcher', 'centurion_marius', 'caracalla'],
  3716. z14: ['zugen', 'gulkinari', 'verkiteia', 'cannibal_barbarians'],
  3717. z15: ['korxun', 'xerkara', 'shaar', 'nereidon', 'drulcharus'],
  3718. z16: ['bad_blood','way_warden','draconic_dreams','doppelganger'],
  3719. z17: ['the_sight_of_solus','engine_of_the_ancients','ascendants_echo','drakontos_the_first_terror'],
  3720. farm: ['maraak', 'erakka_sak', 'wexxa', 'guilbert', 'bellarius', 'drag', 'tainted', 'ogre', 'scorp', 'baroness'],
  3721. flute: ['kobold', 'scorp', 'ogre', 'rhino', 'alice', 'lurker', '4ogre', 'squid', 'batman', 'drag', 'tainted', 'harpy', 'spider', 'djinn', 'evilgnome', 'basilisk', 'roc', 'gladiators', 'chimera', 'crabshark', 'gorgon', 'warewolfpack', 'blobmonster', 'giantgolem'],
  3722. tower: ['thaltherda', 'hurkus', 'malleus', 'yydians_sanctuary', 'clockwork_dragon', 'krxunara', 'karkata', 'corrupted_wilds', 'marble_colossus', 'elite_butcher', 'elite_killers', 'elite_mangler', 'elite_murderer', 'elite_caster', 'elite_whispers', 'elite_malleus', 'elite_riders', 'elite_warrior','elite_lady','beastman_stampede'],
  3723. small: ['kobold', 'rhino', 'bmane', '4ogre', 'serpina', 'dragons_lair', 'gunnar', 'hargamesh', 'ironclad', 'krugnug', 'maraak', 'thaltherda', 'zugen', 'nereidon', 'mestr_rekkr_rematch', 'ghostly_alchemist', 'master_ninja_bakku','valtrias','bad_blood','elite_caster','elite_warrior','frost_the_snow_dragon','unholy_rite','bloodsuckers','elite_bloodsuckers','elite_slitherer','the_sight_of_solus'],
  3724. medium: ['alice', 'erakka_sak', 'grimsly', '3dawg', 'scorp', 'nidhogg', 'tomb_gargoyle', 'squid', 'tisiphone', 'zombiehorde', 'baroness', 'hurkus', 'gulkinari', 'korxun', 'drunken_ragunt', 'shadow', 'rudaru_the_axe_master','doppelganger','bash_brothers', 'elite_whispers', 'yule_punishment_bearer', 'damned_shade','ascendants_echo'],
  3725. large: ['ogre', 'batman', 'hydra', 'kang', 'leonine_watcher', 'lurker', 'rift', 'stein', 'wexxa', 'teremarthu', 'zralkthalat', 'malleus', 'verkiteia', 'drulcharus', 'gigantomachy', 'green_killers', 'yule_present_bearer','clockwork_giant','blood_dancer','elite_murderer','elite_riders','qwiladrian_sporeforms', 'the_thaw_of_elvigar', 'demonic_skeleton','possessed_cadaver','war_damned_shade','lord_hoton_the_usurper', 'war_swarm', 'war_bloodsuckers', 'war_soldier_ants', 'initiates_of_the_abyss', 'elite_initiates'],
  3726. epic: ['bogstench', 'centurion_marius', 'drag', 'tainted', 'guilbert', 'pumpkin', 'jacksrevenge1', 'mesyra', 'nimrod', 'phaedra', 'sircai', 'sisters', 'ulfrik', 'frogmen_assassins', 'burbata', 'yydians_sanctuary', 'grundus', 'shaar', 'tuxargus', 'nylatrix', 'rannveig', 'legion_of_darkness', 'valley_of_death', 'murgrux_the_mangler', 'marble_colossus', 'drakes_fire_elemental','elite_mangler', 'elite_malleus', 'qwiladrian_stormship', 'jershan_thurns_portal', 'odius_pods','reaper_mantis','elite_reaper_mantis','soldier_ants', 'hullbore_worms', 'elite_5th_terror'],
  3727. colossal: ['bellarius', 'caracalla', 'kalaxia', 'tyranthius', 'mardachus', 'nalagarst', 'tenebra', 'valanazes', 'siculus', 'ruzzik', 'cannibal_barbarians', 'vortex_abomination', 'xerkara', 'keron', 'clockwork_dragon', 'krxunara', 'hellemental', 'kanehuar_yachu', 'karkata', 'thratus_abomination', 'way_warden', 'faetouched_dragon','vineborn_behemoth','badland_ambusher', 'prison_of_fear', 'elite_lady', 'the_frozen_spire','elite_devourer','elite_karkata','engine_of_the_ancients','beastman_stampede'],
  3728. gigantic: ['imryx', 'trekex', 'gataalli_huxac', 'kessov_fort', 'corrupted_wilds','draconic_dreams','horthania_stam','jormungan_the_sea_storm_stam', 'euryino', 'grotesque_hybrid','red_snow','drakontos_the_first_terror'],
  3729. glyph: ['maraak', 'erakka_sak', 'wexxa', 'guilbert', 'bellarius'],
  3730. goblin: ['master_ninja_bakku', 'green_killers', 'elite_killers', 'elite_riders'],
  3731. citadel: ['thaltherda', 'hurkus', 'malleus', 'yydians_sanctuary', 'clockwork_dragon', 'krxunara', 'karkata', 'corrupted_wilds', 'marble_colossus', 'elite_butcher', 'elite_killers', 'elite_murderer', 'elite_mangler', 'elite_caster', 'elite_whispers', 'elite_malleus', 'elite_riders', 'elite_warrior', 'elite_lady'],
  3732. festival: ['vortex_abomination', 'drunken_ragunt', 'mestr_rekkr_rematch', 'valley_of_death', 'green_killers', 'murgrux_the_mangler', 'euryino', 'jershan_thurns_portal','elite_5th_terror'],
  3733. abyssal: ['elite_devourer','elite_bloodsuckers','elite_reaper_mantis','soldier_ants', 'war_swarm', 'war_bloodsuckers', 'war_soldier_ants', 'elite_initiates', 'hullbore_worms','elite_5th_terror','elite_karkata','elite_slitherer'],
  3734. aquatic: ['dirthax', 'frogmen_assassins', 'lurker', 'nidhogg', 'crabshark', 'squid', 'thaltherda', 'nereidon', 'krxunara', 'trekex', 'paracoprion', 'bog_bodies','karkata','jormungan_the_sea_storm_stam', 'euryino', 'initiates_of_the_abyss', 'elite_initiates', 'hullbore_worms', 'elite_5th_terror', 'elite_karkata','elite_slitherer','drakontos_the_first_terror'],
  3735. beastman: ['bmane', 'burbata', 'frogmen_assassins', 'batman', 'war_boar', 'hargamesh', 'hurkus', 'krugnug', 'malleus', 'scorp', 'ruzzik', 'squid', 'korxun', 'shaar', 'nereidon', 'drulcharus', 'trekex', 'elite_malleus', 'beastman_stampede'],
  3736. beasts: ['lurker', 'rhino', '3dawg', 'nidhogg', 'hydra', 'kang', 'wexxa', 'karkata', 'nrlux', 'spider', 'basilisk', 'chimera', 'doomglare', 'roc', 'crabshark', 'dirthax', 'nrlux', 'paracoprion', 'corrupted_wilds', 'elite_riders','elite_devourer'],
  3737. bludheim: ['gunnar', 'nidhogg', 'kang', 'ulfrik', 'kalaxia'],
  3738. colosseum: ['gladiators', 'serpina', 'crabshark', 'tisiphone', 'chimera', 'green_killers', 'marble_colossus','blood_dancer','bash_brothers'],
  3739. construct: ['cedric', 'erakka_sak', 'giantgolem', 'leonine_watcher', 'tomb_gargoyle', 'stein', 'yydians_sanctuary', 'clockwork_dragon', 'clockwork_giant', 'thratus_abomination', 'marble_colossus', 'the_frozen_spire','engine_of_the_ancients'],
  3740. demon: ['apoc_demon', '3dawg', 'tyranthius', 'lunacy', 'salome', 'sircai', 'blobmonster', 'malchar', 'zralkthalat', 'krxunara', 'adrastos', 'hellemental','valtrias','red_snow','jershan_thurns_portal', 'damned_shade','demonic_skeleton','possessed_cadaver','war_damned_shade','odius_pods','unholy_rite'],
  3741. dragon: ['bellarius', 'corrupterebus', 'dragons_lair', 'echidna', 'drag', 'kalaxia', 'krykagrius', 'mardachus', 'mesyra', 'nalagarst', 'nimrod', 'phaedra', 'rhalmarius_the_despoiler', 'tainted', 'tenebra', 'thaltherda', 'tisiphone', 'grundus', 'valanazes', 'verkiteia', 'winter_kessov', 'xerkara', 'nereidon', 'drulcharus', 'keron', 'tuxargus', 'nylatrix', 'clockwork_dragon', 'imryx', 'draconic_dreams', 'horthania_stam', 'jormungan_the_sea_storm_stam', 'drakes_fire_elemental', 'faetouched_dragon', 'grotesque_hybrid', 'frost_the_snow_dragon', 'elite_slitherer','the_sight_of_solus','drakontos_the_first_terror'],
  3742. giant: ['gigantomachy', 'gataalli_huxac', 'kanehuar_yachu','clockwork_giant','aberrant_strength_serum'],
  3743. guild: ['harpy', 'spider', 'djinn', 'evilgnome', 'basilisk', 'roc', 'gladiators', 'chimera', 'crabshark', 'gorgon', 'werewolfpack', 'blobmonster', 'giantgolem', 'slaughterers', 'lunacy', 'felendis', 'agony', 'fairy_prince', 'war_boar', 'dirthax', 'dreadbloom', 'rhalmarius_the_despoiler', 'gladiators', 'krasgore', 'xessus', 'malchar', 'nrlux', 'salome', 'apoc_demon', 'grundus', 'tuxargus', 'nylatrix', 'keron', 'adrastos', 'doomglare', 'darhednal', 'paracoprion', 'bog_bodies', 'clockwork_giant', 'drakes_fire_elemental', 'faetouched_dragon', 'aberrant_strength_serum', 'bash_brothers','unholy_rite','soldier_ants','hullbore_worms'],
  3744. human: ['agony', 'rhino', 'gladiators', 'baroness', 'warewolfpack', 'alice', 'cannibal_barbarians', 'guilbert', 'gunnar', 'pumpkin', 'jacksrevenge1', 'lunacy', 'slaughterers', 'ulfrik', 'mestr_rekkr_rematch', 'rannveig', 'adrastos', 'legion_of_darkness', 'yule_present_bearer', 'bad_blood', 'yule_punishment_bearer','possessed_cadaver','lord_hoton_the_usurper','unholy_rite'],
  3745. insect: ['elite_devourer','bloodsuckers','elite_bloodsuckers','reaper_mantis','elite_reaper_mantis','soldier_ants', 'war_swarm', 'war_bloodsuckers', 'war_soldier_ants'],
  3746. magical: ['djinn', 'grimsly', 'hargamesh', 'fairy_prince', 'rift', 'sisters', 'vortex_abomination', 'grundus', 'shadow', 'bog_bodies', 'corrupted_wilds','way_warden', 'doppelganger', 'drakes_fire_elemental', 'faetouched_dragon' ,'blood_dancer', 'prison_of_fear', 'ascendants_echo'],
  3747. nmqueen: ['elite_butcher', 'elite_killers', 'elite_murderer', 'elite_mangler', 'elite_caster', 'elite_riders', 'elite_whispers', 'elite_malleus', 'prison_of_fear', 'elite_warrior', 'elite_lady'],
  3748. ogre: ['ogre', '4ogre', 'felendis', 'zugen', 'korxun', 'drunken_ragunt', 'valley_of_death', 'murgrux_the_mangler', 'elite_butcher', 'elite_mangler', 'bash_brothers'],
  3749. orc: ['darhednal', 'rudaru_the_axe_master', 'green_killers', 'elite_killers', 'elite_murderer'],
  3750. plant: ['vineborn_behemoth', 'badland_ambusher', 'haunted_forest', 'qwiladrian_sporeforms','odius_pods'],
  3751. oddish: ['vineborn_behemoth', 'badland_ambusher', 'haunted_forest', 'qwiladrian_sporeforms'],
  3752. qwiladrian: ['gulkinari', 'teremarthu', 'vortex_abomination', 'grotesque_hybrid', 'qwiladrian_sporeforms', 'qwiladrian_stormship'],
  3753. ryndor: ['bmane', '3dawg', 'hydra', 'sircai', 'tyranthius'],
  3754. siege: ['echidna', 'ulfrik', 'yydians_sanctuary', 'drunken_ragunt', 'kessov_fort', 'the_frozen_spire'],
  3755. terror: ['euryino', 'elite_5th_terror', 'drakontos_the_first_terror'],
  3756. undead: ['agony', 'bogstench', 'serpina', 'ironclad', 'malleus', 'nalagarst', 'stein', 'siculus', 'zombiehorde', 'caracalla', 'centurion_marius', 'ghostly_alchemist', 'elite_caster', 'elite_whispers', 'elite_malleus', 'haunted_forest', 'elite_warrior', 'elite_lady', 'the_thaw_of_elvigar','demonic_skeleton'],
  3757. underground: ['maraak', 'erakka_sak', 'wexxa', 'guilbert', 'bellarius', 'spider', 'tomb_gargoyle', 'leonine_watcher', 'centurion_marius', 'caracalla', 'dragons_lair', 'kang', '3dawg', 'lurker', 'salome', 'stein', 'imryx', 'elite_caster', 'elite_riders', 'elite_lady'],
  3758. war: ['demonic_skeleton', 'possessed_cadaver', 'war_damned_shade', 'war_swarm', 'war_bloodsuckers', 'war_soldier_ants'],
  3759. winter: ['yule_punishment_bearer', 'the_thaw_of_elvigar', 'the_frozen_spire', 'frost_the_snow_dragon', 'red_snow']
  3760. },
  3761. raids: {
  3762. aberrant_strength_serum: {name: 'Aberrant Strength Potion', shortname: 'Strength Potion', id: 'aberrant_strength_serum', type: 'Giant', stat: 'H', size:10, nd:2, duration:24, health: [2000000000,2500000000,3400000000,4000000000,0,0], lt: ['pot','pot','pot','pot']},
  3763. adrastos: {name: 'Adrastos of the Kavala ', shortname: 'Adrastos', id: 'adrastos', type: 'Human, Demon', stat: 'H', size: 101, nd: 5, duration: 192, health: [5000000000, 6250000000, 8750000000, 10000000000, 0, 0], lt: ['keron', 'keron', 'keron', 'keron']},
  3764. agony: {name: 'Agony', shortname: 'Agony', id: 'agony', type: 'Undead, Human', stat: 'H', size: 101, nd: 5, duration: 168, health: [700000000, 875000000, 1120000000, 1400000000, 0, 0]},
  3765. apoc_demon: {name: 'Apocolocyntosised Demon', shortname: 'Apoc', id: 'apoc_demon', type: 'Demon', stat: 'H', size: 50, nd: 3, duration: 144, health: [500000000, 750000000, 1000000000, 2000000000, 0, 0], lt: ['apoc', 'apoc', 'apoc', 'apoc']},
  3766. djinn: {name: 'Al-Azab', shortname: 'Azab', id: 'djinn', type: 'Magical Creature', stat: 'H', size: 100, nd: 4, duration: 168, health: [55000000, 68750000, 88000000, 110000000, 0, 0]},
  3767. spider: {name: 'Arachna', shortname: 'Arachna', id: 'spider', type: 'Underground, Beast', stat: 'H', size: 50, nd: 3, duration: 144, health: [22000000, 27500000, 35200000, 44000000, 0, 0]},
  3768. rhino: {name: 'Ataxes', shortname: 'Ataxes', id: 'rhino', type: 'Human, Beast', stat: 'S', size: 10, nd: 2, duration: 120, health: [2000000, 2500000, 3200000, 4000000, 0, 0]},
  3769. badland_ambusher: {name: 'Badland Ambusher', shortname: 'Badlands', id: 'badland_ambusher', type: 'Plant', stat: 'S', size:500, nd:6, duration:96, health: [225000000000,450000000000,675000000000,900000000000,0,0], lt: ['badl','badl','badl','badl']},
  3770. bash_brothers: {name: 'The Bash Brothers',shortname: 'B. Brothers',id: 'bash_brothers', type: 'Colosseum Ogre', stat: 'H', size:25, nd:4, duration:48, health: [25000000000,33000000000,41000000000,50000000000,0,0], lt: ['bsh','bsh','bsh','bsh']},
  3771. gladiators: {name: 'Batiatus Gladiators ', shortname: 'Gladiators', id: 'gladiators', type: 'Colosseum, Human', stat: 'H', size: 10, nd: 2, duration: 120, health: [12000000, 15000000, 19200000, 24000000, 0, 0]},
  3772. beastman_stampede: {name: 'Beastman Stampede', shortname: 'Stampede', id: 'beastman_stampede', type: 'Beastman', stat: 'S', size: 200, nd: 5, duration: 72, health: [450000000000,900000000000,1350000000000,1800000000000,0,0], lt: ['u','u','u','u']},
  3773. bellarius: {name: 'Bellarius the Guardian', shortname: 'Bellarius', id: 'bellarius', type: 'Dragon, Underground', stat: 'S', size: 500, nd: 6, duration: 96, health: [900000000, 1125000000, 1440000000, 1800000000, 0, 0]},
  3774. bad_blood: {name: 'Bad Blood', shortname: 'Bad Blood', id: 'bad_blood', type: 'Human', stat: 'S', size:30, nd:4, duration:48, health: [8000000000,16000000000,24000000000,32000000000,0,0], lt: ['badb','badb','badb','badb']},
  3775. baroness: {name: 'The Baroness', shortname: 'Baroness', id: 'baroness', type: 'Human', stat: 'S', size: 50, nd: 3, duration: 60, health: [68000000, 85000000, 108800000, 136000000, 0, 0]},
  3776. werewolfpack: {name: 'The Black Moon Pack', shortname: 'Black Moon', id: 'werewolfpack', type: 'Human', stat: 'H', size: 50, nd: 3, duration: 144, health: [135000000, 168750000, 216000000, 270000000, 0, 0]},
  3777. blood_dancer: {name: 'Blood Dancer', shortname: 'Blood Dancer', id: 'blood_dancer', type: 'Magical Creature, Colosseum', stat: 'S', size:100, nd:5, duration:48, health: [50000000000,100000000000,150000000000,200000000000,0,0], lt: ['danc','danc','danc','danc']},
  3778. bloodsuckers: {name: 'Bloodsuckers', shortname: 'Bloodsuckers', id: 'bloodsuckers', type: 'Insect', stat: 'S', size: 20, nd: 3, duration: 36, health: [17500000000,35000000000,52500000000,70000000000,0,0], lt: ['u','u','u','u']},
  3779. alice: {name: 'Bloody Alice', shortname: 'Alice', id: 'alice', type: 'Human', stat: 'S', size: 50, nd: 3, duration: 120, health: [15000000, 18750000, 24000000, 30000000, 0, 0]},
  3780. bog_bodies: {name: 'The Bog Bodies', shortname: 'Bog Bodies', id: 'bog_bodies', type: 'Magical Creature, Aquatic', stat: 'H', size:101, nd:5, duration:192, health: [3750000000,7500000000,11250000000,15000000000,0,0], lt: ['keron', 'keron', 'keron', 'keron']},
  3781. bogstench: {name: 'Bogstench', shortname: 'Bogstench', id: 'bogstench', type: 'Undead', stat: 'S', size: 250, nd: 5, duration: 96, health: [450000000, 562500000, 720000000, 900000000, 0, 0]},
  3782. '4ogre': {name: 'Briareus the Butcher', shortname: 'Briareus', id: '4ogre', type: 'Ogre', stat: 'S', size: 10, nd: 2, duration: 72, health: [4500000, 5625000, 7200000, 9000000, 0, 0]},
  3783. bmane: {name: 'Bloodmane', shortname: 'Bloodmane', id: 'bmane', type: 'Beastman, Ryndor', stat: 'S', size: 10, nd: 2, duration: 72, health: [7000000, 8750000, 11200000, 14000000, 0, 0]},
  3784. burbata: {name: 'Burbata the Spine-Crusher', shortname: 'Burbata', id: 'burbata', type: 'Beastman', stat: 'S', size: 250, nd: 5, duration: 96, health: [1000000000, 2000000000, 3500000000, 5000000000, 0, 0], lt: ['z10', 'z10', 'z10', 'z10']},
  3785. cannibal_barbarians: {name: 'Cannibal Barbarians', shortname: 'Cannibals', id: 'cannibal_barbarians', type: 'Human', stat: 'S', size: 500, nd: 6, duration: 128, health: [60000000000, 90000000000, 180000000000, 240000000000, 0, 0], lt: ['canib', 'canib', 'canib', 'canib']},
  3786. cedric: {name: 'Cedric the Smashable', shortname: 'Cedric', id: 'cedric', type: 'Construct', stat: 'ESH', size: 90000, nd: 0, duration: 24, health: ['Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited']},
  3787. caracalla: {name: 'Caracalla', shortname: 'Caracalla', id: 'caracalla', type: 'Undead, Underground', stat: 'S', size: 500, nd: 6, duration: 128, health: [50000000000, 75000000000, 150000000000, 200000000000, 0, 0], lt: ['cara', 'cara', 'cara', 'cara']},
  3788. harpy: {name: 'Celeano', shortname: 'Celeano', id: 'harpy', type: '', stat: 'H', size: 10, nd: 2, duration: 120, health: [3000000, 3750000, 4800000, 6000000, 0, 0]},
  3789. centurion_marius: {name: 'Centurion Marius', shortname: 'Marius', id: 'centurion_marius', type: 'Undead, Underground', stat: 'S', size: 250, nd: 5, duration: 96, health: [10000000000, 12000000000, 16000000000, 40000000000, 0, 0], lt: ['z10', 'z10', 'z10', 'z10']},
  3790. kobold: {name: 'Chieftain Horgrak', shortname: 'Horgrak', id: 'kobold', type: '', stat: 'S', size: 10, nd: 2, duration: 168, health: [150000, 187500, 240000, 300000, 0, 0]},
  3791. clockwork_dragon: {name: 'Clockwork Dragon', shortname: 'Clock Dragon', id: 'clockwork_dragon', type: 'Construct, Dragon', stat: 'S', size: 500, nd: 6, duration: 128, health: [70000000000, 140000000000, 210000000000, 280000000000], lt: ['clock', 'clock', 'clock', 'clock']},
  3792. clockwork_giant: {name: 'Clockwork Giant',shortname: 'Clockwork Giant',id: 'clockwork_giant', type: 'Construct, Giant', stat: 'H', size:100, nd:4, duration:12, health: [5000000000,10000000000,15000000000,20000000000,0,0], lt: ['cwg','cwg','cwg','cwg']},
  3793. corrupterebus: {name: 'Corrupted Erebus', shortname: 'Cbus', id: 'corrupterebus', type: 'Dragon', stat: 'ESH', size: 90000, nd: 0, duration: 96, health: ['Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited']},
  3794. corrupted_wilds: {name: 'Corrupted Wilds',shortname: 'Corrupted Wilds',id: 'corrupted_wilds', type: 'Magical Creature, Beast', stat: 'S', size:800, nd:6, duration:128, health: [325000000000,650000000000,975000000000,1300000000000,0,0], lt: ['wlds','wlds','wlds','wlds']},
  3795. serpina: {name: 'Countess Serpina', shortname: 'Serpina', id: 'serpina', type: 'Colosseum, Undead', stat: 'E', size: 15, nd: 2, duration: 5, health: [75000000, 112500000, 150000000, 187500000, 0, 0]},
  3796. damned_shade: {name: 'Damned Shade', shortname: 'Shade', id: 'damned_shade', type: 'Demon', stat: 'S', size: 40, nd: 4, duration: 48, health: [50000000000,100000000000,150000000000,200000000000,0,0], lt: ['shade','shade','shade','shade']},
  3797. war_damned_shade: {name: 'War Damned Shade', shortname: 'War Shade', id: 'war_damned_shade', type: 'War, Demon', stat: 'S', size: 100, nd: 4, duration: 24, health: [500000000000,0,0,0,0,0], lt: ['u','u','u','u']},
  3798. darhednal: {name: 'Dar\'Hed\'Nal', shortname: 'Dar\'Hed\'Nal', id: 'darhednal', type: 'Orc', stat: 'H', size: 50, nd: 3, duration: 144, health: [500000000, 1000000000, 1500000000, 2000000000, 0, 0], lt: ['keron', 'keron', 'keron', 'keron']},
  3799. basilisk: {name: 'Deathglare', shortname: 'Deathglare', id: 'basilisk', type: 'Beast', stat: 'H', size: 50, nd: 3, duration: 144, health: [45000000, 56250000, 72000000, 90000000, 0, 0]},
  3800. demonic_skeleton: {name: 'Demonic Skeleton', shortname: 'War Skel', id: 'demonic_skeleton', type: 'War, Demon, Undead', stat: 'S', size: 100, nd: 4, duration: 24, health: [1000000000000,0,0,0,0,0], lt: ['u','u','u','u']},
  3801. dirthax: {name: 'Dirthax', shortname: 'Dirthax', id: 'dirthax', type: 'Aquatic, Beast', stat: 'H', size: 100, nd: 4, duration: 168, health: [550000000, 687500000, 880000000, 1100000000, 0, 0]},
  3802. doomglare: {name: 'Doomglare', shortname: 'Doomglare', id: 'doomglare', type: 'Beast', stat: 'H', size: 100, nd: 4, duration: 12, health: [500000000, 1250000000, 2000000000, 3000000000, 0, 0], lt: ['keron', 'keron', 'keron', 'keron']},
  3803. doppelganger: {name: 'Doppelganger', shortname: 'Doppelganger', id: 'doppelganger', type: 'Magical Creature', stat: 'S', size:50, nd:5, duration:60, health: [12000000000,24000000000,36000000000,48000000000,0,0], lt: ['dopp','dopp','dopp','dopp']},
  3804. draconic_dreams: {name: 'Draconic Dreams', shortname: 'D. Dreams',id: 'draconic_dreams', type: 'Dragon', stat: 'S', size: 800, nd:6, duration:128, health: [500000000000,1000000000000,1500000000000,2000000000000,0,0], lt: ['drac','drac','drac','drac']},
  3805. dragons_lair: {name: 'Dragons Lair', shortname: 'Lair', id: 'dragons_lair', type: 'Dragon, Underground', stat: 'S', size: 13, nd: 2, duration: 5, health: [100000000, 500000000, 1000000000, 1500000000, 0, 0], lt: ['nDl', 'hDl', 'lDl', 'nmDl']},
  3806. drakes_fire_elemental: {name: 'Drake\'s Fire Elemental', shortname: 'Fire Elemental', id: 'drakes_fire_elemental', type: 'Magical Creature, Dragon', stat: 'H', size:50, nd:5, duration:48, health: [12000000000,16000000000,20000000000,24000000000,0,0], lt: ['fel','fel','fel','fel']},
  3807. drulcharus: {name: 'Drulcharus', shortname: 'Drulcharus', id: 'drulcharus', type: 'Dragon, Beastman', stat: 'S', size: 100, nd: 5, duration: 72, health: [10000000000, 15000000000, 20000000000, 25000000000, 0, 0], lt: ['z15hi', 'z15hi', 'z15hi', 'z15hi']},
  3808. drunken_ragunt: {name: 'Drunken Ragunt', shortname: 'Ragunt', id: 'drunken_ragunt', type: 'Siege, Ogre', stat: 'S', size: 50, nd: 5, duration: 60, health: [8500000000, 14450000000, 18700000000, 25500000000, 0, 0], lt: ['rag', 'rag', 'rag', 'rag']},
  3809. echidna: {name: 'Echidna', shortname: 'Echidna', id: 'echidna', type: 'Dragon, Siege', stat: 'ESH', size: 90000, nd: 0, duration: 96, health: ['Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited']},
  3810. elite_bloodsuckers: {name: 'Elite Bloodsuckers', shortname: 'E. Bloodsuckers', id: 'elite_bloodsuckers', type: 'Abyssal, Insect', stat: 'S', size: 25, nd: 2, duration: 18, health: [800000000000,800000000000,800000000000,800000000000,0,0], lt: ['u','u','u','u']},
  3811. elite_butcher: {name: 'Elite Butcher', shortname: 'E. Butcher', id: 'elite_butcher', type: 'Ogre, Nightmare Queen', stat: 'ES', size:20, nd: 2, duration: 12, health: [500000000000,500000000000,500000000000,500000000000,0,0], lt: ['ebut','ebut','ebut','ebut']},
  3812. elite_caster: {name: 'Elite Caster', shortname: 'E. Caster', id: 'elite_caster', type: 'Undead, Underground, Nightmare Queen', stat: 'ES', size: 25, nd: 2, duration: 18, health: [750000000000,750000000000,750000000000,750000000000,0,0], lt: ['ecas','ecas','ecas','ecas']},
  3813. elite_devourer: {name: 'Elite Devourer', shortname: 'Devourer', id: 'elite_devourer', type: 'Abyssal, Insect, Beast', stat: 'H', size: 100, nd: 5, duration: 48, health: [1500000000000,1500000000000,1500000000000,1500000000000,0,0], lt: ['u','u','u','u']},
  3814. elite_killers: {name: 'Elite Killers', shortname: 'E. Killers', id: 'elite_killers', type: 'Goblin, Orc, Nightmare Queen', stat: 'ES', size: 50, nd: 2, duration: 18, health: [1500000000000,1500000000000,1500000000000,1500000000000,0,0], lt: ['ekil','ekil','ekil','ekil']},
  3815. elite_lady: {name: 'Elite Lady Cecile',shortname: 'E. Lady',id: 'elite_lady', type: 'Undead, Underground, Nightmare Queen', stat: 'S', size:300, nd:4, duration:36, health: [18000000000000,18000000000000,18000000000000,18000000000000,0,0], lt: ['ecec','ecec','ecec','ecec']},
  3816. elite_malleus: {name: 'Elite Malleus', shortname: 'E. Malleus', id: 'elite_malleus', type: 'Undead, Beastman, Nightmare Queen', stat: 'ES', size: 200, nd: 4, duration: 32, health: [10000000000000,10000000000000,10000000000000,10000000000000,0,0], lt: ['emal','emal','emal','emal']},
  3817. elite_murderer: {name: 'Elite Murderer', shortname: 'E. Murderer', id: 'elite_murderer', type: 'Orc, Nightmare Queen', stat: 'ES', size: 100, nd: 3, duration: 24, health: [3750000000000,3750000000000,3750000000000,3750000000000,0,0], lt: ['emrd','emrd','emrd','emrd']},
  3818. elite_mangler: {name: 'Elite Mangler', shortname: 'E. Mangler', id: 'elite_mangler', type: 'Ogre, Nightmare Queen', stat: 'ES', size: 200, nd: 4, duration: 30, health: [8000000000000,8000000000000,8000000000000,8000000000000,0,0], lt: ['eman','eman','eman','eman']},
  3819. elite_reaper_mantis: {name: 'Elite Reaper', shortname: 'E. Reaper', id: 'elite_reaper_mantis', type: 'Abyssal, Insect', stat: 'S', size: 200, nd: 4, duration: 30, health: [12000000000000,12000000000000,12000000000000,12000000000000,0,0], lt: ['u','u','u','u']},
  3820. elite_riders: {name: 'Elite Riders', shortname: 'E. Riders', id: 'elite_riders', type: 'Goblin, Beast, Underground, Nightmare Queen', stat: 'ES', size: 125, nd:3, duration:30, health: [5000000000000,5000000000000,5000000000000,5000000000000,0,0], lt: ['erid','erid','erid','erid']},
  3821. elite_warrior: {name: 'Elite Warrior',shortname: 'E. Warrior', id: 'elite_warrior', type: 'Undead, Nightmare Queen', stat: 'ES', size:25, nd:2, duration:15, health: [1000000000000,1000000000000,1000000000000,1000000000000,0,0], lt: ['ewar','ewar','ewar','ewar']},
  3822. elite_whispers: {name: 'Elite Whispers', shortname: 'E. Whispers', id: 'elite_whispers', type: 'Undead, Nightmare Queen', stat: 'ES', size: 75, nd: 3, duration: 18, health: [2625000000000,2625000000000,2625000000000,2625000000000,0,0], lt: ['ewsp','ewsp','ewsp','ewsp']},
  3823. kessov_fort: {name: 'Engines of War', shortname: 'Engines of War', id: 'kessov_fort', type: 'Siege', stat: 'S', size: 800, nd: 6, duration: 128, health: [300000000000, 600000000000, 900000000000, 1200000000000, 0, 0], lt: ['eow', 'eow', 'eow', 'eow']},
  3824. erakka_sak: {name: 'Erakka-Sak', shortname: 'Erakka-Sak', id: 'erakka_sak', type: 'Underground, Construct', stat: 'S', size: 50, nd: 3, duration: 60, health: [62000000, 77500000, 99200000, 124000000, 0, 0]},
  3825. giantgolem: {name: 'Euphronios', shortname: 'Euphronios', id: 'giantgolem', type: 'Construct', stat: 'H', size: 101, nd: 5, duration: 168, health: [450000000, 562500000, 720000000, 900000000, 0, 0]},
  3826. euryino: {name: 'Euryino, The Fifth Terror', shortname: 'Euryino', id: 'euryino', type: 'Aquatic, Festival, Terror', stat: 'S', size:800, nd:6, duration:96, health: [900000000000,1800000000000,2700000000000,3600000000000,0,0], lt: ['eio','eio','eio','eio']},
  3827. echthros: {name: 'Echthros', shortname: 'Echty', id: 'echthros', type: '', stat: 'ESH', size: 90000, nd: 2, duration: 96, health: ['Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited']},
  3828. drag: {name: 'Erebus the Black', shortname: 'Erebus', id: 'drag', type: 'Dragon', stat: 'S', size: 250, nd: 5, duration: 168, health: [150000000, 187500000, 240000000, 300000000, 0, 0]},
  3829. faetouched_dragon: {name: 'Faetouched Dragon',shortname: 'Fae Dragon',id: 'faetouched_dragon', type: 'Magical Creature, Dragon', stat: 'H', size:100, nd:6, duration:48, health: [25000000000,33000000000,41000000000,50000000000,0,0], lt: ['fae','fae','fae','fae']},
  3830. frogmen_assassins: {name: 'Frog-Men Assassins', shortname: 'Frog-Men', id: 'frogmen_assassins', type: 'Beastman, Aquatic', stat: 'S', size: 250, nd: 5, duration: 96, health: [16000000000, 24000000000, 32000000000, 64000000000, 0, 0], lt: ['cara', 'cara', 'cara', 'cara']},
  3831. frost_the_snow_dragon: {name: 'Frost the Snow Dragon', shortname: 'Snow Drag', id: 'frost_the_snow_dragon', type: 'Winter, Dragon', stat: 'S', size: 20, nd: 3, duration: 96, health: [15000000000,30000000000,45000000000,60000000000,0,0], lt: ['frost','frost','frost','frost']},
  3832. the_frozen_spire: {name: 'The Frozen Spire', shortname: 'Frozen Spire', id: 'the_frozen_spire', type: 'Winter, Construct, Siege', stat: 'S', size: 300, nd: 5, duration: 72, health: [300000000000,600000000000,900000000000,1200000000000,0,0], lt: ['spire','spire','spire','spire']},
  3833. felendis: {name: 'Felendis & Shaoquin', shortname: 'Banhammer', id: 'felendis', type: 'Ogre', stat: 'H', size: 100, nd: 4, duration: 168, health: [441823718, 549238221, 707842125, 888007007, 0, 0]},
  3834. gataalli_huxac: {name: 'Gataalli Huxac', shortname: 'Gataalli', id: 'gataalli_huxac', type: 'Giant', stat: 'S', size: 800, nd: 6, duration: 128, health: [375000000000, 750000000000, 1125000000000, 1500000000000], lt: ['gat', 'gat', 'gat', 'gat']},
  3835. ogre: {name: 'General Grune', shortname: 'Grune', id: 'ogre', type: 'Ogre', stat: 'S', size: 100, nd: 4, duration: 172, health: [20000000, 25000000, 32000000, 40000000, 0, 0]},
  3836. korxun: {name: 'General Korxun', shortname: 'Korxun', id: 'korxun', type: 'Beastman, Ogre', stat: 'S', size: 50, nd: 4, duration: 60, health: [8000000000, 12000000000, 16000000000, 20000000000, 0, 0], lt: ['z15lo', 'z15lo', 'z15lo', 'z15lo']},
  3837. ghostly_alchemist: {name: 'Ghostly Alchemist', shortname: 'Alchemist', id: 'ghostly_alchemist', type: 'Undead', stat: 'S', size: 25, nd: 4, duration: 48, health: [5000000000, 10000000000, 15000000000, 20000000000], lt: ['alch', 'alch', 'alch', 'alch']},
  3838. dreadbloom: {name: 'Giant Dreadbloom', shortname: 'Dreadbloom', id: 'dreadbloom', type: 'Plant', stat: 'H', size: 101, nd: 5, duration: 192, health: [900000000, 1125000000, 1440000000, 1800000000, 0, 0]},
  3839. gigantomachy: {name: 'Gigantomachy', shortname: 'Gigantomachy', id: 'gigantomachy', type: 'Giant', stat: 'S', size: 100, nd: 5, duration: 72, health: [25000000000, 50000000000, 75000000000, 100000000000], lt: ['gig', 'gig', 'gig', 'gig']},
  3840. batman: {name: 'Gravlok the Night-Hunter', shortname: 'Gravlok', id: 'batman', type: 'Beastman', stat: 'S', size: 100, nd: 4, duration: 72, health: [50000000, 62500000, 80000000, 100000000, 0, 0]},
  3841. green_killers: {name: 'Green Killers', shortname: 'Green Killers', id: 'green_killers', type: 'Orc, Goblin, Festival, Colosseum', stat: 'S', size: 100, nd: 4, duration: 48, health: [12500000000, 25000000000, 37500000000, 50000000000, 0, 0], lt: ['gk', 'gk', 'gk', 'gk']},
  3842. evilgnome: {name: 'Groblar Deathcap', shortname: 'Groblar', id: 'evilgnome', type: '', stat: 'H', size: 10, nd: 2, duration: 120, health: [6000000, 7500000, 9600000, 12000000, 0, 0]},
  3843. grotesque_hybrid: {name: 'Grotesque Hybrid', shortname: 'Hybrid', id: 'grotesque_hybrid', type: 'Qwiladrian, Dragon', stat: 'S', size: 600, nd: 6, duration: 96, health: [550000000000,1100000000000,1650000000000,2200000000000,0,0], lt: ['hbr','hbr','hbr','hbr']},
  3844. grundus: {name: 'Grundus', shortname: 'Grundus', id: 'grundus', type: 'Dragon, Magical Creature', stat: 'H', size: 101, nd: 5, duration: 72, health: [800000000, 1600000000, 4000000000, 12000000000]},
  3845. guilbert: {name: 'Guilbert the Mad', shortname: 'Guilbert', id: 'guilbert', type: 'Underground, Human', stat: 'S', size: 250, nd: 5, duration: 96, health: [550000000, 687500000, 880000000, 1100000000, 0, 0]},
  3846. gulkinari: {name: 'Gulkinari', shortname: 'Gulkinari', id: 'gulkinari', type: 'Qwiladrian', stat: 'S', size: 50, nd: 4, duration: 60, health: [7500000000, 9375000000, 12000000000, 15000000000, 0, 0], lt: ['gulk', 'gulk', 'gulk', 'gulk']},
  3847. gunnar: {name: 'Gunnar the Berserk', shortname: 'Gunnar', id: 'gunnar', type: 'Bludheim, Human', stat: 'S', size: 10, nd: 2, duration: 48, health: [12000000, 15000000, 19200000, 24000000, 0, 0]},
  3848. war_boar: {name: 'Hammer', shortname: 'Hammer', id: 'war_boar', type: 'Beastman', stat: 'H', size: 50, nd: 3, duration: 144, health: [220000000, 275000000, 352000000, 440000000, 0, 0]},
  3849. hargamesh: {name: 'Hargamesh', shortname: 'Hargamesh', id: 'hargamesh', type: 'Beastman, Magical Creature', stat: 'S', size: 10, nd: 2, duration: 48, health: [18000000, 22500000, 28800000, 36000000, 0, 0]},
  3850. haunted_forest: {name: 'The Haunted Forest', shortname: 'Forest', id: 'haunted_forest', type: 'Undead, Plant', stat: 'S', size: 200, nd: 5, duration: 96, health: [110000000000,220000000000,330000000000,440000000000,0,0], lt: ['fst','fst','fst','fst']},
  3851. grimsly: {name: 'Headmaster Grimsly', shortname: 'Grimsly', id: 'grimsly', type: 'Magical Creature', stat: 'S', size: 50, nd: 3, duration: 60, health: [72000000, 90000000, 115200000, 144000000, 0, 0]},
  3852. hellemental: {name: 'Hellemental', shortname: 'Hellemental', id: 'hellemental', type: 'Demon', stat: 'S', size: 500, nd: 6, duration: 128, health: [75000000000, 150000000000, 225000000000, 300000000000, 0, 0], lt: ['hell', 'hell', 'hell', 'hell']},
  3853. horthania_stam: {name: 'Horthania the Grey', shortname: 'Horthania', id: 'horthania_stam', type: 'Dragon', stat: 'S', size:800, nd:6, duration:128, health: [500000000000,1000000000000,1500000000000,2000000000000,0,0], lt: ['hort','hort','hort','hort']},
  3854. hurkus: {name: 'Hurkus the Eviscerator', shortname: 'Hurkus', id: 'hurkus', type: 'Beastman', stat: 'S', size: 50, nd: 4, duration: 60, health: [2812500000, 4218750000, 5625000000, 11250000000, 0, 0], lt: ['hurk', 'hurk', 'hurk', 'hurk']},
  3855. hydra: {name: 'Hydra', shortname: 'Hydra', id: 'hydra', type: 'Ryndor, Beast', stat: 'S', size: 100, nd: 4, duration: 72, health: [65000000, 81250000, 104000000, 130000000, 0, 0]},
  3856. imryx: {name: 'Imryx the Incinerator', shortname: 'Imryx', id: 'imryx', type: 'Underground, Dragon', stat: 'S', size: 800, nd: 6, duration: 128, health: [180000000000, 360000000000, 540000000000, 720000000000, 0, 0], lt: ['imx', 'imx', 'imx', 'imx']},
  3857. ironclad: {name: 'Ironclad', shortname: 'Ironclad', id: 'ironclad', type: 'Undead', stat: 'S', size: 10, nd: 2, duration: 48, health: [10000000, 12500000, 16000000, 20000000, 0, 0]}, //0.5/0.625/0.8/1
  3858. pumpkin: {name: 'Jack', shortname: 'Jack', id: 'pumpkin', type: 'Human', stat: 'S', size: 250, nd: 6, duration: 48, health: [1000000000, 1500000000, 2000000000, 3000000000], lt: ['njack', 'hjack', 'ljack', 'nmjack']},
  3859. jacksrevenge1: {name: 'Jack\'s Revenge', shortname: 'Revenge', id: 'jacksrevenge1', type: 'Human', stat: 'S', size: 250, nd: 6, duration: 48, health: [5000000000, 7500000000, 10000000000, 15000000000], lt: ['njr', 'hjr', 'ljr', 'nmjr']},
  3860. jershan_thurns_portal: {name: 'Jershan\'thurn\'s Portal', shortname: 'Jershan\'thurn', id: 'jershan_thurns_portal', type: 'Festival, Demon', stat: 'S', size: 200, nd: 5, duration: 60, health: [250000000000,500000000000,750000000000,1000000000000,0,0], lt: ['u','u','u','u']},
  3861. jormungan_the_sea_storm_stam: {name: 'Jormungan the Sea-Storm', shortname: 'Jormungan', id: 'jormungan_the_sea_storm_stam', type: 'Dragon, Aquatic', stat: 'ES', size:800, nd:6, duration:128, health: [750000000000,1500000000000,2250000000000,3000000000000,0,0], lt: ['jorm','jorm','jorm','jorm']},
  3862. kang: {name: 'Kang-Gsod', shortname: 'Kang', id: 'kang', type: 'Bludheim, Underground, Beast', stat: 'S', size: 100, nd: 4, duration: 72, health: [95000000, 118750000, 152000000, 190000000, 0, 0]},
  3863. '3dawg': {name: 'Kerberos', shortname: 'Kerberos', id: '3dawg', type: 'Demon, Underground, Ryndor, Beast', stat: 'S', size: 50, nd: 3, duration: 72, health: [35000000, 43750000, 56000000, 70000000, 0, 0]},
  3864. keron: {name: 'Keron the Sky-Shaker', shortname: 'Keron', id: 'keron', type: 'Dragon', stat: 'H', size: 101, nd: 6, duration: 192, health: [15000000000, 18750000000, 24000000000, 30000000000, 0, 0], lt: ['keron', 'keron', 'keron', 'keron']},
  3865. kessovtowers: {name: 'Kessov Towers', shortname: 'Towers', id: 'kessovtowers', type: 'Siege', stat: 'ESH', size: 90000, nd: 0, duration: 120, health: ['Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited']},
  3866. kessovtower: {name: 'Treachery and the Tower', shortname: 'Treachery', id: 'kessovtower', type: 'Siege', stat: 'ESH', size: 90000, nd: 0, duration: 24, health: ['Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited']},
  3867. kessovforts: {name: 'Kessov Forts', shortname: 'Forts', id: 'kessovforts', type: 'Siege', stat: 'ESH', size: 90000, nd: 0, duration: 120, health: ['Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited']},
  3868. kessovcastle: {name: 'Kessov Castle', shortname: 'Castle', id: 'kessovcastle', type: 'Siege', stat: 'ESH', size: 90000, nd: 0, duration: 144, health: ['Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited']},
  3869. kalaxia: {name: 'Kalaxia the Far-Seer', shortname: 'Kalaxia', id: 'kalaxia', type: 'Dragon, Bludheim', stat: 'S', size: 500, nd: 6, duration: 96, health: [800000000, 1000000000, 1280000000, 1600000000, 0, 0]},
  3870. kanehuar_yachu: {name: 'Kanehuar Yachu', shortname: 'Kanehuar Yachu', id: 'kanehuar_yachu', type: 'Giant', stat: 'S', size: 500, nd: 6, duration: 128, health: [100000000000, 200000000000, 300000000000, 400000000000, 0, 0], lt: ['kane', 'kane', 'kane', 'kane']},
  3871. karkata: {name: 'Karkata', shortname: 'Karkata',id: 'karkata', type: 'Aquatic, Beast', stat: 'S', size:500, nd:6, duration:128, health: [95000000000,190000000000,285000000000,380000000000,0,0], lt: ['kark','kark','kark','kark']},
  3872. krugnug: {name: 'Krugnug', shortname: 'Krugnug', id: 'krugnug', type: 'Beastman', stat: 'S', size: 25, nd: 4, duration: 48, health: [1000000000, 1500000000, 2000000000, 4000000000, 0, 0], lt: ['z10', 'z10', 'z10', 'z10']},
  3873. krxunara: {name: 'Kr\'xunara of the Bloody Waves', shortname: 'Kr\'xunara', id: 'krxunara', type: 'Aquatic, Demon', stat: 'S', size: 500, nd: 6, duration: 128, health: [62500000000, 125000000000, 187500000000, 250000000000], lt: ['krx', 'krx', 'krx', 'krx']},
  3874. krykagrius: {name: 'Krykagrius', shortname: 'Krykagrius', id: 'krykagrius', type: 'Dragon', stat: 'ESH', size: 90000, nd: 0, duration: 72, health: ['Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited']},
  3875. legion_of_darkness: {name: 'Legions of Darkness', shortname: 'Darkness', id: 'legion_of_darkness', type: 'Human', stat: 'S', size: 250, nd: 5, duration: 96, health: [20000000000, 40000000000, 60000000000, 80000000000], lt: ['dark', 'dark', 'dark', 'dark']},
  3876. leonine_watcher: {name: 'Leonine', shortname: 'Leonine', id: 'leonine_watcher', type: 'Underground, Construct', stat: 'S', size: 100, nd: 5, duration: 48, health: [4000000000, 6000000000, 8000000000, 16000000000, 0, 0], lt: ['z10', 'z10', 'z10', 'z10']},
  3877. lord_hoton_the_usurper: {name: 'Lord Hoton the Usurper', shortname: 'Lord Hoton', id: 'lord_hoton_the_usurper', type: 'Human', stat: 'S', size: 100, nd: 4, duration: 48, health: [175000000000,350000000000,525000000000,700000000000,0,0], lt: ['u','u','u','u']},
  3878. tyranthius: {name: 'Lord Tyranthius', shortname: 'Tyranthius', id: 'tyranthius', type: 'Demon, Ryndor', stat: 'S', size: 500, nd: 6, duration: 168, health: [600000000, 750000000, 960000000, 1200000000, 0, 0]},
  3879. lunacy: {name: 'Lunatics', shortname: 'Lunatics', id: 'lunacy', type: 'Demon, Human', stat: 'H', size: 50, nd: 3, duration: 144, health: [180000000, 225000000, 288000000, 360000000, 0, 0]},
  3880. lurker: {name: 'Lurking Horror', shortname: 'Lurking Horror', id: 'lurker', type: 'Underground, Aquatic, Beast', stat: 'S', size: 100, nd: 4, duration: 120, health: [35000000, 43750000, 56000000, 70000000, 0, 0]},
  3881. malleus: {name: 'Malleus Vivorum', shortname: 'Malleus', id: 'malleus', type: 'Beastman, Undead', stat: 'S', size: 100, nd: 5, duration: 72, health: [8000000000, 12000000000, 16000000000, 20000000000, 0, 0], lt: ['mall', 'mall', 'mall', 'mall']},
  3882. maraak: {name: 'Maraak the Impaler', shortname: 'Maraak', id: 'maraak', type: 'Underground', stat: 'S', size: 10, nd: 2, duration: 48, health: [15000000, 18750000, 24000000, 30000000, 0, 0]},
  3883. marble_colossus: {name: 'Marble Colossus', shortname: 'Colossus', id: 'marble_colossus', type: 'Construct, Colosseum', stat: 'S', size:250, nd:6, duration:84, health: [30000000000,60000000000,90000000000,120000000000,0,0], lt: ['marb','marb','marb','marb']},
  3884. mardachus: {name: 'Mardachus the Destroyer', shortname: 'Mardachus', id: 'mardachus', type: 'Dragon', stat: 'S', size: 500, nd: 6, duration: 96, health: [1100000000, 1375000000, 1760000000, 2200000000, 0, 0]},
  3885. master_ninja_bakku: {name: 'Master Ninja Bakku', shortname: 'Bakku', id: 'master_ninja_bakku', type: 'Goblin', stat: 'S', size: 25, nd: 4, duration: 48, health: [5500000000, 11000000000, 16500000000, 22000000000, 0, 0], lt: ['bak', 'bak', 'bak', 'bak']},
  3886. scorp: {name: 'Mazalu', shortname: 'Mazalu', id: 'scorp', type: 'Beastman', stat: 'S', size: 50, nd: 3, duration: 168, health: [5000000, 6250000, 8000000, 10000000, 0, 0]},
  3887. mestr_rekkr_rematch: {name: 'Mestr Rekkr Rematch', shortname: 'Rekkr II', id: 'mestr_rekkr_rematch', type: 'Human', stat: 'S', size: 25, nd: 4, duration: 48, health: [6000000000, 9000000000, 13200000000, 18000000000, 0, 0], lt: ['rekkr', 'rekkr', 'rekkr', 'rekkr']},
  3888. mesyra: {name: 'Mesyra the Watcher', shortname: 'Mesyra', id: 'mesyra', type: 'Dragon', stat: 'S', size: 250, nd: 5, duration: 96, health: [1000000000, 1250000000, 1600000000, 2000000000, 0, 0]},
  3889. murgrux_the_mangler: {name: 'Murgrux the Mangler', shortname: 'Murgrux', id: 'murgrux_the_mangler', type: 'Ogre, Festival', stat: 'S', size: 250, nd: 5, duration: 48, health: [25000000000, 50000000000, 75000000000, 100000000000, 0, 0], lt: ['murg', 'murg', 'murg', 'murg']},
  3890. nalagarst: {name: 'Nalagarst', shortname: 'Nalagarst', id: 'nalagarst', type: 'Dragon, Undead', stat: 'S', size: 500, nd: 6, duration: 98, health: [700000000, 875000000, 1120000000, 1400000000, 0, 0]},
  3891. nereidon: {name: 'Nereidon the Sea Slayer', shortname: 'Nereidon', id: 'nereidon', type: 'Dragon, Beastman, Aquatic', stat: 'S', size: 30, nd: 3, duration: 48, health: [6000000000, 9000000000, 12000000000, 15000000000, 0, 0], lt: ['z15lo', 'z15lo', 'z15lo', 'z15lo']},
  3892. nidhogg: {name: 'Nidhogg', shortname: 'Nidhogg', id: 'nidhogg', type: 'Bludheim, Aquatic, Beast', stat: 'S', size: 50, nd: 3, duration: 60, health: [52000000, 65000000, 83200000, 104000000, 0, 0]},
  3893. nimrod: {name: 'Nimrod the Hunter', shortname: 'Nimrod', id: 'nimrod', type: 'Dragon', stat: 'S', size: 250, nd: 5, duration: 96, health: [1200000000, 1500000000, 1920000000, 2400000000, 0, 0]},
  3894. nylatrix: {name: 'Nylatrix', shortname: 'Nylatrix', id: 'nylatrix', type: 'Dragon', stat: 'H', size: 101, nd: 5, duration: 192, health: [2000000000, 2500000000, 3400000000, 4000000000, 0, 0], lt: ['nker', 'hker', 'lker', 'nmker']},
  3895. odius_pods: {name: 'Odious Pods', shortname: 'Pods', id: 'odius_pods', type: 'Demon, Plant', stat: 'S', size: 200, nd: 5, duration: 60, health: [175000000000,350000000000,525000000000,700000000000,0,0], lt: ['u','u','u','u']},
  3896. paracoprion: {name: 'Paracoprion', shortname: 'Paracoprion', id: 'paracoprion', type: 'Aquatic, Beast', stat: 'H', size:101, nd:5, duration:192, health: [2000000000,4000000000,6000000000,8000000000,0,0], lt: ['keron', 'keron', 'keron', 'keron']},
  3897. phaedra: {name: 'Phaedra the Deceiver', shortname: 'Phaedra', id: 'phaedra', type: 'Dragon', stat: 'S', size: 250, nd: 5, duration: 96, health: [1400000000, 1750000000, 2240000000, 2800000000, 0, 0]},
  3898. fairy_prince: {name: 'Prince Obyron', shortname: 'Obyron', id: 'fairy_prince', type: 'Magical Creature', stat: 'H', size: 10, nd: 2, duration: 120, health: [30000000, 37500000, 48000000, 60000000, 0, 0]},
  3899. possessed_cadaver: {name: 'Possessed Cadaver', shortname: 'War Cadav', id: 'possessed_cadaver', type: 'War, Human, Demon', stat: 'S', size: 100, nd: 4, duration: 24, health: [1000000000000,0,0,0,0,0], lt: ['u','u','u','u']},
  3900. prison_of_fear: {name: 'Prison of Fear',shortname: 'Fear', id: 'prison_of_fear', type: 'Magical Creature, Nightmate Queen', stat: 'ES', size:400, nd:5, duration:48, health: [2500000000000,5000000000000,7500000000000,10000000000000,0,0], lt: ['pof','pof','pof','pof']},
  3901. qwiladrian_sporeforms: {name: 'Qwiladrian Sporeforms', shortname: 'Sporeforms', id: 'qwiladrian_sporeforms', type: 'Qwiladrian, Plant', stat: 'S', size: 100, nd: 4, duration: 60, health: [100000000000,200000000000,300000000000,400000000000,0,0], lt: ['spr','spr','spr','spr']},
  3902. qwiladrian_stormship: {name: 'Qwiladrian Stormship', shortname: 'Stormship', id: 'qwiladrian_stormship', type: 'Qwiladrian', stat: 'S', size: 200, nd: 4, duration: 60, health: [150000000000,300000000000,450000000000,600000000000,0,0], lt: ['strm','strm','strm','strm']},
  3903. roc: {name: 'Ragetalon', shortname: 'Ragetalon', id: 'roc', type: 'Beast', stat: 'H', size: 100, nd: 4, duration: 168, health: [110000000, 137500000, 176000000, 220000000, 0, 0]},
  3904. rannveig: {name: 'Rannveig', shortname: 'Rannveig', id: 'rannveig', type: 'Human', stat: 'E', size: 250, nd: 6, duration: 128, health: [15000000000, 30000000000, 45000000000, 60000000000, 0, 0], lt: ['rann', 'rann', 'rann', 'rann']},
  3905. reaper_mantis: {name: 'Reaper Mantis', shortname: 'Mantis', id: 'reaper_mantis', type: 'Insect', stat: 'S', size: 200, nd: 5, duration: 60, health: [200000000000,400000000000,600000000000,800000000000,0,0], lt: ['u','u','u','u']},
  3906. red_snow: {name: 'Red Snow', shortname: 'Red Snow', id: 'red_snow', type: 'Winter, Demon', stat: 'S', size: 600, nd: 6, duration: 96, health: [625000000000,1250000000000,1875000000000,2500000000000,0,0], lt: ['red','red','red','red']},
  3907. rhalmarius_the_despoiler: {name: 'Rhalmarius the Despoiler', shortname: 'Rhalmarius', id: 'rhalmarius_the_despoiler', type: 'Dragon', stat: 'H', size: 100, nd: 6, duration: 84, health: [500000000, 1250000000, 3125000000, 7812500000, 0, 0]},
  3908. tomb_gargoyle: {name: 'Riddler Gargoyle', shortname: 'Riddler', id: 'tomb_gargoyle', type: 'Underground, Construct', stat: 'S', size: 50, nd: 4, duration: 48, health: [2000000000, 3000000000, 4000000000, 8000000000, 0, 0], lt: ['z10', 'z10', 'z10', 'z10']},
  3909. rift: {name: 'Rift the Mauler', shortname: 'Rift', id: 'rift', type: 'Magical Creature', stat: 'S', size: 100, nd: 4, duration: 72, health: [125000000, 156250000, 200000000, 250000000, 0, 0]},
  3910. rudaru_the_axe_master: {name: 'Rudaru the Axe Master', shortname: 'Rudaru', id: 'rudaru_the_axe_master', type: 'Orc', stat: 'S', size: 50, nd: 4, duration: 48, health: [10500000000, 21000000000, 31500000000, 36750000000, 0, 0], lt: ['rud', 'rud', 'rud', 'rud']},
  3911. ruzzik: {name: 'Ruzzik the Slayer', shortname: 'Ruzzik', id: 'ruzzik', type: 'Beastman', stat: 'S', size: 500, nd: 6, duration: 128, health: [55000000000, 82500000000, 165000000000, 220000000000, 0, 0], lt: ['ruzz', 'ruzz', 'ruzz', 'ruzz']},
  3912. salome: {name: 'Salome the Seductress', shortname: 'Salome', id: 'salome', type: 'Demon, Underground', stat: 'H', size: 100, nd: 4, duration: 48, health: [666000000, 832500000, 1065600000, 1332000000, 0, 0], lt: ['nSlut', 'hSlut', 'lSlut', 'nmSlut']},
  3913. crabshark: {name: 'Scuttlegore', shortname: 'Scuttlegore', id: 'crabshark', type: 'Colosseum, Aquatic, Beast', stat: 'H', size: 100, nd: 4, duration: 168, health: [220000000, 275000000, 352000000, 440000000, 0, 0]},
  3914. squid: {name: 'Scylla', shortname: 'Scylla', id: 'squid', type: 'Beastman, Aquatic', stat: 'S', size: 50, nd: 3, duration: 72, health: [25000000, 31250000, 40000000, 50000000, 0, 0]},
  3915. shaar: {name: 'Shaar the Reaver', shortname: 'Shaar', id: 'shaar', type: 'Beastman', stat: 'S', size: 250, nd: 6, duration: 96, health: [12000000000, 24000000000, 36000000000, 60000000000, 0, 0], lt: ['z15hi', 'z15hi', 'z15hi', 'z15hi']},
  3916. shadow: {name: 'Shadow', shortname: 'Shadow', id: 'shadow', type: 'Magical Creature', stat: 'S', size: 50, nd: 5, duration: 60, health: [10000000000, 17000000000, 25000000000, 35000000000, 0, 0], lt: ['shd', 'shd', 'shd', 'shd']},
  3917. sircai: {name: 'Sir Cai', shortname: 'Sir Cai', id: 'sircai', type: 'Demon, Ryndor', stat: 'S', size: 250, nd: 5, duration: 168, health: [350000000, 437500000, 560000000, 700000000, 0, 0]},
  3918. sisters: {name: 'Sisters of the Song', shortname: 'Sisters', id: 'sisters', type: 'Magical Creature', stat: 'S', size: 250, nd: 5, duration: 96, health: [600000000, 750000000, 960000000, 1200000000, 0, 0]},
  3919. slaughterers: {name: 'Slaughterers Six', shortname: 'Slaughterers', id: 'slaughterers', type: 'Human', stat: 'H', size: 10, nd: 2, duration: 120, health: [24000000, 30000000, 38400000, 48000000, 0, 0]},
  3920. stein: {name: 'Stein', shortname: 'Stein', id: 'stein', type: 'Undead, Underground, Construct', stat: 'S', size: 100, nd: 4, duration: 72, health: [80000000, 100000000, 128000000, 160000000, 0, 0]},
  3921. siculus: {name: 'Count Siculus\' Phantom', shortname: 'Siculus', id: 'siculus', type: 'Undead', stat: 'S', size: 500, nd: 6, duration: 128, health: [850000000, 1700000000, 2975000000, 4250000000, 0, 0], lt: ['sic', 'sic', 'sic', 'sic']},
  3922. soldier_ants: {name: 'Soldier Ants', shortname: 'Ants', id: 'soldier_ants', type: 'Guild, Abyssal, Insect', stat: 'H', size: 50, nd: 4, duration: 12, health: [25000000000,50000000000,75000000000,100000000000,0,0], lt: ['u','u','u','u']},
  3923. tainted: {name: 'Tainted Erebus', shortname: 'Tainted', id: 'tainted', type: 'Dragon', stat: 'S', size: 250, nd: 5, duration: 168, health: [250000000, 312500000, 400000000, 500000000, 0, 0]},
  3924. tenebra: {name: 'Tenebra Shadow Mistress', shortname: 'Tenebra', id: 'tenebra', type: 'Dragon', stat: 'S', size: 500, nd: 6, duration: 128, health: [2000000000, 2500000000, 3200000000, 4000000000, 0, 0]},
  3925. thaltherda: {name: 'Thaltherda the Sea-Slitherer', shortname: 'Thaltherda', id: 'thaltherda', type: 'Aquatic, Dragon', stat: 'S', size: 25, nd: 4, duration: 48, health: [3000000000, 4500000000, 6000000000, 7500000000, 0, 0], lt: ['nessy', 'nessy', 'nessy', 'nessy']},
  3926. the_thaw_of_elvigar: {name: 'The Thaw of Elvigar', shortname: 'Thaw of Elvigar', id: 'the_thaw_of_elvigar', type: 'Winter, Undead', stat: 'S', size: 100, nd: 4, duration: 60, health: [150000000000,300000000000,450000000000,600000000000,0,0], lt: ['elv','elv','elv','elv']},
  3927. thratus_abomination: {name: 'Thratu\'s Abomination', shortname: 'Abomination',id: 'thratus_abomination', type: 'Construct', stat: 'S', size:500, nd:6, duration:128, health: [90000000000,180000000000,270000000000,360000000000,0,0], lt: ['abo','abo','abo','abo']},
  3928. tisiphone: {name: 'Tisiphone the Vengeful', shortname: 'Tisiphone', id: 'tisiphone', type: 'Dragon, Colosseum', stat: 'E', size: 50, nd: 3, duration: 12, health: [500000000, 2500000000, 5000000000, 7500000000, 0, 0], lt: ['nTisi', 'hTisi', 'lTisi', 'nmTisi']},
  3929. teremarthu: {name: 'Teremarthu', shortname: 'Teremarthu', id: 'teremarthu', type: 'Qwiladrian', stat: 'S', size: 100, nd: 5, duration: 48, health: [6000000000, 9000000000, 12000000000, 24000000000, 0, 0], lt: ['z10', 'z10', 'z10', 'z10']},
  3930. chimera: {name: 'Tetrarchos', shortname: 'Tetrarchos', id: 'chimera', type: 'Colosseum, Beast', stat: 'H', size: 50, nd: 3, duration: 144, health: [90000000, 112500000, 144000000, 180000000, 0, 0]},
  3931. gorgon: {name: 'Tithrasia', shortname: 'Tithrasia', id: 'gorgon', type: '', stat: 'H', size: 10, nd: 2, duration: 120, health: [18000000, 22500000, 28800000, 36000000, 0, 0]},
  3932. trekex: {name: 'Trekex\'s Amphibious Assault', shortname: 'Trekex', id: 'trekex', type: 'Aquatic, Beastman', stat: 'S', size: 800, nd: 6, duration: 128, health: [250000000000, 500000000000, 750000000000, 1000000000000], lt: ['trex', 'trex', 'trex', 'trex']},
  3933. tuxargus: {name: 'Tuxargus', shortname: 'Tuxargus', id: 'tuxargus', type: 'Dragon', stat: 'H', size: 101, nd: 5, duration: 192, health: [2000000000, 2500000000, 3400000000, 4000000000, 0, 0], lt: ['nker', 'hker', 'lker', 'nmker']},
  3934. ulfrik: {name: 'Ulfrik', shortname: 'Ulfrik', id: 'ulfrik', type: 'Bludheim, Siege, Human', stat: 'S', size: 250, nd: 5, duration: 96, health: [500000000, 625000000, 800000000, 1000000000, 0, 0]},
  3935. unholy_rite: {name: 'Unholy Rite', shortname: 'Unholy Rite', id: 'unholy_rite', type: 'Guild, Human, Demon', stat: 'H', size: 10, nd: 3, duration: 48, health: [25000000000,33000000000,41000000000,50000000000,0,0], lt: ['u','u','u','u']},
  3936. valanazes: {name: 'Valanazes the Gold', shortname: 'Valanazes', id: 'valanazes', type: 'Dragon', stat: 'S', size: 500, nd: 6, duration: 128, health: [2400000000, 3000000000, 3840000000, 4800000000, 0, 0]},
  3937. valley_of_death: {name: 'Valley of Death', shortname: 'Valley of Death', id: 'valley_of_death', type: 'Ogre, Festival', stat: 'S', size: 250, nd: 5, duration: 48, health: [22000000000, 44000000000, 66000000000, 88000000000, 0, 0], lt: ['valley', 'valley', 'valley', 'valley']},
  3938. valtrias: {name: 'Valtrias', shortname: 'Valtrias', id: 'valtrias', type: 'Demon', stat: 'S', size:25, nd:4, duration:48, health: [6250000000, 12500000000, 18750000000, 25000000000, 0, 0], lt: ['val','val','val','val']},
  3939. blobmonster: {name: 'Varlachleth', shortname: 'Varlachleth', id: 'blobmonster', type: 'Demon', stat: 'H', size: 100, nd: 4, duration: 168, health: [330000000, 412500000, 528000000, 660000000, 0, 0]},
  3940. verkiteia: {name: 'Verkiteia', shortname: 'Verkiteia', id: 'verkiteia', type: 'Dragon', stat: 'S', size: 100, nd: 5, duration: 72, health: [11250000000, 14062500000, 18000000000, 22500000000, 0, 0], lt: ['verk', 'verk', 'verk', 'verk']},
  3941. vineborn_behemoth: {name: 'Vineborn Behemoth', shortname: 'Behemoth', id: 'vineborn_behemoth', type: 'Plant', stat: 'S', size:500, nd:6, duration:96, health: [200000000000,400000000000,600000000000,800000000000,0,0], lt: ['bhm','bhm','bhm','bhm']},
  3942. vortex_abomination: {name: 'Vortex Abomination', shortname: 'Vortex', id: 'vortex_abomination', type: 'Qwiladrian, Magical Creature', stat: 'S', size: 500, nd: 6, duration: 128, health: [50000000000, 75000000000, 110000000000, 205000000000, 0, 0], lt: ['vort', 'vort', 'vort', 'vort']},
  3943. zugen: {name: 'Warlord Zugen', shortname: 'Zugen', id: 'zugen', type: 'Ogre', stat: 'S', size: 25, nd: 4, duration: 48, health: [4000000000, 6000000000, 8000000000, 10000000000, 0, 0], lt: ['zugen', 'zugen', 'zugen', 'zugen']},
  3944. war_swarm: {name: 'War Swarm', shortname: 'War Swarm', id: 'war_swarm', type: 'War, Abyssal, Insect', stat: 'S', size: 100, nd: 4, duration: 24, health: [1000000000000,1000000000000,1000000000000,1000000000000,0,0], lt: ['u','u','u','u']},
  3945. war_bloodsuckers: {name: 'War Bloodsuckers', shortname: 'War Bloodsuckers', id: 'war_bloodsuckers', type: 'War, Abyssal, Insect', stat: 'S', size: 100, nd: 4, duration: 24, health: [1000000000000,1000000000000,1000000000000,1000000000000,0,0], lt: ['u','u','u','u']},
  3946. war_soldier_ants: {name: 'War Soldier Ants', shortname: 'War Soldier Ants', id: 'war_soldier_ants', type: 'War, Abyssal, Insect', stat: 'S', size: 100, nd: 4, duration: 24, health: [500000000000,500000000000,500000000000,500000000000,0,0], lt: ['u','u','u','u']},
  3947. way_warden: {name: 'Way Warden', shortname: 'Way Warden', id: 'way_warden', type: 'Magical Creature', stat: 'S', size:500, nd:6, duration:128, health: [115000000000,230000000000,345000000000,460000000000,0,0], lt: ['way','way','way','way']},
  3948. wexxa: {name: 'Wexxa the Worm-Tamer', shortname: 'Wexxa', id: 'wexxa', type: 'Underground, Beast', stat: 'S', size: 100, nd: 4, duration: 72, health: [110000000, 137500000, 176000000, 220000000, 0, 0]},
  3949. winter_kessov: {name: 'Blood Will Run Cold', shortname: 'Cold Blood', id: 'winter_kessov', type: 'Dragon, Siege', stat: 'ESH', size: 90000, nd: 0, duration: 290, health: ['Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited']},
  3950. xessus: {name: 'Xessus of the Grim Wood', shortname: 'Xessus', id: 'xessus', type: '', stat: 'H', size: 100, nd: 4, duration: 48, health: [500000000, 625000000, 800000000, 1000000000, 0, 0], lt: ['nIns', 'hIns', 'lIns', 'nmIns']},
  3951. malchar: {name: 'Malchar the Tri-Eyed', shortname: 'Malchar', id: 'malchar', type: 'Demon', stat: 'H', size: 100, nd: 4, duration: 48, health: [500000000, 625000000, 800000000, 1000000000, 0, 0], lt: ['nIns', 'hIns', 'lIns', 'nmIns']},
  3952. krasgore: {name: 'Krasgore', shortname: 'Krasgore', id: 'krasgore', type: '', stat: 'H', size: 100, nd: 4, duration: 48, health: [500000000, 625000000, 800000000, 1000000000, 0, 0], lt: ['nIns', 'hIns', 'lIns', 'nmIns']},
  3953. nrlux: {name: 'N\'rlux the Devourer', shortname: 'N\'rlux', id: 'nrlux', type: 'Giant Insect, Beast', stat: 'H', size: 100, nd: 6, duration: 48, health: [10000000000, 12500000000, 16000000000, 20000000000, 0, 0], lt: ['lux', 'lux', 'lux', 'lux']},
  3954. xerkara: {name: 'Xerkara', shortname: 'Xerkara', id: 'xerkara', type: 'Dragon', stat: 'S', size: 500, nd: 6, duration: 128, health: [65000000000, 113750000000, 143000000000, 260000000000, 0, 0], lt: ['z15hi', 'z15hi', 'z15hi', 'z15hi']},
  3955. yule_present_bearer: {name: 'Yule Present Bearer', shortname: 'Present Bearer', id: 'yule_present_bearer', type: 'Human', stat: 'S', size: 100, nd: 5, duration: 48, health: [30000000000, 60000000000, 90000000000, 120000000000, 0, 0], lt: ['yule', 'yule', 'yule', 'yule']},
  3956. yule_punishment_bearer: {name: 'Yule Punishment Bearer', shortname: 'Punishment', id: 'yule_punishment_bearer', type: 'Human, Winter', stat: 'S', size: 50, nd: 4, duration: 48, health: [30000000000,60000000000,90000000000,120000000000,0,0], lt: ['yule2','yule2','yule2','yule2']},
  3957. yydians_sanctuary: {name: 'Yydian\'s Sanctuary', shortname: 'Yydian', id: 'yydians_sanctuary', type: 'Siege, Construct', stat: 'S', size: 250, nd: 5, duration: 96, health: [10000000000, 20000000000, 30000000000, 50000000000, 0, 0], lt: ['yyd', 'yyd', 'yyd', 'yyd']},
  3958. zombiehorde: {name: 'Zombie Horde', shortname: 'Zombies', id: 'zombiehorde', type: 'Undead', stat: 'S', size: 50, nd: 3, duration: 60, health: [45000000, 56250000, 72000000, 90000000, 0, 0]},
  3959. zralkthalat: {name: 'Z\'ralk\'thalat', shortname: 'Z\'ralk\'thalat', id: 'zralkthalat', type: 'Demon', stat: 'S', size: 100, nd: 4, duration: 72, health: [8750000000, 13125000000, 17500000000, 35000000000, 0, 0], lt: ['z10', 'z10', 'z10', 'z10']},
  3960. initiates_of_the_abyss: {name: 'Initiates of the Abyss', shortname: 'Initiates', id: 'initiates_of_the_abyss', type: 'Aquatic', stat: 'S', size: 100, nd: 4, duration: 48, health: [200000000000,400000000000,600000000000,800000000000,0,0], lt: ['u','u','u','u']},
  3961. elite_initiates: {name: 'Elite Initiates', shortname: 'E. Initiates', id: 'elite_initiates', type: 'Abyssal, Aquatic', stat: 'S', size: 100, nd: 4, duration: 26, health: [6000000000000,6000000000000,6000000000000,6000000000000,0,0], lt: ['u','u','u','u']},
  3962. hullbore_worms: {name: 'Hullbore Wyrms', shortname: 'Hullbore Wyrms', id: 'hullbore_worms', type: 'Guild, Abyssal, Aquatic', stat: 'H', size: 100, nd: 4, duration: 48, health: [30000000000,45000000000,60000000000,75000000000,0,0], lt: ['u','u','u','u']},
  3963. elite_5th_terror: {name: 'Elite 5th Terror', shortname: 'E. 5th Terror', id: 'elite_5th_terror', type: 'Abyssal, Aquatic, Terror, Festival', stat: 'S', size: 300, nd: 5, duration: 48, health: [30000000000000,30000000000000,30000000000000,30000000000000,0,0], lt: ['u','u','u','u']},
  3964. elite_karkata: {name: 'Elite Karkata', shortname: 'E. Karkata', id: 'elite_karkata', type: 'Abyssal, Aquatic', stat: 'S', size: 300, nd: 4, duration: 36, health: [20000000000000,20000000000000,20000000000000,20000000000000,0,0], lt: ['u','u','u','u']},
  3965. elite_slitherer: {name: 'Elite Slitherer', shortname: 'E. Slitherer', id: 'elite_slitherer', type: 'Abyssal, Aquatic, Dragon', stat: 'S', size: 20, nd: 2, duration: 18, health: [1000000000000,1000000000000,1000000000000,1000000000000,0,0], lt: ['u','u','u','u']},
  3966. the_sight_of_solus: {name: 'The Sight of Solus', shortname: 'Sight of Solus', id: 'the_sight_of_solus', type: 'Dragon', stat: 'S', size: 20, nd: 1, duration: 36, health: [25000000000,50000000000,75000000000,100000000000,0,0], lt: ['u','u','u','u']},
  3967. engine_of_the_ancients: {name: 'Engine of the Ancients', shortname: 'Engine of the Ancients', id: 'engine_of_the_ancients', type: 'Construct', stat: 'S', size: 250, nd: 5, duration: 72, health: [400000000000,800000000000,1200000000000,1600000000000,0,0], lt: ['u','u','u','u']},
  3968. ascendants_echo: {name: 'Ascendant\'s Echo', shortname: 'Ascendant\'s Echo', id: 'ascendants_echo', type: 'Magical Creature', stat: 'S', size: 50, nd: 3, duration: 48, health: [75000000000,150000000000,225000000000,300000000000,0,0], lt: ['u','u','u','u']},
  3969. drakontos_the_first_terror: {name: 'Drakontos, The First Terror', shortname: 'Drakontos', id: 'drakontos_the_first_terror', type: 'Aquatic, Dragon, Terror', stat: 'S', size: 500, nd: 6, duration: 96, health: [1250000000000,2500000000000,3750000000000,5000000000000,0,0], lt: ['u','u','u','u']}
  3970. },
  3971.  
  3972. raidSizes: {
  3973. 10: { name: 'Small', ratios: [0.6, 0.9, 1.2, 1.6, 2.5, 3.5], enames: ['1E6T', '1E8T', '2E', '2/3E', '3E', '3/4E'] },
  3974. 13: { name: 'Small' },
  3975. 15: { name: 'Small', ratios: [0.45, 0.6, 0.755, 0.9, 1.05, 1.2, 1.35, 1.5, 1.65, 1.8, 1.95], enames: ['65D', '92D', '119D', '146D', '173D', '200D', '227D', '264D', '301D', '338D', '375D'] },
  3976. 20: { name: 'Small' },
  3977. 25: { name: 'Small' },
  3978. 30: { name: 'Small' },
  3979. 40: { name: 'Medium' },
  3980. 50: { name: 'Medium', ratios: [0.7, 0.95, 2.05, 3.125, 6.75, 8.5], enames: ['1E6T', '1E8T', '2E', '2/3E', '3E', '3/4E'] },
  3981. 75: { name: 'Medium'},
  3982. 100: { name: 'Large', ratios: [0.9, 1.5, 2.2, 3.2, 6.5, 9.0], enames: ['1E6T', '1E8T', '2E', '2/3E', '3E', '3/4E'] },
  3983. 101: { name: 'Epic', ratios: [0.225, 0.325, 0.625, 1.775, 4.525, 10.25], enames: ['1E6T', '1E8T', '2E', '2/3E', '3E', '3/4E'] },
  3984. 125: { name: 'Large'},
  3985. 200: { name: 'Epic' },
  3986. 250: { name: 'Epic', ratios: [0.225, 0.325, 0.625, 1.775, 4.525, 10.25], enames: ['1E6T', '1E8T', '2E', '2/3E', '3E', '3/4E'] },
  3987. 300: { name: 'Colossal'},
  3988. 400: { name: 'Colossal'},
  3989. 500: { name: 'Colossal', ratios: [0.45, 0, 0.65, 1.25, 2.5, 9.0], enames: ['1E6T', '1E8T', '2E', '2/3E', '3E', '3/4E'] },
  3990. 600: { name: 'Gigantic' },
  3991. 800: { name: 'Gigantic' },
  3992. 90000: { name: 'World/Event' }
  3993. },
  3994.  
  3995. lootTiers: {
  3996. u: { tiers: ['N/A'], epics: [0], best: 0},
  3997. shade: { tiers: [250,500,1000,1500,2000,2500,5000,7500,10000,15000], epics: [14,41,61,93,125,167,263,297,347,383], best: 5, e: false},
  3998. spire: { tiers: [1000,5000,10000,15000,20000,30000,40000,50000,60000], epics: [61,296,422,470,535,604,675,795,848], best: 1, e: false },
  3999. frost: { tiers: [250,500,1000,1500,2000,2500,5000,7500], epics: [15,40,61,71,103,153,217,248], best: 5, e: false},
  4000. red: { tiers: [200,300,500,1000,1500,2000,2500,3000,4000,5000,6000,7000,8000,9000,10000,12500,15000,17500,20000,25000,30000,40000,50000,60000,70000,80000,90000,100000,150000], epics: [2,4,24,54,90,131,164,199,227,267,284,301,317,349,380,397,422,443,479,509,541,604,832,999,1241,1433,1675,1918,2153], best: 7, e: false},
  4001. hbr: { tiers: [200,300,500,1000,1500,2000,2500,3000,4000,5000,6000,7000,8000,9000,10000,12500,15000,17500,20000,25000,30000,40000,50000,60000,70000,80000,90000,100000], epics: [2,4,24,54,90,129,161,195,223,261,278,295,311,342,373,389,414,435,470,499,531,592,818,985,1226,1417,1634,1800], best: 7, e: false},
  4002. strm: { tiers: [200,300,500,1000,1500,2000,2500,3000,4000,5000,6000,7000,8000,9000,10000,12500,15000,17500,20000,25000], epics: [3,9,27,72,114,148,185,219,256,299,318,337,356,390,427,446,474,496,539,570], best: 4, e: false},
  4003. spr: { tiers: [1000,1250,1500,1750,2000,2250,2500,2750,3000,4000,5000,6000,8000,10000,12500,15000,20000], epics: [95,104,114,128,140,152,170,192,231,261,306,353,383,414,444,477,539], best: 8, e: false},
  4004. elv: { tiers: [1000,1250,1500,1750,2000,2250,2500,2750,3000,4000,5000,6000,8000,10000,12500,15000,20000,25000], epics: [95,104,114,128,140,152,170,192,231,261,306,353,383,414,444,477,539,585], best: 8, e: false},
  4005. fst: { tiers: [1000,1250,1500,1750,2000,2250,2500,2750,3000,4000,5000,6000,8000,10000,12500,15000,20000,25000,30000,35000,40000], epics: [95,104,114,128,140,152,170,192,231,261,306,352,382,415,445,477,539,577,616,655,695], best: 1, e: false},
  4006. pof: { tiers: [3000,4000,5000,6000,7000,8000,9000,10000,12500,15000,17500,20000,25000,30000,40000,50000,60000,70000,80000,90000,100000,150000,200000], epics: [195,223,263,280,297,315,346,377,395,420,441,477,606,737,899,1460,1953,2447,2940,3433,3933,4907,5913], best: 20, e: false},
  4007. eio: { tiers: [300,500,1000,1500,2000,2500,3000,4000,5000,6000,7000,8000,9000,10000,12500,15000,17500,20000,25000,30000,40000,50000,60000,70000,80000,90000,100000,150000], epics: [1,6,13,22,32,40,48,55,65,70,74,78,86,94,98,105,110,119,126,134,149,201,240,278,318,359,408,521], best: 6, e: false},
  4008.  
  4009. ebut: { tiers: [10000,15000,20000,25000,30000,35000,40000,45000,50000], epics: [300,500,750,1250,1750,2050,2350,2650,3200], best: 8, e: false},
  4010. ekil: { tiers: [10000,15000,20000,25000,30000,35000,40000,45000,50000,55000,60000], epics: [300,500,750,1250,1750,2050,2350,2650,3000, 3400, 3900], best: 10, e: false},
  4011. ecas: { tiers: [10000,15000,20000,25000,30000,35000,40000,45000,50000,55000,60000,70000,80000,90000,100000], epics: [300,500,750,1250,1750,2050,2350,2650,3000,3400,3900,4400,5000,5600,6200], best: 10, e: false},
  4012. ewar: { tiers: [10000,20000,25000,30000,40000,50000,60000,70000,80000,90000,100000], epics: [300,700,1250,1800,2500,3150,3900,4600,5500,6000,6400], best: 8, e: false},
  4013. ewsp: { tiers: [10000,15000,20000,25000,30000,35000,40000,45000,50000,55000,60000,70000,80000,90000,100000,125000], epics: [300,500,750,1250,1750,2050,2350,2650,3000,3400,3900,4800,5400,6000,6300,6600], best: 11, e: false},
  4014. emrd: { tiers: [15000,20000,25000,30000,37500,45000,50000,55000,60000,65000,70000,75000,80000,90000,100000], epics: [500,750,1250,1750,2300,2800,3150,3500,3900,4500,5100,5700,6000,6300,6500], best: 11, e: false},
  4015. erid: { tiers: [15000,20000,25000,30000,35000,40000,45000,50000,55000,60000,65000,70000,75000,80000,90000,100000,125000,150000], epics: [500,750,1250,1750,2050,2400,2800,3150,3500,3900,4500,5100,5700,6300,6700,7200,7650,8000], best: 13, e: false},
  4016. eman: { tiers: [20000,25000,30000,35000,40000,45000,50000,55000,60000,65000,70000,75000,80000,90000,100000,125000,150000], epics: [750,1250,1750,2050,2400,2800,3150,3500,3900,4500,5100,5700,6200,6700,7200,7650,8000], best: 12, e: false},
  4017. emal: { tiers: [20000,25000,30000,35000,40000,45000,50000,55000,60000,65000,70000,75000,80000,90000,100000,150000,200000], epics: [750,1250,1750,2050,2400,2800,3150,3500,3900,4500,5100,5700,6100,6900,7800,8400,9000], best: 14, e: false},
  4018. ecec: { tiers: [20000,25000,30000,35000,40000,45000,50000,55000,60000,65000,70000,75000,80000,90000,100000,120000,150000,200000,240000,300000], epics: [750,1250,1600,1900,2200,2500,2800,3100,3900,4300,4700,5100,5500,6200,6900,8300,8800,9200,10000,11000], best: 15, e: false},
  4019.  
  4020. bsh: { tiers: [1000,1500,2000,2500,3000,4000,5000,7500,10000,15000,20000], epics: [8,12,16,20,24,32,40,60,80,120,160], best: 0, e: true},
  4021. badl: { tiers: [1000,1250,1500,1750,2000,2250,2500,2750,3000,4000,5000,6000,8000,10000,12500,15000,20000,25000,30000,35000,40000,50000], epics: [37,56,65,70,74,77,84,87,93,109,130,147,168,180,194,212,235,253,269,287,304,335], best: 1, e: false},
  4022. bhm: { tiers: [200,300,400,500,600,700,800,900,1000,1250,1500,1750,2000,2250,2500,2750,3000,4000,5000,6000,8000,10000,12500,15000,20000,25000,30000,35000,40000], epics: [4,6,10,14,18,19,23,26,29,32,36,40,44,48,53,60,72,83,98,114,125,136,146,157,177,190,203,216,230], best: 8, e: false},
  4023. pot: { tiers: [50,100,200,300,400,500,750,1000], epics: [1,5,7,10,13,15,17,20], best: 2, e: true },
  4024. danc: { tiers: [250,500,750,1000,1500,2000,2500,3000,3500,4000,5000,8000], epics: [4,14,19,25,30,40,54,63,65,70,90,112], best: 3, e: false },
  4025. fel: { tiers: [200,300,500,750,1000,1500,2000,2500,3000,4000,5000,7500,10000], epics: [8,12,16,21,25,33,42,48,54,63,71,81,90], best: 1, e: false},
  4026. fae: { tiers: [200,300,500,750,1000,1500,2000,2500,3000,4000,5000,7500,10000,15000,20000], epics: [8,12,16,21,25,34,42,49,56,65,74,86,97,116,134], best: 1, e: false},
  4027. hort: { tiers: [200,300,500,1000,1500,2000,2500,3000,4000,5000,6000,7000,8000,9000,10000,12500,15000,17500,20000,25000,30000,40000,50000,60000,75000], epics: [0,1,6,13,22,32,40,48,55,65,70,74,78,86,94,98,105,110,119,126,134,149,200,237,275], best: 7, e: false},
  4028. jorm: { tiers: [200,300,500,1000,1500,2000,2500,3000,4000,5000,6000,7000,8000,9000,10000,12500,15000,17500,20000,25000,30000,40000,50000,60000,70000,80000,90000,100000], epics: [0,1,6,13,22,32,40,48,55,65,70,74,78,86,94,98,105,110,119,126,134,149,200,238,276,315,353,400], best: 7, e: false},
  4029. drac: { tiers: [1000,1500,2000,2500,3000,4000,5000,6000,7000,8000,9000,10000,12500,15000,17500,20000,25000,30000,40000,50000,60000,70000,80000,90000,100000], epics: [15,23,31,40,48,57,65,69,74,78,86,94,98,103,110,117,126,134,150,198,236,273,311,348,398], best: 4, e: false },
  4030. dopp: { tiers: [100,250,500,750,1000,1250,1500,2000,2500], epics: [1,2,7,12,18,20,25,31,35], best: 4, e: false},
  4031. badb: { tiers: [100,250,500,800,1000,1250,1500,2000,2500,5000], epics: [1,2,5,10,13,17,22,26,30,49], best: 6, e: false},
  4032. way: { tiers: [100,200,300,400,500,600,700,800,880,1000,1250,1500,1750,2000,2250,2500,2750,3000,4000,5000,6000,8000,10000,12500,15000,20000,25000], epics: [3,6,7,8,10,11,13,14,15,17,21,25,29,31,37,42,45,50,54,62,70,78,85,95,106,126,136], best: 4, e: false},
  4033. marb: { tiers: [100,200,300,400,500,600,700,800,900,1000,1400,2000], epics: [2,4,6,8,10,12,14,16,18,21,32,43], best: 10, e: false},
  4034. abo: { tiers: [200,300,400,500,600,700,800,900,1000,1250,1500,1750,2000,2250,2500,2750,3000,4000,5000,6000,8000,10000,12500,15000,20000], epics: [6,7,8,10,11,12,13,14,17,21,25,29,33,37,41,45,49,53,60,68,76,83,94,105,126], best: 2, e: false },
  4035. wlds: { tiers: [750,1000,1500,2000,2500,3000,4000,5000,6000,7000,8000,9000,10000,12500,15000,17500,20000,25000,30000,40000], epics: [5,10,15,22,28,37,42,47,52,57,62,67,72,77,82,87,93,100,107,120], best: 5, e: false },
  4036. cwg: { tiers: [100,200,750,1250,1500,2000,2500,3750,5000], epics: [1,2,3,4,5,8,10,12,15], best: 0, e: true },
  4037. val: { tiers: [50,100,250,500,750,1000,1250,1500,2000,2500,5000], epics: [1,2,4,17,21,27,35,44,53,61,99], best: 3, e: false},
  4038. kark: { tiers: [200,300,400,500,600,700,800,900,1000,1250,1500,1750,2000,2250,2500,2750,3000,4000,5000,6000,8000,10000,12500,15000], epics: [8,9,10,11,12,13,14,15,17,20,24,29,32,36,40,44,48,52,59,66,73,80,90,100], best: 2, e: false},
  4039. yule: { tiers: [100,200,300,400,500,750,1000,1500,2000,2500,3000,3500,4000,4500,5000,10000], epics: [0,4,8,10,15,20,30,35,40,50,70,75,80,90,95,125], best: 5, e: true },
  4040. yule2: { tiers: [200,300,400,500,750,1000,1500,2000,2500,3000,3500,4000,5000,10000], epics: [11,22,28,42,57,71,85,114,142,171,185,200,257,371], best: 7, e: false },
  4041. eow: { tiers: [100,200,300,500,1000,1500,2000,2500,3000,4000,5000,6000,7000,8000,9000,10000,12500,15000,17500,20000,25000,30000,35000,40000], epics: [1,2,3,5,10,15,22,28,37,42,47,52,57,63,68,73,78,83,88,95,101,108,115,121], best: 8, e: false },
  4042. gk: { tiers: [150,250,300,400,500,750,1000,1500,2000,2500,3500,5000], epics: [5,6,9,10,12,14,17,23,30,35,49,67], best: 2, e: false },
  4043. murg: { tiers: [150,250,500,750,1000,1500,2000,2500,3000,3500,4000,4500,5000], epics: [0,1,2,5,10,15,31,41,57,67,72,78,87], best: 9, e: false},
  4044. valley: { tiers: [150,250,500,750,1000,1500,2000,2500,3000,3500,4000,4500,5000,6500,8000], epics: [0,1,2,5,10,15,21,35,60,63,67,72,76,84,92], best: 8, e: false},
  4045. bak: { tiers: [100,200,250,300,400,500,650,800,1000,1250,1500,2000], epics: [3,8,10,11,12,15,18,20,26,30,38,47], best: 5, e: false},
  4046. rud: { tiers: [300,500,750,1000,1500], epics: [13,15,17,25,32], best: 1, e: false},
  4047. imx: { tiers: [100,150,200,250,300,400,500,750,1000,1250,1500,1750,2000,2500,3000,3500,4000,4500,5000,6000,7000,8000,9000,10000,12500,15000,17500,20000,25000], epics: [16,21,26,32,38,44,51,69,86,118,142,166,191,239,286,330,355,381,408,435,462,489,516,544,592,640,688,736,815], best: 13, e: false},
  4048. shd: { tiers: [50,75,100,150,200,250,300,500,750,1000], epics: [1,2,5,8,10,12,14,16,19,25], best: 6, e: false},
  4049. hell: { tiers: [200,250,300,500,750,1000,1500,2000,2500,3000,4000,5000,6000,8000,10000], epics: [8,12,16,25,28,34,41,50,58,64,71,77,85,102,120], best: 2, e: false},
  4050. kane: { tiers: [200,250,300,500,750,1000,1500,2000,2500,3000,4000,5000,6000,8000,10000,12500,15000], epics: [6,10,14,21,27,30,37,45,54,62,68,75,81,93,110,127,141], best: 3, e: false},
  4051. dark: { tiers: [200,300,500,750,1000,1500,2000,2500,3000,4000,5000], epics: [2,4,8,14,18,30,40,50,60,75,85], best: 7, e: false},
  4052. gat: { tiers: [1000,1500,2000,2500,3000,4000,5000,6000,7000,8000,9000,10000,12500,15000,17500,20000,25000,30000,40000], epics: [27,48,66,81,94,103,122,132,144,158,176,194,204,209,219,225,242,284,301], best: 2, e: false},
  4053. trex: { tiers: [100,150,200,250,300,400,500,750,1000,1250,1500,1750,2000,2500,3000,3500,4000,4500,5000,6000,7000,8000,9000,10000,12500,15000,17500,20000], epics: [21,28,38,44,47,59,68,94,119,147,179,215,250,308,381,431,498,546,557,593,627,661,691,725,790,861,926,980], best: 14, e: false},
  4054. alch: { tiers: [100,150,200,250,300,400,500,650,800,1000,1250,1500], epics: [4,6,8,9,11,13,15,17,19,20,25,32], best: 5, e: false},
  4055. rann: { tiers: [100,200,300,400,500,600,700,800,900,1000,2000,3000], epics: [12,24,36,48,61,73,85,97,109,122,245,369], best: 9, e: false },
  4056. clock: { tiers: [300,400,750,1000,1500,2000,2500,3000,4000,5000,6000,8000,10000], epics: [56,66,94,118,192,226,254,270,290,360,368,400,460], best: 0, e: false},
  4057. krx: { tiers: [300,400,750,1000,1500,2000,2500,3000,4000,5000,6000,8000], epics: [56,66,94,118,192,226,254,270,290,360,368,400], best: 0, e: false},
  4058. gig: { tiers: [200,300,400,500,750,1000,1500,2000,2500,5000,8000], epics: [36,48,63,76,94,111,146,199,256,400,490], best: 3, e: false},
  4059. rekkr: { tiers: [250,300,400,500,720,1000,1500,2500,3500], epics: [10,11,15,18,23,26,34,37,51], best: 2, e: true},
  4060. rag: { tiers: [225,310,400,510,750,1000,1500,2500,5000], epics: [11,13,17,19,23,27,37,39,61], best: 2, e: true},
  4061. z15lo: { tiers: [225,240,300,400,750,1000,1500,2500,5000], epics: [8,9,14,16,19,23,33,36,48], best: 2, e: true},
  4062. z15hi: { tiers: [225,240,300,400,750,1000,1500,2500,5000,8000], epics: [8,9,14,16,19,23,33,60,90,100], best: 2, e: true},
  4063. apoc: { tiers: [12,24,36,40,60,80,100,120,140,160,180], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true },
  4064. cara: { tiers: [400,500,600,700,800,900,1000,1250,1500,1750,2000,2250,2500,2750,3000], epics: [10,11,12,13,14,15,16,20,24,28,32,36,40,44,48], best: 0, e: true },
  4065. zugen: { tiers: [120,180,225,240,300,400,750,1000,1500], epics: [8,9,10,11,14,16,19,23,33], best: 4, e: true},
  4066. gulk: { tiers: [90,135,150,180,225,300,550,900,1500], epics: [2,5,7,9,11,15,18,22,34], best: 5, e: true },
  4067. verk: { tiers: [100,175,250,300,375,450,525,600,900,1500], epics: [3,8,12,13,15,16,18,21,23,36], best: 2, e: true},
  4068. canib: { tiers: [250,300,380,480,580,660,900,1500,2000,2800,3500], epics: [12,13,14,17,18,21,23,34,46,68,88], best: 0, e: true},
  4069. ruzz: { tiers: [300,400,500,600,700,800,900,1000,1250,1500,1750,2000,2250,2500,2750,3000], epics: [2,5,11,12,13,14,15,16,20,24,28,32,36,40,44,48], best: 2, e: true },
  4070. z10: { tiers: [100,200,300,400,500,600,700,800,900,1000], epics: [7,8,9,10,11,12,13,14,15,16], best: 0, e: true },
  4071. nmDl: { tiers: [105,135,150,225,300,375,450,525,600,675], epics: [2,4,6,8,10,12,14,16,18,20], best: 2, e: true },
  4072. lDl: { tiers: [70,90,100,150,200,250,300,350,400,450], epics: [2,4,6,8,10,12,14,16,18,20], best: 2, e: true },
  4073. hDl: { tiers: [35,45,50,75,100,125,150,175,200,225], epics: [2,4,6,8,10,12,14,16,18,20], best: 2, e: true },
  4074. nDl: { tiers: [7,9,10,15,20,25,30,35,40,45], epics: [2,4,6,8,10,12,14,16,18,20], best: 2, e: true },
  4075. nmTisi: { tiers: [75,105,135,150,225,300,375,450,525,600,675], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true },
  4076. lTisi: { tiers: [50,70,90,100,150,200,250,300,350,400,450], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true },
  4077. hTisi: { tiers: [25,35,45,50,75,100,125,150,175,200,225], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true },
  4078. nTisi: { tiers: [5,7,9,10,15,20,25,30,35,40,45], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true },
  4079. njack: { tiers: [4,20,24,48,72,96,120,144,168,192], epics: [2,3,4,6,7,8,9,10,11,12], best: 0, e: true},
  4080. hjack: { tiers: [6,30,36,72,108,144,180,216,252,288], epics: [2,3,4,6,7,8,9,10,11,12], best: 0, e: true},
  4081. ljack: { tiers: [8,40,48,96,144,192,240,288,336,384], epics: [2,3,4,6,7,8,9,10,11,12], best: 0, e: true},
  4082. nmjack: { tiers: [12,60,72,144,216,288,360,432,504,576], epics: [2,3,4,6,7,8,9,10,11,12], best: 0, e: true},
  4083. hjr: { tiers: [30,150,180,360,750,1500], epics: [8,12,16,27,36,72], best: 0, e: true},
  4084. njr: { tiers: [20,100,120,240,500,1000], epics: [8,12,16,27,36,72], best: 0, e: true},
  4085. ljr: { tiers: [40,200,240,480,1000,2000], epics: [8,12,16,27,36,72], best: 0, e: true},
  4086. nmjr: { tiers: [60,300,360,720,1500,3000], epics: [8,12,16,27,36,72], best: 0, e: true},
  4087. yyd: { tiers: [125,175,250,300,375,450,525,625,900,1500], epics: [3,8,12,13,15,16,18,21,23,36], best: 2, e: true},
  4088. nessy: { tiers: [120,180,225,240,300,500,750,1000], epics: [9,10,11,12,13,14,17,20], best: 1, e: true},
  4089. hurk: { tiers: [90,135,150,180,225,300,550,900], epics: [3,7,10,12,15,19,26,30], best: 2, e: true},
  4090. mall: { tiers: [100,150,225,300,375,450,525,600,900], epics: [3,8,11,12,14,16,18,20,24], best: 1, e: true},
  4091. nIns: { tiers: [5,7,9,10,15,20,25,30,35,40,45], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true},
  4092. hIns: { tiers: [6.250,8.750,11.25,12.50,18.75,25,31.25,37.50,43.75,50,56.25], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true},
  4093. lIns: { tiers: [8,11.20,14.40,16,24,32,40,48,56,64,72], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true},
  4094. nmIns: { tiers: [10,14,18,20,30,40,50,60,70,80,90], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true},
  4095. nker: { tiers: [20,28,36,40,60,80,100,120,140,160,180], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true},
  4096. hker: { tiers: [25,35,45,50,75,100,125,150,175,200,225], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true},
  4097. lker: { tiers: [32,44.80,57.60,64,96,128,160,192,224,256,288], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true},
  4098. nmker: { tiers: [40,56,72,80,120,160,200,240,280,320,360], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true},
  4099. nSlut: { tiers: [6.660,9.324,11.99,13.32,19.98,26.64,33.30,39.96,46.62,53.28,59.94], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true},
  4100. hSlut: { tiers: [8.325,11.66,14.99,16.65,24.98,33.30,41.63,49.95,58.28,66.60,74.93], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true},
  4101. lSlut: { tiers: [10.66,14.92,19.18,21.31,31.97,42.62,53.28,63.94,74.59,85.25,95.90], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true},
  4102. nmSlut: { tiers: [13.32,18.65,23.98,26.64,39.96,53.28,66.60,79.92,93.24,106.6,119.9], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true},
  4103. sic: { tiers: [400,500,600,700,800,900,1000,2000], epics: [10,11,12,13,14,15,16,32], best: 0, e: true},
  4104. vort: { tiers: [200,300,400,500,600,700,800,900,1000,1500,2000,2500,3000,3500], epics: [3,10,14,15,17,18,21,23,32,37,44,52,58,90], best: 1, e: true},
  4105. lux: { tiers: [8,17,26,35,45,56,67,78,90,103,116,129,143,157,173,188,202,220,238,255,270,293,311,330,350], epics: [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26], best: 9, e: true },
  4106. keron: { tiers: [8,17,26,35,45,56,67,78,90,103,116,129,143,157,173,188,202,220,238,255,270,293,311,330,350,1000], epics: [2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,30], best: 9, e: true }
  4107. },
  4108. camps: {
  4109. bob: {name: 'Bastion of Blood', time: [120, 96], prefixes: 'Regenerating, Morphling, Vengeful, Chilling', numNodes: 6, nodes: ['bmp', 'gor', 'chi', 'zh', 'sic', 'bob'],
  4110. mods: ['Speed Run: halved camp timer, +20% guild rep from EoC', 'Hailstorm: +1 prefix, +20% guild exp from EoC', 'Nerfed: -30% player damage, special loot from EoC'],
  4111. tiers: [[5, 31, 0],[25, 32, 0],[75, 33, 0],[100, 34, 0],[200, 35, 7],[250, 36, 8],[320, 37, 9],[375, 38, 10],[480, 39, 11],[550, 43, 14],[640, 46, 17],[960, 48, 22],[1500, 50, 24],[2400, 53, 26],[2750, 55, 29],[5000, 62, 38],[7000, 64, 42],[10000, 69, 47],[15000, 74, 52]],
  4112. bmp: {name: 'Black Moon Pack', sname: 'Bmp', type: 'Human, Campaign', size: 25, hp: [6000, 18000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0]},
  4113. gor: {name: 'Gorgon', sname: 'Gor', type: 'Campaign', size: 50, hp: [12000, 36000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0]},
  4114. chi: {name: 'Chimera', sname: 'Chi', type: 'Campaign', size: 75, hp: [28000, 84000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0]},
  4115. zh: {name: 'Zombie Horde', sname: 'ZH', type: 'Campaign, Undead', size: 100, hp: [50000, 150000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]},
  4116. sic: {name: 'Byron Siculus', sname: 'Sic', type: 'Campaign', size: 100, hp: [50000, 150000], gold: true, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]},
  4117. bob: {name: 'Bastion of Blood', sname: 'BoB', type: 'Campaign, Undead, Siege', size: 100, hp: [50000, 150000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]}},
  4118. mam: {name: 'Monsters and Magma', time: [120, 96], prefixes: 'Regenerating, Vengeful, Chilling, Curse', numNodes: 7, nodes: ['wlp', 'tos', 'gol', 'ele', 'gmh', 'wrm', 'imx'],
  4119. mods: ['Speed Run: halved camp timer, +20% guild rep from EoC', 'Hailstorm: +1 prefix, +20% guild exp from EoC', 'Fatigued: -45% player damage, special loot and +3 slots from EoC', 'Endurance Run: Node timer set to 4h, Molten Troves in EoC'],
  4120. tiers: [[5, 31, 0],[25, 32, 0],[75, 33, 0],[100, 34, 0],[200, 35, 7],[250, 36, 8],[320, 37, 9],[375, 38, 10],[480, 39, 11],[550, 40, 12],[640, 41, 13],[960, 42, 14],[1500, 43, 15],[2400, 44, 16],[2750, 45, 17],[4500, 58, 24],[5000, 62, 38],[5500, 64, 26],[7000, 64, 42],[7500, 74, 28],[10000, 69, 47],[15000, 74, 52]],
  4121. wlp: {name: 'Imryx\'s Whelps', sname: 'Wlp', type: 'Dragon, Underground, Campaign', size: 25, hp: [7000, 21000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0]},
  4122. tos: {name: 'Magma Tossers', sname: 'Tos', type: 'Underground, Construct, Campaign', size: 50, hp: [13000, 39000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0]},
  4123. gol: {name: 'Magma Golem', sname: 'Gol', type: 'Underground, Construct, Campaign', size: 50, hp: [16000, 48000], gold: true, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0]},
  4124. ele: {name: 'Magma Elemental', sname: 'Ele', type: 'Underground, Magical Creature, Campaign', size: 75, hp: [30000, 90000], gold: false,tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0]},
  4125. gmh: {name: 'Grt. Magma Horror', sname: 'Gmh', type: 'Campaign, Undead', size: 100, hp: [55000, 165000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1]},
  4126. wrm: {name: 'Magma Worm', sname: 'Wrm', type: 'Underground, Campaign', size: 100, hp: [60000, 180000], gold: true, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1]},
  4127. imx: {name: 'Imryx the Incinerator', sname: 'Imx', type: 'Dragon, Underground, Campaign', size: 100, hp: [65000, 195000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0]}},
  4128. gd: {name: 'The Grey Death', time: [120, 96], prefixes: 'Regenerating, Vengeful, Chilling, Curse', numNodes: 6, nodes: ['crk', 'zrn', 'nun', 'tms', 'crn', 'hrt'],
  4129. mods: ['Speed Run: halved camp timer, +20% guild rep from EoC', 'Hailstorm: +1 prefix, +20% guild exp from EoC', 'Fatigued: -45% player damage, special loot and +3 slots from EoC'],
  4130. tiers: [[25, 31, 0],[100, 34, 0],[200, 36, 6],[300, 38, 9],[500, 40, 14],[750, 42, 16],[1000, 45, 18],[2500, 48, 21],[4100, 50, 25],[6500, 58, 29],[6500, 54, 27],[8500, 62, 31],[8500, 63, 32],[10000, 64, 33],[15000, 66, 35],[20000, 68, 37],[30000, 70, 39],[40000, 73, 41]],
  4131. crk: {name: 'Carshk the Marauder', sname: 'Crk', type: 'Campaign', size: 25, hp: [8000, 25600], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0]},
  4132. zrn: {name: 'Zranras', sname: 'Zrn', type: 'Campaign, Beastman', size: 50, hp: [15000, 48000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0]},
  4133. nun: {name: 'General Nund', sname: 'Nun', type: 'Campaign, Ogre', size: 50, hp: [20000, 50000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 0, 0]},
  4134. tms: {name: 'Thurmavus the Ripper', sname: 'Tms', type: 'Campaign, Dragon', size: 100, hp: [75000, 202500], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1]},
  4135. crn: {name: 'Craenaestra the Stalker', sname: 'Crn', type: 'Campaign, Dragon', size: 100, hp: [80000, 224000], gold: true, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1]},
  4136. hrt: {name: 'Horthania the Grey', sname: 'Hrt', type: 'Campaign, Dragon', size: 100, hp: [90000, 270000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1]}},
  4137. goc: {name: 'Giants of Chalua', time: [120, 96], prefixes: 'Regenerating, Vengeful, Chilling, Curse', numNodes: 6, nodes: ['mwm', 'bl', 'gh', 'fgs', 'gc', 'ha'],
  4138. mods: ['Speed Run: halved camp timer, +20% guild rep from EoC', 'Hailstorm: +1 prefix, +20% guild exp from EoC', 'Fatigued: -45% player damage, Boss loot from EoC', 'Endurance Run: Node timer set to 4h, 10 guild tokens in EoC'],
  4139. tiers: [[25, 32, 0, 0],[150, 34, 0, 0],[250, 35, 7, 0],[480, 39, 11, 0],[640, 41, 16, 0],[960, 42, 18, 1],[1500, 43, 19, 1],[2500, 45, 21, 3],[4750, 48, 25, 4],[5500, 52, 27, 5],[6400, 54, 29, 5],[8750, 56, 31, 6],[10000, 58, 34, 6],[15000, 60, 38, 8],[25000, 64, 44, 9],[30000, 66, 46, 9],[35000, 68, 48, 9],[40000, 70, 50, 9],[50000, 74, 56, 10]],
  4140. mwm: {name: 'Monkey Warrior Minions', sname: 'MWM', type: 'Human, Campaign', size: 25, hp: [15000, 45000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]},
  4141. bl: {name: 'Basileus Lizard', sname: 'BL', type: 'Campaign', size: 50, hp: [25000, 75000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0]},
  4142. gh: {name: 'Giant Hunter', sname: 'GH', type: 'Giant, Campaign', size: 75, hp: [55000, 165000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0]},
  4143. fgs: {name: 'Fire Giant Shaman', sname: 'FGS', type: 'Giant, Campaign', size: 100, hp: [100000, 250000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0]},
  4144. gc: {name: 'Giant Cook', sname: 'GC', type: 'Giant, Campaign', size: 100, hp: [125000, 312500], gold: true, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0]},
  4145. ha: {name: 'Hitullpa Aatqui', sname: 'HA', type: 'Giant, Campaign', size: 100, hp: [150000, 375000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1]}},
  4146. fw: {name: 'The Frozen War', time: [120, 96], prefixes: 'Frighten Mount, Ethereal, Trample, Intimidate, Vulnerable, Vengeful, Chilling, Curse', numNodes: 6, nodes: ['ur', 'fe', 'nsg', 'bsn', 'bsh', 'eiw'],
  4147. mods: ['Speed Run: halved camp timer, +20% guild rep from EoC', 'Hailstorm: +1 prefix, +20% guild exp from EoC', 'Fatigued: -45% player damage, Extra loot from EoC', 'Endurance Run: Node timer set to 4h, 10 guild tokens in EoC'],
  4148. tiers: [[25, 32, 0, 0],[150, 34, 0, 0],[250, 35, 7, 0],[480, 39, 11, 0],[640, 41, 16, 0],[960, 42, 18, 1],[1500, 86, 38, 1],[2500, 90, 42, 3],[4750, 96, 50, 4],[5500, 104, 54, 5],[6400, 108, 58, 5],[8750, 112, 62, 6],[10000, 116, 68, 6],[15000, 120, 76, 8],[10000, 112, 62, 6],[15000, 116, 68, 8],[25000, 120, 76, 9],[30000, 132, 92, 9],[35000, 136, 96, 9],[40000, 140, 100, 9],[50000, 150, 112, 9]],
  4149. ur: {name: 'Ursine Raiders', sname: 'UR', type: 'Aquatic, Human, Campaign', size: 25, hp: [18000, 54000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0]},
  4150. fe: {name: 'Frost Elemental', sname: 'FE', type: 'Aquatic, Magical Cereature, Campaign', size: 50, hp: [28000, 84000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0]},
  4151. nsg: {name: 'Northern Sea Giant', sname: 'NSG', type: 'Aquatic, Giant, Campaign', size: 100, hp: [105000, 262500], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0]},
  4152. bsn: {name: 'Konguar, Giant King & Jormungan the Sea-Storm (Normal)', sname: 'BSN', type: 'Aquatic, Dragon, Giant, Campaign', size: 100, hp: [160000, 400000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], epics: [0,0,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1]},
  4153. bsh: {name: 'Konguar, Giant King & Jormungan the Sea-Storm (Hard)', sname: 'BSH', type: 'Aquatic, Dragon, Giant, Campaign', size: 100, hp: [160000, 400000], gold: false, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], epics: [0,0,0,0,0,1,1,1,2,2,3,0,0,0,3,4,4,5,5,6,6]},
  4154. eiw: {name: 'Elvigar the Ice Waver', sname: 'EIW', type: 'Aquatic, Undead, Campaign', size: 100, hp: [170000, 425000], gold: true, tiers: [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1], epics: [0,0,0,0,0,1,1,1,1,1,2,0,0,0,3,4,5,6,7,8,10]}},
  4155. nmq: {
  4156. name: 'The Nightmare Queen\'s Horde', time: [120, 96], numNodes: 7, nodes: ['pgs', 'bwp', 'to', 'nr', 'cr', 'nh', 'tqc'],
  4157. prefixes: 'Frighten Mount, Regenerating, Ethereal, Trample, Intimidate, Vulnerable, Vengeful, Chilling, Curse',
  4158. mods: ['Speed Run: halved camp timer, +20% guild rep from EoC', 'Hailstorm: +1 prefix, +20% guild exp from EoC', 'Fatigued: -45% player damage, Extra loot from EoC', 'Endurance Run: Node timer set to 4h, 10 guild tokens in EoC'],
  4159. tiers: [
  4160. [150, 2, 1, 0],[250, 2, 2, 0],[960, 8, 8, 0],[2000, 17, 17, 6],
  4161. [4000, 34, 34, 6],[6500, 56, 56, 7],[10000, 88, 88, 10],[15000, 130, 130, 11],
  4162. [25000, 220, 220, 12],[50000, 445, 445, 15],[75000, 665, 665, 25],[100000, 870, 870, 30],
  4163. [150000, 1800, 1800, 35],[200000, 2600, 2600, 40],[300000, 3600, 3600, 0],[400000, 4400, 4400, 0]
  4164. ],
  4165. pgs: {name: 'Pillagers', sname: 'PGS', type: 'Campaign, Orc, Goblin, Nightmare Queen',
  4166. size: 25, hp: [75000, 150000], gold: false,
  4167. tiers: [1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0],
  4168. epics: [0,0,0,17,18,19,20,30,30,40,60,76,0,0,0,0]},
  4169. bwp: {name: 'Blood Wolf Patroller', sname: 'BWP', type: 'Campaign, Orc, Beast, Nightmare Queen',
  4170. size: 50, hp: [125000, 250000], gold: false,
  4171. tiers: [1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0]},
  4172. to: {name: 'Trance Ogre', sname: 'TO', type: 'Campaign, Ogre, Nightmare Queen',
  4173. size: 50, hp: [130000, 260000], gold: false,
  4174. tiers: [1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0]},
  4175. nr: {name: 'Nightmare Riders', sname: 'NR', type: 'Campaign, Goblin, Orc, Ogre, Nightmare Queen',
  4176. size: 75, hp: [200000, 400000], gold: false,
  4177. tiers: [1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0]},
  4178. cr: {name: 'Centipede Riders', sname: 'CR', type: 'Campaign, Goblin, Beast, Nightmare Queen',
  4179. size: 75, hp: [195000, 390000], gold: false,
  4180. tiers: [1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0]},
  4181. nh: {name: 'Nightmare Hives', sname: 'NH', type: 'Campaign, Ogre, Beast, Nightmare Queen',
  4182. size: 75, hp: [300000, 600000], gold: true,
  4183. tiers: [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0],
  4184. epics: [0,0,0,0,1,2,3,3,4,5,5,6,6,'?',10,0]},
  4185. tqc: {name: 'The Queen\'s Chosen', sname: 'TQC', type: 'Campaign, Orc, Goblin, Ogre, Beast, Nightmare Queen',
  4186. size: 100, hp: [400000, 800000], gold: false,
  4187. tiers: [1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],
  4188. epics: [0,0,0,0,1,2,2,3,4,5,6,6,7,'?','?',10]}
  4189. }
  4190. },
  4191. linkNames: { 'prntscr.com': 'LightShot', 'www.youtube.com': 'YouTube', 'i.imgur.com': 'imgur', 'imgur.com': 'imgur', 'docs.google.com': 'Google Docs', 'userscripts.org': 'Script', 'www.dawnofthedragons.com': 'DotD Forum', 'dotd.wikia.com': 'DotD Wiki', 'www.fooby.de': 'DotD Log Analyzer'},
  4192. //raidArray: [],
  4193. slapSentences: [
  4194. 'slaps <nick> in the face with a rotten old fish',
  4195. 'slaps <nick> around with a glove',
  4196. 'slaps <nick> around with an armoured glove',
  4197. 'hacks into <nick>\'s computer and slaps <nick> up side the head with a rubber chicken',
  4198. 'slaps <nick> around a bit with a wet noddle',
  4199. 'slaps <nick> about the head and shoulders with a rubber chicken',
  4200. 'slaps <nick>\'s face so hard, <nick> has to walk backwards from now on',
  4201. 'slaps some sense into <nick> with a red brick',
  4202. 'slaps <nick> with a herring',
  4203. 'slaps <nick> with a fire hose',
  4204. 'slaps <nick> with a huge law suit',
  4205. 'slaps <nick> with a great big, wet, 100% rubber duck',
  4206. 'slaps <nick> with a large dildo'
  4207. ],
  4208. reload: function () { SRDotDX.util.extEcho('Reloading, please wait...'); activateGame(); },
  4209. gframe: function(msg) { if(typeof document.getElementById('gameiframe') === 'object' && typeof document.getElementById('gameiframe').contentWindow === 'object') document.getElementById('gameiframe').contentWindow.postMessage(msg, '*'); },
  4210. fails: 0,
  4211. load: function () {
  4212. if (typeof holodeck === 'object' && holodeck.ready &&
  4213. typeof holodeck._chat_window === 'object' &&
  4214. typeof ChatDialogue === 'function' &&
  4215. typeof activateGame === 'function' &&
  4216. typeof Element === 'function' &&
  4217. typeof Element.Methods === 'object' &&
  4218. typeof Element.Methods.remove === 'function' &&
  4219. typeof ChatRoom === 'function') {
  4220. ChatDialogue.prototype.sendInput = function () {
  4221. //workaround for broken raid links - fixing on the fly
  4222. var b = this._input_node.value.replace(/kv_&/ig, "&kv_");
  4223. var a = b.match(/(?:.|\n){1,240}(\b|$)/g);
  4224. if(a !== null) {
  4225. var al = a.length - 1, i;
  4226. if (al < 1 || this._input_node.value.charAt(0) == '/') this._holodeck.processChatCommand(a[0]) && this._holodeck.filterOutgoingMessage(a[0], this._onInputFunction);
  4227. else {
  4228. var msg, tout = 50;
  4229. for(i = 0; i <= al; i++) {
  4230. msg = (i == 0 ? '' : '... ') + a[i] + (i == al ? '' : '...');
  4231. (function (a, b) {
  4232. return SRDotDX.gui.FPXTimerArray[i] = setTimeout(function(){b._holodeck.filterOutgoingMessage(a,b._onInputFunction)},tout);
  4233. })(msg, holodeck._active_dialogue);
  4234. tout += 500;
  4235. }
  4236. }
  4237. }
  4238. this._input_node.value = "";
  4239. };
  4240. ChatDialogue.prototype.SRDotDX_emote = function (msg) {
  4241. var user = holodeck._active_user.chatUsername();
  4242. this.displayUnsanitizedMessage(user, '**' + user + ' ' + msg + '**', {class: 'emote'}, {});
  4243. };
  4244. ChatDialogue.DOTDX_MESSAGE_TEMPLATE = new Template('<p class="#{classNames}"><span id="dotdm_#{magId}" class="slider" style="max-width:0" onmouseleave="this.style.maxWidth=\'0\'"></span><span class="timestamp">#{timestamp}</span><span class="room">#{room}</span></span><span class="username #{userClassNames} dotdm_#{magId}" username="#{username}" dotdxname="#{dotdxusr}" oncontextmenu="return false;">#{prefix}#{user}</span><span class="ign ingamename">#{ign}</span><span class="separator">: </span><span name="SRDotDX_#{dotdxusr}" class="message">#{message}</span><span class="clear"></span></p>');
  4245.  
  4246. Holodeck.prototype.addDotdChatCommand = function (a, b) {
  4247. a = a.split(',');
  4248. for (var i = 0; i < a.length; i++) {
  4249. this._chat_commands[a[i]] || (this._chat_commands[a[i]] = []);
  4250. this._chat_commands[a[i]].push(b)
  4251. }
  4252. };
  4253. ChatDialogue.prototype.insert = function (a, b, c) {
  4254. var d = this, e = this._message_window_node, f = this._holodeck;
  4255. f.scheduleRender(function () {
  4256. var g = e.getHeight(), h = g + e.scrollTop + ChatDialogue.SCROLL_FUDGE >= e.scrollHeight, r = 0 !== g && h;
  4257. f.scheduleRender(function () {
  4258. if ("string" == typeof a || a instanceof String)a = $j("<div/>", {html: a, "class": "chat-message"});
  4259. if (c && c.timestamp) {
  4260. var f = $j(e).children(".chat-message").filter(function () {
  4261. return $j(this).data("timestamp") > c.timestamp
  4262. });
  4263. 0 < f.length ? ($j(a).data(c).insertBefore(f.first()), r = !1) : $j(a).data(c).appendTo(e)
  4264. } else $j(a).appendTo(e);
  4265. r && d.scrollToBottom();
  4266. b && b()
  4267. })
  4268. })
  4269. };
  4270. ChatDialogue.prototype.displayUnsanitizedMessage = function (usr, msg, cls, pfx) {
  4271. cls || (cls = {});
  4272. pfx || (pfx = {});
  4273. var active_room, allow_mutes = (active_room = this._holodeck.chatWindow().activeRoom()) && !active_room.canUserModerate(active_room.self()) || pfx.whisper;
  4274. if (!allow_mutes || !this._user_manager.isMuted(usr)) {
  4275. var e = !pfx.non_user ? "chat_message_window_username" : "chat_message_window_undecorated_username";
  4276. var f = usr == this._user_manager.username(), h = [], rm = '';
  4277. var curTs = new Date().getTime().toString();
  4278. var kongUsr = usr;
  4279. if (msg.charAt(0) == '[' && (msg.charAt(2) == '|' || msg.charAt(3) == '|')) {
  4280. var sp = msg.split(']');
  4281. rm = sp[0].split('|')[0] + ']&ensp;';
  4282. usr = sp[0].split('|')[1];
  4283. msg = sp[1];
  4284. h.push('bot')
  4285. }
  4286. var trueUsr = usr;
  4287. e = [e];
  4288. pfx = pfx['private'] ? 'To ' : '';
  4289. if (cls['class'] != 'script') this._messages_count % 2 && h.push("even"), this._messages_count++;
  4290. cls['class'] && h.push(cls['class']);
  4291. if ((!cls['class'] || cls['class'].indexOf('emote') == -1) && msg.charAt(0) == '*' && msg.charAt(2) != '*') {
  4292. var msgLen = msg.length;
  4293. if (msgLen > 5) {
  4294. msg = '**' + usr + ' ' + (msg.charAt(msgLen - 1) == '*' ? msg.slice(1, msgLen - 1) : msg.slice(1, msgLen)) + '**';
  4295. h.push('emote');
  4296. }
  4297. }
  4298. var rUsr = h.join(' ').indexOf('sent_whisper') > -1 ? this._user_manager.username() : usr;
  4299. var raid = SRDotDX.getRaidLink(msg, rUsr);
  4300. if (raid) {
  4301. h.push('DotDX_raid');
  4302. h.push('DotDX_sid_' + raid.sid);
  4303. h.push('DotDX_diff_' + raid.diff);
  4304. h.push('DotDX_raidId_' + raid.id);
  4305. if (raid.visited) h.push('DotDX_visitedRaid');
  4306. h.push('DotDX_fltChat_' + raid.boss + '_' + (raid.diff - 1));
  4307. msg = raid.ptext + '<a href="' + raid.url + '" class="chatRaidLink ' + raid.id + '|' + raid.hash + '|' + raid.boss + '|' + raid.diff + '|' + raid.sid + '" style="float:right;" onmouseout="SRDotDX.gui.helpBox(\'chat_raids_overlay\',\'dotdm_' + curTs + '\',\'\',true);" onmouseover="SRDotDX.gui.helpBox(\'chat_raids_overlay\',\'dotdm_' + curTs + '\',' + raid.id + ',false);">' + raid.linkText() + '</a>' + raid.ntext;
  4308. SRDotDX.gui.toggleRaid('visited', raid.id, raid.visited);
  4309. SRDotDX.gui.joining ? SRDotDX.gui.pushRaidToJoinQueue(raid.id) : SRDotDX.gui.selectRaidsToJoin('chat');
  4310. }
  4311. else {
  4312. //var linkReg = /((?:ht|(?:t|s)?f)tps?\:(?:\/\/))?((?:[a-z\d\-\_]+?\.)+[a-z]{2,4}\b|\b(?:[1-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(?:\.(?:[0-9]|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}\b)((?:\/[\w\/\.\-\,\:\%\#\=]+)?(?:\/?\?[\w\-\#\:\?\=\&\.\;]*|\/?\#(?:\w+)?)?\b)?/g;
  4313. var linkReg = /(?:^|\s|,|;)(((?:ht|(?:t|s)?f)tps?:(?:\/\/))([\w\.\-]{4,}[a-z0-9])([\w\/\?\.\-=&#:;%()!]*[\w#;)])?)/g;
  4314. var links, link, lname, lidx, found = false;
  4315. while((links = linkReg.exec(msg))) {
  4316. found = true;
  4317. console.log('[DotDX] Link found: ' + msg);
  4318. if(!/kongregate.com/i.test(links[1]) && !/\.\./.test(links[1])){
  4319. link = links[1].replace(/&amp;/ig,'&').replace(/&nbsp;/ig,'');
  4320. lname = SRDotDX.config.formatLinks ? (SRDotDX.linkNames[links[3]] ? ('['+SRDotDX.linkNames[links[3]]+']') : links[3]) : link;
  4321. link = '<a href="' + link + '" target="_blank" class="chat_link">' + lname + '</a>';
  4322. linkReg.lastIndex += link.length - links[1].length;
  4323. lidx = links.index + links.indexOf(links[1]);
  4324. msg = msg.substring(0, lidx) + link + msg.substring(lidx + links[1].length, msg.length);
  4325. }
  4326. }
  4327. if(found) SRDotDX.linksHistory.push({t:new Date().getTime(), u:usr, m:msg});
  4328. }
  4329. var ign = '';
  4330. if (SRDotDX.config.mutedUsers[usr]) h.push('DotDX_hidden');
  4331.  
  4332. var fCls = h.join(' ');
  4333. if (SRDotDX.config.ignUsers[usr] && SRDotDX.config.ignUsers[usr].ign !== '*unknown*' && fCls.indexOf('emote') < 0) {
  4334. switch(SRDotDX.config.ignMode) {
  4335. case 2: ign = ' ('+SRDotDX.config.ignUsers[usr].ign+')'; break;
  4336. case 1: usr = SRDotDX.config.ignUsers[usr].ign; e.push('ign'); break;
  4337. }
  4338. }
  4339. var ts = fCls.indexOf('emote') > -1 || fCls.indexOf('script') > -1 ? '' : ('(' + ('0' + (new Date().getHours())).slice(-2) + ':' + ('0' + (new Date().getMinutes())).slice(-2) + ')&ensp;');
  4340. f && e.push('is_self');
  4341.  
  4342. usr = ChatDialogue.DOTDX_MESSAGE_TEMPLATE.evaluate({prefix: pfx, user: usr, username: kongUsr, dotdxusr: trueUsr, ign: ign, message: msg, classNames: fCls, userClassNames: e.join(' '), timestamp: ts, room: rm, magId: curTs });
  4343. this.insert(usr);
  4344. }
  4345. };
  4346.  
  4347. // chat room chooser user limit override
  4348. ChatRoomGroup.prototype.buildRegularRoomNode = function (a) {
  4349. var b = new Element("li", {"class": 0 === i % 2 ? "even room" : "odd room"}); b.room = a;
  4350. var c = (new Element("p", {"class": "name"})).update(a.name);
  4351. a.premium_only && (active_user.isPremium() || c.addClassName("upsell"),c.addClassName("premium_room_icon spritesite"));
  4352. b.insert(c);
  4353. b.insert((new Element("p", {"class": "user_count" + (a.joinable ? "" : " full")})).update(a.total_user_count));
  4354. b.insert(new Element("div", {style: "clear:both;"}));
  4355. return b
  4356. };
  4357.  
  4358. // kong methods fix
  4359. Element._insertionTranslations.after = function(a,b){c=a.parentNode;/*if(!a||!b||!c)console.log('[DotDX] ._insertionTranslations.after.Debug: a:'+a+' | b:'+b+' | c:'+c);*/c&&c.insertBefore(b,a.nextSibling)};
  4360. Element.Methods.remove = function(a){a=$(a);b=a.parentNode;/*if(!a||!b)console.log('[DotDX] .Methods.remove.Debug: a:'+a+' | b:'+b);*/b&&b.removeChild(a);return a};
  4361. Element.addMethods(Element.Methods);
  4362. ChatRoom.prototype.userSorter = function(){
  4363. var a=this._chat_window,
  4364. b=this,
  4365. c=function(b){return a&&b?(a.username()===b.username):false},
  4366. d=function(a){return a&&!a.isSilenced()},
  4367. e=function(a){return a&&a.isAdmin()},
  4368. f=function(a){return a&&!a.isAdmin()&&b&&b.canUserModerate(a)},
  4369. g=function(b){return a&&b&&a.isFriend(b)},
  4370. h=function(b){return a&&b&&!a.isMuted(b)},
  4371. s=function(a){return a&&a.isAway()},
  4372. m=function(a,b,c){b=a(b);a=a(c);return b&&!a?-1:!b&&a?1:0};
  4373. return function(a,b){return m(c,a,b)||m(d,a,b)||m(e,a,b)||m(f,a,b)||m(g,a,b)||m(h,a,b)||a&&b&&a.username.toLowerCase().localeCompare(b.username.toLowerCase())||m(s,a,b)}
  4374. };
  4375. holodeck._chat_window.userJoinedRoom = function(a){
  4376. this.withRoom(a,"userJoined");
  4377. if (a.data.room.type === 'guild') SRDotDX.util.userListChanged(a.data.user.username,a.data.user.variables.game_character_name,a.data.room.name);
  4378. };
  4379. holodeck._chat_window.userLeftRoom = function(a){
  4380. if (a.data.room.type !== 'guild') this.withRoom(a,"userLeft");
  4381. else {
  4382. var reallyLeft = true, fayeUsers = holodeck._konduit.fayeAdapter._fayeRoomListService._roomList._users || {};
  4383. for (var u in fayeUsers) if (fayeUsers.hasOwnProperty(u) && fayeUsers[u].username === a.data.user.username) { reallyLeft = false; break; }
  4384. if (reallyLeft) this.withRoom(a,"userLeft"); //: console.log('Prevented! roomType: '+a.data.room.type+', user: '+a.data.user.username);
  4385. }
  4386. };
  4387. // custom chat commands
  4388. holodeck.addDotdChatCommand("stop", function (deck, text) {
  4389. if (SRDotDX.gui.isPosting) SRDotDX.gui.FPXStopPosting();
  4390. else SRDotDX.util.extEcho('<b>/stop</b>: Links are not being posted. Stop command invalid.');
  4391. return false;
  4392. });
  4393. holodeck.addDotdChatCommand("e", function (deck, text) {
  4394. var s = text.slice(2);
  4395. if (s != "") holodeck.activeDialogue().SRDotDX_emote(s);
  4396. else SRDotDX.util.extEcho('<b>/e</b>: Empty message specified');
  4397. return false;
  4398. });
  4399. holodeck.addDotdChatCommand("kill", function (deck, text) {
  4400. document.getElementById("gameiframe").src = "";
  4401. SRDotDX.util.extEcho('Game window killed, have a nice chatting.');
  4402. return false;
  4403. });
  4404. holodeck.addDotdChatCommand("update", function (deck, text) {
  4405. SRDotDX.request.version();
  4406. return false;
  4407. });
  4408. holodeck.addDotdChatCommand("help", function (deck, text) {
  4409. var d = "<b>Available chat commands:</b><br>";
  4410. d += "/stop /e /kill /update /reload /relaod /rl /reloaf /mute /unmute /mutelist /ign /unign /ignlist /friend /unfriend /script /clear /cls /clearx /clx /getlinks /wikil /import /imp /fs /room /ijoin /join /wiki /guide /manual /slap /sh /camp /perc /citadel /raid /rd /help";
  4411. d += '<br><br><a href="https://docs.google.com/document/d/14X0WhnJrISQbxdfQv_scJbG1sUyXdE2g4iMfHmLM0E0/edit" target="_blank">You can click here to navigate to script guide for detailed instructions or use /guide and /manual commands.</a>';
  4412. SRDotDX.util.extEcho(d);
  4413. return false;
  4414. });
  4415. holodeck.addDotdChatCommand("reload,relaod,rl,reloaf", function (deck, text) {
  4416. SRDotDX.reload();
  4417. return false;
  4418. });
  4419. holodeck.addDotdChatCommand("mute", function (deck, text) {
  4420. var s = text.split(" ");
  4421. if (s.length == 2 && s[1] != "") {
  4422. SRDotDX.config.mutedUsers[s[1]] = true;
  4423. SRDotDX.util.extEcho('User "' + s[1] + '" muted. Use the /unmute command to undo, and the /mutelist to see all muted users.');
  4424. SRDotDX.config.save(false);
  4425. }
  4426. else SRDotDX.util.extEcho('<b>/mute</b>: Invalid parameters specified. The proper syntax is "/mute [username]".');
  4427. return false;
  4428. });
  4429. holodeck.addDotdChatCommand("ign", function (deck, text) {
  4430. var s = text.split(" ");
  4431. if (s.length == 3 && s[1] != "" && s[2] != "") {
  4432. SRDotDX.config.ignUsers[s[1]] = { ign: s[2], gld: '*unknown*'}; //s[2];
  4433. SRDotDX.util.extEcho(s[1] + '\'s ign "' + s[2] + '" added. Use the /unign command to undo, and the /ignlist to see all users with known ign.');
  4434. SRDotDX.config.save(false);
  4435. }
  4436. else SRDotDX.util.extEcho('<b>/ign</b>: Invalid parameters specified. The proper syntax is "/ign [kong username] [in game name]".');
  4437. return false;
  4438. });
  4439. holodeck.addDotdChatCommand('unmute', function (deck, text) {
  4440. var s = text.split(' ');
  4441. if (s.length === 2 && s[1] !== '') {
  4442. if (s[1] === 'all') {
  4443. for (var u in SRDotDX.config.mutedUsers) delete SRDotDX.config.mutedUsers[u];
  4444. SRDotDX.config.save(false);
  4445. SRDotDX.util.extEcho('All users unmuted.');
  4446. }
  4447. else if (SRDotDX.config.mutedUsers[s[1]]) {
  4448. delete SRDotDX.config.mutedUsers[s[1]];
  4449. SRDotDX.util.extEcho('User "' + s[1] + '" unmuted.');
  4450. SRDotDX.config.save(false);
  4451. }
  4452. else SRDotDX.util.extEcho('No muted user "' + s[1] + '" found.');
  4453. }
  4454. else SRDotDX.util.extEcho('<b>/unmute</b>: Invalid parameters specified. The proper syntax is "/unmute [username]". "/unmute all" can be used to unmute all muted users.');
  4455. return false;
  4456. });
  4457. holodeck.addDotdChatCommand('unign', function (deck, text) {
  4458. var s = text.split(' ');
  4459. if (s.length === 2 && s[1] !== '') {
  4460. if (s[1] === 'all') {
  4461. for (var u in SRDotDX.config.ignUsers) delete SRDotDX.config.ignUsers[u];
  4462. SRDotDX.config.save(false);
  4463. SRDotDX.util.extEcho('All users removed from IGN list.');
  4464. }
  4465. else if (SRDotDX.config.ignUsers[s[1]]) {
  4466. delete SRDotDX.config.ignUsers[s[1]];
  4467. SRDotDX.util.extEcho('Removed ' + s[1] + '\'s IGN.');
  4468. SRDotDX.config.save(false);
  4469. }
  4470. else SRDotDX.util.extEcho('No IGN of user "' + s[1] + '" found.');
  4471. }
  4472. else SRDotDX.util.extEcho('<b>/unign</b>: Invalid parameters specified. The proper syntax is "/unign [username]". "/unign all" can be used to clear IGN list.');
  4473. return false;
  4474. });
  4475. holodeck.addDotdChatCommand('mutelist', function (deck, text) {
  4476. var s = '<b>List of users currently muted:</b><br/>';
  4477. var i = 0;
  4478. for (var u in SRDotDX.config.mutedUsers) {
  4479. s += u + '<br>';
  4480. i++
  4481. }
  4482. if (i == 0) s = 'No users currently muted.<br/>';
  4483. s += '<br>Use the /mute and /unmute commands to add or remove users on this list.';
  4484. SRDotDX.util.extEcho(s);
  4485. return false;
  4486. });
  4487. holodeck.addDotdChatCommand('ignlist', function (deck, text) {
  4488. var s = '<b>List of known users IGN:</b><br>';
  4489. if (SRDotDX.config.ignUsers.length === 0) s = 'No users added to IGN list.<br/>';
  4490. else for (var u in SRDotDX.config.ignUsers) s += u + ':' + SRDotDX.config.ignUsers[u].ign + '<br/>';
  4491. s += '<br>Use the /ign and /unign commands to add or remove users on this list.';
  4492. SRDotDX.util.extEcho(s);
  4493. return false;
  4494. });
  4495. holodeck.addDotdChatCommand('script', function (deck, text) {
  4496. SRDotDX.gui.sendChatMsg('Script link: https://greasyfork.org/scripts/406-mutik-s-dotd-script');
  4497. return false;
  4498. });
  4499. holodeck.addDotdChatCommand('clear,cls', function (deck, text) {
  4500. if (SRDotDX.alliance.isActive) SRDotDX.c('#alliance_chat_window').html('',true);
  4501. else holodeck.activeDialogue().clear();
  4502. return false
  4503. });
  4504. holodeck.addDotdChatCommand('keywords', function (deck, text) {
  4505. SRDotDX.util.extEcho('<b>List of available filter keywords:</b><br>'+Object.keys(SRDotDX.searchPatterns).join(', '));
  4506. });
  4507. holodeck.addDotdChatCommand('clearx,clx', function (deck, text) {
  4508. var x = document.getElementsByClassName('script');
  4509. var i = x.length;
  4510. while(i--) x[i].parentNode.removeChild(x[i]);
  4511. setTimeout(SRDotDX.gui.scrollChat, 50, true);
  4512. return false
  4513. });
  4514. holodeck.addDotdChatCommand('wikil', function (deck, text) {
  4515. SRDotDX.gui.sendChatMsg('http://dotd.wikia.com/wiki/Dawn_of_the_Dragons_Wiki');
  4516. return false;
  4517. });
  4518. holodeck.addDotdChatCommand('import,imp', function (deck, text) {
  4519. SRDotDX.util.extEcho('Importing all raids from server');
  4520. SRDotDX.request.raids();
  4521. return false;
  4522. });
  4523. holodeck.addDotdChatCommand('friend', function (deck, text) {
  4524. var s = text.split(" ");
  4525. if (s.length == 2 && s[1] != "") {
  4526. if (typeof SRDotDX.config.friendUsers[s[1]] != 'object') {
  4527. SRDotDX.config.friendUsers[s[1]] = [false, false, false, false, true];
  4528. SRDotDX.config.save(false);
  4529. SRDotDX.gui.refreshFriends();
  4530. SRDotDX.util.extEcho('Added ' + s[1] + ' to friends');
  4531. }
  4532. }
  4533. return false;
  4534. });
  4535. holodeck.addDotdChatCommand('unfriend', function (deck, text) {
  4536. var s = text.split(" ");
  4537. if (s[1] == 'all') {
  4538. for (var u in SRDotDX.config.friendUsers) delete SRDotDX.config.friendUsers[u];
  4539. SRDotDX.config.save(false);
  4540. SRDotDX.gui.refreshFriends();
  4541. SRDotDX.util.extEcho('All users removed from friend list.');
  4542. }
  4543. else if (SRDotDX.config.friendUsers[s[1]]) {
  4544. delete SRDotDX.config.friendUsers[s[1]];
  4545. SRDotDX.config.save(false);
  4546. SRDotDX.gui.refreshFriends();
  4547. SRDotDX.util.extEcho('Removed ' + s[1] + ' from friends');
  4548. }
  4549. else SRDotDX.util.extEcho('User "' + s[1] + '" not found on friend list.');
  4550. return false;
  4551. });
  4552. holodeck.addDotdChatCommand('fs', function (deck, text) {
  4553. var cmd = text.split(' ');
  4554. if (cmd[0] === '/fs' && cmd[1]) {
  4555. SRDotDX.util.extEcho('Posting raid to friends');
  4556. document.getElementById('DotDX_raidsToSpam').value = cmd[1];
  4557. SRDotDX.gui.spamRaidsToFriends();
  4558. }
  4559. else SRDotDX.util.extEcho('Wrong syntax. Usage: /fs <raid link>');
  4560. return false;
  4561. });
  4562. holodeck.addDotdChatCommand('room', function (deck, text) {
  4563. var cmd = text.split(' ');
  4564. if (cmd[0] === '/room' && cmd[1]) SRDotDX.gui.gotoRoom(cmd[1]);
  4565. else SRDotDX.gui.gotoRoom(0);
  4566. return false;
  4567. });
  4568. holodeck.addDotdChatCommand('getlinks', function (deck, text) {
  4569. SRDotDX.util.getChatLinks();
  4570. SRDotDX.util.extEcho('Links opened in new tab');
  4571. return false;
  4572. });
  4573. holodeck.addDotdChatCommand('ijoin,join', function (deck, text) {
  4574. if (text.charAt(1) === 'j') SRDotDX.gui.quickImportAndJoin(text.slice(6));
  4575. else SRDotDX.gui.quickImportAndJoin(text.slice(7), true);
  4576. return false;
  4577. });
  4578. holodeck.addDotdChatCommand('wiki', function (deck, text) {
  4579. var p = /^\/wiki (.*?)$/i.exec(text);
  4580. if (p) {
  4581. window.open('http://dotd.wikia.com/wiki/Special:Search?search=' + p[1]);
  4582. SRDotDX.util.extEcho('Wiki search opened.');
  4583. }
  4584. else SRDotDX.util.extEcho('<b>/wiki</b>: Invalid parameters specified');
  4585. return false;
  4586. });
  4587. holodeck.addDotdChatCommand('guide,manual', function (deck, text) {
  4588. window.open('https://docs.google.com/document/d/14X0WhnJrISQbxdfQv_scJbG1sUyXdE2g4iMfHmLM0E0/edit');
  4589. SRDotDX.util.extEcho('Script guide opened in new tab/window.');
  4590. return false;
  4591. });
  4592. holodeck.addDotdChatCommand('slap', function (deck, text) {
  4593. var p = /^\/slap (.*?)$/i.exec(text);
  4594. if (p) {
  4595. var num = Math.round((Math.random() * (SRDotDX.slapSentences.length - 1)));
  4596. SRDotDX.gui.sendChatMsg('*' + SRDotDX.slapSentences[num].replace(/<nick>/g, p[1]) + '*');
  4597. }
  4598. else SRDotDX.util.extEcho('<b>/slap</b>: Invalid parameters specified');
  4599. return false;
  4600. });
  4601. holodeck.addDotdChatCommand('sh', function (deck, text) {
  4602. var p = /^\/sh (.*?)$/i.exec(text);
  4603. if (p) {
  4604. var fnd1 = p[1].toLowerCase(), fnd2 = p[1].length, found = false, sho;
  4605. for (var i in SRDotDX.shortcuts) {
  4606. if (SRDotDX.shortcuts.hasOwnProperty(i)) {
  4607. sho = SRDotDX.shortcuts[i];
  4608. if (sho.n.toLowerCase().indexOf(fnd1) > -1 && sho.n.length == fnd2) {
  4609. SRDotDX.util.extEcho('<b>' + sho.bn + '</b>: ' + sho.desc);
  4610. found = true;
  4611. }
  4612. }
  4613. }
  4614. if (!found) SRDotDX.util.extEcho('<b>/sh</b>: Shortcut not found in db');
  4615. }
  4616. else SRDotDX.util.extEcho('<b>/sh</b>: No parameters specified');
  4617. return false;
  4618. });
  4619. holodeck.addDotdChatCommand('perc', function (deck, text) {
  4620. var bok = text.indexOf('bok', 4);
  4621. var cwp = text.indexOf('cwp', 4);
  4622. var empty = text.length < 6;
  4623. var output = "";
  4624. if (bok >= 0 || empty) output = "<b>Book of Knowledge Perc. Tiers:</b><br>\
  4625. 1 : Brown/Grey<br>\
  4626. 4k : Brown/Grey/Green<br>\
  4627. 6k : Grey/Green<br>\
  4628. 10k : Grey/Green/Blue<br>\
  4629. 14k : Green/Blue<br>\
  4630. 16k : Green/Blue/Purple<br>\
  4631. 18k : Blue/Purple<br>\
  4632. 22k : Blue/Purple/Orange<br>\
  4633. 24k : Purple/Orange<br>\
  4634. 30k : Orange<br>\
  4635. 33k : Orange/Red (more orange)<br>\
  4636. 36k : Orange/Red (more red)<br>\
  4637. 50k : Orange/Red (even more red)<br>\
  4638. 70k : Red<br>\
  4639. 80k : Red/Bronze<br>\
  4640. 90k : Red/Bronze<br>\
  4641. 100k : ???<br>\
  4642. 110k : Bronze/Silver<br>\
  4643. 120k : Bronze/Silver<br>\
  4644. 130k : Bronze/Silver<br>\
  4645. 140k : Silver<br>\
  4646. 150k : Silver/Gold<br>\
  4647. 160k : Silver/Gold<br>\
  4648. 170k : Silver/Gold";
  4649. if (empty) output += "<br>\
  4650. -------------------------------------------------<br>";
  4651. if (cwp >= 0 || empty) output += "<b>Clockwork Parts Perc. Tiers:</b><br>\
  4652. 1-1999: 10x Perf. Clockwork Part<br>\
  4653. 2000-3999: 25x Perf. Clockwork Part<br>\
  4654. 4000-5999: 40x Perf. Clockwork Part<br>\
  4655. 6000-7999: 55x Perf. Clockwork Part<br>\
  4656. 8000-9999: 70x Perf. Clockwork Part<br>\
  4657. 10000-11999: 85x Perf. Clockwork Part<br>\
  4658. 12000-13999: 100x Perf. Clockwork Part<br>\
  4659. 14000-15999: 115x Perf. Clockwork Part<br>\
  4660. 16000-17999: 130x Perf. Clockwork Part<br>\
  4661. 18000-19999: 145x Perf. Clockwork Part<br>\
  4662. 20000-21999: 160x Perf. Clockwork Part<br>\
  4663. 22000-23999: 175x Perf. Clockwork Part<br>\
  4664. 24000-25999: 190x Perf. Clockwork Part<br>\
  4665. 26000-27999: 205x Perf. Clockwork Part<br>\
  4666. 28000-29999: 220x Perf. Clockwork Part<br>\
  4667. 30000-32999: 235x Perf. Clockwork Part<br>\
  4668. 33000-35999: 245x Perf. Clockwork Part<br>\
  4669. 36000+ : 260x Perf. Clockwork Part";
  4670. SRDotDX.util.extEcho(output);
  4671. return false;
  4672. });
  4673. holodeck.addDotdChatCommand('citadel', function (deck, text) {
  4674. SRDotDX.util.extEcho("Barrack Book = Grune N Quest<br>\
  4675. Barrack Scroll 1 = Hydra NM Raid<br>\
  4676. Barrack Scroll 2 = Research Library book<br>\
  4677. Barrack Scroll 3 = Rhalmarius the Despoiler NM Raid/Crafting<br>\
  4678. Barrack Scroll 4 = The New Claw (World Raid) craft<br>\
  4679. Barrack Scroll 5 = Burbata the Spine-Crusher NM Raid<br>\
  4680. Barrack Scroll 6 = Temp loot from Hargamesh/Grimsly NM Raids<br>\
  4681. Barrack Scroll 7 = The Baroness NM Quest<br>\
  4682. Barrack Scroll 8 = Crafting from Imryx the Incinerator NM Raid<br>\
  4683. Armorsmith Book = Lurking Horror N Quest<br>\
  4684. Armorsmith Scroll 1 = Nalagarst NM Raid<br>\
  4685. Armorsmith Scroll 2 = Research Library 1<br>\
  4686. Armorsmith Scroll 3 = Dragon's Lair NM Raid<br>\
  4687. Armorsmith Scroll 4 = Temp loot from Rift/Sisters NM Raid<br>\
  4688. Armorsmith Scroll 5 = Baroness NM Raid<br>\
  4689. Weaponsmith Book = Erebus N Quest<br>\
  4690. Weaponsmith Scroll 1 = Baroness NM Raid<br>\
  4691. Weaponsmith Scroll 2 = Research Library 1<br>\
  4692. Weaponsmith Scroll 3 = Dragon's Lair NM Raid<br>\
  4693. Weaponsmith Scroll 4 = Temp loot from Mardachus NM Raid<br>\
  4694. Weaponsmith Scroll 5 = Warlord Zugen NM Raid<br>\
  4695. Alchemist Book = Nalagarst N Quest<br>\
  4696. Alchemist Scroll 1 = Kalaxia N Quest<br>\
  4697. Alchemist Scroll 2 = Research Library 5<br>\
  4698. Alchemist Scroll 3 = The New Claw (World Raid)<br>\
  4699. Alchemist Scroll 4 = Teremarthu NM Raid<br>\
  4700. Research Book = Bellarius N Quest<br>\
  4701. Research Library Scroll 1 = Mardachus NM Raid<br>\
  4702. Research Library Scroll 2 = Valanazes NM Raid<br>\
  4703. Research Library Scroll 3 = Teremarthu NM Raid<br>\
  4704. Research Library Scroll 4 = Z'ralk'thalat NM Raid<br>\
  4705. Research Library Scroll 5 = Simulacrum of Dahrizon NM Quest<br>\
  4706. Research Library Scroll 6 = Count Siculus' Phantom N Quest<br>\
  4707. Pet Emporium Book = Count Siculus' Phantom N Quest<br>\
  4708. Pet Emporium Scroll 1 = Research Library 4<br>\
  4709. Pet Emporium Scroll 2 = Cannibal Barbarians NM Raid<br>\
  4710. Stables Book = Valanazes N Quest<br>\
  4711. Stables Scroll 1 = Frog-men Assassins NM Raid<br>\
  4712. Stables Scroll 2 = Research Library 2<br>\
  4713. Stables Scroll 3 = Mount Chest<br>\
  4714. Training Ground Book = Teremarthu N Quest<br>\
  4715. Training Ground Scroll 1 = Research Library 3<br>\
  4716. Training Ground Scroll 2 = Temporary loot from Z7 NM Raids<br>\
  4717. Training Ground Scroll 3 = Invasion Rank: Wyrm-Commander<br>\
  4718. Training Ground Scroll 4 = Invasion Rank: Chief Battlefield Overseer<br>\
  4719. Training Ground Scroll 5 = Count Siculus' Phantom L&NM Raid<br>\
  4720. Training Ground Scroll 6 = Thaltherda the Sea-Slitherer NM Raid<br>\
  4721. Wizard's Tower Book = Ruzzik the Slayer N Quest<br>\
  4722. Wizard's Tower Scroll 1 = Salome the Seductress NM Raid<br>\
  4723. Wizard's Tower Scroll 2 = Kalaxia the Far-Seer NM Raid<br>\
  4724. Wizard's Tower Scroll 3 = Yydian's Sanctuary NM Raid<br>\
  4725. Wizard's Tower Scroll 4 = Drulcharus NM Raid<br>\
  4726. Jeweler Book = Krugnug N Quest<br>\
  4727. Jeweler Scroll 1 = Thaltherda the Sea-Slitherer NM Raid<br>\
  4728. Jeweler Scroll 2 = Crafting (General/Events)<br>\
  4729. Jeweler Scroll 3 = Spectral Erebus Raid/Crafting");
  4730. return false;
  4731. });
  4732. holodeck.addDotdChatCommand('camp', function(deck, text) {
  4733. var p = text.split(' '), msg = '';
  4734. if (p[1] && SRDotDX.camps.hasOwnProperty(p[1].toLowerCase())) {
  4735. var camp = SRDotDX.camps[p[1].toLowerCase()];
  4736. var num = camp.tiers[0].length, j, jl;
  4737. msg += '<a class="title" target="_blank" href="http://dotd.wikia.com/wiki/' + camp.name.replace(/ /g, '_').replace(/'/g, "%27") + '">' + camp.name + '</a>';
  4738. msg += '<br>Camp time: N ' + camp.time[0] + 'h, H ' + camp.time[1] + 'h<br>Prefixes: ' + camp.prefixes;
  4739. msg += '<br><table class="camps"><thead><tr><th>Dmg</th><th>CU</th>' + (num > 3 ? '<th>R</th><th class="tb">E</th>' : '<th class="tb">RE</th>');
  4740. for(var i = 0, il = camp.numNodes; i < il; ++i) msg += '<th>' + camp[camp.nodes[i]].sname + '</th>'; msg += '</tr></thead><tbody>';
  4741. if(num > 3) {
  4742. for(i = 0, il = camp.tiers.length; i < il; ++i) {
  4743. msg += '<tr class="head"><td class="ep">' + SRDotDX.util.getShortNumMil(camp.tiers[i][0]) + '</td><td>' + camp.tiers[i][1] + '</td><td>' + camp.tiers[i][2] + '</td><td class="tb">' + camp.tiers[i][3] + '</td>';
  4744. for(j = 0, jl = camp.numNodes; j < jl; ++j) msg += camp[camp.nodes[j]].tiers[i] ? '<td class="mark">'+(camp[camp.nodes[j]].epics !== undefined ? camp[camp.nodes[j]].epics[i] : '&#x2713;' )+'</td>' : '<td></td>';
  4745. }
  4746. }
  4747. else {
  4748. for(i = 0, il = camp.tiers.length; i < il; ++i) {
  4749. msg += '<tr class="head"><td class="ep">' + SRDotDX.util.getShortNumMil(camp.tiers[i][0]) + '</td><td>' + camp.tiers[i][1] + '</td><td class="tb">' + camp.tiers[i][2] + '</td>';
  4750. for(j = 0, jl = camp.numNodes; j < jl; ++j) msg += camp[camp.nodes[j]].tiers[i] ? '<td class="mark">&#x2713;</td>' : '<td></td>';
  4751. }
  4752. }
  4753. msg += '</tbody></table>';
  4754. var node;
  4755. for(i = 0, il = camp.numNodes; i < il; ++i) {
  4756. node = camp[camp.nodes[i]];
  4757. msg += (i ? '<br>' : '') + node.sname + ' &mdash; ' + node.name + ', FS: N ' + SRDotDX.util.getShortNumMil(node.hp[0] / node.size) + ' / H ' + SRDotDX.util.getShortNumMil(node.hp[1] / node.size);
  4758. }
  4759. SRDotDX.util.extEcho(msg);
  4760. }
  4761. else SRDotDX.util.extEcho('No campaigns found matching "' + (p[1] ? p[1] : '') + '". Valid values are: ' + Object.keys(SRDotDX.camps).join(', '));
  4762. return false;
  4763. });
  4764. holodeck.addDotdChatCommand('raid,rd', function(deck, text) {
  4765. var p = text.split(' ');
  4766. if(p[1]) {
  4767. var msg = '', j, jl;
  4768. var diff = !isNaN(p[2]) ? p[2] - 1 : -1;
  4769. var fnd = p[1].toLowerCase();
  4770. var keys = Object.keys(SRDotDX.raids);
  4771. for(var k = 0, kl = keys.length; k < kl; ++k) {
  4772. var raid = SRDotDX.raids[keys[k]];
  4773. if(raid.name.toLowerCase().indexOf(fnd) > -1) {
  4774. if(msg !== '') msg += '<hr>';
  4775. msg += '<a class="title" target="_blank" href="http://dotd.wikia.com/wiki/' + raid.name.replace(/ /g, '_').replace(/'/g, "%27") + (raid.stat === 'H' ? '_(Guild_Raid)">' : '_(Raid)">') + raid.name + '</a>';
  4776. msg += '<br>' + (raid.type === '' ? '' : raid.type + '<br>') + SRDotDX.raidSizes[raid.size].name + ' Raid (' + (raid.size === 101 ? 100 : raid.size) + ' slots) | ' + raid.duration + 'h';
  4777. msg += '<br><table class="raids">';
  4778. switch(diff) {
  4779. case 0: msg += '<colgroup><col><col class="selected"><col><col><col></colgroup>'; break;
  4780. case 1: msg += '<colgroup><col><col><col class="selected"><col><col></colgroup>'; break;
  4781. case 2: msg += '<colgroup><col><col><col><col class="selected"><col></colgroup>'; break;
  4782. case 3: msg += '<colgroup><col><col><col><col><col class="selected"></colgroup>'; break;
  4783. default: msg += '<colgroup><col><col><col><col><col></colgroup>'; break;
  4784. }
  4785. var size = raid.size < 15 ? 10 : raid.size, fs = [];
  4786. for(j = 0; j < 4; ++j) fs[j] = raid.health[j] / (raid.size == 101 ? 100 : raid.size);
  4787. msg += '<thead> \
  4788. <tr><th style="border:0; background-color: transparent;"></th><th>Normal</th><th>Hard</th><th>Legend</th><th>NMare</th></tr> \
  4789. </thead> \
  4790. <tbody> \
  4791. <tr class="head"><td class="ep">HP</td><td>' + SRDotDX.util.getShortNum(raid.health[0]) + '</td><td>' + SRDotDX.util.getShortNum(raid.health[1]) + '</td><td>' + SRDotDX.util.getShortNum(raid.health[2]) + '</td><td>' + SRDotDX.util.getShortNum(raid.health[3]) + '</td></tr> \
  4792. <tr class="head"><td class="ep">FS</td><td>' + SRDotDX.util.getShortNum(fs[0]) + '</td><td>' + SRDotDX.util.getShortNum(fs[1]) + '</td><td>' + SRDotDX.util.getShortNum(fs[2]) + '</td><td>' + SRDotDX.util.getShortNum(fs[3]) + '</td></tr> \
  4793. <tr class="head split"><td class="ep">AP</td><td>&mdash;</td><td>&mdash;</td><td>&mdash;</td><td>' + SRDotDX.util.getShortNum(fs[3] / 2.0) + '</td></tr>';
  4794. if(typeof raid.lt !== 'object' && raid.id !== 'rhalmarius_the_despoiler' && raid.id !== 'grundus' && raid.size < 10000) {
  4795. var ratio = SRDotDX.raidSizes[size].ratios;
  4796. var ename = SRDotDX.raidSizes[size].enames;
  4797. for (j = 0, jl = ratio.length; j < jl; ++j) if (ratio[j] > 0) msg += '<tr><td class="ep">' + ename[j] + '</td><td>' + SRDotDX.util.getShortNum(fs[0] * ratio[j]) + '</td><td>' + SRDotDX.util.getShortNum(fs[1] * ratio[j]) + '</td><td>' + SRDotDX.util.getShortNum(fs[2] * ratio[j]) + '</td><td>' + SRDotDX.util.getShortNum(fs[3] * ratio[j]) + '</td></tr>';
  4798. }
  4799. else if (typeof raid.lt === 'object') {
  4800. var elen = SRDotDX.lootTiers[raid.lt[0]].tiers;
  4801. var eleh = SRDotDX.lootTiers[raid.lt[1]].tiers;
  4802. var elel = SRDotDX.lootTiers[raid.lt[2]].tiers;
  4803. var elenm = SRDotDX.lootTiers[raid.lt[3]].tiers;
  4804. var epics = SRDotDX.lootTiers[raid.lt[0]].epics;
  4805. var best = SRDotDX.lootTiers[raid.lt[0]].best;
  4806. var e = SRDotDX.lootTiers[raid.lt[0]].e ? 'E' : '';
  4807. if(typeof elen[0] === 'number') for(j = 0, jl = epics.length; j < jl; ++j) msg += '<tr' + (j === best ? ' class="best"' : '') + '><td class="ep">' + epics[j] + e + '</td><td>' + SRDotDX.util.getShortNumMil(elen[j]) + '</td><td>' + SRDotDX.util.getShortNumMil(eleh[j]) + '</td><td>' + SRDotDX.util.getShortNumMil(elel[j]) + '</td><td>' + SRDotDX.util.getShortNumMil(elenm[j]) + '</td></tr>';
  4808. else msg += '<tr><td class="ep">-</td><td>' + elen[0] + '</td><td>' + eleh[0] + '</td><td>' + elel[0] + '</td><td>' + elenm[0] + '</td></tr>';
  4809. }
  4810. msg += '</tbody></table>';
  4811. }
  4812. }
  4813. if (msg != '') SRDotDX.util.extEcho(msg);
  4814. else SRDotDX.util.extEcho('No raids found matching: ' + p[1]);
  4815. }
  4816. else SRDotDX.util.extEcho('<b>/raid</b>: Invalid parameters specified (<a href="#" onclick="SRDotDX.gui.help(\'raid\')">help</a>)');
  4817. return false;
  4818. });
  4819. window.onbeforeunload = function(){SRDotDX.config.save(false)};
  4820. SRDotDX.fails = 0;
  4821. console.log('[DotDX] Core loaded. Loading user interface...');
  4822. SRDotDX.gui.load();
  4823. SRDotDX.request.init();
  4824. setTimeout(function(){delete SRDotDX.load}, 100);
  4825. }
  4826. else if(++SRDotDX.fails < 20) {
  4827. console.log('[DotDX] Missing needed Kong resources (try:' + SRDotDX.fails + '), retrying in 0.75 second...');
  4828. setTimeout(SRDotDX.load, 750);
  4829. }
  4830. else {
  4831. console.log('[DotDX] Unable to locate required Kong resources. Loading aborted');
  4832. setTimeout(function(){delete SRDotDX}, 1);
  4833. }
  4834. }
  4835. };
  4836. console.log('[DotDX] Initialized. Checking for needed Kong resources ...');
  4837. SRDotDX.load();
  4838. }
  4839.  
  4840. console.log('[DotDX] Initializing ...');
  4841. if (window.top == window.self) {
  4842. document.addEventListener("dotd.req", function (param) {
  4843. var p = JSON.parse(param.data);
  4844. if (p.wrappedJSObject) p = p.wrappedJSObject;
  4845. p.callback = function (e, r) {
  4846. this.onload = null;
  4847. this.onerror = null;
  4848. this.ontimeout = null;
  4849. this.event = e;
  4850. this.status = r.status;
  4851. this.responseText = r.responseText;
  4852. var c = document.createEvent("MessageEvent");
  4853. if (c.initMessageEvent) c.initMessageEvent(this.eventName, false, false, JSON.stringify(this), document.location.protocol + "//" + document.location.hostname, 1, unsafeWindow, null);
  4854. else c = new MessageEvent(this.eventName, {"origin": document.location.protocol + "//" + document.location.hostname, "lastEventId": 1, "source": unsafeWindow, "data": JSON.stringify(this)});
  4855. document.dispatchEvent(c);
  4856. };
  4857. p.onload = p.callback.bind(p, "load");
  4858. p.onerror = p.callback.bind(p, "error");
  4859. p.ontimeout = p.callback.bind(p, "timeout");
  4860. setTimeout(function(){ GM_xmlhttpRequest(p) }, 1);
  4861. });
  4862.  
  4863. scr = document.createElement('script');
  4864. scr.appendChild(document.createTextNode('(' + main + ')()'));
  4865. document.head.appendChild(scr);
  4866. }
  4867. }
  4868. else if(window.location.host === '50.18.191.15') {
  4869. if (typeof GM_setValue === 'undefined') {
  4870. var GM_setValue = function (name, value) {
  4871. localStorage.setItem(name, (typeof value).substring(0, 1) + value);
  4872. }
  4873. }
  4874. if (typeof GM_getValue === 'undefined') {
  4875. var GM_getValue = function (name, dvalue)
  4876. {
  4877. var value = localStorage.getItem(name);
  4878. if (typeof value !== 'string') return dvalue;
  4879. else {
  4880. var type = value.substring(0, 1);
  4881. value = value.substring(1);
  4882. if (type === 'b') return (value === 'true');
  4883. else if (type === 'n') return Number(value);
  4884. else return value;
  4885. }
  4886. };
  4887. }
  4888. window.onmessage = function(e) {
  4889. var c = e.data.split('#');
  4890. if(c[0].indexOf('dotdx') !== -1) {
  4891. if(c[0] === 'dotdx.save') {
  4892. GM_setValue('DotDXext', c[1]);
  4893. console.log("[DotDX] Saved data: "+c[1]);
  4894. }
  4895. var conf = JSON.parse(c[1]);
  4896. if(conf.removeWChat) {
  4897. if(document.getElementById('swfdiv') !== null) document.getElementById('swfdiv').parentNode.style.left = '0px';
  4898. if(document.getElementById('chatdiv') !== null) {
  4899. var remdiv = document.getElementById('chatdiv').parentNode;
  4900. remdiv.parentNode.removeChild(remdiv);
  4901. }
  4902. }
  4903. else if(conf.leftWChat && !conf.hideWChat) {
  4904. if(document.getElementById('chatdiv') !== null) document.getElementById('chatdiv').parentNode.style.left = '0px';
  4905. if(document.getElementById('swfdiv') !== null) document.getElementById('swfdiv').parentNode.style.left = '265px';
  4906. }
  4907. else {
  4908. if(document.getElementById('chatdiv') !== null) document.getElementById('chatdiv').parentNode.style.left = '760px';
  4909. if(document.getElementById('swfdiv') !== null) document.getElementById('swfdiv').parentNode.style.left = '0px';
  4910. }
  4911. }
  4912. };
  4913. if (typeof GM_getValue("DotDXext") !== 'string') GM_setValue("DotDXext",JSON.stringify({'removeWChat':false,'leftWChat':false,'hideWChat':false}));
  4914. window.postMessage('dotdx.init#'+GM_getValue('DotDXext'),'*');
  4915. console.log("[DotDX] Injected code into GameFrame");
  4916. }