Mutik's DotD Script

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

目前為 2015-09-10 提交的版本,檢視 最新版本

  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.46
  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. // @hompage http://www.dotdraids.pl
  14. // ==/UserScript==
  15.  
  16. //best loop atm: for(var i=0, l=obj.length; i<l; ++i) - for with caching and pre-increment
  17.  
  18. if (window.location.host == "www.kongregate.com") {
  19. function main() {
  20.  
  21. if (typeof GM_setValue == 'undefined') {
  22. var GM_setValue = function (name, value) {
  23. localStorage.setItem(name, (typeof value).substring(0, 1) + value);
  24. };
  25. }
  26. if (typeof GM_getValue == 'undefined') {
  27. var GM_getValue = function (name, dvalue) {
  28. var value = localStorage.getItem(name);
  29. if (typeof value != 'string') return dvalue;
  30. else {
  31. var type = value.substring(0, 1);
  32. value = value.substring(1);
  33. if (type == 'b') return (value == 'true');
  34. else if (type == 'n') return Number(value);
  35. else return value;
  36. }
  37. };
  38. }
  39. //if (typeof GM_deleteValue == 'undefined') var GM_deleteValue = function(name) { localStorage.removeItem(name) };
  40.  
  41. window.FPX = {
  42. LandBasePrices: [4000, 15000, 25000, 50000, 75000, 110000, 300000, 600000, 1200000],
  43. LandBaseIncome: [100, 300, 400, 700, 900, 1200, 2700, 4500, 8000],
  44. LandCostRatio: function (owned) {
  45. var landCosts = [4000, 15000, 25000, 50000, 75000, 110000, 300000, 600000, 1200000];
  46. var icr = [1, 1, 1, 1, 1, 1, 1, 1, 1];
  47. /*Income/Cost ratio*/
  48. var i = 9;
  49. while (i--) {
  50. landCosts[i] += FPX.LandBasePrices[i] * owned[i] / 10;
  51. icr[i] = FPX.LandBaseIncome[i] / landCosts[i];
  52. }
  53. return icr;
  54. }
  55. };
  56. window.timeSince = function (date, after) {
  57. if (typeof date === 'number') date = new Date(date);
  58. var seconds = Math.abs(Math.floor((new Date().getTime() - date.getTime()) / 1000));
  59. var interval = Math.floor(seconds / 31536000);
  60. var pretext = 'about ', posttext = after ? ' left' : ' ago';
  61. if (interval >= 1) return pretext + interval + ' year' + (interval == 1 ? '' : 's') + posttext;
  62. interval = Math.floor(seconds / 2592000);
  63. if (interval >= 1) return pretext + interval + ' month' + (interval == 1 ? '' : 's') + posttext;
  64. interval = Math.floor(seconds / 86400);
  65. if (interval >= 1) return pretext + interval + ' day' + (interval == 1 ? '' : 's') + posttext;
  66. interval = Math.floor(seconds / 3600);
  67. if (interval >= 1) return pretext + interval + ' hour' + (interval == 1 ? '' : 's') + posttext;
  68. interval = Math.floor(seconds / 60);
  69. if (interval >= 1) return interval + ' minute' + (interval == 1 ? '' : 's') + posttext;
  70. return Math.floor(seconds) + ' second' + (seconds == 1 ? '' : 's') + posttext;
  71. };
  72. window.isNumber = function (n) {
  73. return !isNaN(parseFloat(n)) && isFinite(n);
  74. };
  75. window.SRDotDX = {
  76. version: { major: "1.1.46", minor: 'Mutik\'s DotD Extension' },
  77. c: function (ele) {
  78. function Cele(ele) {
  79. this._ele = ele;
  80. this.ele = function() {return this._ele};
  81. this.set = function(param) {for (var attr in param) if (param.hasOwnProperty(attr)) this._ele.setAttribute(attr,param[attr]); return this};
  82. this.text = function(text) {this._ele.appendChild(document.createTextNode(text)); return this};
  83. this.html = function(text,overwrite) {this._ele.innerHTML = overwrite ? text : (this._ele.innerHTML + text); return this};
  84. this.on = function(event,func,bubble) {this._ele.addEventListener(event, func, bubble); return this};
  85. this.off = function(event,func,bubble) {this._ele.removeEventListener(event, func, bubble); return this};
  86. this.del = function() {this._ele.parentNode.removeChild(this._ele); return this};
  87. this.attach = function(method,dele) {
  88. if (typeof dele === 'string') dele = document.getElementById(dele);
  89. if (!(dele instanceof Node)) throw 'Invalid attachment element specified';
  90. else if (!/^(?:to|before|after)$/i.test(method)) throw 'Invalid append method specified';
  91. else if (method === 'to') dele.appendChild(this._ele);
  92. else if (method === 'before') dele.parentNode.insertBefore(this._ele, dele);
  93. else if (dele.nextSibling === null) dele.parentNode.appendChild(this._ele);
  94. else dele.parentNode.insertBefore(this._ele, dele.nextSibling);
  95. return this
  96. };
  97. }
  98. if (typeof ele === 'string') ele = ele.charAt(0) === '#' ? document.getElementById(ele.substring(1)) : document.createElement(ele);
  99. if (ele instanceof Node) return new Cele(ele);
  100. throw 'Invalid element type specified';
  101. },
  102. util: {
  103. isArrEq: function(a,b) {
  104. if(a.length !== b.length) return false;
  105. var ca = a.slice().sort().join(",");
  106. var cb = b.slice().sort().join(",");
  107. return ca === cb;
  108. },
  109. getChatLinks: function() {
  110. var obj, out = '<p style="font: normal 9pt \'Trebuchet MS\'">';
  111. for(var i = 0; i < SRDotDX.linksHistory.length; i++) {
  112. obj = SRDotDX.linksHistory[i];
  113. out += '('+(new Date(obj.t).toLocaleTimeString())+') <b>'+obj.u+'</b>: '+obj.m+'<br>';
  114. }
  115. out += '</p>';
  116. var x = window.open();
  117. x.document.open();
  118. x.document.write(out);
  119. x.document.close();
  120. },
  121. getChatNumber: function() {
  122. var cont = document.getElementById('chat_rooms_container').children, i = 0;
  123. for (i = 0; i < cont.length; i++) {
  124. if (cont[i].style.display === 'none' || cont[i].id.indexOf('alliance') === 0) continue;
  125. return i
  126. }
  127. return i;
  128. },
  129. getQueryVariable: function(v,s) {
  130. var query = String(s || window.location.search.substring(1));
  131. if (query.indexOf('?') > -1) query = query.substring(query.indexOf('?') + 1);
  132. var vars = query.split('&');
  133. var i = vars.length;
  134. while(i--) {
  135. var pair = vars[i].split('=');
  136. if (decodeURIComponent(pair[0]) == v) return decodeURIComponent(pair[1]);
  137. }
  138. return '';
  139. },
  140. getRaidFromUrl: function(url) {
  141. var r = {id: 0, boss: '', hash: '', diff: 0, sid: 1}, cnt = 0, i;
  142.  
  143. var reg = /[?&]([^=]+)=([^?&]+)/ig, p = url.replace(/&amp;/gi, '&').replace(/kv_&/gi, '&kv_').replace(/http:?/gi, '');
  144. while ((i = reg.exec(p)) !== null) {
  145. switch (i[1]) {
  146. case 'kv_raid_id':
  147. case 'raid_id': r.id = parseInt(i[2]); cnt++; break;
  148. case 'kv_difficulty':
  149. case 'difficulty': r.diff = parseInt(i[2]); cnt++; break;
  150. case 'kv_raid_boss':
  151. case 'raid_boss': r.boss = i[2]; cnt++; break;
  152. case 'kv_hash':
  153. case 'hash': r.hash = i[2]; cnt++; break;
  154. case 'kv_serverid':
  155. case 'serverid': r.sid = parseInt(i[2]); cnt++; break;
  156. }
  157. }
  158. if (cnt < 4) return null;
  159.  
  160. return r;
  161. },
  162. getUserList: function() {
  163. var guildUsers = holodeck._chat_window._rooms_by_type.guild._users_list;
  164. var guild = holodeck._chat_window._rooms_by_type.guild._room.name || '*unknown*';
  165. var user, nign;
  166. console.log("[DotDX] Received guild roster list, number of entries: " + guildUsers.length);
  167. for (var i = 0, il = guildUsers.length; i < il; ++i) {
  168. user = guildUsers[i].username;
  169. nign = guildUsers[i]._game_character_name;
  170. if (typeof SRDotDX.config.ignUsers[user] === 'undefined') SRDotDX.config.ignUsers[user] = { ign: nign, gld: guild };
  171. else {
  172. if (SRDotDX.config.ignUsers[user].ign !== nign) SRDotDX.config.ignUsers[user].ign = nign;
  173. if (SRDotDX.config.ignUsers[user].gld !== guild) SRDotDX.config.ignUsers[user].gld = guild;
  174. }
  175. }
  176. },
  177. userListChanged: function(cb) {
  178. var chNum = cb.length;
  179. var guild = holodeck._chat_window._rooms_by_type.guild._room.name || '*unknown*';
  180. var type, user, nign;
  181. for (var i = 0; i < chNum; ++i) {
  182. type = cb[i].addedCount;
  183. //console.log("[DotDX] UserList operation type: " + (type?"add":"remove"));
  184. if (type > 0) {
  185. if (cb[i].object[cb[i].index]) {
  186. user = cb[i].object[cb[i].index].username;
  187. nign = cb[i].object[cb[i].index]._game_character_name;
  188.  
  189. if (typeof SRDotDX.config.ignUsers[user] === 'undefined') SRDotDX.config.ignUsers[user] = {
  190. ign: nign,
  191. gld: guild
  192. };
  193. else {
  194. if (SRDotDX.config.ignUsers[user].ign !== nign) SRDotDX.config.ignUsers[user].ign = nign;
  195. if (SRDotDX.config.ignUsers[user].gld !== guild) SRDotDX.config.ignUsers[user].gld = guild;
  196. }
  197. console.log("[DotDX] UserList User LogIn: " + user + " | " + nign);
  198. }
  199. //else console.log(cb[i]);
  200. }
  201. else console.log("[DotDX] UserList User LogOff: " + cb[i].removed[0].username + " | " + cb[i].removed[0]._game_character_name);
  202. }
  203. },
  204. getGameRoomNumber: function() {
  205. if(typeof holodeck === 'object' && typeof holodeck.chatWindow === 'function')
  206. return parseInt(holodeck.chatWindow()._rooms_by_type.game._room.name.slice(-2));
  207. return 0;
  208. },
  209. getShortNum: function(num) {
  210. if (isNaN(num) || num < 0) return num;
  211. if (num >= 1000000000000) return (num / 1000000000000).toPrecision(4) + 't';
  212. if (num >= 1000000000) return (num / 1000000000).toPrecision(4) + 'b';
  213. if (num >= 1000000) return (num / 1000000).toPrecision(4) + 'm';
  214. if (num >= 1000) return (num / 1000).toPrecision(4) + 'k';
  215. return num + ''
  216. },
  217. getShortNumMil: function(num) {
  218. if (isNaN(num) || num < 0) return num;
  219. if (num >= 1000000) return (num / 1000000).toPrecision(4) + 't';
  220. if (num >= 1000) return (num / 1000).toPrecision(4) + 'b';
  221. return num.toPrecision(4) + 'm'
  222. },
  223. objToUriString: function(obj) {
  224. if (typeof obj === 'object') {
  225. var str = '';
  226. for (var i in obj) if (obj.hasOwnProperty(i)) str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]) + '&';
  227. str = str.substring(0, str.length - 1);
  228. return str
  229. }
  230. return '';
  231. },
  232. invokeGuildReload: function() {
  233. var gID = holodeck._chat_window._rooms_by_type.guild._room.guildId;
  234. holodeck._chat_window.joinRoom({type:'guild', guild_id: parseInt(gID)});
  235. setTimeout(SRDotDX.util.createGuildReload, 5000);
  236. },
  237. createGuildReload: function() {
  238. if (typeof Array.observe === 'function') {
  239. Array.unobserve(holodeck._chat_window._rooms_by_type.guild._users_list, SRDotDX.util.userListChanged);
  240. Array.observe(holodeck._chat_window._rooms_by_type.guild._users_list, SRDotDX.util.userListChanged);
  241. }
  242. SRDotDX.c('li').set({class:'action', onclick:"SRDotDX.util.invokeGuildReload()"}).text('Reload chat').attach('to',holodeck._chat_window._rooms_by_type.guild._chat_actions_options);
  243. },
  244. deRomanize: function(roman) {
  245. var lut = {I:1, V:5, X:10, L:50, C:100, D:500, M:1000};
  246. var arabic = 0, i = roman.length;
  247. while (i--) {
  248. if (lut[roman[i]] < lut[roman[i+1]]) arabic -= lut[roman[i]];
  249. else arabic += lut[roman[i]];
  250. }
  251. return arabic;
  252. },
  253. extEcho: function(msg) {
  254. var cw;
  255. if (SRDotDX.alliance.isActive) cw = document.getElementById('alliance_chat_window');
  256. else {
  257. var cn = SRDotDX.util.getChatNumber();
  258. cw = document.getElementById('chat_rooms_container').children[SRDotDX.util.getChatNumber()].getElementsByClassName('chat_message_window')[0];
  259. }
  260. var p = cw.getElementsByTagName('p');
  261. var m;
  262. if (p.length > 0 && p[p.length-1].className.indexOf('script') > -1) {
  263. m = p[p.length-1].getElementsByClassName('message')[0];
  264. m.innerHTML = m.innerHTML + '<hr>' + msg;
  265. }
  266. else {
  267. m = SRDotDX.c('div').ele();
  268. var mi = SRDotDX.c('div').attach('to',m).ele();
  269. var mi2 = SRDotDX.c('p').set({class: 'script'}).attach('to',mi).ele();
  270. SRDotDX.c('span').set({class: 'username DotDeXtension'}).html("DotDeXtension",true).attach('to',mi2);
  271. SRDotDX.c('span').set({class: 'separator'}).html(": ",true).attach('to',mi2);
  272. SRDotDX.c('span').set({class: 'message', name: 'SRDotDX_DotDeXtension'}).html('<br>'+msg,true).attach('to',mi2);
  273. SRDotDX.c('span').set({class: 'clear'}).attach('to',mi2);
  274. var div = cw.lastChild;
  275. if(div) div.appendChild(mi);
  276. else cw.appendChild(m);
  277. }
  278. setTimeout(SRDotDX.gui.scrollChat, 100);
  279. },
  280. serialize: function(obj) {
  281. var str = [];
  282. for (var p in obj) if (obj.hasOwnProperty(p)) if (obj[p] !== null)
  283. str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
  284. return str.join("&");
  285. },
  286. stringFormat: function() {
  287. var s = arguments[0];
  288. for (var i = 0; i < arguments.length - 1; i++) {
  289. var reg = new RegExp("\\{" + i + "\\}", "gm");
  290. s = s.replace(reg, arguments[i + 1]);
  291. }
  292. return s;
  293. }
  294. },
  295. config: (function() {
  296. var tmp, reqSave = false;
  297. try {tmp = JSON.parse(GM_getValue('SRDotDX', '{}'));}
  298. catch (e) {tmp = {};reqSave = true }
  299.  
  300. //Raids tab vars
  301. tmp.filterSearchStringR = typeof tmp.filterSearchStringR === 'string' ? tmp.filterSearchStringR : '';
  302. tmp.fltIncVis = typeof tmp.fltIncVis === 'boolean' ? tmp.fltIncVis : false;
  303. tmp.fltExclFull = typeof tmp.fltExclFull === 'boolean' ? tmp.fltExclFull : false;
  304. tmp.fltShowAll = typeof tmp.fltShowAll === 'boolean' ? tmp.fltShowAll : false;
  305.  
  306. //Options tab vars
  307. tmp.importFiltered = typeof tmp.importFiltered === 'boolean' ? tmp.importFiltered : true;
  308. tmp.hideRaidLinks = typeof tmp.hideRaidLinks === 'boolean' ? tmp.hideRaidLinks : false;
  309. tmp.hideBotLinks = typeof tmp.hideBotLinks === 'boolean' ? tmp.hideBotLinks : false;
  310. tmp.hideVisitedRaids = typeof tmp.hideVisitedRaids === 'boolean' ? tmp.hideVisitedRaids : false;
  311. tmp.hideVisitedRaidsInRaidList = typeof tmp.hideVisitedRaidsInRaidList === 'boolean' ? tmp.hideVisitedRaidsInRaidList : false;
  312. tmp.markMyRaidsVisted = typeof tmp.markMyRaidsVisted === 'boolean' ? tmp.markMyRaidsVisted : false;
  313. tmp.markImportedVisited = typeof tmp.markImportedVisited === 'boolean' ? tmp.markImportedVisited : false;
  314. tmp.FPXLandOwnedCount = typeof tmp.FPXLandOwnedCount === 'object' ? tmp.FPXLandOwnedCount : [0, 0, 0, 0, 0, 0, 0, 0, 0];
  315. tmp.prettyPost = typeof tmp.prettyPost === 'boolean' ? tmp.prettyPost : false;
  316. tmp.clearRMB = typeof tmp.clearRMB === 'boolean' ? tmp.clearRMB : false;
  317. tmp.showStatusOverlay = typeof tmp.showStatusOverlay === 'boolean' ? tmp.showStatusOverlay : false;
  318. tmp.confirmDeletes = typeof tmp.confirmDeletes === 'boolean' ? tmp.confirmDeletes : true;
  319. tmp.autoPostPaste = typeof tmp.autoPostPaste === 'boolean' ? tmp.autoPostPaste : false;
  320. tmp.whisperTo = typeof tmp.whisperTo === 'string' ? tmp.whisperTo : '';
  321. tmp.formatLinkOutput = typeof tmp.formatLinkOutput === 'boolean' ? tmp.formatLinkOutput : false;
  322. tmp.linkShowFs = typeof tmp.linkShowFs === 'boolean' ? tmp.linkShowFs : false;
  323. tmp.linkShowAp = typeof tmp.linkShowAp === 'boolean' ? tmp.linkShowAp : false;
  324. tmp.unvisitedRaidPruningMode = typeof tmp.unvisitedRaidPruningMode === 'number' ? tmp.unvisitedRaidPruningMode : 1;
  325. tmp.selectedRaids = typeof tmp.selectedRaids === 'string' ? tmp.selectedRaids : '';
  326. tmp.pastebinUrl = typeof tmp.pastebinUrl === 'string' ? tmp.pastebinUrl : '';
  327. tmp.bckColor = typeof tmp.bckColor === 'string' ? tmp.bckColor : 'fff';
  328. tmp.lastImported = typeof tmp.lastImported === 'number' ? tmp.lastImported : (new Date().getTime() - 1728000000);
  329. tmp.hideKongForum = typeof tmp.hideKongForum === 'boolean' ? tmp.hideKongForum : false;
  330. tmp.hideGameDetails = typeof tmp.hideGameDetails === 'boolean' ? tmp.hideGameDetails : false;
  331. tmp.hideGameTitle = typeof tmp.hideGameTitle === 'boolean' ? tmp.hideGameTitle : true;
  332. tmp.chatFilterString = typeof tmp.chatFilterString === 'string' ? tmp.chatFilterString : '';
  333. tmp.filterSearchStringC = typeof tmp.filterSearchStringC === 'string' ? tmp.filterSearchStringC : '';
  334. tmp.chatSize = typeof tmp.chatSize === 'number' ? tmp.chatSize : 300;
  335. tmp.sbEnable = typeof tmp.sbEnable === 'boolean' ? tmp.sbEnable : true;
  336. tmp.sbSlim = typeof tmp.sbSlim === 'boolean' ? tmp.sbSlim : false;
  337. tmp.sbRightSide = typeof tmp.sbRightSide === 'boolean' ? tmp.sbRightSide : false;
  338. tmp.formatLinks = typeof tmp.formatLinks === 'boolean' ? tmp.formatLinks : false;
  339. tmp.slimKongBar = typeof tmp.slimKongBar === 'boolean' ? tmp.slimKongBar : false;
  340. tmp.kongUser = typeof tmp.kongUser === 'string' ? tmp.kongUser : 'Guest';
  341. tmp.kongAuth = typeof tmp.kongAuth === 'string' ? tmp.kongAuth : '0';
  342. tmp.kongId = typeof tmp.kongId === 'string' ? tmp.kongId : '0';
  343. tmp.kongMsg = typeof tmp.kongMsg === 'boolean' ? tmp.kongMsg : false;
  344. tmp.hideGameTab = typeof tmp.hideGameTab === 'boolean' ? tmp.hideGameTab : false;
  345. tmp.hideAccTab = typeof tmp.hideAccTab === 'boolean' ? tmp.hideAccTab : false;
  346. tmp.dotdxTabName = typeof tmp.dotdxTabName === 'string' ? tmp.dotdxTabName : 'Raids';
  347. tmp.themeNum = typeof tmp.themeNum === 'number' ? tmp.themeNum : 1;
  348. tmp.fontNum = typeof tmp.fontNum === 'number' ? tmp.fontNum : 0;
  349. tmp.ignMode = typeof tmp.ignMode === 'number' ? tmp.ignMode : 1;
  350. tmp.hideScrollBar = typeof tmp.hideScrollBar === 'boolean' ? tmp.hideScrollBar : false;
  351. tmp.allianceChat = typeof tmp.allianceChat === 'boolean' ? tmp.allianceChat : false;
  352. tmp.allianceServer = typeof tmp.allianceServer === 'string' ? tmp.allianceServer : '';
  353. tmp.allianceName = typeof tmp.allianceName === 'string' ? tmp.allianceName : 'Alliance';
  354. tmp.hideWChat = typeof tmp.hideWChat === 'boolean' ? tmp.hideWChat : false;
  355. tmp.leftWChat = typeof tmp.leftWChat === 'boolean' ? tmp.leftWChat : false;
  356. tmp.removeWChat = typeof tmp.removeWChat === 'boolean' ? tmp.removeWChat : false;
  357. tmp.filterChatLinks = typeof tmp.filterChatLinks === 'boolean' ? tmp.filterChatLinks : true;
  358. tmp.filterRaidList = typeof tmp.filterRaidList === 'boolean' ? tmp.filterRaidList : false;
  359. tmp.newRaidsAtTopOfList = typeof tmp.newRaidsAtTopOfList === 'boolean' ? tmp.newRaidsAtTopOfList : false;
  360. tmp.serverMode = typeof tmp.serverMode === 'number' ? tmp.serverMode : 1;
  361. tmp.sbConfig = typeof tmp.sbConfig === 'object' ? tmp.sbConfig : [
  362. {"type": "label", "name": "Camps"},
  363. {"type": "btn", "name": "GoC", "cmd": "/camp goc"},
  364. {"type": "btn", "name": "MaM", "cmd": "/camp mam"},
  365. {"type": "btn", "name": "FW", "cmd": "/camp fw"},
  366. {"type": "label", "name": "Tiers"},
  367. {"type": "btn", "name": "Bella", "cmd": "/raid bella"},
  368. {"type": "btn", "name": "Xerk", "cmd": "/raid xerkara"},
  369. {"type": "btn", "name": "Tisi", "cmd": "/raid tisi"},
  370. {"type": "label", "name": "Join"},
  371. {"type": "btn", "name": "Farms", "cmd": "SRDotDX.gui.quickImportAndJoin(\'farm:nnm\',false)"},
  372. {"type": "label", "name": "Utils"},
  373. {"type": "btn", "color": "g", "name": "(Re)Load", "sname": "Reld", "cmd": "SRDotDX.reload()"},
  374. {"type": "btn", "color": "r", "name": "Unload", "sname": "Kill", "cmd": "/kill"},
  375. {"type": "btn", "name": "Room 1", "sname": "CR1", "cmd": "SRDotDX.gui.gotoRoom(1)"},
  376. {"type": "btn", "name": "Room 2", "sname": "CR2", "cmd": "SRDotDX.gui.gotoRoom(2)"},
  377. {"type": "btn", "name": "Room 8", "sname": "CR8", "cmd": "SRDotDX.gui.gotoRoom(8)"},
  378. {"type": "label", "name": "Sheets", "sname": "Help"},
  379. {"type": "btn", "name": "Magic", "sname": "Mag", "cmd": "https://docs.google.com/spreadsheets/d/1O0eVSnzlACP9XJDq0VN4kN51ESUusec3-gD4dKPHRNU"},
  380. {"type": "btn", "name": "Mount", "sname": "Mnt", "cmd": "https://docs.google.com/spreadsheet/ccc?key=0AiSpM5yAo8atdER2NEhHY3VjckRhdWctWV8yampQZUE"},
  381. {"type": "btn", "name": "Gear", "cmd": "https://docs.google.com/spreadsheet/lv?key=0AvP2qXrWcHBxdHpXZkUzTHNGNkVWbjE5c2VEZUNNMUE"},
  382. {"type": "label", "name": "Raids"},
  383. {"type": "jtxt"},
  384. {"type": "btn", "color": "g", "name": "Join", "cmd": "SRDotDX.gui.joinSelectedRaids(true)"},
  385. {"type": "btn", "color": "b", "name": "Import", "sname": "Imp", "cmd": "SRDotDX.gui.importFromServer()"},
  386. {"type": "btn", "color": "y", "name": "RaidBot", "sname": "Bot", "cmd": "SRDotDX.gui.switchBot()"} ];
  387.  
  388. if (typeof tmp.mutedUsers !== 'object') tmp.mutedUsers = {};
  389. if (typeof tmp.ignUsers !== 'object') tmp.ignUsers = {};
  390. else {
  391. var uk = Object.keys(tmp.ignUsers);
  392. if (uk.length > 0 && typeof tmp.ignUsers[uk[0]].ign !== 'string')
  393. for (var k in uk) { if(tmp.ignUsers.hasOwnProperty(uk[k])) tmp.ignUsers[uk[k]] = { ign: tmp.ignUsers[uk[k]], gld: '*unknown*' }; }
  394. }
  395. if (typeof tmp.friendUsers !== 'object') tmp.friendUsers = {};
  396. if (typeof tmp.raidList !== 'object') tmp.raidList = {};
  397. if (typeof tmp.filters !== 'object') tmp.filters = [{},{}];
  398. if (typeof tmp.lastFilter !== 'object') tmp.lastFilter = typeof tmp.lastFilter === 'string' ? [tmp.lastFilter, tmp.lastFilter] : ["",""];
  399. if (tmp.filters.length !== 2) tmp.filters = [tmp.filters, tmp.filters];
  400. if (tmp.lastImported > (new Date().getTime())) tmp.lastImported = (new Date().getTime() - 1728000000);
  401. if (reqSave) GM_setValue('SRDotDX', JSON.stringify(tmp));
  402.  
  403. // Delete expired raids
  404. for (var id in tmp.raidList) {
  405. if(tmp.raidList.hasOwnProperty(id)) {
  406. if (typeof tmp.raidList[id].magic === "undefined") tmp.raidList[id].magic = [0, 0, 0, 0, 0, 0];
  407. if (typeof tmp.raidList[id].hp === "undefined") tmp.raidList[id].hp = 1.0;
  408. if (typeof tmp.raidList[id].sid === "undefined") tmp.raidList[id].sid = 1;
  409. if (typeof tmp.raidList[id].cs === "undefined") tmp.raidList[id].cs = 0;
  410. if (typeof tmp.raidList[id].fs === "undefined") tmp.raidList[id].fs = 1;
  411. if (typeof tmp.raidList[id].ni === "undefined") tmp.raidList[id].ni = false;
  412. }
  413. }
  414.  
  415. tmp.addRaid = function (hash, id, boss, diff, sid, visited, user, ts, room, magic, hp, cs, fs) {
  416. if ((/ /).test(user)) {
  417. var reg = new RegExp('[0-9]+|[0-9a-zA-Z_]+', 'g');
  418. room = reg.exec(user);
  419. user = reg.exec(user);
  420. }
  421. if (typeof SRDotDX.config.raidList[id] !== 'object') {
  422. var tStamp = typeof ts === 'undefined' || ts === null ? parseInt(new Date().getTime() / 1000) : parseInt(ts);
  423. SRDotDX.config.raidList[id] = {
  424. hash: hash, id: id, boss: boss, diff: diff, sid: sid, visited: visited, user: user, timeStamp: tStamp,
  425. expTime: (typeof SRDotDX.raids[boss] === 'object' ? SRDotDX.raids[boss].duration : 24) * 3600 + tStamp,
  426. room: room === undefined || room === null ? SRDotDX.util.getGameRoomNumber() : parseInt(room),
  427. magic: magic === undefined || magic === null ? [0,0,0,0,0,0] : magic,
  428. hp: hp === undefined || hp === null ? 1.0 : parseFloat(hp),
  429. cs: cs === undefined || cs === null ? 0 : parseInt(cs),
  430. fs: fs === undefined || fs === null ? (typeof SRDotDX.raids[boss] === 'object' ? SRDotDX.raids[boss].size : 1) : parseInt(fs),
  431. ni: magic === undefined
  432. };
  433. SRDotDX.gui.addRaid(id);
  434. }
  435. return SRDotDX.config.raidList[id]
  436. };
  437. tmp.save = function (b) {
  438. b = typeof b == 'undefined' ? true : b;
  439. GM_setValue('SRDotDX', JSON.stringify(SRDotDX.config));
  440. if(b) setTimeout(SRDotDX.config.save, 60000, true);
  441. else console.log('[DotDX] Manual config save invoked');
  442. };
  443. tmp.extSave = function(){SRDotDX.gframe('dotdx.save#'+JSON.stringify({'removeWChat':SRDotDX.config.removeWChat,'leftWChat':SRDotDX.config.leftWChat,'hideWChat':SRDotDX.config.hideWChat}));};
  444. return tmp;
  445. })(),
  446. alliance: {
  447. chat: null,
  448. chatcnt: 0,
  449. isActive: false,
  450. uservars : {
  451. usr: '*unknown*',
  452. ign: '*unknown*',
  453. gld: '*unknown*'
  454. },
  455. watchDog: null,
  456. getGuildTag: function(guild) {
  457. var roman = /^(.+\s)([IXV]+)$/.exec(guild);
  458. if (roman) guild = roman[1] + SRDotDX.util.deRomanize(roman[2]);
  459. var reg = /([A-Z]+|\w)\w*/g;
  460. var tag = '', part;
  461. while (part = reg.exec(guild)) tag += part[1];
  462. return tag
  463. },
  464. processMessage: function(user, inGameName, cls, time, message, pfx) {
  465. //console.log("[DotDX] aChat: " + time +"|"+user+"|"+inGameName+"|"+message);
  466. var usrCls = ["chat_message_window_username"];
  467. var curTs = new Date().getTime().toString();
  468. var isSelf = user === SRDotDX.config.kongUser;
  469. var usr = user;
  470. if ((this.chatcnt++) % 2) cls.push('even');
  471. if (pfx === 'u ') pfx = '';
  472. var ts = '', ign = '';
  473. var pClass = cls.join(' ');
  474. if (pClass.indexOf('emote') < 0 && pClass.indexOf('script') < 0) {
  475. var raid = SRDotDX.getRaidLink(message, user, true);
  476. if (raid) {
  477. cls.push('DotDX_raid');
  478. cls.push('DotDX_sid_' + raid.sid);
  479. cls.push('DotDX_diff_' + raid.diff);
  480. cls.push('DotDX_raidId_' + raid.id);
  481. if (raid.visited) cls.push('DotDX_visitedRaid');
  482. cls.push('DotDX_fltChat_' + raid.boss + '_' + (raid.diff - 1));
  483. message = raid.ptext + '<a href="' + raid.url + '" class="chatRaidLink ' + raid.id + '|' + raid.hash + '|' + raid.boss + '|' + raid.diff + '|' + raid.sid +
  484. '" 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;
  485. SRDotDX.gui.toggleRaid('visited', raid.id, raid.visited);
  486. SRDotDX.gui.joining ? SRDotDX.gui.pushRaidToJoinQueue(raid.id) : SRDotDX.gui.selectRaidsToJoin('chat');
  487. }
  488. else {
  489. var reg = /(^|.+?)(\s|\,|$|^)(https?:\/\/[^\,\s]+|$)/g;
  490. var part, msg = '';
  491. while (part = reg.exec(message)) {
  492. msg += part[1] + part[2];
  493. if (part[3].length > 0) {
  494. if (part[3].indexOf('http') === 0) msg += '<a href="' + part[3] + '" target="_blank" class="chat_link">' + part[3] + '</a>';
  495. else msg += part[3];
  496. }
  497. }
  498. message = msg;
  499. }
  500.  
  501. if (SRDotDX.config.mutedUsers[usr]) cls.push('DotDX_hidden');
  502. isSelf && usrCls.push('is_self');
  503.  
  504. if (inGameName !== '*unknown*') if (SRDotDX.config.ignUsers[usr] && SRDotDX.config.ignUsers[usr].ign !== inGameName) SRDotDX.config.ignUsers[usr].ign = inGameName;
  505.  
  506. if (SRDotDX.config.ignUsers[usr] && SRDotDX.config.ignUsers[usr].ign !== '*unknown*') {
  507. switch (SRDotDX.config.ignMode) {
  508. case 2: ign = ' (' + SRDotDX.config.ignUsers[usr].ign + ')'; break;
  509. case 1: usr = SRDotDX.config.ignUsers[usr].ign; usrCls.push('ign'); break;
  510. }
  511. }
  512. ts = '(' + time.slice(0, 5) + ')&ensp;';
  513. }
  514. else if (pClass.indexOf('emote') > -1 && user !== '*unknown*') message = user + ' ' + message;
  515.  
  516. return '<p class="'+cls.join(' ')+'">' +
  517. '<span id="dotdm_'+curTs+'" class="slider" style="max-width:0" onmouseleave="this.style.maxWidth=\'0\'"></span>' +
  518. '<span class="timestamp">'+ts+'</span>' +
  519. '<span class="username '+usrCls.join(' ')+' dotdm_'+curTs+'" username="'+user+'" dotdxname="'+user+'" oncontextmenu="return false;">'+pfx+usr+'</span>' +
  520. '<span class="ign ingamename">'+ign+'</span>' +
  521. '<span class="separator">: </span>' +
  522. '<span name="SRDotDX_'+usr+'" class="message">'+message.trim()+'</span>' +
  523. '<span class="clear"></span></p>';
  524. },
  525. reloadChat: function() {
  526. if (SRDotDX.alliance.chat) {
  527. SRDotDX.alliance.chatcnt = 0;
  528. SRDotDX.alliance.chat.disconnect();
  529. //document.getElementById('alliance_chat_window').innerHTML = '';
  530. SRDotDX.alliance.chat.socket.reconnect();
  531. }
  532. },
  533. destroyChat: function() {
  534. if (SRDotDX.alliance.chat) try {SRDotDX.alliance.chat.socket.disconnect()} catch(e){console.log(e); SRDotDX.alliance.chat = null};
  535.  
  536. if (SRDotDX.alliance.isActive) document.getElementById('guild_room_tab').children[0].dispatchEvent(new MouseEvent('click', { button: 1, cancelable: true}));
  537.  
  538. SRDotDX.alliance.isActive = false;
  539. SRDotDX.alliance.chatcnt = 0;
  540. document.getElementsByClassName('room_name_container')[0].className = 'room_name_container h6_alt mbs';
  541.  
  542. var node = document.getElementById('alliance_tab');
  543. if (node) node.parentNode.removeChild(node);
  544. node = document.getElementById('alliance_room');
  545. if (node) node.parentNode.removeChild(node);
  546. node = document.getElementById('alliance_number');
  547. if (node) node.parentNode.removeChild(node);
  548.  
  549. SRDotDX.c('#chat_room_tabs').off('mouseup', SRDotDX.alliance.kongTabsEvent);
  550.  
  551. SRDotDX.config.allianceChat = false;
  552. SRDotDX.c('#options_enableAllianceChat').ele().checked = false;
  553. },
  554. createChat: function() {
  555.  
  556. SRDotDX.alliance.uservars.usr = SRDotDX.config.kongUser || '*unknown*';
  557. SRDotDX.alliance.uservars.ign = SRDotDX.config.ignUsers[SRDotDX.alliance.uservars.usr].ign || '*unknown*';
  558. SRDotDX.alliance.uservars.gld = SRDotDX.config.ignUsers[SRDotDX.alliance.uservars.usr].gld || '*unknown*';
  559.  
  560. if (SRDotDX.alliance.chat) {
  561. SRDotDX.alliance.chat = io.connect(SRDotDX.config.allianceServer);
  562. SRDotDX.alliance.chat.watchDog = setTimeout(SRDotDX.alliance.destroyChat, 10000);
  563. SRDotDX.alliance.chat.socket.reconnect();
  564. }
  565. else {
  566. SRDotDX.alliance.chat = io.connect(SRDotDX.config.allianceServer);
  567. SRDotDX.alliance.chat.watchDog = setTimeout(SRDotDX.alliance.destroyChat, 10000);
  568. SRDotDX.alliance.chat.on('conn', function (data) {
  569. console.log(data);
  570. var user = SRDotDX.alliance.uservars;
  571. clearTimeout(SRDotDX.alliance.chat.watchDog);
  572. SRDotDX.alliance.chat.emit('join', {data: user.usr, ign: user.ign, guild: user.gld});
  573. });
  574. SRDotDX.alliance.chat.on('raids', function (data) {
  575. //console.log(data);
  576. var r = JSON.parse(data['data']), raid, cnt = 0;
  577. var swt = !SRDotDX.config.importFiltered, filter = SRDotDX.c('#DotDX_filters').ele().innerHTML;
  578. for (var i in r) if (r.hasOwnProperty(i)) {
  579. raid = r[i]; //console.log("[DotDX] blinkRC processing: " + raid.join('|'));
  580. if (!SRDotDX.config.raidList[i] && (swt || filter.indexOf('fltList_' + raid[0] + '_' + (parseInt(raid[1]) - 1)) < 0)) {
  581. SRDotDX.config.addRaid(raid[3], parseInt(raid[2]), raid[0], parseInt(raid[1]), parseInt(raid[4]), false, 'Alliance', null, '41');
  582. cnt++;
  583. }
  584. }
  585. var text = SRDotDX.alliance.processMessage('*unknown*', '*unknown*', ['emote'], '', 'Loaded ' + cnt + ' alliance raids into local database.', '');
  586. SRDotDX.c('div').html(text, true).attach('to', 'alliance_chat_window');
  587. SRDotDX.gui.selectRaidsToJoin('alliance raids');
  588. });
  589. SRDotDX.alliance.chat.on('dead', function (data) {
  590. console.log("[DotDX] Dead alliance raid: " + data['raid']);
  591. SRDotDX.gui.deleteRaidFromDB(data['raid']);
  592. SRDotDX.gui.selectRaidsToJoin('alliance prune');
  593. //console.log(data);
  594. });
  595. SRDotDX.alliance.chat.on('join', function (data) {
  596. //console.log(data);
  597. if (data.here) {
  598. var userName = data.name || null;
  599. var inGameName = data.ign && data.ign !== '*unknown*' ? data.ign : null;
  600. var guild = data.guild && data.guild !== '*unknown*' ? data.guild : null;
  601. if (userName) {
  602. if (SRDotDX.config.ignUsers[userName] !== 'object') SRDotDX.config.ignUsers[userName] = {
  603. ign: (inGameName || '*unknown*'),
  604. gld: (guild || '*unknown*')
  605. };
  606. else {
  607. if (inGameName && SRDotDX.config.ignUsers[userName].ign === '*unknown*') SRDotDX.config.ignUsers[userName].ign = inGameName;
  608. if (guild && SRDotDX.config.ignUsers[userName].gld === '*unknown*') SRDotDX.config.ignUsers[userName].gld = guild;
  609. }
  610. }
  611. }
  612.  
  613. var userList = null;
  614. try {
  615. userList = JSON.parse(data.names);
  616. } catch (e) {
  617. console.log(e);
  618. return;
  619. }
  620.  
  621. var prevItem = '', content = '', userData, cnt = 0;
  622. for (var usr in userList) {
  623. if (userList.hasOwnProperty(usr)) {
  624. if (userList[usr] === prevItem) continue;
  625. prevItem = userList[usr];
  626. cnt++;
  627. userData = SRDotDX.config.ignUsers[userList[usr]] || null;
  628. if (userData)
  629. content += '<div><span>' + ( userData.gld === '*unknown*' ? '???' : SRDotDX.alliance.getGuildTag(userData.gld) ) + '</span><span>' + userList[usr] + '</span><span>' +
  630. ( userData.ign === '*unknown*' ? '' : '(' + userData.ign + ')' ) + '</span></div>';
  631. else
  632. content += '<div><span>???</span><span>' + userList[usr] + '</span><span></span></div>';
  633. }
  634. }
  635. SRDotDX.c('#alliance_number').html(cnt, true);
  636. SRDotDX.c('#alliance_users').html(content, true);
  637. });
  638. SRDotDX.alliance.chat.on('chat', function (data) {
  639. var msgPatt = /^.+<abbr.+'K:(.+?) D:(.+?) \((.+?)\).+?<font.+?>(.+\n?.*)<\/font>.*$/;
  640. var wToPatt = /^.+\n?.+?Sent to <y>(.+?)<\/y>.+>(.+\n?.*)<.+$/;
  641. var wFromPatt = /^.+>(.+?)<\/a>.+PM'd.+>(.+\n?.*)<.+$/;
  642. var userUnavail = /^.*<glowy>(.+)<\/glowy> not online.+$/;
  643. var match, text;
  644. if ((match = msgPatt.exec(data['data'])) !== null) {
  645. //console.log(data['data']);
  646. if (typeof SRDotDX.config.ignUsers[match[1]] !== "object") SRDotDX.config.ignUsers[match[1]] = { ign: match[2], gld: match[3] };
  647. else if (match[3] !== '*unknown*' && SRDotDX.config.ignUsers[match[1]].gld !== match[3]) SRDotDX.config.ignUsers[match[1]].gld = match[3];
  648. text = SRDotDX.alliance.processMessage(match[1], match[2], [], data['time'][0], match[4], SRDotDX.alliance.getGuildTag(match[3]) + ' ');
  649. }
  650. else if ((match = wToPatt.exec(data['data'])) !== null) {
  651. //console.log(data['data']);
  652. text = SRDotDX.alliance.processMessage(match[1], '*unknown*', ['whisper'], data['time'][0], match[2], 'To ');
  653. }
  654. else if ((match = wFromPatt.exec(data['data'])) !== null) {
  655. //console.log(data['data']);
  656. text = SRDotDX.alliance.processMessage(match[1], '*unknown*', ['whisper'], data['time'][0], match[2], 'From ');
  657. }
  658. else if ((match = userUnavail.exec(data['data'])) !== null)
  659. text = SRDotDX.alliance.processMessage(match[1], '*unknown*', ['whisper', 'emote'], '', 'is offline', '');
  660. else {
  661. text = SRDotDX.alliance.processMessage('*unknown*', '*unknown*', ['emote'], '', data['data'], '');
  662. console.log(data);
  663. }
  664. SRDotDX.c('div').html(text, true).attach('to', 'alliance_chat_window');
  665. //SRDotDX.c('#alliance_chat_window').html(text,false);
  666. if (SRDotDX.alliance.isActive) {
  667. if (text.indexOf('<img src')> -1) setTimeout(SRDotDX.gui.scrollChat, 500);
  668. setTimeout(SRDotDX.gui.scrollChat, 10);
  669. }
  670. else if (document.getElementById('alliance_tab').className.indexOf('unread') < 0) document.getElementById('alliance_tab').className += 'unread';
  671. });
  672. }
  673. },
  674. sendMessage: function(msg) {
  675. //console.log("[DotDX] Sending message: " + msg);
  676. var pic = document.getElementById('welcome_box_small_user_avatar').getAttribute('src') || '#';
  677. var user = SRDotDX.alliance.uservars;
  678. var gTag = SRDotDX.alliance.getGuildTag(user.gld);
  679. SRDotDX.alliance.chat.emit('chat', {
  680. data: "<img class='img' src='" + pic + "' /><z>(<y><abbr title='K:" + user.usr +
  681. " D:" + user.ign + " (" + user.gld + ")'>" + (gTag === 'u' ? '' : (gTag+': ') ) + (user.ign || user.usr) + "</abbr></y>): </z> " +
  682. '<font style="font-size: 12px; color: #ddd">' + msg.replace(/(\n|\r)/g,'') + ' </font>'});
  683. },
  684. processImage: function(imgLink) {
  685. if (/^https?:\/\/.+?\.(png|gif|jpe?g)$/.test(imgLink)) SRDotDX.alliance.sendMessage('<br><img src="'+imgLink+'"/>');
  686. else SRDotDX.util.extEcho('Provided image link is not valid -> ' + imgLink);
  687. },
  688. allianceTabEvent: function(e) {
  689. if (e.which === 1) {
  690. e.stopPropagation(); e.preventDefault();
  691. // hide other chats
  692. var children = document.getElementById('chat_room_tabs').children, i, cl;
  693. for (i = 0, cl = children.length; i < cl; ++i) children[i].className = 'chat_room_tab';
  694. children = document.getElementsByClassName('chat_room_template');
  695. for (i = 0, cl = children.length; i < cl; ++i) children[i].style.display = "none";
  696. children = document.getElementById('chat_actions_container').children;
  697. for (i = 0, cl = children.length; i < cl; ++i) children[i].style.display = "none";
  698. holodeck._chat_window._active_room = null
  699. // make alliance active
  700. document.getElementsByClassName('room_name_container')[0].className += ' alliance';
  701. document.getElementById('alliance_tab').className = 'active';
  702. document.getElementById('alliance_room').className = 'active';
  703. document.getElementsByClassName('room_name_container')[0].children[0].innerHTML = SRDotDX.config.allianceName;
  704. SRDotDX.alliance.isActive = true;
  705.  
  706. // scroll to the bottom
  707. setTimeout(SRDotDX.gui.scrollChat, 10);
  708. }
  709. return false;
  710. },
  711. kongTabsEvent: function(e) {
  712. if (e.which === 1) {
  713. SRDotDX.alliance.isActive = false;
  714. document.getElementsByClassName('room_name_container')[0].className = 'room_name_container h6_alt mbs';
  715. if (document.getElementById('alliance_tab').className.indexOf('unread') < 0)
  716. document.getElementById('alliance_tab').className = '';
  717. else
  718. document.getElementById('alliance_tab').className = 'unread';
  719. document.getElementById('alliance_room').removeAttribute('class');
  720. }
  721. },
  722. createRoom: function() {
  723. if (document.getElementById('chat_room_tabs') !== null) {
  724. SRDotDX.c('div').set({id: 'alliance_tab', class: ''}).html('<a href="#">Alliance</a>', true).on('click', SRDotDX.alliance.allianceTabEvent).attach('after','chat_room_tabs');
  725. 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');
  726. SRDotDX.c('span').set({id: 'alliance_number'}).attach('before', document.getElementsByClassName('room_name_container')[0].children[1]);
  727. SRDotDX.c('#chat_room_tabs').on('mouseup', SRDotDX.alliance.kongTabsEvent);
  728. SRDotDX.c('#alliance_users').on('click', function(e){
  729. e.stopPropagation(); e.preventDefault();
  730. var usr = e.target.tagName === 'DIV' ? e.target.children[1].innerHTML : e.target.parentNode.children[1].innerHTML;
  731. var txt = document.getElementById('alliance_input');
  732. txt.value = '/w ' + usr + ' ';
  733. txt.focus();
  734. });
  735. SRDotDX.c('#alliance_input').on('keypress',function(e){
  736. if (e.keyCode === 13) {
  737. e.stopPropagation(); e.preventDefault();
  738. if (e.shiftKey) e.target.value += "<br>\n";
  739. else {
  740. if (e.target.value !== "") {
  741. if (e.target.value.charAt(0) === '/' && !(e.target.value.charAt(1) === 'w' && e.target.value.charAt(2) === ' ')) {
  742. console.log("[DotDX] Chat command: " + e.target.value);
  743. var link, i;
  744. if (e.target.value.indexOf('/img ') === 0) {
  745. link = e.target.value.split(' ')[1];
  746. if (link.indexOf('prntscr.com/') > 0) SRDotDX.request.image(false, link);
  747. else if (i = /^.*gyazo.com\/([a-z0-9]{32}).*$/.exec(link)) SRDotDX.alliance.processImage('https://i.gyazo.com/' + i[1] + '.png');
  748. else SRDotDX.alliance.processImage(link);
  749. }
  750.  
  751. else if (e.target.value.indexOf('/vid ') === 0) {
  752. link = e.target.value.split(' ')[1];
  753. var hash = /(^.+youtube.+|^watch.+|^v=|^)([A-Za-z0-9\-]{11})$/.exec(link);
  754. if (hash) {
  755. var data = '<embed wmode="opaque" src="http://www.youtube.com/v/'+hash[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>';
  756. SRDotDX.alliance.sendMessage(data);
  757. }
  758. else SRDotDX.util.extEcho('Provided video hash/link is not valid or not supported -> ' + link);
  759. }
  760.  
  761. else holodeck.processChatCommand(e.target.value);
  762. }
  763. else SRDotDX.alliance.sendMessage(e.target.value);
  764. e.target.value = "";
  765. }
  766. }
  767. return false;
  768. }
  769. });
  770. SRDotDX.c('#chat_room_tabs').on('mouseup', SRDotDX.alliance.kongTabsEvent);
  771. SRDotDX.alliance.createChat();
  772. }
  773. }
  774. },
  775. linksHistory: [],
  776. request: {
  777. importLock: false,
  778. joinAfterImport: false,
  779. fromChat: false,
  780. quickBtnLock: true,
  781. filterSearchStringT: "",
  782. raids: function (isinit, hours) {
  783. if (!SRDotDX.gui.joining) {
  784. var secs = 15 - parseInt((new Date().getTime() - SRDotDX.config.lastImported) / 1000);
  785. if (secs > 0) {
  786. SRDotDX.util.extEcho("You can import again in " + secs + " seconds.");
  787. return
  788. }
  789. console.log("[DotDX] Importing raids from raids server ...");
  790. if (!isinit) this.initialize("Requesting raids");
  791. else SRDotDX.request.tries++;
  792. var h = hours ? ('&h=' + hours) : '';
  793. SRDotDX.request.req({ eventName: "dotd.getraids", url: "http://mutik.erley.org/download.php?u=" + SRDotDX.config.kongUser + h, method: "GET", headers: {"Content-Type": "application/JSON"}, timeout: 30000 });
  794. }
  795. },
  796. poster: function (isInit) {
  797. var txt = document.getElementById('DotDX_checkRaidPoster').value, id;
  798. if (txt.length < 1) return;
  799. if (isNaN(txt)) {
  800. var r = SRDotDX.util.getRaidFromUrl(txt);
  801. if (r === null) return;
  802. id = r.id;
  803. }
  804. else id = parseInt(txt);
  805. console.log("[DotDX] Requesting raid poster info from server...");
  806. if (!isInit) this.initialize("Requesting raid poster data");
  807. else SRDotDX.request.tries++;
  808. SRDotDX.request.req({ eventName: "dotd.getposter", url: "http://mutik.erley.org/getposter.php?i=" + id, method: "GET", headers: {"Content-Type": "application/JSON"}, timeout: 30000 });
  809. },
  810. version: function(isInit) {
  811. console.log("[DotDX] Requesting available script version from greasyfork...");
  812. if(!isInit) this.initialize("Requesting script version");
  813. else SRDotDX.request.tries++;
  814. SRDotDX.request.req({ eventName: "dotd.getversion", url: "https://greasyfork.org/en/scripts/406-mutik-s-dotd-script", method: "GET", timeout: 30000 });
  815. },
  816. image: function(isInit, url) {
  817. console.log("[DotDX] Request image from external service...");
  818. if(!isInit) this.initialize("Requesting image");
  819. else SRDotDX.request.tries++;
  820. SRDotDX.request.req({ eventName: "dotd.getimage", url: url, method: "GET", timeout: 30000 });
  821. },
  822. initialize: function (str) {
  823. SRDotDX.gui.doStatusOutput(str + "...", 3000, true);
  824. SRDotDX.request.tries = 0;
  825. SRDotDX.request.seconds = 0;
  826. SRDotDX.request.complete = false;
  827. SRDotDX.request.timer = setTimeout(SRDotDX.request.tick, 1000, str);
  828. },
  829. tick: function (str) {
  830. if (!SRDotDX.request.complete) {
  831. if (SRDotDX.request.seconds > 25) {
  832. SRDotDX.gui.doStatusOutput("Request failed.", 3000, true);
  833. return;
  834. }
  835. SRDotDX.request.seconds++;
  836. SRDotDX.gui.doStatusOutput(str + " (" + SRDotDX.request.seconds + ")...", 1500, true);
  837. SRDotDX.request.timer = setTimeout(SRDotDX.request.tick, 1000, str);
  838. }
  839. },
  840. complete: false,
  841. seconds: 0,
  842. timer: 0,
  843. tries: 0,
  844. req: function (param) {
  845. var a = document.createEvent("MessageEvent");
  846. if (a.initMessageEvent) a.initMessageEvent("dotd.req", false, false, JSON.stringify(param), document.location.protocol + "//" + document.location.hostname, 0, window, null);
  847. else a = new MessageEvent("dotd.req", {"origin": document.location.protocol + "//" + document.location.hostname, "lastEventId": 0, "source": window, "data": JSON.stringify(param)});
  848. document.dispatchEvent(a);
  849. },
  850. init: function () {
  851. document.addEventListener("dotd.joinraid", SRDotDX.request.joinRaidResponse, false);
  852. document.addEventListener("dotd.getraids", SRDotDX.request.addRaids, false);
  853. document.addEventListener("dotd.getposter", SRDotDX.request.getPoster, false);
  854. document.addEventListener("dotd.getversion", SRDotDX.request.getVersion, false);
  855. document.addEventListener("dotd.getimage", SRDotDX.request.getImage, false);
  856. delete this.init;
  857. },
  858. joinRaid: function (r) {
  859. if (typeof r == 'object') {
  860. if (!SRDotDX.gui.joining) SRDotDX.request.initialize("Joining " + (!SRDotDX.raids[r.boss] ? r.boss.capitalize().replace(/_/g, ' ') : SRDotDX.raids[r.boss].shortname));
  861. var joinData = 'kongregate_username=' + SRDotDX.config.kongUser + '&kongregate_user_id=' + SRDotDX.config.kongId + '&kongregate_game_auth_token=' + SRDotDX.config.kongAuth;
  862. 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 });
  863. }
  864. },
  865. getImage: function (e) {
  866. var r, data = JSON.parse(e.data);
  867. if (data.status !== 200) {
  868. SRDotDX.request.complete = true;
  869. SRDotDX.gui.doStatusOutput("Raids server busy. Please try again in a moment.");
  870. console.log('[DotDX] Raids request failed (url: ' + data.url + ')');
  871. console.log(JSON.stringify(data));
  872. return;
  873. }
  874. SRDotDX.request.complete = true;
  875.  
  876. var reg = /^.+<meta content="(.+)" property="og:image"\/>.+$/m;
  877. var reg2 = /^.+<meta property="og:image" content="(.+?)"\/>.+$/m;
  878. var link = reg.exec(data.responseText) || reg2.exec(data.responseText);
  879. if (link) SRDotDX.alliance.processImage(link[1]);
  880. else {
  881. SRDotDX.util.extEcho('Provided LightShot link is not valid');
  882. console.log('[DotDX] xAjax resp: '+ data.responseText);
  883. }
  884. },
  885. getPoster: function (e) {
  886. var r, data = JSON.parse(e.data);
  887. if (data.status != 200) {
  888. if (SRDotDX.request.tries >= 3) {
  889. SRDotDX.request.complete = true;
  890. SRDotDX.gui.doStatusOutput("Raids server busy. Please try again in a moment.");
  891. console.log('[DotDX] Raids request failed (url: ' + data.url + ')');
  892. console.log(JSON.stringify(data));
  893. } else {
  894. console.log("[DotDX] Raids server unresponsive (status " + data.status + "). Trying again, " + SRDotDX.request.tries + " tries.");
  895. }
  896. return;
  897. }
  898. SRDotDX.request.complete = true;
  899. try {
  900. r = JSON.parse(data.responseText)
  901. }
  902. catch (ex) {
  903. console.log("[DotDX] Checking raid poster request error");
  904. console.log('[DotDX] responseText: ' + data.responseText);
  905. return;
  906. }
  907. document.getElementById('DotDX_whoPosted_Raid').innerHTML = r.r;
  908. document.getElementById('DotDX_whoPosted_Time').innerHTML = new Date(r.t * 1000).toLocaleString();
  909. document.getElementById('DotDX_whoPosted_Poster').innerHTML = r.p;
  910. },
  911. getVersion: function(e) {
  912. var r, data = JSON.parse(e.data);
  913. SRDotDX.request.complete = true;
  914. var remoteVersion = "Unknown";
  915. if (data.status !== 200) {
  916. SRDotDX.gui.doStatusOutput("Greasyfork unresponsive.");
  917. console.log('[DotDX] Version request failed (url: ' + data.url + ')');
  918. console.log(JSON.stringify(data));
  919. }
  920. else remoteVersion = /<dd.+version.+>([\d\.]+)<.+dd>/.exec(data.responseText)[1];
  921. var d = '<span class="emph bold">' + SRDotDX.version.minor + '</span><br>';
  922. d += '<span class="bold">Installed version</span>: <span class="emph">' + SRDotDX.version.major + '</span><br>';
  923. d += '<span class="bold">Available version</span>: <span class="emph">' + remoteVersion + '</span><br>';
  924. if(SRDotDX.version.major === remoteVersion) d += 'Your script version is up to date.';
  925. 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.';
  926. SRDotDX.util.extEcho(d);
  927. },
  928. addRaids: function(e) {
  929. var r, data = JSON.parse(e.data);
  930. if (data.status != 200) {
  931. if (SRDotDX.request.tries >= 3) {
  932. SRDotDX.request.complete = true;
  933. SRDotDX.gui.doStatusOutput("Raids server busy. Please try again in a moment.");
  934. console.log('[DotDX] Raids request failed (url: ' + data.url + ')');
  935. console.log(JSON.stringify(data));
  936. } else {
  937. console.log("[DotDX] Raids server unresponsive (status " + data.status + "). Trying again, " + SRDotDX.request.tries + " tries.");
  938. }
  939. return;
  940. }
  941. SRDotDX.request.complete = true;
  942. try {
  943. r = JSON.parse(data.responseText)
  944. }
  945. catch (ex) {
  946. console.log("[DotDX] Raids importing error or no raids imported");
  947. console.log('[DotDX] responseText: ' + data.responseText);
  948. return;
  949. }
  950. SRDotDX.gui.doStatusOutput("Importing " + r.raids.length + " raids...");
  951. var raid, n = 0, t = 0, i, il, j, jl;
  952. var swt = !SRDotDX.config.importFiltered, filter = SRDotDX.c('#DotDX_filters').ele().innerHTML;
  953. for(j = 0, jl = r.raids.length; j < jl; ++j) {
  954. raid = r.raids[j];
  955. if (swt || filter.indexOf('fltList_' + raid.b + '_' + (raid.d - 1)) < 0) {
  956. t++;
  957. if (typeof SRDotDX.config.raidList[raid.i] !== 'object') {
  958. n++;
  959. SRDotDX.config.addRaid(raid.h, parseInt(raid.i), raid.b, parseInt(raid.d), parseInt(raid.s), false, raid.p, raid.t, raid.r, raid.m.split("_").map(function (x) {
  960. return parseInt(x)
  961. }), parseFloat(raid.hp), raid.cs, raid.fs);
  962. }
  963. else {
  964. SRDotDX.config.raidList[raid.i].magic = raid.m.split("_").map(function(x){return parseInt(x)});
  965. SRDotDX.config.raidList[raid.i].hp = parseFloat(raid.hp);
  966. SRDotDX.config.raidList[raid.i].cs = parseInt(raid.cs);
  967. SRDotDX.config.raidList[raid.i].fs = parseInt(raid.fs);
  968. SRDotDX.config.raidList[raid.i].ni = false;
  969. }
  970. }
  971. }
  972. console.log('[DotDX] Import raids from server complete');
  973.  
  974. //clean chat & db
  975. var id = r.prune.length > 3 ? r.prune.split("_") : [];
  976. il = id.length;
  977. for(i = 0; i < il; ++i) SRDotDX.gui.deleteRaidFromDB(id[i]);
  978. console.log('[DotDX] Removing dead raids on import complete');
  979.  
  980. SRDotDX.gui.selectRaidsToJoin('import response');
  981. SRDotDX.config.lastImported = new Date().getTime();
  982. SRDotDX.util.extEcho('Imported ' + t + ' raids, ' + n + ' new, ' + il + ' pruned.');
  983. if (SRDotDX.request.joinAfterImport) {
  984. SRDotDX.gui.selectRaidsToJoin();
  985. SRDotDX.gui.joinSelectedRaids(false);
  986. }
  987. SRDotDX.gui.doStatusOutput('Imported ' + n + ' new raids, ' + il + ' pruned.', 5000, true);
  988. },
  989. joinRaidResponse: function (e) {
  990. var data = JSON.parse(e.data);
  991. var statustxt = '';
  992. SRDotDX.request.complete = true;
  993. SRDotDX.gui.joinRaidComplete++;
  994. if (data && data.status === 200 && data.responseText && data.url) {
  995. var raidid = SRDotDX.util.getQueryVariable('kv_raid_id', data.url);
  996. if (typeof SRDotDX.config.raidList[raidid] === 'object') {
  997. SRDotDX.config.raidList[raidid].visited = true;
  998. SRDotDX.gui.toggleRaid('visited', raidid, true);
  999. SRDotDX.gui.raidListItemUpdate(raidid);
  1000. if (/successfully (re-)?joined/i.test(data.responseText)) {
  1001. SRDotDX.gui.joinRaidSuccessful++;
  1002. statustxt = (SRDotDX.raids[SRDotDX.config.raidList[raidid].boss] ? SRDotDX.raids[SRDotDX.config.raidList[raidid].boss].shortname : SRDotDX.config.raidList[raidid].boss) + " joined successfully.";
  1003. }
  1004. else if (/already a member/i.test(data.responseText)) {
  1005. statustxt = "Join Failed. You are already a member.";
  1006. }
  1007. else if (/already completed/i.test(data.responseText)) {
  1008. SRDotDX.gui.joinRaidDead++;
  1009. statustxt = "Join failed. Raid is dead.";
  1010. SRDotDX.gui.deleteRaidFromDB(raidid);
  1011. }
  1012. else if (/not a member of the guild/i.test(data.responseText)) {
  1013. SRDotDX.gui.joinRaidDead++;
  1014. statustxt = "Join failed. You are not member of that Guild.";
  1015. SRDotDX.gui.deleteRaidFromDB(raidid);
  1016. }
  1017. else if (/(invalid|find) raid (hash|ID)/i.test(data.responseText)) {
  1018. statustxt = "Join failed. Invalid hash or ID.";
  1019. SRDotDX.gui.joinRaidInvalid++;
  1020. SRDotDX.gui.deleteRaidFromDB(raidid);
  1021. }
  1022. else {
  1023. statustxt = 'Join failed. Unknown join response.';
  1024. }
  1025. }
  1026. else SRDotDX.gui.joinRaidInvalid++;
  1027. }
  1028. else {
  1029. console.log('[DotDX] Request timed out');
  1030. SRDotDX.gui.joinRaidInvalid++;
  1031. statustxt = "Join failed. Timeout.";
  1032. }
  1033. if (SRDotDX.gui.joining) {
  1034. if (SRDotDX.gui.joinRaidComplete >= SRDotDX.gui.joinRaidList.length) {
  1035. statustxt = "Finished joining. " + SRDotDX.gui.joinRaidSuccessful + " new, " + SRDotDX.gui.joinRaidDead + " dead.";
  1036. SRDotDX.gui.joinFinish(true);
  1037. if (SRDotDX.gui.joinRaidSuccessful > 2) SRDotDX.util.extEcho(statustxt);
  1038. setTimeout(SRDotDX.config.save, 3000, false)
  1039. }
  1040. else {
  1041. statustxt = "Joined " + SRDotDX.gui.joinRaidComplete + " of " + SRDotDX.gui.joinRaidList.length + ". " + SRDotDX.gui.joinRaidSuccessful + " new, " + SRDotDX.gui.joinRaidDead + " dead.";
  1042. if (SRDotDX.gui.joinRaidIndex < SRDotDX.gui.joinRaidList.length) SRDotDX.request.joinRaid(SRDotDX.gui.joinRaidList[SRDotDX.gui.joinRaidIndex++]);
  1043. }
  1044. }
  1045. else setTimeout(SRDotDX.config.save, 3000, false);
  1046. if (statustxt !== '') SRDotDX.gui.doStatusOutput(statustxt, 4000, true);
  1047. }
  1048. },
  1049. getRaidDetailsBase: function (url) {
  1050. var r = {diff: 0, hash: '', boss: '', id: 0, sid: 0}, i, cnt = 0;
  1051. var reg = /[?&]([^=]+)=([^?&]+)/ig, p = url.replace(/&amp;/gi, '&').replace(/kv_&/gi, '&kv_');
  1052. while ((i = reg.exec(p)) != null) {
  1053. switch (i[1]) {
  1054. case 'kv_raid_id':
  1055. case 'raid_id': r.id = parseInt(i[2]); cnt++; break;
  1056. case 'kv_difficulty':
  1057. case 'difficulty': r.diff = parseInt(i[2]); cnt++; break;
  1058. case 'kv_raid_boss':
  1059. case 'raid_boss': r.boss = i[2]; cnt++; break;
  1060. case 'kv_hash':
  1061. case 'hash': r.hash = i[2]; cnt++; break;
  1062. case 'kv_serverid':
  1063. case 'serverid': r.sid = parseInt(i[2]); cnt++; break;
  1064. }
  1065. }
  1066. if (cnt < 4) return false;
  1067.  
  1068. r.diffLongText = ['Normal', 'Hard', 'Legendary', 'Nightmare'][r.diff - 1];
  1069. r.diffShortText = ['N', 'H', 'L', 'NM'][r.diff - 1];
  1070. var stats = SRDotDX.raids[r.boss];
  1071. if (typeof stats === 'object') {
  1072. r.name = stats.name;
  1073. r.shortname = stats.shortname;
  1074. r.size = stats.size;
  1075. r.type = stats.type;
  1076. r.dur = stats.duration;
  1077. r.durText = stats.dur + "hrs";
  1078. r.stat = stats.stat;
  1079. r.statText = SRDotDX.getStatText(stats.stat);
  1080. }
  1081. else {
  1082. r.name = r.boss[0].toUpperCase() + r.boss.substring(1).replace(/_/g, " ");
  1083. r.shortname = r.name;
  1084. r.dur = 48;
  1085. }
  1086. return r;
  1087. },
  1088. getTierTxt: function (hp, ppl, ap) {
  1089. var num = hp / ppl;
  1090. num = ap ? num / 2 : num;
  1091. if (num >= 1000000000000) return (num / 1000000000000).toPrecision(3) + 't';
  1092. if (num >= 1000000000) return (num / 1000000000).toPrecision(3) + 'b';
  1093. if (num >= 1000000) return (num / 1000000).toPrecision(3) + 'm';
  1094. if (num >= 1000) return (num / 1000).toPrecision(3) + 'k';
  1095. return num + ''
  1096. },
  1097. getRaidDetails: function (url, user, visited, ts, room) {
  1098. user = user ? user : '';
  1099. var rVis = visited ? visited : user == SRDotDX.config.kongUser && SRDotDX.config.markMyRaidsVisted;
  1100. var r = SRDotDX.util.getRaidFromUrl(url);
  1101. if (r == null) return null;
  1102. //if (r && typeof r.diff == 'number' && typeof r.hash == 'string' && typeof r.boss == 'string' && typeof r.id == 'string') {
  1103. var filter = SRDotDX.c('#DotDX_filters').ele().innerHTML;
  1104. r.visited = rVis;
  1105. if (!SRDotDX.config.importFiltered || filter.indexOf('fltList_' + r.boss + '_' + (r.diff - 1)) < 0) {
  1106. var info = SRDotDX.config.raidList[r.id];
  1107. if (typeof info !== 'object') {
  1108. info = SRDotDX.config.addRaid(r.hash, r.id, r.boss, r.diff, r.sid, r.visited, user, ts, room);
  1109. if (typeof info === 'object') r.isNew = true;
  1110. else return null;
  1111. }
  1112. else r.isNew = false;
  1113. r.timeStamp = info.timeStamp;
  1114. r.visited = info.visited;
  1115. }
  1116. r.linkText = function () {
  1117. var raidInfo = SRDotDX.raids[r.boss];
  1118. var txt = '[&thinsp;' + ['', 'N', 'H', 'L', 'NM'][this.diff] + ' ';
  1119. txt += raidInfo ? raidInfo.shortname : r.boss.capitalize().replace(/_/g, ' ');
  1120. if (SRDotDX.config.linkShowFs) txt += raidInfo ? ', fs:' + SRDotDX.getTierTxt(raidInfo.health[this.diff - 1], raidInfo.size, false) : '';
  1121. if (SRDotDX.config.linkShowAp) txt += raidInfo ? ', ap:' + SRDotDX.getTierTxt(raidInfo.health[this.diff - 1], raidInfo.size, true) : '';
  1122. txt += (this.visited || r.visited) ? '|★' : '';
  1123. txt += '&thinsp;]';
  1124. return txt
  1125. };
  1126. return r;
  1127. },
  1128. getRaidLink: function (msg, user, all) {
  1129. msg = msg.replace(/[\r\n]/g, '');
  1130. a = all || false;
  1131. 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;
  1132. var m = patt.exec(msg);
  1133.  
  1134. if (m) {
  1135. var raid = SRDotDX.getRaidDetails(m[3], user);
  1136. if (raid) {
  1137. raid.ptext = m[1] ? m[1] : "";
  1138. raid.url = m[2].replace(/kv_&amp;/ig, '&amp;kv_');
  1139. raid.ntext = m[4] ? m[4] : "";
  1140. return raid;
  1141. }
  1142. }
  1143. return null
  1144. },
  1145. getPastebinLink: function (msg, user) {
  1146. msg = msg.replace(/[\r\n]/g, '');
  1147. var m = /^((?:(?!<a[ >]).)*)?http:\/\/pastebin\.com\/\w{8}((?:(?!<\/?a[ >]).)*(?:<a.*? class="reply_link"[> ].*)?)$/i.exec(msg);
  1148. if (m) {
  1149. var pb = SRDotDX.getPasteDetails(/http:\/\/pastebin\.com\/\w{8}/i.exec(m[0]) + '', user);
  1150. if (typeof pb != 'undefined') {
  1151. pb.ptext = m[1] || '';
  1152. pb.ntext = m[2] || '';
  1153. }
  1154. return pb;
  1155. }
  1156. else return null;
  1157. },
  1158. getStatText: function (stat) {
  1159. stat = stat.toLowerCase();
  1160. var r = '';
  1161. if (stat == '?' || stat == 'Unknown') return 'Unknown';
  1162. if (stat.indexOf('s') > -1) r = 'Stamina';
  1163. if (stat.indexOf('h') > -1) r += (r != '' ? (stat.indexOf('e') > -1 ? ', ' : ' and ') : '') + 'Honor';
  1164. if (stat.indexOf('e') > -1) r += (r != '' ? ' and ' : '') + 'Energy';
  1165. return r;
  1166. },
  1167. getTimestamp: function () {
  1168. var date = new Date();
  1169. return '(' + ('0' + (new Date().getHours())).slice(-2) + ':' + ('0' + (new Date().getMinutes())).slice(-2) + ')';
  1170. },
  1171. refreshRaidTab: function () {
  1172. var el_out = document.getElementById('raid_list');
  1173. var el_in1 = document.getElementById('mainRaidsFrame');
  1174. var el_in2 = document.getElementById('topRaidPane');
  1175. el_out.style.height = (el_in1.offsetHeight - el_in2.offsetHeight - 8) + 'px';
  1176. },
  1177. isFirefox: navigator.userAgent.indexOf('Firefox') > 0,
  1178. gui: {
  1179. setMessagesCount: function () {
  1180. var num = active_user.unreadWhispersCount() + active_user.unreadShoutsCount();
  1181. var ele = document.getElementById('profile_control_unread_message_count');
  1182. ele.innerHTML = num;
  1183. ele.style.display = num == 0 ? 'none' : 'block';
  1184. setTimeout(SRDotDX.gui.setMessagesCount, 60000);
  1185. },
  1186. gotoRoom: function (num) {
  1187. var numInt = parseInt(num);
  1188. if (isNaN(numInt) || numInt < 1 || numInt > 13) holodeck.chatWindow().activateRoomChooser();
  1189. else {
  1190. 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 + '"}');
  1191. holodeck.joinRoom(roomObj);
  1192. }
  1193. },
  1194. httpCommand: function (url) {
  1195. window.open(url);
  1196. },
  1197. applySidebarUI: function (mode) { //-1:remove, 0:redraw, 1:create, 2:recreate
  1198. if(mode == -1 || mode == 2) {
  1199. document.getElementById('dotdx_sidebar').remove();
  1200. if (mode == -1) SRDotDX.gui.chatResize(SRDotDX.config.chatSize), document.getElementsByClassName("links_connect")[0].setAttribute('colspan', '2');
  1201. }
  1202. if(mode > -1) {
  1203. var sbElemObj, sbElemTxt, i, il;
  1204. if(mode > 0) {
  1205. if (mode == 1) document.getElementsByClassName("links_connect")[0].setAttribute('colspan', '3');
  1206. if (!SRDotDX.config.sbRightSide) document.getElementById('chat_container').style.marginLeft = "0px";
  1207. SRDotDX.c('td').set({id: 'dotdx_sidebar', style: 'width: ' + (SRDotDX.config.sbSlim ? '40' : '70') + 'px'})
  1208. .html('<div id="dotdx_sidebar_container"' + (SRDotDX.config.sbSlim ? ' class="slim"' : '') + '></div>', true)
  1209. .attach('after', SRDotDX.config.sbRightSide ? 'chat_container_cell' : 'gameholder');
  1210. SRDotDX.gui.chatResize(SRDotDX.config.chatSize);
  1211. }
  1212. if(mode == 0) {
  1213. sbElemTxt = '[' + document.getElementById('options_sbConfig').value + ']';
  1214. sbElemObj = JSON.parse(sbElemTxt);
  1215. SRDotDX.config.sbConfig = sbElemObj;
  1216. SRDotDX.config.save(false);
  1217. }
  1218. else sbElemObj = SRDotDX.config.sbConfig;
  1219. var slim = SRDotDX.config.sbSlim ? " slim" : "";
  1220. var sLen = SRDotDX.config.sbSlim ? 0 : 1;
  1221. var stopper = parseInt((document.getElementById('gameholder').offsetHeight - 36) / 26);
  1222. var sName = [["Ely","Elyssa"],["Kas","Kasan"]];
  1223. var sidebarElemHtml = '<div id="serverButton" class="' + slim + '" onclick="SRDotDX.gui.switchServer()">' + sName[SRDotDX.config.serverMode - 1][sLen] + '</div>', sbCmd = "", sbCls = 'class="';
  1224. for(i = 0, il = sbElemObj.length; i < il; ++i) {
  1225. if (i == stopper) break;
  1226. if (typeof sbElemObj[i] == 'undefined' || sbElemObj[i] == null) {
  1227. sidebarElemHtml += '<div></div>'; continue
  1228. }
  1229. if(sbElemObj[i].type == 'jtxt') {
  1230. sidebarElemHtml += '<input id="sbJoinStr" onkeyup="SRDotDX.gui.updateFilterTxt(this.value)" class="dotdx_chat_filter' + slim + '" type="text" value=""><div class="'+slim+'"></div>';
  1231. continue
  1232. }
  1233. if(sbElemObj[i].type == 'label') {
  1234. sidebarElemHtml += '<div class="label' + slim + '">';
  1235. if (SRDotDX.config.sbSlim) {
  1236. if (typeof sbElemObj[i].sname == 'undefined') sidebarElemHtml += sbElemObj[i].name.substring(0, 4);
  1237. else sidebarElemHtml += sbElemObj[i].sname;
  1238. }
  1239. else sidebarElemHtml += sbElemObj[i].name;
  1240. sidebarElemHtml += '</div>';
  1241. continue;
  1242. }
  1243. if(typeof sbElemObj[i].cmd != 'undefined') {
  1244. if (sbElemObj[i].cmd.charAt(0) == '/') sbCmd = 'SRDotDX.gui.chatCommand(\'' + sbElemObj[i].cmd + '\')';
  1245. else if (sbElemObj[i].cmd.indexOf('://') > 2) sbCmd = 'SRDotDX.gui.httpCommand(\'' + sbElemObj[i].cmd + '\')';
  1246. else sbCmd = sbElemObj[i].cmd.replace("'", "\'");
  1247. }
  1248. if(typeof sbElemObj[i].color != 'undefined') {
  1249. if (sbElemObj[i].color.charAt(0).toLowerCase() == 'b' && sbElemObj[i].color.toLowerCase() != 'black') sbCls += 'b';
  1250. else if (sbElemObj[i].color.charAt(0).toLowerCase() == 'g') sbCls += 'g';
  1251. else if (sbElemObj[i].color.charAt(0).toLowerCase() == 'r') sbCls += 'r';
  1252. else if (sbElemObj[i].color.charAt(0).toLowerCase() == 'y') sbCls += 'y';
  1253. }
  1254. sidebarElemHtml += '<button ' + sbCls + slim + '" ' + 'onclick="' + sbCmd + '">';
  1255. if(typeof sbElemObj[i].name == 'undefined') {
  1256. if (SRDotDX.config.sbSlim) sidebarElemHtml += 'Btn' + (i + 1);
  1257. else sidebarElemHtml += 'Button ' + (i + 1);
  1258. }
  1259. else {
  1260. if (SRDotDX.config.sbSlim)
  1261. if (typeof sbElemObj[i].sname == 'undefined') sidebarElemHtml += sbElemObj[i].name.substring(0, 4);
  1262. else sidebarElemHtml += sbElemObj[i].sname;
  1263. else sidebarElemHtml += sbElemObj[i].name
  1264. }
  1265. sidebarElemHtml += '</button>';
  1266. sbCmd = "";
  1267. sbCls = 'class="';
  1268. }
  1269. SRDotDX.c('#dotdx_sidebar_container').html(sidebarElemHtml, true);
  1270. }
  1271. },
  1272. toggleSlimSB: function () {
  1273. if (SRDotDX.config.sbEnable) {
  1274. this.applySidebarUI(2);
  1275. this.chatResize();
  1276. }
  1277. },
  1278. restoreDefaultSB: function () {
  1279. document.getElementById('options_sbConfig').value = '{"type":"label","name":"Camps"},\n\
  1280. {"type":"btn","name":"GoC","cmd":"/camp goc"},\n\
  1281. {"type":"btn","name":"MaM","cmd":"/camp mam"},\n\
  1282. {"type":"btn","name":"GD","cmd":"/camp gd"},\n\
  1283. {"type":"label","name":"Tiers"},\n\
  1284. {"type":"btn","name":"Bella","cmd":"/raid bella"},\n\
  1285. {"type":"btn","name":"Xerk","cmd":"/raid xerkara"},\n\
  1286. {"type":"btn","name":"Tisi","cmd":"/raid tisi"},\n\
  1287. {"type":"label","name":"Join"},\n\
  1288. {"type":"btn","name":"Farms","cmd":"SRDotDX.gui.quickImportAndJoin(\'farm:nnm\')"},\n\
  1289. {"type":"label","name":"Utils"},\n\
  1290. {"type":"btn","color":"g","name":"(Re)Load","sname":"Reld","cmd":"SRDotDX.reload()"},\n\
  1291. {"type":"btn","color":"r","name":"Unload","sname":"Kill","cmd":"/kill"},\n\
  1292. {"type":"btn","name":"Room 1","sname":"CR1","cmd":"SRDotDX.gui.gotoRoom(1)"},\n\
  1293. {"type":"btn","name":"Room 2","sname":"CR2","cmd":"SRDotDX.gui.gotoRoom(2)"},\n\
  1294. {"type":"btn","name":"Room 8","sname":"CR8","cmd":"SRDotDX.gui.gotoRoom(8)"},\n\
  1295. {"type":"label","name":"Sheets","sname":"Help"},\n\
  1296. {"type":"btn","name":"Magic","sname":"Mag","cmd":"https://docs.google.com/spreadsheets/d/1O0eVSnzlACP9XJDq0VN4kN51ESUusec3-gD4dKPHRNU"},\n\
  1297. {"type":"btn","name":"Mount","sname":"Mnt","cmd":"https://docs.google.com/spreadsheet/ccc?key=0AiSpM5yAo8atdER2NEhHY3VjckRhdWctWV8yampQZUE"},\n\
  1298. {"type":"btn","name":"Gear","cmd":"https://docs.google.com/spreadsheet/lv?key=0AvP2qXrWcHBxdHpXZkUzTHNGNkVWbjE5c2VEZUNNMUE"},\n\
  1299. {"type":"label","name":"Raids"},\n\
  1300. {"type":"jtxt"},\n\
  1301. {"type":"btn","color":"g","name":"Join","cmd":"SRDotDX.gui.joinSelectedRaids(true)"},\n\
  1302. {"type":"btn","color":"b","name":"Import","sname":"Imp","cmd":"SRDotDX.gui.importFromServer()"},\n\
  1303. {"type":"btn","color":"y","name":"RaidBot","sname":"Bot","cmd":"SRDotDX.gui.switchBot()"}';
  1304. SRDotDX.gui.applySidebarUI(0);
  1305. },
  1306. hideWC: function (init) {
  1307. var offset;
  1308. if(init) offset = SRDotDX.config.hideWChat ? -265 : 0;
  1309. else {
  1310. offset = SRDotDX.config.hideWChat ? 265 : -265;
  1311. SRDotDX.config.hideWChat = !SRDotDX.config.hideWChat;
  1312. document.getElementById('hideWCtxt').innerHTML = SRDotDX.config.hideWChat ? 'Show World Chat' : 'Hide World Chat';
  1313. SRDotDX.config.extSave();
  1314. }
  1315. var gmWidth = document.getElementById('gameholder').offsetWidth + offset;
  1316. document.getElementById('gameholder').style.width = gmWidth + "px";
  1317. document.getElementById('game').style.width = gmWidth + "px";
  1318. this.chatResize();
  1319. },
  1320. removeWC: function(rly) {
  1321. if(rly) {
  1322. SRDotDX.config.removeWChat = true;
  1323. var li = SRDotDX.c('#wcbutton').ele();
  1324. li.parentNode.removeChild(li);
  1325. if(!SRDotDX.config.hideWChat) {
  1326. SRDotDX.config.hideWChat = true;
  1327. this.hideWC(true);
  1328. }
  1329. SRDotDX.config.extSave();
  1330. }
  1331. else {
  1332. SRDotDX.config.removeWChat = false;
  1333. 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');
  1334. SRDotDX.config.extSave();
  1335. setTimeout(activateGame,1000);
  1336. }
  1337. },
  1338. chatResize: function (chatSize) {
  1339. var size = chatSize || SRDotDX.config.chatSize;
  1340. SRDotDX.config.chatSize = size;
  1341. var gmWidth = document.getElementById('gameholder').offsetWidth;
  1342. var gmHeight = document.getElementById('gameholder').offsetHeight;
  1343. var sbWidth = SRDotDX.config.sbEnable ? (SRDotDX.config.sbSlim ? 40 : 70) : 0;
  1344. var hScroll = SRDotDX.config.hideScrollBar ? SRDotDX.gui.getScrollbarWidth() : 0;
  1345. var chatWidthInc = size - 300;
  1346. var chatCorr = chatWidthInc / 75 * 2;
  1347. var overallWidth = (292 + gmWidth + sbWidth + chatWidthInc) + "px";
  1348. document.getElementById('maingame').style.width = overallWidth;
  1349. document.getElementById('maingamecontent').style.width = overallWidth;
  1350. document.getElementById('flashframecontent').style.width = overallWidth;
  1351. document.getElementById('chat_container').style.width = size + "px";
  1352. document.getElementById('raid_list').style.width = 282 + hScroll + "px";
  1353. document.getElementById('raid_list').style.overflowY = hScroll ? 'scroll' : 'auto';
  1354. document.getElementById('chat_tab_pane').style.width = (size - 16) + "px";
  1355. document.getElementById('DotDX_chatResizeElems').innerHTML = '#kong_game_ui textarea.chat_input { width: ' + (size - 30) + 'px !important; }\
  1356. #kong_game_ui div#chat_raids_overlay { width: ' + (size - 8) + 'px }\
  1357. #kong_game_ui div#chat_raids_overlay > span { width: ' + (size - 18 - chatCorr) + 'px }\
  1358. #kong_game_ui div.chat_message_window { height: ' + (gmHeight - 248) + 'px !important; width: ' + (size - 18 + hScroll) + 'px; overflow-y: ' + (hScroll ? 'scroll' : 'auto') + '; }\
  1359. #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 }\
  1360. 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") + ' }';
  1361. },
  1362. helpBox: function(boxId, magId, raidId, mouseOut) {
  1363. var boxDiv = document.getElementById(boxId);
  1364. var magSpan = document.getElementById(magId);
  1365. var i, il;
  1366. if(mouseOut) {
  1367. SRDotDX.gui.CurrentRaidsOutputTimer = setTimeout(function(){document.getElementById('chat_raids_overlay').className = "";}, 1500);
  1368. if(magSpan) {
  1369. magSpan.style.maxWidth = "0";
  1370. setTimeout(function(){ var m = document.getElementById(magId); if(m) m.innerHTML = ""; }, 100);
  1371. }
  1372. }
  1373. else {
  1374. var info = SRDotDX.config.raidList[raidId], msg = 'Unknown', mWidth = "0", raid;
  1375. if (typeof info !== 'object') msg = 'Raid not in db (removed?)';
  1376. else if (typeof SRDotDX.raids[info.boss] == 'undefined') {
  1377. msg = '<span style="font-size: 12px;">' + info.boss.capitalize().replace(/_/ig, ' ') + ' on ' + ['Normal', 'Hard', 'Legendary', 'Nightmare'][info.diff - 1] + '</span>';
  1378. }
  1379. else {
  1380. var magE = info.magic.reduce(function(a,b){return a+b;});
  1381. raid = SRDotDX.raids[info.boss];
  1382. var diff = info.diff - 1;
  1383. if (magE) {
  1384. var magI = "";
  1385. for (i = 0, il = raid.nd; i < il; ++i) magI += '<span class="magic" style="background-position: -' + info.magic[i] * 16 + 'px 0">&nbsp;</span>';
  1386. magSpan.innerHTML = magI;
  1387. mWidth = (raid.nd * 18 + 10) + "px";
  1388. }
  1389. msg = '<span style="font-size: 12px;">' + raid.name + ' on ' + ['Normal', 'Hard', 'Legendary', 'Nightmare'][diff] + '</span><br>';
  1390. msg += (raid.type === '' ? '' : raid.type + ' | ') + SRDotDX.raidSizes[raid.size].name + ' Raid' + (diff == 3 ? ' | AP' : '');
  1391. var size = raid.size < 15 ? 10 : raid.size;
  1392. var fs = raid.health[diff] / (raid.size == 101 ? 100 : raid.size);
  1393. if (typeof raid.lt !== 'object') {
  1394. var epicRatio = SRDotDX.raidSizes[size].ratios;
  1395. 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]);
  1396. 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]);
  1397. //msg += '<br>2e: ' + epicRatio[2] + ' | 3e: ' + epicRatio[4] + ' | fs: ' + fs;
  1398. }
  1399. else if (typeof raid.lt === 'object') {
  1400. if(raid.lt[0] !== 'u') {
  1401. var ele = SRDotDX.lootTiers[raid.lt[diff]];
  1402. var step = SRDotDX.config.chatSize === 450 ? 6 : (SRDotDX.config.chatSize === 375 ? 5 : 4);
  1403. var steplow = step - 1;
  1404. var tiers = ele['tiers'];
  1405. var epics = ele['epics'];
  1406. var best = ele['best'];
  1407. var e = ele['e'] ? 'E' : '';
  1408. var text = '</table>';
  1409. var tier;
  1410. for(i = tiers.length-1, il = -1; i > il; --i) {
  1411. tier = (i % step == steplow ? '</td></tr><tr><td>' : '</td><td>' ) + epics[i]+ e + ':</td><td ' + (i === best ? 'class="best"' : '') + '>' + SRDotDX.util.getShortNumMil(tiers[i]);
  1412. text = tier + text;
  1413. }
  1414. msg += '<table><tr><td>FS:</td><td>' + SRDotDX.util.getShortNum(fs) + text;
  1415. }
  1416. else msg += '<br>FS: &nbsp;&nbsp;&thinsp;' + SRDotDX.util.getShortNum(fs) + ' | Tiers not yet known.';
  1417. }
  1418. else {
  1419. }
  1420. }
  1421. if(magE) magSpan.style.maxWidth = mWidth;
  1422. document.getElementById(boxId + '_text').innerHTML = msg;
  1423. if(!(boxDiv.className.indexOf('active') > 0)) boxDiv.className = "active";
  1424. clearTimeout(SRDotDX.gui.CurrentRaidsOutputTimer);
  1425. }
  1426. },
  1427. displayHint: function (hint) {
  1428. var helpEl = document.getElementById('helpBox');
  1429. if(hint) {
  1430. helpEl.children[0].innerHTML = hint;
  1431. helpEl.style.maxHeight = '50px';
  1432. helpEl.style.borderTopWidth = '1px';
  1433. }
  1434. else {
  1435. helpEl.style.maxHeight = '0';
  1436. helpEl.style.borderTopWidth = '0';
  1437. }
  1438. },
  1439. refreshRaidList: function () {
  1440. document.getElementById('raid_list').innerHTML = "";
  1441. for(var i = 0, il = SRDotDX.gui.joinRaidList.length; i < il; ++i) SRDotDX.gui.addRaid(SRDotDX.gui.joinRaidList[i]);
  1442. },
  1443. diffTxt: [['DotDX_U','U'],['DotDX_N','N'],['DotDX_H','H'],['DotDX_L','L'],['DotDX_NM','NM']],
  1444. addRaid: function (id) {
  1445. var r = typeof id === 'string' || typeof id === 'number' ? SRDotDX.config.raidList[id] : id;
  1446. var a = document.getElementById('raid_list');
  1447. if (r.boss) {
  1448. if (a !== null) {
  1449. var rd = typeof SRDotDX.raids[r.boss] != 'object' ? {shortname: r.boss.capitalize().replace(/_/ig, ' '), duration: 24} : SRDotDX.raids[r.boss];
  1450. 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;
  1451. var hpr = (r.hp * 100).toPrecision(3), fCls = "";
  1452. var tlp = ((r.expTime - parseInt(new Date().getTime()/1000)) / (36 * rd.duration)).toPrecision(3);
  1453. var delta = hpr - tlp;
  1454. if (delta > 0) {
  1455. if (delta < 15) fCls = " failings";
  1456. else if (delta < 30) fCls = " failingm";
  1457. else fCls = " failingh";
  1458. }
  1459. var lii = SRDotDX.c('div').set({
  1460. class: 'raid_list_item ' + this.diffTxt[r.diff][0] + (r.visited ? ' DotDX_visitedRaidList' : ''),// + (r.nuked ? ' DotDX_nukedRaidList' : ''),
  1461. id: 'DotDX_' + r.id,
  1462. raidid: r.id
  1463. }).html(' \
  1464. <span class="DotDX_List_diff ' + this.diffTxt[r.diff][0] + '">' + this.diffTxt[r.diff][1] + '</span> \
  1465. <a class="DotDX_RaidLink" href="' + url + '">' + rd.shortname + '</a> \
  1466. <span class="DotDX_RaidListVisited">' + (r.visited ? '&#9733;' : '') + (r.fs === 0 ? ' !' : '') + '</span> \
  1467. '+ //<a class="dotdxRaidListDelete" href="#">DEL</a>\
  1468. '<span class="DotDX_extInfo' + fCls + '">h|t: ' + hpr.slice(0,4) + '|' + tlp.slice(0,4) + ' %</span>\
  1469. ', true);
  1470. lii.attach('to', a);
  1471. }
  1472. }
  1473. else SRDotDX.gui.deleteRaidFromDB(id);
  1474. },
  1475. toggleRaidListDesc: function (el, mode) {
  1476. if(mode) {
  1477. clearTimeout(el.timerout);
  1478. el.timerin = setTimeout(function(){el.lastElementChild.style.display = "block";}, 500)
  1479. }
  1480. else {
  1481. clearTimeout(el.timerin);
  1482. el.timerout = setTimeout(function (){el.lastElementChild.style.display = "none";}, 50)
  1483. }
  1484. return false;
  1485. },
  1486. errorMessage: function (s, tag) {
  1487. tag = typeof tag === 'undefined' ? 'b' : tag;
  1488. SRDotDX.gui.doStatusOutput('<' + tag + '>' + s + '</' + tag + '>')
  1489. },
  1490. updateMessage: function () { SRDotDX.gui.doStatusOutput(SRDotDX.gui.standardMessage(), false, true) },
  1491. postingMessage: function (i, ct) { SRDotDX.gui.doStatusOutput('Posting message ' + i + (typeof ct == 'undefined' ? '' : ' of ' + ct + '...'), false) },
  1492. standardMessage: function () { return Object.keys(SRDotDX.config.raidList).length + ' raids in db, ' + SRDotDX.gui.joinRaidList.length + ' selected to join'; },
  1493. CurrentStatusOutputTimer: 0,
  1494. doStatusOutput: function (str, msecs, showInChat) {
  1495. showInChat = showInChat === undefined ? true : showInChat;
  1496. msecs = msecs || 4000;
  1497. var rel = document.getElementById('StatusOutput');
  1498. var cel = document.getElementById('dotdx_chat_overlay');
  1499. if(rel !== null) rel.innerHTML = str;
  1500. if(showInChat && cel !== null) cel.innerHTML = str;
  1501. if(msecs) {
  1502. if (SRDotDX.gui.CurrentStatusOutputTimer) clearTimeout(SRDotDX.gui.CurrentStatusOutputTimer);
  1503. SRDotDX.gui.CurrentStatusOutputTimer = setTimeout(function () {
  1504. var rel = document.getElementById('StatusOutput');
  1505. var cel = document.getElementById('dotdx_chat_overlay');
  1506. if(rel !== null) rel.innerHTML = SRDotDX.gui.standardMessage();
  1507. if(cel !== null) cel.innerHTML = SRDotDX.gui.standardMessage();
  1508. }, msecs);
  1509. }
  1510. },
  1511. toggleDisplay: function (elem, sender, el2) {
  1512. if (typeof elem == 'undefined') return;
  1513. var el = document.getElementById(elem);
  1514. var alls = document.getElementsByName(sender.getAttribute('name'));
  1515. if (alls.length > 0) {
  1516. for (var i = 0; i < alls.length; i++) {
  1517. if (alls[i].nodeName == 'P') alls[i].getElementsByTagName('span')[0].innerHTML = '+';
  1518. else alls[i].style.display = 'none';
  1519. }
  1520. el.style.display = 'block';
  1521. sender.getElementsByTagName('span')[0].innerHTML = '&minus;';
  1522. }
  1523. else {
  1524. if (el.style.display == 'none') {
  1525. el.style.display = 'block';
  1526. sender.getElementsByTagName('span')[0].innerHTML = '&minus;';
  1527. }
  1528. else {
  1529. el.style.display = 'none';
  1530. sender.getElementsByTagName('span')[0].innerHTML = '+';
  1531. }
  1532. }
  1533. if (typeof el2 == 'string') {
  1534. switch (el2) {
  1535. case 'raid_list': SRDotDX.refreshRaidTab(); break;
  1536. case 'share_list': document.getElementById('DotDX_raidsToSpam').style.height = ( 526 - document.getElementById('FPXShare').offsetHeight - document.getElementById('FPXImport').offsetHeight ) + "px";
  1537. }
  1538. }
  1539. },
  1540. Importing: false,
  1541. deleteRaid: function(ele) {
  1542. var id = ele.getAttribute('raidid');
  1543. SRDotDX.gui.deleteRaidFromDB(id);
  1544. if(!SRDotDX.gui.joining) SRDotDX.gui.refreshRaidList();
  1545. },
  1546. deleteRaidFromDB: function(id) {
  1547. var p = document.getElementsByClassName('DotDX_raidId_'+id);
  1548. for (var c = 0, cc = p.length; c < cc; ++c) if (p[c]) p[c].parentNode.removeChild(p[c]);
  1549. if(SRDotDX.config.raidList[id]) delete SRDotDX.config.raidList[id];
  1550. },
  1551. FPXdeleteAllRaids: function() {
  1552. 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.)')) {
  1553. for(var id in SRDotDX.config.raidList) if(SRDotDX.config.raidList[id]) delete SRDotDX.config.raidList[id];
  1554. var raidlistDIV = document.getElementById('raid_list');
  1555. while (raidlistDIV.hasChildNodes()) raidlistDIV.removeChild(raidlistDIV.lastChild);
  1556. localStorage.removeItem('raidList');
  1557. SRDotDX.gui.updateMessage();
  1558. console.log('[SRDotDX] Delete all raids finished.');
  1559. }
  1560. },
  1561. chatCommand: function (text) {
  1562. var elems = document.getElementsByClassName('chat_input');
  1563. var txt = [], i = elems.length;
  1564. while (i--) { txt[i] = elems[i].value; elems[i].value = text; }
  1565. holodeck.activeDialogue().sendInput();
  1566. i = txt.length;
  1567. while (i--) elems[i].value = txt[i];
  1568. },
  1569. sendChatMsg: function (msg, whisper) {
  1570. if (whisper && whisper != '') msg = '/w ' + whisper + ' ' + msg;
  1571. if (SRDotDX.alliance.isActive) {
  1572. SRDotDX.alliance.sendMessage(msg);
  1573. return;
  1574. }
  1575. var elems = document.getElementsByClassName('chat_input');
  1576. var txt = [], i = elems.length;
  1577. while (i--) { txt[i] = elems[i].value; elems[i].value = param1; }
  1578. holodeck.activeDialogue().sendInput();
  1579. i = txt.length;
  1580. while (i--) elems[i].value = txt[i];
  1581. },
  1582. FPXformatRaidOutput: function (url) {
  1583. var pre = ''; //user && room ? '['+room+'|'+user+'] ' : '';
  1584. if (!SRDotDX.config.formatLinkOutput) return pre + url;
  1585. var r = SRDotDX.getRaidDetailsBase(url);
  1586. return pre + r.shortname + ' ' + r.diffShortText + ' ' + url;
  1587. },
  1588. isPosting: false,
  1589. FPXTimerArray: [],
  1590. FPXStopPosting: function () {
  1591. SRDotDX.gui.endSpammingRaids();
  1592. console.log('[DotDX] Spamming raids to chat... [cancelled]');
  1593. SRDotDX.util.extEcho('Raid posting cancelled');
  1594. },
  1595. endSpammingRaids: function () {
  1596. for(var i = 0, il = SRDotDX.gui.FPXTimerArray.length; i < il; ++i) clearTimeout(SRDotDX.gui.FPXTimerArray[i]);
  1597. SRDotDX.gui.isPosting = false;
  1598. document.getElementById('PostRaidsButton').value = 'Post';
  1599. document.getElementById('dotdx_share_post_button').value = 'Post Links to Chat';
  1600. document.getElementById('dotdx_share_post_button').value = 'Friend Share links';
  1601. SRDotDX.gui.doStatusOutput('Posting raids finished');
  1602. SRDotDX.gui.FPXTimerArray = [];
  1603. SRDotDX.config.save(false);
  1604. },
  1605. prepareSpammingRaids: function () {
  1606. SRDotDX.gui.isPosting = true;
  1607. document.getElementById('PostRaidsButton').value = 'Cancel';
  1608. document.getElementById('dotdx_share_post_button').value = 'Cancel';
  1609. document.getElementById('dotdx_friend_post_button').value = 'Cancel';
  1610. SRDotDX.gui.doStatusOutput('Posting raids started', false);
  1611. },
  1612. spamRaidsToFriends: function () {
  1613. SRDotDX.gui.prepareSpammingRaids();
  1614. var userList = [[],[],[],[],[]], keys = Object.keys(SRDotDX.config.friendUsers);
  1615. 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]);
  1616. console.log('[DotDX] Spamming raids to friends... [started]');
  1617. var linkList = document.getElementById('DotDX_raidsToSpam').value;
  1618. if(linkList.length > 100) {
  1619. document.getElementById('DotDX_raidsToSpam').value = '';
  1620. var patt = new RegExp('http...www.kongregate.com.games.5thPlanetGames.dawn.of.the.dragons.[\\w\\s\\d_=&]+[^,]', 'ig');
  1621. var link, ct = 0, sel = 4, r, rs;
  1622. i = 0;
  1623. var timer = 500, ttw = 3050;
  1624. while ((link = patt.exec(linkList)) && SRDotDX.gui.isPosting) {
  1625. link = typeof link !== "string" ? link[0] : link;
  1626. r = SRDotDX.util.getRaidFromUrl(link);
  1627. rs = SRDotDX.raids[r.boss].size;
  1628. if (r.boss === 'serpina') sel = 0;
  1629. else if (rs < 26) sel = 1;
  1630. else if (rs === 50) sel = 2;
  1631. else if (rs === 100) sel = 3;
  1632. if(userList[sel].length > 0) {
  1633. for(var u = 0, ul = userList[sel].length; u < ul; ++u) {
  1634. (function (p1, p2) {
  1635. return SRDotDX.gui.FPXTimerArray[i] = setTimeout(function () {
  1636. if (!SRDotDX.gui.isPosting) return;
  1637. SRDotDX.gui.sendChatMsg(SRDotDX.gui.FPXformatRaidOutput(p1), p2);
  1638. ++ct;
  1639. SRDotDX.gui.postingMessage(ct, i);
  1640. }, timer);
  1641. })(link, userList[sel][u]);
  1642. timer += ttw;
  1643. i++;
  1644. }
  1645. }
  1646. }
  1647. }
  1648. SRDotDX.gui.FPXTimerArray[SRDotDX.gui.FPXTimerArray.length] = setTimeout(function () {
  1649. SRDotDX.gui.endSpammingRaids();
  1650. console.log('[DotDX] Spamming raids to friends... [stopped]');
  1651. }, timer);
  1652. },
  1653. FPXspamRaids: function () {
  1654. SRDotDX.gui.prepareSpammingRaids();
  1655. console.log('[DotDX] Spamming raids to chat... [started]');
  1656. var linkList = document.getElementById('DotDX_raidsToSpam').value;
  1657. if (linkList.length > 100) {
  1658. document.getElementById('DotDX_raidsToSpam').value = '';
  1659. var patt = new RegExp('http...www.kongregate.com.games.5thPlanetGames.dawn.of.the.dragons.[\\w\\s\\d_=&]+[^,]', 'ig');
  1660. var link, ct = 0, i = 0;
  1661. var timer = 500, ttw = 3050;
  1662. var total = linkList.split(patt).length - 1;
  1663. while ((link = patt.exec(linkList)) && SRDotDX.gui.isPosting) {
  1664. (function (p1) {
  1665. return SRDotDX.gui.FPXTimerArray[i] = setTimeout(function () {
  1666. if (!SRDotDX.gui.isPosting) return;
  1667. SRDotDX.gui.sendChatMsg(SRDotDX.gui.FPXformatRaidOutput(p1), SRDotDX.config.whisperTo);
  1668. ++ct;
  1669. SRDotDX.gui.postingMessage(ct, total);
  1670. }, timer);
  1671. })(link);
  1672. timer += ttw;
  1673. i++;
  1674. }
  1675. }
  1676. SRDotDX.gui.FPXTimerArray[SRDotDX.gui.FPXTimerArray.length] = setTimeout(function() {
  1677. SRDotDX.gui.endSpammingRaids();
  1678. console.log('[DotDX] Spamming raids to chat... [stopped]');
  1679. }, timer);
  1680. },
  1681. quickImportAndJoin: function(joinStr, imp) {
  1682. SRDotDX.gui.updateFilterTxt(joinStr, false, true);
  1683. SRDotDX.request.quickBtnLock = false;
  1684. if(imp) {
  1685. SRDotDX.request.joinAfterImport = true;
  1686. SRDotDX.gui.importFromServer();
  1687. }
  1688. else SRDotDX.gui.joinSelectedRaids();
  1689. },
  1690. importFromServer: function () {
  1691. var h = Math.ceil(((new Date).getTime() - SRDotDX.config.lastImported) / 3600000);
  1692. SRDotDX.util.extEcho('Importing raids from server');
  1693. SRDotDX.request.raids(false, h);
  1694. },
  1695. sortRaids: function () {
  1696. var raidArray = [], i, sortFunc;
  1697. var selectedSort = document.getElementById('FPXRaidSortSelection').value;
  1698. var selectedDir = document.getElementById('FPXRaidSortDirection').value;
  1699. var raidlistDIV = document.getElementById('raid_list');
  1700. var raidList = raidlistDIV.childNodes;
  1701. console.log('[SRDotDX] Sorting started ' + selectedSort + ' : ' + selectedDir);
  1702. i = raidList.length;
  1703. while (i--) raidArray.push(SRDotDX.config.raidList[raidList[i].getAttribute('raidid')]);
  1704. switch (selectedSort) {
  1705. case 'Id':
  1706. if (selectedDir == 'asc') sortFunc = function (a, b) {
  1707. if (!(typeof a.id === 'undefined' || typeof b.id === 'undefined') && a.id > b.id) return -1;
  1708. return 1;
  1709. };
  1710. else sortFunc = function (a, b) {
  1711. if (!(typeof a.id === 'undefined' || typeof b.id === 'undefined') && a.id < b.id) return -1;
  1712. return 1;
  1713. };
  1714. break;
  1715. case 'Time':
  1716. if (selectedDir == 'asc') sortFunc = function (a, b) {
  1717. if (!(typeof a.timeStamp === 'undefined' || typeof b.timeStamp === 'undefined') && a.timeStamp > b.timeStamp) return -1;
  1718. return 1;
  1719. };
  1720. else sortFunc = function (a, b) {
  1721. if (!(typeof a.timeStamp === 'undefined' || typeof b.timeStamp === 'undefined') && a.timeStamp < b.timeStamp) return -1;
  1722. return 1;
  1723. };
  1724. break;
  1725. case 'Name':
  1726. if (selectedDir == 'asc') sortFunc = function (a, b) {
  1727. a = SRDotDX.raids[a.boss];
  1728. b = SRDotDX.raids[b.boss];
  1729. //console.log(a + ' : ' + b + ' : ' + (typeof a === 'undefined') + ' : ' + (typeof b === 'undefined'));
  1730. if (!(typeof a === 'undefined' || typeof b === 'undefined') && a.name > b.name) return -1;
  1731. return 1;
  1732. };
  1733. else sortFunc = function (a, b) {
  1734. a = SRDotDX.raids[a.boss];
  1735. b = SRDotDX.raids[b.boss];
  1736. if (!(typeof a === 'undefined' || typeof b === 'undefined') && a.name < b.name) return -1;
  1737. return 1;
  1738. };
  1739. break;
  1740. case 'Diff':
  1741. if (selectedDir == 'asc') sortFunc = function (a, b) {
  1742. if (a.diff > b.diff) return -1;
  1743. return 1
  1744. };
  1745. else sortFunc = function (a, b) {
  1746. if (a.diff < b.diff) return -1;
  1747. return 1
  1748. };
  1749. break;
  1750. }
  1751. try {
  1752. raidArray.sort(sortFunc)
  1753. }
  1754. catch (e) {
  1755. console.log('[SRDotDX] Sorting error: ' + e);
  1756. return
  1757. }
  1758. raidlistDIV = document.getElementById('raid_list');
  1759. if(raidlistDIV !== null) while(raidlistDIV.hasChildNodes()) raidlistDIV.removeChild(raidlistDIV.lastChild);
  1760. i = raidArray.length;
  1761. while (i--) SRDotDX.gui.addRaid(raidArray[i]);
  1762. //SRDotDX.gui.FPXFilterRaidListByName();
  1763. console.log('[SRDotDX] Sorting finished');
  1764. },
  1765. joinRaidList: [],
  1766. postRaidList: [],
  1767. updateFilterTimeout: 0,
  1768. filterSearchStringC: "",
  1769. filterSearchStringR: "",
  1770. updateFilterContext: true,
  1771. includeDiff: function(str, dv) {
  1772. var diff = isNaN(parseInt(dv)) ? ({'n': 1, 'h': 2, 'l': 3, 'nm': 4, 'nnm': 0})[dv] || 5 : parseInt(dv);
  1773. var out = "";
  1774. var string = str.toString();
  1775. switch(diff) {
  1776. case 0: out = string.replace(/,|$/g, '_1,') + string.replace(/,|$/g, '_4,'); break;
  1777. case 1: case 2: case 3: case 4: out = string.replace(/,|$/g, '_' + diff + ','); break;
  1778. default: for(var i = 1; i < 5; ++i) out += string.replace(/,|$/g, '_' + i + ','); break;
  1779. }
  1780. return out.slice(0, -1);
  1781. },
  1782. updateFilterTxt: function(txt, fromRT, quick) {
  1783. clearTimeout(this.updateFilterTimeout);
  1784. var foundRaids = [], field, rf, i, il;
  1785. if(txt !== "") {
  1786. var searchArray = txt.split(/\s?\|\s?|\sor\s|\s?,\s?/ig);
  1787. var keys = Object.keys(SRDotDX.raids);
  1788. for(i = 0, il = searchArray.length; i < il; ++i) {
  1789. field = searchArray[i].toLowerCase().split(':');
  1790. if (field[0] !== "") {
  1791. if(typeof SRDotDX.searchPatterns[field[0]] !== 'undefined') foundRaids.push(this.includeDiff(SRDotDX.searchPatterns[field[0]], field[1]));
  1792. else if(typeof SRDotDX.raids[field[0]] !== 'undefined') foundRaids.push(this.includeDiff(field[0], field[1]));
  1793. else {
  1794. for(var k = 0, kl = keys.length; k < kl; ++k) {
  1795. rf = (SRDotDX.raids[keys[k]].name + ':' + SRDotDX.raids[keys[k]].shortname + ':' + SRDotDX.raids[keys[k]].type).toLowerCase();
  1796. if (rf.indexOf(field[0]) >= 0) foundRaids.push(this.includeDiff(keys[k], field[1]));
  1797. }
  1798. }
  1799. }
  1800. }
  1801. }
  1802. var finalSearchString = foundRaids.length === 0 ? (txt !== "" ? "BREAK" : "" ) : "," + foundRaids.toString() + ",";
  1803. if(fromRT) {
  1804. SRDotDX.config.lastFilter[SRDotDX.config.serverMode - 1] = txt;
  1805. SRDotDX.config.filterSearchStringR = finalSearchString;
  1806. }
  1807. else if(quick) SRDotDX.request.filterSearchStringT = finalSearchString;
  1808. else {
  1809. var filterInputs = document.getElementsByClassName('dotdx_chat_filter');
  1810. for (i = 0, il = filterInputs.length; i < il; ++i) if(filterInputs[i].value !== txt) filterInputs[i].value = txt;
  1811. SRDotDX.config.chatFilterString = txt;
  1812. SRDotDX.config.filterSearchStringC = finalSearchString;
  1813. }
  1814. if(quick) {
  1815. SRDotDX.gui.selectRaidsToJoin('quick');
  1816. SRDotDX.config.save(false)
  1817. }
  1818. else this.updateFilterTimeout = setTimeout(function(){SRDotDX.gui.selectRaidsToJoin();SRDotDX.config.save(false)}, 300);
  1819. },
  1820. selectRaidsToJoin: function(from) {
  1821. if(SRDotDX.request.quickBtnLock) {
  1822. if(!SRDotDX.gui.joining) SRDotDX.gui.joinRaidList.length = 0;
  1823. SRDotDX.gui.updateFilterContext = document.getElementById('chat_tab').firstChild.className === 'active';
  1824. var searchString = from && from === 'quick' ? SRDotDX.request.filterSearchStringT : (SRDotDX.gui.updateFilterContext && SRDotDX.config.chatFilterString !== "" ? SRDotDX.config.filterSearchStringC : SRDotDX.config.filterSearchStringR);
  1825. var r, filter = SRDotDX.c('#DotDX_filters').ele().innerHTML, server = SRDotDX.config.serverMode, keys = Object.keys(SRDotDX.config.raidList);
  1826. if (searchString !== "BREAK") {
  1827. for (var k = 0, kl = keys.length; k < kl; ++k) {
  1828. r = SRDotDX.config.raidList[keys[k]];
  1829. if (SRDotDX.config.fltShowAll || (r.sid === server &&
  1830. ((!SRDotDX.config.fltExclFull || r.fs > 0) && (SRDotDX.config.fltIncVis || !r.visited)) &&
  1831. filter.indexOf('fltList_' + r.boss + '_' + (r.diff - 1)) < 0 &&
  1832. (searchString === "" || searchString.indexOf("," + r.boss + "_" + r.diff + ",") >= 0) ))
  1833. SRDotDX.gui.joinRaidList.push(r);
  1834. }
  1835. }
  1836. if (!SRDotDX.gui.joining) {
  1837. SRDotDX.gui.updateMessage();
  1838. SRDotDX.gui.refreshRaidList();
  1839. }
  1840. }
  1841. },
  1842. pushRaidToJoinQueue: function(id) {
  1843. var searchString = SRDotDX.gui.updateFilterContext && SRDotDX.config.chatFilterString !== "" ? SRDotDX.config.filterSearchStringC : SRDotDX.config.filterSearchStringR;
  1844. var r, filter = SRDotDX.c('#DotDX_filters').ele().innerHTML;
  1845. r = SRDotDX.config.raidList[id];
  1846. if(typeof r === 'object') {
  1847. if (SRDotDX.config.fltShowAll || (r.sid === SRDotDX.config.serverMode &&
  1848. ((!SRDotDX.config.fltExclFull || r.fs > 0) && (SRDotDX.config.fltIncVis || !r.visited)) &&
  1849. filter.indexOf('fltList_' + r.boss + '_' + (r.diff - 1)) < 0 &&
  1850. (searchString == "" || searchString.indexOf("," + r.boss + "_" + r.diff + ",") >= 0) ))
  1851. SRDotDX.gui.joinRaidList.push(r);
  1852. }
  1853. },
  1854. joining: false,
  1855. joinRaidIndex: 0,
  1856. joinRaidComplete: 0,
  1857. joinRaidSuccessful: 0,
  1858. joinRaidDead: 0,
  1859. joinRaidInvalid: 0,
  1860. joinSelectedRaids: function(fromChat) {
  1861. if (!this.joining) {
  1862. this.joining = true;
  1863. this.joinRaidIndex = 0;
  1864. this.joinRaidComplete = 0;
  1865. this.joinRaidSuccessful = 0;
  1866. this.joinRaidDead = 0;
  1867. this.joinRaidInvalid = 0;
  1868. if (SRDotDX.gui.joinRaidList.length == 0) {
  1869. this.joinFinish(true);
  1870. return
  1871. }
  1872. SRDotDX.c("#AutoJoinVisibleButton").ele().value = 'Cancel';
  1873. SRDotDX.c("#AutoImpJoinVisibleButton").ele().value = 'Cancel';
  1874. console.log('[DotDX] Joining ' + SRDotDX.gui.joinRaidList.length + ' raids');
  1875. while(SRDotDX.gui.joinRaidIndex < Math.min(20, SRDotDX.gui.joinRaidList.length)) SRDotDX.request.joinRaid(SRDotDX.gui.joinRaidList[SRDotDX.gui.joinRaidIndex++]);
  1876. }
  1877. else if(!fromChat) this.joinFinish();
  1878. },
  1879. joinFinish: function(recalc) {
  1880. this.joining = false;
  1881. SRDotDX.request.quickBtnLock = true;
  1882. SRDotDX.c("#AutoJoinVisibleButton").ele().value = 'Join';
  1883. SRDotDX.c("#AutoImpJoinVisibleButton").ele().value = 'Import & Join';
  1884. if (recalc) this.selectRaidsToJoin('joining finish');
  1885. },
  1886. refreshFriends: function() {
  1887. var content = "", ff, i, il, f = false, friend;
  1888. var parentDiv = SRDotDX.c('#FPXfsOptions');
  1889. var friends = Object.keys(SRDotDX.config.friendUsers);
  1890. 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);
  1891. for(i = 0, il = friends.length; i < il; ++i) {
  1892. content += (f ? '<br>' : '') + '<span class="generic">' + friends[i] + '</span>' +
  1893. '<input type="checkbox" id="fs:' + friends[i] + ':0' + '"/><label for="fs:' + friends[i] + ':0' + '"></label>' +
  1894. '<input type="checkbox" id="fs:' + friends[i] + ':1' + '"/><label for="fs:' + friends[i] + ':1' + '"></label>' +
  1895. '<input type="checkbox" id="fs:' + friends[i] + ':2' + '"/><label for="fs:' + friends[i] + ':2' + '"></label>' +
  1896. '<input type="checkbox" id="fs:' + friends[i] + ':3' + '"/><label for="fs:' + friends[i] + ':3' + '"></label>' +
  1897. '<input type="checkbox" id="fs:' + friends[i] + ':4' + '"/><label for="fs:' + friends[i] + ':4' + '"></label>';
  1898. f = true;
  1899. }
  1900. parentDiv.html('<div style="overflow-y: scroll; width: 277px; height: 414px">' + content + '</div>', false);
  1901. for(i = 0, il = friends.length; i < il; ++i) {
  1902. ff = SRDotDX.config.friendUsers[friends[i]];
  1903. SRDotDX.c('#fs:' + friends[i] + ':' + 0).on('click',SRDotDX.gui.fsEleClick).ele().checked = ff[0];
  1904. SRDotDX.c('#fs:' + friends[i] + ':' + 1).on('click',SRDotDX.gui.fsEleClick).ele().checked = ff[1];
  1905. SRDotDX.c('#fs:' + friends[i] + ':' + 2).on('click',SRDotDX.gui.fsEleClick).ele().checked = ff[2];
  1906. SRDotDX.c('#fs:' + friends[i] + ':' + 3).on('click',SRDotDX.gui.fsEleClick).ele().checked = ff[3];
  1907. SRDotDX.c('#fs:' + friends[i] + ':' + 4).on('click',SRDotDX.gui.fsEleClick).ele().checked = ff[4];
  1908. /*for (i = 0; i < 5; i++) SRDotDX.c('#fs:' + friends[i] + ':' + i).on('click', function (e) {
  1909. SRDotDX.gui.fsEleClick(e)
  1910. }).ele().checked = ff[i];*/
  1911. }
  1912. },
  1913. DeleteRaids: function() {
  1914. if(!this.joining) {
  1915. console.log('[DotDX] Erasing visible raids ...');
  1916. var rn = SRDotDX.gui.joinRaidList.length;
  1917. if(rn > 0 && (!SRDotDX.config.confirmDeletes || confirm('This will delete ' + rn + ' raids. Continue? \n (This message can be disabled on the options tab.)'))) {
  1918. for(var i = 0; i < rn; ++i) SRDotDX.gui.deleteRaidFromDB(SRDotDX.gui.joinRaidList[i].id);
  1919. SRDotDX.gui.doStatusOutput(i + ' raids deleted');
  1920. SRDotDX.gui.selectRaidsToJoin();
  1921. console.log('[DotDX] Erasing complete');
  1922. }
  1923. }
  1924. },
  1925. GetDumpText: function() {
  1926. var dumptext = "";
  1927. var pre = "http://www.kongregate.com/games/5thPlanetGames/dawn-of-the-dragons?kv_action_type=raidhelp";
  1928. var raid;
  1929. for(var i = 0, il = SRDotDX.gui.joinRaidList.length; i < il; ++i) {
  1930. raid = SRDotDX.gui.joinRaidList[i];
  1931. dumptext += pre + '&kv_raid_id=' + raid.id + '&kv_difficulty=' + raid.diff + '&kv_raid_boss=' + raid.boss + '&kv_hash=' + raid.hash + '&kv_serverid=' + raid.sid + ', ';
  1932. }
  1933. return dumptext;
  1934. },
  1935. RaidAction: function(f) {
  1936. switch(f) {
  1937. case 'share':
  1938. SRDotDX.gui.DumpRaidsToShare(true);
  1939. break;
  1940. case 'post':
  1941. if (SRDotDX.gui.isPosting) SRDotDX.gui.FPXStopPosting();
  1942. else { SRDotDX.gui.DumpRaidsToShare(); SRDotDX.gui.FPXspamRaids(); }
  1943. break;
  1944. case 'post_share':
  1945. if (SRDotDX.gui.isPosting) SRDotDX.gui.FPXStopPosting();
  1946. else SRDotDX.gui.FPXspamRaids();
  1947. break;
  1948. case 'post_friend':
  1949. if (SRDotDX.gui.isPosting) SRDotDX.gui.FPXStopPosting();
  1950. else SRDotDX.gui.spamRaidsToFriends();
  1951. break;
  1952. case 'delete':
  1953. SRDotDX.gui.DeleteRaids();
  1954. break;
  1955. }
  1956. },
  1957. DumpRaidsToShare: function(b) {
  1958. document.getElementById('DotDX_raidsToSpam').value = SRDotDX.gui.GetDumpText();
  1959. SRDotDX.gui.doStatusOutput('Copied ' + SRDotDX.gui.joinRaidList.length + ' raid links to share tab.');
  1960. console.log('[DotDX] Dumped ' + SRDotDX.gui.joinRaidList.length + ' to share');
  1961. if(b) {
  1962. var e = document.getElementById('lots_tab_pane').getElementsByTagName('li');
  1963. var i = e.length;
  1964. while (i--) if (e[i].getAttribute('class').indexOf('active') > -1) e[i].className = e[i].className.replace(/ active$/g, '');
  1965. (document.getElementById('FPXShareTab').parentNode).className += ' active';
  1966. }
  1967. },
  1968. BeginDeletingExpiredUnvisitedRaids: function() {
  1969. SRDotDX.gui.cleanRaidsDB();
  1970. setInterval(SRDotDX.gui.cleanRaidsDB, 600000)
  1971. },
  1972. cleanRaidsDB: function() {
  1973. var now = parseInt(new Date().getTime()/1000);
  1974. var r, st, cnt = 0, keys = Object.keys(SRDotDX.config.raidList);
  1975. for(var k = 0, kl = keys.length; k < kl; ++k) {
  1976. r = SRDotDX.config.raidList[keys[k]];
  1977. st = SRDotDX.raids[r.boss] !== undefined ? SRDotDX.raids[r.boss].stat : "S";
  1978. if(st === "H" && (now-r.timeStamp)/3600 > 8) {
  1979. SRDotDX.gui.deleteRaidFromDB(keys[k]);
  1980. cnt++;
  1981. }
  1982. else if(st !== "H" && (now >= r.expTime || (r.ni && (now-r.timeStamp)/3600 > 3))) {
  1983. SRDotDX.gui.deleteRaidFromDB(keys[k]);
  1984. cnt++;
  1985. }
  1986. }
  1987.  
  1988. var chat = document.getElementsByClassName('chat_message_window'), p, pe, i;
  1989. for(var c = 0, cl = chat.length; c < cl; ++c) {
  1990. p = chat[c].getElementsByTagName('div'); i = 0;
  1991. while(pe = p[i++]) if(pe.empty()) pe.parentNode.removeChild(pe);
  1992. }
  1993.  
  1994. if(cnt > 0) {
  1995. SRDotDX.gui.doStatusOutput(cnt + ' expired raids removed from db.');
  1996. console.log('[DotDX] Number of expired raids removed: ' + cnt);
  1997. SRDotDX.gui.selectRaidsToJoin('prune');
  1998. }
  1999. },
  2000. switchBot: function() {
  2001. //console.log('[SRDotDX] Bot button clicked');
  2002. var chkBot = document.getElementById('SRDotDX_options_hideBotLinks');
  2003. chkBot.checked = !SRDotDX.config.hideBotLinks;
  2004. SRDotDX.config.hideBotLinks = chkBot.checked;
  2005. SRDotDX.c('#SRDotDX_botClass').html('.bot {display: ' + (chkBot.checked ? 'none !important' : 'block') + '}', true);
  2006. setTimeout(SRDotDX.gui.scrollChat, 50);
  2007. },
  2008. scrollChat: function() {
  2009. if (SRDotDX.alliance.isActive) {
  2010. var c = document.getElementById('alliance_chat_window');
  2011. c.scrollTop = c.scrollHeight;
  2012. }
  2013. else {
  2014. var els = document.getElementById('chat_rooms_container').children;
  2015. var i = SRDotDX.util.getChatNumber();
  2016. if(els[i]) {
  2017. var cw = els[i].getElementsByClassName('chat_message_window')[0];
  2018. cw.scrollTop = cw.scrollHeight;
  2019. }
  2020. }
  2021. },
  2022. getScrollbarWidth: function() {
  2023. 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();
  2024. var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth;
  2025. document.body.removeChild(document.getElementById('DotDX_scrollMeasure'));
  2026. return scrollbarWidth;
  2027. },
  2028. applyFontSize: function(num) {
  2029. var n = typeof num === 'number' ? num : SRDotDX.config.fontNum, s1, s2, mod = '';
  2030. //console.log("[DotDX] apply font size with id: " + n);
  2031. SRDotDX.config.fontNum = n;
  2032. switch(n) {
  2033. case 1: s1 = 12; s2 = 10; mod = '; vertical-align: top;'; break;
  2034. case 2: s1 = 10; s2 = 8; break;
  2035. default: s1 = 11; s2 = 9; break;
  2036. }
  2037. SRDotDX.c('#DotDX_fontClass').html('\
  2038. #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}\
  2039. #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 + '}\
  2040. ', true);
  2041. },
  2042. applyTabs: function() {
  2043. document.getElementById('lots_tab').firstChild.innerHTML = SRDotDX.config.dotdxTabName;
  2044. var elems = ["#DotDX_Dummy"];
  2045. if(SRDotDX.config.hideGameTab) elems.push("#kong_game_ui li#game_tab");
  2046. if(SRDotDX.config.hideAccTab) elems.push("#kong_game_ui li#accomplishments_tab");
  2047. SRDotDX.c('#DotDX_tabs').html(elems.join(", ") + ' { display: none !important }', true);
  2048. },
  2049. applyTheme: function(num) {
  2050. var n = typeof num == 'number' ? num : SRDotDX.config.themeNum;
  2051. //console.log("[DotDX] apply theme with id: " + n);
  2052. var c, check, radio;
  2053. SRDotDX.config.themeNum = n;
  2054. switch(n) {
  2055. case 1:
  2056. check = 'iVBORw0KGgoAAAANSUhEUgAAABAAAAAcCAYAAABoMT8aAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuM4zml1AAAAJxSURBVEhL7VRLaxNRGL1QEIVs9AckDamZZPLOvDMzicZEjBltY5qnisFFKbgRVLoQEf0JVkShTUVQCl2oG9GNS0FcuXDpD3DrxneP3x0mfdimTXHjwoHDMN/cc+a73z1nmCAImVgs9joej39NJBLYAau07kM0Gu0EAoH9bHBR8W02m4WqqtB1fSg0TYMkSUgmkx+JI3l0xujLvzg5l8vBsizYtr0FvG6apiuSSqV4J8c8OmO8Pf4Fviifz6NQKGwLLmQYBtLpNEig5NHXBfiC7YgDcPH/ArsI/NUpbPTBMAx8wAWIsy5AxW8DJ/IFw8DfcyfKsvyTOi56dMYcx1nhWyCL/un9LeAC5XL5Xa1WEz06Y61Wa5zwst1uf+l0OtgBq7TmfbPZrDYajTGPzvacRup0jpAURdHnChDxzahpNNMZXCsWMJ+NfDoz7r/l8/n2cYEfo6RRz0i4YlpYadTxYrKClYOHPueCwXMj+SCXlXBZ1vG828SSU8Mj8sNsaAKq3x/c5ES7cASWTaahOydywbwk46qi41Wvi351CovUxUw48l0WonOhUGhsTcCkF8clBTOVMkqyCps/0/0GiTw728YikR9YeVwSIjAPR6/Tb+2AO0QuwAdUVXXcrVaozRbun3ZwPiPjdqmE5cY0+tT2gmFiNhKBFouDTmCzlblAMZPFPA2zf3IST2p1PO02sDxdd8lLioZeWIBFpzA0TIaqoRwWcS+Zcvf68BQRnSk8VhX0JsKwaBa7plHXdBwVRNxJpdE/4WBBN3CR9mzxmdCQR0qjQaSKGMNNql+g/ZqK6iZxb2nkJAqOIStrtX81jYz9Bt6mjYTW51PyAAAAAElFTkSuQmCC';
  2057. 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';
  2058. c = ['#333', '#ddd', '#404040', '#fff', '#792c2c', '#333', '#101010', '0 0 5px #202020', '#333', '0 0 10px #000',
  2059. '#ccc', '#eee', '0 0 4px #555', '#000', '#444', '0 0 5px #888', '#fff', '#792c2c', '0 0 12px #fff', '#fff',
  2060. '#000', 'top,#aa4141,#5c2828', '0 0 5px #aaa;', '#555', '#000', '0 -2px 6px -3px #000', '#fff', '0 0 4px #000;', '#ccc', '#ddd',
  2061. 'none', '#000', '0 0 5px 1px #222', '#444', '#fff', '#000', '#333', '0 0 8px #000', '#ccc', '#222',
  2062. '#111', '#fff', '0 0 4px #111', '#333', '#ddd', '#111', '#444', '#3a3a3a', '#111', 'none',
  2063. '#111', 'none', '#111', 'none', '#111', 'none', '#404040', '#60cc60', '#60cc60', '0 0 5px #00aa1a',
  2064. '#d6c96a', '#d6c96a', '0 0 5px #7e7400', '#e47070', '#e47070', '0 0 5px #aa0000', '#c28ee6', '#c28ee6', '0 0 5px #9000ff', '#000',
  2065. 'top,#404040,#404040', '#000', 'top,#2a2a2a,#492c2c', '#78bcfa', '0 0 4px #000', '#6dc97c', '#ec6666', '#f8b60d', '0 0 5px #000', '#ccc',
  2066. '#fff', '0 0 6px #999', '#aaa', '#bbb', '#dfa160', '#ffb261', '0 0 4px #9b5812', '#000', '#404040', '0 0 6px #111',
  2067. '#eee', '#000', '0 0 3px #101010', '0 0 5px #000', 'top,#303030,#444', '#1a1a1a', '#000', '0 0 8px #fff', '#ddd', '#101010',
  2068. '0 0 3px #000', '0 0 5px #202020', 'top,#3a3a3a,#555', '#eee', '#000', '0 0 5px #000', '0 0 10px #111', 'top,#303030,#404040', '', '',
  2069. '', 'top,#303030,#406785', '', '', '', 'top,#303030,#306638', '', '', '', 'top,#303030,#693434',
  2070. '', '', '', 'top,#303030,#887E35', '#eaeaea', '0 0 5px #000', '#e0e0e0', '#101010', '0 0 5px #000', '0 0 5px #202020',
  2071. 'top,#303030,#444', '', '', 'top,#2a2a2a,#222', '#eee', '#111', '0 0 5px #000', '0 0 4px #303030', 'top,#333,#555', '0 0 6px #101010',
  2072. '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',
  2073. '', 'top,#2a2a2a,#426B44', '0 0 6px #111', '', 'top,#2a2a2a,#40668d', '0 0 6px #111', '', 'top,#2a2a2a,#612525', '#e0e0e0', '#101010',
  2074. '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',
  2075. '#000', '0 0 5px #000', '0 0 6px #111', 'left,#303030,#303030', '', '#aaa', '#000', '0 0 5px #000', 'top,#444,#444', '#606060',
  2076. '#101010', '#e5e5e5', '#f5f5f5', '0 0 6px #c0c0c0', '#eee', '#d83737', '0 0 3px #000', 'top,#404040,#556d52', 'top,#404040,#746c56', 'top,#404040,#664040',
  2077. 'top,#404040,#604c70', '#00bb00', '#dbb32e', '#d13c3c', '#d16ad1', '#eee', '0 0 6px #000', '#101010', '0 0 5px #000', 'top,#2a2a2a,#3a3a3a',
  2078. '#777', '#e0e0e0', '0 0 5px #000', '#f0f0f0', '0 0 8px #000', '#e0e0e0', '0 0 5px #000', '#000', '#3a3a3a', '#303030',
  2079. '#000', '#202020', '', '#552727', '#686868', '#303030', '#c0c0c0', '', '#111', '#222',
  2080. '#e0e0e0', '#fff', '0 0 6px #999', '#ffda8e', '#ff8080', '#ff4040', '#ccc', '#2a2a2a', '0,0,0,0.4', '0,0,0,0.2',
  2081. '0,0,0,0.3', '0,0,0,0.5', '#653838', '', '#792c2c', '#4a4a4a', '0 0 5px #000', '#f0f0f0', '#d0d0d0'];
  2082. break;
  2083. default:
  2084. check = 'iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuM4zml1AAAAC4SURBVDhPnZNRCsQgDAW9pPfxuCKICCIiyC62RPIksnEDU2zMlH7kGefc5xYzax5uas5ba19xjKEGxN67GhBba2pArLWqAbGUogbEnLMaEFNKakCMMaoBMYSgBkTvvRoQb3nEv0v64i/Wr94UiFIKToAopYDDZ0CUUkDMez4DIt/8PQkE7y2Rbz6905nfU3+JfPN3eDJoZon79hO8z++XKCVg7xEgSik4AaKUghMg3vKI83GLMcZ8AZMOnRQ6c3RxAAAAAElFTkSuQmCC';
  2085. radio = 'iVBORw0KGgoAAAANSUhEUgAAAA0AAAAaCAYAAABsONZfAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAYdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuM4zml1AAAAFpSURBVDhP1VJNi4IAEPV3durU1V/QJTAIT3WQopvRD4ggCTKrQ8d+gwkRlB+RKBHhW96sxUrrurdlBx7DvHnjqPOUr3E+nzGbzdDr9dBsNiWzJp9LirFYLNDpdLDdbnE6ncBgZk2e/Vz6GavVCsPhEEmSIMuyN5BnnzoZCIIA7XYbURTh8XiUgn3qqFcsy8Jms8H9fq8EddQr3W4Xh8MBt9utEtRRr2iahjAM5b2rQB31smm/3yOO40pQJ5t4h+VyicvlUgnqqJeDcqXnebK+DOxT9zo0/3+/38fxeITv+28gz/7rTs+Yz+fQdV1ewXVdcQMza/Ls59Ji8ImTyURsQ+8xsyafS97jnxh2vV5jPB5LrjQs/dVqtVCr1VCv1yWzJl9qWMdx0Gg0oKrqC6xt2y43rGmahYEnRqNRuWG5/rsh8qWGZcMwjMLAYDAQ/kfD8oN3ux2m06lk1r8y7PV6RZqmkv/SsIryAXc40Mw81bSxAAAAAElFTkSuQmCC';
  2086. c = ['#a0a0a0', '#000', '#e0e0e0', '#fff', '#69a8e6', '#a0a0a0', '#505050', '0 0 4px #505050', '#d5d5d5', '0 0 5px #333',
  2087. '#666', '#222', '0 0 3px #ccc', '#808080', '#e6e6e6', '0 0 5px #888', '#fff', '#69a8e6', '0 0 3px #000', '#000',
  2088. '#888', 'top,#fff,#ddd', '0 0 5px #555;', '#f6f6f6', '#888', '0 -2px 6px -4px #444', '#222', '', '#777', '#888',
  2089. 'underline', '#888', '0 0 6px #999', '#e5e5e5', '#000', '#777', '#fff', '0 0 8px #999', '#4b4b4b', '#f0f0f0',
  2090. '#bbb', '#333', '0 0 4px #ddd', '#fff', '#222', '#d0d0d0', '#fff', '#f7f7f7', '#8ab389', 'top,#cbe7c4,#f3faf2',
  2091. '#adad68', 'top,#f7f0c8,#fcfbf8', '#b18780', 'top,#f3d7d1,#FCF7F7', '#a99abb', 'top,#ddd4e2,#f4f0f7', '#fff', '', '', '0 0 5px #aaa',
  2092. '', '', '0 0 5px #aaa', '', '', '0 0 5px #aaa', '', '', '0 0 5px #aaa', '#c0c0c0',
  2093. 'top,#f0f0f0,#fff', '#a1b4be', 'top,#dce8f1,#eff4f7', '#276594', 'none', '#267422', '#973131', '#085088', 'none', '#444',
  2094. '#000', '0 0 6px #888', '#666', '#666', '#946a3d', '#946a3d', '0 0 4px #f5Cc68Aa', '#777', '#eee', '0 0 7px #777',
  2095. '#000', '#606060', '0 0 3px #707070', '0 0 4px #ccc', 'top,#fff,#ddd', '#444', '#333', '0 0 5px #000', '#000', '#444',
  2096. '0 0 3px #bbb', '0 0 3px #555', 'top,#f5f5f5,#ccc', '#fff', '#222', '0 0 3px #000', '0 0 3px #222', 'top,#999,#666', '#000', '0 0 10px #fff',
  2097. '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',
  2098. '#000', '0 0 10px #fff', '0 0 7px #807823', 'top,#fffbe0,#c9b41d', '#000', '0 0 3px #888', '#000', '#444', '0 0 3px #bbb', '0 0 3px #555',
  2099. 'top,#f5f5f5,#ccc', '', '', 'top,#ccc,#f5f5f5', '#222', '#999', '0 0 4px #ccc', '0 0 4px #ccc', 'top,#ccc,#eee', '0 0 4px #bbb',
  2100. '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',
  2101. '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',
  2102. '', '0 0 4px -1px #aaa', 'top,#fff,#d1dfee', 'top, #dfe8f1,#fff', '#333', '', '#bbb', '#ccc', 'top,#eee,#fff', '#444',
  2103. '#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',
  2104. '#e0e0e0', '#111', '#111', '0 0 8px #777', '#000', '#bd0000', '0 0 2px #ff8e8e', 'top,#d8ecd3,#f5f5f5', 'top,#faf4d2,#f5f5f5', 'top,#fae4df,#f5f5f5',
  2105. 'top,#e9dcf3,#f5f5f5', '#00bb00', '#dbb32e', '#d13c3c', '#d16ad1', '#000', '0 0 6px #808080', '#808080', '0 0 5px #aaa', 'top,#d0d0d0,#f0f0f0',
  2106. '#ccc', '#222', '', '', '0 0 4px #ccc', '', '', '#bbb', '#fff', '',
  2107. '#bbb', '#efefef', '#fafafa', '#eff4f9', '#5f9ea0', '#eff4f9', '#606060', 'none', '#666', '#c0c0c0',
  2108. '#000', '#fff', '0 0 6px #999', '#b97c00', '#c82929', '#b10000', '', '', '0,0,0,0.2', '0,0,0,0.1',
  2109. '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'];
  2110. break;
  2111. }
  2112.  
  2113. SRDotDX.c('#DotDX_themeClass').html('\
  2114. ::-webkit-scrollbar { border-color: rgba(' + c[228] + '); }\
  2115. ::-webkit-scrollbar-track { background-color: rgba(' + c[229] + '); }\
  2116. ::-webkit-scrollbar-thumb { background-color: rgba(' + c[230] + '); }\
  2117. ::-webkit-scrollbar-thumb:hover { background-color: rgba(' + c[231] + '); }\
  2118. ::-webkit-scrollbar-corner { background-color: rgba(' + c[229] + '); }\
  2119. ::-webkit-resizer { background-color: rgba(' + c[229] + '); }\
  2120. #maingame, #quicklinks li, div.game_page_wrap, div#kong_game_ui, #kong_game_ui .tabpane {background-color:' + c[0] + ' !important;}\
  2121. #kong_game_ui ul.main_tabs li.tab a, div#serverButton {color:' + c[1] + '; background-color:' + c[2] + '; border-color:' + c[95] + ';}\
  2122. div#serverButton {text-shadow:' + c[100] + '; box-shadow:' + c[101] + ';}\
  2123. #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] + ';}\
  2124. #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;}\
  2125. #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] + ';}\
  2126. #kong_game_ui div#chat_window_header, #kong_game_ui div#lots_tab_pane div#dotdx_shadow_wrapper {background-color:' + c[8] + ';}\
  2127. #kong_game_ui div#chat_window_header {box-shadow:' + c[9] + ';}\
  2128. #kong_game_ui div#chat_window_header div.dotdx_chat_overlay {border-color:' + c[175] + ';}\
  2129. #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] + ';}\
  2130. #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] + ';}\
  2131. #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] + ';}\
  2132. #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] + '}\
  2133. #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] + ';}\
  2134. #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] + ');}\
  2135. #kong_game_ui div.chat_actions_container span.kong_ico.btn_target:active {text-shadow:' + c[22] + ';}\
  2136. #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] + ';}\
  2137. #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] + ';}\
  2138. #kong_game_ui .user_row .username, #kong_game_ui div#lots_tab_pane ul { color:' + c[26] + '; text-shadow:' + c[27] + ';}\
  2139. #kong_game_ui .user_row.away .username {color:' + c[28] + ';}\
  2140. #kong_game_ui .user_row .guild-name {color:' + c[29] + ';}\
  2141. #kong_game_ui .user_row .username {text-decoration:' + c[30] + ';}\
  2142. #kong_game_ui div.chat_controls {border-color:' + c[31] + '; box-shadow:' + c[32] + ';}\
  2143. #kong_game_ui div.chat_controls, #kong_game_ui textarea.chat_input {background-color:' + c[33] + ';}\
  2144. #kong_game_ui textarea.chat_input {color:' + c[34] + ';}\
  2145. #kong_game_ui div.chat_actions_container ul.chat_actions_list {border-color:' + c[35] + '; background-color:' + c[36] + '; box-shadow:' + c[37] + ';}\
  2146. #kong_game_ui div.chat_actions_container ul.chat_actions_list li {border-color:' + c[36] + '; color:' + c[38] + ';}\
  2147. #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] + ';}\
  2148. #kong_game_ui div.chat_message_window {background-color:' + c[43] + '; color:' + c[44] + ';}\
  2149. #kong_game_ui div.chat_message_window p {border-bottom-color:' + c[45] + '; border-top-color:' + c[46] + ';}\
  2150. #kong_game_ui div.chat_message_window p.even {background-color:' + c[47] + ';}\
  2151. #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] + ';}\
  2152. #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] + ');} \
  2153. #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] + ');} \
  2154. #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] + ');} \
  2155. #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] + ');} \
  2156. #kong_game_ui div.chat_message_window p span.message a {color:' + c[79] + '}\
  2157. #kong_game_ui div.chat_message_window p span.message a:hover {color:' + c[80] + '; text-shadow:' + c[81] + ';}\
  2158. #kong_game_ui div.chat_message_window p.DotDX_diff_1 span.message a {color:' + c[57] + '; text-shadow:' + c[74] + ';}\
  2159. #kong_game_ui div.chat_message_window p.DotDX_diff_1 span.message a:hover {color:' + c[58] + '; text-shadow:' + c[59] + ';}\
  2160. #kong_game_ui div.chat_message_window p.DotDX_diff_2 span.message a {color:' + c[60] + '; text-shadow:' + c[74] + ';}\
  2161. #kong_game_ui div.chat_message_window p.DotDX_diff_2 span.message a:hover {color:' + c[61] + '; text-shadow:' + c[62] + ';}\
  2162. #kong_game_ui div.chat_message_window p.DotDX_diff_3 span.message a {color:' + c[63] + '; text-shadow:' + c[74] + ';}\
  2163. #kong_game_ui div.chat_message_window p.DotDX_diff_3 span.message a:hover {color:' + c[64] + '; text-shadow:' + c[65] + ';}\
  2164. #kong_game_ui div.chat_message_window p.DotDX_diff_4 span.message a {color:' + c[66] + '; text-shadow:' + c[74] + ';}\
  2165. #kong_game_ui div.chat_message_window p.DotDX_diff_4 span.message a:hover {color:' + c[67] + '; text-shadow:' + c[68] + ';}\
  2166. #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] + ');}\
  2167. #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] + '); }\
  2168. #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] + ';}\
  2169. #kong_game_ui div.chat_message_window p span.username.ign {color:' + c[75] + ';}\
  2170. #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] + ';}\
  2171. #kong_game_ui div.chat_message_window p.emote {color:' + c[77] + '; text-shadow:' + c[78] + ';}\
  2172. #kong_game_ui div.chat_message_window p span.room {color:' + c[82] + ';}\
  2173. #kong_game_ui div.chat_message_window p span.timestamp, #kong_game_ui div.chat_message_window p span.ingamename {color:' + c[83] + ';}\
  2174. #kong_game_ui div.chat_message_window p span.message a.reply_link {color:' + c[79] + '}\
  2175. #kong_game_ui div.chat_message_window p span.message a.reply_link:hover {color:' + c[80] + '; text-shadow:' + c[81] + ';}\
  2176. #kong_game_ui div.chat_message_window p span.message a.chat_link {color:' + c[84] + ';}\
  2177. #kong_game_ui div.chat_message_window p span.message a.chat_link:hover {color:' + c[85] + '; text-shadow:' + c[86] + ';}\
  2178. #kong_game_ui div.chat_message_window p > span.slider {border-color:' + c[87] + '; background:' + c[88] + '; box-shadow:' + c[89] + ';}\
  2179. #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] + ');}\
  2180. 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] + ');}\
  2181. 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] + ');}\
  2182. 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] + ');}\
  2183. 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] + ');}\
  2184. 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] + ');}\
  2185. 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] + ');}\
  2186. div#dotdx_sidebar_container > div.label {color:' + c[124] + '; text-shadow:' + c[125] + ';}\
  2187. 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] + ');}\
  2188. 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] + ');}\
  2189. #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] + ');}\
  2190. #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] + ');}\
  2191. #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] + ');} \
  2192. #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] + ');}\
  2193. #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] + ');}\
  2194. #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] + ');}\
  2195. #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] + ');}\
  2196. #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] + ');}\
  2197. #kong_game_ui input#raidsBossFilter:hover, input#raidsBossFilter:focus {background: -webkit-linear-gradient(' + c[163] + '); background: -moz-linear-gradient(' + c[163] + ');}\
  2198. ul#SRDotDX_tabpane_tabs input[type="text"].generic {color:' + c[164] + '; text-shadow:' + c[165] + '; border-bottom-color:' + c[166] + ';}\
  2199. 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] + ');}\
  2200. 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] + ');}\
  2201. #kong_game_ui span.notice {text-shadow:' + c[174] + ';}\
  2202. #kong_game_ui ul#SRDotDX_tabpane_tabs input[type="checkbox"] + label:before {background: url(data:image/png;base64,' + check + ') 0 0 no-repeat}\
  2203. #kong_game_ui ul#SRDotDX_tabpane_tabs input[type="checkbox"]:checked + label:before {background: url(data:image/png;base64,' + check + ') 0 -14px no-repeat}\
  2204. #kong_game_ui ul#SRDotDX_tabpane_tabs input[type="radio"] + label:before {background: url(data:image/png;base64,' + radio + ') 0 0 no-repeat}\
  2205. #kong_game_ui ul#SRDotDX_tabpane_tabs input[type="radio"]:checked + label:before {background: url(data:image/png;base64,' + radio + ') 0 -13px no-repeat}\
  2206. #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] + ');}\
  2207. #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] + ';}\
  2208. a.DotDX_RaidLink {color:' + c[181] + ';}\
  2209. a.DotDX_RaidLink:hover {color:' + c[182] + '; text-shadow:' + c[183] + ';}\
  2210. a.dotdxRaidListDelete {color:' + c[184] + ';}\
  2211. a.dotdxRaidListDelete:hover {color:' + c[185] + '; text-shadow:' + c[186] + ';}\
  2212. #raid_list .raid_list_item.DotDX_N:hover {background: -webkit-linear-gradient(' + c[187] + '); background: -moz-linear-gradient(' + c[187] + ');}\
  2213. #raid_list .raid_list_item.DotDX_H:hover {background: -webkit-linear-gradient(' + c[188] + '); background: -moz-linear-gradient(' + c[188] + ');}\
  2214. #raid_list .raid_list_item.DotDX_L:hover {background: -webkit-linear-gradient(' + c[189] + '); background: -moz-linear-gradient(' + c[189] + ');}\
  2215. #raid_list .raid_list_item.DotDX_NM:hover {background: -webkit-linear-gradient(' + c[190] + '); background: -moz-linear-gradient(' + c[190] + ');}\
  2216. span.DotDX_List_diff.DotDX_N {color:' + c[191] + ';}\
  2217. span.DotDX_List_diff.DotDX_H {color:' + c[192] + ';}\
  2218. span.DotDX_List_diff.DotDX_L {color:' + c[193] + ';}\
  2219. span.DotDX_List_diff.DotDX_NM {color:' + c[194] + ';}\
  2220. #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] + ');}\
  2221. #kong_game_ui div.chat_message_window p.script hr {background:' + c[200] + ';}\
  2222. #kong_game_ui div.chat_message_window p.script span .title {color:' + c[201] + '; text-shadow:' + c[202] + ';}\
  2223. #kong_game_ui div.chat_message_window p.script span .title:hover {color:' + c[203] + '; text-shadow:' + c[204] + ';}\
  2224. table.raids, table.camps {color:' + c[205] + '; text-shadow:' + c[206] + ';} \
  2225. table.raids td, table.camps td {border-color:' + c[207] + '; background:' + c[208] + ';}\
  2226. table.raids td.ep, table.camps td.ep {background:' + c[209] + ';} \
  2227. table.raids th, table.camps th {border-color:' + c[210] + '; background-color:' + c[211] + ';} \
  2228. table.raids tr.head, table.camps tr.head {background:' + c[212] + ';} \
  2229. table.raids tr.best td {background:' + c[213] + ';} \
  2230. table.raids colgroup col.selected {border-color:' + c[214] + ';}\
  2231. table.camps td.mark {background:' + c[215] + ';} \
  2232. div.raid_list_item > span.DotDX_extInfo {color:' + c[216] + '; text-shadow:' + c[217] + ';}\
  2233. #maingame, div.game_page_wrap {border-color:' + c[218] + ';}\
  2234. body {background-color:' + c[219] + ' !important}\
  2235. #quicklinks li a, #quicklinks li.rate, #play #maingame .user_connection .logged_in_user {color:' + c[220] + '}\
  2236. #quicklinks li a:hover {color:' + c[221] + '; text-shadow:' + c[222] + ';}\
  2237. div.raid_list_item > span.DotDX_extInfo.failings {color:' + c[223] + ';}\
  2238. div.raid_list_item > span.DotDX_extInfo.failingm {color:' + c[224] + ';}\
  2239. div.raid_list_item > span.DotDX_extInfo.failingh {color:' + c[225] + ';}\
  2240. div.cntrNotify {color:' + c[226] + '; background-color:' + c[227] + '; border-bottom-color:' + c[45] + ';}\
  2241. .user_connection #chat_connected_indicator { -webkit-filter: ' + c[233] + '; filter: ' + c[233] + ';}\
  2242. #kong_game_ui div#alliance_users > div:hover {background-color: ' + c[235] + ';}\
  2243. #kong_game_ui div#alliance_users > div > span:first-child {background-color:' + c[234] + '; text-shadow: 0 0 5px #000;}\
  2244. #kong_game_ui div#alliance_users > div > span:not(:first-child) {text-shadow: ' + c[236] + ';}\
  2245. #kong_game_ui div#alliance_users > div > span:nth-child(2) {color: ' + c[237] + ';}\
  2246. #kong_game_ui div#alliance_users > div > span:nth-child(3) {color: ' + c[238] + ';}\
  2247. #kong_game_ui div#alliance_tab.unread a {background-color: transparent; animation: tabDim 3s linear infinite;}\
  2248. @keyframes tabDim { \
  2249. 0% { background-color: ' + c[14] + ' } \
  2250. 50% { background-color: ' + c[232] + ' } \
  2251. 100% { background-color: ' + c[14] + ' } \
  2252. } \
  2253. ', true); },
  2254. createFilterTab: function () {
  2255. var sm = SRDotDX.config.serverMode - 1;
  2256. var rdObj = Object.keys(SRDotDX.raids);
  2257. var i, il, raid, parentTableId = '', parentTable = '', cb;
  2258. var sectionID = ['Guild','Special','Small','Medium','Large','Epic','Colossal','Gigantic'];
  2259. for(i = 0; i < 8; ++i)
  2260. 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>';
  2261. for(i = 0, il = rdObj.length; i < il; ++i) {
  2262. raid = SRDotDX.raids[rdObj[i]];
  2263. parentTableId = 'FPX_options_cbs_' + raid.id;
  2264. parentTable = SRDotDX.c('div').set({id: parentTableId}).html(' \
  2265. <div>' + raid.name + '</div> \
  2266. <div><input type="checkbox" id="cb_filter_' + raid.id + '_0"/><label for="cb_filter_' + raid.id + '_0"></label></div> \
  2267. <div><input type="checkbox" id="cb_filter_' + raid.id + '_1"/><label for="cb_filter_' + raid.id + '_1"></label></div> \
  2268. <div><input type="checkbox" id="cb_filter_' + raid.id + '_2"/><label for="cb_filter_' + raid.id + '_2"></label></div> \
  2269. <div><input type="checkbox" id="cb_filter_' + raid.id + '_3"/><label for="cb_filter_' + raid.id + '_3"></label></div> \
  2270. <div><input type="checkbox" id="cb_filter_' + raid.id + '_all"/><label for="cb_filter_' + raid.id + '_all"></label></div>', true);
  2271.  
  2272. if (raid.stat === 'H') parentTable.attach('to', 'FPXRaidFilterWhatGuild');
  2273. else if (raid.stat === 'ESH') parentTable.attach('to', 'FPXRaidFilterWhatSpecial');
  2274. else if (raid.size < 50) parentTable.attach('to', 'FPXRaidFilterWhatSmall');
  2275. else if (raid.size === 50) parentTable.attach('to', 'FPXRaidFilterWhatMedium');
  2276. else if (raid.size === 100) parentTable.attach('to', 'FPXRaidFilterWhatLarge');
  2277. else if (raid.size === 250) parentTable.attach('to', 'FPXRaidFilterWhatEpic');
  2278. else if (raid.size === 500) parentTable.attach('to', 'FPXRaidFilterWhatColossal');
  2279. else if (raid.size === 800) parentTable.attach('to', 'FPXRaidFilterWhatGigantic');
  2280.  
  2281. for(var j = 0; j < 4; ++j) {
  2282. cb = document.getElementById('cb_filter_' + raid.id + '_' + j);
  2283. cb.checked = !SRDotDX.config.filters[sm][raid.id][j];
  2284. cb.addEventListener("click", function(){
  2285. var s = SRDotDX.config.serverMode - 1;
  2286. var raidId = this.id.substr(10).slice(0,-2);
  2287. var diffIndex = parseInt(this.id.slice(-1));
  2288. SRDotDX.config.filters[s][raidId][diffIndex] = !this.checked;
  2289. var ele = document.getElementById('DotDX_filters');
  2290. var eletxt = ele.innerHTML;
  2291. var reg = new RegExp('.DotDX_fltChat_' + raidId + '_' + diffIndex + ', ', 'g');
  2292. if(SRDotDX.config.filterChatLinks) {
  2293. if (!this.checked && !reg.test(eletxt)) eletxt = '.DotDX_fltChat_' + raidId + '_' + diffIndex + ', ' + eletxt;
  2294. else if (this.checked) eletxt = eletxt.replace(reg, '');
  2295. }
  2296. reg = new RegExp('.DotDX_fltList_' + raidId + '_' + diffIndex + ', ', 'g');
  2297. if(SRDotDX.config.filterRaidList) {
  2298. if (!this.checked && !reg.test(eletxt)) eletxt = '.DotDX_fltList_' + raidId + '_' + diffIndex + ', ' + eletxt;
  2299. else if (this.checked) eletxt = eletxt.replace(reg, '');
  2300. }
  2301. ele.innerHTML = eletxt;
  2302.  
  2303. var f = SRDotDX.config.filters[s][raidId];
  2304. document.getElementById('cb_filter_' + raidId + '_all').checked = !f[0] && !f[1] && !f[2] && !f[3];
  2305. SRDotDX.config.save(false);
  2306. });
  2307. }
  2308. cb = document.getElementById('cb_filter_' + raid.id + '_all');
  2309. 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]);
  2310. cb.addEventListener('click', function(){
  2311. var s = SRDotDX.config.serverMode - 1;
  2312. var raidId = this.id.substr(10).slice(0,-4), reg;
  2313. var elem = document.getElementById('DotDX_filters');
  2314. var ele = elem.innerHTML;
  2315. var chk = this.checked;
  2316. for(j = 0; j < 4; ++j) {
  2317. document.getElementById('cb_filter_' + raidId + '_' + j).checked = chk;
  2318. SRDotDX.config.filters[s][raidId][j] = !chk;
  2319. reg = new RegExp('.DotDX_fltChat_' + raidId + '_' + j + ', ', 'g');
  2320. if (SRDotDX.config.filterChatLinks) {
  2321. if (!chk && !reg.test(ele)) ele = '.DotDX_fltChat_' + raidId + '_' + j + ', ' + ele;
  2322. else if (chk) ele = ele.replace(reg, '');
  2323. }
  2324. reg = new RegExp('.DotDX_fltList_' + raidId + '_' + j + ', ', 'g');
  2325. if (SRDotDX.config.filterRaidList) {
  2326. if (!chk && !reg.test(ele)) ele = '.DotDX_fltList_' + raidId + '_' + j + ', ' + ele;
  2327. else if (chk) ele = ele.replace(reg, '');
  2328. }
  2329. }
  2330. elem.innerHTML = ele;
  2331. SRDotDX.config.save(false);
  2332. });
  2333. }
  2334. },
  2335. toggleFiltering: function () {
  2336. var sm = SRDotDX.config.serverMode - 1;
  2337. var rdObj = Object.keys(SRDotDX.raids);
  2338. var fltObj = Object.keys(SRDotDX.config.filters[sm]);
  2339. var query = '.DotDX_filter_dummy_0 ', i, il, frcId;
  2340. if(!SRDotDX.util.isArrEq(rdObj, fltObj)) {
  2341. for(i = 0, il = rdObj.length; i < il; ++i) if (typeof SRDotDX.config.filters[sm][rdObj[i]] === 'undefined') SRDotDX.config.filters[sm][rdObj[i]] = [true, true, true, false];
  2342. for(i = 0, il = fltObj.length; i < il; ++i) if(rdObj.indexOf(fltObj[i]) < 0) delete SRDotDX.config.filters[sm][fltObj[i]];
  2343. console.log('[DotDX] Filters array has been altered!');
  2344. }
  2345. if(SRDotDX.config.filterChatLinks) {
  2346. frcId = '.DotDX_fltChat_';
  2347. for(i = 0, il = rdObj.length; i < il; ++i) {
  2348. if (SRDotDX.config.filters[sm][rdObj[i]][0]) query = frcId + rdObj[i] + '_0, ' + query;
  2349. if (SRDotDX.config.filters[sm][rdObj[i]][1]) query = frcId + rdObj[i] + '_1, ' + query;
  2350. if (SRDotDX.config.filters[sm][rdObj[i]][2]) query = frcId + rdObj[i] + '_2, ' + query;
  2351. if (SRDotDX.config.filters[sm][rdObj[i]][3]) query = frcId + rdObj[i] + '_3, ' + query;
  2352. }
  2353. }
  2354. if(SRDotDX.config.filterRaidList) {
  2355. frcId = '.DotDX_fltList_';
  2356. for(i = 0, il = rdObj.length; i < il; ++i) {
  2357. if (SRDotDX.config.filters[sm][rdObj[i]][0]) query = frcId + rdObj[i] + '_0, ' + query;
  2358. if (SRDotDX.config.filters[sm][rdObj[i]][1]) query = frcId + rdObj[i] + '_1, ' + query;
  2359. if (SRDotDX.config.filters[sm][rdObj[i]][2]) query = frcId + rdObj[i] + '_2, ' + query;
  2360. if (SRDotDX.config.filters[sm][rdObj[i]][3]) query = frcId + rdObj[i] + '_3, ' + query;
  2361. }
  2362. }
  2363. SRDotDX.c('#DotDX_filters').html(query + '{display: none !important}', true);
  2364. },
  2365. switchServer: function () {
  2366. var sm = SRDotDX.config.serverMode;
  2367. SRDotDX.config.serverMode = sm === 1 ? 2 : 1;
  2368. this.toggleFiltering();
  2369. this.createFilterTab();
  2370. this.applySidebarUI(0);
  2371. SRDotDX.c('#raidsBossFilter').ele().value = SRDotDX.config.lastFilter[SRDotDX.config.serverMode - 1];
  2372. this.updateFilterTxt(SRDotDX.config.lastFilter[SRDotDX.config.serverMode - 1], true);
  2373. //var grObj = {room: holodeck._chat_window._rooms_by_type["guild"]._room};
  2374. //holodeck._chat_window.leftRoom(grObj);
  2375. //holodeck._chat_window.bootstrapChat();
  2376. SRDotDX.c('#DotDX_serverModeRaids').html('#kong_game_ui p.DotDX_sid_' + (SRDotDX.config.serverMode == 2 ? '1' : '2') + ' {display: none !important}', true);
  2377. this.scrollChat();
  2378. SRDotDX.config.save(false);
  2379. },
  2380. applyKongBar: function() {
  2381. var styleElem = SRDotDX.c('#DotDX_kongBar');
  2382. if(SRDotDX.config.slimKongBar) styleElem.html('#header_logo, #new_nav_wrapper .main_navigation {display:none !important} #header {height:27px !important}',true);
  2383. else styleElem.html('',true);
  2384. },
  2385. load: function() {
  2386. if (typeof holodeck._tabs.addTab === 'function' && document.getElementById('chat_rooms_container') !== null) {
  2387. 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]);
  2388. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_kongBar'}).attach('to', document.head);
  2389. SRDotDX.c('style').set({type: "text/css", id: 'SRDotDX_botClass'}).text('.bot{display:' + (SRDotDX.config.hideBotLinks ? 'none !important' : 'block') + '}').attach('to', document.head);
  2390. SRDotDX.c('style').set({type: "text/css", id: 'SRDotDX_raidClass'}).text('.DotDX_raid {display:' + (SRDotDX.config.hideRaidLinks ? 'none !important' : 'block') + '}').attach('to', document.head);
  2391. SRDotDX.c('style').set({type: "text/css", id: 'SRDotDX_visitedRaidClass'}).text('.DotDX_visitedRaid{display: ' + (SRDotDX.config.hideVisitedRaids ? 'none !important' : 'block') + '}').attach('to', document.head);
  2392. 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);
  2393. 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);
  2394. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_filters'}).text('.DotDX_filter_dummy_0 {display: none !important}').attach('to', document.head);
  2395. 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);
  2396. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_chatResizeElems'}).text('#kong_game_ui textarea.chat_input { width: 270px !important; }\
  2397. #kong_game_ui div#chat_raids_overlay { width: 292px }\
  2398. #kong_game_ui div#chat_raids_overlay > span { width: 282px }\
  2399. 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);
  2400. SRDotDX.gui.applyKongBar();
  2401. SRDotDX.gui.toggleFiltering();
  2402.  
  2403. var elemPositionFix = "";
  2404. if (SRDotDX.isFirefox) {
  2405. elemPositionFix = " \
  2406. #kong_game_ui div#chat_room_tabs div a {padding: 3px 9px 4px 7px}\
  2407. #kong_game_ui div#alliance_tab a { padding: 5px 8px }\
  2408. #kong_game_ui div#lots_tab_pane ul li.tab div.tab_head {padding: 2px 7px 3px}\
  2409. #kong_game_ui span.generic {margin: 2px 6px 0}\
  2410. #kong_game_ui div#dotdx_status_div {padding: 5px 6px}\
  2411. #kong_game_ui div#chat_window_header div.dotdx_chat_overlay {margin-top: 4px; padding-top: 3px;}\
  2412. #kong_game_ui div#chat_raids_overlay {padding: 4px 0}\
  2413. #kong_game_ui div.chat_message_window p span.timestamp, #kong_game_ui div.chat_message_window p span.room {vertical-align: baseline}\
  2414. #kong_game_ui div.chat_message_window p {padding: 2px 5px 3px}\
  2415. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list .raid_list_item {padding: 2px;}\
  2416. .raid_list_item a.dotdxRaidListDelete {margin-top: 1px;}\
  2417. #kong_game_ui div.chat_message_window p span.ingamename {vertical-align: baseline;} \
  2418. a.DotDX_RaidLink {vertical-align: bottom}\
  2419. #kong_game_ui div#alliance_tab a { padding: 4px 8px; } \
  2420. #kong_game_ui div#alliance_users > div > span:nth-child(1) { padding-bottom: 1px; }\
  2421. ";
  2422. }
  2423. else {
  2424. elemPositionFix = " \
  2425. #kong_game_ui div#chat_room_tabs div a {padding: 4px 9px 3px 7px}\
  2426. #kong_game_ui div#alliance_tab a { padding: 5px 8px }\
  2427. #kong_game_ui div#lots_tab_pane ul li.tab div.tab_head {padding: 3px 7px 2px}\
  2428. #kong_game_ui span.generic {margin: 3px 6px 0}\
  2429. #kong_game_ui div#dotdx_status_div {padding: 6px 6px 4px}\
  2430. #kong_game_ui div#chat_window_header div.dotdx_chat_overlay {margin-top: 3px; padding-top: 4px;}\
  2431. #kong_game_ui div#chat_raids_overlay {padding: 5px 0 3px}\
  2432. #kong_game_ui div.chat_message_window p span.timestamp, #kong_game_ui div.chat_message_window p span.room {vertical-align: text-top}\
  2433. #kong_game_ui div.chat_message_window p {padding: 3px 5px}\
  2434. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list .raid_list_item {padding: 3px 2px 1px;}\
  2435. #kong_game_ui div.chat_message_window p span.ingamename {vertical-align: top;} \
  2436. a.DotDX_RaidLink {vertical-align: text-bottom}\
  2437. ";
  2438. }
  2439. SRDotDX.c('style').set({type: "text/css"}).text(" \
  2440. " + (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 {display:none; !important} \
  2441. div.gamepage_header_outer, div.gamepage_header_inner, div.gamepage_header_outer h1 {height: 0 !important; padding: 0 !important; margin: 0 !important} \
  2442. #primarylayout .maincontent {padding: 6px 0 !important} \
  2443. " : "") + "div.raid_list_item.hidden, .DotDX_hidden, div.game_page_admindev_controls, div#subwrap, li#quicklinks_facebook, #shim {display:none !important} \
  2444. #primarywrap {background-image: none !important; background-color: transparent !important;} \
  2445. html {margin: 0 !important;} \
  2446. body {min-width: auto !important;} \
  2447. ::-webkit-scrollbar { width:10px; height: 10px; border-style: solid; }\
  2448. ::-webkit-scrollbar:vertical { border-width: 0 0 0 1px; }\
  2449. ::-webkit-scrollbar:horizontal { border-width: 1px 0 0 0; } \
  2450. ::-webkit-scrollbar-thumb { min-height: 30px; min-width: 30px; }\
  2451. #maingame { border: 1px solid transparent }\
  2452. #maingame .user_connection {margin-right: 10px;}\
  2453. div#game { overflow:hidden }\
  2454. div.upper_gamepage { background: transparent !important; padding: 0 !important; }\
  2455. .user_connection #chat_connected_indicator {margin-right: 10px}\
  2456. #FPXtt { position:absolute; display:block; } \
  2457. #FPXtttop { display:block; height:5px; margin-left:5px; } \
  2458. #FPXttcont { display:block; padding:2px 12px 3px 7px; margin-left:5px; background:#666; color:#fff; } \
  2459. #FPXttbot {display:block;height:5px;margin-left:5px;} \
  2460. .welcome-user>li {background-color: #710000}\
  2461. .welcome-user>li:hover {background-color: #423f3e}\
  2462. #kong_game_ui ul.main_tabs {height:30px; padding-left:7px}\
  2463. #kong_game_ui ul.main_tabs li.tab:first-child { margin-left: 1px; }\
  2464. #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;}\
  2465. #kong_game_ui ul.main_tabs li.tab a.active {margin-top: 5px; padding: 7px 6px 5px; border-radius: 5px 0 5px 0;}\
  2466. /*#kong_game_ui div#chat_tab_pane {height: 645px !important}*/ \
  2467. #kong_game_ui div#lots_tab_pane {padding: 8px; text-align: left; background-color: #777; height: 644px}\
  2468. #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;}\
  2469. #kong_game_ui div#chat_window { background-color: #fff; border: 1px solid #333; overflow: hidden; box-shadow: 0 0 8px 1px #333; }\
  2470. #kong_game_ui div#chat_window_header { height: 69px; box-shadow: 0 0 5px #333; position: relative; background-color: #ddd; }\
  2471. #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 }\
  2472. #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; }\
  2473. #kong_game_ui div#chat_window_header div.room_name_container #alliance_number { display: none; }\
  2474. #kong_game_ui div#chat_window_header div.room_name_container.alliance #alliance_number { display: inline; }\
  2475. #kong_game_ui div#chat_window_header div.room_name_container.alliance .number_in_room { display: none; }\
  2476. #kong_game_ui div.chat_actions_container span.kong_ico { font-size: 12px !important; }\
  2477. #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; }\
  2478. #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;}\
  2479. #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; }\
  2480. #kong_game_ui div.chat_actions_container span.btn_tools { height: 16px; line-height: initial !important; width: 20px; margin: 2px 3px; } \
  2481. #kong_game_ui div#chat_window_header div.dotdx_chat_overlay { border-top: 1px solid #bbb; overflow: hidden; white-space: nowrap; } \
  2482. #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; } \
  2483. #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; } \
  2484. #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 } \
  2485. #kong_game_ui div#alliance_tab { position: relative; top: 3px; height: 0; }\
  2486. #kong_game_ui div#alliance_room { display: none; }\
  2487. #kong_game_ui div#alliance_room.active { display: block; }\
  2488. #kong_game_ui div#alliance_users > div { font-size: 11px; cursor: pointer; } \
  2489. #kong_game_ui div#alliance_users > div > span { display: inline-block; margin: 1px 2px; }\
  2490. #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; }\
  2491. #kong_game_ui div#alliance_users > div > span:nth-child(2) { margin-left: 5px; }\
  2492. #kong_game_ui div#alliance_users > div > span:nth-child(3) { font-style: italic; }\
  2493. #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;}\
  2494. #kong_game_ui div#chat_raids_overlay.active { display: block } \
  2495. #kong_game_ui div#chat_raids_overlay > span { display: block; margin: 0 auto }\
  2496. #kong_game_ui div.chat_controls {border-top: 1px solid #000; position: relative; }\
  2497. #kong_game_ui div#lots_tab_pane ul { margin: 0px; padding: 0px; list-style-type: none; position: relative;} \
  2498. #kong_game_ui div#lots_tab_pane ul li.tab { float: left; height: 100%; } \
  2499. #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} \
  2500. #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;} \
  2501. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_head { cursor: default; }\
  2502. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane { position: absolute; display: block; left: 0px; }\
  2503. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list, \
  2504. #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);} \
  2505. #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;} \
  2506. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list .raid_list_item.hidden {display:none;} \
  2507. 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} \
  2508. a.dotdxRaidListDelete { font: 10px \"Trebuchet MS\"; text-decoration: none; cursor: pointer; margin-right: 2px; float:right; display: inline} \
  2509. a.DotDX_RaidLink {text-decoration:none; overflow: hidden; max-width: 135px; white-space: nowrap; text-overflow: ellipsis; display: inline-block; } \
  2510. div.DotDX_ListPanel {border-top: 1px dashed #999; margin-top: 2px; padding-top: 2px; }\
  2511. div.DotDX_ListPanel > span.raidListContent {font-style: italic} \
  2512. #kong_game_ui p.user_count.full { color: crimson; } \
  2513. #kong_game_ui div#lots_tab_pane a.pastebinlink {font: normal 11px Verdana; color:#333; text-decoration:none; cursor:pointer;} \
  2514. #kong_game_ui div#lots_tab_pane a.pastebinlink:hover { text-decoration: underline; color: black } \
  2515. #kong_game_ui div#lots_tab_pane span.pasteright, #kong_game_ui div#lots_tab_pane span.pasteleft {font: normal 11px Verdana; color: #333} \
  2516. #kong_game_ui div#lots_tab_pane span.pasteright {float:right; padding-right: 6px} \
  2517. #kong_game_ui div#lots_tab_pane span.pasteleft {float:left} \
  2518. #kong_game_ui div.chat_message_window { position: relative; margin: 0; } \
  2519. #kong_game_ui div.chat_message_window p {border-width: 1px 0; border-style: solid; margin: 0;} \
  2520. #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; }\
  2521. #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);} \
  2522. #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);} \
  2523. #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);} \
  2524. #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);} \
  2525. #kong_game_ui div.chat_message_window div.cntrNotify {border-width: 0px 0px 1px; border-style: solid;}\
  2526. #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); } \
  2527. #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);} \
  2528. #kong_game_ui div.chat_message_window p.script hr { height: 1px; border: 0; background: #ccc; margin: 4px 0 3px; }\
  2529. #kong_game_ui div.chat_message_window p.script span { font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 11px} \
  2530. #kong_game_ui div.chat_message_window p.script span .title { text-decoration: none; font-size: 12px; font-weight: bold; color: #222 } \
  2531. #kong_game_ui div.chat_message_window p.script span.bold {font-weight: bold}\
  2532. #kong_game_ui div.chat_message_window p span.separator { margin-right: 0px; display:inline; float: none} \
  2533. #kong_game_ui div.chat_message_window p span.username { color: rgb(39, 101, 148); text-decoration: none; cursor: pointer; display:inline; float: none } \
  2534. #kong_game_ui div.chat_message_window p span.username.ign { color: rgb(38, 116, 34); }\
  2535. #kong_game_ui div.chat_message_window p span.username.is_self { color: rgb(151, 49, 49); }\
  2536. #kong_game_ui div.chat_message_window p span.username:hover { text-decoration: underline } \
  2537. #kong_game_ui div.chat_message_window p span.timestamp {font-style: italic; font-size: 9px; color: #666;} \
  2538. #kong_game_ui div.chat_message_window p span.ingamename {font-style: italic; font-size: 11px; color: #666;} \
  2539. #kong_game_ui div.chat_message_window p span.message {line-height: 16px; word-wrap: break-word; display:inline; float: none} \
  2540. #kong_game_ui div.chat_message_window p span.message img { max-width: 100%; max-height: 250px; margin: 2px auto; display: block; cursor: pointer; } \
  2541. #kong_game_ui div.chat_message_window p span.message embed {width: 100%; height: auto; margin: 2px auto; display: block;} \
  2542. #kong_game_ui div.chat_message_window p span.message a { text-decoration: none; color: #444; font-style: normal } \
  2543. #kong_game_ui div.chat_message_window p span.message a:hover { color: #000; text-shadow: 0 0 6px #888; } \
  2544. #kong_game_ui div.chat_message_window p span.message a.chat_link:hover { text-shadow: 0 0 4px #F5C68A; text-decoration: none; } \
  2545. #kong_game_ui div.chat_message_window p span.message a.chat_link { color: #946A3D; } \
  2546. #kong_game_ui div.chat_message_window p span.message a.reply_link {font-style: italic} \
  2547. #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;}\
  2548. #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'); background-position-y: 0; width: 16px; display: inline-block; height: 16px; margin-right: 2px; margin-top: 4px }\
  2549. div.raid_list_item span.DotDX_extMagics > span {margin-top: 0; vertical-align: text-top; margin-right: 1px; } \
  2550. div.raid_list_item span.DotDX_extMagics {float:right}\
  2551. #kong_game_ui div.chat_message_window p > span.slider > span.magic:first-child { margin-left: 5px; } \
  2552. #kong_game_ui div.chat_message_window p > span.slider > span.magic:last-child { margin-right: 5px; } \
  2553. #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}\
  2554. #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; }\
  2555. #kong_game_ui div.chat_message_window p > span.slider > span.user:last-child { margin-right: 10px; } \
  2556. #kong_game_ui div.chat_message_window p > span.slider > span.user:hover { text-shadow: 0 0 6px #888; } \
  2557. #kong_game_ui div.chat_message_window p.emote {font-style: italic; color: #085088; text-align: center;} \
  2558. #kong_game_ui div.chat_message_window p.emote span.username, #kong_game_ui div.chat_message_window p.emote span.separator { display: none; } \
  2559. #kong_game_ui div.chat_message_window p span.room { color: #666; font-size: 9px;} \
  2560. #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; } \
  2561. #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} \
  2562. #kong_game_ui .chatOverlayMain > span {padding: 3px 10px; cursor: pointer;} \
  2563. #kong_game_ui .chatOverlayMain > span:hover {background-color: #C2A71C; font-style: italic; color: #555}\
  2564. #kong_game_ui textarea.chat_input { height: 30px !important; margin: 0 !important; outline: none; padding: 4px 6px 4px } \
  2565. #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);}\
  2566. #kong_game_ui div.dotdx_chat_buttons > span { display: inline-block; padding: 3px 7px; cursor: pointer; transition: text-shadow .2s; }\
  2567. #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; }\
  2568. #kong_game_ui input.dotdx_chat_filter:focus { background-color: #fff }\
  2569. div.dotdx_chat_buttons > span.active { text-shadow: 0 0 4px #aaa }\
  2570. div.dotdx_chat_buttons > span:hover { text-shadow: 0 0 4px #888 }\
  2571. 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; } \
  2572. 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;}\
  2573. div.tab_pane div.collapsingField { padding-top: 3px; }\
  2574. xxx {display:block !important}\
  2575. span.DotDX_RaidListVisited {padding: 0 3px; vertical-align: text-bottom} \
  2576. span.DotDX_List_diff {display: inline-block; width: 20px; font-weight: bold; padding-left: 2px; vertical-align: text-bottom} \
  2577. span.DotDX_List_diff.DotDX_N {color: #00BB00;} \
  2578. span.DotDX_List_diff.DotDX_H {color: #DDAA00;} \
  2579. span.DotDX_List_diff.DotDX_L {color: #FF0000;} \
  2580. span.DotDX_List_diff.DotDX_NM {color: #BB00BB;} \
  2581. div.tab_pane input, div.tab_pane select {border: 1px solid #ccc; padding: 1px} \
  2582. div.tab_pane input {height: 14px;} \
  2583. div.tab_pane select {height: 18px} \
  2584. 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} \
  2585. 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;}\
  2586. 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;}\
  2587. 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;}\
  2588. div.tab_pane input[type=\"button\"].red:hover,\
  2589. 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;}\
  2590. div.tab_pane input.landpmbutton { height: 20px; width: 22px; } \
  2591. 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); } \
  2592. div.tab_pane input.landtxtfield { padding: 2px 0; width: 50px; text-align: center} \
  2593. div.tab_pane input.landtxtfieldc { padding: 2px 0; width: 100%; text-align: center } \
  2594. div.tab_pane td.landname { padding-top: 3px} \
  2595. div.tab_pane input.landsavebutton { height: 20px; width:100% } \
  2596. table.raids, table.camps { font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 10px; text-align: center; border-collapse: collapse; margin: 5px auto } \
  2597. table.raids td { border: 1px solid #bbb; width: 55px; background-color: #fff; }\
  2598. table.camps td { border: 1px solid #bbb; width: 20px; background-color: #fff; }\
  2599. table.raids td.ep, table.camps td.ep { text-align: right; width: auto; padding: 0 6px; } \
  2600. table.raids th, table.camps th { border: 1px solid #bbb; background-color: #efefef; } \
  2601. table.raids tr.head, table.camps tr.head { background-color: #fafafa; } \
  2602. table.raids tr.split td, table.camps th { border-bottom-width: 2px; } \
  2603. table.raids tr.best td, table.camps td.mark { background-color: #eff4f9; } \
  2604. table.camps .tb {border-right-width: 2px} \
  2605. table.raids colgroup col.selected { border: 2px solid #5f9ea0; }\
  2606. ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"] {display: none}\
  2607. ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"] + label {font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; cursor: pointer;}\
  2608. ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"] + label:before { content:\"\"; display:inline-block; width:18px; height:14px; position: relative; top: 3px; }\
  2609. ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"].generic + label:before { margin-left: 6px }\
  2610. ul#SRDotDX_tabpane_tabs input[type=\"radio\"] {display: none}\
  2611. ul#SRDotDX_tabpane_tabs input[type=\"radio\"] + label {font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; cursor: pointer;}\
  2612. ul#SRDotDX_tabpane_tabs input[type=\"radio\"] + label:before { content:\"\"; display:inline-block; width:16px; height:13px; position: relative; top: 2px; }\
  2613. ul#SRDotDX_tabpane_tabs input[type=\"radio\"].generic + label:before { margin-left: 5px }\
  2614. 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; }\
  2615. ul#SRDotDX_tabpane_tabs input[type=\"text\"].generic:hover { border-style: solid; }\
  2616. 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);}\
  2617. ul#SRDotDX_tabpane_tabs input[type=\"text\"][disabled].generic { color: #aaa; }\
  2618. ul#SRDotDX_tabpane_tabs input[type=\"text\"].color {float: right; margin-right: 6px; width: 40px;}\
  2619. 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;}\
  2620. input#raidsBossFilter:hover, input#raidsBossFilter:focus {background: -webkit-linear-gradient(top, #DFE8F1, #fff); background: -moz-linear-gradient(top, #DFE8F1, #fff);}\
  2621. 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; }\
  2622. #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; }\
  2623. #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;}\
  2624. #kong_game_ui div#helpBox > span {display: inline-block; padding: 11px 8px 9px;}\
  2625. #kong_game_ui span.generic { display: inline-block; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; }\
  2626. #kong_game_ui span.notice { display: inline-block; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 10px; font-style: italic; margin: 3px 6px; }\
  2627. #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;}\
  2628. #kong_game_ui div#dotdx_usercontext span { display: inline-block; padding: 3px 6px 2px }\
  2629. #kong_game_ui div#dotdx_usercontext span:hover { text-shadow: 0 0 3px #aaa; }\
  2630. #kong_game_ui td {vertical-align: middle}\
  2631. div#FPXfsOptions span.generic {float:left; clear:both}\
  2632. 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; }\
  2633. div#FPXfsOptions label { margin-right: 3px; }\
  2634. div#dotdx_sidebar_container { margin-top: 0; padding-top: 5px; overflow: hidden; }\
  2635. 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;}\
  2636. div#dotdx_sidebar_container > button:hover { position: relative; z-index: 40;}\
  2637. 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; }\
  2638. div#dotdx_sidebar_container > div { width: 60px; height: 26px }\
  2639. 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; }\
  2640. div#dotdx_sidebar_container > input[type=\"text\"].slim {width: 16px}\
  2641. div#dotdx_sidebar_container > input[type=\"text\"]:hover, div#dotdx_sidebar_container > input[type=\"text\"]:focus { width:250px; text-align: left; }\
  2642. 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;}\
  2643. div#dotdx_sidebar_container > div#serverButton:hover {border-radius: 5px;} \
  2644. div#dotdx_sidebar_container > button.slim, div#dotdx_sidebar_container > div.slim {width: 30px}\
  2645. div#dotdx_sidebar_container.slim {width: 32px}\
  2646. div#dotdx_sidebar_container > div#serverButton.slim {width: 28px}\
  2647. #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;}\
  2648. div.raid_list_item > span.DotDX_extState { display: inline-block; width:27px; padding-top: 2px }\
  2649. div.raid_list_item > span.DotDX_extInfo { float: right; display:inline; margin-right: 5px; color:#c0c0c0; font-size: 11px }\
  2650. div.raid_list_item > br {clear:both}\
  2651. div.raid_list_item > span.DotDX_extInfo.failings {color: #ffda8e}\
  2652. div.raid_list_item > span.DotDX_extInfo.failingm {color: #ff8080}\
  2653. div.raid_list_item > span.DotDX_extInfo.failingh {color: #ff4040}\
  2654. #FPXRaidFilterWhatDiv div.collapsingField {max-height: 322px; overflow-y: auto;}\
  2655. #FPXRaidFilterWhatDiv div.collapsingField > div { margin: 0 5px; }\
  2656. #FPXRaidFilterWhatDiv div.collapsingField > div > div { flex-direction: row; display: flex; align-items: center; height: 18px; } \
  2657. #FPXRaidFilterWhatDiv div.collapsingField > div > div:first-child { font-weight: bold; }\
  2658. #FPXRaidFilterWhatDiv div.collapsingField > div > div:first-child > div:not(:first-child) { font-size: 10px; text-align: center; width: 21px; }\
  2659. #FPXRaidFilterWhatDiv div.collapsingField > div > div:not(first-child) > div:not(:first-child) { width: 20px; flex-shrink: 0; } \
  2660. #FPXRaidFilterWhatDiv div.collapsingField > div > div > div:first-child {text-overflow: ellipsis; white-space: pre; overflow-x: hidden; flex-grow: 1;}\
  2661. #chat_raids_overlay table {margin-top: 2px;}\
  2662. #chat_raids_overlay table td {line-height: 13px;}\
  2663. #chat_raids_overlay table td.best {text-decoration: underline;}\
  2664. #chat_raids_overlay table td:nth-child(odd) {text-align: right; padding-right: 2px; min-width: 18px;}\
  2665. #chat_raids_overlay table td:nth-child(even) {width: 45px;}\
  2666. " + elemPositionFix).attach("to", document.head);
  2667. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_themeClass'}).attach('to', document.head);
  2668. SRDotDX.gui.applyTheme();
  2669. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_tabs'}).attach('to', document.head);
  2670. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_fontClass'}).attach('to', document.head);
  2671. SRDotDX.gui.applyFontSize();
  2672. 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();
  2673. var sbTmp = JSON.stringify(SRDotDX.config.sbConfig);
  2674. sbTmp = sbTmp.slice(1, sbTmp.length - 1).replace(/},/g, "},&#10;").replace(/l,/g, "l,&#10;");
  2675. var pane = SRDotDX.c('div').set({id: 'lots_tab_pane'}).html(' \
  2676. <div id="dotdx_shadow_wrapper">\
  2677. <div id="dotdx_status_div">DotDX: <span id="StatusOutput"></span></div> \
  2678. <div style="height: 617px; overflow: hidden;">\
  2679. <ul id="SRDotDX_tabpane_tabs"> \
  2680. <li class="tab active"> \
  2681. <div class="tab_head" id="raids_tab">Raids</div> \
  2682. <div class="tab_pane" id="mainRaidsFrame"> \
  2683. <div id="topRaidPane"> \
  2684. <div id="FPXRaidFilterDiv" class="collapsible_panel"> \
  2685. <p class="collapsingCategory" id="collapsingCat10" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidFiltering\', this, \'raid_list\')">Filtering<span style="float:right">&minus;</span></p> \
  2686. <div id="FPXRaidFiltering" style="display:block" class="collapsingField"> \
  2687. <input type="text" id="raidsBossFilter" name="FPXRaidBossNameFilter"> \
  2688. <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>\
  2689. <input type="checkbox" id="dotdx_flt_full"><label for="dotdx_flt_full" style="margin-right: 9px;">Excl full</label>\
  2690. <input type="checkbox" id="dotdx_flt_all"><label for="dotdx_flt_all">Bypass filters</label>\
  2691. </div> \
  2692. </div> \
  2693. <!-- <div id="FPXRaidSortingDiv" class="collapsible_panel"> \
  2694. <p class="collapsingCategory" id="collapsingCat11" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidSort\', this, \'raid_list\')">Sorting<span style="float:right">+</span></p> \
  2695. <div id="FPXRaidSort" style="display:none"> \
  2696. <table> \
  2697. <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> \
  2698. <td>&nbsp;Sort by: \
  2699. <select style="width: 90px" id="FPXRaidSortSelection" tabIndex="-1"> \
  2700. <option value="Time" selected>TimeStamp</option> \
  2701. <option value="Name">Raid Name</option> \
  2702. <option value="Diff">Difficulty</option> \
  2703. <option value="Id">Raid Id</option> \
  2704. </select> \
  2705. <select style="width: 56px" id="FPXRaidSortDirection" tabIndex="-1"> \
  2706. <option value="asc" selected>Asc</option> \
  2707. <option value="desc">Desc</option> \
  2708. </select></td></tr> \
  2709. <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> \
  2710. </table> \
  2711. </div> \
  2712. </div> --> \
  2713. <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.\');">\
  2714. <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.\');"> \
  2715. <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.\');"> \
  2716. <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> \
  2717. <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.\'); "> \
  2718. <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.\'); "> \
  2719. </div> \
  2720. <div style="" id="raid_list" tabIndex="-1"></div> \
  2721. </div> \
  2722. </li> \
  2723. <li class="tab"> \
  2724. <div class="tab_head">Opts</div> \
  2725. <div class="tab_pane"> \
  2726. <div id="FPXRaidOptionsDiv" class="collapsible_panel"> \
  2727. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat20" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidOptions\', this)">Raid Options<span style="float:right">+</span></p> \
  2728. <div id="FPXRaidOptions" name="dotdxOptsTabs" style="display:none" class="collapsingField"> \
  2729. <input type="checkbox" id="SRDotDX_options_markMyRaidsVisited" class="generic"><label for="SRDotDX_options_markMyRaidsVisited">Mark raids posted by me as visited</label><br> \
  2730. <input type="checkbox" id="SRDotDX_options_confirmWhenDeleting" class="generic"><label for="SRDotDX_options_confirmWhenDeleting">Confirm when manually deleting raids</label><br> \
  2731. <input type="checkbox" id="SRDotDX_options_importFiltered" class="generic"><label for="SRDotDX_options_importFiltered">Add to database filtered raids only</label><br> \
  2732. </div> \
  2733. </div> \
  2734. <div id="FPXChatOptionsDiv" class="collapsible_panel"> \
  2735. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat21" onclick="SRDotDX.gui.toggleDisplay(\'FPXChatOptions\', this)">Chat Options<span style="float:right">+</span></p> \
  2736. <div id="FPXChatOptions" name="dotdxOptsTabs" style="display:none" class="collapsingField"> \
  2737. <input type="checkbox" id="SRDotDX_options_hideRaidLinks" class="generic"><label for="SRDotDX_options_hideRaidLinks">Hide all raid links in chat</label><br> \
  2738. <input type="checkbox" id="SRDotDX_options_hideBotLinks" class="generic"><label for="SRDotDX_options_hideBotLinks">Hide bot raid links in chat</label><br> \
  2739. <input type="checkbox" id="SRDotDX_options_hideVisitedRaids" class="generic"><label for="SRDotDX_options_hideVisitedRaids">Hide visited raids in chat</label><br> \
  2740. <input type="checkbox" id="options_formatChatLinks" class="generic"><label for="options_formatChatLinks">Format all links in chat</label><br> \
  2741. <span class="generic">Chat size:</span>\
  2742. <input type="radio" id="SRDotDX_options_chatSizeNormal" name="chatSize" value="300"/><label for="SRDotDX_options_chatSizeNormal">Normal</label> \
  2743. <input type="radio" id="SRDotDX_options_chatSizePlus25" name="chatSize" value="375" class="generic"/><label for="SRDotDX_options_chatSizePlus25">+25%</label> \
  2744. <input type="radio" id="SRDotDX_options_chatSizePlus50" name="chatSize" value="400" class="generic"/><label for="SRDotDX_options_chatSizePlus50">+50%</label><br> \
  2745. <span class="generic">Font size:</span>\
  2746. <input type="radio" id="SRDotDX_options_fontSizeNormal" name="fontSize" value="0"/><label for="SRDotDX_options_fontSizeNormal">Normal</label> \
  2747. <input type="radio" id="SRDotDX_options_fontSizeSmaller" name="fontSize" value="2" class="generic"/><label for="SRDotDX_options_fontSizeSmaller">Smaller</label> \
  2748. <input type="radio" id="SRDotDX_options_chatSizeBigger" name="fontSize" value="1" class="generic"/><label for="SRDotDX_options_chatSizeBigger">Bigger</label><br> \
  2749. <span class="generic">IGN mode:</span>\
  2750. <input type="radio" id="SRDotDX_options_ignHide" name="ignMode" value="0"/><label for="SRDotDX_options_ignHide">Hide</label> \
  2751. <input type="radio" id="SRDotDX_options_ignReplace" name="ignMode" value="1" class="generic"/><label for="SRDotDX_options_ignReplace">Replace</label> \
  2752. <input type="radio" id="SRDotDX_options_ignAttach" name="ignMode" value="2" class="generic"/><label for="SRDotDX_options_ignAttach">Attach</label><br> \
  2753. <input type="checkbox" id="SRDotDX_options_hideScrollbar" class="generic"><label for="SRDotDX_options_hideScrollbar">Hide scrollbar for chat and user window</label><br> \
  2754. <span class="generic">More info in raid links:</span> \
  2755. <input type="checkbox" id="SRDotDX_options_showFS"><label for="SRDotDX_options_showFS">Show FS</label> \
  2756. <input type="checkbox" id="SRDotDX_options_showAP" class="generic"><label for="SRDotDX_options_showAP">Show AP</label> \
  2757. </div> \
  2758. </div> \
  2759. <div id="FPXAllianceOptionsDiv" class="collapsible_panel"> \
  2760. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat22" onclick="SRDotDX.gui.toggleDisplay(\'FPXAllianceOptions\', this)">Alliance Chat Options<span style="float:right">+</span></p> \
  2761. <div id="FPXAllianceOptions" name="dotdxOptsTabs" style="display:none" class="collapsingField"> \
  2762. <input type="checkbox" id="options_enableAllianceChat" class="generic"><label for="options_enableAllianceChat">Enable Alliance Chat</label><br>\
  2763. <span class="generic">Server address: </span>\
  2764. <input type="text" class="generic" id="options_allianceServer" style="width:160px; text-align: left; vertical-align: bottom; margin-top: 4px;"><br>\
  2765. <span class="generic">Chat name: </span>\
  2766. <input type="text" class="generic" id="options_allianceName" style="width:160px; margin-left: 23px; text-align: left; vertical-align: bottom; margin-top: 4px;"><br>\
  2767. </div> \
  2768. </div> \
  2769. <div id="FPXIntOptionsDiv" class="collapsible_panel"> \
  2770. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat23" onclick="SRDotDX.gui.toggleDisplay(\'FPXIntOptions\', this)">Interface Options<span style="float:right">+</span></p> \
  2771. <div id="FPXIntOptions" name="dotdxOptsTabs" style="display:none" class="collapsingField"> \
  2772. <input type="checkbox" id="options_hideGameTitle" class="generic"><label for="options_hideGameTitle">Hide titlebar above game window</label><br>\
  2773. <input type="checkbox" id="options_hideGameDetails" class="generic"><label for="options_hideGameDetails">Hide details under game window</label><br>\
  2774. <input type="checkbox" id="options_hideKongForum" class="generic"><label for="options_hideKongForum">Hide forum under game window</label><br>\
  2775. <input type="checkbox" id="options_trueMsgCount" class="generic"><label for="options_trueMsgCount">Display true kong messages count</label><br>\
  2776. <input type="checkbox" id="options_hideGameTab" class="generic"><label for="options_hideGameTab">Hide Game tab</label><br>\
  2777. <input type="checkbox" id="options_hideAccTab" class="generic"><label for="options_hideAccTab">Hide Achievements tab</label><br>\
  2778. <input type="checkbox" id="options_clearRMB" class="generic"><label for="options_clearRMB">Use RMB to clear chat input field</label><br>\
  2779. <span class="generic">Script tab name</span><input type="text" class="generic color" id="options_dotdxTabName"><br> \
  2780. <span class="generic">Background color</span><input type="text" class="generic color" id="SRDotDX_colors_background"><br> \
  2781. <span class="generic">Theme:</span>\
  2782. <input type="radio" id="theme_lightGrey" name="chatTheme" value="0"><label for="theme_lightGrey">Light Grey</label>\
  2783. <input type="radio" id="theme_crimsonBlack" name="chatTheme" value="1" class="generic"><label for="theme_crimsonBlack">Crimson Black</label>\
  2784. <span class="generic">World Chat:</span>\
  2785. <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>\
  2786. </div>\
  2787. </div> \
  2788. <div id="FPXsbOptionsDiv" class="collapsible_panel"> \
  2789. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat24" onclick="SRDotDX.gui.toggleDisplay(\'FPXsbOptions\', this)">Sidebar Options<span style="float:right">+</span></p> \
  2790. <div id="FPXsbOptions" name="dotdxOptsTabs" style="display:none" class="collapsingField"> \
  2791. <input type="checkbox" id="options_sbEnable" class="generic"><label for="options_sbEnable">Enable DotDX Sidebar</label><br>\
  2792. <input type="checkbox" id="options_sbSlim" class="generic"><label for="options_sbSlim">Use slim Sidebar</label><br>\
  2793. <input type="checkbox" id="options_sbRightSide" class="generic"><label for="options_sbRightSide">Show sidebar on the right side of chat</label><br> \
  2794. <textarea wrap="off" id="options_sbConfig" rows="25" style="overflow-y: hidden; overflow-x: scroll; white-space: nowrap">' + sbTmp + '</textarea> \
  2795. <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;">\
  2796. <input id="dotdx_sbConfigDefault" style="width: 110px;" class="red" type="button" value="Restore default" onclick="SRDotDX.gui.restoreDefaultSB(); return false;">\
  2797. </div> \
  2798. </div> \
  2799. <div id="FPXfsOptionsDiv" class="collapsible_panel"> \
  2800. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat25" onclick="SRDotDX.gui.toggleDisplay(\'FPXfsOptions\', this)">Friend Share Options<span style="float:right">+</span></p> \
  2801. <div id="FPXfsOptions" name="dotdxOptsTabs" style="display:none; text-align:right" class="collapsingField"> \
  2802. </div> \
  2803. </div> \
  2804. </div> \
  2805. </li> \
  2806. <li class="tab"> \
  2807. <div class="tab_head" id="FPXShareTab">Share</div> \
  2808. <div class="tab_pane"> \
  2809. <div id="FPXRaidSpamDiv"> \
  2810. <div id="FPXShareDiv" class="collapsible_panel"> \
  2811. <p class="collapsingCategory" id="collapsingCat30" onclick="SRDotDX.gui.toggleDisplay(\'FPXShare\', this, \'share_list\')">Share<span style="float:right">+</span></p> \
  2812. <div id="FPXShare" style="display:block" class="collapsingField"> \
  2813. <input type="checkbox" id="SRDotDX_options_formatLinkOutput" class="generic"><label for="SRDotDX_options_formatLinkOutput">Enable formatting of posted raid links</label><br> \
  2814. <span class="generic">Whisper to </span><input type="text" class="generic" id="SRDotDX_options_whisperTo"><br>\
  2815. <span class="notice">(if "whisper to" field is blank, raids will be posted public)</span> \
  2816. <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;"/> \
  2817. <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> \
  2818. </div> \
  2819. </div> \
  2820. <div id="FPXImportDiv" class="collapsible_panel" class="collapsingField"> \
  2821. <p class="collapsingCategory" id="collapsingCat31" onclick="SRDotDX.gui.toggleDisplay(\'FPXImport\', this, \'share_list\')">Import<span style="float:right">+</span></p> \
  2822. <div id="FPXImport" style="display:none" class="collapsingField"> \
  2823. <input type="checkbox" id="SRDotDX_options_markImportedRaidsVisited" class="generic"><label for="SRDotDX_options_markImportedRaidsVisited">Mark imported raids visited</label><br> \
  2824. <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;"/> \
  2825. <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;"/> \
  2826. </div> \
  2827. </div> \
  2828. </div> \
  2829. <textarea id="DotDX_raidsToSpam" name="FPXRaidSpamInput" style="height:437px;"></textarea> \
  2830. </div> \
  2831. </li> \
  2832. <li class="tab"> \
  2833. <div class="tab_head">Filter</div> \
  2834. <div class="tab_pane"> \
  2835. <div id="FPXRaidFilterDiv"> \
  2836. <div id="FPXRaidFilterWhereDiv"> \
  2837. <p class="collapsingCategory" id="collapsingCat40" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidFilterWhere\', this)">Filtering options<span style="float:right">+</span></p> \
  2838. <div id="FPXRaidFilterWhere" style="display:block" class="collapsingField"> \
  2839. <input type="checkbox" id="SRDotDX_options_perRaidFilterLinks" class="generic"><label for="SRDotDX_options_perRaidFilterLinks">Activate filtering on raid links</label><br> \
  2840. <input type="checkbox" id="SRDotDX_options_perRaidFilterRaidList" class="generic"><label for="SRDotDX_options_perRaidFilterRaidList">Activate filtering on raid list tab</label><br> \
  2841. </div>\
  2842. </div> \
  2843. <div id="FPXRaidFilterWhatDiv"> \
  2844. <div id="FPXRaidTableSmallDiv" class="collapsible_panel"> \
  2845. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat41" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableSmall\', this)">Small Raids<span style="float:right">+</span></p> \
  2846. <div id="FPXRaidTableSmall" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  2847. <div id="FPXRaidFilterWhatSmall"> \
  2848. <!-- Dynamic content --> \
  2849. </div> \
  2850. </div> \
  2851. </div> \
  2852. <div id="FPXRaidTableMediumDiv" class="collapsible_panel"> \
  2853. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat42" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableMedium\', this)">Medium Raids<span style="float:right">+</span></p> \
  2854. <div id="FPXRaidTableMedium" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  2855. <div id="FPXRaidFilterWhatMedium"> \
  2856. <!-- Dynamic content --> \
  2857. </div> \
  2858. </div> \
  2859. </div> \
  2860. <div id="FPXRaidTableLargeDiv" class="collapsible_panel"> \
  2861. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat43" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableLarge\', this)">Large Raids<span style="float:right">+</span></p> \
  2862. <div id="FPXRaidTableLarge" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  2863. <div id="FPXRaidFilterWhatLarge"> \
  2864. <!-- Dynamic content --> \
  2865. </div> \
  2866. </div> \
  2867. </div> \
  2868. <div id="FPXRaidTableEpicDiv" class="collapsible_panel"> \
  2869. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat44" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableEpic\', this)">Epic Raids<span style="float:right">+</span></p> \
  2870. <div id="FPXRaidTableEpic" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  2871. <div id="FPXRaidFilterWhatEpic"> \
  2872. <!-- Dynamic content --> \
  2873. </div> \
  2874. </table> \
  2875. </div> \
  2876. <div id="FPXRaidTableColossalDiv" class="collapsible_panel"> \
  2877. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat45" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableColossal\', this)">Colossal Raids<span style="float:right">+</span></p> \
  2878. <div id="FPXRaidTableColossal" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  2879. <div id="FPXRaidFilterWhatColossal"> \
  2880. <!-- Dynamic content --> \
  2881. </div> \
  2882. </div> \
  2883. </div> \
  2884. <div id="FPXRaidTableGiganticDiv" class="collapsible_panel"> \
  2885. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat46" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableGigantic\', this)">Gigantic Raids<span style="float:right">+</span></p> \
  2886. <div id="FPXRaidTableGigantic" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  2887. <div id="FPXRaidFilterWhatGigantic"> \
  2888. <!-- Dynamic content --> \
  2889. </div> \
  2890. </div> \
  2891. </div> \
  2892. <div id="FPXRaidTableGuildDiv" class="collapsible_panel"> \
  2893. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat47" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableGuild\', this)">Guild Raids<span style="float:right">+</span></p> \
  2894. <div id="FPXRaidTableGuild" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  2895. <div id="FPXRaidFilterWhatGuild"> \
  2896. <!-- Dynamic content --> \
  2897. </div> \
  2898. </div> \
  2899. </div> \
  2900. <div id="FPXRaidTableSpecialDiv" class="collapsible_panel"> \
  2901. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat48" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableSpecial\', this)">World Raids<span style="float:right">+</span></p> \
  2902. <div id="FPXRaidTableSpecial" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  2903. <div id="FPXRaidFilterWhatSpecial"> \
  2904. <!-- Dynamic content --> \
  2905. </div> \
  2906. </div> \
  2907. </div> \
  2908. </div> \
  2909. </div> \
  2910. </div> \
  2911. </li> \
  2912. <li class="tab"> \
  2913. <div class="tab_head">Util</div> \
  2914. <div class="tab_pane"> \
  2915. <div id="FPXLandCalcDiv" class="collapsible_panel"> \
  2916. <p class="collapsingCategory" id="collapsingCat50" onclick="SRDotDX.gui.toggleDisplay(\'FPXLandCalc\', this)">Land Calculator<span style="float:right">+</span></p> \
  2917. <div id="FPXLandCalc" style="display:block" class="collapsingField"> \
  2918. <form id="FPXLand" name="FPXLandForm" onSubmit="return false;" style="padding-bottom:6px"> \
  2919. <table style="margin: 0 auto; padding-right: 10px;"> \
  2920. <tr><td class="landname" colspan="3">Cornfield</td><td style="width: 10px">&nbsp;</td><td class="landname" colspan="3">Stable</td></tr> \
  2921. <tr> \
  2922. <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> \
  2923. <td> <input class="generic" maxlength="10" name="tf_1" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="1" /></td> \
  2924. <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> \
  2925. <td></td> \
  2926. <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> \
  2927. <td> <input class="generic" maxlength="10" name="tf_2" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="2" /></td> \
  2928. <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> \
  2929. </tr> \
  2930. <tr><td class="landname" colspan="3">Barn</td><td></td><td class="landname" colspan="3">Store</td></tr> \
  2931. <tr> \
  2932. <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> \
  2933. <td> <input class="generic" maxlength="10" name="tf_3" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="3" /></td> \
  2934. <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> \
  2935. <td></td> \
  2936. <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> \
  2937. <td> <input class="generic" maxlength="10" name="tf_4" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="4" /></td> \
  2938. <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> \
  2939. </tr> \
  2940. <tr><td class="landname" colspan="3">Pub</td><td></td><td class="landname" colspan="3">Inn</td></tr> \
  2941. <tr> \
  2942. <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> \
  2943. <td> <input class="generic" maxlength="10" name="tf_5" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="5" /></td> \
  2944. <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> \
  2945. <td></td> \
  2946. <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> \
  2947. <td> <input class="generic" maxlength="10" name="tf_6" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="6" /></td> \
  2948. <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> \
  2949. </tr> \
  2950. <tr><td class="landname" colspan="3">Sentry</td><td></td><td class="landname" colspan="3">Fort</td></tr> \
  2951. <tr> \
  2952. <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> \
  2953. <td> <input class="generic" maxlength="10" name="tf_7" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="7" /></td> \
  2954. <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> \
  2955. <td></td> \
  2956. <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> \
  2957. <td> <input class="generic" maxlength="10" name="tf_8" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="8" /></td> \
  2958. <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> \
  2959. </tr> \
  2960. <tr><td class="landname" colspan="3">Castle</td></tr> \
  2961. <tr> \
  2962. <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> \
  2963. <td> <input class="generic" maxlength="10" name="tf_9" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="9" /></td> \
  2964. <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> \
  2965. <td></td> \
  2966. <td colspan="3"> <input class="landsavebutton green" id="lsbutton" type="button" value="Save" onClick="SRDotDX.gui.FPXLandButtonSave();return false;" tabindex="28"/></td> \
  2967. </tr> \
  2968. </table> \
  2969. </form> \
  2970. </div> \
  2971. </div>\
  2972. <div id="WhoPostedMyRaidDiv" class="collapsible_panel"> \
  2973. <p class="collapsingCategory" id="collapsingCat51" onclick="SRDotDX.gui.toggleDisplay(\'WhoPostedMyRaid\', this)">Who posted my raid?<span style="float:right">+</span></p> \
  2974. <div id="WhoPostedMyRaid" style="display:block" class="collapsingField"> \
  2975. <span class="generic" style="margin-top:6px; margin-right: 2px">Raid link or id: </span>\
  2976. <input type="text" class="generic" id="DotDX_checkRaidPoster" style="width:120px">\
  2977. <input class="green" type="button" value="Check" onClick="SRDotDX.request.poster(); return false;" style="height:20px; width:46px"><br>\
  2978. <span class="generic">Raid: </span><span class="generic" id="DotDX_whoPosted_Raid"></span><br> \
  2979. <span class="generic">Time: </span><span class="generic" id="DotDX_whoPosted_Time"></span><br> \
  2980. <span class="generic">Poster: </span><span class="generic" id="DotDX_whoPosted_Poster"></span><br> \
  2981. </div> \
  2982. </div>\
  2983. </div> \
  2984. </li> \
  2985. </ul> \
  2986. </div>\
  2987. <div id="helpBox" style="max-height:0"><span>Help message</span></div> \
  2988. </div>\
  2989. ', false).attach('to', 'kong_game_ui').ele();
  2990. SRDotDX.c('style').set({type: "text/css", id: 'DotDX_colors'}).text(' \
  2991. .DotDX_filter_dummy_0 {display: none !important} \
  2992. ').attach('to', document.head);
  2993.  
  2994. //pane.style.height = document.getElementById('chat_tab_pane').style.height;
  2995. var e = pane.getElementsByClassName('tab_head');
  2996. for(var i = 0, il = e.length; i < il; ++i) {
  2997. e[i].addEventListener('click', function () {
  2998. if (!/\bactive\b/i.test(this.className)) {
  2999. var e = document.getElementById("lots_tab_pane").getElementsByTagName("li");
  3000. 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, "");
  3001. this.parentNode.className += ' active';
  3002. }
  3003. });
  3004. }
  3005. holodeck._tabs.addTab(link);
  3006. SRDotDX.gui.applyTabs();
  3007. //Set up custom chat size
  3008. SRDotDX.gui.hideWC(true);
  3009.  
  3010. //Chat raids overlay div
  3011. SRDotDX.c('div').set({id: 'chat_raids_overlay'}).html('<span id="chat_raids_overlay_text"></span>', true).attach("to", 'chat_tab_pane');
  3012.  
  3013. //Sidebar elements generator
  3014. if (SRDotDX.config.sbEnable) SRDotDX.gui.applySidebarUI(1);
  3015.  
  3016.  
  3017. //spam tab
  3018. var FPXimpSpam = SRDotDX.c('#DotDX_raidsToSpam');
  3019. var FPXSpamText = 'Paste raid links here to share or import\n\nLinks must be comma (,) separated.';
  3020. FPXimpSpam.ele().value = FPXSpamText;
  3021. FPXimpSpam.on('blur', function(){if(this.value === '') this.value = FPXSpamText});
  3022. FPXimpSpam.on('focus', function(){if(this.value === FPXSpamText) this.value = ''});
  3023.  
  3024. //chat global listener
  3025. var chat_window = document.getElementById('chat_rooms_container');
  3026. chat_window.addEventListener('click', SRDotDX.gui.chatWindowMouseDown, true);
  3027. chat_window.addEventListener('contextmenu', SRDotDX.gui.chatWindowContextMenu, false);
  3028.  
  3029. //land tab
  3030. els = document.FPXLandForm;
  3031. for(i = 0; i < 9; ++i) els.elements['tf_' + (i + 1)].value = SRDotDX.config.FPXLandOwnedCount[i];
  3032. SRDotDX.gui.FPXLandUpdater();
  3033.  
  3034. //raid tab
  3035. var raids_tab = document.getElementById('raids_tab');
  3036. raids_tab.addEventListener('click', function () {
  3037. SRDotDX.gui.refreshRaidList();
  3038. }, false);
  3039.  
  3040. var raidBossFilter = SRDotDX.c('#raidsBossFilter');
  3041. raidBossFilter.ele().value = SRDotDX.config.lastFilter[SRDotDX.config.serverMode - 1];
  3042. raidBossFilter.on("keyup", function () {
  3043. SRDotDX.gui.updateFilterTxt(this.value, true);
  3044. });
  3045.  
  3046. var filterIncVis = SRDotDX.c('#dotdx_flt_vis');
  3047. filterIncVis.ele().checked = SRDotDX.config.fltIncVis;
  3048. filterIncVis.on('click', function () {
  3049. SRDotDX.config.fltIncVis = this.checked;
  3050. if(!document.getElementById('dotdx_flt_all').checked) SRDotDX.gui.selectRaidsToJoin('checkbox');
  3051. });
  3052.  
  3053. var filterExclFull = SRDotDX.c('#dotdx_flt_full');
  3054. filterExclFull.ele().checked = SRDotDX.config.fltExclFull;
  3055. filterExclFull.on('click', function () {
  3056. SRDotDX.config.fltExclFull = this.checked;
  3057. if(!document.getElementById('dotdx_flt_all').checked) SRDotDX.gui.selectRaidsToJoin('checkbox');
  3058. });
  3059.  
  3060. var filterShowAll = SRDotDX.c('#dotdx_flt_all');
  3061. filterShowAll.ele().checked = SRDotDX.config.fltShowAll;
  3062. filterShowAll.on('click', function () {
  3063. SRDotDX.config.fltShowAll = this.checked;
  3064. SRDotDX.gui.selectRaidsToJoin('checkbox')
  3065. });
  3066.  
  3067. //raidlist global click listener
  3068. var raid_list = document.getElementById('raid_list');
  3069. raid_list.addEventListener('click', function (e) {
  3070. e.preventDefault();
  3071. e.stopPropagation();
  3072. return false
  3073. }, false);
  3074. raid_list.addEventListener('mousedown', function (e) {
  3075. SRDotDX.gui.FPXraidListMouseDown(e)
  3076. }, false);
  3077.  
  3078. //options tab
  3079. var optsImportFiltered = SRDotDX.c('#SRDotDX_options_importFiltered');
  3080. optsImportFiltered.ele().checked = SRDotDX.config.importFiltered;
  3081. optsImportFiltered.on('click', function () {
  3082. SRDotDX.config.importFiltered = this.checked;
  3083. SRDotDX.config.save(false)
  3084. });
  3085.  
  3086. var optsShowFs = SRDotDX.c('#SRDotDX_options_showFS');
  3087. optsShowFs.ele().checked = SRDotDX.config.linkShowFs;
  3088. optsShowFs.on('click', function () {
  3089. SRDotDX.config.linkShowFs = this.checked;
  3090. SRDotDX.config.save(false)
  3091. });
  3092.  
  3093. var optsShowAp = SRDotDX.c('#SRDotDX_options_showAP');
  3094. optsShowAp.ele().checked = SRDotDX.config.linkShowAp;
  3095. optsShowAp.on('click', function () {
  3096. SRDotDX.config.linkShowAp = this.checked;
  3097. SRDotDX.config.save(false)
  3098. });
  3099.  
  3100. var optsHideARaids = SRDotDX.c('#SRDotDX_options_hideRaidLinks');
  3101. var optsHideBRaids = SRDotDX.c('#SRDotDX_options_hideBotLinks');
  3102. var optsHideVRaids = SRDotDX.c('#SRDotDX_options_hideVisitedRaids');
  3103. var optsConfirmDeletes = SRDotDX.c('#SRDotDX_options_confirmWhenDeleting');
  3104. var optsMarkImportedVisited = SRDotDX.c('#SRDotDX_options_markImportedRaidsVisited');
  3105. var optsWhisperTo = SRDotDX.c('#SRDotDX_options_whisperTo');
  3106. var optsMarkMyRaidsVisited = SRDotDX.c('#SRDotDX_options_markMyRaidsVisited');
  3107. var optsFormatLinkOutput = SRDotDX.c('#SRDotDX_options_formatLinkOutput');
  3108.  
  3109. var optsChatSizeNormal = SRDotDX.c('#SRDotDX_options_chatSizeNormal');
  3110. optsChatSizeNormal.on('click', function(){SRDotDX.gui.chatResize(300)});
  3111. var optsChatSizePlus25 = SRDotDX.c('#SRDotDX_options_chatSizePlus25');
  3112. optsChatSizePlus25.on('click', function(){SRDotDX.gui.chatResize(375)});
  3113. var optsChatSizePlus50 = SRDotDX.c('#SRDotDX_options_chatSizePlus50');
  3114. optsChatSizePlus50.on('click', function(){SRDotDX.gui.chatResize(450)});
  3115. switch (SRDotDX.config.chatSize) {
  3116. case 300: optsChatSizeNormal.ele().checked = true; break;
  3117. case 375: optsChatSizePlus25.ele().checked = true; break;
  3118. case 450: optsChatSizePlus50.ele().checked = true; break;
  3119. default: optsChatSizeNormal.ele().checked = true; break;
  3120. }
  3121.  
  3122. var optsChatFontNormal = SRDotDX.c('#SRDotDX_options_fontSizeNormal');
  3123. optsChatFontNormal.on('click', function () {
  3124. SRDotDX.gui.applyFontSize(0)
  3125. });
  3126. var optsChatFontSmaller = SRDotDX.c('#SRDotDX_options_fontSizeSmaller');
  3127. optsChatFontSmaller.on('click', function () {
  3128. SRDotDX.gui.applyFontSize(2)
  3129. });
  3130. var optsChatFontBigger = SRDotDX.c('#SRDotDX_options_chatSizeBigger');
  3131. optsChatFontBigger.on('click', function () {
  3132. SRDotDX.gui.applyFontSize(1)
  3133. });
  3134. switch (SRDotDX.config.fontNum) {
  3135. case 2: optsChatFontSmaller.ele().checked = true; break;
  3136. case 1: optsChatFontBigger.ele().checked = true; break;
  3137. default: optsChatFontNormal.ele().checked = true; break;
  3138. }
  3139.  
  3140. var optsChatHideScrollbar = SRDotDX.c('#SRDotDX_options_hideScrollbar');
  3141. optsChatHideScrollbar.ele().checked = SRDotDX.config.hideScrollBar;
  3142. optsChatHideScrollbar.on('click', function () {
  3143. SRDotDX.config.hideScrollBar = this.checked;
  3144. SRDotDX.config.save(false);
  3145. SRDotDX.gui.chatResize();
  3146. });
  3147.  
  3148. var optsHideKongForum = SRDotDX.c('#options_hideKongForum');
  3149. optsHideKongForum.ele().checked = SRDotDX.config.hideKongForum;
  3150. optsHideKongForum.on('click', function () {
  3151. SRDotDX.config.hideKongForum = this.checked;
  3152. 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)
  3153. });
  3154.  
  3155. var optsHideGameDetails = SRDotDX.c('#options_hideGameDetails');
  3156. optsHideGameDetails.ele().checked = SRDotDX.config.hideGameDetails;
  3157. optsHideGameDetails.on('click', function () {
  3158. SRDotDX.config.hideGameDetails = this.checked;
  3159. 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)
  3160. });
  3161.  
  3162. var optsHideGameTitle = SRDotDX.c('#options_hideGameTitle');
  3163. optsHideGameTitle.ele().checked = SRDotDX.config.hideGameTitle;
  3164. optsHideGameTitle.on('click', function () {
  3165. SRDotDX.config.hideGameTitle = this.checked
  3166. });
  3167.  
  3168. var optsTrueMsgCount = SRDotDX.c('#options_trueMsgCount');
  3169. optsTrueMsgCount.ele().checked = SRDotDX.config.kongMsg;
  3170. optsTrueMsgCount.on('click', function () {
  3171. SRDotDX.config.kongMsg = this.checked
  3172. });
  3173. if (SRDotDX.config.kongMsg) SRDotDX.gui.setMessagesCount();
  3174.  
  3175. var optsHideGameTab = SRDotDX.c('#options_hideGameTab');
  3176. optsHideGameTab.ele().checked = SRDotDX.config.hideGameTab;
  3177. optsHideGameTab.on('click', function () {
  3178. SRDotDX.config.hideGameTab = this.checked;
  3179. SRDotDX.gui.applyTabs()
  3180. });
  3181.  
  3182. var optsHideAccTab = SRDotDX.c('#options_hideAccTab');
  3183. optsHideAccTab.ele().checked = SRDotDX.config.hideAccTab;
  3184. optsHideAccTab.on('click', function () {
  3185. SRDotDX.config.hideAccTab = this.checked;
  3186. SRDotDX.gui.applyTabs()
  3187. });
  3188.  
  3189. var optsDotdxTabName = SRDotDX.c('#options_dotdxTabName');
  3190. optsDotdxTabName.ele().value = SRDotDX.config.dotdxTabName;
  3191. optsDotdxTabName.on('keyup', function () {
  3192. SRDotDX.config.dotdxTabName = this.value;
  3193. SRDotDX.gui.applyTabs()
  3194. });
  3195.  
  3196. var optsFormatChatLinks = SRDotDX.c('#options_formatChatLinks');
  3197. optsFormatChatLinks.ele().checked = SRDotDX.config.formatLinks;
  3198. optsFormatChatLinks.on('click', function(){SRDotDX.config.formatLinks = this.checked;});
  3199.  
  3200. var optsAllianceServer = SRDotDX.c('#options_allianceServer');
  3201. optsAllianceServer.ele().value = SRDotDX.config.allianceServer;
  3202. optsAllianceServer.on('keyup', function(){SRDotDX.config.allianceServer = this.value});
  3203.  
  3204. var optsAllianceName = SRDotDX.c('#options_allianceName');
  3205. optsAllianceName.ele().value = SRDotDX.config.allianceName;
  3206. optsAllianceName.on('keyup', function(){SRDotDX.config.allianceName = this.value; if(SRDotDX.alliance.isActive) document.getElementsByClassName('room_name_container')[0].children[0].innerHTML = this.value;});
  3207.  
  3208. var optsEnableAllianceChat = SRDotDX.c('#options_enableAllianceChat');
  3209. optsEnableAllianceChat.ele().checked = SRDotDX.config.allianceChat;
  3210. optsEnableAllianceChat.on('click', function(){
  3211. if (/^https?:\/\/.+?:\d{2,5}$/.test(SRDotDX.config.allianceServer)) {
  3212. SRDotDX.config.allianceChat = this.checked;
  3213. if (this.checked) SRDotDX.alliance.createRoom();
  3214. else SRDotDX.alliance.destroyChat();
  3215. }
  3216. else this.checked = false;
  3217. });
  3218.  
  3219. var optsClearRMB = SRDotDX.c('#options_clearRMB');
  3220. optsClearRMB.ele().checked = SRDotDX.config.clearRMB;
  3221. optsClearRMB.on('click', function (){SRDotDX.config.clearRMB = this.checked;});
  3222.  
  3223. var optsChatIgnHide = SRDotDX.c('#SRDotDX_options_ignHide');
  3224. optsChatIgnHide.on('click', function(){SRDotDX.config.ignMode = 0});
  3225. var optsChatIgnReplace = SRDotDX.c('#SRDotDX_options_ignReplace');
  3226. optsChatIgnReplace.on('click', function(){SRDotDX.config.ignMode = 1});
  3227. var optsChatIgnAttach = SRDotDX.c('#SRDotDX_options_ignAttach');
  3228. optsChatIgnAttach.on('click', function(){SRDotDX.config.ignMode = 2});
  3229. switch(SRDotDX.config.ignMode) {
  3230. case 0: optsChatIgnHide.ele().checked = true; break;
  3231. case 1: optsChatIgnReplace.ele().checked = true; break;
  3232. case 2: optsChatIgnAttach.ele().checked = true; break;
  3233. }
  3234.  
  3235. var optsChatThemeLightGrey = SRDotDX.c('#theme_lightGrey');
  3236. optsChatThemeLightGrey.on('click', function(){SRDotDX.gui.applyTheme(0)});
  3237. var optsChatThemeCrimsonBlack = SRDotDX.c('#theme_crimsonBlack');
  3238. optsChatThemeCrimsonBlack.on('click', function(){SRDotDX.gui.applyTheme(1)});
  3239. switch(SRDotDX.config.themeNum) {
  3240. case 1: optsChatThemeCrimsonBlack.ele().checked = true; break;
  3241. case 0: optsChatThemeLightGrey.ele().checked = true; break;
  3242. }
  3243.  
  3244. var optsWcLeft = SRDotDX.c('#options_wcLeft');
  3245. optsWcLeft.ele().checked = SRDotDX.config.leftWChat;
  3246. optsWcLeft.on('click', function(){
  3247. SRDotDX.config.leftWChat = this.checked;
  3248. SRDotDX.config.extSave();
  3249. });
  3250.  
  3251. var optsWcRemove = SRDotDX.c('#options_wcRemove');
  3252. optsWcRemove.ele().checked = SRDotDX.config.removeWChat;
  3253. optsWcRemove.on('click', function(){SRDotDX.gui.removeWC(this.checked)});
  3254.  
  3255. //Opts -> Sidebar Options
  3256. var optsSbEnable = SRDotDX.c('#options_sbEnable');
  3257. optsSbEnable.ele().checked = SRDotDX.config.sbEnable;
  3258. optsSbEnable.on('click', function () {
  3259. SRDotDX.config.sbEnable = this.checked;
  3260. SRDotDX.gui.applySidebarUI(this.checked ? 1 : -1);
  3261. SRDotDX.config.save(false)
  3262. });
  3263.  
  3264. var optsSbRightSide = SRDotDX.c('#options_sbRightSide');
  3265. optsSbRightSide.ele().checked = SRDotDX.config.sbRightSide;
  3266. optsSbRightSide.on('click', function () {
  3267. SRDotDX.config.sbRightSide = this.checked;
  3268. SRDotDX.gui.applySidebarUI(2);
  3269. SRDotDX.config.save(false)
  3270. });
  3271.  
  3272. //var optsCbDisable = SRDotDX.c('#options_cbDisable');
  3273. //optsCbDisable.ele().checked = SRDotDX.config.cbDisable;
  3274. //optsCbDisable.on('click', function(){ SRDotDX.config.cbDisable = this.checked; SRDotDX.config.save(false) });
  3275.  
  3276. var optsSlimSB = SRDotDX.c('#options_sbSlim');
  3277. optsSlimSB.ele().checked = SRDotDX.config.sbSlim;
  3278. optsSlimSB.on('click', function () {
  3279. SRDotDX.config.sbSlim = this.checked;
  3280. SRDotDX.config.save(false);
  3281. SRDotDX.gui.toggleSlimSB();
  3282. });
  3283.  
  3284. optsMarkMyRaidsVisited.ele().checked = SRDotDX.config.markMyRaidsVisted;
  3285. optsFormatLinkOutput.ele().checked = SRDotDX.config.formatLinkOutput;
  3286. optsMarkImportedVisited.ele().checked = SRDotDX.config.markImportedVisited;
  3287. optsWhisperTo.ele().value = SRDotDX.config.whisperTo;
  3288. optsConfirmDeletes.ele().checked = SRDotDX.config.confirmDeletes;
  3289. SRDotDX.c('#SRDotDX_colors_background').ele().value = SRDotDX.config.bckColor;
  3290. optsHideVRaids.ele().checked = SRDotDX.config.hideVisitedRaids;
  3291. optsHideBRaids.ele().checked = SRDotDX.config.hideBotLinks;
  3292. if (SRDotDX.config.hideRaidLinks) {
  3293. optsHideARaids.ele().checked = true;
  3294. optsHideVRaids.ele().disabled = true;
  3295. optsHideBRaids.ele().disabled = true;
  3296. }
  3297.  
  3298. optsConfirmDeletes.on('click', function(){SRDotDX.config.confirmDeletes = this.checked});
  3299. optsMarkImportedVisited.on("click", function(){SRDotDX.config.markImportedVisited = this.checked;});
  3300. optsWhisperTo.on("change", function () {
  3301. console.log("[SRDotDX] Whisper person changed to " + this.value);
  3302. SRDotDX.config.whisperTo = this.value;
  3303. });
  3304. SRDotDX.c('#SRDotDX_colors_background').on("change", function(){SRDotDX.config.bckColor = this.value;});
  3305. optsFormatLinkOutput.on("click", function(){SRDotDX.config.formatLinkOutput = this.checked;});
  3306. optsMarkMyRaidsVisited.on("click", function(){SRDotDX.config.markMyRaidsVisted = this.checked;});
  3307. optsHideARaids.on("click", function(){
  3308. document.getElementById('SRDotDX_options_hideVisitedRaids').disabled = this.checked;
  3309. document.getElementById('SRDotDX_options_hideSeenRaids').disabled = this.checked;
  3310. SRDotDX.config.hideRaidLinks = this.checked;
  3311. SRDotDX.c('#SRDotDX_raidClass').html('.DotDX_raid {display: ' + (this.checked ? 'none !important' : 'block') + '}', true);
  3312. }, true);
  3313. optsHideBRaids.on("click", function(){SRDotDX.gui.switchBot()}, true);
  3314. optsHideVRaids.on("click", function(){
  3315. SRDotDX.config.hideVisitedRaids = this.checked;
  3316. SRDotDX.c('#SRDotDX_visitedRaidClass').html('.SRDotDX_visitedRaid {display: ' + (this.checked ? 'none !important' : 'block') + '}', true);
  3317. }, true);
  3318.  
  3319. //CHAT TAB CLICK SCROLL (id=chat_tab, class=chat_message_window)
  3320. document.getElementById('chat_tab').addEventListener("click", function() {
  3321. document.getElementById('lots_tab_pane').style.display = 'none';
  3322. setTimeout(function(){
  3323. SRDotDX.gui.scrollChat();
  3324. SRDotDX.gui.selectRaidsToJoin();
  3325. }, 50);
  3326. }, true);
  3327.  
  3328. //RAIDS TAB CLICK EVENT LISTENER
  3329. document.getElementById('lots_tab').addEventListener("click", function() {
  3330. setTimeout(SRDotDX.gui.selectRaidsToJoin, 50)
  3331. }, true);
  3332.  
  3333. //FriendShare
  3334. SRDotDX.gui.refreshFriends();
  3335.  
  3336. // Filtering tab
  3337. SRDotDX.gui.createFilterTab();
  3338.  
  3339. var filterChatCb = SRDotDX.c('#SRDotDX_options_perRaidFilterLinks');
  3340. filterChatCb.on("click", function () {
  3341. SRDotDX.config.filterChatLinks = this.checked;
  3342. SRDotDX.gui.toggleFiltering();
  3343. }, true).ele().checked = SRDotDX.config.filterChatLinks;
  3344.  
  3345. var filterListCb = SRDotDX.c('#SRDotDX_options_perRaidFilterRaidList');
  3346. filterListCb.on("click", function () {
  3347. SRDotDX.config.filterRaidList = this.checked;
  3348. SRDotDX.gui.toggleFiltering();
  3349. }, true).ele().checked = SRDotDX.config.filterRaidList;
  3350.  
  3351. 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');
  3352. 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');
  3353.  
  3354. //Chat buttons overlay div
  3355. var hd = document.getElementById('chat_window_header').getElementsByClassName('room_name_container')[0].innerHTML;
  3356. 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>';
  3357. setTimeout(SRDotDX.gui.BeginDeletingExpiredUnvisitedRaids, 10000);
  3358. //SRDotDX.util.updateUser(true);
  3359. window.userInt = setInterval(function(){
  3360. if(typeof active_user == 'object' && active_user.username().toLowerCase() != 'guest') {
  3361. SRDotDX.config.kongUser = active_user.username();
  3362. SRDotDX.config.kongId = active_user.id();
  3363. SRDotDX.config.kongAuth = active_user.gameAuthToken();
  3364. console.log("[DotDX] Initialized user: " + SRDotDX.config.kongUser + " | " + SRDotDX.config.kongId);
  3365. clearInterval(window.userInt);
  3366. }
  3367. else console.log("[DotDX] User init failed... trying again");
  3368. },3000);
  3369. window.guildInt = setInterval(function(){
  3370. if( typeof holodeck === 'object' &&
  3371. typeof holodeck._chat_window === 'object' &&
  3372. typeof holodeck._chat_window._rooms_by_type === 'object' &&
  3373. typeof holodeck._chat_window._rooms_by_type.guild === 'object' &&
  3374. typeof holodeck._chat_window._rooms_by_type.guild._users_list === 'object') {
  3375. clearInterval(window.guildInt);
  3376. SRDotDX.util.createGuildReload();
  3377. SRDotDX.util.getUserList();
  3378. if (SRDotDX.config.allianceChat) SRDotDX.alliance.createRoom();
  3379. if (typeof Array.observe === 'function') Array.observe(holodeck._chat_window._rooms_by_type.guild._users_list, SRDotDX.util.userListChanged);
  3380. else setInterval(SRDotDX.util.getUserList, 600000);
  3381. }
  3382. else console.log("[DotDX] Guild roster not processed... trying again");
  3383. },10000);
  3384.  
  3385. console.log('[DotDX] DotDeXtension loading complete');
  3386. SRDotDX.gui.doStatusOutput('Loaded successfully', 2000, false);
  3387. setTimeout(function(){delete SRDotDX.gui.load; delete SRDotDX.load},1000);
  3388. setTimeout(SRDotDX.config.save, 2000);
  3389.  
  3390. //SRDotDX.c('#shim').del();
  3391. }
  3392. else {
  3393. setTimeout(SRDotDX.gui.load, 500)
  3394. }
  3395. },
  3396. fsEleClick: function (e) {
  3397. e = e || window.event;
  3398. var el = e.target.id.split(':');
  3399. if (el[0] == 'fs') {
  3400. SRDotDX.config.friendUsers[el[1]][el[2]] = e.target.checked;
  3401. }
  3402. },
  3403. FPXraidLinkClick: function(id) {
  3404. if (!SRDotDX.gui.joining) SRDotDX.request.joinRaid(SRDotDX.config.raidList[id]);
  3405. else SRDotDX.gui.joinRaidList.push(SRDotDX.config.raidList[id]);
  3406. },
  3407. FPXLandButtonHandler: function (ele, name) {
  3408. var x = name.charAt(name.length - 1), sign = 1;
  3409. if (name.charAt(3) != 'p')sign = -1;
  3410. document.FPXLandForm.elements["tf_" + x].value = parseInt(document.FPXLandForm.elements["tf_" + x].value, 10) + (10 * sign);
  3411. SRDotDX.gui.FPXLandUpdater();
  3412. },
  3413. FPXLandUpdater: function () {
  3414. var owned = [0, 0, 0, 0, 0, 0, 0, 0, 0], els = document.FPXLandForm, i = 9;
  3415. while (i--) owned[i] = parseInt(els.elements['tf_' + (i + 1)].value, 10);
  3416. var ratio = FPX.LandCostRatio(owned), best = 0, cn;
  3417. i = 9;
  3418. while (i--) {
  3419. cn = document.getElementById('b_' + (i + 1)).className;
  3420. if (cn.indexOf('landpmbutton ') == -1) document.getElementById('b_' + (i + 1)).className = cn.replace('landpmbuttonhigh', 'landpmbutton');
  3421. //document.getElementById('b_'+(i+1)).prevClassName = 'landpmbutton';
  3422. if (ratio[i] > ratio[best]) best = i;
  3423. }
  3424. cn = document.getElementById('b_' + (best + 1)).className;
  3425. document.getElementById('b_' + (best + 1)).className = cn.replace('landpmbutton', 'landpmbuttonhigh');
  3426. },
  3427. FPXLandButtonSave: function () {
  3428. var els = document.FPXLandForm, i = 9;
  3429. while (i--) SRDotDX.config.FPXLandOwnedCount[i] = els.elements['tf_' + (i + 1)].value;
  3430. SRDotDX.config.save(false);
  3431. SRDotDX.gui.doStatusOutput('Land count saved!');
  3432. },
  3433. FPXraidListMouseDown: function (e) {
  3434. e.preventDefault();
  3435. e.stopPropagation();
  3436. var classtype = e.target.className;
  3437. e = e || window.event;
  3438. if (e.which == 1) {
  3439. switch (classtype) {
  3440. case 'dotdxRaidListDelete':
  3441. SRDotDX.gui.deleteRaid(e.target.parentNode);
  3442. break;
  3443. case 'DotDX_RaidLink':
  3444. SRDotDX.gui.FPXraidLinkClick(e.target.parentNode.getAttribute("raidid"));
  3445. break;
  3446. }
  3447. }
  3448. },
  3449. chatWindowContextMenu: function (e) {
  3450. e = e || window.event;
  3451. var clickedClass = e.target.className.split(" "), nick = "";
  3452. console.log('[DotDX] Chat window menu [' + e.target.className + ']');
  3453. if (clickedClass[0] === 'username' && clickedClass[1] === 'chat_message_window_username') {
  3454. nick = e.target.getAttribute('dotdxname');
  3455. var frTxt = SRDotDX.config.friendUsers[nick]?'unFriend':'Friend';
  3456. var uMenu = document.getElementById(clickedClass[clickedClass.length - 1]);
  3457. if(uMenu !== null) {
  3458. 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>';
  3459. uMenu.style.maxWidth = "220px";
  3460. }
  3461. e.preventDefault();
  3462. e.stopPropagation();
  3463. }
  3464. else if(clickedClass[0] === 'chat_input' && SRDotDX.config.clearRMB) {
  3465. e.target.value = '';
  3466. e.preventDefault();
  3467. e.stopPropagation();
  3468. }
  3469. return false;
  3470. },
  3471. chatWindowMouseDown: function (e) {
  3472. e = e || window.event;
  3473. var clickedClass = e.target.className.split(" "), nick = "";
  3474. //console.log('[DotDX] Chat window (' + e.which + ') [' + e.target.className + ']');
  3475. if(e.which === 1) {
  3476. switch(clickedClass[0]) {
  3477. case 'username':
  3478. if(clickedClass[1] === 'chat_message_window_username')
  3479. {
  3480. e.preventDefault();
  3481. e.stopPropagation();
  3482. nick = e.target.getAttribute('dotdxname');
  3483. console.log("[DotDX] Whisp to user with nick [" + nick + "]");
  3484. if (SRDotDX.alliance.isActive) {
  3485. var txt = document.getElementById('alliance_input');
  3486. txt.value = '/w ' + nick + ' ';
  3487. txt.focus();
  3488. }
  3489. else holodeck.chatWindow().insertPrivateMessagePrefixFor(nick);
  3490. }
  3491. break;
  3492. case 'chatRaidLink':
  3493. e.preventDefault();
  3494. e.stopPropagation();
  3495. var raid = clickedClass[1].split("|");
  3496. var rObj = {id: raid[0], hash: raid[1], boss: raid[2], diff: raid[3], sid: raid[4]};
  3497. if (!SRDotDX.gui.joining) SRDotDX.request.joinRaid(rObj);
  3498. else SRDotDX.gui.joinRaidList.push(rObj);
  3499. break;
  3500. case 'user':
  3501. e.preventDefault();
  3502. e.stopPropagation();
  3503. var classTokens = clickedClass[1].split("_");
  3504. switch (classTokens[1]) {
  3505. case 'slap':
  3506. var num = Math.round((Math.random() * (SRDotDX.slapSentences.length - 1)));
  3507. SRDotDX.gui.sendChatMsg('*' + SRDotDX.slapSentences[num].replace(/<nick>/g, classTokens[2]) + '*');
  3508. break;
  3509. case 'mute':
  3510. SRDotDX.config.mutedUsers[classTokens[2]] = true;
  3511. SRDotDX.config.save(false);
  3512. break;
  3513. case 'friend':
  3514. if (typeof SRDotDX.config.friendUsers[classTokens[2]] == 'object') delete SRDotDX.config.friendUsers[classTokens[2]];
  3515. else SRDotDX.config.friendUsers[classTokens[2]] = [false, false, false, false, true];
  3516. SRDotDX.config.save(false);
  3517. SRDotDX.gui.refreshFriends();
  3518. break;
  3519. case 'name':
  3520. holodeck.showMiniProfile(classTokens[2]);
  3521. break;
  3522. }
  3523. e.target.parentNode.style.maxWidth = "0";
  3524. break;
  3525. default:
  3526. //console.log('[DotDX] Chat window (' + e.which + ') Tag [' + e.target.tagName + ']');
  3527. if (e.target.tagName === 'IMG') {
  3528. var imgSrc = e.target.getAttribute('src');
  3529. if (/^https?:\/\/.+?\.(png|gif|jpe?g)$/.test(imgSrc)){
  3530. console.log("[DotDX] Open new tab with image: " + imgSrc);
  3531. window.open(imgSrc);
  3532. }
  3533. }
  3534. }
  3535. return false;
  3536. }
  3537. },
  3538. raidListItemUpdate: function (id) {
  3539. var ele = document.getElementById('DotDX_' + id);
  3540. var r = SRDotDX.config.raidList[id];
  3541. if(ele !== null && typeof r === 'object') ele.children[2].innerHTML = (r.visited ? '&#9733;' : '');
  3542. },
  3543. raidListItemRemoveById: function (id) {
  3544. var ele = document.getElementById('DotDX_' + id);
  3545. if(ele !== null) ele.parentNode.removeChild(ele);
  3546. },
  3547. toggleCSS: function (p) {
  3548. if (p) {
  3549. var ele = document.getElementById(p.id);
  3550. if(ele !== null) {
  3551. document.head.removeChild(ele);
  3552. SRDotDX.c("style").set({ type: "text/css", id: p.id }).text(p.cls).attach("to", document.head);
  3553. }
  3554. }
  3555. },
  3556. toggleRaid: function (type, id, tog) {
  3557. var d = document.getElementsByClassName("DotDX_raidId_" + id);
  3558. if (typeof SRDotDX.config.raidList[id] === 'object') {
  3559. var raid = SRDotDX.config.raidList[id];
  3560. raid = SRDotDX.getRaidDetails("&kv_difficulty=" + raid.diff + "&kv_hash=" + raid.hash + "&kv_raid_boss=" + raid.boss + "&kv_raid_id=" + raid.id);
  3561. }
  3562. for(var i = 0, il = d.length; i < il; ++i) {
  3563. if (tog && d[i].className.indexOf('DotDX_' + type + 'Raid') < 0) d[i].className += ' DotDX_' + type + 'Raid';
  3564. else if (!tog && d[i].className.indexOf('DotDX_' + type + 'Raid') >= 0) d[i].className = d[i].className.replace(new RegExp('DotDX_' + type + 'Raid( |$)', 'i'), '');
  3565. if (typeof raid === 'object') d[i].getElementsByTagName('a')[0].innerHTML = raid.linkText();
  3566. }
  3567. }
  3568. },
  3569. searchPatterns: {
  3570. z1: ['kobold', 'scorp', 'ogre'],
  3571. z2: ['rhino', 'alice', 'lurker'],
  3572. z3: ['4ogre', 'squid', 'batman', 'drag', 'tainted'],
  3573. z4: ['bmane', '3dawg', 'hydra', 'sircai', 'tyranthius'],
  3574. z5: ['ironclad', 'zombiehorde', 'stein', 'bogstench', 'nalagarst'],
  3575. z6: ['gunnar', 'nidhogg', 'kang', 'ulfrik', 'kalaxia'],
  3576. z7: ['maraak', 'erakka_sak', 'wexxa', 'guilbert', 'bellarius'],
  3577. z8: ['hargamesh', 'grimsly', 'rift', 'sisters', 'mardachus'],
  3578. z9: ['mesyra', 'nimrod', 'phaedra', 'tenebra', 'valanazes'],
  3579. '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'],
  3580. 'z9.5': ['pumpkin', 'jacksrevenge1'],
  3581. 'z9.7': ['hellemental', 'shadow'],
  3582. z10: ['krugnug', 'tomb_gargoyle', 'leonine_watcher', 'centurion_marius', 'caracalla'],
  3583. z14: ['zugen', 'gulkinari', 'verkiteia', 'cannibal_barbarians'],
  3584. z15: ['korxun', 'xerkara', 'shaar', 'nereidon', 'drulcharus'],
  3585. z16: ['bad_blood','way_warden','draconic_dreams','doppelganger'],
  3586. farm: ['maraak', 'erakka_sak', 'wexxa', 'guilbert', 'bellarius', 'drag', 'tainted', 'ogre', 'scorp', 'baroness'],
  3587. 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'],
  3588. tower: ['thaltherda', 'hurkus', 'malleus', 'yydians_sanctuary', 'clockwork_dragon', 'krxunara', 'karkata', 'corrupted_wilds', 'marble_colossus', 'elite_butcher', 'elite_killers'],
  3589. 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'],
  3590. 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'],
  3591. 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'],
  3592. 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'],
  3593. 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'],
  3594. gigantic: ['imryx', 'trekex', 'gataalli_huxac', 'kessov_fort', 'corrupted_wilds','draconic_dreams','horthania_stam','jormungan_the_sea_storm_stam', 'euryino'],
  3595. glyph: ['maraak', 'erakka_sak', 'wexxa', 'guilbert', 'bellarius'],
  3596. goblin: ['master_ninja_bakku', 'green_killers', 'elite_killers'],
  3597. citadel: ['thaltherda', 'hurkus', 'malleus', 'yydians_sanctuary', 'clockwork_dragon', 'krxunara', 'karkata', 'corrupted_wilds', 'marble_colossus', 'elite_butcher', 'elite_killers'],
  3598. festival: ['vortex_abomination', 'drunken_ragunt', 'mestr_rekkr_rematch', 'valley_of_death', 'green_killers', 'murgrux_the_mangler', 'euryino'],
  3599. aquatic: ['dirthax', 'frogmen_assassins', 'lurker', 'nidhogg', 'crabshark', 'squid', 'thaltherda', 'nereidon', 'krxunara', 'trekex', 'paracoprion', 'bog_bodies','karkata','jormungan_the_sea_storm_stam', 'euryino'],
  3600. beastman: ['bmane', 'burbata', 'frogmen_assassins', 'batman', 'war_boar', 'hargamesh', 'hurkus', 'krugnug', 'malleus', 'scorp', 'ruzzik', 'squid', 'korxun', 'shaar', 'nereidon', 'drulcharus', 'trekex'],
  3601. beasts: ['lurker', 'rhino', '3dawg', 'nidhogg', 'hydra', 'kang', 'wexxa', 'karkata', 'nrlux', 'spider', 'basilisk', 'chimera', 'doomglare', 'roc', 'crabshark', 'dirthax', 'nrlux', 'paracoprion', 'corrupted_wilds'],
  3602. bludheim: ['gunnar', 'nidhogg', 'kang', 'ulfrik', 'kalaxia'],
  3603. colosseum: ['gladiators', 'serpina', 'crabshark', 'tisiphone', 'chimera', 'green_killers', 'marble_colossus','blood_dancer'],
  3604. construct: ['cedric', 'erakka_sak', 'giantgolem', 'leonine_watcher', 'tomb_gargoyle', 'stein', 'yydians_sanctuary', 'clockwork_dragon', 'clockwork_giant', 'thratus_abomination', 'marble_colossus'],
  3605. demon: ['apoc_demon', '3dawg', 'tyranthius', 'lunacy', 'salome', 'sircai', 'blobmonster', 'malchar', 'zralkthalat', 'krxunara', 'adrastos', 'hellemental','valtrias'],
  3606. 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'],
  3607. giant: ['gigantomachy', 'gataalli_huxac', 'kanehuar_yachu','clockwork_giant','aberrant_strength_serum'],
  3608. 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'],
  3609. 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'],
  3610. 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'],
  3611. nmqueen: ['elite_butcher', 'elite_killers'],
  3612. ogre: ['ogre', '4ogre', 'felendis', 'zugen', 'korxun', 'drunken_ragunt', 'valley_of_death', 'murgrux_the_mangler', 'elite_butcher'],
  3613. orc: ['darhednal', 'rudaru_the_axe_master', 'green_killers','elite_killers'],
  3614. plant: ['vineborn_behemoth', 'badland_ambusher'],
  3615. oddish: ['vineborn_behemoth', 'badland_ambusher'],
  3616. qwiladrian: ['gulkinari', 'teremarthu', 'vortex_abomination'],
  3617. ryndor: ['bmane', '3dawg', 'hydra', 'sircai', 'tyranthius'],
  3618. siege: ['echidna', 'ulfrik', 'yydians_sanctuary', 'drunken_ragunt', 'kessov_fort'],
  3619. terror: ['euryino'],
  3620. undead: ['agony', 'bogstench', 'serpina', 'ironclad', 'malleus', 'nalagarst', 'stein', 'siculus', 'zombiehorde', 'caracalla', 'centurion_marius', 'ghostly_alchemist'],
  3621. underground: ['maraak', 'erakka_sak', 'wexxa', 'guilbert', 'bellarius', 'spider', 'tomb_gargoyle', 'leonine_watcher', 'centurion_marius', 'caracalla', 'dragons_lair', 'kang', '3dawg', 'lurker', 'salome', 'stein', 'imryx']
  3622. },
  3623. raids: {
  3624. 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']},
  3625. 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']},
  3626. 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]},
  3627. 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']},
  3628. 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]},
  3629. 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]},
  3630. 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]},
  3631. 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: ['u','u','u','u']},
  3632. 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]},
  3633. 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]},
  3634. 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']},
  3635. 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]},
  3636. 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]},
  3637. 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']},
  3638. 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]},
  3639. 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']},
  3640. bogstench: {name: 'Bogstench', shortname: 'Bogstench', id: 'bogstench', type: 'Undead', stat: 'S', size: 250, nd: 5, duration: 96, health: [450000000, 562500000, 720000000, 900000000, 0, 0]},
  3641. '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]},
  3642. 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]},
  3643. 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']},
  3644. 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']},
  3645. 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']},
  3646. 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']},
  3647. harpy: {name: 'Celeano', shortname: 'Celeano', id: 'harpy', type: '', stat: 'H', size: 10, nd: 2, duration: 120, health: [3000000, 3750000, 4800000, 6000000, 0, 0]},
  3648. 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']},
  3649. kobold: {name: 'Chieftain Horgrak', shortname: 'Horgrak', id: 'kobold', type: '', stat: 'S', size: 10, nd: 2, duration: 168, health: [150000, 187500, 240000, 300000, 0, 0]},
  3650. 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']},
  3651. 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']},
  3652. 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']},
  3653. 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']},
  3654. 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]},
  3655. 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']},
  3656. basilisk: {name: 'Deathglare', shortname: 'Deathglare', id: 'basilisk', type: 'Beast', stat: 'H', size: 50, nd: 3, duration: 144, health: [45000000, 56250000, 72000000, 90000000, 0, 0]},
  3657. 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]},
  3658. 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']},
  3659. 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']},
  3660. 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']},
  3661. 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']},
  3662. 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']},
  3663. 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']},
  3664. 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']},
  3665. 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']},
  3666. elite_butcher: {name: 'Elite Butcher', shortname: 'Butcher', id: 'elite_butcher', type: 'Ogre, Nightmare Queen', stat: 'S', size:20, nd:2, duration:12, health: [500000000000,500000000000,500000000000,500000000000,0,0], lt: ['u','u','u','u']},
  3667. elite_killers: {name: 'Elite Killers', shortname: 'Killers', id: 'elite_killers', type: 'Goblin, Orc, Nightmare Queen', stat: 'S', size:50, nd:2, duration:18, health: [1500000000000,1500000000000,1500000000000,1500000000000,0,0], lt: ['u','u','u','u']},
  3668. 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']},
  3669. 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]},
  3670. giantgolem: {name: 'Euphronios', shortname: 'Euphronios', id: 'giantgolem', type: 'Construct', stat: 'H', size: 101, nd: 5, duration: 168, health: [450000000, 562500000, 720000000, 900000000, 0, 0]},
  3671. 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']},
  3672. echthros: {name: 'Echthros', shortname: 'Echty', id: 'echthros', type: '', stat: 'ESH', size: 90000, nd: 2, duration: 96, health: ['Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited']},
  3673. 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]},
  3674. 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']},
  3675. 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']},
  3676. 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]},
  3677. 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']},
  3678. 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]},
  3679. 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']},
  3680. 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']},
  3681. 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]},
  3682. 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']},
  3683. 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]},
  3684. 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']},
  3685. evilgnome: {name: 'Groblar Deathcap', shortname: 'Groblar', id: 'evilgnome', type: '', stat: 'H', size: 10, nd: 2, duration: 120, health: [6000000, 7500000, 9600000, 12000000, 0, 0]},
  3686. grundus: {name: 'Grundus', shortname: 'Grundus', id: 'grundus', type: 'Dragon, Magical Creature', stat: 'H', size: 101, nd: 5, duration: 72, health: [800000000, 1600000000, 4000000000, 12000000000]},
  3687. 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]},
  3688. 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']},
  3689. 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]},
  3690. 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]},
  3691. 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]},
  3692. 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]},
  3693. 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']},
  3694. 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']},
  3695. 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']},
  3696. 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]},
  3697. 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']},
  3698. 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
  3699. 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']},
  3700. 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']},
  3701. jormungan_the_sea_storm_stam: {name: 'Jormungan the Sea-Storm', shortname: 'Jormungan', id: 'jormungan_the_sea_storm_stam', type: 'Dragon, Aquatic', stat: 'S', size:800, nd:6, duration:128, health: [750000000000,1500000000000,2250000000000,3000000000000,0,0], lt: ['jorm','jorm','jorm','jorm']},
  3702. 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]},
  3703. '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]},
  3704. 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']},
  3705. 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']},
  3706. 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']},
  3707. 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']},
  3708. 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']},
  3709. 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]},
  3710. 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']},
  3711. 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']},
  3712. 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']},
  3713. 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']},
  3714. krykagrius: {name: 'Krykagrius', shortname: 'Krykagrius', id: 'krykagrius', type: 'Dragon', stat: 'ESH', size: 90000, nd: 0, duration: 72, health: ['Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited', 'Unlimited']},
  3715. 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']},
  3716. 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']},
  3717. 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]},
  3718. 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]},
  3719. 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]},
  3720. 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']},
  3721. 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]},
  3722. 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']},
  3723. 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]},
  3724. 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']},
  3725. scorp: {name: 'Mazalu', shortname: 'Mazalu', id: 'scorp', type: 'Beastman', stat: 'S', size: 50, nd: 3, duration: 168, health: [5000000, 6250000, 8000000, 10000000, 0, 0]},
  3726. 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']},
  3727. 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]},
  3728. 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']},
  3729. 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]},
  3730. 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']},
  3731. 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]},
  3732. 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]},
  3733. 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']},
  3734. 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']},
  3735. 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]},
  3736. 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]},
  3737. roc: {name: 'Ragetalon', shortname: 'Ragetalon', id: 'roc', type: 'Beast', stat: 'H', size: 100, nd: 4, duration: 168, health: [110000000, 137500000, 176000000, 220000000, 0, 0]},
  3738. 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']},
  3739. 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]},
  3740. 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']},
  3741. 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]},
  3742. 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']},
  3743. 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']},
  3744. 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']},
  3745. 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]},
  3746. 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]},
  3747. 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']},
  3748. 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']},
  3749. 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]},
  3750. 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]},
  3751. 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]},
  3752. 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]},
  3753. 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']},
  3754. 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]},
  3755. 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]},
  3756. 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']},
  3757. 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']},
  3758. 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']},
  3759. 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']},
  3760. 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]},
  3761. gorgon: {name: 'Tithrasia', shortname: 'Tithrasia', id: 'gorgon', type: '', stat: 'H', size: 10, nd: 2, duration: 120, health: [18000000, 22500000, 28800000, 36000000, 0, 0]},
  3762. 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']},
  3763. 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']},
  3764. 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]},
  3765. 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]},
  3766. 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']},
  3767. 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']},
  3768. blobmonster: {name: 'Varlachleth', shortname: 'Varlachleth', id: 'blobmonster', type: 'Demon', stat: 'H', size: 100, nd: 4, duration: 168, health: [330000000, 412500000, 528000000, 660000000, 0, 0]},
  3769. 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']},
  3770. 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']},
  3771. 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']},
  3772. 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']},
  3773. 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']},
  3774. 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]},
  3775. 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']},
  3776. 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']},
  3777. 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']},
  3778. 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']},
  3779. 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']},
  3780. 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']},
  3781. 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']},
  3782. 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']},
  3783. 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]},
  3784. 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']}
  3785. },
  3786.  
  3787. raidSizes: {
  3788. 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'] },
  3789. 13: { name: 'Small' },
  3790. 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'] },
  3791. 20: { name: 'Small' },
  3792. 25: { name: 'Small' },
  3793. 30: { name: 'Small' },
  3794. 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'] },
  3795. 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'] },
  3796. 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'] },
  3797. 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'] },
  3798. 500: { name: 'Colossal', ratios: [0.45, 0, 0.65, 1.25, 2.5, 9.0], enames: ['1E6T', '1E8T', '2E', '2/3E', '3E', '3/4E'] },
  3799. 800: { name: 'Gigantic' },
  3800. 90000: { name: 'World' }
  3801. },
  3802.  
  3803. lootTiers: {
  3804. u: { tiers: ['Not yet known'], epics: [0], best: 0},
  3805. eio: { tiers: ['Similar to Jorm'], epics: [0], best: 0},
  3806. 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,40000,50000], 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,0,230], best: 8, e: false},
  3807. pot: { tiers: [50,100,200,300,400,500,750,1000], epics: [1,5,7,10,13,15,17,20], best: 2, e: true },
  3808. 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 },
  3809. 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},
  3810. 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},
  3811. 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},
  3812. 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},
  3813. 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 },
  3814. 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},
  3815. 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},
  3816. 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},
  3817. 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},
  3818. 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 },
  3819. 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 },
  3820. 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 },
  3821. 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},
  3822. 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},
  3823. 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 },
  3824. 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 },
  3825. 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 },
  3826. 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},
  3827. 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},
  3828. 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},
  3829. rud: { tiers: [300,500,750,1000,1500], epics: [13,15,17,25,32], best: 1, e: false},
  3830. 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},
  3831. 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},
  3832. 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},
  3833. 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},
  3834. 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},
  3835. 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},
  3836. 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},
  3837. 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},
  3838. 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 },
  3839. 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},
  3840. 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},
  3841. 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},
  3842. 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},
  3843. 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},
  3844. 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},
  3845. 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},
  3846. 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 },
  3847. 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 },
  3848. 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},
  3849. 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 },
  3850. 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},
  3851. 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},
  3852. 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 },
  3853. 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 },
  3854. 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 },
  3855. 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 },
  3856. 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 },
  3857. 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 },
  3858. 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 },
  3859. 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 },
  3860. 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 },
  3861. 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 },
  3862. 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},
  3863. 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},
  3864. 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},
  3865. 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},
  3866. hjr: { tiers: [30,150,180,360,750,1500], epics: [8,12,16,27,36,72], best: 0, e: true},
  3867. njr: { tiers: [20,100,120,240,500,1000], epics: [8,12,16,27,36,72], best: 0, e: true},
  3868. ljr: { tiers: [40,200,240,480,1000,2000], epics: [8,12,16,27,36,72], best: 0, e: true},
  3869. nmjr: { tiers: [60,300,360,720,1500,3000], epics: [8,12,16,27,36,72], best: 0, e: true},
  3870. 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},
  3871. nessy: { tiers: [120,180,225,240,300,500,750,1000], epics: [9,10,11,12,13,14,17,20], best: 1, e: true},
  3872. hurk: { tiers: [90,135,150,180,225,300,550,900], epics: [3,7,10,12,15,19,26,30], best: 2, e: true},
  3873. 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},
  3874. 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},
  3875. 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},
  3876. 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},
  3877. 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},
  3878. 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},
  3879. 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},
  3880. 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},
  3881. 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},
  3882. 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},
  3883. 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},
  3884. 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},
  3885. 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},
  3886. sic: { tiers: [400,500,600,700,800,900,1000,2000], epics: [10,11,12,13,14,15,16,32], best: 0, e: true},
  3887. 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},
  3888. 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 },
  3889. 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 }
  3890. },
  3891. camps: {
  3892. bob: {name: 'Bastion of Blood', time: [120, 96], prefixes: 'Regenerating, Morphling, Vengeful, Chilling', numNodes: 6, nodes: ['bmp', 'gor', 'chi', 'zh', 'sic', 'bob'],
  3893. 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'],
  3894. 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]],
  3895. 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]},
  3896. 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]},
  3897. 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]},
  3898. 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]},
  3899. 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]},
  3900. 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]}},
  3901. mam: {name: 'Monsters and Magma', time: [120, 96], prefixes: 'Regenerating, Vengeful, Chilling, Curse', numNodes: 7, nodes: ['wlp', 'tos', 'gol', 'ele', 'gmh', 'wrm', 'imx'],
  3902. 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'],
  3903. 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]],
  3904. 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]},
  3905. 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]},
  3906. 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]},
  3907. 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]},
  3908. 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]},
  3909. 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]},
  3910. 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]}},
  3911. gd: {name: 'The Grey Death', time: [120, 96], prefixes: 'Regenerating, Vengeful, Chilling, Curse', numNodes: 6, nodes: ['crk', 'zrn', 'nun', 'tms', 'crn', 'hrt'],
  3912. 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'],
  3913. 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]],
  3914. 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]},
  3915. 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]},
  3916. 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]},
  3917. 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]},
  3918. 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]},
  3919. 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]}},
  3920. goc: {name: 'Giants of Chalua', time: [120, 96], prefixes: 'Regenerating, Vengeful, Chilling, Curse', numNodes: 6, nodes: ['mwm', 'bl', 'gh', 'fgs', 'gc', 'ha'],
  3921. 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'],
  3922. 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]],
  3923. 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]},
  3924. 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]},
  3925. 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]},
  3926. 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]},
  3927. 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]},
  3928. 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]}},
  3929. 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'],
  3930. 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'],
  3931. 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]],
  3932. 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]},
  3933. 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]},
  3934. 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]},
  3935. 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]},
  3936. 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]},
  3937. 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]}}
  3938. },
  3939. 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'},
  3940. //raidArray: [],
  3941. slapSentences: [
  3942. 'slaps <nick> in the face with a rotten old fish',
  3943. 'slaps <nick> around with a glove',
  3944. 'slaps <nick> around with an armoured glove',
  3945. 'hacks into <nick>\'s computer and slaps <nick> up side the head with a rubber chicken',
  3946. 'slaps <nick> around a bit with a wet noddle',
  3947. 'slaps <nick> about the head and shoulders with a rubber chicken',
  3948. 'slaps <nick>\'s face so hard, <nick> has to walk backwards from now on',
  3949. 'slaps some sense into <nick> with a red brick',
  3950. 'slaps <nick> with a herring',
  3951. 'slaps <nick> with a fire hose',
  3952. 'slaps <nick> with a huge law suit',
  3953. 'slaps <nick> with a great big, wet, 100% rubber duck',
  3954. 'slaps <nick> with a large dildo'
  3955. ],
  3956. reload: function () { SRDotDX.util.extEcho('Reloading, please wait...'); activateGame(); },
  3957. gframe: function(msg) { if(typeof document.getElementById('gameiframe') === 'object' && typeof document.getElementById('gameiframe').contentWindow === 'object') document.getElementById('gameiframe').contentWindow.postMessage(msg, '*'); },
  3958. fails: 0,
  3959. load: function () {
  3960. if (typeof holodeck === 'object' && holodeck.ready &&
  3961. typeof ChatDialogue === 'function' &&
  3962. typeof activateGame === 'function' &&
  3963. typeof Element === 'function' &&
  3964. typeof Element.Methods === 'object' &&
  3965. typeof ChatRoom === 'function') {
  3966. ChatDialogue.prototype.sendInput = function () {
  3967. //workaround for broken raid links - fixing on the fly
  3968. var b = this._input_node.value.replace(/kv_&/ig, "&kv_");
  3969. var a = b.match(/(?:.|\n){1,240}(\b|$)/g);
  3970. if(a !== null) {
  3971. var al = a.length - 1, i;
  3972. if (al < 1 || this._input_node.value.charAt(0) == '/') this._holodeck.processChatCommand(a[0]) && this._holodeck.filterOutgoingMessage(a[0], this._onInputFunction);
  3973. else {
  3974. var msg, tout = 50;
  3975. for(i = 0; i <= al; i++) {
  3976. msg = (i == 0 ? '' : '... ') + a[i] + (i == al ? '' : '...');
  3977. (function (a, b) {
  3978. return SRDotDX.gui.FPXTimerArray[i] = setTimeout(function(){b._holodeck.filterOutgoingMessage(a,b._onInputFunction)},tout);
  3979. })(msg, holodeck._active_dialogue);
  3980. tout += 500;
  3981. }
  3982. }
  3983. }
  3984. this._input_node.value = "";
  3985. };
  3986. ChatDialogue.prototype.SRDotDX_emote = function (msg) {
  3987. var user = holodeck._active_user.chatUsername();
  3988. this.displayUnsanitizedMessage(user, '**' + user + ' ' + msg + '**', {class: 'emote'}, {});
  3989. };
  3990. ChatDialogue.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>');
  3991.  
  3992. Holodeck.prototype.addDotdChatCommand = function (a, b) {
  3993. a = a.split(',');
  3994. for (var i = 0; i < a.length; i++) {
  3995. this._chat_commands[a[i]] || (this._chat_commands[a[i]] = []);
  3996. this._chat_commands[a[i]].push(b)
  3997. }
  3998. };
  3999. ChatDialogue.prototype.displayUnsanitizedMessage = function (usr, msg, cls, pfx) {
  4000. cls || (cls = {});
  4001. pfx || (pfx = {});
  4002. var active_room, allow_mutes = (active_room = this._holodeck.chatWindow().activeRoom()) && !active_room.canUserModerate(active_room.self()) || pfx.whisper;
  4003. if (!allow_mutes || !this._user_manager.isMuted(usr)) {
  4004. var e = !pfx.non_user ? "chat_message_window_username" : "chat_message_window_undecorated_username";
  4005. var f = usr == this._user_manager.username(), h = [], rm = '';
  4006. var curTs = new Date().getTime().toString();
  4007. var kongUsr = usr;
  4008. if (msg.charAt(0) == '[' && (msg.charAt(2) == '|' || msg.charAt(3) == '|')) {
  4009. var sp = msg.split(']');
  4010. rm = sp[0].split('|')[0] + ']&ensp;';
  4011. usr = sp[0].split('|')[1];
  4012. msg = sp[1];
  4013. h.push('bot')
  4014. }
  4015. var trueUsr = usr;
  4016. e = [e];
  4017. pfx = pfx['private'] ? 'To ' : '';
  4018. if (cls['class'] != 'script') this._messages_count % 2 && h.push("even"), this._messages_count++;
  4019. cls['class'] && h.push(cls['class']);
  4020. if ((!cls['class'] || cls['class'].indexOf('emote') == -1) && msg.charAt(0) == '*' && msg.charAt(2) != '*') {
  4021. var msgLen = msg.length;
  4022. if (msgLen > 5) {
  4023. msg = '**' + usr + ' ' + (msg.charAt(msgLen - 1) == '*' ? msg.slice(1, msgLen - 1) : msg.slice(1, msgLen)) + '**';
  4024. h.push('emote');
  4025. }
  4026. }
  4027. var rUsr = h.join(' ').indexOf('sent_whisper') > -1 ? this._user_manager.username() : usr;
  4028. var raid = SRDotDX.getRaidLink(msg, rUsr);
  4029. if (raid) {
  4030. h.push('DotDX_raid');
  4031. h.push('DotDX_sid_' + raid.sid);
  4032. h.push('DotDX_diff_' + raid.diff);
  4033. h.push('DotDX_raidId_' + raid.id);
  4034. if (raid.visited) h.push('DotDX_visitedRaid');
  4035. h.push('DotDX_fltChat_' + raid.boss + '_' + (raid.diff - 1));
  4036. 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;
  4037. SRDotDX.gui.toggleRaid('visited', raid.id, raid.visited);
  4038. SRDotDX.gui.joining ? SRDotDX.gui.pushRaidToJoinQueue(raid.id) : SRDotDX.gui.selectRaidsToJoin('chat');
  4039. }
  4040. else {
  4041. //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;
  4042. var linkReg = /(?:^|\s|,|;)(((?:ht|(?:t|s)?f)tps?:(?:\/\/))([\w\.\-]{4,}[a-z0-9])([\w\/\?\.\-=&#:;%()!]*[\w#;)])?)/g;
  4043. var links, link, lname, lidx, found = false;
  4044. while((links = linkReg.exec(msg))) {
  4045. found = true;
  4046. console.log('[DotDX] Link found: ' + msg);
  4047. if(!/kongregate.com/i.test(links[1]) && !/\.\./.test(links[1])){
  4048. link = links[1].replace(/&amp;/ig,'&').replace(/&nbsp;/ig,'');
  4049. lname = SRDotDX.config.formatLinks ? (SRDotDX.linkNames[links[3]] ? ('['+SRDotDX.linkNames[links[3]]+']') : links[3]) : link;
  4050. link = '<a href="' + link + '" target="_blank" class="chat_link">' + lname + '</a>';
  4051. linkReg.lastIndex += link.length - links[1].length;
  4052. lidx = links.index + links.indexOf(links[1]);
  4053. msg = msg.substring(0, lidx) + link + msg.substring(lidx + links[1].length, msg.length);
  4054. }
  4055. }
  4056. if(found) SRDotDX.linksHistory.push({t:new Date().getTime(), u:usr, m:msg});
  4057. }
  4058. var ign = '';
  4059. if (SRDotDX.config.mutedUsers[usr]) h.push('DotDX_hidden');
  4060.  
  4061. var fCls = h.join(' ');
  4062. if (SRDotDX.config.ignUsers[usr] && SRDotDX.config.ignUsers[usr].ign !== '*unknown*' && fCls.indexOf('emote') < 0) {
  4063. switch(SRDotDX.config.ignMode) {
  4064. case 2: ign = ' ('+SRDotDX.config.ignUsers[usr].ign+')'; break;
  4065. case 1: usr = SRDotDX.config.ignUsers[usr].ign; e.push('ign'); break;
  4066. }
  4067. }
  4068. var ts = fCls.indexOf('emote') > -1 || fCls.indexOf('script') > -1 ? '' : ('(' + ('0' + (new Date().getHours())).slice(-2) + ':' + ('0' + (new Date().getMinutes())).slice(-2) + ')&ensp;');
  4069. f && e.push('is_self');
  4070.  
  4071. usr = ChatDialogue.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 });
  4072. this.insert(usr);
  4073. }
  4074. };
  4075.  
  4076. // chat room chooser user limit override
  4077. ChatRoomGroup.prototype.buildRegularRoomNode = function (a) {
  4078. var b = new Element("li", {"class": 0 === i % 2 ? "even room" : "odd room"}); b.room = a;
  4079. var c = (new Element("p", {"class": "name"})).update(a.name);
  4080. a.premium_only && (active_user.isPremium() || c.addClassName("upsell"),c.addClassName("premium_room_icon spritesite"));
  4081. b.insert(c);
  4082. b.insert((new Element("p", {"class": "user_count" + (a.joinable ? "" : " full")})).update(a.total_user_count));
  4083. b.insert(new Element("div", {style: "clear:both;"}));
  4084. return b
  4085. };
  4086.  
  4087. // kong methods fix
  4088. Element._insertionTranslations.after = function(a,b){c=a.parentNode;c&&c.insertBefore(b,a.nextSibling)};
  4089. Element.Methods.remove = function(a){a=$(a);b=a.parentNode;b&&b.removeChild(a);return a};
  4090. ChatRoom.prototype.userSorter = function(){
  4091. var a=this._chat_window,
  4092. b=this,
  4093. c=function(b){return a&&b&&(a.username()===b.username)},
  4094. d=function(a){return a&&!a.isSilenced()},
  4095. e=function(a){return a&&a.isAdmin()},
  4096. f=function(a){return a&&!a.isAdmin()&&b&&b.canUserModerate(a)},
  4097. g=function(b){return a&&b&&a.isFriend(b)},
  4098. h=function(b){return a&&b&&!a.isMuted(b)},
  4099. s=function(a){return a&&a.isAway()},
  4100. m=function(a,b,c){b=a(b);a=a(c);return b&&!a?-1:!b&&a?1:0};
  4101. 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)}
  4102. };
  4103. // custom chat commands
  4104. holodeck.addDotdChatCommand("stop", function (deck, text) {
  4105. if (SRDotDX.gui.isPosting) SRDotDX.gui.FPXStopPosting();
  4106. else SRDotDX.util.extEcho('<b>/stop</b>: Links are not being posted. Stop command invalid.');
  4107. return false;
  4108. });
  4109. holodeck.addDotdChatCommand("e", function (deck, text) {
  4110. var s = text.slice(2);
  4111. if (s != "") holodeck.activeDialogue().SRDotDX_emote(s);
  4112. else SRDotDX.util.extEcho('<b>/e</b>: Empty message specified');
  4113. return false;
  4114. });
  4115. holodeck.addDotdChatCommand("kill", function (deck, text) {
  4116. document.getElementById("gameiframe").src = "";
  4117. SRDotDX.util.extEcho('Game window killed, have a nice chatting.');
  4118. return false;
  4119. });
  4120. holodeck.addDotdChatCommand("update", function (deck, text) {
  4121. SRDotDX.request.version();
  4122. return false;
  4123. });
  4124. holodeck.addDotdChatCommand("help", function (deck, text) {
  4125. var d = "<b>Available chat commands:</b><br>";
  4126. 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";
  4127. 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>';
  4128. SRDotDX.util.extEcho(d);
  4129. return false;
  4130. });
  4131. holodeck.addDotdChatCommand("reload,relaod,rl,reloaf", function (deck, text) {
  4132. SRDotDX.reload();
  4133. return false;
  4134. });
  4135. holodeck.addDotdChatCommand("mute", function (deck, text) {
  4136. var s = text.split(" ");
  4137. if (s.length == 2 && s[1] != "") {
  4138. SRDotDX.config.mutedUsers[s[1]] = true;
  4139. SRDotDX.util.extEcho('User "' + s[1] + '" muted. Use the /unmute command to undo, and the /mutelist to see all muted users.');
  4140. SRDotDX.config.save(false);
  4141. }
  4142. else SRDotDX.util.extEcho('<b>/mute</b>: Invalid parameters specified. The proper syntax is "/mute [username]".');
  4143. return false;
  4144. });
  4145. holodeck.addDotdChatCommand("ign", function (deck, text) {
  4146. var s = text.split(" ");
  4147. if (s.length == 3 && s[1] != "" && s[2] != "") {
  4148. SRDotDX.config.ignUsers[s[1]] = { ign: s[2], gld: '*unknown*'}; //s[2];
  4149. 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.');
  4150. SRDotDX.config.save(false);
  4151. }
  4152. else SRDotDX.util.extEcho('<b>/ign</b>: Invalid parameters specified. The proper syntax is "/ign [kong username] [in game name]".');
  4153. return false;
  4154. });
  4155. holodeck.addDotdChatCommand('unmute', function (deck, text) {
  4156. var s = text.split(' ');
  4157. if (s.length === 2 && s[1] !== '') {
  4158. if (s[1] === 'all') {
  4159. for (var u in SRDotDX.config.mutedUsers) delete SRDotDX.config.mutedUsers[u];
  4160. SRDotDX.config.save(false);
  4161. SRDotDX.util.extEcho('All users unmuted.');
  4162. }
  4163. else if (SRDotDX.config.mutedUsers[s[1]]) {
  4164. delete SRDotDX.config.mutedUsers[s[1]];
  4165. SRDotDX.util.extEcho('User "' + s[1] + '" unmuted.');
  4166. SRDotDX.config.save(false);
  4167. }
  4168. else SRDotDX.util.extEcho('No muted user "' + s[1] + '" found.');
  4169. }
  4170. 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.');
  4171. return false;
  4172. });
  4173. holodeck.addDotdChatCommand('unign', function (deck, text) {
  4174. var s = text.split(' ');
  4175. if (s.length === 2 && s[1] !== '') {
  4176. if (s[1] === 'all') {
  4177. for (var u in SRDotDX.config.ignUsers) delete SRDotDX.config.ignUsers[u];
  4178. SRDotDX.config.save(false);
  4179. SRDotDX.util.extEcho('All users removed from IGN list.');
  4180. }
  4181. else if (SRDotDX.config.ignUsers[s[1]]) {
  4182. delete SRDotDX.config.ignUsers[s[1]];
  4183. SRDotDX.util.extEcho('Removed ' + s[1] + '\'s IGN.');
  4184. SRDotDX.config.save(false);
  4185. }
  4186. else SRDotDX.util.extEcho('No IGN of user "' + s[1] + '" found.');
  4187. }
  4188. 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.');
  4189. return false;
  4190. });
  4191. holodeck.addDotdChatCommand('mutelist', function (deck, text) {
  4192. var s = '<b>List of users currently muted:</b><br/>';
  4193. var i = 0;
  4194. for (var u in SRDotDX.config.mutedUsers) {
  4195. s += u + '<br>';
  4196. i++
  4197. }
  4198. if (i == 0) s = 'No users currently muted.<br/>';
  4199. s += '<br>Use the /mute and /unmute commands to add or remove users on this list.';
  4200. SRDotDX.util.extEcho(s);
  4201. return false;
  4202. });
  4203. holodeck.addDotdChatCommand('ignlist', function (deck, text) {
  4204. var s = '<b>List of known users IGN:</b><br>';
  4205. if (SRDotDX.config.ignUsers.length === 0) s = 'No users added to IGN list.<br/>';
  4206. else for (var u in SRDotDX.config.ignUsers) s += u + ':' + SRDotDX.config.ignUsers[u].ign + '<br/>';
  4207. s += '<br>Use the /ign and /unign commands to add or remove users on this list.';
  4208. SRDotDX.util.extEcho(s);
  4209. return false;
  4210. });
  4211. holodeck.addDotdChatCommand('script', function (deck, text) {
  4212. SRDotDX.gui.sendChatMsg('Script link: https://greasyfork.org/scripts/406-mutik-s-dotd-script');
  4213. return false;
  4214. });
  4215. holodeck.addDotdChatCommand('clear,cls', function (deck, text) {
  4216. holodeck.activeDialogue().clear();
  4217. return false
  4218. });
  4219. holodeck.addDotdChatCommand('keywords', function (deck, text) {
  4220. SRDotDX.util.extEcho('<b>List of available filter keywords:</b><br>'+Object.keys(SRDotDX.searchPatterns).join(', '));
  4221. });
  4222. holodeck.addDotdChatCommand('clearx,clx', function (deck, text) {
  4223. var x = document.getElementsByClassName('script');
  4224. var i = x.length;
  4225. while(i--) x[i].parentNode.removeChild(x[i]);
  4226. setTimeout(SRDotDX.gui.scrollChat, 50);
  4227. return false
  4228. });
  4229. holodeck.addDotdChatCommand('wikil', function (deck, text) {
  4230. SRDotDX.gui.sendChatMsg('http://dotd.wikia.com/wiki/Dawn_of_the_Dragons_Wiki');
  4231. return false;
  4232. });
  4233. holodeck.addDotdChatCommand('import,imp', function (deck, text) {
  4234. SRDotDX.util.extEcho('Importing all raids from server');
  4235. SRDotDX.request.raids();
  4236. return false;
  4237. });
  4238. holodeck.addDotdChatCommand('friend', function (deck, text) {
  4239. var s = text.split(" ");
  4240. if (s.length == 2 && s[1] != "") {
  4241. if (typeof SRDotDX.config.friendUsers[s[1]] != 'object') {
  4242. SRDotDX.config.friendUsers[s[1]] = [false, false, false, false, true];
  4243. SRDotDX.config.save(false);
  4244. SRDotDX.gui.refreshFriends();
  4245. SRDotDX.util.extEcho('Added ' + s[1] + ' to friends');
  4246. }
  4247. }
  4248. return false;
  4249. });
  4250. holodeck.addDotdChatCommand('unfriend', function (deck, text) {
  4251. var s = text.split(" ");
  4252. if (s[1] == 'all') {
  4253. for (var u in SRDotDX.config.friendUsers) delete SRDotDX.config.friendUsers[u];
  4254. SRDotDX.config.save(false);
  4255. SRDotDX.gui.refreshFriends();
  4256. SRDotDX.util.extEcho('All users removed from friend list.');
  4257. }
  4258. else if (SRDotDX.config.friendUsers[s[1]]) {
  4259. delete SRDotDX.config.friendUsers[s[1]];
  4260. SRDotDX.config.save(false);
  4261. SRDotDX.gui.refreshFriends();
  4262. SRDotDX.util.extEcho('Removed ' + s[1] + ' from friends');
  4263. }
  4264. else SRDotDX.util.extEcho('User "' + s[1] + '" not found on friend list.');
  4265. return false;
  4266. });
  4267. holodeck.addDotdChatCommand('fs', function (deck, text) {
  4268. var cmd = text.split(' ');
  4269. if (cmd[0] === '/fs' && cmd[1]) {
  4270. SRDotDX.util.extEcho('Posting raid to friends');
  4271. document.getElementById('DotDX_raidsToSpam').value = cmd[1];
  4272. SRDotDX.gui.spamRaidsToFriends();
  4273. }
  4274. else SRDotDX.util.extEcho('Wrong syntax. Usage: /fs <raid link>');
  4275. return false;
  4276. });
  4277. holodeck.addDotdChatCommand('room', function (deck, text) {
  4278. var cmd = text.split(' ');
  4279. if (cmd[0] === '/room' && cmd[1]) SRDotDX.gui.gotoRoom(cmd[1]);
  4280. else SRDotDX.gui.gotoRoom(0);
  4281. return false;
  4282. });
  4283. holodeck.addDotdChatCommand('getlinks', function (deck, text) {
  4284. SRDotDX.util.getChatLinks();
  4285. SRDotDX.util.extEcho('Links opened in new tab');
  4286. return false;
  4287. });
  4288. holodeck.addDotdChatCommand('ijoin,join', function (deck, text) {
  4289. if (text.charAt(1) === 'j') SRDotDX.gui.quickImportAndJoin(text.slice(6));
  4290. else SRDotDX.gui.quickImportAndJoin(text.slice(7), true);
  4291. return false;
  4292. });
  4293. holodeck.addDotdChatCommand('wiki', function (deck, text) {
  4294. var p = /^\/wiki (.*?)$/i.exec(text);
  4295. if (p) {
  4296. window.open('http://dotd.wikia.com/wiki/Special:Search?search=' + p[1]);
  4297. SRDotDX.util.extEcho('Wiki search opened.');
  4298. }
  4299. else SRDotDX.util.extEcho('<b>/wiki</b>: Invalid parameters specified');
  4300. return false;
  4301. });
  4302. holodeck.addDotdChatCommand('guide,manual', function (deck, text) {
  4303. window.open('https://docs.google.com/document/d/14X0WhnJrISQbxdfQv_scJbG1sUyXdE2g4iMfHmLM0E0/edit');
  4304. SRDotDX.util.extEcho('Script guide opened in new tab/window.');
  4305. return false;
  4306. });
  4307. holodeck.addDotdChatCommand('slap', function (deck, text) {
  4308. var p = /^\/slap (.*?)$/i.exec(text);
  4309. if (p) {
  4310. var num = Math.round((Math.random() * (SRDotDX.slapSentences.length - 1)));
  4311. SRDotDX.gui.sendChatMsg('*' + SRDotDX.slapSentences[num].replace(/<nick>/g, p[1]) + '*');
  4312. }
  4313. else SRDotDX.util.extEcho('<b>/slap</b>: Invalid parameters specified');
  4314. return false;
  4315. });
  4316. holodeck.addDotdChatCommand('sh', function (deck, text) {
  4317. var p = /^\/sh (.*?)$/i.exec(text);
  4318. if (p) {
  4319. var fnd1 = p[1].toLowerCase(), fnd2 = p[1].length, found = false, sho;
  4320. for (var i in SRDotDX.shortcuts) {
  4321. if (SRDotDX.shortcuts.hasOwnProperty(i)) {
  4322. sho = SRDotDX.shortcuts[i];
  4323. if (sho.n.toLowerCase().indexOf(fnd1) > -1 && sho.n.length == fnd2) {
  4324. SRDotDX.util.extEcho('<b>' + sho.bn + '</b>: ' + sho.desc);
  4325. found = true;
  4326. }
  4327. }
  4328. }
  4329. if (!found) SRDotDX.util.extEcho('<b>/sh</b>: Shortcut not found in db');
  4330. }
  4331. else SRDotDX.util.extEcho('<b>/sh</b>: No parameters specified');
  4332. return false;
  4333. });
  4334. holodeck.addDotdChatCommand('perc', function (deck, text) {
  4335. var bok = text.indexOf('bok', 4);
  4336. var cwp = text.indexOf('cwp', 4);
  4337. var empty = text.length < 6;
  4338. var output = "";
  4339. if (bok >= 0 || empty) output = "<b>Book of Knowledge Perc. Tiers:</b><br>\
  4340. 1 : Brown/Grey<br>\
  4341. 4k : Brown/Grey/Green<br>\
  4342. 6k : Grey/Green<br>\
  4343. 10k : Grey/Green/Blue<br>\
  4344. 14k : Green/Blue<br>\
  4345. 16k : Green/Blue/Purple<br>\
  4346. 18k : Blue/Purple<br>\
  4347. 22k : Blue/Purple/Orange<br>\
  4348. 24k : Purple/Orange<br>\
  4349. 30k : Orange<br>\
  4350. 33k : Orange/Red (more orange)<br>\
  4351. 36k : Orange/Red (more red)<br>\
  4352. 50k : Orange/Red (even more red)<br>\
  4353. 70k : Red<br>\
  4354. 80k : Red/Bronze<br>\
  4355. 90k : Red/Bronze<br>\
  4356. 100k : ???<br>\
  4357. 110k : Bronze/Silver<br>\
  4358. 120k : Bronze/Silver<br>\
  4359. 130k : Bronze/Silver<br>\
  4360. 140k : Silver<br>\
  4361. 150k : Silver/Gold<br>\
  4362. 160k : Silver/Gold<br>\
  4363. 170k : Silver/Gold";
  4364. if (empty) output += "<br>\
  4365. -------------------------------------------------<br>";
  4366. if (cwp >= 0 || empty) output += "<b>Clockwork Parts Perc. Tiers:</b><br>\
  4367. 1-1999: 10x Perf. Clockwork Part<br>\
  4368. 2000-3999: 25x Perf. Clockwork Part<br>\
  4369. 4000-5999: 40x Perf. Clockwork Part<br>\
  4370. 6000-7999: 55x Perf. Clockwork Part<br>\
  4371. 8000-9999: 70x Perf. Clockwork Part<br>\
  4372. 10000-11999: 85x Perf. Clockwork Part<br>\
  4373. 12000-13999: 100x Perf. Clockwork Part<br>\
  4374. 14000-15999: 115x Perf. Clockwork Part<br>\
  4375. 16000-17999: 130x Perf. Clockwork Part<br>\
  4376. 18000-19999: 145x Perf. Clockwork Part<br>\
  4377. 20000-21999: 160x Perf. Clockwork Part<br>\
  4378. 22000-23999: 175x Perf. Clockwork Part<br>\
  4379. 24000-25999: 190x Perf. Clockwork Part<br>\
  4380. 26000-27999: 205x Perf. Clockwork Part<br>\
  4381. 28000-29999: 220x Perf. Clockwork Part<br>\
  4382. 30000-32999: 235x Perf. Clockwork Part<br>\
  4383. 33000-35999: 245x Perf. Clockwork Part<br>\
  4384. 36000+ : 260x Perf. Clockwork Part";
  4385. SRDotDX.util.extEcho(output);
  4386. return false;
  4387. });
  4388. holodeck.addDotdChatCommand('citadel', function (deck, text) {
  4389. SRDotDX.util.extEcho("Barrack Book = Grune N Quest<br>\
  4390. Barrack Scroll 1 = Hydra NM Raid<br>\
  4391. Barrack Scroll 2 = Research Library book<br>\
  4392. Barrack Scroll 3 = Rhalmarius the Despoiler NM Raid/Crafting<br>\
  4393. Barrack Scroll 4 = The New Claw (World Raid) craft<br>\
  4394. Barrack Scroll 5 = Burbata the Spine-Crusher NM Raid<br>\
  4395. Barrack Scroll 6 = Temp loot from Hargamesh/Grimsly NM Raids<br>\
  4396. Barrack Scroll 7 = The Baroness NM Quest<br>\
  4397. Barrack Scroll 8 = Crafting from Imryx the Incinerator NM Raid<br>\
  4398. Armorsmith Book = Lurking Horror N Quest<br>\
  4399. Armorsmith Scroll 1 = Nalagarst NM Raid<br>\
  4400. Armorsmith Scroll 2 = Research Library 1<br>\
  4401. Armorsmith Scroll 3 = Dragon's Lair NM Raid<br>\
  4402. Armorsmith Scroll 4 = Temp loot from Rift/Sisters NM Raid<br>\
  4403. Armorsmith Scroll 5 = Baroness NM Raid<br>\
  4404. Weaponsmith Book = Erebus N Quest<br>\
  4405. Weaponsmith Scroll 1 = Baroness NM Raid<br>\
  4406. Weaponsmith Scroll 2 = Research Library 1<br>\
  4407. Weaponsmith Scroll 3 = Dragon's Lair NM Raid<br>\
  4408. Weaponsmith Scroll 4 = Temp loot from Mardachus NM Raid<br>\
  4409. Weaponsmith Scroll 5 = Warlord Zugen NM Raid<br>\
  4410. Alchemist Book = Nalagarst N Quest<br>\
  4411. Alchemist Scroll 1 = Kalaxia N Quest<br>\
  4412. Alchemist Scroll 2 = Research Library 5<br>\
  4413. Alchemist Scroll 3 = The New Claw (World Raid)<br>\
  4414. Alchemist Scroll 4 = Teremarthu NM Raid<br>\
  4415. Research Book = Bellarius N Quest<br>\
  4416. Research Library Scroll 1 = Mardachus NM Raid<br>\
  4417. Research Library Scroll 2 = Valanazes NM Raid<br>\
  4418. Research Library Scroll 3 = Teremarthu NM Raid<br>\
  4419. Research Library Scroll 4 = Z'ralk'thalat NM Raid<br>\
  4420. Research Library Scroll 5 = Simulacrum of Dahrizon NM Quest<br>\
  4421. Research Library Scroll 6 = Count Siculus' Phantom N Quest<br>\
  4422. Pet Emporium Book = Count Siculus' Phantom N Quest<br>\
  4423. Pet Emporium Scroll 1 = Research Library 4<br>\
  4424. Pet Emporium Scroll 2 = Cannibal Barbarians NM Raid<br>\
  4425. Stables Book = Valanazes N Quest<br>\
  4426. Stables Scroll 1 = Frog-men Assassins NM Raid<br>\
  4427. Stables Scroll 2 = Research Library 2<br>\
  4428. Stables Scroll 3 = Mount Chest<br>\
  4429. Training Ground Book = Teremarthu N Quest<br>\
  4430. Training Ground Scroll 1 = Research Library 3<br>\
  4431. Training Ground Scroll 2 = Temporary loot from Z7 NM Raids<br>\
  4432. Training Ground Scroll 3 = Invasion Rank: Wyrm-Commander<br>\
  4433. Training Ground Scroll 4 = Invasion Rank: Chief Battlefield Overseer<br>\
  4434. Training Ground Scroll 5 = Count Siculus' Phantom L&NM Raid<br>\
  4435. Training Ground Scroll 6 = Thaltherda the Sea-Slitherer NM Raid<br>\
  4436. Wizard's Tower Book = Ruzzik the Slayer N Quest<br>\
  4437. Wizard's Tower Scroll 1 = Salome the Seductress NM Raid<br>\
  4438. Wizard's Tower Scroll 2 = Kalaxia the Far-Seer NM Raid<br>\
  4439. Wizard's Tower Scroll 3 = Yydian's Sanctuary NM Raid<br>\
  4440. Wizard's Tower Scroll 4 = Drulcharus NM Raid<br>\
  4441. Jeweler Book = Krugnug N Quest<br>\
  4442. Jeweler Scroll 1 = Thaltherda the Sea-Slitherer NM Raid<br>\
  4443. Jeweler Scroll 2 = Crafting (General/Events)<br>\
  4444. Jeweler Scroll 3 = Spectral Erebus Raid/Crafting");
  4445. return false;
  4446. });
  4447. holodeck.addDotdChatCommand('camp', function(deck, text) {
  4448. var p = text.split(' '), msg = '';
  4449. if (p[1] && SRDotDX.camps.hasOwnProperty(p[1].toLowerCase())) {
  4450. var camp = SRDotDX.camps[p[1].toLowerCase()];
  4451. var num = camp.tiers[0].length, j, jl;
  4452. msg += '<a class="title" target="_blank" href="http://dotd.wikia.com/wiki/' + camp.name.replace(/ /g, '_').replace(/'/g, "%27") + '">' + camp.name + '</a>';
  4453. msg += '<br>Camp time: N ' + camp.time[0] + 'h, H ' + camp.time[1] + 'h<br>Prefixes: ' + camp.prefixes;
  4454. 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>');
  4455. for(var i = 0, il = camp.numNodes; i < il; ++i) msg += '<th>' + camp[camp.nodes[i]].sname + '</th>'; msg += '</tr></thead><tbody>';
  4456. if(num > 3) {
  4457. for(i = 0, il = camp.tiers.length; i < il; ++i) {
  4458. 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>';
  4459. 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>';
  4460. }
  4461. }
  4462. else {
  4463. for(i = 0, il = camp.tiers.length; i < il; ++i) {
  4464. 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>';
  4465. for(j = 0, jl = camp.numNodes; j < jl; ++j) msg += camp[camp.nodes[j]].tiers[i] ? '<td class="mark">&#x2713;</td>' : '<td></td>';
  4466. }
  4467. }
  4468. msg += '</tbody></table>';
  4469. var node;
  4470. for(i = 0, il = camp.numNodes; i < il; ++i) {
  4471. node = camp[camp.nodes[i]];
  4472. 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);
  4473. }
  4474. SRDotDX.util.extEcho(msg);
  4475. }
  4476. else SRDotDX.util.extEcho('No campaigns found matching "' + (p[1] ? p[1] : '') + '". Valid values are: ' + Object.keys(SRDotDX.camps).join(', '));
  4477. return false;
  4478. });
  4479. holodeck.addDotdChatCommand('raid,rd', function(deck, text) {
  4480. var p = text.split(' ');
  4481. if(p[1]) {
  4482. var msg = '', j, jl;
  4483. var diff = !isNaN(p[2]) ? p[2] - 1 : -1;
  4484. var fnd = p[1].toLowerCase();
  4485. var keys = Object.keys(SRDotDX.raids);
  4486. for(var k = 0, kl = keys.length; k < kl; ++k) {
  4487. var raid = SRDotDX.raids[keys[k]];
  4488. if(raid.name.toLowerCase().indexOf(fnd) > -1) {
  4489. if(msg !== '') msg += '<hr>';
  4490. 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>';
  4491. msg += '<br>' + (raid.type === '' ? '' : raid.type + '<br>') + SRDotDX.raidSizes[raid.size].name + ' Raid (' + (raid.size === 101 ? 100 : raid.size) + ' slots) | ' + raid.duration + 'h';
  4492. msg += '<br><table class="raids">';
  4493. switch(diff) {
  4494. case 0: msg += '<colgroup><col><col class="selected"><col><col><col></colgroup>'; break;
  4495. case 1: msg += '<colgroup><col><col><col class="selected"><col><col></colgroup>'; break;
  4496. case 2: msg += '<colgroup><col><col><col><col class="selected"><col></colgroup>'; break;
  4497. case 3: msg += '<colgroup><col><col><col><col><col class="selected"></colgroup>'; break;
  4498. default: msg += '<colgroup><col><col><col><col><col></colgroup>'; break;
  4499. }
  4500. var size = raid.size < 15 ? 10 : raid.size, fs = [];
  4501. for(j = 0; j < 4; ++j) fs[j] = raid.health[j] / (raid.size == 101 ? 100 : raid.size);
  4502. msg += '<thead> \
  4503. <tr><th style="border:0; background-color: transparent;"></th><th>Normal</th><th>Hard</th><th>Legend</th><th>NMare</th></tr> \
  4504. </thead> \
  4505. <tbody> \
  4506. <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> \
  4507. <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> \
  4508. <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>';
  4509. if(typeof raid.lt !== 'object' && raid.id !== 'rhalmarius_the_despoiler' && raid.id !== 'grundus' && raid.size < 10000) {
  4510. var ratio = SRDotDX.raidSizes[size].ratios;
  4511. var ename = SRDotDX.raidSizes[size].enames;
  4512. 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>';
  4513. }
  4514. else if (typeof raid.lt === 'object') {
  4515. var elen = SRDotDX.lootTiers[raid.lt[0]].tiers;
  4516. var eleh = SRDotDX.lootTiers[raid.lt[1]].tiers;
  4517. var elel = SRDotDX.lootTiers[raid.lt[2]].tiers;
  4518. var elenm = SRDotDX.lootTiers[raid.lt[3]].tiers;
  4519. var epics = SRDotDX.lootTiers[raid.lt[0]].epics;
  4520. var best = SRDotDX.lootTiers[raid.lt[0]].best;
  4521. var e = SRDotDX.lootTiers[raid.lt[0]].e ? 'E' : '';
  4522. 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>';
  4523. else msg += '<tr><td class="ep">-</td><td>' + elen[0] + '</td><td>' + eleh[0] + '</td><td>' + elel[0] + '</td><td>' + elenm[0] + '</td></tr>';
  4524. }
  4525. msg += '</tbody></table>';
  4526. }
  4527. }
  4528. if (msg != '') SRDotDX.util.extEcho(msg);
  4529. else SRDotDX.util.extEcho('No raids found matching: ' + p[1]);
  4530. }
  4531. else SRDotDX.util.extEcho('<b>/raid</b>: Invalid parameters specified (<a href="#" onclick="SRDotDX.gui.help(\'raid\')">help</a>)');
  4532. return false;
  4533. });
  4534. window.onbeforeunload = function(){SRDotDX.config.save(false)};
  4535. SRDotDX.fails = 0;
  4536. console.log('[DotDX] Core loaded. Loading user interface...');
  4537. SRDotDX.gui.load();
  4538. SRDotDX.request.init();
  4539. setTimeout(function(){delete SRDotDX.load}, 100);
  4540. }
  4541. else if(++SRDotDX.fails < 20) {
  4542. console.log('[DotDX] Missing needed Kong resources (try:' + SRDotDX.fails + '), retrying in 0.75 second...');
  4543. setTimeout(SRDotDX.load, 750);
  4544. }
  4545. else {
  4546. console.log('[DotDX] Unable to locate required Kong resources. Loading aborted');
  4547. setTimeout(function(){delete SRDotDX}, 1);
  4548. }
  4549. }
  4550. };
  4551. console.log('[DotDX] Initialized. Checking for needed Kong resources ...');
  4552. SRDotDX.load();
  4553. }
  4554.  
  4555. console.log('[DotDX] Initializing ...');
  4556. if (window.top == window.self) {
  4557. document.addEventListener("dotd.req", function (param) {
  4558. var p = JSON.parse(param.data);
  4559. if (p.wrappedJSObject) p = p.wrappedJSObject;
  4560. p.callback = function (e, r) {
  4561. this.onload = null;
  4562. this.onerror = null;
  4563. this.ontimeout = null;
  4564. this.event = e;
  4565. this.status = r.status;
  4566. this.responseText = r.responseText;
  4567. var c = document.createEvent("MessageEvent");
  4568. if (c.initMessageEvent) c.initMessageEvent(this.eventName, false, false, JSON.stringify(this), document.location.protocol + "//" + document.location.hostname, 1, unsafeWindow, null);
  4569. else c = new MessageEvent(this.eventName, {"origin": document.location.protocol + "//" + document.location.hostname, "lastEventId": 1, "source": unsafeWindow, "data": JSON.stringify(this)});
  4570. document.dispatchEvent(c);
  4571. };
  4572. p.onload = p.callback.bind(p, "load");
  4573. p.onerror = p.callback.bind(p, "error");
  4574. p.ontimeout = p.callback.bind(p, "timeout");
  4575. setTimeout(function(){ GM_xmlhttpRequest(p) }, 1);
  4576. });
  4577. var scr = document.createElement('script');
  4578. scr.setAttribute('src','http://mutik.erley.org/chat/socket.io.js');
  4579. document.head.appendChild(scr);
  4580. scr = document.createElement('script');
  4581. scr.appendChild(document.createTextNode('(' + main + ')()'));
  4582. document.head.appendChild(scr);
  4583. }
  4584. }
  4585. else if(window.location.host === '50.18.191.15') {
  4586. if (typeof GM_setValue === 'undefined') {
  4587. var GM_setValue = function (name, value) {
  4588. localStorage.setItem(name, (typeof value).substring(0, 1) + value);
  4589. }
  4590. }
  4591. if (typeof GM_getValue === 'undefined') {
  4592. var GM_getValue = function (name, dvalue)
  4593. {
  4594. var value = localStorage.getItem(name);
  4595. if (typeof value !== 'string') return dvalue;
  4596. else {
  4597. var type = value.substring(0, 1);
  4598. value = value.substring(1);
  4599. if (type === 'b') return (value === 'true');
  4600. else if (type === 'n') return Number(value);
  4601. else return value;
  4602. }
  4603. };
  4604. }
  4605. window.onmessage = function(e) {
  4606. var c = e.data.split('#');
  4607. if(c[0].indexOf('dotdx') !== -1) {
  4608. if(c[0] === 'dotdx.save') {
  4609. GM_setValue('DotDXext', c[1]);
  4610. console.log("[DotDX] Saved data: "+c[1]);
  4611. }
  4612. var conf = JSON.parse(c[1]);
  4613. if(conf.removeWChat) {
  4614. if(document.getElementById('swfdiv') !== null) document.getElementById('swfdiv').parentNode.style.left = '0px';
  4615. if(document.getElementById('chatdiv') !== null) {
  4616. var remdiv = document.getElementById('chatdiv').parentNode;
  4617. remdiv.parentNode.removeChild(remdiv);
  4618. }
  4619. }
  4620. else if(conf.leftWChat && !conf.hideWChat) {
  4621. if(document.getElementById('chatdiv') !== null) document.getElementById('chatdiv').parentNode.style.left = '0px';
  4622. if(document.getElementById('swfdiv') !== null) document.getElementById('swfdiv').parentNode.style.left = '265px';
  4623. }
  4624. else {
  4625. if(document.getElementById('chatdiv') !== null) document.getElementById('chatdiv').parentNode.style.left = '760px';
  4626. if(document.getElementById('swfdiv') !== null) document.getElementById('swfdiv').parentNode.style.left = '0px';
  4627. }
  4628. }
  4629. };
  4630. if (typeof GM_getValue("DotDXext") !== 'string') GM_setValue("DotDXext",JSON.stringify({'removeWChat':false,'leftWChat':false,'hideWChat':false}));
  4631. window.postMessage('dotdx.init#'+GM_getValue('DotDXext'),'*');
  4632. console.log("[DotDX] Injected code into GameFrame");
  4633. }