Mutik's DotD Script

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

当前为 2015-09-11 提交的版本,查看 最新版本

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