Greasy Fork 还支持 简体中文。

Mutik's DotD Script

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

目前為 2014-07-12 提交的版本,檢視 最新版本

  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, orig version: SReject, chairmansteve, tsukinomai(Shylight)?, JHunz, wpatter6, MoW, true_heathen, HG, mutikt, PDrifting
  6. // @version 1.0.21
  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. // ==/UserScript==
  13.  
  14. function main() {
  15. if (typeof GM_setValue === 'undefined') {
  16. var GM_setValue = function (name, value) { localStorage.setItem(name, (typeof value).substring(0, 1) + value); };
  17. }
  18. if (typeof GM_getValue == 'undefined') {
  19. var GM_getValue = function (name, dvalue) {
  20. var value = localStorage.getItem(name);
  21. if (typeof value != 'string') return dvalue;
  22. else {
  23. var type = value.substring(0, 1);
  24. value = value.substring(1);
  25. if (type == 'b') return (value == 'true');
  26. else if (type == 'n') return Number(value);
  27. else return value;
  28. }
  29. };
  30. }
  31. //if (typeof GM_deleteValue == 'undefined') var GM_deleteValue = function(name) { localStorage.removeItem(name) };
  32.  
  33. window.FPX = {
  34. LandBasePrices:[4000,15000,25000,50000,75000,110000,300000,600000,1200000],
  35. LandBaseIncome:[100,300,400,700,900,1200,2700,4500,8000],
  36. LandCostRatio: function(owned) {
  37. var landCosts = [4000,15000,25000,50000,75000,110000,300000,600000,1200000];
  38. var icr = [1,1,1,1,1,1,1,1,1]; /*Income/Cost ratio*/
  39. var i = 9;
  40. while (i--) {
  41. landCosts[i] += FPX.LandBasePrices[i] * owned[i] / 10;
  42. icr[i] = FPX.LandBaseIncome[i] / landCosts[i];
  43. }
  44. return icr;
  45. }
  46. };
  47. window.timeSince = function(date,after) {
  48. if (typeof date === 'number') date = new Date(date);
  49. var seconds = Math.abs(Math.floor((new Date().getTime() - date.getTime())/1000));
  50. var interval = Math.floor(seconds/31536000);
  51. var pretext = 'about ', posttext = after ? ' left' : ' ago';
  52. if (interval >= 1) return pretext + interval + ' year' + (interval == 1 ? '' : 's') + posttext;
  53. interval = Math.floor(seconds/2592000);
  54. if (interval >= 1) return pretext + interval + ' month' + (interval == 1 ? '' : 's') + posttext;
  55. interval = Math.floor(seconds/86400);
  56. if (interval >= 1) return pretext + interval + ' day' + (interval == 1 ? '' : 's') + posttext;
  57. interval = Math.floor(seconds/3600);
  58. if (interval >= 1) return pretext + interval + ' hour' + (interval == 1 ? '' : 's') + posttext;
  59. interval = Math.floor(seconds/60);
  60. if (interval >= 1) return interval + ' minute' + (interval == 1 ? '' : 's') + posttext;
  61. return Math.floor(seconds) + ' second' + (seconds == 1 ? '' : 's') + posttext;
  62. };
  63. window.isNumber = function(n) { return !isNaN(parseFloat(n)) && isFinite(n); };
  64. window.SRDotDX = {
  65. version: { major: "1.0.21", minor: 'Mutik\'s mod' },
  66. util: {
  67. getQueryVariable: function(v, s){
  68. var query = String(s||window.location.search.substring(1));
  69. if(query.indexOf('?')>-1) query = query.substring(query.indexOf('?')+1);
  70. var vars = query.split('&');
  71. for (var i = 0; i < vars.length; i++) {
  72. var pair = vars[i].split('=');
  73. if (decodeURIComponent(pair[0]) == v) {
  74. return decodeURIComponent(pair[1]);
  75. }
  76. }
  77. return ''
  78. },
  79. getRaidFromUrl: function(url){
  80. var r = {}, link;
  81. var reg = /[?&]([^=]+)=([^?&]+)/ig, p = url.replace(/&amp;/gi,"&");
  82. while (link = reg.exec(p)) {
  83. if (!r.diff && link[1] == 'kv_difficulty') r.diff = parseInt(link[2]);
  84. else if (!r.hash && link[1] == 'kv_hash') r.hash = link[2];
  85. else if (!r.boss && link[1] == 'kv_raid_boss') r.boss = link[2];
  86. else if (!r.id && link[1] == 'kv_raid_id') r.id = link[2].replace(/http:?/i,"");
  87. else if (link[1] != 'kv_action_type') return null;
  88. }
  89. return r;
  90. },
  91. getShortNum: function (num) {
  92. if (isNaN(num) || num < 0) return num;
  93. if (num >= 1000000000000) return (num / 1000000000000).toPrecision(4) + 't';
  94. if (num >= 1000000000) return (num / 1000000000).toPrecision(4) + 'b';
  95. if (num >= 1000000) return (num / 1000000).toPrecision(4) + 'm';
  96. if (num >= 1000) return (num / 1000).toPrecision(4) + 'k';
  97. return num + ''
  98. },
  99. objToUriString: function(obj) {
  100. if (typeof obj == 'object') {
  101. var str = '';
  102. for (var i in obj) str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]) + '&'; str = str.substring(0,str.length-1);
  103. return str
  104. } return '';
  105. },
  106. serialize: function(obj) {
  107. var str = [];
  108. for (var p in obj) if(obj[p]!=null)str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
  109. return str.join("&");
  110. },
  111. stringFormat: function() {
  112. var s = arguments[0];
  113. for (var i = 0; i < arguments.length - 1; i++) {
  114. var reg = new RegExp("\\{" + i + "\\}", "gm");
  115. s = s.replace(reg, arguments[i + 1]);
  116. }
  117. return s;
  118. }
  119. },
  120. config: (function() {
  121. var tmp, reqSave = false;
  122. try { tmp = JSON.parse(GM_getValue('SRDotDX','{}')) }
  123. catch (e) { tmp = {}; reqSave = true }
  124. //Raids tab vars
  125. tmp.lastFilter = typeof tmp.lastFilter == 'string' ? tmp.lastFilter : '';
  126. tmp.filterSearchStringR = typeof tmp.filterSearchStringR == 'string' ? tmp.filterSearchStringR : '';
  127. tmp.fltIncVis = typeof tmp.fltIncVis == 'boolean' ? tmp.fltIncVis : false;
  128. tmp.fltShowNuked = typeof tmp.fltShowNuked == 'boolean' ? tmp.fltShowNuked : false;
  129. tmp.fltShowAll = typeof tmp.fltShowAll == 'boolean' ? tmp.fltShowAll : false;
  130.  
  131. //Options tab vars
  132. tmp.importFiltered = typeof tmp.importFiltered == 'boolean' ? tmp.importFiltered : true;
  133. tmp.hideRaidLinks = typeof tmp.hideRaidLinks == 'boolean' ? tmp.hideRaidLinks : false;
  134. tmp.hideBotLinks = typeof tmp.hideBotLinks == 'boolean' ? tmp.hideBotLinks : false;
  135. tmp.hideVisitedRaids = typeof tmp.hideVisitedRaids == 'boolean' ? tmp.hideVisitedRaids : false;
  136. tmp.hideVisitedRaidsInRaidList = typeof tmp.hideVisitedRaidsInRaidList == 'boolean' ? tmp.hideVisitedRaidsInRaidList : false;
  137. tmp.markMyRaidsVisted = typeof tmp.markMyRaidsVisted == 'boolean' ? tmp.markMyRaidsVisted : false;
  138. tmp.markImportedVisited = typeof tmp.markImportedVisited == 'boolean' ? tmp.markImportedVisited : false;
  139. tmp.FPXLandOwnedCount = typeof tmp.FPXLandOwnedCount == 'object' ? tmp.FPXLandOwnedCount : [0, 0, 0, 0, 0, 0, 0, 0, 0];
  140. tmp.prettyPost = typeof tmp.prettyPost == 'boolean' ? tmp.prettyPost : false;
  141. tmp.useMaxRaidCount = typeof tmp.useMaxRaidCount == 'boolean' ? tmp.useMaxRaidCount : false;
  142. tmp.maxRaidCount = !(typeof tmp.maxRaidCount === 'undefined') ? tmp.maxRaidCount : 3000;
  143. tmp.autoImportPaste = typeof tmp.autoImportPaste == 'boolean' ? tmp.autoImportPaste : false;
  144. tmp.confirmForLargePaste = typeof tmp.confirmForLargePaste == 'boolean' && tmp.confirmPasteSize ? tmp.confirmForLargePaste : false;
  145. tmp.confirmPasteSize = typeof tmp.confirmPasteSize == 'number' ? tmp.confirmPasteSize : 1000;
  146. tmp.showStatusOverlay = typeof tmp.showStatusOverlay == 'boolean' ? tmp.showStatusOverlay : false;
  147. tmp.confirmDeletes = typeof tmp.confirmDeletes == 'boolean' ? tmp.confirmDeletes : true;
  148. tmp.autoPostPaste = typeof tmp.autoPostPaste == 'boolean' ? tmp.autoPostPaste : false;
  149. tmp.whisperTo = typeof tmp.whisperTo == 'string' ? tmp.whisperTo : '';
  150. tmp.formatLinkOutput = typeof tmp.formatLinkOutput == 'boolean' ? tmp.formatLinkOutput : false;
  151. tmp.linkShowFs = typeof tmp.linkShowFs == 'boolean' ? tmp.linkShowFs : false;
  152. tmp.linkShowAp = typeof tmp.linkShowAp == 'boolean' ? tmp.linkShowAp : false;
  153. tmp.unvisitedRaidPruningMode = typeof tmp.unvisitedRaidPruningMode == 'number' ? tmp.unvisitedRaidPruningMode : 1;
  154. tmp.selectedRaids = typeof tmp.selectedRaids == 'string' ? tmp.selectedRaids : '';
  155. tmp.pastebinUrl = typeof tmp.pastebinUrl == 'string' ? tmp.pastebinUrl : '';
  156. tmp.bckColor = typeof tmp.bckColor == 'string' ? tmp.bckColor : 'fff';
  157. tmp.lastImported = typeof tmp.lastImported == 'number' ? tmp.lastImported : ((new Date).getTime() - 1728000000);
  158. tmp.hideKongForum = typeof tmp.hideKongForum == 'boolean' ? tmp.hideKongForum : false;
  159. tmp.hideGameDetails = typeof tmp.hideGameDetails == 'boolean' ? tmp.hideGameDetails : false;
  160. tmp.hideGameTitle = typeof tmp.hideGameTitle == 'boolean' ? tmp.hideGameTitle : true;
  161. tmp.chatFilterString = typeof tmp.chatFilterString == 'string' ? tmp.chatFilterString : '';
  162. tmp.filterSearchStringC = typeof tmp.filterSearchStringC == 'string' ? tmp.filterSearchStringC : '';
  163. tmp.chatSize = typeof tmp.chatSize == 'number' ? tmp.chatSize : 300;
  164. tmp.sbEnable = typeof tmp.sbEnable == 'boolean' ? tmp.sbEnable : false;
  165. tmp.cbDisable = typeof tmp.cbDisable == 'boolean' ? tmp.cbDisable : false;
  166. tmp.sbRightSide = typeof tmp.sbRightSide == 'boolean' ? tmp.sbRightSide : false;
  167. tmp.kongUser = typeof tmp.kongUser == 'string' ? tmp.kongUser : 'Guest';
  168. tmp.kongAuth = typeof tmp.kongAuth == 'string' ? tmp.kongAuth : '0';
  169. tmp.kongId = typeof tmp.kongId == 'string' ? tmp.kongId : '0';
  170. tmp.kongMsg = typeof tmp.kongMsg == 'boolean' ? tmp.kongMsg : false;
  171. tmp.filterChatLinks = typeof tmp.filterChatLinks == 'boolean' ? tmp.filterChatLinks : true;
  172. tmp.filterRaidList = typeof tmp.filterRaidList == 'boolean' ? tmp.filterRaidList : false;
  173. tmp.newRaidsAtTopOfList = typeof tmp.newRaidsAtTopOfList == 'boolean' ? tmp.newRaidsAtTopOfList : false;
  174. tmp.sbConfig = typeof tmp.sbConfig == 'object' ? tmp.sbConfig : [
  175. {type:'btn',name:'Camp',cmd:'/camp'},,,,
  176. {type:'btn',name:'Yydians',cmd:'/raid yyd'},
  177. {type:'btn',name:'Nessie',cmd:'/raid sea'},
  178. {type:'btn',name:'Tisi',cmd:'/raid tisi'},,,,,
  179. {type:'btn',color:'r',name:'Reload',cmd:'SRDotDX.reload()'},,,
  180. {type:'btn',name:'Room 1',cmd:'SRDotDX.gui.gotoRoom(1)'},
  181. {type:'btn',name:'Room 8',cmd:'SRDotDX.gui.gotoRoom(8)'},,,,,,,
  182. {type:'jtxt'},
  183. {type:'btn',color:'g',name:'Join',cmd:'SRDotDX.gui.joinSelectedRaids(true)'},
  184. {type:'btn',color:'b',name:'Import',cmd:'SRDotDX.gui.importFromServer()'}
  185. ];
  186.  
  187. if (typeof tmp.mutedUsers != 'object') tmp.mutedUsers = {};
  188. if (typeof tmp.ignUsers != 'object') tmp.ignUsers = {};
  189. if (typeof tmp.friendUsers != 'object') tmp.friendUsers = {};
  190. if (typeof tmp.raidList != 'object') tmp.raidList = {};
  191. if (typeof tmp.filters !== 'object') tmp.filters = {};
  192.  
  193. if(reqSave) GM_setValue('SRDotDX', JSON.stringify(tmp));
  194.  
  195. // Delete expired raids
  196. for (var id in tmp.raidList) {
  197. if (tmp.raidList.hasOwnProperty(id)) {
  198. tmp.raidList[id].timeLeft = function() { return this.expTime - parseInt((new Date).getTime() / 1000) };
  199. if (tmp.raidList[id].timeLeft() < 0) delete tmp.raidList[id];
  200. }
  201. }
  202.  
  203. tmp.addRaid = function(hash,id,boss,diff,visited,user,ts,room) {
  204. if((/ /).test(user)) {
  205. var reg = new RegExp('[0-9]+|[0-9a-zA-Z_]+','g');
  206. room = reg.exec(user); user = reg.exec(user);
  207. }
  208. if (typeof SRDotDX.config.raidList[id] != 'object') {
  209. var tStamp = typeof ts == 'undefined' || ts == null ? parseInt((new Date).getTime() / 1000) : parseInt(ts);
  210. SRDotDX.config.raidList[id] = {
  211. hash: hash, id: id, boss: boss, diff: diff, visited: visited, nuked: false, user: user, lastUser: user, timeStamp: tStamp,
  212. expTime: (typeof SRDotDX.raids[boss] == 'object' ? SRDotDX.raids[boss].duration : 96) * 3600 + tStamp,
  213. timeLeft: function() {return this.expTime - parseInt((new Date).getTime() / 1000) },
  214. room: typeof room == 'undefined' || room == null ? SRDotDX.util.getRoomNumber() : parseInt(room) };
  215. SRDotDX.gui.addRaid(id);
  216. }
  217. SRDotDX.config.raidList[id].lastUser = user;
  218. return SRDotDX.config.raidList[id]
  219. };
  220. tmp.getRaid = function(id) {
  221. if (typeof SRDotDX.config.raidList[id] == 'object') {
  222. if (SRDotDX.config.raidList[id].timeLeft() > 1) return SRDotDX.config.raidList[id];
  223. delete SRDotDX.config.raidList[id];
  224. } return false
  225. };
  226. tmp.setFilter = function(raidid,diff,val) { SRDotDX.config.filters[raidid][diff] = val };
  227. tmp.save = function(b) {
  228. b = typeof b == 'undefined' ? true : b;
  229. GM_setValue('SRDotDX', JSON.stringify(SRDotDX.config));
  230. if(b) setTimeout(SRDotDX.config.save, 60000, true);
  231. else console.log('[DotDX] Manual config save invoked');
  232. };
  233. return tmp;
  234. })(),
  235. request: {
  236. importLock: false,
  237. joinAfterImport: false,
  238. fromChat: false,
  239. quickBtnLock: true,
  240. filterSearchStringT: "",
  241. raids: function(isinit,hours){
  242. if(!SRDotDX.gui.joining) {
  243. var secs = 15 - parseInt((new Date().getTime() - SRDotDX.config.lastImported)/1000);
  244. if(secs > 0) {
  245. SRDotDX.echo("You can import again in " + secs + " seconds.");
  246. return }
  247. console.log("[DotDX] Importing raids from raids server ...");
  248. if(!isinit) this.initialize("Requesting raids");
  249. else SRDotDX.request.tries++;
  250. var h = hours ? ('&h='+hours) : '';
  251. SRDotDX.request.req({
  252. eventName: "dotd.getraids",
  253. url: "http://dotdraids.pl/download.php?u="+SRDotDX.config.kongUser+h,
  254. method: "GET",
  255. headers: {"Content-Type": "application/JSON"},
  256. timeout: 30000
  257. });
  258. }
  259. },
  260. initialize: function (str) {
  261. SRDotDX.gui.doStatusOutput(str + "...",3000,true);
  262. SRDotDX.request.tries = 0;
  263. SRDotDX.request.seconds = 0;
  264. SRDotDX.request.complete = false;
  265. SRDotDX.request.timer = setTimeout(SRDotDX.request.tick, 1000, str);
  266. },
  267. tick: function (str) {
  268. if(!SRDotDX.request.complete){
  269. if(SRDotDX.request.seconds > 25){
  270. SRDotDX.gui.doStatusOutput("Request failed.",3000,true);
  271. return;
  272. }
  273. SRDotDX.request.seconds++;
  274. SRDotDX.gui.doStatusOutput(str + " ("+SRDotDX.request.seconds+")...",1500,true);
  275. SRDotDX.request.timer = setTimeout(SRDotDX.request.tick, 1000, str);
  276. }
  277. },
  278. complete: false,
  279. seconds: 0,
  280. timer: null,
  281. tries: 0,
  282. req: function(param){
  283. var a = document.createEvent("MessageEvent");
  284. if (a.initMessageEvent) a.initMessageEvent("dotd.req", false, false, JSON.stringify(param), document.location.protocol + "//" + document.location.hostname, 0, window, null);
  285. else a = new MessageEvent("dotd.req",{"origin":document.location.protocol + "//" + document.location.hostname, "lastEventId": 0, "source": window, "data": JSON.stringify(param)});
  286. document.dispatchEvent(a);
  287. },
  288. pasteImport: function (url,isinit) {
  289. if(!isinit) this.initialize("Importing PasteBin");
  290. var pb = url.split('com/')[1];
  291. SRDotDX.request.req({
  292. eventName: "dotd.importpb",
  293. url: 'http://pastebin.com/raw.php?i=' + pb,
  294. method: "GET",
  295. timeout: 30000
  296. });
  297. },
  298. init: function () {
  299. document.addEventListener("dotd.joinraid", SRDotDX.request.joinRaidResponse, false);
  300. document.addEventListener("dotd.importpb", SRDotDX.request.pbResponse, false);
  301. document.addEventListener("dotd.getraids", SRDotDX.request.addRaids, false);
  302. delete this.init;
  303. },
  304. joinRaid: function(r){
  305. if(typeof r == 'object') {
  306. if(!SRDotDX.gui.joining) SRDotDX.request.initialize("Joining " + (!SRDotDX.raids[r.boss]?r.boss.capitalize().replace(/_/g,' '):SRDotDX.raids[r.boss].shortname));
  307. var joinData = 'kongregate_username='+SRDotDX.config.kongUser+'&kongregate_user_id='+SRDotDX.config.kongId+'&kongregate_game_auth_token='+SRDotDX.config.kongAuth;
  308. SRDotDX.request.req({
  309. eventName: "dotd.joinraid",
  310. url: SRDotDX.util.stringFormat('http://50.18.191.15/kong/raidjoin.php?' + joinData + '&kv_action_type=raidhelp&kv_raid_id={0}&kv_hash={1}', r.id, r.hash),
  311. method: "GET",
  312. timeout: 30000
  313. });
  314. }
  315. },
  316. addRaids: function(e) {
  317. var r, data = JSON.parse(e.data);
  318. if(data.status != 200) {
  319. if(SRDotDX.request.tries >=3){
  320. SRDotDX.request.complete = true;
  321. SRDotDX.gui.doStatusOutput("Raids server busy. Please try again in a moment.");
  322. console.log('[DotDX] Raids request failed (url: ' + data.url + ')');
  323. console.log(JSON.stringify(data));
  324. } else {
  325. console.log("[DotDX] Raids server unresponsive (status " + data.status + "). Trying again, " + SRDotDX.request.tries + " tries.");
  326. }
  327. return;
  328. }
  329. SRDotDX.request.complete = true;
  330. try{ r = JSON.parse(data.responseText.split('<!--')[0]) }
  331. catch (ex) {
  332. console.log("[DotDX] Raids importing error or no raids imported");
  333. console.log('[DotDX] responseText: ' + data.responseText);
  334. return;
  335. }
  336. SRDotDX.gui.doStatusOutput("Importing " + r.raids.length + " raids...");
  337. var raid, j = r.raids.length, n = 0, t=0;
  338. var swt = !SRDotDX.config.importFiltered, filter = SRDotDX.gui.cHTML('#DotDX_filters').ele().innerHTML;
  339. while(j--) {
  340. raid = r.raids[j];
  341. if (swt || filter.indexOf('fltList_' + raid.b + '_' + (raid.d-1)) < 0) {
  342. t++; if (!SRDotDX.config.getRaid(raid.i)) n++, SRDotDX.config.addRaid(raid.h, raid.i, raid.b, raid.d, false, raid.p, raid.t, raid.r);
  343. }
  344. }
  345. console.log('[DotDX] Import raids from server complete');
  346. SRDotDX.gui.selectRaidsToJoin('import response');
  347. SRDotDX.config.lastImported = (new Date).getTime();
  348. var msg = 'Imported ' + t + ' raids, ' + n + ' new.';
  349. SRDotDX.echo(msg);
  350. if (SRDotDX.request.joinAfterImport) { SRDotDX.gui.selectRaidsToJoin(); SRDotDX.gui.joinSelectedRaids(false) }
  351. SRDotDX.gui.doStatusOutput(msg,5000,true);
  352. },
  353. pbResponse: function(e){
  354. var data = JSON.parse(e.data);
  355. if(data && data.responseText && data.url) {
  356. SRDotDX.request.complete = true;
  357. if(/raw/.test(data.url)) {
  358. SRDotDX.gui.importingPastebin = true;
  359. var r = data.responseText.split('|'), pbid = data.url.split('=')[1], u, i = 0;
  360. if (/\|/.test(data.responseText)) { u = r[1]; r = r[3]; } else { u = 'Unknown'; r = r[0]; }
  361. SRDotDX.gui.Importing = true;
  362. var total = Object.keys(SRDotDX.config.raidList).length;
  363. r = r.split(',');
  364. while(i < r.length) SRDotDX.getRaidDetails(r[i], u, SRDotDX.config.markImportedVisited), i++;
  365. var diff = Object.keys(SRDotDX.config.raidList).length - total;
  366. SRDotDX.gui.doStatusOutput('Import complete, ' + diff + ' of ' + i + ' new raids');
  367. var pbtot = i;
  368. SRDotDX.gui.Importing = false;
  369. var els = document.getElementsByClassName("pb_"+pbid);
  370. if(els.length > 0) {
  371. if (pbtot == 0 ) { i = 0; while (i < els.length) els[i].innerHTML = '(<a href="" onClick="return false;" onMouseDown="SRDotDX.request.pasteImport(\'http://pastebin.com/' + pbid + '\',false)">Import</a>)', i++ }
  372. else { i = 0; while (i < els.length) els[i].innerHTML='(Imported, ' + diff + ' new)', i++ }
  373. }
  374. setTimeout(SRDotDX.config.save, 1000, false);
  375. SRDotDX.gui.importingPastebin = false;
  376. console.log('[DotDX] Pastebin import complete (url: ' + data.url + ')');
  377. }
  378. }
  379. },
  380. joinRaidResponse: function(e){
  381. var data = JSON.parse(e.data);
  382. if(data && data.responseText && data.url) {
  383. SRDotDX.request.complete = true;
  384. var raidid = SRDotDX.util.getQueryVariable('kv_raid_id', data.url);
  385. SRDotDX.gui.joinRaidComplete++;
  386. var status = '', statustxt = '';
  387. if (typeof SRDotDX.config.raidList[raidid] == 'object') {
  388. SRDotDX.config.raidList[raidid].visited = true;
  389. SRDotDX.gui.toggleRaid('visited', raidid, true);
  390. SRDotDX.gui.raidListItemUpdate(raidid);
  391. if (/successfully (re-)?joined/i.test(data.responseText)) {
  392. SRDotDX.gui.joinRaidSuccessful++;
  393. statustxt = SRDotDX.raids[SRDotDX.config.raidList[raidid].boss].shortname + " joined successfully.";
  394. } else if (/already a member/i.test(data.responseText)){
  395. statustxt = "Join Failed. You are already a member.";
  396. }else if (/already completed/i.test(data.responseText)) {
  397. SRDotDX.gui.joinRaidDead++;
  398. statustxt = "Join failed. Raid is dead.";
  399. SRDotDX.nukeRaid(raidid);
  400. }else if (/not a member of the guild/i.test(data.responseText)) {
  401. SRDotDX.gui.joinRaidDead++;
  402. statustxt = "Join failed. You are not member of that Guild.";
  403. SRDotDX.nukeRaid(raidid);
  404. } else if (/(invalid|find) raid (hash|ID)/i.test(data.responseText)) {
  405. statustxt = "Join failed. Invalid hash or ID.";
  406. SRDotDX.gui.joinRaidInvalid++;
  407. SRDotDX.gui.deleteRaidFromDB(raidid);
  408. }
  409. else { statustxt = 'Unknown join response.'; }
  410. } else SRDotDX.gui.joinRaidInvalid++;
  411.  
  412. if(SRDotDX.gui.joining) {
  413. if(SRDotDX.gui.joinRaidComplete >= SRDotDX.gui.joinRaidList.length) {
  414. statustxt = "Finished joining. " + SRDotDX.gui.joinRaidSuccessful + " new, " + SRDotDX.gui.joinRaidDead + " dead.";
  415. SRDotDX.gui.joinFinish(true);
  416. setTimeout(SRDotDX.config.save, 3000, false)
  417. } else {
  418. statustxt = "Joined " + SRDotDX.gui.joinRaidComplete + " of " + SRDotDX.gui.joinRaidList.length + ". " + SRDotDX.gui.joinRaidSuccessful + " new, " + SRDotDX.gui.joinRaidDead + " dead.";
  419. if(SRDotDX.gui.joinRaidIndex < SRDotDX.gui.joinRaidList.length) SRDotDX.request.joinRaid(SRDotDX.gui.joinRaidList[SRDotDX.gui.joinRaidIndex++]);
  420. }
  421. }
  422. else {
  423. setTimeout(SRDotDX.config.save, 3000, false);
  424. }
  425. if(statustxt != '') SRDotDX.gui.doStatusOutput(statustxt, 4000, true);
  426. }
  427. }
  428. },
  429. getRaidDetailsBase: function(url) {
  430. var r = {diff: '', hash: '', boss: '', id: ''}, i;
  431. var reg = /[?&]([^=]+)=([^?&]+)/ig, p = url.replace(/&amp;/gi,'&');
  432. while ((i = reg.exec(p)) != null) {
  433. if (!r.diff && i[1] == 'kv_difficulty') r.diff = parseInt(i[2]);
  434. else if (!r.hash && i[1] == 'kv_hash') r.hash = i[2];
  435. else if (!r.boss && i[1] == 'kv_raid_boss') r.boss = i[2];
  436. else if (!r.id && i[1] == 'kv_raid_id') r.id = parseInt(i[2]);
  437. else if (i[1] != 'kv_action_type') return false;
  438. }
  439. if (typeof r != 'undefined' && typeof r.diff != 'undefined' && typeof r.hash != 'undefined' && typeof r.boss != 'undefined' && typeof r.id != 'undefined') {
  440. r.diffLongText = ['Normal','Hard','Legendary','Nightmare','Insane','Hell'][r.diff-1];
  441. r.diffShortText = ['N','H','L','NM','I','HL'][r.diff-1];
  442. var stats = SRDotDX.raids[r.boss];
  443. if (typeof stats == 'object') {
  444. r.name = stats.name;
  445. r.shortname = stats.shortname;
  446. r.size = stats.size;
  447. r.type = stats.type;
  448. r.dur = stats.duration;
  449. r.durText = stats.dur + "hrs";
  450. r.stat = stats.stat;
  451. r.statText = SRDotDX.getStatText(stats.stat);
  452. }
  453. }
  454. return r;
  455. },
  456. getPasteDetails: function(url,user) {
  457. user = user ? user : '';
  458. var pb = {url: url, id: url.substring(url.length-8)};
  459. pb.id = url.substring(url.length-8);
  460. console.log('[DotDX] Importing Pastebin (url: ' + url + ')');
  461. var info = SRDotDX.config.getPaste(pb.id);
  462. if (!info) { info = SRDotDX.config.addPaste(pb.url, pb.id, user); if(typeof info == 'object') pb.isNew = true }
  463. else pb.isNew = false;
  464. pb.user = info.user;
  465. pb.lastUser = info.lastUser;
  466. return pb;
  467. },
  468. getTierTxt: function(hp,ppl,ap){
  469. var num = hp/ppl; num = ap? num/2 : num;
  470. if (num >= 1000000000000) return (num / 1000000000000).toPrecision(3) + 't';
  471. if (num >= 1000000000) return (num / 1000000000).toPrecision(3) + 'b';
  472. if (num >= 1000000) return (num / 1000000).toPrecision(3) + 'm';
  473. if (num >= 1000) return (num / 1000).toPrecision(3) + 'k';
  474. return num + ''
  475. },
  476. getRaidDetails: function(url,user,visited,ts,room) {
  477. user = user ? user : '';
  478. var rVis = visited ? visited : user == SRDotDX.config.kongUser && SRDotDX.config.markMyRaidsVisted;
  479. var r = SRDotDX.util.getRaidFromUrl(url);
  480. if (r && typeof r.diff == 'number' && typeof r.hash == 'string' && typeof r.boss == 'string' && typeof r.id == 'string') {
  481. var filter = SRDotDX.gui.cHTML('#DotDX_filters').ele().innerHTML;
  482. r.visited = rVis;
  483. if(!SRDotDX.config.importFiltered || filter.indexOf('fltList_' + r.boss + '_' + (r.diff-1)) < 0){
  484. var info = SRDotDX.config.getRaid(r.id);
  485. if (typeof info != 'object') {
  486. info = SRDotDX.config.addRaid(r.hash, r.id, r.boss, r.diff, r.visited, user, ts, room);
  487. if (typeof info == 'object') r.isNew = true;
  488. else return null;
  489. }
  490. else r.isNew = false;
  491. r.timeStamp = info.timeStamp; r.visited = info.visited; r.nuked = info.nuked;
  492. }
  493. r.linkText = function() {
  494. var raidInfo = SRDotDX.raids[r.boss];
  495. var txt = '[' + ['','N','H','L','NM'][this.diff] + ' ';
  496. txt += raidInfo ? raidInfo.shortname : r.boss.capitalize().replace(/_/g,' ');
  497. if(SRDotDX.config.linkShowFs) txt += raidInfo ? ', fs:' + SRDotDX.getTierTxt(raidInfo.health[this.diff-1],raidInfo.size,false) : '';
  498. if(SRDotDX.config.linkShowAp) txt += raidInfo ? ', ap:' + SRDotDX.getTierTxt(raidInfo.health[this.diff-1],raidInfo.size,true) : '';
  499. txt += (this.visited || r.visited) ? '|★' : '';
  500. txt += ']';
  501. return txt
  502. };
  503. return r;
  504. }
  505. return null
  506. },
  507. getRaidLink: function(msg,user) {
  508. msg = msg.replace(/[\r\n]/g,'');
  509. var m = /^((?:(?!<a[ >]).)*)<a.*? href="((?:(?:https?:\/\/)?(?:www\.)?kongregate\.com)?\/games\/5thPlanetGames\/dawn-of-the-dragons(\?[^"]+))".*?<\/a>((?:(?!<\/?a[ >]).)*(?:<a.*? class="reply_link"[> ].*)?)$/i.exec(msg);
  510. if (m) {
  511. var raid = SRDotDX.getRaidDetails(m[3], user);
  512. if (raid) {
  513. raid.ptext = m[1]; raid.url = m[2]; raid.ntext = m[4];
  514. return raid;
  515. }
  516. }
  517. return null
  518. },
  519. getPastebinLink: function(msg,user) {
  520. msg = msg.replace(/[\r\n]/g,'');
  521. var m = /^((?:(?!<a[ >]).)*)?http:\/\/pastebin\.com\/\w{8}((?:(?!<\/?a[ >]).)*(?:<a.*? class="reply_link"[> ].*)?)$/i.exec(msg);
  522. if (m) {
  523. var pb = SRDotDX.getPasteDetails(/http:\/\/pastebin\.com\/\w{8}/i.exec(m[0]) + '',user);
  524. if(typeof pb != 'undefined') {
  525. pb.ptext = m[1] || '';
  526. pb.ntext = m[2] || '';
  527. }
  528. return pb;
  529. }
  530. else return null;
  531. },
  532. getStatText: function(stat) {
  533. stat = stat.toLowerCase();
  534. var r = '';
  535. if (stat == '?' || stat == 'Unknown') return 'Unknown';
  536. if (stat.indexOf('s') > -1) r = 'Stamina';
  537. if (stat.indexOf('h') > -1) r += (r != '' ? (stat.indexOf('e') > -1 ? ', ' : ' and ') : '') + 'Honor';
  538. if (stat.indexOf('e') > -1) r += (r != '' ? ' and ' : '') + 'Energy';
  539. return r;
  540. },
  541. getTimestamp: function() {
  542. return '('+('0'+(new Date().getHours())).slice(-2) + ':' + ('0'+(new Date().getMinutes())).slice(-2)+')';
  543. },
  544. refreshRaidTab: function() {
  545. var el_out = document.getElementById('raid_list');
  546. var el_in1 = document.getElementById('mainRaidsFrame');
  547. var el_in2 = document.getElementById('topRaidPane');
  548. el_out.style.height = el_in1.offsetHeight - el_in2.offsetHeight - 8 + 'px';
  549. },
  550. isFirefox: navigator.userAgent.indexOf('Firefox') > 0,
  551. gui: {
  552. getChatNumber: function() {
  553. var cont = document.getElementsByClassName('chat_room_template'), ele;
  554. for (var i=0; i<cont.length; i++) { ele = cont[i].getAttribute('style'); if(ele == null || ele == '') return i}
  555. return 1;
  556. },
  557. setMessagesCount: function() {
  558. var num = active_user.unreadWhispersCount() + active_user.unreadShoutsCount();
  559. var ele = document.getElementById('profile_control_unread_message_count');
  560. ele.innerHTML = num;
  561. ele.style.display = num==0 ? 'none' : 'block';
  562. setTimeout(SRDotDX.gui.setMessagesCount, 60000);
  563. },
  564. gotoRoom: function(num) {
  565. var numInt = parseInt(num);
  566. if (isNaN(numInt) || numInt < 1 || numInt > 13) holodeck.chatWindow().activateRoomChooser();
  567. else {
  568. 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+'"}');
  569. holodeck.joinRoom(roomObj);
  570. }
  571. },
  572. httpCommand: function(url){
  573. window.open(url);
  574. },
  575. applySidebarUI: function(mode) { //-1:remove, 0:redraw, 1:create, 2:recreate
  576. if(mode == -1 || mode == 2) {
  577. document.getElementById('dotdx_sidebar').remove();
  578. if (mode == -1) SRDotDX.gui.chatResize(SRDotDX.config.chatSize), document.getElementsByClassName("links_connect")[0].setAttribute('colspan','2');
  579. }
  580. if (mode > -1) {
  581. var sbElemObj, sbElemTxt, i;
  582. if (mode > 0) {
  583. if (mode == 1) document.getElementsByClassName("links_connect")[0].setAttribute('colspan','3');
  584. if(!SRDotDX.config.sbRightSide) document.getElementById('chat_container').style.marginLeft = "0px";
  585. SRDotDX.gui.cHTML('td').set({id: 'dotdx_sidebar', style: 'width: 70px'})
  586. .html('<div id="dotdx_sidebar_container"></div>',true)
  587. .attach('after',SRDotDX.config.sbRightSide?'chat_container_cell':'gameholder');
  588. SRDotDX.gui.chatResize(SRDotDX.config.chatSize);
  589. }
  590. if (mode == 0) {
  591. sbElemTxt = '[' + document.getElementById('options_sbConfig').value + ']';
  592. sbElemObj = JSON.parse(sbElemTxt);
  593. SRDotDX.config.sbConfig = sbElemObj;
  594. SRDotDX.config.save(false);
  595. }
  596. else sbElemObj = SRDotDX.config.sbConfig;
  597.  
  598. var sidebarElemHtml = "", sbCmd = "", sbCls="";
  599. for (i=0; i<sbElemObj.length; i++) {
  600. if (i == 25) break;
  601. if (typeof sbElemObj[i] == 'undefined' || sbElemObj[i] == null) { sidebarElemHtml += '<div></div>'; continue }
  602. if (sbElemObj[i].type == 'jtxt') { sidebarElemHtml += '<input id="sbJoinStr" onkeyup="SRDotDX.gui.updateFilterTxt(this.value)" class="dotdx_chat_filter" type="text" value="">'; continue }
  603. if (typeof sbElemObj[i].cmd != 'undefined') {
  604. if (sbElemObj[i].cmd.charAt(0) == '/') sbCmd = 'SRDotDX.gui.chatCommand(\''+sbElemObj[i].cmd+'\')';
  605. else if (sbElemObj[i].cmd.indexOf('://') > 2) sbCmd = 'SRDotDX.gui.httpCommand(\''+sbElemObj[i].cmd+'\')';
  606. else sbCmd = sbElemObj[i].cmd.replace("'","\'");
  607. }
  608. if (typeof sbElemObj[i].color != 'undefined') {
  609. if (sbElemObj[i].color.charAt(0).toLowerCase() == 'b' && sbElemObj[i].color.toLowerCase() != 'black') sbCls = 'class="b" ';
  610. else if (sbElemObj[i].color.charAt(0).toLowerCase() == 'g') sbCls = 'class="g" ';
  611. else if (sbElemObj[i].color.charAt(0).toLowerCase() == 'r') sbCls = 'class="r" ';
  612. else if (sbElemObj[i].color.charAt(0).toLowerCase() == 'y') sbCls = 'class="y" ';
  613. }
  614. sidebarElemHtml += '<button ' + sbCls + 'onclick="' + sbCmd + '">' + (typeof sbElemObj[i].name == 'undefined' ? ('Btn '+(i+1)) : sbElemObj[i].name) + '</button>';
  615. sbCmd = ""; sbCls="";
  616. }
  617. SRDotDX.gui.cHTML('#dotdx_sidebar_container').html(sidebarElemHtml,true);
  618. }
  619. },
  620. chatResize: function(chatSize) {
  621. SRDotDX.config.chatSize = chatSize;
  622. var sbWidth = SRDotDX.config.sbEnable ? 70 : 0;
  623. var chatWidthInc = chatSize - 300;
  624. var chatCorr = chatWidthInc/75*2;
  625. var overallWidth = (1063 + sbWidth + chatWidthInc) + "px";
  626. document.getElementById('maingame').style.width = overallWidth;
  627. document.getElementById('maingamecontent').style.width = overallWidth;
  628. document.getElementById('flashframecontent').style.width = overallWidth;
  629. document.getElementById('chat_container').style.width = chatSize + "px";
  630. document.getElementById('chat_tab_pane').style.width = (chatSize - 16) + "px";
  631. document.getElementById('DotDX_chatResizeElems').innerHTML = '#kong_game_ui textarea.chat_input { width: ' + (chatSize - 30) + 'px !important; }\
  632. #kong_game_ui div#chat_raids_overlay { width: ' + (chatSize - 8) + 'px }\
  633. #kong_game_ui div#chat_raids_overlay > span { width: ' + (chatSize - 18 - chatCorr) + 'px }\
  634. div#dotdx_sidebar_container { ' + (SRDotDX.config.sbRightSide?"text-align: left; padding-left: 1px":"text-align: right; margin-left: 2px; padding-right: 1px") + ' }';
  635. },
  636. helpBox: function(boxId,raidId,mouseOut) {
  637. var boxDiv = document.getElementById(boxId);
  638. if (mouseOut) SRDotDX.gui.CurrentRaidsOutputTimer = setTimeout(function(){document.getElementById('chat_raids_overlay').className = "";}, 1500); //setTimeout(elfade, 1500, boxId, 750, false);//fadeEffect.init(boxId, 0);//boxDiv.style.display = 'none';
  639. else {
  640. var info = SRDotDX.config.getRaid(raidId), msg = 'Unknown';
  641. var raid = (info == null || typeof SRDotDX.raids[info.boss] == 'undefined') ? {name:'Unknown'} : SRDotDX.raids[info.boss];
  642. if (raid.name != 'Unknown') {
  643. var diff = info.diff-1;
  644. msg = '<span style="font-size: 12px;">' + raid.name + ' on ' + ['Normal','Hard','Legendary','Nightmare','Insane','Hell'][diff] + '</span><br>';
  645. msg += (raid.type == '' ? '' : raid.type + ' | ') + SRDotDX.raidSizes[raid.size].name + ' Raid' + (diff == 3 ? ' | AP' : '');
  646. var size = raid.size < 15 ? 10 : raid.size;
  647. var fs = raid.health[diff] / (raid.size==101?100:raid.size);
  648. if (typeof raid.lt != 'object') {
  649.  
  650. var epicRatio = SRDotDX.raidSizes[size].ratios;
  651. 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]);
  652. 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]);
  653. //msg += '<br>2e: ' + epicRatio[2] + ' | 3e: ' + epicRatio[4] + ' | fs: ' + fs;
  654. }
  655. else if (typeof raid.lt == 'object') {
  656. var ele = SRDotDX.lootTiers[raid.lt[diff]];
  657. var step = SRDotDX.config.chatSize == 450 ? 6 : (SRDotDX.config.chatSize == 375 ? 5 : 4);
  658. var steplow = step - 1;
  659. var tiers = ele['tiers'];
  660. var epics = ele['epics'];
  661. var best = ele['best'];
  662. var e = ele['e']?'e':'';
  663. var text = ''; var i = tiers.length;
  664. while (i--) text = (i%step == steplow ? '<br>' : (i > 0 && tiers[i-1].charAt(5)=='b'? '&thinsp; | ' : ' | ') ) + (i==best?'<u>':'') + epics[i] + (epics[i]<10?(e+':&#8192; '):(e+': '))+ tiers[i] + (i==best?'</u>':'') + text;
  665. msg += ' | Tiered<br>fs: &nbsp;&nbsp;&thinsp;' + SRDotDX.util.getShortNum(fs) + '' + text;
  666. }
  667. else {}
  668. }
  669. document.getElementById(boxId + '_text').innerHTML = msg;
  670. if (!(boxDiv.className.indexOf('active') > 0)) boxDiv.className = "active";
  671. clearTimeout(SRDotDX.gui.CurrentRaidsOutputTimer);
  672. }
  673. },
  674. displayHint: function(hint) {
  675. var helpEl = document.getElementById('helpBox');
  676. if (hint) {
  677. helpEl.innerHTML = hint;
  678. //helpEl.style.display = 'block';
  679. helpEl.style.marginTop = '-' + helpEl.offsetHeight + 'px';
  680. }
  681. else helpEl.style.marginTop = '3px';
  682. },
  683. refreshRaidList: function() {
  684. document.getElementById('raid_list').innerHTML = "";
  685. for (var i=0; i<SRDotDX.gui.joinRaidList.length; i++) SRDotDX.gui.addRaid(SRDotDX.gui.joinRaidList[i]);
  686. },
  687. addRaid: function(id) {
  688. var r = typeof id == 'string' || typeof id == 'number' ? SRDotDX.config.raidList[id] : id;
  689. var a = document.getElementById('raid_list');
  690. if (r.boss) {
  691. if (typeof a != 'undefined' && a) {
  692. var rd = typeof SRDotDX.raids[r.boss] != 'object' ? {name: 'Unknown'} : SRDotDX.raids[r.boss];
  693. 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;
  694. //var filterClass = ' DotDX_fltList_' + rd.id + '_' + (r.diff - 1);
  695. var diffClass = '', diffText = '';
  696. switch(r.diff) {
  697. case 1: diffClass = " DotDX_N"; diffText = "N"; break;
  698. case 2: diffClass = " DotDX_H"; diffText = "H"; break;
  699. case 3: diffClass = " DotDX_L"; diffText = "L"; break;
  700. case 4: diffClass = " DotDX_NM"; diffText = "NM"; break;
  701. }
  702. var lii = SRDotDX.gui.cHTML('div').set({
  703. class: 'raid_list_item' + diffClass + (r.visited ? ' DotDX_visitedRaidList' : '') + (r.nuked ? ' DotDX_nukedRaidList' : ''),
  704. id: 'DotDX_'+ r.id,
  705. raidid: r.id
  706. }).html(' \
  707. <span class="DotDX_RaidListVisited">' + (r.visited ? '&#9733;' : '') + '</span> \
  708. <a class="DotDX_RaidLink" href="' + url + '">' + rd.name + '</a> \
  709. <span class="DotDX_List_diff' + diffClass + '">' + diffText + '</span> \
  710. <a class="dotdxRaidListDelete" style="float:right; display: inline" href="#">DEL</a>\
  711. ', true);
  712. if (SRDotDX.config.newRaidsAtTopOfRaidList) {
  713. var arr = a.getElementsByClassName('raid_list_item');
  714. if (arr.length > 0) lii.attach('before', arr[0]); else lii.attach('to', a);
  715. }
  716. else lii.attach('to', a);
  717. }
  718. }
  719. else delete SRDotDX.config.raidList[id];
  720. },
  721. toggleRaidListDesc: function(el,mode) {
  722. if (mode) { clearTimeout(el.timerout); el.timerin = setTimeout(function(){el.lastElementChild.style.display = "block";},500) }
  723. else { clearTimeout(el.timerin); el.timerout = setTimeout(function(){el.lastElementChild.style.display = "none";},50) }
  724. return false;
  725. },
  726. cHTML: function(ele) {
  727. function Cele(ele) {
  728. this._ele = ele;
  729. this.ele = function() { return this._ele };
  730. this.set = function(param) { for (var attr in param) if (param.hasOwnProperty(attr)) this._ele.setAttribute(attr, param[attr]); return this };
  731. this.text = function(text) { this._ele.appendChild(document.createTextNode(text)); return this };
  732. this.html = function(text,overwrite) { this._ele.innerHTML = overwrite ? text : this._ele.innerHTML + text; return this };
  733. this.on = function(event,func,bubble) { this._ele.addEventListener(event,func,bubble); return this };
  734. this.attach = function(method,ele) {
  735. if (typeof ele == 'string') ele = document.getElementById(String(ele));
  736. if (!(ele instanceof Node)) throw 'Invalid attachment element specified';
  737. else if (!/^(?:to|before|after)$/i.test(method)) throw 'Invalid append method specified';
  738. else if (method == 'to') ele.appendChild(this._ele);
  739. else if (method == 'before') ele.parentNode.insertBefore(this._ele, ele);
  740. else if (typeof ele.nextSibling == 'undefined') ele.parentNode.appendChild(this._ele);
  741. else ele.parentNode.insertBefore(this._ele, ele.nextSibling);
  742. return this
  743. };
  744. }
  745. if (typeof ele == 'string') ele = /^#/i.test(String(ele)) ? document.getElementById(ele.substring(1)) : document.createElement(String(ele));
  746. if (ele instanceof Node) return new Cele(ele);
  747. throw 'Invalid element type specified';
  748. },
  749. errorMessage: function(s,tag) { tag = typeof tag == 'undefined' ? 'b' : tag; SRDotDX.gui.doStatusOutput('<'+tag+'>'+s+'</'+tag+'>') },
  750. updateMessage: function() { SRDotDX.gui.doStatusOutput(SRDotDX.gui.standardMessage(), false, true) },
  751. postingMessage: function(i,ct) { SRDotDX.gui.doStatusOutput('Posting message ' + i + (typeof ct == 'undefined' ? '' : ' of ' + ct + '...'), false) },
  752. standardMessage: function() { return Object.keys(SRDotDX.config.raidList).length + ' raids in db, ' + SRDotDX.gui.joinRaidList.length + ' selected to join'; },
  753. CurrentStatusOutputTimer: 0,
  754. doStatusOutput: function(str,msecs,showInChat) {
  755. showInChat = typeof showInChat == 'undefined' ? true : showInChat;
  756. msecs = typeof msecs == 'undefined' ? 4000 : msecs;
  757. var el = document.getElementById('StatusOutput');
  758. var el2 = document.getElementById('dotdx_chat_overlay');
  759. el.innerHTML = str;
  760. if (showInChat) {
  761. el2.innerHTML = str;
  762. }
  763. if (msecs) {
  764. if (SRDotDX.gui.CurrentStatusOutputTimer) clearTimeout(SRDotDX.gui.CurrentStatusOutputTimer);
  765. SRDotDX.gui.CurrentStatusOutputTimer = setTimeout(function(){ el.innerHTML = SRDotDX.gui.standardMessage(); el2.innerHTML = SRDotDX.gui.standardMessage() }, msecs);
  766. }
  767. },
  768. toggleDisplay: function(elem,sender,el2) {
  769. if (typeof elem == 'undefined') return;
  770. var el = document.getElementById(elem);
  771. var alls = document.getElementsByName(sender.getAttribute('name'));
  772. if(alls.length > 0) {
  773. for (var i = 0; i < alls.length; i++) {
  774. if(alls[i].nodeName == 'P') alls[i].getElementsByTagName('span')[0].innerHTML = '+';
  775. else alls[i].style.display = 'none';
  776. }
  777. el.style.display = 'block'; sender.getElementsByTagName('span')[0].innerHTML = '&minus;';
  778. }
  779. else {
  780. if (el.style.display == 'none') {
  781. el.style.display = 'block'; sender.getElementsByTagName('span')[0].innerHTML = '&minus;';
  782. }
  783. else {
  784. el.style.display = 'none'; sender.getElementsByTagName('span')[0].innerHTML = '+';
  785. }
  786. }
  787. if (typeof el2 == 'string') {
  788. switch(el2) {
  789. case 'raid_list': SRDotDX.refreshRaidTab(); break;
  790. case 'share_list': document.getElementById('DotDX_raidsToSpam').style.height = ( 532 - document.getElementById('FPXShare').offsetHeight - document.getElementById('FPXImport').offsetHeight ) + "px";
  791. }
  792. }
  793. },
  794. Importing: false,
  795. FPXimportRaids: function(save) {
  796. var linklist = document.FPXRaidSpamForm.FPXRaidSpamInput.value;
  797. if (linklist.length > 10) {
  798. save = typeof save == 'undefined' ? true : save;
  799. console.log('[SRDotDX] Import started');
  800. SRDotDX.gui.Importing = true;
  801. document.FPXRaidSpamForm.FPXRaidSpamInput.value = '';
  802. var link, tagged = false, haspb = false, imct = 0;
  803. var total = document.getElementById('raid_list').childNodes.length;
  804. var patt = new RegExp('http...www.kongregate.com.games.5thPlanetGames.dawn.of.the.dragons.[\\w\\s\\d_=&]+[^,]', 'ig');
  805. if (linklist.indexOf('!!OBJECT_IMPORT!!') > -1) {
  806. var objs = linklist.split(';'), obj;
  807. if (SRDotDX.config.confirmForLargePaste && SRDotDX.gui.importingPastebin && objs.length > SRDotDX.config.confirmPasteSize && !confirm('This pastebin import exceeds ' + SRDotDX.config.confirmPasteSize + ' raids. Continue with import?')) return false;
  808. console.log('[SRDotDX] Objects importing ' + objs.length);
  809. tagged = true;
  810. while (imct < objs.length) {
  811. obj = objs[imct].split(',');
  812. if (obj.length == 4) {
  813. console.log('[SRDotDX] Object importing ' + imct + ': ' + obj[2] + ' : ' + obj[1] + ' : ' + obj[3]);
  814. SRDotDX.getRaidDetails(obj[0], obj[2], SRDotDX.config.markImportedVisited, obj[1], obj[3]);
  815. }
  816. imct++;
  817. }
  818. }
  819. if (!tagged) {
  820. if(SRDotDX.config.confirmForLargePaste && SRDotDX.gui.importingPastebin && linklist.split(',').length > SRDotDX.config.confirmPasteSize && !confirm('This pastebin import exceeds '+SRDotDX.config.confirmPasteSize+' raids. Continue with import?')) return false;
  821. while(link = patt.exec(linklist)) {
  822. imct++; SRDotDX.getRaidDetails(link+'', 'PasteBin', SRDotDX.config.markImportedVisited);
  823. }
  824. }
  825. var pbpatt = new RegExp('http...pastebin.com.\\w{8}', 'ig');
  826. while (link = pbpatt.exec(linklist)) { haspb = true; SRDotDX.request.pasteImport(link) }
  827. if (!haspb) {
  828. var diff = document.getElementById('raid_list').childNodes.length - total;
  829. SRDotDX.gui.doStatusOutput('Import complete, ' + diff + ' of ' + imct + ' new raids');
  830. }
  831. SRDotDX.gui.Importing = false;
  832. if (save) setTimeout(SRDotDX.config.save, 250, false);
  833. return {totalnew: diff, total: imct}
  834. }
  835. return false;
  836. },
  837. deleteRaid: function(ele) {
  838. var id = ele.getAttribute('raidid');
  839. SRDotDX.gui.deleteRaidFromDB(id);
  840. ele.parentNode.removeChild(ele);
  841. },
  842. deleteRaidFromDB: function(id) {
  843. SRDotDX.gui.toggleRaid('nuked', id, true);
  844. if (SRDotDX.config.raidList[id]) delete SRDotDX.config.raidList[id];
  845. },
  846. FPXdeleteAllRaids: function() {
  847. 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.)')) {
  848. for (var id in SRDotDX.config.raidList) if (SRDotDX.config.raidList[id]) delete SRDotDX.config.raidList[id];
  849. var raidlistDIV = document.getElementById('raid_list');
  850. while (raidlistDIV.hasChildNodes()) raidlistDIV.removeChild(raidlistDIV.lastChild);
  851. localStorage.removeItem('raidList');
  852. SRDotDX.gui.updateMessage();
  853. console.log('[SRDotDX] Delete all raids finished.');
  854. }
  855. },
  856. chatCommand: function(text) {
  857. var elems = document.getElementsByClassName('chat_input');
  858. var txt = [], i = elems.length;
  859. while (i--) { txt[i] = elems[i].value; elems[i].value = text }
  860. holodeck.activeDialogue().sendInput();
  861. i = txt.length;
  862. while (i--) elems[i].value = txt[i];
  863. },
  864. FPXdoWork: function(param1, whisper) {
  865. //console.log('[DotDX] Posting to chat: ' + (/^http/.test(param1) ? '(url: ' + param1 + ')' : param1) );
  866. //var matchClass = 'chat_input';
  867. var elems = document.getElementsByClassName('chat_input');
  868. if (whisper && whisper != '') {
  869. //console.log('[DotDX] Whispering spam to: ' + SRDotDX.config.whisperTo);
  870. param1 = '/w ' + whisper + ' ' + param1;
  871. }
  872. var txt = [], i = elems.length;
  873. while (i--) { txt[i] = elems[i].value; elems[i].value = param1 }
  874. holodeck.activeDialogue().sendInput();
  875. i = txt.length;
  876. while (i--) elems[i].value = txt[i];
  877. },
  878. FPXformatRaidOutput: function(url) {
  879. var pre = ''; //user && room ? '['+room+'|'+user+'] ' : '';
  880. if (!SRDotDX.config.formatLinkOutput) return pre + url;
  881. var r = SRDotDX.getRaidDetailsBase(String(url));
  882. return pre + r.shortname + ' ' + r.diffShortText + ' ' + url;
  883. },
  884. isPosting: false,
  885. FPXTimerArray: [],
  886. FPXStopPosting: function() {
  887. SRDotDX.gui.endSpammingRaids();
  888. console.log('[DotDX] Spamming raids to chat... [cancelled]');
  889. SRDotDX.echo('Raid posting cancelled');
  890. },
  891. endSpammingRaids: function() {
  892. var i = SRDotDX.gui.FPXTimerArray.length;
  893. while (i--) clearTimeout(SRDotDX.gui.FPXTimerArray[i]);
  894. SRDotDX.gui.isPosting = false;
  895. document.getElementById('PostRaidsButton').value = 'Post';
  896. document.getElementById('dotdx_share_post_button').value = 'Post Links to Chat';
  897. document.getElementById('dotdx_share_post_button').value = 'Friend Share links';
  898. SRDotDX.gui.doStatusOutput('Posting raids finished');
  899. SRDotDX.gui.FPXTimerArray = [];
  900. SRDotDX.config.save(false);
  901. },
  902. prepareSpammingRaids: function() {
  903. SRDotDX.gui.isPosting = true;
  904. document.getElementById('PostRaidsButton').value = 'Cancel';
  905. document.getElementById('dotdx_share_post_button').value = 'Cancel';
  906. document.getElementById('dotdx_friend_post_button').value = 'Cancel';
  907. SRDotDX.gui.doStatusOutput('Posting raids started', false);
  908. },
  909. spamRaidsToFriends: function() {
  910. SRDotDX.gui.prepareSpammingRaids();
  911. var userList = [[],[],[],[],[]], i;
  912. for (user in SRDotDX.config.friendUsers) {
  913. for(i=0;i<5;i++) if(SRDotDX.config.friendUsers[user][i]) userList[i].push(user);
  914. }
  915. console.log('[DotDX] Spamming raids to friends... [started]');
  916. try {
  917. var linkList = document.getElementById('DotDX_raidsToSpam').value;
  918. if (linkList.length > 10) {
  919. console.log('[DotDX] [If length went trough]');
  920. document.getElementById('DotDX_raidsToSpam').value = '';
  921. var patt = new RegExp('http...www.kongregate.com.games.5thPlanetGames.dawn.of.the.dragons.[\\w\\s\\d_=&]+[^,]', 'ig');
  922. var link, ct = 0, sel = 4, r, rs, u; i=0;
  923. var timer = 500, ttw = 3050;
  924. var total = linkList.split(patt).length-1;
  925. console.log('[DotDX] [Just before while]');
  926. while((link = patt.exec(linkList)) && SRDotDX.gui.isPosting) {
  927. console.log('[DotDX] [After while]');
  928. r = SRDotDX.util.getRaidFromUrl(link.toString());
  929. rs = SRDotDX.raids[r.boss].size;
  930. if (r.boss == 'serpina') sel = 0;
  931. else if (rs < 26) sel = 1;
  932. else if (rs == 50) sel = 2;
  933. else if (rs == 100) sel = 3;
  934. console.log('[DotDX] [If before user for]');
  935. if (userList[sel].length > 0) {
  936. for(u=0;u<userList[sel].length;u++) {
  937. console.log('[DotDX] [Inside user for]');
  938. ( function(p1,p2) {
  939. return SRDotDX.gui.FPXTimerArray[i] = setTimeout(function() { if (!SRDotDX.gui.isPosting) return;
  940. SRDotDX.gui.FPXdoWork(SRDotDX.gui.FPXformatRaidOutput(p1), p2);
  941. ++ct; SRDotDX.gui.postingMessage(ct, i);
  942. },timer); })(link,userList[sel][u]);
  943. timer += ttw; i++;
  944. }
  945. }
  946. }
  947. }
  948. SRDotDX.gui.FPXTimerArray[SRDotDX.gui.FPXTimerArray.length] = setTimeout(function() { SRDotDX.gui.endSpammingRaids(); console.log('[DotDX] Spamming raids to friends... [stopped]'); }, timer);
  949. }
  950. catch(ex) { console.log('[DotDX] Spamming raids to friends... [error]: ' + ex) }
  951. },
  952. FPXspamRaids: function() {
  953. SRDotDX.gui.prepareSpammingRaids();
  954. console.log('[DotDX] Spamming raids to chat... [started]');
  955. try {
  956. var linkList = document.getElementById('DotDX_raidsToSpam').value;
  957. if (linkList.length > 10) {
  958. document.getElementById('DotDX_raidsToSpam').value = '';
  959. var patt = new RegExp('http...www.kongregate.com.games.5thPlanetGames.dawn.of.the.dragons.[\\w\\s\\d_=&]+[^,]', 'ig');
  960. var link, ct = 0, i=0;
  961. var timer = 500, ttw = 3050;
  962. var total = linkList.split(patt).length-1;
  963. while((link = patt.exec(linkList)) && SRDotDX.gui.isPosting) {
  964. ( function(p1) {
  965. return SRDotDX.gui.FPXTimerArray[i] = setTimeout(function() { if (!SRDotDX.gui.isPosting) return;
  966. SRDotDX.gui.FPXdoWork(SRDotDX.gui.FPXformatRaidOutput(p1), SRDotDX.config.whisperTo);
  967. ++ct; SRDotDX.gui.postingMessage(ct, total);
  968. },timer); })(link);
  969. timer += ttw; i++;
  970. }
  971. }
  972. SRDotDX.gui.FPXTimerArray[SRDotDX.gui.FPXTimerArray.length] = setTimeout(function() { SRDotDX.gui.endSpammingRaids(); console.log('[DotDX] Spamming raids to chat... [stopped]'); }, timer);
  973. }
  974. catch(ex) { console.log('[DotDX] Spamming raids to chat... [error]: ' + ex) }
  975. },
  976. quickImportAndJoin: function(joinStr,imp) {
  977. SRDotDX.gui.updateFilterTxt(joinStr,false,true);
  978. SRDotDX.request.quickBtnLock = false;
  979. if (imp) SRDotDX.request.joinAfterImport = true, SRDotDX.gui.importFromServer();
  980. else SRDotDX.gui.joinSelectedRaids();
  981. },
  982. importFromServer: function() {
  983. var h = Math.ceil(((new Date).getTime() - SRDotDX.config.lastImported)/3600000);
  984. SRDotDX.echo('Importing raids from server');
  985. SRDotDX.request.raids(false,h);
  986. },
  987. importingPastebin: false,
  988. FPXSortRaids: function() {
  989. var raidArray = [], i, sortFunc;
  990. var selectedSort = document.getElementById('FPXRaidSortSelection').value;
  991. var selectedDir = document.getElementById('FPXRaidSortDirection').value;
  992. var raidlistDIV = document.getElementById('raid_list');
  993. var raidList = raidlistDIV.childNodes;
  994. console.log('[SRDotDX] Sorting started ' + selectedSort + ' : ' + selectedDir);
  995. i = raidList.length;
  996. while (i--) raidArray.push( SRDotDX.config.raidList[raidList[i].getAttribute('raidid')] );
  997. switch(selectedSort) {
  998. case 'Id':
  999. if (selectedDir == 'asc') sortFunc = function(a,b) {
  1000. if (!(typeof a.id === 'undefined' || typeof b.id === 'undefined') && a.id > b.id) return -1;
  1001. return 1;
  1002. };
  1003. else sortFunc = function(a,b) {
  1004. if (!(typeof a.id === 'undefined' || typeof b.id === 'undefined') && a.id < b.id) return -1;
  1005. return 1;
  1006. };
  1007. break;
  1008. case 'Time':
  1009. if (selectedDir == 'asc') sortFunc = function(a,b) {
  1010. if (!(typeof a.timeStamp === 'undefined' || typeof b.timeStamp === 'undefined') && a.timeStamp > b.timeStamp) return -1;
  1011. return 1;
  1012. };
  1013. else sortFunc = function(a,b) {
  1014. if (!(typeof a.timeStamp === 'undefined' || typeof b.timeStamp === 'undefined') && a.timeStamp < b.timeStamp) return -1;
  1015. return 1;
  1016. };
  1017. break;
  1018. case 'Name':
  1019. if (selectedDir == 'asc') sortFunc = function(a,b) {
  1020. a = SRDotDX.raids[a.boss]; b = SRDotDX.raids[b.boss];
  1021. //console.log(a + ' : ' + b + ' : ' + (typeof a === 'undefined') + ' : ' + (typeof b === 'undefined'));
  1022. if (!(typeof a === 'undefined' || typeof b === 'undefined') && a.name > b.name) return -1;
  1023. return 1;
  1024. };
  1025. else sortFunc = function(a,b) {
  1026. a = SRDotDX.raids[a.boss]; b = SRDotDX.raids[b.boss];
  1027. if (!(typeof a === 'undefined' || typeof b === 'undefined') && a.name < b.name) return -1;
  1028. return 1;
  1029. };
  1030. break;
  1031. case 'Diff':
  1032. if (selectedDir == 'asc') sortFunc = function(a,b) { if (a.diff > b.diff) return -1; return 1 };
  1033. else sortFunc = function(a,b) { if (a.diff < b.diff) return -1; return 1 };
  1034. break;
  1035. }
  1036. try { raidArray.sort(sortFunc) }
  1037. catch(e) { console.log('[SRDotDX] Sorting error: ' + e); return }
  1038. raidlistDIV = document.getElementById('raid_list');
  1039. while (raidlistDIV.hasChildNodes()) raidlistDIV.removeChild(raidlistDIV.lastChild);
  1040. i = raidArray.length;
  1041. while (i--) SRDotDX.gui.addRaid(raidArray[i]);
  1042. //SRDotDX.gui.FPXFilterRaidListByName();
  1043. console.log('[SRDotDX] Sorting finished');
  1044. },
  1045. GetRaid: function(id) {
  1046. if (isNumber(id)) {
  1047. var raidList = document.getElementById('raid_list').childNodes;
  1048. var i = raidList.length, item;
  1049. while (i--) {
  1050. item = raidList[i];
  1051. if (item.getAttribute('raidid') == id) { var raid = JSON.parse(JSON.stringify(SRDotDX.config.raidList[id])); raid.ele = item; return raid }
  1052. }
  1053. }
  1054. return null
  1055. },
  1056. joinRaidList: [],
  1057. postRaidList: [],
  1058. updateFilterTimeout: null,
  1059. filterSearchStringC: "",
  1060. filterSearchStringR: "",
  1061. updateFilterContext: true,
  1062. includeDiff: function(str,dv) {
  1063. var diff = isNaN(parseInt(dv)) ? ({'n':1,'h':2,'l':3,'nm':4,'nnm':0})[dv] || 5 : parseInt(dv);
  1064. var out = "";
  1065. var string = str.toString();
  1066. switch (diff) {
  1067. case 0: out = string.replace(/,|$/g,'_1,') + string.replace(/,|$/g,'_4,'); break;
  1068. case 1: case 2: case 3: case 4: out = string.replace(/,|$/g,'_' + diff + ','); break;
  1069. default: for (var i=1; i<=4; i++) out += string.replace(/,|$/g,'_' + i + ','); break;
  1070. }
  1071. return out.slice(0,-1);
  1072. },
  1073. updateFilterTxt: function(txt,fromRT,quick) {
  1074. clearTimeout(this.updateFilterTimeout);
  1075. var foundRaids = [], field, rf, i;
  1076. if (txt != "") {
  1077. var searchArray = txt.split(/\s?\|\s?|\sor\s|\s?,\s?/ig);
  1078. console.log('[DotDX] Pattern split: ' + searchArray);
  1079. for (i=0; i<searchArray.length; i++) {
  1080. field = searchArray[i].toLowerCase().split(':');
  1081. if (field[0] != "") {
  1082. if (typeof SRDotDX.searchPatterns[field[0]] != 'undefined') foundRaids.push(this.includeDiff(SRDotDX.searchPatterns[field[0]],field[1]));
  1083. else if (typeof SRDotDX.raids[field[0]] != 'undefined') foundRaids.push(this.includeDiff(field[0],field[1]));
  1084. else {
  1085. for (var key in SRDotDX.raids) {
  1086. rf = (SRDotDX.raids[key].name + ':' + SRDotDX.raids[key].shortname + ':' + SRDotDX.raids[key].type).toLowerCase();
  1087. if (rf.indexOf(field[0]) >= 0) foundRaids.push(this.includeDiff(key,field[1]));
  1088. }
  1089. }
  1090. }
  1091. }
  1092. }
  1093. var finalSearchString = foundRaids.length == 0 ? "" : "," + foundRaids.toString() + ",";
  1094. console.log('[DotDX] Raids to join from ' + (fromRT?'Raids':'Chat') + ' tab: ' + foundRaids);
  1095. if (fromRT) {
  1096. SRDotDX.config.lastFilter = txt;
  1097. SRDotDX.config.filterSearchStringR = finalSearchString;
  1098. }
  1099. else if (quick) {
  1100. SRDotDX.request.filterSearchStringT = finalSearchString;
  1101. }
  1102. else {
  1103. var filterInputs = document.getElementsByClassName('dotdx_chat_filter');
  1104. for (i=0; i<filterInputs.length; i++) if(filterInputs[i].value != txt) filterInputs[i].value = txt;
  1105. SRDotDX.config.chatFilterString = txt;
  1106. SRDotDX.config.filterSearchStringC = finalSearchString;
  1107. //this.joinRaidFromChat = true;
  1108. }
  1109. if(quick) { SRDotDX.gui.selectRaidsToJoin('quick'); SRDotDX.config.save(false) }
  1110. else { this.updateFilterTimeout = setTimeout(function(){SRDotDX.gui.selectRaidsToJoin(); SRDotDX.config.save(false)},300) }
  1111. },
  1112. selectRaidsToJoin: function(from) {
  1113. if (SRDotDX.request.quickBtnLock) {
  1114. if (!SRDotDX.gui.joining) SRDotDX.gui.joinRaidList.length = 0;
  1115. SRDotDX.gui.updateFilterContext = document.getElementById('chat_tab').firstChild.className == 'active';
  1116. var searchString = from && from == 'quick' ? SRDotDX.request.filterSearchStringT : (SRDotDX.gui.updateFilterContext && SRDotDX.config.chatFilterString != "" ? SRDotDX.config.filterSearchStringC : SRDotDX.config.filterSearchStringR);
  1117. var r, c = 0, filter = SRDotDX.gui.cHTML('#DotDX_filters').ele().innerHTML;
  1118. for (var raid in SRDotDX.config.raidList) {
  1119. r = SRDotDX.config.raidList[raid];
  1120. if( SRDotDX.config.fltShowAll || (
  1121. (SRDotDX.config.fltShowNuked ? r.nuked : !r.nuked && (SRDotDX.config.fltIncVis || !r.visited)) &&
  1122. filter.indexOf('fltList_' + r.boss + '_' + (r.diff-1)) < 0 &&
  1123. (searchString == "" || searchString.indexOf("," + r.boss + "_" + r.diff + ",") >= 0) ) )
  1124. //try { SRDotDX.gui.joinRaidList.push(JSON.parse(JSON.stringify(r))) } catch(ex){}
  1125. try { SRDotDX.gui.joinRaidList.push(r) } catch(ex){}
  1126. }
  1127.  
  1128. if(!SRDotDX.gui.joining) SRDotDX.gui.updateMessage(), SRDotDX.gui.refreshRaidList();
  1129. }
  1130. },
  1131. pushRaidToJoinQueue: function(id) {
  1132. var searchString = SRDotDX.gui.updateFilterContext && SRDotDX.config.chatFilterString != "" ? SRDotDX.config.filterSearchStringC : SRDotDX.config.filterSearchStringR;
  1133. var r, filter = SRDotDX.gui.cHTML('#DotDX_filters').ele().innerHTML;
  1134. r = SRDotDX.config.raidList[id];
  1135. if( SRDotDX.config.fltShowAll || (
  1136. (SRDotDX.config.fltShowNuked ? r.nuked : !r.nuked && (SRDotDX.config.fltIncVis || !r.visited)) &&
  1137. filter.indexOf('fltList_' + r.boss + '_' + (r.diff-1)) < 0 &&
  1138. (searchString == "" || searchString.indexOf("," + r.boss + "_" + r.diff + ",") >= 0) ) )
  1139. try { SRDotDX.gui.joinRaidList.push(JSON.parse(JSON.stringify(r))) } catch(ex){}
  1140. },
  1141. joining: false,
  1142. joinRaidIndex: 0,
  1143. joinRaidComplete: 0,
  1144. joinRaidSuccessful: 0,
  1145. joinRaidDead: 0,
  1146. joinRaidInvalid: 0,
  1147. joinSelectedRaids: function (fromChat) {
  1148. if (!this.joining) {
  1149. this.joining = true;
  1150. this.joinRaidIndex = 0;
  1151. this.joinRaidComplete = 0;
  1152. this.joinRaidSuccessful = 0;
  1153. this.joinRaidDead = 0;
  1154. this.joinRaidInvalid = 0;
  1155. if (SRDotDX.gui.joinRaidList.length == 0) { this.joinFinish(true); return }
  1156. SRDotDX.gui.cHTML("#AutoJoinVisibleButton").ele().value = 'Cancel';
  1157. SRDotDX.gui.cHTML("#AutoImpJoinVisibleButton").ele().value = 'Cancel';
  1158. console.log('[DotDX] Hyperfast joining ' + SRDotDX.gui.joinRaidList.length + ' raids');
  1159. while(SRDotDX.gui.joinRaidIndex < Math.min(30,SRDotDX.gui.joinRaidList.length)) SRDotDX.request.joinRaid(SRDotDX.gui.joinRaidList[SRDotDX.gui.joinRaidIndex++]);
  1160. }
  1161. else if (!fromChat) this.joinFinish();
  1162. },
  1163. joinFinish: function(recalc){
  1164. this.joining = false;
  1165. SRDotDX.request.quickBtnLock = true;
  1166. SRDotDX.gui.cHTML("#AutoJoinVisibleButton").ele().value = 'Join';
  1167. SRDotDX.gui.cHTML("#AutoImpJoinVisibleButton").ele().value = 'Import & Join';
  1168. //this.joinRaidList = [];
  1169. if (recalc) this.selectRaidsToJoin('joining finish');
  1170. },
  1171. refreshFriends: function() {
  1172. var content="", ff, i= 0, f=false, friend;
  1173. var parentDiv = SRDotDX.gui.cHTML('#FPXfsOptions');
  1174. 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);
  1175. for (friend in SRDotDX.config.friendUsers) {
  1176. ff = SRDotDX.config.friendUsers[friend];
  1177. content += (f?'<br>':'')+'<span class="generic">' + friend + '</span>' +
  1178. '<input type="checkbox" id="fs:' + friend + ':0' + '"/><label for="fs:' + friend + ':0' + '"></label>'+
  1179. '<input type="checkbox" id="fs:' + friend + ':1' + '"/><label for="fs:' + friend + ':1' + '"></label>'+
  1180. '<input type="checkbox" id="fs:' + friend + ':2' + '"/><label for="fs:' + friend + ':2' + '"></label>'+
  1181. '<input type="checkbox" id="fs:' + friend + ':3' + '"/><label for="fs:' + friend + ':3' + '"></label>'+
  1182. '<input type="checkbox" id="fs:' + friend + ':4' + '"/><label for="fs:' + friend + ':4' + '"></label>';
  1183. f=true;
  1184. }
  1185. parentDiv.html('<div style="overflow-y: scroll; width: 277px; height: 420px">'+content+'</div>',false);
  1186. for (friend in SRDotDX.config.friendUsers) {
  1187. ff = SRDotDX.config.friendUsers[friend];
  1188. for (i=0; i<5; i++) SRDotDX.gui.cHTML('#fs:' + friend + ':' + i).on('click',function(e){SRDotDX.gui.fsEleClick(e)}).ele().checked = ff[i];
  1189. }
  1190. },
  1191. DeleteRaids: function () {
  1192. if (!this.joining) {
  1193. console.log('[DotDX] Erasing visible raids ...');
  1194. var rn = SRDotDX.gui.joinRaidList.length;
  1195. if (rn > 0 && (!SRDotDX.config.confirmDeletes || confirm('This will delete ' + rn + ' raids. Continue? \n (This message can be disabled on the options tab.)'))) {
  1196. var i, tot = 0;
  1197. for (i=0; i<rn; i++) {
  1198. SRDotDX.gui.deleteRaidFromDB(SRDotDX.gui.joinRaidList[i].id);
  1199. tot++;
  1200. }
  1201. SRDotDX.gui.doStatusOutput(tot + ' raids deleted');
  1202. SRDotDX.gui.selectRaidsToJoin();
  1203. console.log('[DotDX] Erasing complete');
  1204. }
  1205. }
  1206. },
  1207. GetDumpText: function () {
  1208. var dumptext = "";
  1209. var pre = "http://www.kongregate.com/games/5thPlanetGames/dawn-of-the-dragons?kv_action_type=raidhelp";
  1210. var i, raid;
  1211. for (i=0; i<SRDotDX.gui.joinRaidList.length; i++) {
  1212. raid = SRDotDX.gui.joinRaidList[i];
  1213. if (raid.nuked) continue;
  1214. dumptext += pre + '&kv_raid_id=' + raid.id + '&kv_difficulty=' + raid.diff + '&kv_raid_boss=' + raid.boss + '&kv_hash=' + raid.hash + ', ';
  1215. }
  1216. return dumptext;
  1217. },
  1218. RaidAction: function(f) {
  1219. switch (f) {
  1220. case 'share':
  1221. SRDotDX.gui.DumpRaidsToShare(true); break;
  1222. case 'post':
  1223. if (SRDotDX.gui.isPosting) SRDotDX.gui.FPXStopPosting();
  1224. else SRDotDX.gui.DumpRaidsToShare(), SRDotDX.gui.FPXspamRaids();
  1225. break;
  1226. case 'post_share':
  1227. if (SRDotDX.gui.isPosting) SRDotDX.gui.FPXStopPosting();
  1228. else SRDotDX.gui.FPXspamRaids();
  1229. break;
  1230. case 'post_friend':
  1231. if (SRDotDX.gui.isPosting) SRDotDX.gui.FPXStopPosting();
  1232. else SRDotDX.gui.spamRaidsToFriends();
  1233. break;
  1234. case 'delete':
  1235. SRDotDX.gui.DeleteRaids(); break;
  1236. }
  1237. //r = null;
  1238. return false;
  1239. },
  1240. DumpRaidsToShare: function(b) {
  1241. document.getElementById('DotDX_raidsToSpam').value = SRDotDX.gui.GetDumpText();
  1242. SRDotDX.gui.doStatusOutput('Copied ' + SRDotDX.gui.joinRaidList.length + ' raid links to share tab.');
  1243. console.log('[DotDX] Dumped ' + SRDotDX.gui.joinRaidList.length + ' to share');
  1244. if(b) {
  1245. var e = document.getElementById('lots_tab_pane').getElementsByTagName('li');
  1246. var i = e.length;
  1247. while (i--) if (e[i].getAttribute('class').indexOf('active') > -1) e[i].className = e[i].className.replace(/ active$/g,'');
  1248. (document.getElementById('FPXShareTab').parentNode).className += ' active';
  1249. }
  1250. },
  1251. BeginDeletingExpiredUnvisitedRaids: function() { SRDotDX.gui.DeleteExpiredUnvisitedRaids(); setInterval('SRDotDX.gui.DeleteExpiredUnvisitedRaids();',600000) },
  1252. DeleteExpiredUnvisitedRaids: function() {
  1253. console.log('[DotDX] Deleting nuked amd old unvisited raids');
  1254. var ct, item, i;
  1255. if (SRDotDX.config.unvisitedRaidPruningMode <= 2 && SRDotDX.config.unvisitedRaidPruningMode >= 0) {
  1256. //var raidList = document.getElementById('raid_list').childNodes;
  1257. var pruneTime = new Date().getTime() / 1000;
  1258. var raidid, raid, raidInfo, pruneTimer; ct = 0;
  1259. for (raidid in SRDotDX.config.raidList) {
  1260. raid = SRDotDX.config.raidList[raidid];
  1261. if (SRDotDX.raids[raid.boss]) {
  1262. if (!raid.visited || raid.nuked) {
  1263. raidInfo = SRDotDX.raids[raid.boss];
  1264. pruneTimer = SRDotDX.raidSizes[raidInfo.size].pruneTimers[SRDotDX.config.unvisitedRaidPruningMode];
  1265. if (raid.nuked) pruneTimer = pruneTimer / 2; //double time nuked pruning
  1266. if ((pruneTime - raid.timeStamp) >= pruneTimer) { SRDotDX.gui.deleteRaidFromDB(raidid); ct++ }
  1267. }
  1268. }
  1269. else { SRDotDX.gui.deleteRaidFromDB(raidid); ct++ }
  1270. }
  1271. if (ct > 0) SRDotDX.gui.doStatusOutput(ct + ' old unvisited raids pruned.');
  1272. console.log('[DotDX] Number of raids pruned: ' + ct);
  1273. SRDotDX.gui.selectRaidsToJoin('prune');
  1274. }
  1275. },
  1276. switchBot: function() {
  1277. //console.log('[SRDotDX] Bot button clicked');
  1278. var chkBot = document.getElementById('SRDotDX_options_hideBotLinks');
  1279. SRDotDX.config.hideBotLinks = chkBot.checked ? chkBot.checked = false : chkBot.checked = true;
  1280. SRDotDX.gui.cHTML('#SRDotDX_botClass').html('.bot {display: ' + (chkBot.checked ? 'none !important' : 'block') + '}', true);
  1281. var botbtns = document.getElementsByClassName('dotdx_chat_bot_button');
  1282. for (var i=0; i<botbtns.length; i++) {
  1283. var botcn = botbtns[i].className;
  1284. botbtns[i].className = botcn.indexOf('active') > 0 ? botcn.replace(' active','') : botcn + ' active';
  1285. }
  1286. SRDotDX.gui.scrollChat();
  1287. },
  1288. scrollChat: function(num) {
  1289. var els = document.getElementsByClassName('chat_message_window'), i = num?num:0;
  1290. if (num) els[num].scrollTop = els[num].scrollHeight;
  1291. else while (i < els.length) els[i].scrollTop = els[i].scrollHeight, i++;
  1292. },
  1293. toggleFiltering: function() {
  1294. var query = '.DotDX_filter_dummy_0 ', i = 0, frcId = '.DotDX_fltChat_', raidId;
  1295. var fltLen = Object.keys(SRDotDX.config.filters).length;
  1296. if ((fltLen != SRDotDX.raidArray.length) || typeof SRDotDX.config.filters['serpina.jpg'] == 'object') {
  1297. while (i < SRDotDX.raidArray.length) {
  1298. raidId = SRDotDX.raidArray[i];
  1299. if(typeof SRDotDX.config.filters[raidId] == 'undefined') SRDotDX.config.filters[raidId] = [false, false, false, false];
  1300. i++
  1301. }
  1302. for (i in SRDotDX.config.filters) if (SRDotDX.raidArray.indexOf(i) < 0) delete SRDotDX.config.filters[i];
  1303. console.log('[DotDX] Filters array has been altered!');
  1304. }
  1305. if (SRDotDX.config.filterChatLinks) {
  1306. i = 0;
  1307. while (i < SRDotDX.raidArray.length) {
  1308. raidId = SRDotDX.raidArray[i];
  1309. if (SRDotDX.config.filters[raidId][0]) query = frcId + raidId + '_0, ' + query;
  1310. if (SRDotDX.config.filters[raidId][1]) query = frcId + raidId + '_1, ' + query;
  1311. if (SRDotDX.config.filters[raidId][2]) query = frcId + raidId + '_2, ' + query;
  1312. if (SRDotDX.config.filters[raidId][3]) query = frcId + raidId + '_3, ' + query;
  1313. i++
  1314. }
  1315. }
  1316. if (SRDotDX.config.filterRaidList) {
  1317. i = 0; frcId = '.DotDX_fltList_';
  1318. while (i < SRDotDX.raidArray.length) {
  1319. raidId = SRDotDX.raidArray[i];
  1320. if (SRDotDX.config.filters[raidId][0]) query = frcId + raidId + '_0, ' + query;
  1321. if (SRDotDX.config.filters[raidId][1]) query = frcId + raidId + '_1, ' + query;
  1322. if (SRDotDX.config.filters[raidId][2]) query = frcId + raidId + '_2, ' + query;
  1323. if (SRDotDX.config.filters[raidId][3]) query = frcId + raidId + '_3, ' + query;
  1324. i++
  1325. }
  1326. }
  1327. //if (SRDotDX.config.hideVisitedRaidsInRaidList) query = '.DotDX_visitedRaidList, ' + query;
  1328. SRDotDX.gui.cHTML('#DotDX_filters').html(query + '{display: none !important}',true);
  1329. },
  1330. load: function () {
  1331. if (typeof holodeck._tabs.addTab == 'function' && document.getElementById('chat_rooms_container') != null) {
  1332. SRDotDX.gui.cHTML('style').set({type: "text/css",id: 'SRDotDX_botClass'}).text('.bot{display:'+(SRDotDX.config.hideBotLinks ? 'none !important':'block')+'}').attach('to',document.head);
  1333. SRDotDX.gui.cHTML('style').set({type: "text/css",id: 'SRDotDX_raidClass'}).text('.SRDotDX_raid{display:'+(SRDotDX.config.hideRaidLinks ? 'none !important':'block')+'}').attach('to',document.head);
  1334. SRDotDX.gui.cHTML('style').set({type: "text/css",id: 'SRDotDX_visitedRaidClass'}).text('.DotDX_visitedRaid{display: '+(SRDotDX.config.hideVisitedRaids ? 'none !important':'block')+'}').attach('to',document.head);
  1335. //SRDotDX.gui.cHTML('style').set({type: "text/css",id: 'SRDotDX_visitedRaidListClass'}).text('.DotDX_visitedRaidList {display: '+(SRDotDX.config.hideVisitedRaidsInRaidList == true?'none !important':'block')+'}').attach('to',document.head);
  1336. SRDotDX.gui.cHTML('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);
  1337. SRDotDX.gui.cHTML('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);
  1338. SRDotDX.gui.cHTML('style').set({type: "text/css",id: 'DotDX_filters'}).text('.DotDX_filter_dummy_0 {display: none !important}').attach('to',document.head);
  1339. SRDotDX.gui.cHTML('style').set({type: "text/css",id: 'DotDX_chatResizeElems'}).text('#kong_game_ui textarea.chat_input { width: 270px !important; }\
  1340. #kong_game_ui div#chat_raids_overlay { width: 292px }\
  1341. #kong_game_ui div#chat_raids_overlay > span { width: 282px }\
  1342. div#dotdx_sidebar_container { ' + (SRDotDX.config.sbRightSide?"text-align: left; padding-left: 1px":"text-align: right; margin-left: 2px; padding-right: 1px") + ' }').attach('to',document.head);
  1343. SRDotDX.gui.toggleFiltering();
  1344. SRDotDX.gui.cHTML('style').set({type: "text/css"}).text(" \
  1345. " + (SRDotDX.config.hideGameTitle ? "ul#gamepage_categories_list, .horizontal_ad, div#dealspot_banner_holder, div#kong_bumper_preroll_600x400-ad-slot, div#gamepage_header {display:none;} \
  1346. div.gamepage_header_outer, div.gamepage_header_inner, div.gamepage_header_outer h1 {height: 0 !important; padding: 0 !important; margin: 0 !important} \
  1347. #primarylayout .maincontent {padding: 6px 0 !important} \
  1348. " : "") + "div.raid_list_item.hidden, .DotDX_nukedRaid, div.game_page_admindev_controls, div#subwrap, li#quicklinks_facebook {display:none;} \
  1349. #primarywrap {background-image: none !important; background-color: transparent !important;} \
  1350. body {background-color: #" + SRDotDX.config.bckColor + " !important}\
  1351. #FPXtt { position:absolute; display:block; } \
  1352. #FPXtttop { display:block; height:5px; margin-left:5px; } \
  1353. #FPXttcont { display:block; padding:2px 12px 3px 7px; margin-left:5px; background:#666; color:#fff; } \
  1354. #FPXttbot {display:block;height:5px;margin-left:5px;} \
  1355. #kong_game_ui ul.main_tabs li#lots_tab a {width: 33px; color:white;} \
  1356. #kong_game_ui ul.main_tabs li#lots_tab a.active {background-position: 0px 0px; color:black;} \
  1357. #kong_game_ui div#lots_tab_pane {padding: 8px; text-align: left; background-color: #777; height: 649px}\
  1358. #kong_game_ui div#lots_tab_pane div#dotdx_shadow_wrapper { width: 282px; border: 1px solid #222; box-shadow: 0 0 12px #111; height: 649px; overflow: hidden; background-color: #ddd;}\
  1359. li#game_tab {display:none !important} \
  1360. #kong_game_ui div#chat_window { background-color: #fff; border: 1px solid #333; overflow: hidden; box-shadow: 0 0 8px 1px #333; }\
  1361. #kong_game_ui div#chat_window_header { height: 69px; box-shadow: 0 0 5px #333; position: relative; background-color: #ddd; }\
  1362. #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 }\
  1363. #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; }\
  1364. #kong_game_ui div.chat_actions_container span.kong_ico { font-size: 12px !important; }\
  1365. #kong_game_ui div.chat_actions_container ul.chat_actions_list { 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; }\
  1366. #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;}\
  1367. #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; }\
  1368. #kong_game_ui div.chat_actions_container span.btn_tools { height: 16px; line-height: initial !important; width: 20px; margin: 2px 3px; } \
  1369. #kong_game_ui div#chat_window_header div.dotdx_chat_overlay { border-top: 1px solid #bbb; margin-top: 3px; padding-top: 4px; overflow: hidden; white-space: nowrap; } \
  1370. #kong_game_ui div#chat_window_header div.dotdx_chat_overlay > span { color: #333; text-shadow: 0 0 3px #ccc; }\
  1371. #kong_game_ui div#chat_tab_pane {background-color: #777} \
  1372. #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; } \
  1373. #kong_game_ui div#chat_room_tabs div a { margin: 0; background: none; text-decoration: none; font-family: \"Trebuchet MS\",Helvetica,sans-serif; font-size: 11px; color: #222; font-style: italic; transition: text-shadow .2s; border-right: 1px dotted #aaa; padding: " + (SRDotDX.isFirefox ? "3px 9px 3px 7px":"4px 9px 2px 7px") + "; }\
  1374. #kong_game_ui div#chat_room_tabs div a:hover { text-shadow: 0 0 5px #888; }\
  1375. #kong_game_ui div#chat_room_tabs div.active a { text-shadow: 0 0 5px #999; background-color: #eee; }\
  1376. #kong_game_ui div#chat_rooms_container div.chat_tabpane.users_in_room { background-color: #f6f6f6; height: 89px; border: 1px solid #999; border-width: 1px 0; border-bottom-color: #888; box-shadow: inset 0 -2px 6px -4px #444; } \
  1377. #kong_game_ui div#chat_raids_overlay { display:none; position: absolute; overflow: hidden; bottom: 491px; left: 3px; background-color: #e0e0e0; font-family: \"Trebuchet MS\", Helvetica, sans-serif; color: #000; font-size: 11px; padding: 3px 0; border-color: #555; border-width: 1px; border-style: solid; box-shadow: 0 0 10px #222; text-shadow: 0 0 4px #ccc; background: -webkit-linear-gradient(top, #fff, #ddd); background: -moz-linear-gradient(top, #fff, #ddd); }\
  1378. #kong_game_ui div#chat_raids_overlay.active { display: block } \
  1379. #kong_game_ui div#chat_raids_overlay > span { display: block; margin: 0 auto }\
  1380. #kong_game_ui div#lots_tab_pane ul { margin: 0px; padding: 0px; list-style-type: none; position: relative;} \
  1381. #kong_game_ui div#lots_tab_pane ul li.tab { float: left; height: 100%; } \
  1382. #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; padding: " + (SRDotDX.isFirefox ? "2px 7px 3px":"3px 7px 2px") + "; cursor: pointer; border-right: 1px dotted #aaa; transition: text-shadow .2s; color: #222} \
  1383. #kong_game_ui div#lots_tab_pane ul li.tab div.tab_head:hover { text-shadow: 0 0 5px #888; }\
  1384. #kong_game_ui div#lots_tab_pane ul li.tab div.tab_pane { background-color: #f9f9f9; display: none; border-top: 1px solid #888; width: 282px; height: 600px; box-shadow: inset 0 0 6px -1px #777; padding-top: 2px;} \
  1385. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_head { background-color: #eee; cursor: default; text-shadow: 0 0 5px #999; }\
  1386. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane { position: absolute; display: block; left: 0px; }\
  1387. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list, \
  1388. #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: 453px; 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);} \
  1389. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list .raid_list_item {cursor: pointer; position: relative; padding: 3px 2px 1px; border-width: 1px 0; border-style: solid; border-top-color: transparent; border-bottom-color: #ddd; margin-top: -1px;} \
  1390. #kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list .raid_list_item.hidden {display:none;} \
  1391. 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} \
  1392. a.FPXImportLink:hover { border-color: #008299; background-color: #008299; color: white;} \
  1393. a.FPXDeleteLink:hover { border-color: #D24726; background-color: #D24726; color: white;} \
  1394. a.dotdxRaidListDelete { font: 10px \"Trebuchet MS\"; color: black; text-decoration: none; cursor: pointer; margin-right: 2px; } \
  1395. a.dotdxRaidListDelete:hover { color: #BD0000; text-shadow: 0 0 2px #FF8E8E; }\
  1396. a.DotDX_RaidLink {text-decoration:none; color: #333;} \
  1397. a.DotDX_RaidLink:hover { color: #111; text-shadow: 0 0 3px rgba(0, 0, 0, 0.2); } \
  1398. div.DotDX_ListPanel {border-top: 1px dashed #999; margin-top: 2px; padding-top: 2px; }\
  1399. div.DotDX_ListPanel > span.raidListContent {font-style: italic} \
  1400. #kong_game_ui p.user_count.full { color: crimson; } \
  1401. #kong_game_ui div#lots_tab_pane a.pastebinlink {font: normal 11px Verdana; color:#333; text-decoration:none; cursor:pointer;} \
  1402. #kong_game_ui div#lots_tab_pane a.pastebinlink:hover { text-decoration: underline; color: black } \
  1403. #kong_game_ui div#lots_tab_pane span.pasteright, #kong_game_ui div#lots_tab_pane span.pasteleft {font: normal 11px Verdana; color: #333} \
  1404. #kong_game_ui div#lots_tab_pane span.pasteright {float:right; padding-right: 6px} \
  1405. #kong_game_ui div#lots_tab_pane span.pasteleft {float:left} \
  1406. #kong_game_ui div.chat_message_window { position: relative; bottom: -1px; margin: 0; height: 4" + (SRDotDX.config.cbDisable ? '43' : '22') + "px !important; } \
  1407. #kong_game_ui div.chat_message_window p {border-bottom: 1px solid #DFDFDF; margin: 0; padding: 3px 5px;} \
  1408. #kong_game_ui p.even {background-color: #fff !important} \
  1409. #kong_game_ui p.SRDotDX_raid, #kong_game_ui p.whisper, #kong_game_ui p.script { border-top: 1px solid #e5e5e5; margin: -1px 0 0 0 !important; } \
  1410. #kong_game_ui p.SRDotDX_raid {padding: 2px 5px !important;} \
  1411. #kong_game_ui p.DotDX_diff_1, #raid_list .raid_list_item.DotDX_N:hover {background-color: rgb(211, 247, 203) !important; border-color: rgb(138, 179, 137) !important; background: -webkit-linear-gradient(top,#CBE7C4,#F3FAF2); background: -moz-linear-gradient(top,#CBE7C4,#F3FAF2);} \
  1412. #kong_game_ui p.DotDX_diff_2, #raid_list .raid_list_item.DotDX_H:hover {background-color: rgb(240, 233, 187) !important; border-color: rgb(173, 173, 104) !important; background: -webkit-linear-gradient(top,#F7F0C8,#FCFBF8); background: -moz-linear-gradient(top,#F7F0C8,#FCFBF8);} \
  1413. #kong_game_ui p.DotDX_diff_3, #raid_list .raid_list_item.DotDX_L:hover {background-color: rgb(255, 204, 197) !important; border-color: rgb(177, 135, 128) !important; background: -webkit-linear-gradient(top,#F3D7D1,#FCF7F7); background: -moz-linear-gradient(top,#F3D7D1,#FCF7F7);} \
  1414. #kong_game_ui p.DotDX_diff_4, #raid_list .raid_list_item.DotDX_NM:hover {background-color: rgb(233, 226, 236) !important; border-color: rgb(169, 154, 187) !important; background: -webkit-linear-gradient(top,#DDD4E2,#F4F0F7); background: -moz-linear-gradient(top,#DDD4E2,#F4F0F7);} \
  1415. #kong_game_ui div#lots_tab_pane div#raid_list .raid_list_item:hover { box-shadow: 0 0 4px #ccc; }\
  1416. #kong_game_ui p.whisper {padding: 3px 5px !important; background-color: rgb(228, 237, 241) !important; border-color: #A1B4BE !important; background: -webkit-linear-gradient(top,#DCE8F1,#EFF4F7); background: -moz-linear-gradient(top,#DCE8F1,#EFF4F7); } \
  1417. #kong_game_ui p.script {background-color: rgb(245, 245, 245) !important; border-color: rgb(165, 165, 165) !important; background: -webkit-linear-gradient(left,#f3f3f3,#fff); background: -moz-linear-gradient(left,#f3f3f3,#fff);} \
  1418. #kong_game_ui p.script hr { height: 1px; border: 0; background: #ccc; margin: 3px 0 2px; }\
  1419. #kong_game_ui p.script span { font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 11px} \
  1420. #kong_game_ui p.script span .title { font-size: 12px; font-weight: bold; color: #222 } \
  1421. #kong_game_ui p.script span .title:hover { text-shadow: 0 0 4px #ccc; text-decoration: none; }\
  1422. #kong_game_ui p span.separator { margin-right: 0px !important; display:inline !important; float: none !important} \
  1423. #kong_game_ui p span.username { color: rgb(39, 101, 148); text-decoration: none; cursor: pointer; display:inline !important; float: none !important } \
  1424. #kong_game_ui p span.username.ign { color: rgb(38, 116, 34); }\
  1425. #kong_game_ui p span.username.is_self { color: rgb(151, 49, 49); }\
  1426. #kong_game_ui p span.username:hover { text-decoration: underline } \
  1427. #kong_game_ui p span.timestamp {font-style: italic; font-size: 9px; color: #666; vertical-align: text-top;} \
  1428. #kong_game_ui p span.message {line-height: 16px; word-wrap: break-word; display:inline !important; float: none !important} \
  1429. #kong_game_ui p span.message a { text-decoration: none; color: #444; font-style: normal } \
  1430. #kong_game_ui p span.message a:hover { text-decoration: underline; color: #000 } \
  1431. #kong_game_ui p span.message a.chat_link:hover { text-shadow: 0 0 4px #F5C68A; text-decoration: none; } \
  1432. #kong_game_ui p span.message a.chat_link { color: #946A3D; } \
  1433. #kong_game_ui p.emote {font-style: italic; color: #085088;}\
  1434. #kong_game_ui p.emote span.username, #kong_game_ui p.emote span.separator { display: none !important }\
  1435. #kong_game_ui p span.room { color: #666; font-size: 9px; vertical-align: text-top; }\
  1436. #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; }\
  1437. #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} \
  1438. #kong_game_ui .chatOverlayMain > span {padding: 3px 10px; cursor: pointer;} \
  1439. #kong_game_ui .chatOverlayMain > span:hover {background-color: #C2A71C; font-style: italic; color: #555}\
  1440. #kong_game_ui textarea.chat_input { height: 30px !important; margin: 0 !important; outline: none; padding: 4px 6px 4px } \
  1441. " + (SRDotDX.config.cbDisable ? '#kong_game_ui div.chat_controls { box-shadow: 0 0 4px #666; position: relative; border-top: 1px solid #777 }' : '') + " \
  1442. #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);}\
  1443. #kong_game_ui div.dotdx_chat_buttons > span { display: inline-block; padding: 3px 7px; cursor: pointer; transition: text-shadow .2s; }\
  1444. #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; }\
  1445. #kong_game_ui input.dotdx_chat_filter:focus { background-color: #fff }\
  1446. div.dotdx_chat_buttons > span.active { text-shadow: 0 0 4px #aaa }\
  1447. div.dotdx_chat_buttons > span:hover { text-shadow: 0 0 4px #888 }\
  1448. 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); } \
  1449. 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;}\
  1450. div.tab_pane div.collapsingField { padding-top: 3px; }\
  1451. xxx {display:block !important}\
  1452. span.DotDX_RaidListVisited {float: right; padding: 0 3px;} \
  1453. span.DotDX_List_diff {display: block; width: 25px; float: left; font-weight: bold; padding-left: 2px;} \
  1454. span.DotDX_List_diff.DotDX_N {color: #00BB00;} \
  1455. span.DotDX_List_diff.DotDX_H {color: #DDAA00;} \
  1456. span.DotDX_List_diff.DotDX_L {color: #FF0000;} \
  1457. span.DotDX_List_diff.DotDX_NM {color: #BB00BB;} \
  1458. div.tab_pane input, div.tab_pane select {border: 1px solid #ccc; padding: 1px} \
  1459. div.tab_pane input {height: 14px;} \
  1460. div.tab_pane select {height: 18px} \
  1461. 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; transition: all .3s} \
  1462. 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;}\
  1463. 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;}\
  1464. 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;}\
  1465. div.tab_pane input[type=\"button\"].red:hover,\
  1466. 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;}\
  1467. div.tab_pane input.landpmbutton { height: 20px; width: 22px; } \
  1468. 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); } \
  1469. div.tab_pane input.landtxtfield { padding: 2px 0; width: 50px; text-align: center} \
  1470. div.tab_pane input.landtxtfieldc { padding: 2px 0; width: 100%; text-align: center } \
  1471. div.tab_pane td.landname { padding-top: 3px} \
  1472. div.tab_pane input.landsavebutton { height: 20px; width:100% } \
  1473. table.raids { font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 10px; text-align: center; border-collapse: collapse; margin: 5px auto } \
  1474. table.raids td { border: 1px solid #bbb; width: 55px; background-color: #fff; }\
  1475. table.raids td.ep { text-align: right; width: auto; padding: 0 4px; } \
  1476. table.raids th { border: 1px solid #bbb; background-color: #efefef; } \
  1477. table.raids tr.head { background-color: #fafafa; } \
  1478. table.raids tr.split td { border-bottom-width: 2px; } \
  1479. table.raids tr.best td { background-color: #eff4f9; } \
  1480. table.raids colgroup col.selected { border: 2px solid #5f9ea0; }\
  1481. ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"] {display: none}\
  1482. ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"] + label {font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; cursor: pointer;}\
  1483. ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"] + label:before { content:\"\"; display:inline-block; width:17px; height:14px; position: relative; top: 2px; background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAiUlEQVR42qXM3QYFIRiF4d3dJpIhI5FKJCOSSHe7f9gn4ztZo3Wwzt6HvTbHfhdCeD8Nvw27Ad57OI4xUsA5BwMpJQpYa2Eg50wBYwwMlFIocJ4nDFzXRQGtNQzUWilwHAcMtNYooJSCgd47BaSUMDDGoIAQAgbmnBTgnMPAWosCcP3fDdjZNvABvRhVEQglsV8AAAAASUVORK5CYII=') left top no-repeat; }\
  1484. ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"].generic + label:before { margin-left: 5px }\
  1485. ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"]:checked + label:before {background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAuklEQVR42qWScQfFIBTF27dNzIxMxtREkpjE7Nu+98q7U+96T0/nj3Vv55wfsYF0akgfpdTj3+KrM1QAKWVzed93DNi2rRmgtcaAdV1/lowxBDJpRgAhxNeytTafkEk7AizLkk3nHIEZdlCZQQDOeTa99/lMO8ywg9I9AszznM3jONATwAOlDAJM03QHQgj3XN6XPgKM41iFYozk8670EIAx1vgXEHKeJwZQSpsB13VhQHP7rQrQo27AE+MRcBFOD9LhAAAAAElFTkSuQmCC') left top no-repeat;}\
  1486. ul#SRDotDX_tabpane_tabs input[type=\"radio\"] {display: none}\
  1487. ul#SRDotDX_tabpane_tabs input[type=\"radio\"] + label {font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; cursor: pointer;}\
  1488. ul#SRDotDX_tabpane_tabs input[type=\"radio\"] + label:before { content:\"\"; display:inline-block; width:17px; height:14px; position: relative; top: 3px; background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAMAAABFNRROAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAHJQTFRFfX19hYWFhoaGiYmJi4uLkZGRkpKSmJiYm5ubsbGxtra2t7e3ubm5vLy8vr6+wMDAwsLCxsbG4ODg4eHh4uLi5eXl5+fn6urq6+vr7Ozs7e3t7u7u7+/v8PDw8/Pz9fX1+Pj4+vr6/Pz8/v7+////////b6mNewAAACZ0Uk5T/////////////////////////////////////////////////wCneoG8AAAAd0lEQVR42jTOyRaDIBQD0CDigAqOQMWWDr7//0WhHu4qWSUgIicrVNLFBKKBT/a0Ex9S0034JaHRhL04vrej2NGNn2zsILZ3tgkwHzLPIJZXtghI9cyUhGOrv63Mxb3aPBJT6/SlL9VsZ1X2/2dkWg7empguAQYA2EwP8sBMGt4AAAAASUVORK5CYII=') left top no-repeat; }\
  1489. ul#SRDotDX_tabpane_tabs input[type=\"radio\"].generic + label:before { margin-left: 5px }\
  1490. ul#SRDotDX_tabpane_tabs input[type=\"radio\"]:checked + label:before {background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAANCAMAAABFNRROAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKVQTFRFWlpaYGBgZmZmb29vfX19goKChYWFhoaGiYmJi4uLkZGRkpKSlpaWmJiYmZmZm5uboqKio6OjpaWlsbGxs7Oztra2t7e3ubm5vLy8vb29vr6+v7+/wMDAwcHBwsLCxsbGzs7O4ODg4eHh4uLi5eXl5+fn6urq6+vr7Ozs7e3t7u7u7+/v8PDw8vLy8/Pz9fX19vb2+Pj4+vr6/Pz8/v7+////////5PCE/wAAADd0Uk5T////////////////////////////////////////////////////////////////////////ABBZnYsAAACbSURBVHjaHI7ZAoIgFAVvoqhYWRlq5r6vGFD8/6elztPM0zmglOqoozu02wyUCq2s/bWZFe4Vu+t3Z3VjBYM5SZk8EikncwA/FdyAExhcpD6Qmr81hJD24jUBPK43tHNfRwykZOlRKSsJ0Ghm5y2ubI4odLgaRf7MxVjhbtu7NP3yWfrmEu9fAjsq2iKyg+OZajxLt7xms78AAwBAzRQEoOducwAAAABJRU5ErkJggg==') left top no-repeat;}\
  1491. 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; }\
  1492. ul#SRDotDX_tabpane_tabs input[type=\"text\"].generic:hover { border-style: solid; }\
  1493. 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);}\
  1494. ul#SRDotDX_tabpane_tabs input[type=\"text\"][disabled].generic { color: #aaa; }\
  1495. ul#SRDotDX_tabpane_tabs input[type=\"text\"].color {float: right; margin-right: 6px; width: 40px;}\
  1496. 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}\
  1497. input#raidsBossFilter:hover, input#raidsBossFilter:focus {background: -webkit-linear-gradient(top, #DFE8F1, #fff); background: -moz-linear-gradient(top, #DFE8F1, #fff);}\
  1498. textarea#DotDX_raidsToSpam, textarea#options_sbConfig { border: 1px solid #aaa; width: 254px; margin-left: 6px; margin-top: 5px; margin-bottom: 4px; box-shadow: 0 0 4px #ccc; padding: 3px 7px; resize: none; outline: none; background: -webkit-linear-gradient(left,#fff,#eee); background: -moz-linear-gradient(left,#fff,#eee); font-size: 10px; font-style: italic; color: #444; text-shadow: 1px 1px 2px #ddd;}\
  1499. #kong_game_ui div#dotdx_status_div {font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-style: italic; font-size: 11px; margin: 0; padding: 6px 6px 4px; border-bottom: 1px solid #aaa; background-color: #e6e6e6; color: #666;}\
  1500. #kong_game_ui div#dotdx_status_div span {text-shadow: 0 0 4px #aaa; color: #333;}\
  1501. #kong_game_ui div#helpBox { padding: 10px 8px 8px; position: relative; color: #000; background: -moz-linear-gradient(top, rgb(187, 187, 187), rgb(235, 235, 235)); background: -webkit-linear-gradient(top, rgb(187, 187, 187), rgb(235, 235, 235)); margin-top: 3px; box-shadow: rgb(111, 111, 111) 0px 0px 6px; border-top-width: 1px; border-top-style: solid; border-top-color: rgb(131, 131, 131); font-family: \"Trebuchet MS\",Helvetica,sans-serif; font-size: 12px; text-shadow: 0 0 4px #aaa; font-style: italic; transition: margin .2s;}\
  1502. #kong_game_ui span.generic { display: inline-block; margin-left: 6px; margin: 3px 6px 0; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; }\
  1503. #kong_game_ui span.notice { display: inline-block; font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 10px; font-style: italic; margin: 3px 6px; text-shadow: 0 0 3px #ddd; }\
  1504. #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;}\
  1505. #kong_game_ui div#dotdx_usercontext span { display: inline-block; padding: 3px 6px 2px }\
  1506. #kong_game_ui div#dotdx_usercontext span:hover { text-shadow: 0 0 3px #aaa; }\
  1507. div#FPXfsOptions span.generic {float:left; clear:both}\
  1508. 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; }\
  1509. div#FPXfsOptions label { margin-right: 4px; }\
  1510. div#dotdx_sidebar_container { margin-top: 25px; background: #777; height: 655px; padding-top: 10px }\
  1511. 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; background: #ddd; text-shadow: 0 0 6px #999; box-shadow: 0 0 6px #444; outline: none; background: -webkit-linear-gradient(top,#f5f5f5,#bbb); background: -moz-linear-gradient(top,#f5f5f5,#bbb) }\
  1512. div#dotdx_sidebar_container > button:hover { background-color: #888; color: #fff; text-shadow: 0 0 10px #eee; box-shadow: 0 0 10px #222; position: relative; z-index: 40; border-color: #444; background: -webkit-linear-gradient(top,#999,#555); background: -moz-linear-gradient(top,#999,#555) }\
  1513. div#dotdx_sidebar_container > button.b:hover { color: #000; text-shadow: 0 0 10px #fff; box-shadow: 0 0 10px #1C3A61; background: -webkit-linear-gradient(top,#DCF0FD,#6794B2); background: -moz-linear-gradient(top,#DCF0FD,#6794B2) }\
  1514. div#dotdx_sidebar_container > button.g:hover { color: #000; text-shadow: 0 0 10px #fff; box-shadow: 0 0 10px #3D6425; background: -webkit-linear-gradient(top,#EFFDE5,#618D4F); background: -moz-linear-gradient(top,#EFFDE5,#618D4F) }\
  1515. div#dotdx_sidebar_container > button.r:hover { color: #000; text-shadow: 0 0 10px #fff; box-shadow: 0 0 10px #412222; background: -webkit-linear-gradient(top,#FFEFEF,#AA5858); background: -moz-linear-gradient(top,#FFEFEF,#AA5858) }\
  1516. div#dotdx_sidebar_container > button.y:hover { color: #000; text-shadow: 0 0 10px #fff; box-shadow: 0 0 10px #807823; background: -webkit-linear-gradient(top,#FFFBE0,#C9B41D); background: -moz-linear-gradient(top,#FFFBE0,#C9B41D) }\
  1517. div#dotdx_sidebar_container > div { width: 60px; height: 26px }\
  1518. 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; color: #333; width: 54px; background-color: #f7f7f7; outline: none; text-shadow: 0 0 6px #999; box-shadow: 0 0 6px #444; height: 13px; text-align: center; background: -webkit-linear-gradient(top,#f5f5f5,#ccc); background: -moz-linear-gradient(top,#f5f5f5,#ccc) }\
  1519. div#dotdx_sidebar_container > input[type=\"text\"]:hover, div#dotdx_sidebar_container > input[type=\"text\"]:focus { background: -webkit-linear-gradient(top,#f5f5f5,#fff); background: -moz-linear-gradient(top,#f5f5f5,#fff) }\
  1520. ").attach("to",document.head);
  1521. var link = SRDotDX.gui.cHTML('a').set({href: '#lots_tab_pane', class: ''}).html('<span class="SRDotDX_new">RAIDS</span>', false).attach('to', SRDotDX.gui.cHTML('li').set({ class: 'tab', id: 'lots_tab' }).attach('after', 'game_tab').ele()).ele();
  1522. var sbTmp = JSON.stringify(SRDotDX.config.sbConfig);
  1523. sbTmp = sbTmp.slice(1,sbTmp.length-1).replace(/},/g,"},&#10;").replace(/l,/g,"l,&#10;");
  1524. var pane = SRDotDX.gui.cHTML('div').set({id: 'lots_tab_pane'}).html(' \
  1525. <div id="dotdx_shadow_wrapper">\
  1526. <div id="dotdx_status_div">DotDX: <span id="StatusOutput"></span></div> \
  1527. <div style="height: 623px; overflow: hidden;">\
  1528. <ul id="SRDotDX_tabpane_tabs"> \
  1529. <li class="tab active"> \
  1530. <div class="tab_head" id="raids_tab">Raids</div> \
  1531. <div class="tab_pane" id="mainRaidsFrame"> \
  1532. <div id="topRaidPane" style="background-color: #f6f6f6;"> \
  1533. <div id="FPXRaidFilterDiv" class="collapsible_panel"> \
  1534. <p class="collapsingCategory" id="collapsingCat1" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidFiltering\', this, \'raid_list\')">Filtering<span style="float:right">&minus;</span></p> \
  1535. <div id="FPXRaidFiltering" style="display:block" class="collapsingField"> \
  1536. <input type="text" id="raidsBossFilter" name="FPXRaidBossNameFilter"> \
  1537. <input type="checkbox" id="dotdx_flt_vis"><label for="dotdx_flt_vis" style="margin-right: 9px; margin-left:5px; margin-bottom:5px; display: inline-block">Include visited</label>\
  1538. <input type="checkbox" id="dotdx_flt_nuke"><label for="dotdx_flt_nuke" style="margin-right: 9px;">Only nuked</label>\
  1539. <input type="checkbox" id="dotdx_flt_all"><label for="dotdx_flt_all">Show all</label>\
  1540. </div> \
  1541. </div> \
  1542. <!-- <div id="FPXRaidSortingDiv" class="collapsible_panel"> \
  1543. <p class="collapsingCategory" id="collapsingCat2" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidSort\', this, \'raid_list\')">Sorting<span style="float:right">+</span></p> \
  1544. <div id="FPXRaidSort" style="display:none"> \
  1545. <table> \
  1546. <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> \
  1547. <td>&nbsp;Sort by: \
  1548. <select style="width: 90px" id="FPXRaidSortSelection" tabIndex="-1"> \
  1549. <option value="Time" selected>TimeStamp</option> \
  1550. <option value="Name">Raid Name</option> \
  1551. <option value="Diff">Difficulty</option> \
  1552. <option value="Id">Raid Id</option> \
  1553. </select> \
  1554. <select style="width: 56px" id="FPXRaidSortDirection" tabIndex="-1"> \
  1555. <option value="asc" selected>Asc</option> \
  1556. <option value="desc">Desc</option> \
  1557. </select></td></tr> \
  1558. <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> \
  1559. </table> \
  1560. </div> \
  1561. </div> --> \
  1562. <input style="width: 94px; margin-top: 1px; margin-left: 5px" name="ImportRaids" class="blue" id="ImportRaidsButton" onclick="SRDotDX.request.raids(); return false;" tabIndex="-1" type="button" value="Import" onmouseout="SRDotDX.gui.displayHint();" onmouseover="SRDotDX.gui.displayHint(\'Import all alive raids from raids server.\');">\
  1563. <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 selected (not dead) raids to the share tab.\');"> \
  1564. <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 selected (not dead) raids to chat.\');"> \
  1565. <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 selected raids.\');"><br> \
  1566. <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 selected (not dead) raids.\'); "> \
  1567. <input style="width: 173px; margin-bottom: 5px; margin-top: 4px" name="ImpJoinRaids" class="green" id="AutoImpJoinVisibleButton" onclick="SRDotDX.request.joinAfterImport = true;SRDotDX.request.raids();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.\'); "> \
  1568. </div> \
  1569. <div style="" id="raid_list" tabIndex="-1"></div> \
  1570. </div> \
  1571. </li> \
  1572. <li class="tab"> \
  1573. <div class="tab_head">Opts</div> \
  1574. <div class="tab_pane"> \
  1575. <div id="FPXRaidOptionsDiv" class="collapsible_panel"> \
  1576. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat5" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidOptions\', this)">Raid Options<span style="float:right">+</span></p> \
  1577. <div id="FPXRaidOptions" name="dotdxOptsTabs" style="display:none" class="collapsingField"> \
  1578. <input type="checkbox" id="SRDotDX_options_markMyRaidsVisited" class="generic"><label for="SRDotDX_options_markMyRaidsVisited">Mark raids posted by me as visited</label><br> \
  1579. <input type="checkbox" id="SRDotDX_options_confirmWhenDeleting" class="generic"><label for="SRDotDX_options_confirmWhenDeleting">Confirm when manually deleting raids</label><br> \
  1580. <input type="checkbox" id="SRDotDX_options_importFiltered" class="generic"><label for="SRDotDX_options_importFiltered">Add to database filtered raids only</label><br> \
  1581. <span class="generic">Unvisited raid pruning:</span><br> \
  1582. <input type="radio" id="FPX_options_unvisitedPruningAggressive" class="generic" name="unvisitedPruning" value="Aggressive"/><label for="FPX_options_unvisitedPruningAggressive">Aggressive</label> \
  1583. <input type="radio" id="FPX_options_unvisitedPruningModerate" class="generic" name="unvisitedPruning" value="Moderate"/><label for="FPX_options_unvisitedPruningModerate">Moderate</label> \
  1584. <input type="radio" id="FPX_options_unvisitedPruningSlow" class="generic" name="unvisitedPruning" value="Slow"/><label for="FPX_options_unvisitedPruningSlow">Slow</label> \
  1585. <input type="radio" id="FPX_options_unvisitedPruningNone" class="generic" name="unvisitedPruning" value="None"/><label for="FPX_options_unvisitedPruningNone">None</label><br> \
  1586. </div> \
  1587. </div> \
  1588. <div id="FPXChatOptionsDiv" class="collapsible_panel"> \
  1589. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat6" onclick="SRDotDX.gui.toggleDisplay(\'FPXChatOptions\', this)">Chat Options<span style="float:right">+</span></p> \
  1590. <div id="FPXChatOptions" name="dotdxOptsTabs" style="display:none" class="collapsingField"> \
  1591. <input type="checkbox" id="SRDotDX_options_hideRaidLinks" class="generic"><label for="SRDotDX_options_hideRaidLinks">Hide all raid links in chat</label><br> \
  1592. <input type="checkbox" id="SRDotDX_options_hideBotLinks" class="generic"><label for="SRDotDX_options_hideBotLinks">Hide bot raid links in chat</label><br> \
  1593. <input type="checkbox" id="SRDotDX_options_hideVisitedRaids" class="generic"><label for="SRDotDX_options_hideVisitedRaids">Hide visited raids in chat</label><br> \
  1594. <span class="generic">Chat size:</span>\
  1595. <input type="radio" id="SRDotDX_options_chatSizeNormal" name="chatSize" value="300"/><label for="SRDotDX_options_chatSizeNormal">Normal</label> \
  1596. <input type="radio" id="SRDotDX_options_chatSizePlus25" name="chatSize" value="375" class="generic"/><label for="SRDotDX_options_chatSizePlus25">+25%</label> \
  1597. <input type="radio" id="SRDotDX_options_chatSizePlus50" name="chatSize" value="400" class="generic"/><label for="SRDotDX_options_chatSizePlus50">+50%</label><br> \
  1598. <span class="generic">More info in raid links:</span> \
  1599. <input type="checkbox" id="SRDotDX_options_showFS"><label for="SRDotDX_options_showFS">Show FS</label> \
  1600. <input type="checkbox" id="SRDotDX_options_showAP" class="generic"><label for="SRDotDX_options_showAP">Show AP</label> \
  1601. </div> \
  1602. </div> \
  1603. <div id="FPXPasteOptionsDiv" class="collapsible_panel"> \
  1604. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat7" onclick="SRDotDX.gui.toggleDisplay(\'FPXPasteOptions\', this)">Pastebin Options<span style="float:right">+</span></p> \
  1605. <div id="FPXPasteOptions" name="dotdxOptsTabs" style="display:none" class="collapsingField"> \
  1606. <input type="checkbox" id="SRDotDX_options_autoImportPaste" class="generic"><label for="SRDotDX_options_autoImportPaste">Auto import pastebins</label><br> \
  1607. <input type="checkbox" id="SRDotDX_options_confirmForLargePaste" class="generic"><label for="SRDotDX_options_confirmForLargePaste">Confirm if pastie exceeds</label> <input type="text" class="generic" style="width: 26px;" id="SRDotDX_options_confirmPasteSize"> \
  1608. </div> \
  1609. </div> \
  1610. <div id="FPXIntOptionsDiv" class="collapsible_panel"> \
  1611. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat20" onclick="SRDotDX.gui.toggleDisplay(\'FPXIntOptions\', this)">Interface Options<span style="float:right">+</span></p> \
  1612. <div id="FPXIntOptions" name="dotdxOptsTabs" style="display:none" class="collapsingField"> \
  1613. <input type="checkbox" id="options_hideGameTitle" class="generic"><label for="options_hideGameTitle">Hide titlebar above game window</label><br>\
  1614. <input type="checkbox" id="options_hideGameDetails" class="generic"><label for="options_hideGameDetails">Hide details under game window</label><br>\
  1615. <input type="checkbox" id="options_hideKongForum" class="generic"><label for="options_hideKongForum">Hide forum under game window</label><br>\
  1616. <input type="checkbox" id="options_trueMsgCount" class="generic"><label for="options_trueMsgCount">Display true kong messages count</label><br>\
  1617. <span class="generic">Kong background color</span><input type="text" class="generic color" id="SRDotDX_colors_background"> \
  1618. </div> \
  1619. </div> \
  1620. <div id="FPXsbOptionsDiv" class="collapsible_panel"> \
  1621. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat25" onclick="SRDotDX.gui.toggleDisplay(\'FPXsbOptions\', this)">Sidebar Options<span style="float:right">+</span></p> \
  1622. <div id="FPXsbOptions" name="dotdxOptsTabs" style="display:none" class="collapsingField"> \
  1623. <input type="checkbox" id="options_sbEnable" class="generic"><label for="options_sbEnable">Enable DotDX Sidebar</label><br>\
  1624. <input type="checkbox" id="options_cbDisable" class="generic"><label for="options_cbDisable">Hide toolbar under chat window</label><br>\
  1625. <input type="checkbox" id="options_sbRightSide" class="generic"><label for="options_sbRightSide">Show sidebar on the right side of chat</label><br> \
  1626. <textarea id="options_sbConfig" rows="25" style="overflow-y: hidden; overflow-x: scroll; white-space: nowrap">' + sbTmp + '</textarea> \
  1627. <input id="dotdx_sbConfigSave" style="margin: 0 0 2px 6px; width: 270px;" class="blue" type="button" value="Save and apply new sidebar layout" onclick="SRDotDX.gui.applySidebarUI(0); return false;">\
  1628. </div> \
  1629. </div> \
  1630. <div id="FPXfsOptionsDiv" class="collapsible_panel"> \
  1631. <p class="collapsingCategory" name="dotdxOptsTabs" id="collapsingCat24" onclick="SRDotDX.gui.toggleDisplay(\'FPXfsOptions\', this)">Friend Share Options<span style="float:right">+</span></p> \
  1632. <div id="FPXfsOptions" name="dotdxOptsTabs" style="display:none; text-align:right" class="collapsingField"> \
  1633. </div> \
  1634. </div> \
  1635. </div> \
  1636. </li> \
  1637. <li class="tab"> \
  1638. <div class="tab_head" id="FPXShareTab">Share</div> \
  1639. <div class="tab_pane"> \
  1640. <div id="FPXRaidSpamDiv"> \
  1641. <div id="FPXShareDiv" class="collapsible_panel"> \
  1642. <p class="collapsingCategory" id="collapsingCat8" onclick="SRDotDX.gui.toggleDisplay(\'FPXShare\', this, \'share_list\')">Share<span style="float:right">+</span></p> \
  1643. <div id="FPXShare" style="display:block" class="collapsingField"> \
  1644. <input type="checkbox" id="SRDotDX_options_formatLinkOutput" class="generic"><label for="SRDotDX_options_formatLinkOutput">Enable formatting of posted raid links</label><br> \
  1645. <span class="generic">Whisper to </span><input type="text" class="generic" id="SRDotDX_options_whisperTo"><br>\
  1646. <span class="notice">(if "whisper to" field is blank, raids will be posted public)</span> \
  1647. <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;"/> \
  1648. <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> \
  1649. </div> \
  1650. </div> \
  1651. <div id="FPXImportDiv" class="collapsible_panel" class="collapsingField"> \
  1652. <p class="collapsingCategory" id="collapsingCat9" onclick="SRDotDX.gui.toggleDisplay(\'FPXImport\', this, \'share_list\')">Import<span style="float:right">+</span></p> \
  1653. <div id="FPXImport" style="display:none" class="collapsingField"> \
  1654. <input type="checkbox" id="SRDotDX_options_markImportedRaidsVisited" class="generic"><label for="SRDotDX_options_markImportedRaidsVisited">Mark imported raids visited</label><br> \
  1655. <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;"/> \
  1656. <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;"/> \
  1657. </div> \
  1658. </div> \
  1659. </div> \
  1660. <textarea id="DotDX_raidsToSpam" name="FPXRaidSpamInput" style="height:443px;"></textarea> \
  1661. </div> \
  1662. </li> \
  1663. <li class="tab"> \
  1664. <div class="tab_head">Filter</div> \
  1665. <div class="tab_pane"> \
  1666. <div id="FPXRaidFilterDiv"> \
  1667. <div id="FPXRaidFilterWhereDiv"> \
  1668. <p class="collapsingCategory" id="collapsingCat18" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidFilterWhere\', this)">Filtering options<span style="float:right">+</span></p> \
  1669. <div id="FPXRaidFilterWhere" style="display:block" class="collapsingField"> \
  1670. <input type="checkbox" id="SRDotDX_options_perRaidFilterLinks" class="generic"><label for="SRDotDX_options_perRaidFilterLinks">Activate filtering on raid links</label><br> \
  1671. <input type="checkbox" id="SRDotDX_options_perRaidFilterRaidList" class="generic"><label for="SRDotDX_options_perRaidFilterRaidList">Activate filtering on raid list tab</label><br> \
  1672. </div>\
  1673. </div> \
  1674. <div id="FPXRaidFilterWhatDiv"> \
  1675. <div id="FPXRaidTableSmallDiv" class="collapsible_panel"> \
  1676. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat11" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableSmall\', this)">Small Raids<span style="float:right">+</span></p> \
  1677. <table id="FPXRaidTableSmall" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  1678. <col width="180"/><col width="20"/><col width="20"/><col width="20"/><col width="20"/><col width="20"/><thead><tr><th>Raid</th><th>N</th><th>H</th><th>L</th><th>NM</th><th>All</th></tr></thead> \
  1679. <tbody id="FPXRaidFilterWhatSmall"> \
  1680. <!-- Dynamic content --> \
  1681. </tbody> \
  1682. </table> \
  1683. </div> \
  1684. <div id="FPXRaidTableMediumDiv" class="collapsible_panel"> \
  1685. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat12" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableMedium\', this)">Medium Raids<span style="float:right">+</span></p> \
  1686. <table id="FPXRaidTableMedium" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  1687. <col width="180"/><col width="20"/><col width="20"/><col width="20"/><col width="20"/><col width="20"/><thead><tr><th>Raid</th><th>N</th><th>H</th><th>L</th><th>NM</th><th>All</th></tr></thead> \
  1688. <tbody id="FPXRaidFilterWhatMedium"> \
  1689. <!-- Dynamic content --> \
  1690. </tbody> \
  1691. </table> \
  1692. </div> \
  1693. <div id="FPXRaidTableLargeDiv" class="collapsible_panel"> \
  1694. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat13" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableLarge\', this)">Large Raids<span style="float:right">+</span></p> \
  1695. <table id="FPXRaidTableLarge" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  1696. <col width="180"/><col width="20"/><col width="20"/><col width="20"/><col width="20"/><col width="20"/><thead><tr><th>Raid</th><th>N</th><th>H</th><th>L</th><th>NM</th><th>All</th></tr></thead> \
  1697. <tbody id="FPXRaidFilterWhatLarge"> \
  1698. <!-- Dynamic content --> \
  1699. </tbody> \
  1700. </table> \
  1701. </div> \
  1702. <div id="FPXRaidTableEpicDiv" class="collapsible_panel"> \
  1703. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat14" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableEpic\', this)">Epic Raids<span style="float:right">+</span></p> \
  1704. <table id="FPXRaidTableEpic" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  1705. <col width="180"/><col width="20"/><col width="20"/><col width="20"/><col width="20"/><col width="20"/><thead><tr><th>Raid</th><th>N</th><th>H</th><th>L</th><th>NM</th><th>All</th></tr></thead> \
  1706. <tbody id="FPXRaidFilterWhatEpic"> \
  1707. <!-- Dynamic content --> \
  1708. </tbody> \
  1709. </table> \
  1710. </div> \
  1711. <div id="FPXRaidTableColossalDiv" class="collapsible_panel"> \
  1712. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat15" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableColossal\', this)">Colossal Raids<span style="float:right">+</span></p> \
  1713. <table id="FPXRaidTableColossal" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  1714. <col width="180"/><col width="20"/><col width="20"/><col width="20"/><col width="20"/><col width="20"/><thead><tr><th>Raid</th><th>N</th><th>H</th><th>L</th><th>NM</th><th>All</th></tr></thead> \
  1715. <tbody id="FPXRaidFilterWhatColossal"> \
  1716. <!-- Dynamic content --> \
  1717. </tbody> \
  1718. </table> \
  1719. </div> \
  1720. <div id="FPXRaidTableGuildDiv" class="collapsible_panel"> \
  1721. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat16" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableGuild\', this)">Guild Raids<span style="float:right">+</span></p> \
  1722. <table id="FPXRaidTableGuild" name="dotdxFilterTab" style="display:none; height: 356px; overflow-y: auto;" class="collapsingField"> \
  1723. <col width="180"/><col width="20"/><col width="20"/><col width="20"/><col width="20"/><col width="20"/><thead><tr><th>Raid</th><th>N</th><th>H</th><th>L</th><th>NM</th><th>All</th></tr></thead> \
  1724. <tbody id="FPXRaidFilterWhatGuild"> \
  1725. <!-- Dynamic content --> \
  1726. </tbody> \
  1727. </table> \
  1728. </div> \
  1729. <div id="FPXRaidTableSpecialDiv" class="collapsible_panel"> \
  1730. <p class="collapsingCategory" name="dotdxFilterTab" id="collapsingCat17" onclick="SRDotDX.gui.toggleDisplay(\'FPXRaidTableSpecial\', this)">World Raids<span style="float:right">+</span></p> \
  1731. <table id="FPXRaidTableSpecial" name="dotdxFilterTab" style="display:none" class="collapsingField"> \
  1732. <col width="180"/><col width="20"/><col width="20"/><col width="20"/><col width="20"/><col width="20"/><thead><tr><th>Raid</th><th>N</th><th>H</th><th>L</th><th>NM</th><th>All</th></tr></thead> \
  1733. <tbody id="FPXRaidFilterWhatSpecial"> \
  1734. <!-- Dynamic content --> \
  1735. </tbody> \
  1736. </table> \
  1737. </div> \
  1738. </div> \
  1739. </div> \
  1740. </div> \
  1741. </li> \
  1742. <li class="tab"> \
  1743. <div class="tab_head">Calc</div> \
  1744. <div class="tab_pane"> \
  1745. <ul id="SRDotDX_tabpane_tabs2"> \
  1746. <li class="tab2"> \
  1747. <div id="FPXLandCalcDiv" class="collapsible_panel"> \
  1748. <p class="collapsingCategory" id="collapsingCat20" onclick="SRDotDX.gui.toggleDisplay(\'FPXLandCalc\', this)">Land Calculator<span style="float:right">+</span></p> \
  1749. <div id="FPXLandCalc" style="display:block" class="collapsingField"> \
  1750. <form id="FPXLand" name="FPXLandForm" onSubmit="return false;"> \
  1751. <table style="margin: 0 auto; padding-right: 10px;"> \
  1752. <tr><td class="landname" colspan="3">Cornfield</td><td style="width: 10px">&nbsp;</td><td class="landname" colspan="3">Stable</td></tr> \
  1753. <tr> \
  1754. <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> \
  1755. <td> <input class="landtxtfield" maxlength="10" name="tf_1" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="1" /></td> \
  1756. <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> \
  1757. <td></td> \
  1758. <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> \
  1759. <td> <input class="landtxtfield" maxlength="10" name="tf_2" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="2" /></td> \
  1760. <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> \
  1761. </tr> \
  1762. <tr><td class="landname" colspan="3">Barn</td><td></td><td class="landname" colspan="3">Store</td></tr> \
  1763. <tr> \
  1764. <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> \
  1765. <td> <input class="landtxtfield" maxlength="10" name="tf_3" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="3" /></td> \
  1766. <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> \
  1767. <td></td> \
  1768. <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> \
  1769. <td> <input class="landtxtfield" maxlength="10" name="tf_4" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="4" /></td> \
  1770. <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> \
  1771. </tr> \
  1772. <tr><td class="landname" colspan="3">Pub</td><td></td><td class="landname" colspan="3">Inn</td></tr> \
  1773. <tr> \
  1774. <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> \
  1775. <td> <input class="landtxtfield" maxlength="10" name="tf_5" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="5" /></td> \
  1776. <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> \
  1777. <td></td> \
  1778. <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> \
  1779. <td> <input class="landtxtfield" maxlength="10" name="tf_6" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="6" /></td> \
  1780. <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> \
  1781. </tr> \
  1782. <tr><td class="landname" colspan="3">Sentry</td><td></td><td class="landname" colspan="3">Fort</td></tr> \
  1783. <tr> \
  1784. <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> \
  1785. <td> <input class="landtxtfield" maxlength="10" name="tf_7" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="7" /></td> \
  1786. <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> \
  1787. <td></td> \
  1788. <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> \
  1789. <td> <input class="landtxtfield" maxlength="10" name="tf_8" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="8" /></td> \
  1790. <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> \
  1791. </tr> \
  1792. <tr><td class="landname" colspan="3">Castle</td></tr> \
  1793. <tr> \
  1794. <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> \
  1795. <td> <input class="landtxtfield" maxlength="10" name="tf_9" onblur="SRDotDX.gui.FPXLandUpdater();" size="8" type="text" tabindex="9" /></td> \
  1796. <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> \
  1797. <td></td> \
  1798. <td colspan="3"> <input class="landsavebutton green" id="lsbutton" type="button" value="Save" onClick="SRDotDX.gui.FPXLandButtonSave();return false;" tabindex="28"/></td> \
  1799. </tr> \
  1800. </table> \
  1801. </form> \
  1802. </div> \
  1803. </div>\
  1804. </li> \
  1805. </ul> \
  1806. </div> \
  1807. </li> \
  1808. </ul> \
  1809. </div>\
  1810. <div id="helpBox">Help message</div> \
  1811. </div>\
  1812. ', false).attach('to', 'kong_game_ui').ele();
  1813.  
  1814. SRDotDX.gui.cHTML('style').set({type: "text/css",id: 'DotDX_colors'}).text(' \
  1815. .DotDX_filter_dummy_0 {display: none !important} \
  1816. ').attach('to',document.head);
  1817.  
  1818. pane.style.height = document.getElementById('chat_tab_pane').style.height;
  1819. var e = pane.getElementsByClassName('tab_head');
  1820. i = e.length;
  1821. while (i--) {
  1822. e[i].addEventListener('click', function() {
  1823. if (!/\bactive\b/i.test(this.className)) {
  1824. var e = document.getElementById("lots_tab_pane").getElementsByTagName("li");
  1825. var i = e.length;
  1826. while (i--) if (e[i].getAttribute("class").indexOf("active") > -1) e[i].className = e[i].className.replace(/ active$/g,"");
  1827. (this.parentNode).className += ' active';
  1828. }
  1829. });
  1830. }
  1831. holodeck._tabs.addTab(link);
  1832.  
  1833. //Set up custom chat size
  1834. SRDotDX.gui.chatResize(SRDotDX.config.chatSize);
  1835.  
  1836. //Chat raids overlay div
  1837. SRDotDX.gui.cHTML('div').set({id: 'chat_raids_overlay'})
  1838. .html('<span id="chat_raids_overlay_text"></span>',true)
  1839. .attach("to",'chat_tab_pane');
  1840. SRDotDX.gui.cHTML('div').set({id: 'dotdx_usercontext' })
  1841. .html('<span class="dotdx_context_name" style="text-shadow: none; font-weight: bold; padding-right: 10px;">Guest</span><span class="dotdx_context_friend">Friend</span><span class="dotdx_context_slap">Slap</span><span class="dotdx_context_mute">Mute</span>',true)
  1842. .on('mouseout',SRDotDX.gui.userContextMenuOut,true)
  1843. .on('click',function(e){SRDotDX.gui.userContextMenuClick(e)},false)
  1844. .attach("to",'chat_tab_pane');
  1845.  
  1846. //Sidebar elements generator
  1847. if (SRDotDX.config.sbEnable) SRDotDX.gui.applySidebarUI(1);
  1848.  
  1849. //spam tab
  1850. var FPXimpSpam = SRDotDX.gui.cHTML('#DotDX_raidsToSpam');
  1851. var FPXSpamText = 'Paste raid and/or pastebin links here to share or import\n\nLinks must be comma (,) separated.';
  1852. FPXimpSpam.ele().value=FPXSpamText;
  1853. FPXimpSpam.ele().addEventListener('blur',function() { if (this.value == '') this.value = FPXSpamText });
  1854. FPXimpSpam.ele().addEventListener('focus',function() { if (this.value == FPXSpamText) this.value = '' });
  1855.  
  1856. //chat global listener
  1857. var chat_window = document.getElementById('chat_rooms_container');
  1858. chat_window.addEventListener('click',function(e) { SRDotDX.gui.chatWindowMouseDown(e) }, false);
  1859. chat_window.addEventListener('contextmenu',function(e) { SRDotDX.gui.chatWindowContextMenu(e) }, false);
  1860. //land tab
  1861. els = document.FPXLandForm; i = 9;
  1862. while (i--) els.elements['tf_'+(i+1)].value = SRDotDX.config.FPXLandOwnedCount[i];
  1863. SRDotDX.gui.FPXLandUpdater();
  1864.  
  1865. //raid tab
  1866. var raids_tab = document.getElementById('raids_tab');
  1867. raids_tab.addEventListener('click', function(){ SRDotDX.gui.refreshRaidList(); }, false);
  1868.  
  1869. var raidBossFilter = SRDotDX.gui.cHTML('#raidsBossFilter');
  1870. raidBossFilter.ele().value = SRDotDX.config.lastFilter;
  1871. raidBossFilter.ele().addEventListener("keyup", function(){ SRDotDX.gui.updateFilterTxt(this.value,true); });
  1872.  
  1873. var filterIncVis = SRDotDX.gui.cHTML('#dotdx_flt_vis');
  1874. filterIncVis.ele().checked = SRDotDX.config.fltIncVis;
  1875. filterIncVis.on('click',function(){
  1876. SRDotDX.config.fltIncVis = this.checked;
  1877. if(this.checked) {
  1878. document.getElementById('dotdx_flt_nuke').checked = false; SRDotDX.config.fltShowNuked = false;
  1879. document.getElementById('dotdx_flt_all').checked = false; SRDotDX.config.fltShowAll = false;
  1880. }
  1881. SRDotDX.gui.selectRaidsToJoin('checkbox')});
  1882.  
  1883. var filterShowNuked = SRDotDX.gui.cHTML('#dotdx_flt_nuke');
  1884. filterShowNuked.ele().checked = SRDotDX.config.fltShowNuked;
  1885. filterShowNuked.on('click',function(){
  1886. SRDotDX.config.fltShowNuked = this.checked;
  1887. if(this.checked) {
  1888. document.getElementById('dotdx_flt_vis').checked = false; SRDotDX.config.fltIncVis = false;
  1889. document.getElementById('dotdx_flt_all').checked = false; SRDotDX.config.fltShowAll = false;
  1890. }
  1891. SRDotDX.gui.selectRaidsToJoin('checkbox')});
  1892.  
  1893. var filterShowAll = SRDotDX.gui.cHTML('#dotdx_flt_all');
  1894. filterShowAll.ele().checked = SRDotDX.config.fltShowAll;
  1895. filterShowAll.on('click',function(){
  1896. SRDotDX.config.fltShowAll = this.checked;
  1897. if(this.checked) {
  1898. document.getElementById('dotdx_flt_vis').checked = false; SRDotDX.config.fltIncVis = false;
  1899. document.getElementById('dotdx_flt_nuke').checked = false; SRDotDX.config.fltShowNuked = false }
  1900. SRDotDX.gui.selectRaidsToJoin('checkbox')});
  1901.  
  1902. //raidlist global click listener
  1903. var raid_list = document.getElementById('raid_list');
  1904. raid_list.addEventListener('click', function(e) { e.preventDefault(); e.stopPropagation(); return false },false);
  1905. raid_list.addEventListener('mousedown',function(e) { SRDotDX.gui.FPXraidListMouseDown(e) },false);
  1906.  
  1907. //options tab
  1908. var optsImportFiltered = SRDotDX.gui.cHTML('#SRDotDX_options_importFiltered');
  1909. optsImportFiltered.ele().checked = SRDotDX.config.importFiltered;
  1910. optsImportFiltered.on('click',function(){ SRDotDX.config.importFiltered = this.checked; SRDotDX.config.save(false) });
  1911.  
  1912. var optsShowFs = SRDotDX.gui.cHTML('#SRDotDX_options_showFS');
  1913. optsShowFs.ele().checked = SRDotDX.config.linkShowFs;
  1914. optsShowFs.on('click', function(){ SRDotDX.config.linkShowFs = this.checked; SRDotDX.config.save(false) });
  1915.  
  1916. var optsShowAp = SRDotDX.gui.cHTML('#SRDotDX_options_showAP');
  1917. optsShowAp.ele().checked = SRDotDX.config.linkShowAp;
  1918. optsShowAp.on('click', function(){ SRDotDX.config.linkShowAp = this.checked; SRDotDX.config.save(false) });
  1919.  
  1920. var optsHideARaids = SRDotDX.gui.cHTML('#SRDotDX_options_hideRaidLinks');
  1921. var optsHideBRaids = SRDotDX.gui.cHTML('#SRDotDX_options_hideBotLinks');
  1922. var optsHideVRaids = SRDotDX.gui.cHTML('#SRDotDX_options_hideVisitedRaids');
  1923. var optsConfirmDeletes = SRDotDX.gui.cHTML('#SRDotDX_options_confirmWhenDeleting');
  1924. var optsMarkImportedVisited = SRDotDX.gui.cHTML('#SRDotDX_options_markImportedRaidsVisited');
  1925. var optsWhisperTo = SRDotDX.gui.cHTML('#SRDotDX_options_whisperTo');
  1926. var optsMarkMyRaidsVisited = SRDotDX.gui.cHTML('#SRDotDX_options_markMyRaidsVisited');
  1927. var optsFormatLinkOutput = SRDotDX.gui.cHTML('#SRDotDX_options_formatLinkOutput');
  1928. var optsAutoImportPaste = SRDotDX.gui.cHTML('#SRDotDX_options_autoImportPaste');
  1929. var optsConfirmForLargePaste = SRDotDX.gui.cHTML('#SRDotDX_options_confirmForLargePaste');
  1930. var optsConfirmPasteSize = SRDotDX.gui.cHTML('#SRDotDX_options_confirmPasteSize');
  1931. var rbUnvisitedPruningAggressive = SRDotDX.gui.cHTML('#FPX_options_unvisitedPruningAggressive');
  1932. var rbUnvisitedPruningModerate = SRDotDX.gui.cHTML('#FPX_options_unvisitedPruningModerate');
  1933. var rbUnvisitedPruningSlow = SRDotDX.gui.cHTML('#FPX_options_unvisitedPruningSlow');
  1934. var rbUnvisitedPruningNone = SRDotDX.gui.cHTML('#FPX_options_unvisitedPruningNone');
  1935.  
  1936. var optsChatSizeNormal = SRDotDX.gui.cHTML('#SRDotDX_options_chatSizeNormal');
  1937. optsChatSizeNormal.on('click', function(){ SRDotDX.gui.chatResize(300) });
  1938. var optsChatSizePlus25 = SRDotDX.gui.cHTML('#SRDotDX_options_chatSizePlus25');
  1939. optsChatSizePlus25.on('click', function(){ SRDotDX.gui.chatResize(375) });
  1940. var optsChatSizePlus50 = SRDotDX.gui.cHTML('#SRDotDX_options_chatSizePlus50');
  1941. optsChatSizePlus50.on('click', function(){ SRDotDX.gui.chatResize(450) });
  1942. switch(SRDotDX.config.chatSize) {
  1943. case 300: optsChatSizeNormal.ele().checked = true; break;
  1944. case 375: optsChatSizePlus25.ele().checked = true; break;
  1945. case 450: optsChatSizePlus50.ele().checked = true; break;
  1946. default: optsChatSizeNormal.ele().checked = true; break;
  1947. }
  1948.  
  1949. var optsHideKongForum = SRDotDX.gui.cHTML('#options_hideKongForum');
  1950. optsHideKongForum.ele().checked = SRDotDX.config.hideKongForum;
  1951. optsHideKongForum.on('click', function(){ SRDotDX.config.hideKongForum = this.checked; SRDotDX.gui.cHTML('#DotDX_forum').html('div.game_page_wrap {padding-top: 16px; margin-top: 14px !important; background: #333 !important; display: ' + (SRDotDX.config.hideKongForum ? 'none' : 'block') + '}',true) });
  1952.  
  1953. var optsHideGameDetails = SRDotDX.gui.cHTML('#options_hideGameDetails');
  1954. optsHideGameDetails.ele().checked = SRDotDX.config.hideGameDetails;
  1955. optsHideGameDetails.on('click', function(){ SRDotDX.config.hideGameDetails = this.checked; SRDotDX.gui.cHTML('#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) });
  1956.  
  1957. var optsHideGameTitle = SRDotDX.gui.cHTML('#options_hideGameTitle');
  1958. optsHideGameTitle.ele().checked = SRDotDX.config.hideGameTitle;
  1959. optsHideGameTitle.on('click', function(){ SRDotDX.config.hideGameTitle = this.checked });
  1960.  
  1961. var optsTrueMsgCount = SRDotDX.gui.cHTML('#options_trueMsgCount');
  1962. optsTrueMsgCount.ele().checked = SRDotDX.config.kongMsg;
  1963. optsTrueMsgCount.on('click', function(){ SRDotDX.config.kongMsg = this.checked });
  1964. if(SRDotDX.config.kongMsg) SRDotDX.gui.setMessagesCount();
  1965.  
  1966. //Opts -> Sidebar Options
  1967. var optsSbEnable = SRDotDX.gui.cHTML('#options_sbEnable');
  1968. optsSbEnable.ele().checked = SRDotDX.config.sbEnable;
  1969. optsSbEnable.on('click', function(){ SRDotDX.config.sbEnable = this.checked; SRDotDX.gui.applySidebarUI(this.checked?1:-1); SRDotDX.config.save(false) });
  1970.  
  1971. var optsSbRightSide = SRDotDX.gui.cHTML('#options_sbRightSide');
  1972. optsSbRightSide.ele().checked = SRDotDX.config.sbRightSide;
  1973. optsSbRightSide.on('click', function(){ SRDotDX.config.sbRightSide = this.checked; SRDotDX.gui.applySidebarUI(2); SRDotDX.config.save(false) });
  1974.  
  1975. var optsCbDisable = SRDotDX.gui.cHTML('#options_cbDisable');
  1976. optsCbDisable.ele().checked = SRDotDX.config.cbDisable;
  1977. optsCbDisable.on('click', function(){ SRDotDX.config.cbDisable = this.checked; SRDotDX.config.save(false) });
  1978.  
  1979. if (SRDotDX.config.markMyRaidsVisted) { optsMarkMyRaidsVisited.ele().checked = true }
  1980. if (SRDotDX.config.formatLinkOutput) { optsFormatLinkOutput.ele().checked = 'checked'; }
  1981. if (SRDotDX.config.markImportedVisited) { optsMarkImportedVisited.ele().checked = 'checked'; }
  1982. if (SRDotDX.config.whisperTo != '') { optsWhisperTo.ele().value = SRDotDX.config.whisperTo; }
  1983. if (SRDotDX.config.autoImportPaste) { optsAutoImportPaste.ele().checked = 'checked'; } else { optsConfirmForLargePaste.ele().disabled=true; optsConfirmPasteSize.ele().disabled=true}
  1984. if (SRDotDX.config.confirmForLargePaste) { optsConfirmForLargePaste.ele().checked = 'checked'; } else { optsConfirmPasteSize.ele().disabled=true }
  1985. if (SRDotDX.config.confirmPasteSize>0) { optsConfirmPasteSize.ele().value = SRDotDX.config.confirmPasteSize }
  1986. if (SRDotDX.config.confirmDeletes) { optsConfirmDeletes.ele().checked = 'checked' }
  1987. if (SRDotDX.config.bckColor) { SRDotDX.gui.cHTML('#SRDotDX_colors_background').ele().value = SRDotDX.config.bckColor }
  1988.  
  1989.  
  1990.  
  1991. switch(SRDotDX.config.unvisitedRaidPruningMode) {
  1992. case 0: rbUnvisitedPruningAggressive.ele().checked = true; break;
  1993. case 1: rbUnvisitedPruningModerate.ele().checked = true; break;
  1994. case 2: rbUnvisitedPruningSlow.ele().checked = true; break;
  1995. case 3: rbUnvisitedPruningNone.ele().checked = true; break;
  1996. default: rbUnvisitedPruningAggressive.ele().checked = true; break;
  1997. }
  1998.  
  1999. if (SRDotDX.config.hideVisitedRaids) {optsHideVRaids.ele().checked = 'checked'}
  2000. if (SRDotDX.config.hideBotLinks) { optsHideBRaids.ele().checked = 'checked' }
  2001. if (SRDotDX.config.hideRaidLinks) {
  2002. optsHideARaids.ele().checked = true;
  2003. optsHideVRaids.ele().disabled = true;
  2004. optsHideBRaids.ele().disabled = true;
  2005. }
  2006.  
  2007. optsConfirmDeletes.ele().addEventListener('click', function () { SRDotDX.config.confirmDeletes = this.checked });
  2008. optsAutoImportPaste.ele().addEventListener('click', function (){ SRDotDX.config.autoImportPaste = this.checked;
  2009. if(!this.checked){ optsConfirmForLargePaste.ele().checked = false; SRDotDX.config.confirmForLargePaste = false }
  2010. optsConfirmForLargePaste.ele().disabled = !this.checked;
  2011. optsConfirmPasteSize.ele().disabled = !this.checked;
  2012. });
  2013. optsConfirmForLargePaste.ele().addEventListener('click', function () { optsConfirmPasteSize.ele().disabled = !this.checked; SRDotDX.config.confirmForLargePaste = this.checked });
  2014. optsConfirmPasteSize.ele().addEventListener('change', function () { if(isNumber(this.value)) SRDotDX.config.confirmPasteSize = parseInt(this.value); else SRDotDX.gui.errorMessage('Paste size must be a number') });
  2015.  
  2016. optsMarkImportedVisited.ele().addEventListener("click", function() { SRDotDX.config.markImportedVisited = this.checked; });
  2017.  
  2018.  
  2019. optsWhisperTo.ele().addEventListener("change", function(){
  2020. console.log("[SRDotDX] Whisper person changed to " + this.value);
  2021. SRDotDX.config.whisperTo = this.value;
  2022. });
  2023. SRDotDX.gui.cHTML('#SRDotDX_colors_background').ele().addEventListener("change", function(){
  2024. SRDotDX.config.bckColor = this.value;
  2025. });
  2026.  
  2027. optsFormatLinkOutput.ele().addEventListener("click", function(){
  2028. SRDotDX.config.formatLinkOutput = this.checked;
  2029. });
  2030.  
  2031. optsMarkMyRaidsVisited.ele().addEventListener("click", function() {
  2032. SRDotDX.config.markMyRaidsVisted = this.checked;
  2033. });
  2034. optsHideARaids.ele().addEventListener("click",function() {
  2035. document.getElementById('SRDotDX_options_hideVisitedRaids').disabled = this.checked;
  2036. document.getElementById('SRDotDX_options_hideSeenRaids').disabled = this.checked;
  2037. SRDotDX.config.hideRaidLinks = this.checked;
  2038. SRDotDX.gui.cHTML('#SRDotDX_raidClass').html('.SRDotDX_raid {display: ' + (this.checked ? 'none !important' : 'block') + '}', true);
  2039. },true);
  2040. optsHideBRaids.ele().addEventListener("click",function() { SRDotDX.gui.switchBot('dotdx_chat_bot') },true);
  2041. optsHideVRaids.ele().addEventListener("click",function() {
  2042. SRDotDX.config.hideVisitedRaids = this.checked;
  2043. SRDotDX.gui.cHTML('#SRDotDX_visitedRaidClass').html('.SRDotDX_visitedRaid {display: ' + (this.checked ? 'none !important' : 'block') + '}', true);
  2044. },true);
  2045.  
  2046. rbUnvisitedPruningAggressive.ele().addEventListener("click",function() { SRDotDX.config.unvisitedRaidPruningMode = 0 },true);
  2047. rbUnvisitedPruningModerate.ele().addEventListener("click",function() { SRDotDX.config.unvisitedRaidPruningMode = 1 },true);
  2048. rbUnvisitedPruningSlow.ele().addEventListener("click",function() { SRDotDX.config.unvisitedRaidPruningMode = 2 },true);
  2049. rbUnvisitedPruningNone.ele().addEventListener("click",function() { SRDotDX.config.unvisitedRaidPruningMode = 3 },true);
  2050.  
  2051. //CHAT TAB CLICK SCROLL (id=chat_tab, class=chat_message_window)
  2052. SRDotDX.gui.cHTML('#chat_tab').ele().addEventListener("click", function () {
  2053. setTimeout(function(){
  2054. var els = document.getElementsByClassName('chat_message_window'), el;
  2055. i = els.length;
  2056. while (i--) {
  2057. el = els[i]; console.log("[SRDotDX] Scrolling chat window " + el.scrollTop + " : " + el.scrollHeight);
  2058. el.scrollTop = el.scrollHeight;
  2059. }
  2060. SRDotDX.gui.selectRaidsToJoin();
  2061. },50);
  2062. },true);
  2063.  
  2064. //RAIDS TAB CLICK EVENT LISTENER
  2065. SRDotDX.gui.cHTML('#lots_tab').ele().addEventListener("click", function(){setTimeout(SRDotDX.gui.selectRaidsToJoin,50)},true);
  2066.  
  2067. //FriendShare
  2068. SRDotDX.gui.refreshFriends();
  2069.  
  2070. // Filtering tab
  2071. var i = 0, isChecked, raid, parentTableId = '', parentTable = '';
  2072. while (i < SRDotDX.raidArray.length) {
  2073. raid = SRDotDX.raids[SRDotDX.raidArray[i]];
  2074. parentTableId = 'FPX_options_cbs_' + raid.id;
  2075. parentTable = SRDotDX.gui.cHTML('tr').set({id: parentTableId}).html(' \
  2076. <td>' + raid.name + '</td> \
  2077. <td><input type="checkbox" id="cb_filter_' + raid.id + '_0' + '"/><label for="cb_filter_' + raid.id + '_0' + '"></label></td> \
  2078. <td><input type="checkbox" id="cb_filter_' + raid.id + '_1' + '"/><label for="cb_filter_' + raid.id + '_1' + '"></label></td> \
  2079. <td><input type="checkbox" id="cb_filter_' + raid.id + '_2' + '"/><label for="cb_filter_' + raid.id + '_2' + '"></label></td> \
  2080. <td><input type="checkbox" id="cb_filter_' + raid.id + '_3' + '"/><label for="cb_filter_' + raid.id + '_3' + '"></label></td> \
  2081. <td><input type="checkbox" id="cb_filter_' + raid.id + '_all' + '"/><label for="cb_filter_' + raid.id + '_all' + '"></label></td>', false);
  2082.  
  2083. if (raid.stat == 'H') parentTable.attach('to','FPXRaidFilterWhatGuild');
  2084. else if (raid.stat == 'ESH') parentTable.attach('to','FPXRaidFilterWhatSpecial');
  2085. else if (raid.size > 1 && raid.size < 50) parentTable.attach('to','FPXRaidFilterWhatSmall');
  2086. else if (raid.size == 50) parentTable.attach('to','FPXRaidFilterWhatMedium');
  2087. else if (raid.size == 100) parentTable.attach('to','FPXRaidFilterWhatLarge');
  2088. else if (raid.size == 250) parentTable.attach('to','FPXRaidFilterWhatEpic');
  2089. else if (raid.size == 500) parentTable.attach('to','FPXRaidFilterWhatColossal');
  2090.  
  2091. for (var j=0; j<4; j++) {
  2092. var cbId = "cb_filter_" + raid.id + '_' + j; isChecked = !SRDotDX.config.filters[raid.id][j];
  2093. cb = SRDotDX.gui.cHTML('#' + cbId); cb.ele().checked = isChecked;
  2094. cb.ele().addEventListener("click",function() {
  2095. var raidId = '', diffIndex = '', reg = /cb_filter_([0-9a-z_]+)_([0-9])/i;
  2096. var ele = SRDotDX.gui.cHTML('#DotDX_filters').ele().innerHTML; i = reg.exec(this.id);
  2097. if (i != null) { raidId = i[1]; diffIndex = parseInt(i[2]) }
  2098. SRDotDX.config.setFilter(raidId,diffIndex,!this.checked);
  2099. reg = new RegExp('.DotDX_fltChat_'+raidId+'_'+diffIndex+', ','g');
  2100. if(SRDotDX.config.filterChatLinks) {
  2101. if (!this.checked && !reg.test(ele)) ele = '.DotDX_fltChat_' + raidId + '_' + diffIndex + ', ' + ele;
  2102. else if (this.checked) ele = ele.replace(reg,'');
  2103. }
  2104. reg = new RegExp('.DotDX_fltList_'+raidId+'_'+diffIndex+', ','g');
  2105. if(SRDotDX.config.filterRaidList) {
  2106. if (!this.checked && !reg.test(ele)) ele = '.DotDX_fltList_' + raidId + '_' + diffIndex + ', ' + ele;
  2107. else if (this.checked) ele = ele.replace(reg,'');
  2108. }
  2109. SRDotDX.gui.cHTML('#DotDX_filters').ele().innerHTML = ele;
  2110.  
  2111. var cbAllId = "cb_filter_" + raidId + '_all';
  2112.  
  2113. var f1 = SRDotDX.config.filters[raidId][0];
  2114. var f2 = SRDotDX.config.filters[raidId][1];
  2115. var f3 = SRDotDX.config.filters[raidId][2];
  2116. var f4 = SRDotDX.config.filters[raidId][3];
  2117.  
  2118. if ((!f1 && !f2 && !f3 && !f4) || (f1 && f2 && f3 && f4)) { var cb = SRDotDX.gui.cHTML('#' + cbAllId); cb.ele().checked = this.checked }
  2119. },true);
  2120. }
  2121. var allCbId = "cb_filter_" + raid.id + "_all";
  2122. isChecked = !(SRDotDX.config.filters[raid.id][0] && SRDotDX.config.filters[raid.id][1] && SRDotDX.config.filters[raid.id][2] && SRDotDX.config.filters[raid.id][3]);
  2123. var cb = SRDotDX.gui.cHTML('#' + allCbId); cb.ele().checked = isChecked;
  2124. cb.on("click",function() {
  2125. var reg = /cb_filter_([0-9a-z_]+)_all/i, i = reg.exec(this.id), raidId = '', j = 0, cbId, subcb, ele = SRDotDX.gui.cHTML('#DotDX_filters').ele().innerHTML;
  2126. if (i != null) raidId = i[1];
  2127. while (j < 4) {
  2128. cbId = 'cb_filter_' + raidId + '_' + j; subcb = SRDotDX.gui.cHTML('#' + cbId);
  2129. subcb.ele().checked = this.checked; SRDotDX.config.filters[raidId][j] = !this.checked;
  2130. reg = new RegExp('.DotDX_fltChat_'+raidId+'_'+j+', ','g');
  2131. if(SRDotDX.config.filterChatLinks) {
  2132. if (!this.checked && !reg.test(ele)) ele = '.DotDX_fltChat_' + raidId + '_' + j + ', ' + ele;
  2133. else if (this.checked) ele = ele.replace(reg,'');
  2134. }
  2135. reg = new RegExp('.DotDX_fltList_'+raidId+'_'+j+', ','g');
  2136. if(SRDotDX.config.filterRaidList) {
  2137. if (!this.checked && !reg.test(ele)) ele = '.DotDX_fltList_' + raidId + '_' + j + ', ' + ele;
  2138. else if (this.checked) ele = ele.replace(reg,'');
  2139. }
  2140. SRDotDX.gui.cHTML('#DotDX_filters').ele().innerHTML = ele; j++
  2141. }
  2142. },true); i++
  2143. }
  2144.  
  2145. var filterChatCb = SRDotDX.gui.cHTML('#SRDotDX_options_perRaidFilterLinks');
  2146. filterChatCb.on("click", function() { SRDotDX.config.filterChatLinks = this.checked; SRDotDX.gui.toggleFiltering();},true).ele().checked = SRDotDX.config.filterChatLinks;
  2147.  
  2148. var filterListCb = SRDotDX.gui.cHTML('#SRDotDX_options_perRaidFilterRaidList');
  2149. filterListCb.on("click", function() { SRDotDX.config.filterRaidList = this.checked; SRDotDX.gui.toggleFiltering();},true).ele().checked = SRDotDX.config.filterRaidList;
  2150.  
  2151. SRDotDX.gui.cHTML('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');
  2152.  
  2153. //Chat buttons overlay div
  2154. document.getElementsByClassName('chat_message_window')[0].setAttribute('id','chat_message_window');
  2155. var hd = document.getElementById('chat_window_header').getElementsByClassName('room_name_container')[0].innerHTML;
  2156. 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>';
  2157. //for (i=0; i<chatPane.length; i++) chatPane[i].style.height = '434px';
  2158. if (!SRDotDX.config.cbDisable) SRDotDX.gui.cHTML('div').set({class: 'dotdx_chat_buttons'}).html('<span id="dotdx_chat_join" class="dotdx_chat_button">Join</span><input onkeyup="SRDotDX.gui.updateFilterTxt(this.value)" class="dotdx_chat_filter" type="text" value="' + SRDotDX.config.chatFilterString + '"><span class="dotdx_chat_button" id="dotdx_chat_import">Import</span><span class="dotdx_chat_button" id="dotdx_chat_reload">Reload</span><span class="dotdx_chat_button dotdx_chat_bot_button' + (SRDotDX.config.hideBotLinks ? " active" : "") + '" id="dotdx_chat_bot">Bot</span>',true).attach("after",'chat_message_window');
  2159. //setTimeout(SRDotDX.gui.FPXFilterRaidListByName, 2500);
  2160. setTimeout(SRDotDX.gui.BeginDeletingExpiredUnvisitedRaids, 10000);
  2161. //setTimeout(SRDotDX.purge, 20000);
  2162. SRDotDX.util.updateUser(true);
  2163. console.log('[DotDX] DotDeXtension loading complete');
  2164. SRDotDX.gui.doStatusOutput('Loaded successfully', 2000, false);
  2165. setTimeout(SRDotDX.config.save, 2000);
  2166. }
  2167. else { setTimeout(SRDotDX.gui.load, 500)}
  2168. },
  2169. fsEleClick: function(e) {
  2170. e = e || window.event;
  2171. var el = e.target.id.split(':');
  2172. if (el[0] == 'fs') {
  2173. SRDotDX.config.friendUsers[el[1]][el[2]] = e.target.checked;
  2174. }
  2175. },
  2176. FPXraidLinkClick: function(id) {
  2177. if(!SRDotDX.gui.joining) {
  2178. //SRDotDX.request.kongData = 'kongregate_username='+holodeck._active_user.username()+'&kongregate_user_id='+holodeck._active_user.id()+'&kongregate_game_auth_token='+holodeck._active_user.gameAuthToken();
  2179. SRDotDX.request.joinRaid(SRDotDX.config.raidList[id]);
  2180. }
  2181. else SRDotDX.gui.joinRaidList.push(SRDotDX.gui.GetRaid(id));
  2182. },
  2183. FPXLandButtonHandler: function (ele, name) {
  2184. var x = name.charAt(name.length-1), sign = 1;
  2185. if(name.charAt(3)!='p')sign=-1;
  2186. document.FPXLandForm.elements["tf_"+x].value = parseInt(document.FPXLandForm.elements["tf_"+x].value, 10)+(10*sign);
  2187. SRDotDX.gui.FPXLandUpdater();
  2188. },
  2189. FPXLandUpdater: function () {
  2190. var owned = [0,0,0,0,0,0,0,0,0], els = document.FPXLandForm, i = 9;
  2191. while (i--) owned[i] = parseInt(els.elements['tf_'+(i+1)].value,10);
  2192. var ratio = FPX.LandCostRatio(owned), best = 0, cn; i = 9;
  2193. while (i--) {
  2194. cn = document.getElementById('b_'+(i+1)).className;
  2195. if (cn.indexOf('landpmbutton ') == -1) document.getElementById('b_'+(i+1)).className = cn.replace('landpmbuttonhigh','landpmbutton');
  2196. //document.getElementById('b_'+(i+1)).prevClassName = 'landpmbutton';
  2197. if (ratio[i] > ratio[best]) best = i;
  2198. }
  2199. cn = document.getElementById('b_'+(best+1)).className;
  2200. document.getElementById('b_'+(best+1)).className = cn.replace('landpmbutton','landpmbuttonhigh');
  2201. },
  2202. FPXLandButtonSave: function () {
  2203. var els = document.FPXLandForm, i = 9;
  2204. while (i--) SRDotDX.config.FPXLandOwnedCount[i] = els.elements['tf_'+(i+1)].value;
  2205. SRDotDX.config.save(false);
  2206. SRDotDX.gui.doStatusOutput('Land count saved!');
  2207. },
  2208. FPXraidListMouseDown: function(e) {
  2209. e.preventDefault(); e.stopPropagation();
  2210. var classtype = e.target.className, con; e = e || window.event;
  2211. console.log("[SRDotDX] Clicked on el with class:" + classtype + ", mouse button:" + e.which);
  2212. if (e.which == 1) {
  2213. switch (classtype) {
  2214. case 'dotdxRaidListDelete': SRDotDX.gui.deleteRaid(e.target.parentNode); break;
  2215. case 'DotDX_RaidLink': SRDotDX.gui.FPXraidLinkClick(e.target.parentNode.getAttribute("raidid")); break;
  2216. }
  2217. }
  2218. },
  2219. userContextMenuClick: function(e) {
  2220. e = e || window.event;
  2221. if(e.which == 1 && e.target.tagName.toLowerCase() == 'span') {
  2222. var initialClass = e.target.className.split(' ');
  2223. var classTokens = initialClass[0].split('_');
  2224. console.log('[DotDX] Chat menu click: user [' + initialClass[1] + '] action [' + classTokens[2]+']');
  2225. switch(classTokens[2]) {
  2226. case 'slap':
  2227. var num = Math.round((Math.random()*(SRDotDX.slapSentences.length-1)));
  2228. SRDotDX.gui.FPXdoWork('*' + SRDotDX.slapSentences[num].replace(/<nick>/g,initialClass[1]) + '*');
  2229. break;
  2230. case 'mute':
  2231. SRDotDX.config.mutedUsers[initialClass[1]] = true;
  2232. SRDotDX.config.save(false);
  2233. break;
  2234. case 'friend':
  2235. if (typeof SRDotDX.config.friendUsers[initialClass[1]] == 'object') delete SRDotDX.config.friendUsers[initialClass[1]];
  2236. else SRDotDX.config.friendUsers[initialClass[1]] = [false,false,false,false,true];
  2237. SRDotDX.config.save(false);
  2238. SRDotDX.gui.refreshFriends();
  2239. break;
  2240. case 'name':
  2241. holodeck.showMiniProfile(initialClass[1]);
  2242. break;
  2243. }
  2244. e.target.className = initialClass[0];
  2245. document.getElementById('dotdx_usercontext').style.display = 'none';
  2246. }
  2247. },
  2248. userContextMenuOut: function(e) {
  2249. var el = e.toElement || e.relatedTarget;
  2250. if (el.parentNode == this || el == this) return;
  2251. var cMenu = document.getElementById('dotdx_usercontext');
  2252. for(var i=0; i<4; i++) cMenu.children[i].className = cMenu.children[i].className.split(' ')[0];
  2253. document.getElementById('dotdx_usercontext').style.display = 'none';
  2254. },
  2255. chatWindowContextMenu: function (e) {
  2256. e = e || window.event;
  2257. var clickedClass = e.target.className.split(" "), nick = "";
  2258. console.log('[DotDX] Chat window menu [' + e.target.className + ']');
  2259. switch (clickedClass[0]) {
  2260. case 'username':
  2261. if (clickedClass[1] != 'spritesite') {
  2262. e.preventDefault(); e.stopPropagation();
  2263. nick = clickedClass[1];
  2264. console.log("[DotDX] Open context menu, nick [" + nick + "], coords [" + e.clientX + "," + e.clientY + "]");
  2265. var cMenu = document.getElementById('dotdx_usercontext');
  2266. var tPane = document.getElementById('chat_tab_pane').getBoundingClientRect();
  2267. cMenu.children[0].innerHTML = nick;
  2268. cMenu.children[1].innerHTML = SRDotDX.config.friendUsers[nick] ? 'unFriend' : 'Friend';
  2269. for(var i=0; i<4; i++) cMenu.children[i].className += " "+nick;
  2270. cMenu.style.top = e.clientY - tPane.top - 14 + 'px';
  2271. cMenu.style.left = e.clientX - tPane.left - 3 + 'px';
  2272. cMenu.style.display = 'block';
  2273. return false;
  2274. }
  2275. break;
  2276. }
  2277. },
  2278. chatWindowMouseDown: function (e) {
  2279. e = e || window.event;
  2280. var clickedClass = e.target.className.split(" "), nick = "";
  2281. console.log('[DotDX] Chat window (' + e.which + ') [' + e.target.className + ']');
  2282.  
  2283. switch (clickedClass[0]) {
  2284. case 'username':
  2285. if (clickedClass[1] != 'spritesite') {
  2286. e.preventDefault(); e.stopPropagation();
  2287. nick = clickedClass[1];
  2288. if (e.which == 1) {
  2289. console.log("[DotDX] Whisp to user with nick [" + nick + "]");
  2290. holodeck.chatWindow().insertPrivateMessagePrefixFor(nick);
  2291. }
  2292. }
  2293. break;
  2294. case 'chatRaidLink':
  2295. if(e.which == 1) {
  2296. e.preventDefault(); e.stopPropagation();
  2297. var raid = clickedClass[1].split("|");
  2298. var rObj = {id:raid[0],hash:raid[1],boss:raid[2],diff:raid[3]};
  2299. if(!SRDotDX.gui.joining) {
  2300. //SRDotDX.request.kongData = 'kongregate_username='+holodeck._active_user.username()+'&kongregate_user_id='+holodeck._active_user.id()+'&kongregate_game_auth_token='+holodeck._active_user.gameAuthToken();
  2301. SRDotDX.request.joinRaid(rObj);
  2302. }
  2303. else SRDotDX.gui.joinRaidList.push(rObj);
  2304. }
  2305. break;
  2306. case 'dotdx_chat_button':
  2307. if(e.which == 1) {
  2308. switch(e.target.id) {
  2309. case 'dotdx_chat_join': SRDotDX.gui.joinSelectedRaids(true); break;
  2310. case 'dotdx_chat_import': SRDotDX.gui.importFromServer(); break;
  2311. case 'dotdx_chat_bot': SRDotDX.gui.switchBot(); break;
  2312. case 'dotdx_chat_reload': SRDotDX.reload(); break;
  2313. }
  2314. }
  2315. }
  2316. },
  2317. FPXraidLinkMouseDown: function (e,param1,param2,isChat) {
  2318. e = e || window.event;
  2319. if(isChat && e.which == 1) SRDotDX.gui.FPXraidLinkClick(param1);
  2320. },
  2321. raidListItemUpdateTimeSince: function(id) {
  2322. var raid = SRDotDX.config.raidList[id];
  2323. if (typeof raid == 'object') document.getElementById('timeSince_' + id).innerHTML = timeSince(new Date(raid.timeStamp))
  2324. },
  2325. raidListItemUpdate: function(id) {
  2326. var raid = SRDotDX.config.raidList[id];
  2327. if (typeof raid == 'object') {
  2328. var ele = document.getElementById("raid_list").firstChild;
  2329. while (ele) {
  2330. if (ele.getAttribute("raidid") == id) { ele.getElementsByClassName("DotDX_RaidListVisited")[0].innerHTML = (raid.visited ? '&#9733;':''); break; }
  2331. ele = ele.nextSibling;
  2332. }
  2333. }
  2334. else SRDotDX.gui.raidListItemRemoveById(id);
  2335. },
  2336. raidListItemRemoveById: function (id) {
  2337. var ele = document.getElementById('DotDX_' + id);
  2338. if (ele) ele.parentNode.removeChild(ele);
  2339. },
  2340. toggleCSS: function (p) {
  2341. if (p) {
  2342. document.head.removeChild(document.getElementById(p.id));
  2343. SRDotDX.gui.cHTML("style").set({type: "text/css", id: p.id}).text(p.cls).attach("to",document.head);
  2344. }
  2345. },
  2346. toggleRaid: function(type,id,tog) {
  2347. var d = document.getElementsByClassName("DotDX_raidId_" + id);
  2348. if (typeof SRDotDX.config.raidList[id] == 'object') {
  2349. var raid = SRDotDX.config.raidList[id];
  2350. raid = SRDotDX.getRaidDetails("&kv_difficulty="+raid.diff+"&kv_hash="+raid.hash+"&kv_raid_boss="+raid.boss+"&kv_raid_id="+raid.id);
  2351. }
  2352. var i = d.length;
  2353. while (i--) {
  2354. if (tog && d[i].className.indexOf('DotDX_' + type + 'Raid') < 0) d[i].className += ' DotDX_' + type + 'Raid';
  2355. else if (!tog && d[i].className.indexOf('DotDX_' + type + 'Raid') >= 0) d[i].className = d[i].className.replace(new RegExp('DotDX_' + type + 'Raid( |$)','i'),'');
  2356. if (typeof raid == 'object') d[i].getElementsByTagName('a')[0].innerHTML = raid.linkText();
  2357. }
  2358. }
  2359. },
  2360. nukeRaid: function (id) { if (SRDotDX.config.raidList[id]) { SRDotDX.config.raidList[id].nuked = true; SRDotDX.gui.toggleRaid('nuked', id, true) } },
  2361. searchPatterns: {
  2362. z1: ['kobold','scorp','ogre'],
  2363. z2: ['rhino','alice','lurker'],
  2364. z3: ['4ogre','squid','batman','drag','tainted'],
  2365. z4: ['bmane','3dawg','hydra','sircai','tyranthius'],
  2366. z5: ['ironclad','zombiehorde','stein','bogstench','nalagarst'],
  2367. z6: ['gunnar','nidhogg','kang','ulfrik','kalaxia'],
  2368. z7: ['maraak','erakka_sak','wexxa','guilbert','bellarius'],
  2369. z8: ['hargamesh','grimsly','rift','sisters','mardachus'],
  2370. z9: ['mesyra','nimrod','phaedra','tenebra','valanazes'],
  2371. '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'],
  2372. 'z9.5': ['pumpkin','jacksrevenge1'],
  2373. z10: ['krugnug','tomb_gargoyle','leonine_watcher','centurion_marius','caracalla'],
  2374. z14: ['zugen','gulkinari','verkiteia','cannibal_barbarians'],
  2375. z15: ['korxun','xerkara','shaar','nereidon','drulcharus'],
  2376. farm: ['maraak','erakka_sak','wexxa','guilbert','bellarius','drag','tainted','ogre','scorp','baroness'],
  2377. 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'],
  2378. tower: ['thaltherda','hurkus','malleus'],
  2379. small: ['kobold','rhino','bmane','4ogre','serpina','dragons_lair','gunnar','hargamesh','ironclad','krugnug','maraak','thaltherda','zugen','nereidon'],
  2380. medium: ['alice','erakka_sak','grimsly','3dawg','scorp','nidhogg','tomb_gargoyle','squid','tisiphone','zombiehorde','baroness','hurkus','gulkinari','korxun'],
  2381. large: ['ogre','batman','hydra','kang','leonine_watcher','lurker','rift','stein','wexxa','teremarthu','zralkthalat','malleus','verkiteia','drulcharus'],
  2382. epic: ['bogstench','centurion_marius','drag','tainted','guilbert','pumpkin','jacksrevenge1','mesyra','nimrod','phaedra','sircai','sisters','ulfrik','frogmen_assassins','burbata','yydians_sanctuary','grundus','shaar','tuxargus','nylatrix'],
  2383. colossal: ['bellarius','caracalla','kalaxia','tyranthius','mardachus','nalagarst','tenebra','valanazes','siculus','ruzzik','cannibal_barbarians','vortex_abomination','xerkara','keron','clockwork_dragon','krxunara'],
  2384. glyph: ['maraak','erakka_sak','wexxa','guilbert','bellarius'],
  2385. citadel: ['thaltherda','hurkus','malleus','yydians_sanctuary','clockwork_dragon','krxunara'],
  2386. festival: ['vortex_abomination','drunken_ragunt','mestr_rekkr_rematch'],
  2387. aquatic: ['dirthax','frogmen_assassins','lurker','nidhogg','crabshark','squid','thaltherda','nereidon','krxunara'],
  2388. beastman: ['bmane','burbata','frogmen_assassins','batman','war_boar','hargamesh','hurkus','krugnug','malleus','scorp','ruzzik','squid','korxun','shaar','nereidon','drulcharus'],
  2389. bludheim: ['gunnar','nidhogg','kang','ulfrik','kalaxia'],
  2390. colosseum: ['gladiators','serpina','crabshark','tisiphone','chimera'],
  2391. construct: ['cedric','erakka_sak','giantgolem','leonine_watcher','tomb_gargoyle','stein','yydians_sanctuary','clockwork_dragon'],
  2392. demon: ['apoc_demon','3dawg','tyranthius','lunacy','salome','sircai','blobmonster','malchar','zralkthalat','krxunara'],
  2393. 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'],
  2394. human: ['agony','rhino','gladiators','baroness','warewolfpack','alice','cannibal_barbarians','guilbert','gunnar','pumpkin','jacksrevenge1','lunacy','slaughterers','ulfrik','mestr_rekkr_rematch'],
  2395. magical: ['djinn','grimsly','hargamesh','fairy_prince','rift','sisters','vortex_abomination','grundus'],
  2396. ogre: ['ogre','4ogre','felendis','zugen','korxun','drunken_ragunt'],
  2397. qwiladrian: ['gulkinari','teremarthu','vortex_abomination'],
  2398. ryndor: ['bmane','3dawg','hydra','sircai','tyranthius'],
  2399. siege: ['echidna','ulfrik','yydians_sanctuary','drunken_ragunt'],
  2400. undead: ['agony','bogstench','serpina','ironclad','malleus','nalagarst','stein','siculus','zombiehorde','caracalla','centurion_marius'],
  2401. underground: ['maraak','erakka_sak','wexxa','guilbert','bellarius','spider','tomb_gargoyle','leonine_watcher','centurion_marius','caracalla','dragons_lair','kang','3dawg','lurker','salome','stein']
  2402. },
  2403. shortcuts: {
  2404. bb: { n: 'bb', bn: 'BB', desc: 'Briseis\' Blessing [magic]' },
  2405. bok: { n: 'bok', bn: 'BoK', desc: 'Book of Knowledge [consumable]' },
  2406. bsi: { n: 'bsi', bn: 'BSI', desc: 'Battle Strength Index<br>(Base Attack + Base Defense) / Level' },
  2407. ck: { n: 'ck', bn: 'CK', desc: 'Chryseis\' Kiss [magic]' },
  2408. dah: { n: 'dah', bn: 'Dah', desc: 'Dahrizon [general]' },
  2409. dl: { n: 'dl', bn: 'DL', desc: 'Dragons Lair [raid]' },
  2410. gg: { n: 'gg', bn: 'GG', desc: 'Golden Garden [equip]'},
  2411. gid: { n: 'gid', bn: 'GID', desc: 'Greater Impending Doom [magic]' },
  2412. gl: { n: 'gl', bn: 'GL', desc: 'Greenleaf [equip]'},
  2413. il: { n: 'il', bn: 'IL', desc: 'Insanity Laughs [magic]' },
  2414. lsi: { n: 'lsi', bn: 'LSI', desc: 'Leveling Speed Index<br>(Base Stamina * 2 + Base Energy) / Level' },
  2415. mach: { n: 'mach', bn: 'Mach', desc: 'Machaon the Healer [general]' },
  2416. nm: { n: 'nm', bn: 'NM', desc: 'Nightmare [difficulty]' },
  2417. pc: { n: 'pc', bn: 'PC', desc: 'Planet Coins [currency]' },
  2418. perc: { n: 'perc', bn: 'perc', desc: 'Perception [stat]' },
  2419. qm: { n: 'qm', bn: 'QM', desc: 'Quicken Mind [magic]' },
  2420. sock: { n: 'sock', bn: 'SoCK', desc: 'Sword of Conquered Kingdoms [equip]' },
  2421. sor: { n: 'sor', bn: 'SoR', desc: 'Shield of Ryndor [equip]' },
  2422. sp: { n: 'sp', bn: 'SP', desc: 'Stat Points [stat]' },
  2423. wr: { n: 'wr', bn: 'WR', desc: 'World Raid [raid]' }
  2424. },
  2425. raids: {
  2426. agony: {name: 'Agony', shortname: 'Agony', id: 'agony', type: 'Undead, Human', stat: 'H', size:101, duration:168, health: [700000000,875000000,1120000000,1400000000,0,0]},
  2427. apoc_demon: {name: 'Apocolocyntosised Demon', shortname: 'Apoc', id: 'apoc_demon', type: 'Demon', stat: 'H', size:50, duration:144, health: [500000000,750000000,1000000000,2000000000,0,0], lt: ['apoc','apoc','apoc','apoc']},
  2428. djinn: {name: 'Al-Azab', shortname: 'Al-Azab', id: 'djinn', type: 'Magical Creature', stat: 'H', size:100, duration:168, health: [55000000,68750000,88000000,110000000,0,0]},
  2429. spider: {name: 'Arachna', shortname: 'Arachna', id: 'spider', type: 'Underground', stat: 'H', size:50, duration:144, health: [22000000,27500000,35200000,44000000,0,0]},
  2430. rhino: {name: 'Ataxes', shortname: 'Ataxes', id: 'rhino', type: 'Human', stat: 'S', size:10, duration:120, health: [2000000,2500000,3200000,4000000,0,0]},
  2431. gladiators: {name: 'Batiatus Gladiators ', shortname: 'Gladiators ', id: 'gladiators', type: 'Colosseum, Human', stat: 'H', size:10, duration:120, health: [12000000,15000000,19200000,24000000,0,0]},
  2432. bellarius: {name: 'Bellarius the Guardian', shortname: 'Bella', id: 'bellarius', type: 'Dragon, Underground',stat: 'S', size:500, duration:96, health: [900000000,1125000000,1440000000,1800000000,0,0]},
  2433. baroness: {name: 'The Baroness', shortname: 'Baroness', id: 'baroness', type: 'Human', stat: 'S', size:50, duration: 60, health: [68000000,85000000,108800000,136000000,0,0]},
  2434. werewolfpack: {name: 'The Black Moon Pack', shortname: 'Black Moon', id: 'werewolfpack', type: 'Human', stat: 'H', size:50, duration:144, health: [135000000,168750000,216000000,270000000,0,0]},
  2435. alice: {name: 'Bloody Alice', shortname: 'Alice', id: 'alice', type: 'Human', stat: 'S', size:50, duration:120, health: [15000000,18750000,24000000,30000000,0,0]},
  2436. bogstench: {name: 'Bogstench', shortname: 'Bog', id: 'bogstench', type: 'Undead', stat: 'S', size:250, duration:96, health: [450000000,562500000,720000000,900000000,0,0]},
  2437. '4ogre': {name: 'Briareus the Butcher', shortname: 'Briareus', id: '4ogre', type: 'Ogre', stat: 'S', size:10, duration:72, health: [4500000,5625000,7200000,9000000,0,0]},
  2438. bmane: {name: 'Bloodmane', shortname: 'Bmane', id: 'bmane', type: 'Beastman, Ryndor', stat: 'S', size:10, duration:72, health: [7000000,8750000,11200000,14000000,0,0]},
  2439. burbata: {name: 'Burbata the Spine-Crusher', shortname: 'Burbata', id: 'burbata', type: 'Beastman', stat: 'S', size:250, duration:96, health: [1000000000,2000000000,3500000000,5000000000,0,0], lt: ['z10','z10','z10','z10']},
  2440. cannibal_barbarians:{name: 'Cannibal Barbarians', shortname: 'Cannibals', id: 'cannibal_barbarians', type: 'Human', stat: 'S', size:500, duration:128, health: [60000000000,90000000000,180000000000,240000000000,0,0], lt: ['canib','canib','canib','canib']},
  2441. cedric: {name: 'Cedric the Smashable', shortname: 'Cedric', id: 'cedric', type: 'Construct', stat: 'ESH', size:90000, duration:24, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
  2442. caracalla: {name: 'Caracalla', shortname: 'Cara', id: 'caracalla', type: 'Undead, Underground',stat: 'S', size:500, duration:128, health: [50000000000,75000000000,150000000000,200000000000,0,0], lt: ['cara','cara','cara','cara']},
  2443. harpy: {name: 'Celeano', shortname: 'Cel', id: 'harpy', type: '', stat: 'H', size:10, duration:120, health: [3000000,3750000,4800000,6000000,0,0]},
  2444. centurion_marius: {name: 'Centurion Marius', shortname: 'Marius', id: 'centurion_marius', type: 'Undead, Underground',stat: 'S', size:250, duration:96, health: [10000000000,12000000000,16000000000,40000000000,0,0], lt: ['z10','z10','z10','z10']},
  2445. kobold: {name: 'Chieftain Horgrak', shortname: 'Horgrak', id: 'kobold', type: '', stat: 'S', size:10, duration:168, health: [150000,187500,240000,300000,0,0]},
  2446. clockwork_dragon: {name: 'Clockwork Dragon', shortname: 'CW Dragon', id: 'clockwork_dragon', type: 'Construct, Dragon', stat: 'S', size:500, duration:128, health: [0,0,0,280000000000], lt: ['clock','clock','clock','clock']},
  2447. corrupterebus: {name: 'Corrupted Erebus', shortname: 'Cbus', id: 'corrupterebus', type: 'Dragon', stat: 'ESH', size:90000, duration:96, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
  2448. serpina: {name: 'Countess Serpina', shortname: 'Serp', id: 'serpina', type: 'Colosseum, Undead', stat: 'E', size:15, duration:5, health: [75000000,112500000,150000000,187500000,0,0]},
  2449. basilisk: {name: 'Deathglare', shortname: 'Deathglare', id: 'basilisk', type: '', stat: 'H', size:50, duration:144, health: [45000000,56250000,72000000,90000000,0,0]},
  2450. dirthax: {name: 'Dirthax', shortname: 'Dirthax', id: 'dirthax', type: 'Aquatic', stat: 'H', size:100, duration:168, health: [550000000,687500000,880000000,1100000000,0,0]},
  2451. dragons_lair: {name: 'Dragons Lair', shortname: 'Lair', id: 'dragons_lair', type: 'Dragon, Underground',stat: 'S', size:13, duration:5, health: [100000000,500000000,1000000000,1500000000,0,0], lt: ['nDl','hDl','lDl','nmDl']},
  2452. drulcharus: {name: 'Drulcharus', shortname: 'Drulcharus', id: 'drulcharus', type: 'Dragon, Beastman', stat: 'S', size:100, duration:72, health: [0,0,0,25000000000,0,0], lt: ['z15hi','z15hi','z15hi','z15hi']},
  2453. drunken_ragunt: {name: 'Drunken Ragunt', shortname: 'Ragunt', id: 'drunken_ragunt', type: 'Siege, Ogre', stat: 'S', size:50, duration:60, health: [0,0,0,25500000000,0,0], lt: ['rag','rag','rag','rag']},
  2454. echidna: {name: 'Echidna', shortname: 'Echidna', id: 'echidna', type: 'Dragon, Siege', stat: 'ESH', size:90000, duration:96, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
  2455. erakka_sak: {name: 'Erakka-Sak', shortname: 'Erakka', id: 'erakka_sak', type: 'Underground, Construct',stat: 'S', size:50, duration:60, health: [62000000,77500000,99200000,124000000,0,0]},
  2456. giantgolem: {name: 'Euphronios', shortname: 'Euphronios', id: 'giantgolem', type: 'Construct', stat: 'H', size:101, duration:168, health: [450000000,562500000,720000000,900000000,0,0]},
  2457. echthros: {name: 'Echthros', shortname: 'Echthros', id: 'echthros', type: '', stat: 'ESH', size:90000, duration:96, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
  2458. drag: {name: 'Erebus the Black', shortname: 'Ereb', id: 'drag', type: 'Dragon', stat: 'S', size:250, duration:168, health: [150000000,187500000,240000000,300000000,0,0]},
  2459. frogmen_assassins: {name: 'Frog-Men Assassins', shortname: 'Froggy', id: 'frogmen_assassins', type: 'Beastman, Aquatic', stat: 'S', size:250, duration:96, health: [16000000000,24000000000,32000000000,64000000000,0,0], lt: ['cara','cara','cara','cara']},
  2460. felendis: {name: 'Banhammer Brothers', shortname: 'Felendis', id: 'felendis', type: 'Ogre', stat: 'H', size:100, duration:168, health: [441823718,549238221,707842125,888007007,0,0]},
  2461. ogre: {name: 'General Grune', shortname: 'Grune', id: 'ogre', type: 'Ogre', stat: 'S', size:100, duration:172, health: [20000000,25000000,32000000,40000000,0,0]},
  2462. korxun: {name: 'General Korxun', shortname: 'Korxun', id: 'korxun', type: 'Beastman, Ogre', stat: 'S', size:50, duration:60, health: [0,0,0,20000000000,0,0], lt: ['z15lo','z15lo','z15lo','z15lo']},
  2463. dreadbloom: {name: 'Giant Dreadbloom', shortname: 'Dreadbloom', id: 'dreadbloom', type: '', stat: 'H', size:101, duration:192, health: [900000000,1125000000,1440000000,1800000000,0,0]},
  2464. batman: {name: 'Gravlok the Night-Hunter', shortname: 'Grav', id: 'batman', type: 'Beastman', stat: 'S', size:100, duration:72, health: [50000000,62500000,80000000,100000000,0,0]},
  2465. evilgnome: {name: 'Groblar Deathcap', shortname: 'Groblar', id: 'evilgnome', type: '', stat: 'H', size:10, duration:120, health: [6000000,7500000,9600000,12000000,0,0]},
  2466. grundus: {name: 'Grundus', shortname: 'Grundus', id: 'grundus', type: 'Dragon, Magical Creature',stat: 'H', size:101, duration:72, health: [800000000,1600000000,4000000000,12000000000]},
  2467. guilbert: {name: 'Guilbert the Mad', shortname: 'Guil', id: 'guilbert', type: 'Underground, Human', stat: 'S', size:250, duration:96, health: [550000000,687500000,880000000,1100000000,0,0]},
  2468. gulkinari: {name: 'Gulkinari', shortname: 'Gulkinari', id: 'gulkinari', type: 'Qwiladrian', stat: 'S', size:50, duration:60, health: [7500000000,9375000000,12000000000,15000000000,0,0], lt: ['gulk','gulk','gulk','gulk']},
  2469. gunnar: {name: 'Gunnar the Berserk', shortname: 'Gunnar', id: 'gunnar', type: 'Bludheim, Human', stat: 'S', size:10, duration:48, health: [12000000,15000000,19200000,24000000,0,0]},
  2470. war_boar: {name: 'Hammer', shortname: 'Hammer', id: 'war_boar', type: 'Beastman', stat: 'H', size:50, duration:144, health: [220000000,275000000,352000000,440000000,0,0]},
  2471. hargamesh: {name: 'Hargamesh', shortname: 'Hargamesh', id: 'hargamesh', type: 'Beastman, Magical Creature',stat: 'S', size:10, duration:48, health: [18000000,22500000,28800000,36000000,0,0]},
  2472. grimsly: {name: 'Headmaster Grimsly', shortname: 'Grimsly', id: 'grimsly', type: 'Magical Creature', stat: 'S', size:50, duration:60, health: [72000000,90000000,115200000,144000000,0,0]},
  2473. hurkus: {name: 'Hurkus the Eviscerator', shortname: 'Hurk', id: 'hurkus', type: 'Beastman', stat: 'S', size:50, duration:60, health: [2812500000,4218750000,5625000000,11250000000,0,0], lt: ['hurk','hurk','hurk','hurk']},
  2474. hydra: {name: 'Hydra', shortname: 'Hydra', id: 'hydra', type: 'Ryndor', stat: 'S', size:100, duration:72, health: [65000000,81250000,104000000,130000000,0,0]},
  2475. ironclad: {name: 'Ironclad', shortname: 'Ironclad', id: 'ironclad', type: 'Undead', stat: 'S', size:10, duration:48, health: [10000000,12500000,16000000,20000000,0,0]}, //0.5/0.625/0.8/1
  2476. pumpkin: {name: 'Jack', shortname: 'Jack', id: 'pumpkin', type: 'Human', stat: 'S', size: 250, duration:48 , health: [1000000000,1500000000,2000000000,3000000000], lt: ['njack','hjack','ljack','nmjack']},
  2477. jacksrevenge1: {name: 'Jack\'s Revenge', shortname: 'Revenge', id: 'jacksrevenge1', type: 'Human', stat: 'S', size: 250, duration:48 , health: [5000000000,7500000000,10000000000,15000000000], lt: ['njr','hjr','ljr','nmjr']},
  2478. kang: {name: 'Kang-Gsod', shortname: 'Kang', id: 'kang', type: 'Bludheim, Underground', stat: 'S', size:100, duration:72, health: [95000000,118750000,152000000,190000000,0,0]},
  2479. '3dawg': {name: 'Kerberos', shortname: 'Kerb', id: '3dawg', type: 'Demon, Underground, Ryndor', stat: 'S', size:50, duration:72, health: [35000000,43750000,56000000,70000000,0,0]},
  2480. keron: {name: 'Keron the Sky-Shaker', shortname: 'Keron', id: 'keron', type: 'Dragon', stat: 'H', size:101, duration:192, health: [0,0,0,30000000000,0,0], lt: ['keron','keron','keron','keron']},
  2481. kessovtowers: {name: 'Kessov Towers', shortname: 'Towers', id: 'kessovtowers', type: 'Siege', stat: 'ESH', size:90000, duration:120, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
  2482. kessovtower: {name: 'Treachery and the Tower', shortname: 'Treachery', id: 'kessovtower', type: 'Siege', stat: 'ESH', size:90000, duration:24, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
  2483. kessovforts: {name: 'Kessov Forts', shortname: 'Forts', id: 'kessovforts', type: 'Siege', stat: 'ESH', size:90000, duration:120, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
  2484. kessovcastle: {name: 'Kessov Castle', shortname: 'Castle', id: 'kessovcastle', type: 'Siege', stat: 'ESH', size:90000, duration:144, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
  2485. kalaxia: {name: 'Kalaxia the Far-Seer', shortname: 'Kala', id: 'kalaxia', type: 'Dragon, Bludheim', stat: 'S', size:500, duration:96, health: [800000000,1000000000,1280000000,1600000000,0,0]},
  2486. krugnug: {name: 'Krugnug', shortname: 'Krug', id: 'krugnug', type: 'Beastman', stat: 'S', size:25, duration:48, health: [1000000000,1500000000,2000000000,4000000000,0,0], lt: ['z10','z10','z10','z10']},
  2487. krxunara: {name: 'Kr\'xunara of the Bloody Waves',shortname: 'Kr\'xunara', id: 'krxunara', type: 'Aquatic, Demon', stat: 'S', size:500, duration:128, health: [0,0,0,250000000000], lt: ['krx','krx','krx','krx']},
  2488. krykagrius: {name: 'Krykagrius', shortname: 'Kryk', id: 'krykagrius', type: 'Dragon', stat: 'ESH', size:90000, duration:72, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
  2489. leonine_watcher: {name: 'Leonine', shortname: 'Leo', id: 'leonine_watcher', type: 'Underground, Construct',stat: 'S', size:100, duration:48, health: [4000000000,6000000000,8000000000,16000000000,0,0], lt: ['z10','z10','z10','z10']},
  2490. tyranthius: {name: 'Lord Tyranthius', shortname: 'Tyr', id: 'tyranthius', type: 'Demon, Ryndor', stat: 'S', size:500, duration:168, health: [600000000,750000000,960000000,1200000000,0,0]},
  2491. lunacy: {name: 'Lunatics', shortname: 'Lunatics', id: 'lunacy', type: 'Demon, Human', stat: 'H', size:50, duration:144, health: [180000000,225000000,288000000,360000000,0,0]},
  2492. lurker: {name: 'Lurking Horror', shortname: 'Lurking', id: 'lurker', type: 'Underground, Aquatic',stat: 'S', size:100, duration:120, health: [35000000,43750000,56000000,70000000,0,0]},
  2493. malleus: {name: 'Malleus Vivorum', shortname: 'Malleus', id: 'malleus', type: 'Beastman, Undead', stat: 'S', size:100, duration:72, health: [8000000000,12000000000,16000000000,20000000000,0,0], lt: ['mall','mall','mall','mall']},
  2494. maraak: {name: 'Maraak the Impaler', shortname: 'Maraak', id: 'maraak', type: 'Underground', stat: 'S', size:10, duration:48, health: [15000000,18750000,24000000,30000000,0,0]},
  2495. mardachus: {name: 'Mardachus the Destroyer', shortname: 'Mard', id: 'mardachus', type: 'Dragon', stat: 'S', size:500, duration:96, health: [1100000000,1375000000,1760000000,2200000000,0,0]},
  2496. scorp: {name: 'Mazalu', shortname: 'Mazalu', id: 'scorp', type: 'Beastman', stat: 'S', size:50, duration:168, health: [5000000,6250000,8000000,10000000,0,0]},
  2497. mestr_rekkr_rematch:{name: 'Mestr Rekkr Rematch', shortname: 'Rekkr II', id: 'mestr_rekkr_rematch', type: 'Human', stat: 'S', size:25, duration:48, health: [0,0,0,18000000000,0,0], lt: ['rekkr','rekkr','rekkr','rekkr']},
  2498. mesyra: {name: 'Mesyra the Watcher', shortname: 'Mesyra', id: 'mesyra', type: 'Dragon', stat: 'S', size:250, duration:96, health: [1000000000,1250000000,1600000000,2000000000,0,0]},
  2499. nalagarst: {name: 'Nalagarst', shortname: 'Nala', id: 'nalagarst', type: 'Dragon, Undead', stat: 'S', size:500, duration:98, health: [700000000,875000000,1120000000,1400000000,0,0]},
  2500. nereidon: {name: 'Nereidon the Sea Slayer', shortname: 'Nereidon', id: 'nereidon', type: 'Dragon, Beastman, Aquatic', stat: 'S', size:30, duration:48, health: [0,0,0,15000000000,0,0], lt: ['z15lo','z15lo','z15lo','z15lo']},
  2501. nidhogg: {name: 'Nidhogg', shortname: 'Nidhogg', id: 'nidhogg', type: 'Bludheim, Aquatic', stat: 'S', size:50, duration:60, health: [52000000,65000000,83200000,104000000,0,0]},
  2502. nimrod: {name: 'Nimrod the Hunter', shortname: 'Nimrod', id: 'nimrod', type: 'Dragon', stat: 'S', size:250, duration:96, health: [1200000000,1500000000,1920000000,2400000000,0,0]},
  2503. nylatrix: {name: 'Nylatrix', shortname: 'Nylatrix', id: 'nylatrix', type: 'Dragon', stat: 'H', size:101, duration:192, health: [0,0,0,4000000000,0,0], lt: ['nker','hker','lker','nmker']},
  2504. phaedra: {name: 'Phaedra the Deceiver', shortname: 'Phaedra', id: 'phaedra', type: 'Dragon', stat: 'S', size:250, duration:96, health: [1400000000,1750000000,2240000000,2800000000,0,0]},
  2505. fairy_prince: {name: 'Prince Obyron', shortname: 'Obyron', id: 'fairy_prince', type: 'Magical Creature', stat: 'H', size:10, duration:120, health: [30000000,37500000,48000000,60000000,0,0]},
  2506. roc: {name: 'Ragetalon', shortname: 'Ragetalon', id: 'roc', type: '', stat: 'H', size:100, duration:168, health: [110000000,137500000,176000000,220000000,0,0]},
  2507. rannveig: {name: 'Rannveig', shortname: 'Rannveig', id: 'rannveig', type: 'Human', stat: 'E', size:250, duration:128, health: [0,0,0,60000000000,0,0], lt: ['u','u','u','u']},
  2508. rhalmarius_the_despoiler:{name: 'Rhalmarius the Despoiler', shortname: 'Rhal', id: 'rhalmarius_the_despoiler', type: 'Dragon', stat: 'H', size:100, duration:84, health: [500000000,1250000000,3125000000,7812500000,0,0]},
  2509. tomb_gargoyle: {name: 'Riddler Gargoyle', shortname: 'Riddler', id: 'tomb_gargoyle', type: 'Underground, Construct',stat: 'S', size:50, duration:48, health: [2000000000,3000000000,4000000000,8000000000,0,0], lt: ['z10','z10','z10','z10']},
  2510. rift: {name: 'Rift the Mauler', shortname: 'Rift', id: 'rift', type: 'Magical Creature', stat: 'S', size:100, duration:72, health: [125000000,156250000,200000000,250000000,0,0]},
  2511. ruzzik: {name: 'Ruzzik the Slayer', shortname: 'Ruzzik', id: 'ruzzik', type: 'Beastman', stat: 'S', size:500, duration:128, health: [55000000000,82500000000,165000000000,220000000000,0,0], lt: ['ruzz','ruzz','ruzz','ruzz']},
  2512. salome: {name: 'Salome the Seductress', shortname: 'Salome', id: 'salome', type: 'Demon, Underground', stat: 'H', size:100, duration:48, health: [666000000,832500000,1065600000,1332000000,0,0], lt: ['nSlut','hSlut','lSlut','nmSlut']},
  2513. crabshark: {name: 'Scuttlegore', shortname: 'Scuttle', id: 'crabshark', type: 'Colosseum, Aquatic', stat: 'H', size:100, duration:168, health: [220000000,275000000,352000000,440000000,0,0]},
  2514. squid: {name: 'Scylla', shortname: 'Scylla', id: 'squid', type: 'Beastman, Aquatic', stat: 'S', size:50, duration:72, health: [25000000,31250000,40000000,50000000,0,0]},
  2515. shaar: {name: 'Shaar the Reaver', shortname: 'Shaar', id: 'shaar', type: 'Beastman', stat: 'S', size:250, duration:96, health: [0,0,0,60000000000,0,0], lt: ['z15hi','z15hi','z15hi','z15hi']},
  2516. sircai: {name: 'Sir Cai', shortname: 'Cai', id: 'sircai', type: 'Demon, Ryndor', stat: 'S', size:250, duration:168, health: [350000000,437500000,560000000,700000000,0,0]},
  2517. sisters: {name: 'Sisters of the Song', shortname: 'Sisters', id: 'sisters', type: 'Magical Creature', stat: 'S', size:250, duration:96, health: [600000000,750000000,960000000,1200000000,0,0]},
  2518. slaughterers: {name: 'Slaughterers Six', shortname: 'Slaughterers', id: 'slaughterers', type: 'Human', stat: 'H', size:10, duration:120, health: [24000000,30000000,38400000,48000000,0,0]},
  2519. stein: {name: 'Stein', shortname: 'Stein', id: 'stein', type: 'Undead, Underground, Construct',stat: 'S', size:100, duration:72, health: [80000000,100000000,128000000,160000000,0,0]},
  2520. siculus: {name: 'Count Siculus\' Phantom', shortname: 'Siculus', id: 'siculus', type: 'Undead', stat: 'S', size:500, duration:128, health: [850000000,1700000000,2975000000,4250000000,0,0], lt: ['sic','sic','sic','sic']},
  2521. tainted: {name: 'Tainted Erebus', shortname: 'Tainted', id: 'tainted', type: 'Dragon', stat: 'S', size:250, duration:168, health: [250000000,312500000,400000000,500000000,0,0]},
  2522. tenebra: {name: 'Tenebra Shadow Mistress', shortname: 'Tenebra', id: 'tenebra', type: 'Dragon', stat: 'S', size:500, duration:128, health: [2000000000,2500000000,3200000000,4000000000,0,0]},
  2523. thaltherda: {name: 'Thaltherda the Sea-Slitherer',shortname:'Nessie', id: 'thaltherda', type: 'Aquatic, Dragon', stat: 'S', size:25, duration:48, health: [3000000000,4500000000,6000000000,7500000000,0,0], lt: ['nessy','nessy','nessy','nessy']},
  2524. tisiphone: {name: 'Tisiphone the Vengeful', shortname: 'Tisi', id: 'tisiphone', type: 'Dragon, Colosseum', stat: 'E', size:50, duration:12, health: [500000000,2500000000,5000000000,7500000000,0,0], lt: ['nTisi','hTisi','lTisi','nmTisi']},
  2525. teremarthu: {name: 'Teremarthu', shortname: 'Cthullu', id: 'teremarthu', type: 'Qwiladrian', stat: 'S', size:100, duration:48, health: [6000000000,9000000000,12000000000,24000000000,0,0], lt: ['z10','z10','z10','z10']},
  2526. chimera: {name: 'Tetrarchos', shortname: 'Tetrarchos', id: 'chimera', type: 'Colosseum', stat: 'H', size:50, duration:144, health: [90000000,112500000,144000000,180000000,0,0]},
  2527. gorgon: {name: 'Tithrasia', shortname: 'Tithrasia', id: 'gorgon', type: '', stat: 'H', size:10, duration:120, health: [18000000,22500000,28800000,36000000,0,0]},
  2528. tuxargus: {name: 'Tuxargus', shortname: 'Tux', id: 'tuxargus', type: 'Dragon', stat: 'H', size:101, duration:192, health: [0,0,0,4000000000,0,0], lt: ['nker','hker','lker','nmker']},
  2529. ulfrik: {name: 'Ulfrik', shortname: 'Ulfrik', id: 'ulfrik', type: 'Bludheim, Siege, Human',stat: 'S', size:250, duration:96, health: [500000000,625000000,800000000,1000000000,0,0]},
  2530. valanazes: {name: 'Valanazes the Gold', shortname: 'Vala', id: 'valanazes', type: 'Dragon', stat: 'S', size:500, duration:128, health: [2400000000,3000000000,3840000000,4800000000,0,0]},
  2531. blobmonster: {name: 'Varlachleth', shortname: 'Varla', id: 'blobmonster', type: 'Demon', stat: 'H', size:100, duration:168, health: [330000000,412500000,528000000,660000000,0,0]},
  2532. verkiteia: {name: 'Verkiteia', shortname: 'Verkiteia', id: 'verkiteia', type: 'Dragon', stat: 'S', size:100, duration:72, health: [11250000000,14062500000,18000000000,22500000000,0,0], lt: ['verk','verk','verk','verk']},
  2533. vortex_abomination: {name: 'Vortex Abomination', shortname: 'Vortex', id: 'vortex_abomination',type: 'Qwiladrian, Magical Creature', stat: 'S', size:500, duration:128, health: [50000000000,75000000000,110000000000,205000000000,0,0], lt: ['vort','vort','vort','vort']},
  2534. zugen: {name: 'Warlord Zugen', shortname: 'Zugen', id: 'zugen', type: 'Ogre', stat: 'S', size:25, duration:48, health: [4000000000,6000000000,8000000000,10000000000,0,0], lt: ['zugen','zugen','zugen','zugen']},
  2535. wexxa: {name: 'Wexxa the Worm-Tamer', shortname: 'Wexxa', id: 'wexxa', type: 'Underground', stat: 'S', size:100, duration:72, health: [110000000,137500000,176000000,220000000,0,0]},
  2536. winter_kessov: {name: 'Blood Will Run Cold', shortname: 'Cold Blood', id: 'winter_kessov', type: 'Dragon, Siege', stat: 'ESH', size:90000, duration:290, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
  2537. xessus: {name: 'Xessus of the Grim Wood', shortname: 'Xessus', id: 'xessus', type: '', stat: 'H', size:100, duration:48, health: [500000000,625000000,800000000,1000000000,0,0], lt: ['nIns','hIns','lIns','nmIns']},
  2538. malchar: {name: 'Malchar the Tri-Eyed', shortname: 'Malchar', id: 'malchar', type: 'Demon', stat: 'H', size:100, duration:48, health: [500000000,625000000,800000000,1000000000,0,0], lt: ['nIns','hIns','lIns','nmIns']},
  2539. krasgore: {name: 'Krasgore', shortname: 'Krasgore', id: 'krasgore', type: '', stat: 'H', size:100, duration:48, health: [500000000,625000000,800000000,1000000000,0,0], lt: ['nIns','hIns','lIns','nmIns']},
  2540. nrlux: {name: 'N\'rlux the Devourer', shortname: 'N\'rlux', id: 'nrlux', type: 'Giant Insect', stat: 'H', size:100, duration:48, health: [10000000000,12500000000,16000000000,20000000000,0,0], lt: ['lux','lux','lux','lux']},
  2541. xerkara: {name: 'Xerkara', shortname: 'Xerkara', id: 'xerkara', type: 'Dragon', stat: 'S', size:500, duration:128, health: [0,0,0,260000000000,0,0], lt: ['z15hi','z15hi','z15hi','z15hi']},
  2542. yydians_sanctuary: {name: 'Yydian\'s Sanctuary', shortname: 'Yydians', id: 'yydians_sanctuary', type: 'Siege, Construct', stat: 'S', size:250, duration:96, health: [0,0,0,50000000000,0,0], lt: ['yyd','yyd','yyd','yyd']},
  2543. zombiehorde: {name: 'Zombie Horde', shortname: 'Zombies', id: 'zombiehorde', type: 'Undead', stat: 'S', size:50, duration:60, health: [45000000,56250000,72000000,90000000,0,0]},
  2544. zralkthalat: {name: 'Z\'ralk\'thalat', shortname: 'Zral', id: 'zralkthalat', type: 'Demon', stat: 'S', size:100, duration:72, health: [8750000000,13125000000,17500000000,35000000000,0,0], lt: ['z10','z10','z10','z10']}
  2545. },
  2546.  
  2547. raidSizes: {
  2548. 10: { name: 'Small', visible: 'Yes', ratios: [0.6,0.9,1.2,1.6,2.5,3.5], enames: ['1E6T','1E8T','2E','2/3E','3E','3/4E'], pruneTimers: [900,3600,7200]}, // 1h, 2h, 3h
  2549. 13: { name: 'Small', visible: 'Yes', pruneTimers: [1800,3600,7200]}, // 1h, 2h, 2h
  2550. 15: { name: 'Small', visible: 'Yes', 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'], pruneTimers: [1800,3600,3600]}, // Serpina only, so 5h/5h/5h
  2551. 25: { name: 'Small', visible: 'Yes', ratios: [0.6,0.9,1.2,1.6,2.5,3.5], enames: ['1E6T','1E8T','2E','2/3E','3E','3/4E'], pruneTimers: [18000,18000,18000]},
  2552. 30: { name: 'Small', visible: 'Yes', ratios: [0.6,0.9,1.2,1.6,2.5,3.5], enames: ['1E6T','1E8T','2E','2/3E','3E','3/4E'], pruneTimers: [18000,18000,18000]},
  2553. 50: { name: 'Medium', visible: 'Yes', ratios: [0.7,0.95,2.05,3.125,6.75,8.5], enames: ['1E6T','1E8T','2E','2/3E','3E','3/4E'], pruneTimers: [3600,7200,10800]}, // 1h, 2h, 3h
  2554. 100:{ name: 'Large', visible: 'Yes', ratios: [0.9,1.5,2.2,3.2,6.5,9.0], enames: ['1E6T','1E8T','2E','2/3E','3E','3/4E'], pruneTimers: [7200,43200,86400]}, // 4h, 12h, 36h
  2555. 101:{ name: 'Epic', visible: 'Yes', ratios: [0.225,0.325,0.625,1.775,4.525,10.25], enames: ['1E6T','1E8T','2E','2/3E','3E','3/4E'], pruneTimers: [21600,86400,259200]}, // 24h, 48h, 72h
  2556. 250:{ name: 'Epic', visible: 'Yes', ratios: [0.225,0.325,0.625,1.775,4.525,10.25], enames: ['1E6T','1E8T','2E','2/3E','3E','3/4E'], pruneTimers: [21600,86400,259200]}, // 24h, 48h, 72h
  2557. 500:{ name: 'Colossal', visible: 'Yes', ratios: [0.45,0,0.65,1.25,2.5,9.0], enames: ['1E6T','1E8T','2E','2/3E','3E','3/4E'], pruneTimers: [43200,172800,259200]}, // 24h, 48h, 72h
  2558. 90000:{ name: 'World', visible: 'Yes', ratios: [0,0,0,0,0,0], pruneTimers: [86400,86400,86400]} // 24h, 48h, 72h
  2559. },
  2560.  
  2561. lootTiers: {
  2562. u: { tiers: ['Not yet known'], epics: [0], best: 0},
  2563. clock: { tiers: ['300.0m','400.0m','750.0m','1.000b','1.500b','2.000b','2.500b','3.000b','4.000b','5.000b','6.000b','8.000b','10.00b'], epics: [56,66,94,118,192,226,254,270,290,360,368,400,460], best: 0, e: false},
  2564. krx: { tiers: ['300.0m','400.0m','750.0m','1.000b','1.500b','2.000b','2.500b','3.000b','4.000b','5.000b','6.000b','8.000b'], epics: [56,66,94,118,192,226,254,270,290,360,368,400], best: 0, e: false},
  2565. rekkr: { tiers: ['250.0m','300.0m','400.0m','500.0m','720.0m','1.000b','1.500b','2.500b','3.500b'], epics: [10,11,15,18,23,26,34,37,51], best: 2, e: true},
  2566. rag: { tiers: ['225.0m','310.0m','400.0m','510.0m','750.0m','1.000b','1.500b','2.500b','5.000b'], epics: [11,13,17,19,23,27,37,39,61], best: 2, e: true},
  2567. z15lo: { tiers: ['225.0m','240.0m','300.0m','400.0m','750.0m','1.000b','1.500b','2.500b','5.000b'], epics: [8,9,14,16,19,23,33,36,48], best: 2, e: true},
  2568. z15hi: { tiers: ['225.0m','240.0m','300.0m','400.0m','750.0m','1.000b','1.500b','2.500b','5.000b','8.000b'], epics: [8,9,14,16,19,23,33,60,90,100], best: 2, e: true},
  2569. apoc: { tiers: ['12.00m','24.00m','36.00m','40.00m','60.00m','80.00m','100.0m','120.0m','140.0m','160.0m','180.0m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true },
  2570. cara: { tiers: ['400.0m','500.0m','600.0m','700.0m','800.0m','900.0m','1.000b','1.250b','1.500b','1.750b','2.000b','2.250b','2.500b','2.750b','3.000b'], epics: [10,11,12,13,14,15,16,20,24,28,32,36,40,44,48], best: 0, e: true },
  2571. zugen: { tiers: ['120.0m','180.0m','225.0m','240.0m','300.0m','400.0m','750.0m','1.000b','1.500b'], epics: [8,9,10,11,14,16,19,23,33], best: 4, e: true},
  2572. gulk: { tiers: ['90.00m','135.0m','150.0m','180.0m','225.0m','300.0m','550.0m','900.0m','1.500b'], epics: [2,5,7,9,11,15,18,22,34], best: 5, e: true },
  2573. verk: { tiers: ['100.0m','175.0m','250.0m','300.0m','375.0m','450.0m','525.0m','600.0m','900.0m','1.500b'], epics: [3,8,12,13,15,16,18,21,23,36], best: 2, e: true},
  2574. canib: { tiers: ['250.0m','300.0m','380.0m','480.0m','580.0m','660.0m','900.0m','1.500b','2.000b','2.800b','3.500b'], epics: [12,13,14,17,18,21,23,34,46,68,88], best: 0, e: true},
  2575. ruzz: { tiers: ['300.0m','400.0m','500.0m','600.0m','700.0m','800.0m','900.0m','1.000b','1.250b','1.500b','1.750b','2.000b','2.250b','2.500b','2.750b','3.000b'], epics: [2,5,11,12,13,14,15,16,20,24,28,32,36,40,44,48], best: 2, e: true },
  2576. z10: { tiers: ['100.0m','200.0m','300.0m','400.0m','500.0m','600.0m','700.0m','800.0m','900.0m','1.000b'], epics: [7,8,9,10,11,12,13,14,15,16], best: 0, e: true },
  2577. nmDl: { tiers: ['105.0m','135.0m','150.0m','225.0m','300.0m','375.0m','450.0m','525.0m','600.0m','675.0m'], epics: [2,4,6,8,10,12,14,16,18,20], best: 2, e: true },
  2578. lDl: { tiers: ['70.00m','90.00m','100.0m','150.0m','200.0m','250.0m','300.0m','350.0m','400.0m','450.0m'], epics: [2,4,6,8,10,12,14,16,18,20], best: 2, e: true },
  2579. hDl: { tiers: ['35.00m','45.00m','50.00m','75.00m','100.0m','125.0m','150.0m','175.0m','200.0m','225.0m'], epics: [2,4,6,8,10,12,14,16,18,20], best: 2, e: true },
  2580. nDl: { tiers: ['7.000m','9.000m','10.00m','15.00m','20.00m','25.00m','30.00m','35.00m','40.00m','45.00m'], epics: [2,4,6,8,10,12,14,16,18,20], best: 2, e: true },
  2581. nmTisi: { tiers: ['75.00m','105.0m','135.0m','150.0m','225.0m','300.0m','375.0m','450.0m','525.0m','600.0m','675.0m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true },
  2582. lTisi: { tiers: ['50.00m','70.00m','90.00m','100.0m','150.0m','200.0m','250.0m','300.0m','350.0m','400.0m','450.0m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true },
  2583. hTisi: { tiers: ['25.00m','35.00m','45.00m','50.00m','75.00m','100.0m','125.0m','150.0m','175.0m','200.0m','225.0m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true },
  2584. nTisi: { tiers: ['5.000m','7.000m','9.000m','10.00m','15.00m','20.00m','25.00m','30.00m','35.00m','40.00m','45.00m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3, e: true },
  2585. njack: { tiers: ['4.000m','20.00m','24.00m','48.00m','72.00m','96.00m','120.0m','144.0m','168.0m','192.0m'], epics: [2,3,4,6,7,8,9,10,11,12], best: 0, e: true},
  2586. hjack: { tiers: ['6.000m','30.00m','36.00m','72.00m','108.0m','144.0m','180.0m','216.0m','252.0m','288.0m'], epics: [2,3,4,6,7,8,9,10,11,12], best: 0, e: true},
  2587. ljack: { tiers: ['8.000m','40.00m','48.00m','96.00m','144.0m','192.0m','240.0m','288.0m','336.0m','384.0m'], epics: [2,3,4,6,7,8,9,10,11,12], best: 0, e: true},
  2588. nmjack: { tiers: ['12.00m','60.00m','72.00m','144.0m','216.0m','288.0m','360.0m','432.0m','504.0m','576.0m'], epics: [2,3,4,6,7,8,9,10,11,12], best: 0, e: true},
  2589. hjr: { tiers: ['30.00m','150.0m','180.0m','360.0m','750.0m','1.500b'], epics: [8,12,16,27,36,72], best: 0, e: true},
  2590. njr: { tiers: ['20.00m','100.0m','120.0m','240.0m','500.0m','1.000b'], epics: [8,12,16,27,36,72], best: 0, e: true},
  2591. ljr: { tiers: ['40.00m','200.0m','240.0m','480.0m','1.000b','2.000b'], epics: [8,12,16,27,36,72], best: 0, e: true},
  2592. nmjr: { tiers: ['60.00m','300.0m','360.0m','720.0m','1.500b','3.000b'], epics: [8,12,16,27,36,72], best: 0, e: true},
  2593. yyd: { tiers: ['125.0m','175.0m','250.0m','300.0m','375.0m','450.0m','525.0m','625.0m','900.0m','1.500b'], epics: [3,8,12,13,15,16,18,21,23,36], best: 2, e: true},
  2594. nessy: { tiers: ['120.0m','180.0m','225.0m','240.0m','300.0m','500.0m','750.0m','1.000b'], epics: [9,10,11,12,13,14,17,20], best: 1, e: true},
  2595. hurk: { tiers: ['90.00m','135.0m','150.0m','180.0m','225.0m','300.0m','550.0m','900.0m'], epics: [3,7,10,12,15,19,26,30], best: 2, e: true},
  2596. mall: { tiers: ['100.0m','150.0m','225.0m','300.0m','375.0m','450.0m','525.0m','600.0m','900.0m'], epics: [3,8,11,12,14,16,18,20,24], best: 1, e: true},
  2597. nIns: { tiers: ['5.000m','7.000m','9.000m','10.00m','15.00m','20.00m','25.00m','30.00m','35.00m','40.00m','45.00m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3 , e: true},
  2598. hIns: { tiers: ['6.250m','8.750m','11.25m','12.50m','18.75m','25.00m','31.25m','37.50m','43.75m','50.00m','56.25m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3 , e: true},
  2599. lIns: { tiers: ['8.000m','11.20m','14.40m','16.00m','24.00m','32.00m','40.00m','48.00m','56.00m','64.00m','72.00m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3 , e: true},
  2600. nmIns: { tiers: ['10.00m','14.00m','18.00m','20.00m','30.00m','40.00m','50.00m','60.00m','70.00m','80.00m','90.00m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3 , e: true},
  2601. nker: { tiers: ['20.00m','28.00m','36.00m','40.00m','60.00m','80.00m','100.0m','120.0m','140.0m','160.0m','180.0m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3 , e: true},
  2602. hker: { tiers: ['25.00m','35.00m','45.00m','50.00m','75.00m','100.0m','125.0m','150.0m','175.0m','200.0m','225.0m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3 , e: true},
  2603. lker: { tiers: ['32.00m','44.80m','57.60m','64.00m','96.00m','128.0m','160.0m','192.0m','224.0m','256.0m','288.0m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3 , e: true},
  2604. nmker: { tiers: ['40.00m','56.00m','72.00m','80.00m','120.0m','160.0m','200.0m','240.0m','280.0m','320.0m','360.0m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3 , e: true},
  2605. nSlut: { tiers: ['6.660m','9.324m','11.99m','13.32m','19.98m','26.64m','33.30m','39.96m','46.62m','53.28m','59.94m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3 , e: true},
  2606. hSlut: { tiers: ['8.325m','11.66m','14.99m','16.65m','24.98m','33.30m','41.63m','49.95m','58.28m','66.60m','74.93m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3 , e: true},
  2607. lSlut: { tiers: ['10.66m','14.92m','19.18m','21.31m','31.97m','42.62m','53.28m','63.94m','74.59m','85.25m','95.90m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3 , e: true},
  2608. nmSlut: { tiers: ['13.32m','18.65m','23.98m','26.64m','39.96m','53.28m','66.60m','79.92m','93.24m','106.6m','119.9m'], epics: [1,2,3,4,5,6,7,8,9,10,11], best: 3 , e: true},
  2609. sic: { tiers: ['400.0m','500.0m','600.0m','700.0m','800.0m','900.0m','1.000b','2.000b'], epics: [10,11,12,13,14,15,16,32], best: 0, e: true},
  2610. vort: { tiers: ['200.0m','300.0m','400.0m','500.0m','600.0m','700.0m','800.0m','900.0m','1.000b','1.500b','2.000b','2.500b','3.000b','3.500b'], epics: [3,10,14,15,17,18,21,23,32,37,44,52,58,90], best: 1, e: true},
  2611. lux: { tiers: ['8.000m','17.00m','26.00m','35.00m','45.00m','56.00m','67.00m','78.00m','90.00m','103.0m','116.0m','129.0m','143.0m','157.0m','173.0m','188.0m','202.0m','220.0m','238.0m','255.0m','270.0m','293.0m','311.0m','330.0m','350.0m'], 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 },
  2612. keron: { tiers: ['8.000m','17.00m','26.00m','35.00m','45.00m','56.00m','67.00m','78.00m','90.00m','103.0m','116.0m','129.0m','143.0m','157.0m','173.0m','188.0m','202.0m','220.0m','238.0m','255.0m','270.0m','293.0m','311.0m','330.0m','350.0m','1.000b'], 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 }
  2613. },
  2614. 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'},
  2615. raidArray: [],
  2616. slapSentences: [
  2617. 'slaps <nick> in the face with a rotten old fish',
  2618. 'slaps <nick> around with a glove',
  2619. 'slaps <nick> around with an armoured glove',
  2620. 'hacks into <nick>\'s computer and slaps <nick> up side the head with a rubber chicken',
  2621. 'slaps <nick> around a bit with a wet noddle',
  2622. 'slaps <nick> about the head and shoulders with a rubber chicken',
  2623. 'slaps <nick>\'s face so hard, <nick> has to walk backwards from now on',
  2624. 'slaps some sense into <nick> with a red brick',
  2625. 'slaps <nick> with a fire hose',
  2626. 'slaps <nick> with a huge law suit',
  2627. 'slaps <nick> with a great big, wet, 100% rubber duck',
  2628. 'slaps <nick> with a large dildo'
  2629. ],
  2630. reload: function() {
  2631. SRDotDX.echo('Reloading, please wait...');
  2632. activateGame();
  2633. //SRDotDX.gui.cHTML('#gameiframe').ele().src = 'http://web1.dawnofthedragons.com/kong?' + SRDotDX.request.kongData;
  2634. },
  2635. fails: 0,
  2636. load: function() {
  2637. if (typeof holodeck == 'object' && typeof ChatDialogue == 'function' && typeof holodeck._tabs == 'object' && typeof holodeck.activeDialogue == 'function' && typeof activateGame == 'function' && typeof document.getElementById('kong_game_ui') != 'null' && typeof SRDotDX.raids == 'object' ) {
  2638. ChatDialogue.prototype.sendInput = function () {
  2639. var a = this._input_node.value.match(/[\s\S]{1,240}(\s|$)/g);
  2640. var al = a.length-1, i;
  2641. if(al < 1 || this._input_node.value.charAt(0) == '/') this._holodeck.processChatCommand(this._input_node.value) && this._holodeck.filterOutgoingMessage(this._input_node.value, this._onInputFunction);
  2642. else for(i=0; i<=al; i++ ) this._holodeck.filterOutgoingMessage((i==0?'':'... ')+a[i]+(i==al?'':'...'), this._onInputFunction);
  2643. this._input_node.value = "";
  2644. };
  2645. ChatDialogue.prototype.SRDotDX_echo = function(msg){
  2646. var num = SRDotDX.gui.getChatNumber();
  2647. var pEle = document.getElementsByClassName('chat_message_window')[num].getElementsByTagName('p');
  2648. var lp = pEle.length-1;
  2649. if (lp >= 0 && pEle[lp].className == 'script') {
  2650. msg = pEle[lp].getElementsByTagName('span')[4].innerHTML + '<hr>' + msg;
  2651. pEle[lp].getElementsByTagName('span')[4].innerHTML = msg;
  2652. setTimeout(SRDotDX.gui.scrollChat,100,num);
  2653. }
  2654. else this.displayUnsanitizedMessage('DotDeXtension', '<br>' + msg, {class: 'script'}, {non_user: true});
  2655. };
  2656. ChatDialogue.prototype.SRDotDX_emote = function(msg){
  2657. var user = holodeck._active_user.chatUsername();
  2658. this.displayUnsanitizedMessage(user, '**' + user + ' ' + msg + '**', {class: 'emote'}, {});
  2659. };
  2660. ChatDialogue.MESSAGE_TEMPLATE=new Template('<p class="#{classNames}"><span class="timestamp">#{timestamp}</span><span class="room">#{room}</span></span><span class="username #{userClassNames}" oncontextmenu="return false;">#{prefix}#{username}</span><span class="separator">: </span><span name="SRDotDX_#{username}" class="message">#{message}</span><span class="clear"></span></p>');
  2661.  
  2662. Holodeck.prototype.addDotdChatCommand = function (a,b) { a = a.split(','); for(var i=0; i< a.length; i++) {this._chat_commands[a[i]]||(this._chat_commands[a[i]]=[]);this._chat_commands[a[i]].push(b)} };
  2663. ChatDialogue.prototype.displayUnsanitizedMessage = function(usr, msg, cls, pfx) {
  2664. cls || (cls = {});
  2665. pfx || (pfx = {});
  2666. var active_room, allow_mutes = (active_room = this._holodeck.chatWindow().activeRoom()) && !active_room.canUserModerate(active_room.self()) || pfx.whisper;
  2667. if (!allow_mutes || !this._user_manager.isMuted(usr)) {
  2668. //var e = !pfx.non_user ? "chat_message_window_username" : "chat_message_window_undecorated_username",
  2669. var f = usr == this._user_manager.username(), h = [], rm = '';
  2670. if (msg.charAt(0)=='[' && (msg.charAt(2)=='|' || msg.charAt(3)=='|')) { var sp = msg.split(']'); rm = sp[0].split('|')[0]+']&ensp;'; usr = sp[0].split('|')[1]; msg = sp[1]; h.push('bot') }
  2671. var e = [usr]; pfx = pfx['private'] ? 'To ' : '';
  2672. //this._messages_count % 2 && h.push("even");
  2673. cls['class'] && h.push(cls['class']);
  2674. if ((!cls['class'] || cls['class'].indexOf('emote') == -1) && msg.charAt(0) == '*' && msg.charAt(2) != '*') {
  2675. var msgLen = msg.length;
  2676. if (msgLen > 5) { msg = '**' + usr + ' ' + (msg.charAt(msgLen-1) == '*' ? msg.slice(1,msgLen-1) : msg.slice(1,msgLen)) + '**'; h.push('emote'); }
  2677. }
  2678. var rUsr = h.join(' ').indexOf('sent_whisper') > -1 ? this._user_manager.username() : usr;
  2679. var raid = SRDotDX.getRaidLink(msg,rUsr);
  2680. if (raid) {
  2681. h.push('SRDotDX_raid');
  2682. h.push('DotDX_diff_' + raid.diff);
  2683. h.push('DotDX_raidId_'+raid.id);
  2684. if(raid.visited) h.push('DotDX_visitedRaid');
  2685. if(raid.nuked) h.push('DotDX_nukedRaid');
  2686. h.push('DotDX_fltChat_' + raid.boss + '_' + (raid.diff - 1));
  2687. msg = raid.ptext + '<a href="'+raid.url+'" class="chatRaidLink '+raid.id+'|'+raid.hash+'|'+raid.boss+'|'+raid.diff+'" style="float:right;" onmouseout="SRDotDX.gui.helpBox(\'chat_raids_overlay\',\'\',true);" onmouseover="SRDotDX.gui.helpBox(\'chat_raids_overlay\',' + raid.id + ',false);">'+raid.linkText()+'</a>' + raid.ntext;
  2688. SRDotDX.gui.toggleRaid('visited',raid.id,raid.visited);
  2689. SRDotDX.gui.joining ? SRDotDX.gui.pushRaidToJoinQueue(raid.id) : SRDotDX.gui.selectRaidsToJoin('chat');
  2690. }
  2691. else {
  2692. var linkArr = msg.match(/(^.*?)(https?:\/\/([\w\d\._]+)[\/]?.*?(\s|$))(.*$)/i);
  2693. if(linkArr != null && linkArr[0].indexOf('"cmd"') < 0 && linkArr[0].indexOf('href=') < 0 && linkArr.length == 6) msg = linkArr[1] + '<a href="' + linkArr[2] + '" target="_blank" class="chat_link">[' + (SRDotDX.linkNames[linkArr[3]]?(SRDotDX.linkNames[linkArr[3]]+' link'):linkArr[3]) + ']</a>' + linkArr[4] + linkArr[5];
  2694. }
  2695. if(SRDotDX.config.mutedUsers[usr]) h.push('DotDX_nukedRaid');
  2696. if(SRDotDX.config.ignUsers[usr]) usr = SRDotDX.config.ignUsers[usr], e.push('ign');
  2697. var fCls = h.join(' ');
  2698. var ts = fCls.indexOf('emote') > -1 || fCls.indexOf('script') > -1 || fCls.indexOf('bot') > -1 ? '' : ('('+('0'+(new Date().getHours())).slice(-2) + ':' + ('0'+(new Date().getMinutes())).slice(-2)+')&ensp;');
  2699. f && e.push('is_self');
  2700.  
  2701. usr = ChatDialogue.MESSAGE_TEMPLATE.evaluate({prefix: pfx, username: usr, message: msg, classNames: fCls, userClassNames: e.join(' '), timestamp: ts, room: rm });
  2702. this.insert(usr);
  2703. }
  2704. };
  2705. ChatRoomGroup.prototype.buildRegularRoomNode = function(a){
  2706. var b = new Element("li", {"class": 0 === i % 2 ? "even room" : "odd room"});
  2707. b.room = a;
  2708. var c = (new Element("p",{"class": "name"})).update(a.name);
  2709. a.premium_only && (active_user.isPremium() || c.addClassName("upsell"), c.addClassName("premium_room_icon spritesite"));
  2710. b.insert(c);
  2711. b.insert((new Element("p", {"class": "user_count"+(a.joinable?"":" full")})).update(a.total_user_count));
  2712. b.insert(new Element("div", {style: "clear:both;"}));
  2713. return b
  2714. };
  2715. SRDotDX.util.updateUser = function(loading) {
  2716. if(loading || SRDotDX.config.kongUser == 'Guest') {
  2717. SRDotDX.config.kongUser = active_user.username();
  2718. SRDotDX.config.kongId = active_user.id();
  2719. SRDotDX.config.kongAuth = active_user.gameAuthToken();
  2720. }
  2721. }
  2722. SRDotDX.echo = function(msg) { holodeck.activeDialogue().SRDotDX_echo(msg) };
  2723. SRDotDX.util.getRoomNumber = function() { return parseInt(holodeck._chat_window._active_room.name().match(/[0-9]{1,2}/)) };
  2724. for (var i in SRDotDX.raids) SRDotDX.raidArray.push(i);
  2725. holodeck.addDotdChatCommand("stop",function(deck,text){
  2726. if(SRDotDX.gui.isPosting)
  2727. {
  2728. SRDotDX.gui.FPXStopPosting();
  2729. }else{SRDotDX.echo('<b>/stop</b>: Links are not being posted. Stop command invalid.');}
  2730. return false;
  2731. });
  2732. holodeck.addDotdChatCommand("e",function (deck, text){
  2733. var s = text.slice(2);
  2734. if(s != "") holodeck.activeDialogue().SRDotDX_emote(s);
  2735. else SRDotDX.echo('<b>/e</b>: Empty message specified');
  2736. return false;
  2737. }); //
  2738. holodeck.addDotdChatCommand("kill",function (deck, text){
  2739. document.getElementById("gameiframe").src = "";
  2740. SRDotDX.echo('Game window killed, have a nice chatting.');
  2741. return false;
  2742. });
  2743. holodeck.addDotdChatCommand("update", function(deck,text) {
  2744. var d = "<font color='#990000'><b>"+SRDotDX.version.minor+"</b></font><br>";
  2745. d += '<b>Installed Version</b>: <font color="#990000">'+SRDotDX.version.major+'</font><br>';
  2746. d += 'You can check ';
  2747. d += '<a href="https://greasyfork.org/scripts/406-mutik-s-dotd-script" target="_blank">here (greasyfork)</a>';
  2748. d += ' to see if your version is most current and update if needed.';
  2749. SRDotDX.echo(d);
  2750. return false;
  2751. });
  2752. holodeck.addDotdChatCommand("help", function(deck,text) {
  2753. var d = "<b>Available chat commands:</b><br>";
  2754. d += "/stop /e /kill /update /reload /relaod /rl /reloaf /mute /unmute /mutelist /ign /unign /ignlist /friend /unfriend /script /clear /wikil /import /imp /fs /room /ijoin /join /wiki /guide /manual /slap /sh /camp /perc /citadel /raid /help";
  2755. 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>';
  2756. SRDotDX.echo(d);
  2757. return false;
  2758. });
  2759. holodeck.addDotdChatCommand("reload,relaod,rl,reloaf",function(deck,text){
  2760. SRDotDX.reload();
  2761. return false;
  2762. });
  2763. holodeck.addDotdChatCommand("mute",function (deck, text){
  2764. var s = String(text).split(" ");
  2765. if(s.length == 2 && s[1] != ""){
  2766. SRDotDX.config.mutedUsers[s[1]]=true;
  2767. SRDotDX.echo('User "' + s[1] + '" muted. Use the /unmute command to undo, and the /mutelist to see all muted users.');
  2768. SRDotDX.config.save(false);
  2769. }else {
  2770. SRDotDX.echo('<b>/mute</b>: Invalid parameters specified. The proper syntax is "/mute [username]". <!--(<a href="#" onclick="SRDotDX.gui.help(\'mute\'); return false">help</a>)-->');
  2771. }
  2772. return false;
  2773. });
  2774. holodeck.addDotdChatCommand("ign",function (deck, text){
  2775. var s = text.split(" ");
  2776. if(s.length == 3 && s[1] != "" && s[2] != "") {
  2777. SRDotDX.config.ignUsers[s[1]]=s[2];
  2778. SRDotDX.echo(s[1] + '\'s ign "' + s[2] + '" added. Use the /unign command to undo, and the /ignlist to see all users with known ign.');
  2779. SRDotDX.config.save(false);
  2780. }
  2781. else SRDotDX.echo('<b>/ign</b>: Invalid parameters specified. The proper syntax is "/ign [kong username] [in game name]".');
  2782. return false;
  2783. });
  2784. holodeck.addDotdChatCommand('unmute',function (deck, text) {
  2785. var s = String(text).split(' ');
  2786. if(s.length == 2 && s[1] != '') {
  2787. if(s[1] == 'all') {
  2788. for (var u in SRDotDX.config.mutedUsers) delete SRDotDX.config.mutedUsers[u];
  2789. SRDotDX.config.save(false);
  2790. SRDotDX.echo('All users unmuted.');
  2791. }
  2792. else if (SRDotDX.config.mutedUsers[s[1]]) {
  2793. delete SRDotDX.config.mutedUsers[s[1]];
  2794. SRDotDX.echo('User "' + s[1] + '" unmuted.');
  2795. SRDotDX.config.save(false);
  2796. }
  2797. else SRDotDX.echo('No muted user "' + s[1] + '" found.');
  2798. }
  2799. else SRDotDX.echo('<b>/unmute</b>: Invalid parameters specified. The proper syntax is "/unmute [username]". "/unmute all" can be used to unmute all muted users.');
  2800. return false;
  2801. });
  2802. holodeck.addDotdChatCommand('unign',function (deck, text) {
  2803. var s = String(text).split(' ');
  2804. if(s.length == 2 && s[1] != '') {
  2805. if(s[1] == 'all') {
  2806. for (var u in SRDotDX.config.ignUsers) delete SRDotDX.config.ignUsers[u];
  2807. SRDotDX.config.save(false);
  2808. SRDotDX.echo('All users removed from IGN list.');
  2809. }
  2810. else if (SRDotDX.config.ignUsers[s[1]]) {
  2811. delete SRDotDX.config.ignUsers[s[1]];
  2812. SRDotDX.echo('Removed ' + s[1] + '\'s IGN.');
  2813. SRDotDX.config.save(false);
  2814. }
  2815. else SRDotDX.echo('No IGN of user "' + s[1] + '" found.');
  2816. }
  2817. else SRDotDX.echo('<b>/unign</b>: Invalid parameters specified. The proper syntax is "/unign [username]". "/unign all" can be used to clear IGN list.');
  2818. return false;
  2819. });
  2820. holodeck.addDotdChatCommand('mutelist', function (deck, text) {
  2821. var s = '<b>List of users currently muted:</b><br/>';
  2822. var i = 0;
  2823. for(var u in SRDotDX.config.mutedUsers) { s += u + '<br/>'; i++ }
  2824. if (i == 0) s = 'No users currently muted.<br/>';
  2825. s += '<br/>Use the /mute and /unmute commands to add or remove users on this list.';
  2826. SRDotDX.echo(s);
  2827. return false;
  2828. });
  2829. holodeck.addDotdChatCommand('ignlist', function (deck, text) {
  2830. var s = '<b>List of known users IGN:</b><br/>';
  2831. if (SRDotDX.config.ignUsers.length == 0) s = 'No users added to IGN list.<br/>';
  2832. else for (var u in SRDotDX.config.ignUsers) s += u + ':' + SRDotDX.config.ignUsers[u] + '<br/>';
  2833. s += '<br/>Use the /ign and /unign commands to add or remove users on this list.';
  2834. SRDotDX.echo(s);
  2835. return false;
  2836. });
  2837. holodeck.addDotdChatCommand('script', function(deck,text) {
  2838. SRDotDX.gui.FPXdoWork('Script link: https://greasyfork.org/scripts/406-mutik-s-dotd-script');
  2839. return false;
  2840. });
  2841. holodeck.addDotdChatCommand('clear',function(deck,text) {
  2842. holodeck.activeDialogue().clear();
  2843. return false
  2844. });
  2845. holodeck.addDotdChatCommand('wikil', function(deck,text) {
  2846. SRDotDX.gui.FPXdoWork('http://dotd.wikia.com/wiki/Dawn_of_the_Dragons_Wiki');
  2847. return false;
  2848. });
  2849. holodeck.addDotdChatCommand('import,imp', function(deck,text) {
  2850. if (/^(\/imp+)/i.test(text)) {
  2851. SRDotDX.echo('Importing all raids from server');
  2852. SRDotDX.request.raids();
  2853. }
  2854. else SRDotDX.echo('FAIL! ;)');
  2855. return false;
  2856. });
  2857. holodeck.addDotdChatCommand('friend', function(deck,text) {
  2858. var s = String(text).split(" ");
  2859. if(s.length == 2 && s[1] != ""){
  2860. if (typeof SRDotDX.config.friendUsers[s[1]] != 'object') {
  2861. SRDotDX.config.friendUsers[s[1]] = [false,false,false,false,true];
  2862. SRDotDX.config.save(false);
  2863. SRDotDX.gui.refreshFriends();
  2864. SRDotDX.echo('Added ' + s[1] + ' to friends');
  2865. }
  2866. }
  2867. return false;
  2868. });
  2869. holodeck.addDotdChatCommand('unfriend', function(deck,text) {
  2870. var s = String(text).split(" ");
  2871. if(s[1] == 'all') {
  2872. for (var u in SRDotDX.config.friendUsers) delete SRDotDX.config.friendUsers[u];
  2873. SRDotDX.config.save(false);
  2874. SRDotDX.gui.refreshFriends();
  2875. SRDotDX.echo('All users removed from friend list.');
  2876. }
  2877. else if (SRDotDX.config.friendUsers[s[1]]) {
  2878. delete SRDotDX.config.friendUsers[s[1]];
  2879. SRDotDX.config.save(false);
  2880. SRDotDX.gui.refreshFriends();
  2881. SRDotDX.echo('Removed ' + s[1] + ' from friends');
  2882. }
  2883. else SRDotDX.echo('User "' + s[1] + '" not found on friend list.');
  2884. return false;
  2885. });
  2886. holodeck.addDotdChatCommand('fs', function(deck,text) {
  2887. var cmd = text.split(' ');
  2888. if (cmd[0] == '/fs' && cmd[1]) {
  2889. SRDotDX.echo('Posting raid to friends');
  2890. document.getElementById('DotDX_raidsToSpam').value = cmd[1];
  2891. SRDotDX.gui.spamRaidsToFriends();
  2892. }
  2893. else SRDotDX.echo('Wrong syntax. Usage: /fs <raid link>');
  2894. return false;
  2895. });
  2896. holodeck.addDotdChatCommand('room', function(deck,text) {
  2897. var cmd = text.split(' ');
  2898. if (cmd[0] == '/room' && cmd[1]) {
  2899. SRDotDX.gui.gotoRoom(cmd[1]);
  2900. }
  2901. else SRDotDX.gui.gotoRoom(0);
  2902. return false;
  2903. });
  2904. holodeck.addDotdChatCommand('ijoin,join', function(deck,text) {
  2905. var mode = text.charAt(1) == 'j', joinStr = '';
  2906. if (mode) joinStr = text.slice(6), SRDotDX.gui.quickImportAndJoin(joinStr);
  2907. else joinStr = text.slice(7), SRDotDX.gui.quickImportAndJoin(joinStr,true);
  2908. return false;
  2909. });
  2910. holodeck.addDotdChatCommand('wiki', function(deck,text) {
  2911. var p = /^\/wiki (.*?)$/i.exec(text);
  2912. if (p) {
  2913. window.open('http://dotd.wikia.com/wiki/Special:Search?search=' + p[1]);
  2914. SRDotDX.echo('Wiki search opened.');
  2915. }
  2916. else SRDotDX.echo('<b>/wiki</b>: Invalid parameters specified');
  2917. return false;
  2918. });
  2919. holodeck.addDotdChatCommand('guide,manual', function(deck,text) {
  2920. window.open('https://docs.google.com/document/d/14X0WhnJrISQbxdfQv_scJbG1sUyXdE2g4iMfHmLM0E0/edit');
  2921. SRDotDX.echo('Script guide opened in new tab/window.');
  2922. return false;
  2923. });
  2924. holodeck.addDotdChatCommand('slap', function(deck,text) {
  2925. var p = /^\/slap (.*?)$/i.exec(text);
  2926. if (p) {
  2927. var num = Math.round((Math.random()*(SRDotDX.slapSentences.length-1)));
  2928. SRDotDX.gui.FPXdoWork('*' + SRDotDX.slapSentences[num].replace(/<nick>/g,p[1]) + '*');
  2929. }
  2930. else SRDotDX.echo('<b>/slap</b>: Invalid parameters specified');
  2931. return false;
  2932. });
  2933. holodeck.addDotdChatCommand('sh', function(deck,text) {
  2934. var p = /^\/sh (.*?)$/i.exec(text);
  2935. if (p) {
  2936. var fnd1 = p[1].toLowerCase(), fnd2 = p[1].length, found = false, sho;
  2937. for (i in SRDotDX.shortcuts) {
  2938. if (SRDotDX.shortcuts.hasOwnProperty(i)) {
  2939. sho = SRDotDX.shortcuts[i];
  2940. if (sho.n.toLowerCase().indexOf(fnd1) > -1 && sho.n.length == fnd2) {
  2941. SRDotDX.echo('<b>' + sho.bn + '</b>: ' + sho.desc);
  2942. found = true;
  2943. }
  2944. }
  2945. }
  2946. if (!found) SRDotDX.echo('<b>/sh</b>: Shortcut not found in db');
  2947. }
  2948. else SRDotDX.echo('<b>/sh</b>: No parameters specified');
  2949. return false;
  2950. });
  2951. holodeck.addDotdChatCommand('camp', function(deck,text) {
  2952. var name = text.split(' ');
  2953. name = typeof name[1] == "undefined" ? 'bob' : name[1].toLowerCase();
  2954. var num = SRDotDX.gui.getChatNumber();
  2955. var chatEle = document.getElementsByClassName('chat_message_window')[num];
  2956. if (chatEle.childElementCount == 0) document.getElementsByClassName('chat_message_window')[num].innerHTML = '<div><div></div></div>';
  2957. var chatElem = document.getElementsByClassName('chat_message_window')[num].lastChild.lastChild;
  2958. switch(name){
  2959. case 'bob': SRDotDX.gui.cHTML('p').set({style:"text-align: center; font: bold 12px Trebuchet MS; background-color: #f9f9f9"}).html('Bastion of Blood node data<img alt="Bastion of Blood node data" style="margin:3px" src="data:image/png;base64,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" />',true).attach('to',chatElem);
  2960. }
  2961. setTimeout(SRDotDX.gui.scrollChat,100,num);
  2962. return false;
  2963. });
  2964. holodeck.addDotdChatCommand('perc', function(deck,text) {
  2965. var bok = text.indexOf('bok',4);
  2966. var cwp = text.indexOf('cwp',4);
  2967. var empty = text.length < 6;
  2968. var output = "";
  2969. if (bok >= 0 || empty) output = "<b>Book of Knowledge Perc. Tiers:</b><br>\
  2970. 1 3999: Brown/Grey<br>\
  2971. 4000 5999: Brown/Grey/Green<br>\
  2972. 6000 9999: Grey/Green<br>\
  2973. 10000 13999: Grey/Green/Blue<br>\
  2974. 14000 15999: Green/Blue<br>\
  2975. 16000 17999: Green/Blue/Purple<br>\
  2976. 18000 21999: Blue/Purple<br>\
  2977. 22000 23999: Blue/Purple/Orange<br>\
  2978. 24000 29999: Purple/Orange<br>\
  2979. 30000 - 32999: Orange<br>\
  2980. 33000 - 35999: Orange/Red<br>\
  2981. 36000+ : Red/Orange";
  2982. if (empty) output += "<br>\
  2983. -------------------------------------------------<br>";
  2984. if (cwp >= 0 || empty) output += "<b>Clockwork Parts Perc. Tiers:</b><br>\
  2985. 1-1999: 10x Perf. Clockwork Part<br>\
  2986. 2000-3999: 25x Perf. Clockwork Part<br>\
  2987. 4000-5999: 40x Perf. Clockwork Part<br>\
  2988. 6000-7999: 55x Perf. Clockwork Part<br>\
  2989. 8000-9999: 70x Perf. Clockwork Part<br>\
  2990. 10000-11999: 85x Perf. Clockwork Part<br>\
  2991. 12000-13999: 100x Perf. Clockwork Part<br>\
  2992. 14000-15999: 115x Perf. Clockwork Part<br>\
  2993. 16000-17999: 130x Perf. Clockwork Part<br>\
  2994. 18000-19999: 145x Perf. Clockwork Part<br>\
  2995. 20000-21999: 160x Perf. Clockwork Part<br>\
  2996. 22000-23999: 175x Perf. Clockwork Part<br>\
  2997. 24000-25999: 190x Perf. Clockwork Part<br>\
  2998. 26000-27999: 205x Perf. Clockwork Part<br>\
  2999. 28000-29999: 220x Perf. Clockwork Part<br>\
  3000. 30000-31999: 235x Perf. Clockwork Part<br>\
  3001. 32000-33999: ???x Perf. Clockwork Part<br>\
  3002. 34000-35999: ???x Perf. Clockwork Part<br>\
  3003. 36000+ : 260x Perf. Clockwork Part";
  3004. SRDotDX.echo(output);
  3005. return false;
  3006. });
  3007. holodeck.addDotdChatCommand('citadel', function(deck,text) {
  3008. SRDotDX.echo("Barrack Book = Grune N Quest<br>\
  3009. Barrack Scroll 1 = Hydra NM Raid<br>\
  3010. Barrack Scroll 2 = Research Library book<br>\
  3011. Barrack Scroll 3<br>\
  3012. Armorsmith Book = Lurking Horror N Quest<br>\
  3013. Armorsmith Scroll 1 = Nalagarst NM Raid<br>\
  3014. Armorsmith Scroll 2 = Research Library 1<br>\
  3015. Armorsmith Scroll 3<br>\
  3016. Weaponsmith Book = Erebus N Quest<br>\
  3017. Weaponsmith Scroll 1 = Baroness NM Raid<br>\
  3018. Weaponsmith Scroll 2 = Research Library 1<br>\
  3019. Weaponsmith Scroll 3<br>\
  3020. Alchemist Book = Nalagarst N Quest<br>\
  3021. Alchemist Scroll 1 = Kalaxia N Quest<br>\
  3022. Alchemist Scroll 2 = Research Library 5<br>\
  3023. Alchemist Scroll 3<br>\
  3024. Research Book = Bellarius N Quest<br>\
  3025. Research Library Scroll 1 = Mardachus NM Raid<br>\
  3026. Research Library Scroll 2 = Valanazes NM Raid<br>\
  3027. Research Library Scroll 3 = Teremarthu NM Raid<br>\
  3028. Research Library Scroll 4<br>\
  3029. Research Library Scroll 5<br>\
  3030. Pet Emporium Book = Not Available<br>\
  3031. Pet Emporium 1 = Research Library 4<br>\
  3032. Stable Book = Valanazes N Quest<br>\
  3033. Stable Scroll 1 = Frog-men Assassins NM Raid<br>\
  3034. Stable Scroll 2 = Research Library 2<br>\
  3035. Stable Scroll 3<br>\
  3036. Training Ground Book = Teremarthu N Quest<br>\
  3037. Training Ground Scroll 1 = Research Library 3<br>\
  3038. Training Ground Scroll 2");
  3039. return false;
  3040. });
  3041. holodeck.addDotdChatCommand('raid', function(deck,text) {
  3042. var p = /^\/raid (.*?)(?: ([1-6]))?$/i.exec(text);
  3043. if (p) {
  3044. var msg = '', n, i;
  3045. var diff = !isNaN(p[2]) ? p[2] - 1 : -1;
  3046. var fnd = p[1].toLowerCase();
  3047. for (i in SRDotDX.raids) {
  3048. if (SRDotDX.raids.hasOwnProperty(i)) {
  3049. var raid = SRDotDX.raids[i];
  3050. if (raid.name.toLowerCase().indexOf(fnd) > -1) {
  3051. msg += '<a class="title" target="_blank" href="http://dotd.wikia.com/wiki/' + raid.name.replace(/ /g,'_').replace(/'/g,"%27") + '_(Raid)">' + raid.name + '</a>';
  3052. msg += '<br>' + (raid.type == '' ? '' : raid.type + '<br>') + SRDotDX.raidSizes[raid.size].name + ' Raid (' + (raid.size == 101 ? 100 : raid.size) + ' slots) | ' + raid.duration + 'h';
  3053. msg += '<br><table class="raids">';
  3054. switch (diff) {
  3055. case 0: msg += '<colgroup><col><col class="selected"><col><col><col></colgroup>'; break;
  3056. case 1: msg += '<colgroup><col><col><col class="selected"><col><col></colgroup>'; break;
  3057. case 2: msg += '<colgroup><col><col><col><col class="selected"><col></colgroup>'; break;
  3058. case 3: msg += '<colgroup><col><col><col><col><col class="selected"></colgroup>'; break;
  3059. default: msg += '<colgroup><col><col><col><col><col></colgroup>'; break;
  3060. }
  3061. var size = raid.size < 15 ? 10 : raid.size, fs = [], j = 4;
  3062. while(j--) fs[j] = raid.health[j]/(raid.size == 101 ? 100 : raid.size);
  3063. msg += '<thead> \
  3064. <tr><th style="border:0; background-color: transparent;"></th><th>Normal</th><th>Hard</th><th>Legend</th><th>NMare</th></tr> \
  3065. </thead> \
  3066. <tbody> \
  3067. <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> \
  3068. <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> \
  3069. <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>';
  3070. if (typeof raid.lt != 'object' && raid.id != 'rhalmarius_the_despoiler' && raid.id != 'grundus') {
  3071. var ratio = SRDotDX.raidSizes[size].ratios;
  3072. var ename = SRDotDX.raidSizes[size].enames;
  3073. for(j=0; j<ratio.length; j++) {
  3074. 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>';
  3075. }
  3076. }
  3077. else if(typeof raid.lt == 'object') {
  3078. var elen = SRDotDX.lootTiers[raid.lt[0]].tiers;
  3079. var eleh = SRDotDX.lootTiers[raid.lt[1]].tiers;
  3080. var elel = SRDotDX.lootTiers[raid.lt[2]].tiers;
  3081. var elenm= SRDotDX.lootTiers[raid.lt[3]].tiers;
  3082. var epics = SRDotDX.lootTiers[raid.lt[0]].epics;
  3083. var best = SRDotDX.lootTiers[raid.lt[0]].best;
  3084. var e = SRDotDX.lootTiers[raid.lt[0]].e?'E':'';
  3085. for(j=0; j<epics.length; j++) {
  3086. msg += '<tr'+(j==best?' class="best"':'')+'><td class="ep">'+epics[j]+e+'</td><td>'+elen[j]+'</td><td>'+eleh[j]+'</td><td>'+elel[j]+'</td><td>'+elenm[j]+'</td></tr>';
  3087. }
  3088. }
  3089. msg += '</tbody></table>'
  3090. }
  3091. }
  3092. }
  3093. if (msg != '') {
  3094. SRDotDX.echo('*loading....*');
  3095. setTimeout( function(){
  3096. var chats = document.getElementsByClassName('chat_message_window');
  3097. for (i=1; i<chats.length; i++) {
  3098. var elem = chats[i].getElementsBySelector('span[name="SRDotDX_DotDeXtension"]');
  3099. if (typeof elem[elem.length-1] != 'undefined' && elem[elem.length-1].innerHTML.indexOf('loading....') > 0) {
  3100. var ele = elem[elem.length-1];
  3101. ele.innerHTML = ele.innerHTML.slice(0,-13) + msg;
  3102. chats[i].scrollTop = chats[i].scrollHeight;
  3103. break;
  3104. }
  3105. }
  3106. }, 100);
  3107. }
  3108. else SRDotDX.echo('No raids found matching: ' + p[1]);
  3109. }
  3110. else SRDotDX.echo('<b>/raid</b>: Invalid parameters specified (<a href="#" onclick="SRDotDX.gui.help(\'raid\')">help</a>)');
  3111. return false;
  3112. });
  3113. window.onbeforeunload = function() { SRDotDX.config.save(false) };
  3114. SRDotDX.fails = 0;
  3115. console.log('[DotDX] Core loaded. Loading user interface...');
  3116. SRDotDX.gui.load();
  3117. SRDotDX.request.init();
  3118. setTimeout(function() { delete SRDotDX.load }, 100);
  3119. }
  3120. else if (++SRDotDX.fails < 20) {
  3121. console.log('[DotDX] Missing needed Kong resources (try:' + SRDotDX.fails + '), retrying in 0.75 second...');
  3122. setTimeout( SRDotDX.load, 750);
  3123. }
  3124. else {
  3125. console.log('[DotDX] Unable to locate required Kong resources. Loading aborted');
  3126. setTimeout(function() { delete SRDotDX }, 1);
  3127. }
  3128. }
  3129. };
  3130. console.log('[DotDX] Initialized. Checking for needed Kong resources ...');
  3131. SRDotDX.load();
  3132. }
  3133. if (window.top == window.self && (/^http:\/\/www\.kongregate\.com\/games\/5thplanetgames\/dawn-of-the-dragons(?:\/?$|\?|#)/i.test(document.location.href))) { //main
  3134. console.log('[DotDX] Initializing ...');
  3135. document.addEventListener("dotd.req", function(param) {
  3136. var p = JSON.parse(param.data);
  3137. p.callback = function (e, r) {
  3138. this.onload = null;
  3139. this.onerror = null;
  3140. this.ontimeout = null;
  3141. this.event = e;
  3142. this.status = r.status;
  3143. this.responseText = r.responseText;
  3144. //console.log('[DotDX] Callback: ' + JSON.stringify(this));
  3145. var c = document.createEvent("MessageEvent");
  3146. if (c.initMessageEvent) c.initMessageEvent(this.eventName, false, false, JSON.stringify(this), document.location.protocol + "//" + document.location.hostname, 1, unsafeWindow, null);
  3147. else c = new MessageEvent(this.eventName, {"origin": document.location.protocol + "//" + document.location.hostname, "lastEventId": 1, "source": unsafeWindow, "data": JSON.stringify(this)});
  3148. document.dispatchEvent(c);
  3149. };
  3150. p.onload = p.callback.bind(p, "load");
  3151. p.onerror = p.callback.bind(p, "error");
  3152. p.ontimeout = p.callback.bind(p, "timeout");
  3153. setTimeout(function(){ GM_xmlhttpRequest(p) }, 1);
  3154. //GM_xmlhttpRequest(p);
  3155. });
  3156. var scr = document.createElement('script');
  3157. scr.appendChild(document.createTextNode('(' + main + ')()'));
  3158. (document.head || document.body || document.documentElement).appendChild(scr);
  3159. }