// ==UserScript==
// @name Mutik's DotD Script
// @namespace tag://kongregate
// @description Fork of ForTheGoodOfAll DotD script with new look and strongly optimized js code
// @author Mutik, orig version: SReject, chairmansteve, tsukinomai(Shylight)?, JHunz, wpatter6, MoW, true_heathen, HG, mutikt, PDrifting
// @version 1.0.14
// @grant GM_xmlhttpRequest
// @include http://www.kongregate.com/games/5thPlanetGames/dawn-of-the-dragons*
// @include *web*.dawnofthedragons.com/*
// @include http://pastebin.com/*
// @downloadURL none
// ==/UserScript==
function main() {
if (typeof GM_setValue === 'undefined') {
var GM_setValue = function (name, value) { localStorage.setItem(name, (typeof value).substring(0, 1) + value); };
}
if (typeof GM_getValue == 'undefined') {
var GM_getValue = function (name, dvalue) {
var value = localStorage.getItem(name);
if (typeof value != 'string') return dvalue;
else {
var type = value.substring(0, 1);
value = value.substring(1);
if (type == 'b') return (value == 'true');
else if (type == 'n') return Number(value);
else return value;
}
};
}
if (typeof GM_deleteValue == 'undefined') var GM_deleteValue = function(name) { localStorage.removeItem(name) };
window.FPX = {
LandBasePrices:[4000,15000,25000,50000,75000,110000,300000,600000,1200000],
LandBaseIncome:[100,300,400,700,900,1200,2700,4500,8000],
LandCostRatio: function(owned) {
var landCosts = [4000,15000,25000,50000,75000,110000,300000,600000,1200000];
var icr = [1,1,1,1,1,1,1,1,1]; /*Income/Cost ratio*/
var i = 9;
while (i--) {
landCosts[i] += FPX.LandBasePrices[i] * owned[i] / 10;
icr[i] = FPX.LandBaseIncome[i] / landCosts[i];
}
return icr;
}
};
window.timeSince = function(date,after) {
if (typeof date === 'number') date = new Date(date);
var seconds = Math.abs(Math.floor((new Date().getTime() - date.getTime())/1000));
var interval = Math.floor(seconds/31536000);
var pretext = 'about ', posttext = after ? ' left' : ' ago';
if (interval >= 1) return pretext + interval + ' year' + (interval == 1 ? '' : 's') + posttext;
interval = Math.floor(seconds/2592000);
if (interval >= 1) return pretext + interval + ' month' + (interval == 1 ? '' : 's') + posttext;
interval = Math.floor(seconds/86400);
if (interval >= 1) return pretext + interval + ' day' + (interval == 1 ? '' : 's') + posttext;
interval = Math.floor(seconds/3600);
if (interval >= 1) return pretext + interval + ' hour' + (interval == 1 ? '' : 's') + posttext;
interval = Math.floor(seconds/60);
if (interval >= 1) return interval + ' minute' + (interval == 1 ? '' : 's') + posttext;
return Math.floor(seconds) + ' second' + (seconds == 1 ? '' : 's') + posttext;
};
window.isNumber = function(n) { return !isNaN(parseFloat(n)) && isFinite(n); };
window.SRDotDX = {
version: { major: "1.0.14", minor: 'Mutik\'s mod' },
util: {
getQueryVariable: function(v, s){
var query = String(s||window.location.search.substring(1));
if(query.indexOf('?')>-1) query = query.substring(query.indexOf('?')+1);
var vars = query.split('&');
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
if (decodeURIComponent(pair[0]) == v) {
return decodeURIComponent(pair[1]);
}
}
return ''
},
getRaidFromUrl: function(url){
var r = {}, link;
var reg = /[?&]([^=]+)=([^?&]+)/ig, p = url.replace(/&/gi,"&");
while (link = reg.exec(p)) {
if (!r.diff && link[1] == 'kv_difficulty') r.diff = parseInt(link[2]);
else if (!r.hash && link[1] == 'kv_hash') r.hash = link[2];
else if (!r.boss && link[1] == 'kv_raid_boss') r.boss = link[2];
else if (!r.id && link[1] == 'kv_raid_id') r.id = link[2].replace(/http:?/i,"");
else if (link[1] != 'kv_action_type') return null;
}
return r;
},
getShortNum: function (num) {
if (isNaN(num) || num < 0) return num;
if (num >= 1000000000000) return (num / 1000000000000).toPrecision(4) + 't';
if (num >= 1000000000) return (num / 1000000000).toPrecision(4) + 'b';
if (num >= 1000000) return (num / 1000000).toPrecision(4) + 'm';
if (num >= 1000) return (num / 1000).toPrecision(4) + 'k';
return num + ''
},
objToUriString: function(obj) {
if (typeof obj == 'object') {
var str = '';
for (var i in obj) str += encodeURIComponent(i) + '=' + encodeURIComponent(obj[i]) + '&'; str = str.substring(0,str.length-1);
return str
} return '';
},
serialize: function(obj) {
var str = [];
for (var p in obj) if(obj[p]!=null)str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p]));
return str.join("&");
},
stringFormat: function() {
var s = arguments[0];
for (var i = 0; i < arguments.length - 1; i++) {
var reg = new RegExp("\\{" + i + "\\}", "gm");
s = s.replace(reg, arguments[i + 1]);
}
return s;
}
},
config: (function() {
var tmp, reqSave = false;
try { tmp = JSON.parse(GM_getValue('SRDotDX','{}')) }
catch (e) { tmp = {}; reqSave = true }
//Raids tab vars
tmp.lastFilter = typeof tmp.lastFilter == 'string' ? tmp.lastFilter : '';
tmp.filterSearchStringR = typeof tmp.filterSearchStringR == 'string' ? tmp.filterSearchStringR : '';
tmp.fltIncVis = typeof tmp.fltIncVis == 'boolean' ? tmp.fltIncVis : false;
tmp.fltShowNuked = typeof tmp.fltShowNuked == 'boolean' ? tmp.fltShowNuked : false;
tmp.fltShowAll = typeof tmp.fltShowAll == 'boolean' ? tmp.fltShowAll : false;
//Options tab vars
tmp.importFiltered = typeof tmp.importFiltered == 'boolean' ? tmp.importFiltered : true;
tmp.hideRaidLinks = typeof tmp.hideRaidLinks == 'boolean' ? tmp.hideRaidLinks : false;
tmp.hideBotLinks = typeof tmp.hideBotLinks == 'boolean' ? tmp.hideBotLinks : false;
tmp.hideVisitedRaids = typeof tmp.hideVisitedRaids == 'boolean' ? tmp.hideVisitedRaids : false;
tmp.hideVisitedRaidsInRaidList = typeof tmp.hideVisitedRaidsInRaidList == 'boolean' ? tmp.hideVisitedRaidsInRaidList : false;
tmp.markMyRaidsVisted = typeof tmp.markMyRaidsVisted == 'boolean' ? tmp.markMyRaidsVisted : false;
tmp.markImportedVisited = typeof tmp.markImportedVisited == 'boolean' ? tmp.markImportedVisited : false;
tmp.FPXLandOwnedCount = typeof tmp.FPXLandOwnedCount == 'object' ? tmp.FPXLandOwnedCount : [0, 0, 0, 0, 0, 0, 0, 0, 0];
tmp.prettyPost = typeof tmp.prettyPost == 'boolean' ? tmp.prettyPost : false;
tmp.useMaxRaidCount = typeof tmp.useMaxRaidCount == 'boolean' ? tmp.useMaxRaidCount : false;
tmp.maxRaidCount = !(typeof tmp.maxRaidCount === 'undefined') ? tmp.maxRaidCount : 3000;
tmp.autoImportPaste = typeof tmp.autoImportPaste == 'boolean' ? tmp.autoImportPaste : false;
tmp.confirmForLargePaste = typeof tmp.confirmForLargePaste == 'boolean' && tmp.confirmPasteSize ? tmp.confirmForLargePaste : false;
tmp.confirmPasteSize = typeof tmp.confirmPasteSize == 'number' ? tmp.confirmPasteSize : 1000;
tmp.showStatusOverlay = typeof tmp.showStatusOverlay == 'boolean' ? tmp.showStatusOverlay : false;
tmp.confirmDeletes = typeof tmp.confirmDeletes == 'boolean' ? tmp.confirmDeletes : true;
tmp.autoPostPaste = typeof tmp.autoPostPaste == 'boolean' ? tmp.autoPostPaste : false;
tmp.whisperTo = typeof tmp.whisperTo == 'string' ? tmp.whisperTo : '';
tmp.formatLinkOutput = typeof tmp.formatLinkOutput == 'boolean' ? tmp.formatLinkOutput : false;
tmp.linkShowFs = typeof tmp.linkShowFs == 'boolean' ? tmp.linkShowFs : false;
tmp.linkShowAp = typeof tmp.linkShowAp == 'boolean' ? tmp.linkShowAp : false;
tmp.unvisitedRaidPruningMode = typeof tmp.unvisitedRaidPruningMode == 'number' ? tmp.unvisitedRaidPruningMode : 1;
tmp.selectedRaids = typeof tmp.selectedRaids == 'string' ? tmp.selectedRaids : '';
tmp.pastebinUrl = typeof tmp.pastebinUrl == 'string' ? tmp.pastebinUrl : '';
tmp.bckColor = typeof tmp.bckColor == 'string' ? tmp.bckColor : 'fff';
tmp.lastImported = typeof tmp.lastImported == 'number' ? tmp.lastImported : ((new Date).getTime() - 1728000000);
tmp.hideKongForum = typeof tmp.hideKongForum == 'boolean' ? tmp.hideKongForum : false;
tmp.hideGameDetails = typeof tmp.hideGameDetails == 'boolean' ? tmp.hideGameDetails : false;
tmp.hideGameTitle = typeof tmp.hideGameTitle == 'boolean' ? tmp.hideGameTitle : true;
tmp.chatFilterString = typeof tmp.chatFilterString == 'string' ? tmp.chatFilterString : '';
tmp.filterSearchStringC = typeof tmp.filterSearchStringC == 'string' ? tmp.filterSearchStringC : '';
tmp.chatSize = typeof tmp.chatSize == 'number' ? tmp.chatSize : 300;
tmp.sbEnable = typeof tmp.sbEnable == 'boolean' ? tmp.sbEnable : false;
tmp.cbDisable = typeof tmp.cbDisable == 'boolean' ? tmp.cbDisable : false;
tmp.sbRightSide = typeof tmp.sbRightSide == 'boolean' ? tmp.sbRightSide : false;
tmp.kongUser = typeof tmp.kongUser == 'string' ? tmp.kongUser : 'Guest';
tmp.kongAuth = typeof tmp.kongAuth == 'string' ? tmp.kongAuth : '0';
tmp.kongId = typeof tmp.kongId == 'string' ? tmp.kongId : '0';
tmp.kongMsg = typeof tmp.kongMsg == 'boolean' ? tmp.kongMsg : false;
tmp.filterChatLinks = typeof tmp.filterChatLinks == 'boolean' ? tmp.filterChatLinks : true;
tmp.filterRaidList = typeof tmp.filterRaidList == 'boolean' ? tmp.filterRaidList : false;
tmp.newRaidsAtTopOfList = typeof tmp.newRaidsAtTopOfList == 'boolean' ? tmp.newRaidsAtTopOfList : false;
tmp.sbConfig = typeof tmp.sbConfig == 'object' ? tmp.sbConfig : [
{type:'btn',name:'Camp',cmd:'/camp'},,,,
{type:'btn',name:'Yydians',cmd:'/raid yyd'},
{type:'btn',name:'Nessie',cmd:'/raid sea'},
{type:'btn',name:'Tisi',cmd:'/raid tisi'},,,,,
{type:'btn',color:'r',name:'Reload',cmd:'SRDotDX.reload()'},,,
{type:'btn',name:'Room 1',cmd:'SRDotDX.gui.gotoRoom(1)'},
{type:'btn',name:'Room 8',cmd:'SRDotDX.gui.gotoRoom(8)'},,,,,,,
{type:'jtxt'},
{type:'btn',color:'g',name:'Join',cmd:'SRDotDX.gui.joinSelectedRaids(true)'},
{type:'btn',color:'b',name:'Import',cmd:'SRDotDX.gui.importFromServer()'}
];
if (typeof tmp.mutedUsers != 'object') tmp.mutedUsers = {};
if (typeof tmp.ignUsers != 'object') tmp.ignUsers = {};
if (typeof tmp.friendUsers != 'object') tmp.friendUsers = {};
if (typeof tmp.raidList != 'object') tmp.raidList = {};
if (typeof tmp.filters !== 'object') tmp.filters = {};
if(reqSave) GM_setValue('SRDotDX', JSON.stringify(tmp));
// Delete expired raids
for (var id in tmp.raidList) {
if (tmp.raidList.hasOwnProperty(id)) {
tmp.raidList[id].timeLeft = function() { return this.expTime - parseInt((new Date).getTime() / 1000) };
if (tmp.raidList[id].timeLeft() < 0) delete tmp.raidList[id];
}
}
tmp.addRaid = function(hash,id,boss,diff,visited,user,ts,room) {
if((/ /).test(user)) {
var reg = new RegExp('[0-9]+|[0-9a-zA-Z_]+','g');
room = reg.exec(user); user = reg.exec(user);
}
if (typeof SRDotDX.config.raidList[id] != 'object') {
var tStamp = typeof ts == 'undefined' || ts == null ? parseInt((new Date).getTime() / 1000) : parseInt(ts);
SRDotDX.config.raidList[id] = {
hash: hash, id: id, boss: boss, diff: diff, visited: visited, nuked: false, user: user, lastUser: user, timeStamp: tStamp,
expTime: (typeof SRDotDX.raids[boss] == 'object' ? SRDotDX.raids[boss].duration : 96) * 3600 + tStamp,
timeLeft: function() {return this.expTime - parseInt((new Date).getTime() / 1000) },
room: typeof room == 'undefined' || room == null ? SRDotDX.util.getRoomNumber() : parseInt(room) };
SRDotDX.gui.addRaid(id);
}
SRDotDX.config.raidList[id].lastUser = user;
return SRDotDX.config.raidList[id]
};
tmp.getRaid = function(id) {
if (typeof SRDotDX.config.raidList[id] == 'object') {
if (SRDotDX.config.raidList[id].timeLeft() > 1) return SRDotDX.config.raidList[id];
delete SRDotDX.config.raidList[id];
} return false
};
tmp.setFilter = function(raidid,diff,val) { SRDotDX.config.filters[raidid][diff] = val };
tmp.save = function(b) {
b = typeof b == 'undefined' ? true : b;
GM_setValue('SRDotDX', JSON.stringify(SRDotDX.config));
if(b) setTimeout(SRDotDX.config.save, 60000, true);
else console.log('[DotDX] Manual config save invoked');
};
return tmp;
})(),
request: {
importLock: false,
joinAfterImport: false,
fromChat: false,
quickBtnLock: true,
filterSearchStringT: "",
raids: function(isinit,hours){
if(!SRDotDX.gui.joining) {
var secs = 15 - parseInt((new Date().getTime() - SRDotDX.config.lastImported)/1000);
if(secs > 0) {
SRDotDX.echo("You can import again in " + secs + " seconds.");
return }
console.log("[DotDX] Importing raids from raids server ...");
if(!isinit) this.initialize("Requesting raids");
else SRDotDX.request.tries++;
var h = hours ? ('&h='+hours) : '';
SRDotDX.request.req({
eventName: "dotd.getraids",
url: "http://mutik.bugs3.com/download.php?u="+SRDotDX.config.kongUser+h,
method: "GET",
headers: {"Content-Type": "application/JSON"},
timeout: 30000
});
}
},
initialize: function (str) {
SRDotDX.gui.doStatusOutput(str + "...",3000,true);
SRDotDX.request.tries = 0;
SRDotDX.request.seconds = 0;
SRDotDX.request.complete = false;
SRDotDX.request.timer = setTimeout(SRDotDX.request.tick, 1000, str);
},
tick: function (str) {
if(!SRDotDX.request.complete){
if(SRDotDX.request.seconds > 20){
SRDotDX.gui.doStatusOutput("Request failed.",3000,true);
return;
}
SRDotDX.request.seconds++;
SRDotDX.gui.doStatusOutput(str + " ("+SRDotDX.request.seconds+")...",1500,true);
SRDotDX.request.timer = setTimeout(SRDotDX.request.tick, 1000, str);
}
},
complete: false,
seconds: 0,
timer: null,
tries: 0,
req: function(param){
var a = document.createEvent("MessageEvent");
if (a.initMessageEvent) a.initMessageEvent("dotd.req", false, false, JSON.stringify(param), document.location.protocol + "//" + document.location.hostname, 0, window, null);
else a = new MessageEvent("dotd.req",{"origin":document.location.protocol + "//" + document.location.hostname, "lastEventId": 0, "source": window, "data": JSON.stringify(param)});
document.dispatchEvent(a);
},
pasteImport: function (url,isinit) {
if(!isinit) this.initialize("Importing PasteBin");
var pb = url.split('com/')[1];
SRDotDX.request.req({
eventName: "dotd.importpb",
url: 'http://pastebin.com/raw.php?i=' + pb,
method: "GET",
timeout: 30000
});
},
init: function () {
document.addEventListener("dotd.joinraid", SRDotDX.request.joinRaidResponse, false);
document.addEventListener("dotd.importpb", SRDotDX.request.pbResponse, false);
document.addEventListener("dotd.getraids", SRDotDX.request.addRaids, false);
delete this.init;
},
joinRaid: function(r){
if(typeof r == 'object') {
if(!SRDotDX.gui.joining) SRDotDX.request.initialize("Joining " + (!SRDotDX.raids[r.boss]?r.boss.capitalize().replace(/_/g,' '):SRDotDX.raids[r.boss].shortname));
var joinData = 'kongregate_username='+SRDotDX.config.kongUser+'&kongregate_user_id='+SRDotDX.config.kongId+'&kongregate_game_auth_token='+SRDotDX.config.kongAuth;
SRDotDX.request.req({
eventName: "dotd.joinraid",
url: SRDotDX.util.stringFormat('http://50.18.191.15/kong/raidjoin.php?' + joinData + '&kv_action_type=raidhelp&kv_raid_id={0}&kv_hash={1}', r.id, r.hash),
method: "GET",
timeout: 30000
});
}
},
addRaids: function(e) {
var r, data = JSON.parse(e.data);
if(data.status != 200) {
if(SRDotDX.request.tries >=3){
SRDotDX.request.complete = true;
SRDotDX.gui.doStatusOutput("Raids server busy. Please try again in a moment.");
console.log('[DotDX] Raids request failed (url: ' + data.url + ')');
console.log(JSON.stringify(data));
} else {
console.log("[DotDX] Raids server unresponsive (status " + data.status + "). Trying again, " + SRDotDX.request.tries + " tries.");
}
return;
}
SRDotDX.request.complete = true;
try{ r = JSON.parse(data.responseText.split(' change to it after some time (2-3 days) // (SRDotDX.config.importFiltered || filter.indexOf('fltList_' + r.boss + '_' + (r.diff-1)) < 0) &&
filter.indexOf('fltList_' + r.boss + '_' + (r.diff-1)) < 0 &&
(searchString == "" || searchString.indexOf("," + r.boss + "_" + r.diff + ",") >= 0) ) )
try { SRDotDX.gui.joinRaidList.push(JSON.parse(JSON.stringify(r))) } catch(ex){};
},
joining: false,
joinRaidIndex: 0,
joinRaidComplete: 0,
joinRaidSuccessful: 0,
joinRaidDead: 0,
joinRaidInvalid: 0,
joinSelectedRaids: function (fromChat) {
if (!this.joining) {
this.joining = true;
this.joinRaidIndex = 0;
this.joinRaidComplete = 0;
this.joinRaidSuccessful = 0;
this.joinRaidDead = 0;
this.joinRaidInvalid = 0;
//if (this.joinRaidList.length == 0) this.joinRaidList = this.selectRaidsToJoin();
if (SRDotDX.gui.joinRaidList.length == 0) { this.joinFinish(true); return }
SRDotDX.gui.cHTML("#AutoJoinVisibleButton").ele().value = 'Cancel';
SRDotDX.gui.cHTML("#AutoImpJoinVisibleButton").ele().value = 'Cancel';
console.log('[DotDX] Hyperfast joining ' + SRDotDX.gui.joinRaidList.length + ' raids');
//SRDotDX.request.kongData = 'kongregate_username='+holodeck._active_user.username()+'&kongregate_user_id='+holodeck._active_user.id()+'&kongregate_game_auth_token='+holodeck._active_user.gameAuthToken();
while(SRDotDX.gui.joinRaidIndex < Math.min(30,SRDotDX.gui.joinRaidList.length)) SRDotDX.request.joinRaid(SRDotDX.gui.joinRaidList[SRDotDX.gui.joinRaidIndex++]);
}
else if (!fromChat) this.joinFinish();
},
joinFinish: function(recalc){
this.joining = false;
SRDotDX.request.quickBtnLock = true;
SRDotDX.gui.cHTML("#AutoJoinVisibleButton").ele().value = 'Join';
SRDotDX.gui.cHTML("#AutoImpJoinVisibleButton").ele().value = 'Import & Join';
//this.joinRaidList = [];
if (recalc) this.selectRaidsToJoin('joining finish');
},
refreshFriends: function() {
var content="", ff, i= 0, f=false, friend;
var parentDiv = SRDotDX.gui.cHTML('#FPXfsOptions');
parentDiv.html('User Srp Sml Med Lrg Oth
',true);
for (friend in SRDotDX.config.friendUsers) {
ff = SRDotDX.config.friendUsers[friend];
content += (f?' ':'')+'' + friend + ' ' +
' '+
' '+
' '+
' '+
' ';
f=true;
}
parentDiv.html(''+content+'
',false);
for (friend in SRDotDX.config.friendUsers) {
ff = SRDotDX.config.friendUsers[friend];
for (i=0; i<5; i++) SRDotDX.gui.cHTML('#fs:' + friend + ':' + i).on('click',function(e){SRDotDX.gui.fsEleClick(e)}).ele().checked = ff[i];
}
},
DeleteRaids: function () {
if (!this.joining) {
console.log('[DotDX] Erasing visible raids ...');
var rn = SRDotDX.gui.joinRaidList.length;
if (rn > 0 && (!SRDotDX.config.confirmDeletes || confirm('This will delete ' + rn + ' raids. Continue? \n (This message can be disabled on the options tab.)'))) {
var i, tot = 0;
for (i=0; i -1) e[i].className = e[i].className.replace(/ active$/g,'');
(document.getElementById('FPXShareTab').parentNode).className += ' active';
}
},
BeginDeletingExpiredUnvisitedRaids: function() { SRDotDX.gui.DeleteExpiredUnvisitedRaids(); setInterval('SRDotDX.gui.DeleteExpiredUnvisitedRaids();',600000) },
DeleteExpiredUnvisitedRaids: function() {
console.log('[DotDX] Deleting nuked amd old unvisited raids');
var ct, item, i;
if (SRDotDX.config.unvisitedRaidPruningMode <= 2 && SRDotDX.config.unvisitedRaidPruningMode >= 0) {
//var raidList = document.getElementById('raid_list').childNodes;
var pruneTime = new Date().getTime() / 1000;
var raidid, raid, raidInfo, pruneTimer; ct = 0;
for (raidid in SRDotDX.config.raidList) {
raid = SRDotDX.config.raidList[raidid];
if (SRDotDX.raids[raid.boss]) {
if (!raid.visited || raid.nuked) {
raidInfo = SRDotDX.raids[raid.boss];
pruneTimer = SRDotDX.raidSizes[raidInfo.size].pruneTimers[SRDotDX.config.unvisitedRaidPruningMode];
if (raid.nuked) pruneTimer = pruneTimer / 2; //double time nuked pruning
if ((pruneTime - raid.timeStamp) >= pruneTimer) { SRDotDX.gui.deleteRaidFromDB(raidid); ct++ }
}
}
else { SRDotDX.gui.deleteRaidFromDB(raidid); ct++ }
}
if (ct > 0) SRDotDX.gui.doStatusOutput(ct + ' old unvisited raids pruned.');
console.log('[DotDX] Number of raids pruned: ' + ct);
SRDotDX.gui.selectRaidsToJoin('prune');
}
},
switchBot: function() {
//console.log('[SRDotDX] Bot button clicked');
var chkBot = document.getElementById('SRDotDX_options_hideBotLinks');
SRDotDX.config.hideBotLinks = chkBot.checked ? chkBot.checked = false : chkBot.checked = true;
SRDotDX.gui.cHTML('#SRDotDX_botClass').html('.bot {display: ' + (chkBot.checked ? 'none !important' : 'block') + '}', true);
var botbtns = document.getElementsByClassName('dotdx_chat_bot_button');
for (var i=0; i 0 ? botcn.replace(' active','') : botcn + ' active';
}
SRDotDX.gui.scrollChat();
},
scrollChat: function(num) {
var els = document.getElementsByClassName('chat_message_window'), i = num?num:0;
if (num) els[num].scrollTop = els[num].scrollHeight;
else while (i < els.length) els[i].scrollTop = els[i].scrollHeight, i++;
},
toggleFiltering: function() {
var query = '.DotDX_filter_dummy_0 ', i = 0, frcId = '.DotDX_fltChat_', raidId;
var fltLen = Object.keys(SRDotDX.config.filters).length;
if ((fltLen != SRDotDX.raidArray.length) || typeof SRDotDX.config.filters['serpina.jpg'] == 'object') {
while (i < SRDotDX.raidArray.length) {
raidId = SRDotDX.raidArray[i];
if(typeof SRDotDX.config.filters[raidId] == 'undefined') SRDotDX.config.filters[raidId] = [false, false, false, false];
i++
}
for (i in SRDotDX.config.filters) if (SRDotDX.raidArray.indexOf(i) < 0) delete SRDotDX.config.filters[i];
console.log('[DotDX] Filters array has been altered!');
}
if (SRDotDX.config.filterChatLinks) {
i = 0;
while (i < SRDotDX.raidArray.length) {
raidId = SRDotDX.raidArray[i];
if (SRDotDX.config.filters[raidId][0]) query = frcId + raidId + '_0, ' + query;
if (SRDotDX.config.filters[raidId][1]) query = frcId + raidId + '_1, ' + query;
if (SRDotDX.config.filters[raidId][2]) query = frcId + raidId + '_2, ' + query;
if (SRDotDX.config.filters[raidId][3]) query = frcId + raidId + '_3, ' + query;
i++
}
}
if (SRDotDX.config.filterRaidList) {
i = 0; frcId = '.DotDX_fltList_';
while (i < SRDotDX.raidArray.length) {
raidId = SRDotDX.raidArray[i];
if (SRDotDX.config.filters[raidId][0]) query = frcId + raidId + '_0, ' + query;
if (SRDotDX.config.filters[raidId][1]) query = frcId + raidId + '_1, ' + query;
if (SRDotDX.config.filters[raidId][2]) query = frcId + raidId + '_2, ' + query;
if (SRDotDX.config.filters[raidId][3]) query = frcId + raidId + '_3, ' + query;
i++
}
}
//if (SRDotDX.config.hideVisitedRaidsInRaidList) query = '.DotDX_visitedRaidList, ' + query;
SRDotDX.gui.cHTML('#DotDX_filters').html(query + '{display: none !important}',true);
},
load: function () {
if (typeof holodeck._tabs.addTab == 'function' && document.getElementById('chat_rooms_container') != null) {
SRDotDX.gui.cHTML('style').set({type: "text/css",id: 'SRDotDX_botClass'}).text('.bot{display:'+(SRDotDX.config.hideBotLinks ? 'none !important':'block')+'}').attach('to',document.head);
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);
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);
//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);
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);
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);
SRDotDX.gui.cHTML('style').set({type: "text/css",id: 'DotDX_filters'}).text('.DotDX_filter_dummy_0 {display: none !important}').attach('to',document.head);
SRDotDX.gui.cHTML('style').set({type: "text/css",id: 'DotDX_chatResizeElems'}).text('#kong_game_ui textarea.chat_input { width: 270px !important; }\
#kong_game_ui div#chat_raids_overlay { width: 292px }\
#kong_game_ui div#chat_raids_overlay > span { width: 282px }\
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);
SRDotDX.gui.toggleFiltering();
SRDotDX.gui.cHTML('style').set({type: "text/css"}).text(" \
" + (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;} \
div.gamepage_header_outer, div.gamepage_header_inner, div.gamepage_header_outer h1 {height: 0 !important; padding: 0 !important; margin: 0 !important} \
#primarylayout .maincontent {padding: 6px 0 !important} \
" : "") + "div.raid_list_item.hidden, .DotDX_nukedRaid, div.game_page_admindev_controls, div#subwrap, li#quicklinks_facebook {display:none;} \
#primarywrap {background-image: none !important; background-color: transparent !important;} \
body {background-color: #" + SRDotDX.config.bckColor + " !important}\
#FPXtt { position:absolute; display:block; } \
#FPXtttop { display:block; height:5px; margin-left:5px; } \
#FPXttcont { display:block; padding:2px 12px 3px 7px; margin-left:5px; background:#666; color:#fff; } \
#FPXttbot {display:block;height:5px;margin-left:5px;} \
#kong_game_ui ul.main_tabs li#lots_tab a {width: 33px; color:white;} \
#kong_game_ui ul.main_tabs li#lots_tab a.active {background-position: 0px 0px; color:black;} \
#kong_game_ui div#lots_tab_pane {padding: 8px; text-align: left; background-color: #777; height: 649px}\
#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;}\
li#game_tab {display:none !important} \
#kong_game_ui div#chat_window { background-color: #fff; border: 1px solid #333; overflow: hidden; box-shadow: 0 0 8px 1px #333; }\
#kong_game_ui div#chat_window_header { height: 69px; box-shadow: 0 0 5px #333; position: relative; background-color: #ddd; }\
#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 }\
#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; }\
#kong_game_ui div.chat_actions_container span.kong_ico { font-size: 12px !important; }\
#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; }\
#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;}\
#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; }\
#kong_game_ui div.chat_actions_container span.btn_tools { height: 16px; line-height: initial !important; width: 20px; margin: 2px 3px; } \
#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; } \
#kong_game_ui div#chat_window_header div.dotdx_chat_overlay > span { color: #333; text-shadow: 0 0 3px #ccc; }\
#kong_game_ui div#chat_tab_pane {background-color: #777} \
#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; } \
#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") + "; }\
#kong_game_ui div#chat_room_tabs div a:hover { text-shadow: 0 0 5px #888; }\
#kong_game_ui div#chat_room_tabs div.active a { text-shadow: 0 0 5px #999; background-color: #eee; }\
#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; } \
#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); }\
#kong_game_ui div#chat_raids_overlay.active { display: block } \
#kong_game_ui div#chat_raids_overlay > span { display: block; margin: 0 auto }\
#kong_game_ui div#lots_tab_pane ul { margin: 0px; padding: 0px; list-style-type: none; position: relative;} \
#kong_game_ui div#lots_tab_pane ul li.tab { float: left; height: 100%; } \
#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} \
#kong_game_ui div#lots_tab_pane ul li.tab div.tab_head:hover { text-shadow: 0 0 5px #888; }\
#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;} \
#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; }\
#kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane { position: absolute; display: block; left: 0px; }\
#kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list, \
#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);} \
#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;} \
#kong_game_ui div#lots_tab_pane ul li.tab.active div.tab_pane #raid_list .raid_list_item.hidden {display:none;} \
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} \
a.FPXImportLink:hover { border-color: #008299; background-color: #008299; color: white;} \
a.FPXDeleteLink:hover { border-color: #D24726; background-color: #D24726; color: white;} \
a.dotdxRaidListDelete { font: 10px \"Trebuchet MS\"; color: black; text-decoration: none; cursor: pointer; margin-right: 2px; } \
a.dotdxRaidListDelete:hover { color: #BD0000; text-shadow: 0 0 2px #FF8E8E; }\
a.DotDX_RaidLink {text-decoration:none; color: #333;} \
a.DotDX_RaidLink:hover { color: #111; text-shadow: 0 0 3px rgba(0, 0, 0, 0.2); } \
div.DotDX_ListPanel {border-top: 1px dashed #999; margin-top: 2px; padding-top: 2px; }\
div.DotDX_ListPanel > span.raidListContent {font-style: italic} \
#kong_game_ui p.user_count.full { color: crimson; } \
#kong_game_ui div#lots_tab_pane a.pastebinlink {font: normal 11px Verdana; color:#333; text-decoration:none; cursor:pointer;} \
#kong_game_ui div#lots_tab_pane a.pastebinlink:hover { text-decoration: underline; color: black } \
#kong_game_ui div#lots_tab_pane span.pasteright, #kong_game_ui div#lots_tab_pane span.pasteleft {font: normal 11px Verdana; color: #333} \
#kong_game_ui div#lots_tab_pane span.pasteright {float:right; padding-right: 6px} \
#kong_game_ui div#lots_tab_pane span.pasteleft {float:left} \
#kong_game_ui div.chat_message_window { position: relative; bottom: -1px; margin: 0; height: 4" + (SRDotDX.config.cbDisable ? '43' : '22') + "px !important; } \
#kong_game_ui div.chat_message_window p {border-bottom: 1px solid #DFDFDF; margin: 0; padding: 3px 5px;} \
#kong_game_ui p.even {background-color: #fff !important} \
#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; } \
#kong_game_ui p.SRDotDX_raid {padding: 2px 5px !important;} \
#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);} \
#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);} \
#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);} \
#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);} \
#kong_game_ui div#lots_tab_pane div#raid_list .raid_list_item:hover { box-shadow: 0 0 4px #ccc; }\
#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); } \
#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);} \
#kong_game_ui p.script hr { height: 1px; border: 0; background: #ccc; margin: 3px 0 2px; }\
#kong_game_ui p.script span { font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 11px} \
#kong_game_ui p.script span .title { font-size: 12px; font-weight: bold; color: #222 } \
#kong_game_ui p.script span .title:hover { text-shadow: 0 0 4px #ccc; text-decoration: none; }\
#kong_game_ui p span.separator { margin-right: 0px !important; display:inline !important; float: none !important} \
#kong_game_ui p span.username { color: rgb(39, 101, 148); text-decoration: none; cursor: pointer; display:inline !important; float: none !important } \
#kong_game_ui p span.username.ign { color: rgb(38, 116, 34); }\
#kong_game_ui p span.username.is_self { color: rgb(151, 49, 49); }\
#kong_game_ui p span.username:hover { text-decoration: underline } \
#kong_game_ui p span.timestamp {font-style: italic; font-size: 9px; color: #666; vertical-align: text-top;} \
#kong_game_ui p span.message {line-height: 16px; word-wrap: break-word; display:inline !important; float: none !important} \
#kong_game_ui p span.message a { text-decoration: none; color: #444; font-style: normal } \
#kong_game_ui p span.message a:hover { text-decoration: underline; color: #000 } \
#kong_game_ui p span.message a.chat_link:hover { text-shadow: 0 0 4px #F5C68A; text-decoration: none; } \
#kong_game_ui p span.message a.chat_link { color: #946A3D; } \
#kong_game_ui p.emote {font-style: italic; color: #085088;}\
#kong_game_ui p.emote span.username, #kong_game_ui p.emote span.separator { display: none !important }\
#kong_game_ui p span.room { color: #666; font-size: 9px; vertical-align: text-top; }\
#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; }\
#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} \
#kong_game_ui .chatOverlayMain > span {padding: 3px 10px; cursor: pointer;} \
#kong_game_ui .chatOverlayMain > span:hover {background-color: #C2A71C; font-style: italic; color: #555}\
#kong_game_ui textarea.chat_input { height: 30px !important; margin: 0 !important; outline: none; padding: 4px 6px 4px } \
" + (SRDotDX.config.cbDisable ? '#kong_game_ui div.chat_controls { box-shadow: 0 0 4px #666; position: relative; border-top: 1px solid #777 }' : '') + " \
#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);}\
#kong_game_ui div.dotdx_chat_buttons > span { display: inline-block; padding: 3px 7px; cursor: pointer; transition: text-shadow .2s; }\
#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; }\
#kong_game_ui input.dotdx_chat_filter:focus { background-color: #fff }\
div.dotdx_chat_buttons > span.active { text-shadow: 0 0 4px #aaa }\
div.dotdx_chat_buttons > span:hover { text-shadow: 0 0 4px #888 }\
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); } \
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;}\
div.tab_pane div.collapsingField { padding-top: 3px; }\
xxx {display:block !important}\
span.DotDX_RaidListVisited {float: right; padding: 0 3px;} \
span.DotDX_List_diff {display: block; width: 25px; float: left; font-weight: bold; padding-left: 2px;} \
span.DotDX_List_diff.DotDX_N {color: #00BB00;} \
span.DotDX_List_diff.DotDX_H {color: #DDAA00;} \
span.DotDX_List_diff.DotDX_L {color: #FF0000;} \
span.DotDX_List_diff.DotDX_NM {color: #BB00BB;} \
div.tab_pane input, div.tab_pane select {border: 1px solid #ccc; padding: 1px} \
div.tab_pane input {height: 14px;} \
div.tab_pane select {height: 18px} \
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} \
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;}\
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;}\
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;}\
div.tab_pane input[type=\"button\"].red:hover,\
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;}\
div.tab_pane input.landpmbutton { height: 20px; width: 22px; } \
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); } \
div.tab_pane input.landtxtfield { padding: 2px 0; width: 50px; text-align: center} \
div.tab_pane input.landtxtfieldc { padding: 2px 0; width: 100%; text-align: center } \
div.tab_pane td.landname { padding-top: 3px} \
div.tab_pane input.landsavebutton { height: 20px; width:100% } \
table.raids { font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 10px; text-align: center; border-collapse: collapse; margin: 5px auto } \
table.raids td { border: 1px solid #bbb; width: 55px; background-color: #fff; }\
table.raids td.ep { text-align: right; width: auto; padding: 0 4px; } \
table.raids th { border: 1px solid #bbb; background-color: #efefef; } \
table.raids tr.head { background-color: #fafafa; } \
table.raids tr.split td { border-bottom-width: 2px; } \
table.raids tr.best td { background-color: #eff4f9; } \
table.raids colgroup col.selected { border: 2px solid #5f9ea0; }\
ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"] {display: none}\
ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"] + label {font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; cursor: pointer;}\
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; }\
ul#SRDotDX_tabpane_tabs input[type=\"checkbox\"].generic + label:before { margin-left: 5px }\
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;}\
ul#SRDotDX_tabpane_tabs input[type=\"radio\"] {display: none}\
ul#SRDotDX_tabpane_tabs input[type=\"radio\"] + label {font-family: \"Trebuchet MS\", Helvetica, sans-serif; font-size: 12px; cursor: pointer;}\
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; }\
ul#SRDotDX_tabpane_tabs input[type=\"radio\"].generic + label:before { margin-left: 5px }\
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;}\
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; }\
ul#SRDotDX_tabpane_tabs input[type=\"text\"].generic:hover { border-style: solid; }\
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);}\
ul#SRDotDX_tabpane_tabs input[type=\"text\"][disabled].generic { color: #aaa; }\
ul#SRDotDX_tabpane_tabs input[type=\"text\"].color {float: right; margin-right: 6px; width: 40px;}\
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}\
input#raidsBossFilter:hover, input#raidsBossFilter:focus {background: -webkit-linear-gradient(top, #DFE8F1, #fff); background: -moz-linear-gradient(top, #DFE8F1, #fff);}\
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;}\
#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;}\
#kong_game_ui div#dotdx_status_div span {text-shadow: 0 0 4px #aaa; color: #333;}\
#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;}\
#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; }\
#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; }\
#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;}\
#kong_game_ui div#dotdx_usercontext span { display: inline-block; padding: 3px 6px 2px }\
#kong_game_ui div#dotdx_usercontext span:hover { text-shadow: 0 0 3px #aaa; }\
div#FPXfsOptions span.generic {float:left; clear:both}\
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; }\
div#FPXfsOptions label { margin-right: 4px; }\
div#dotdx_sidebar_container { margin-top: 25px; background: #777; height: 655px; padding-top: 10px }\
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) }\
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) }\
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) }\
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) }\
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) }\
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) }\
div#dotdx_sidebar_container > div { width: 60px; height: 26px }\
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) }\
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) }\
").attach("to",document.head);
var link = SRDotDX.gui.cHTML('a').set({href: '#lots_tab_pane', class: ''}).html('RAIDS ', false).attach('to', SRDotDX.gui.cHTML('li').set({ class: 'tab', id: 'lots_tab' }).attach('after', 'game_tab').ele()).ele();
var sbTmp = JSON.stringify(SRDotDX.config.sbConfig);
sbTmp = sbTmp.slice(1,sbTmp.length-1).replace(/},/g,"},
").replace(/l,/g,"l,
");
var pane = SRDotDX.gui.cHTML('div').set({id: 'lots_tab_pane'}).html(' \
\
DotDX:
\
\
\
\
Raids
\
\
\
\
Opts
\
\
\
\
\
\
\
\
Friend Share Options+
\
\
\
\
\
\
\
Share
\
\
\
\
Filter
\
\
\
\
Calc
\
\
\
\
\
Help message
\
\
', false).attach('to', 'kong_game_ui').ele();
SRDotDX.gui.cHTML('style').set({type: "text/css",id: 'DotDX_colors'}).text(' \
.DotDX_filter_dummy_0 {display: none !important} \
').attach('to',document.head);
pane.style.height = document.getElementById('chat_tab_pane').style.height;
var e = pane.getElementsByClassName('tab_head');
i = e.length;
while (i--) {
e[i].addEventListener('click', function() {
if (!/\bactive\b/i.test(this.className)) {
var e = document.getElementById("lots_tab_pane").getElementsByTagName("li");
var i = e.length;
while (i--) if (e[i].getAttribute("class").indexOf("active") > -1) e[i].className = e[i].className.replace(/ active$/g,"");
(this.parentNode).className += ' active';
}
});
}
holodeck._tabs.addTab(link);
//Set up custom chat size
SRDotDX.gui.chatResize(SRDotDX.config.chatSize);
//Chat raids overlay div
SRDotDX.gui.cHTML('div').set({id: 'chat_raids_overlay'})
.html(' ',true)
.attach("to",'chat_tab_pane');
SRDotDX.gui.cHTML('div').set({id: 'dotdx_usercontext' })
.html('Guest Friend Slap Mute ',true)
.on('mouseout',SRDotDX.gui.userContextMenuOut,true)
.on('click',function(e){SRDotDX.gui.userContextMenuClick(e)},false)
.attach("to",'chat_tab_pane');
//Sidebar elements generator
if (SRDotDX.config.sbEnable) SRDotDX.gui.applySidebarUI(1);
//spam tab
var FPXimpSpam = SRDotDX.gui.cHTML('#DotDX_raidsToSpam');
var FPXSpamText = 'Paste raid and/or pastebin links here to share or import\n\nLinks must be comma (,) separated.';
FPXimpSpam.ele().value=FPXSpamText;
FPXimpSpam.ele().addEventListener('blur',function() { if (this.value == '') this.value = FPXSpamText });
FPXimpSpam.ele().addEventListener('focus',function() { if (this.value == FPXSpamText) this.value = '' });
//chat global listener
var chat_window = document.getElementById('chat_rooms_container');
chat_window.addEventListener('click',function(e) { SRDotDX.gui.chatWindowMouseDown(e) }, false);
chat_window.addEventListener('contextmenu',function(e) { SRDotDX.gui.chatWindowContextMenu(e) }, false);
//land tab
els = document.FPXLandForm; i = 9;
while (i--) els.elements['tf_'+(i+1)].value = SRDotDX.config.FPXLandOwnedCount[i];
SRDotDX.gui.FPXLandUpdater();
//raid tab
var raids_tab = document.getElementById('raids_tab');
raids_tab.addEventListener('click', function(){ SRDotDX.gui.refreshRaidList(); }, false);
var raidBossFilter = SRDotDX.gui.cHTML('#raidsBossFilter');
raidBossFilter.ele().value = SRDotDX.config.lastFilter;
raidBossFilter.ele().addEventListener("keyup", function(){ SRDotDX.gui.updateFilterTxt(this.value,true); });
var filterIncVis = SRDotDX.gui.cHTML('#dotdx_flt_vis');
filterIncVis.ele().checked = SRDotDX.config.fltIncVis;
filterIncVis.on('click',function(){
SRDotDX.config.fltIncVis = this.checked;
if(this.checked) {
document.getElementById('dotdx_flt_nuke').checked = false; SRDotDX.config.fltShowNuked = false;
document.getElementById('dotdx_flt_all').checked = false; SRDotDX.config.fltShowAll = false;
}
SRDotDX.gui.selectRaidsToJoin('checkbox')});
var filterShowNuked = SRDotDX.gui.cHTML('#dotdx_flt_nuke');
filterShowNuked.ele().checked = SRDotDX.config.fltShowNuked;
filterShowNuked.on('click',function(){
SRDotDX.config.fltShowNuked = this.checked;
if(this.checked) {
document.getElementById('dotdx_flt_vis').checked = false; SRDotDX.config.fltIncVis = false;
document.getElementById('dotdx_flt_all').checked = false; SRDotDX.config.fltShowAll = false;
}
SRDotDX.gui.selectRaidsToJoin('checkbox')});
var filterShowAll = SRDotDX.gui.cHTML('#dotdx_flt_all');
filterShowAll.ele().checked = SRDotDX.config.fltShowAll;
filterShowAll.on('click',function(){
SRDotDX.config.fltShowAll = this.checked;
if(this.checked) {
document.getElementById('dotdx_flt_vis').checked = false; SRDotDX.config.fltIncVis = false;
document.getElementById('dotdx_flt_nuke').checked = false; SRDotDX.config.fltShowNuked = false }
SRDotDX.gui.selectRaidsToJoin('checkbox')});
//raidlist global click listener
var raid_list = document.getElementById('raid_list');
raid_list.addEventListener('click', function(e) { e.preventDefault(); e.stopPropagation(); return false },false);
raid_list.addEventListener('mousedown',function(e) { SRDotDX.gui.FPXraidListMouseDown(e) },false);
//options tab
var optsImportFiltered = SRDotDX.gui.cHTML('#SRDotDX_options_importFiltered');
optsImportFiltered.ele().checked = SRDotDX.config.importFiltered;
optsImportFiltered.on('click',function(){ SRDotDX.config.importFiltered = this.checked; SRDotDX.config.save(false) });
var optsShowFs = SRDotDX.gui.cHTML('#SRDotDX_options_showFS');
optsShowFs.ele().checked = SRDotDX.config.linkShowFs;
optsShowFs.on('click', function(){ SRDotDX.config.linkShowFs = this.checked; SRDotDX.config.save(false) });
var optsShowAp = SRDotDX.gui.cHTML('#SRDotDX_options_showAP');
optsShowAp.ele().checked = SRDotDX.config.linkShowAp;
optsShowAp.on('click', function(){ SRDotDX.config.linkShowAp = this.checked; SRDotDX.config.save(false) });
var optsHideARaids = SRDotDX.gui.cHTML('#SRDotDX_options_hideRaidLinks');
var optsHideBRaids = SRDotDX.gui.cHTML('#SRDotDX_options_hideBotLinks');
var optsHideVRaids = SRDotDX.gui.cHTML('#SRDotDX_options_hideVisitedRaids');
var optsConfirmDeletes = SRDotDX.gui.cHTML('#SRDotDX_options_confirmWhenDeleting');
var optsMarkImportedVisited = SRDotDX.gui.cHTML('#SRDotDX_options_markImportedRaidsVisited');
var optsWhisperTo = SRDotDX.gui.cHTML('#SRDotDX_options_whisperTo');
var optsMarkMyRaidsVisited = SRDotDX.gui.cHTML('#SRDotDX_options_markMyRaidsVisited');
var optsFormatLinkOutput = SRDotDX.gui.cHTML('#SRDotDX_options_formatLinkOutput');
var optsAutoImportPaste = SRDotDX.gui.cHTML('#SRDotDX_options_autoImportPaste');
var optsConfirmForLargePaste = SRDotDX.gui.cHTML('#SRDotDX_options_confirmForLargePaste');
var optsConfirmPasteSize = SRDotDX.gui.cHTML('#SRDotDX_options_confirmPasteSize');
var rbUnvisitedPruningAggressive = SRDotDX.gui.cHTML('#FPX_options_unvisitedPruningAggressive');
var rbUnvisitedPruningModerate = SRDotDX.gui.cHTML('#FPX_options_unvisitedPruningModerate');
var rbUnvisitedPruningSlow = SRDotDX.gui.cHTML('#FPX_options_unvisitedPruningSlow');
var rbUnvisitedPruningNone = SRDotDX.gui.cHTML('#FPX_options_unvisitedPruningNone');
var optsChatSizeNormal = SRDotDX.gui.cHTML('#SRDotDX_options_chatSizeNormal');
optsChatSizeNormal.on('click', function(){ SRDotDX.gui.chatResize(300) });
var optsChatSizePlus25 = SRDotDX.gui.cHTML('#SRDotDX_options_chatSizePlus25');
optsChatSizePlus25.on('click', function(){ SRDotDX.gui.chatResize(375) });
var optsChatSizePlus50 = SRDotDX.gui.cHTML('#SRDotDX_options_chatSizePlus50');
optsChatSizePlus50.on('click', function(){ SRDotDX.gui.chatResize(450) });
switch(SRDotDX.config.chatSize) {
case 300: optsChatSizeNormal.ele().checked = true; break;
case 375: optsChatSizePlus25.ele().checked = true; break;
case 450: optsChatSizePlus50.ele().checked = true; break;
default: optsChatSizeNormal.ele().checked = true; break;
}
var optsHideKongForum = SRDotDX.gui.cHTML('#options_hideKongForum');
optsHideKongForum.ele().checked = SRDotDX.config.hideKongForum;
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) });
var optsHideGameDetails = SRDotDX.gui.cHTML('#options_hideGameDetails');
optsHideGameDetails.ele().checked = SRDotDX.config.hideGameDetails;
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) });
var optsHideGameTitle = SRDotDX.gui.cHTML('#options_hideGameTitle');
optsHideGameTitle.ele().checked = SRDotDX.config.hideGameTitle;
optsHideGameTitle.on('click', function(){ SRDotDX.config.hideGameTitle = this.checked });
var optsTrueMsgCount = SRDotDX.gui.cHTML('#options_trueMsgCount');
optsTrueMsgCount.ele().checked = SRDotDX.config.kongMsg;
optsTrueMsgCount.on('click', function(){ SRDotDX.config.kongMsg = this.checked });
if(SRDotDX.config.kongMsg) SRDotDX.gui.setMessagesCount();
//Opts -> Sidebar Options
var optsSbEnable = SRDotDX.gui.cHTML('#options_sbEnable');
optsSbEnable.ele().checked = SRDotDX.config.sbEnable;
optsSbEnable.on('click', function(){ SRDotDX.config.sbEnable = this.checked; SRDotDX.gui.applySidebarUI(this.checked?1:-1); SRDotDX.config.save(false) });
var optsSbRightSide = SRDotDX.gui.cHTML('#options_sbRightSide');
optsSbRightSide.ele().checked = SRDotDX.config.sbRightSide;
optsSbRightSide.on('click', function(){ SRDotDX.config.sbRightSide = this.checked; SRDotDX.gui.applySidebarUI(2); SRDotDX.config.save(false) });
var optsCbDisable = SRDotDX.gui.cHTML('#options_cbDisable');
optsCbDisable.ele().checked = SRDotDX.config.cbDisable;
optsCbDisable.on('click', function(){ SRDotDX.config.cbDisable = this.checked; SRDotDX.config.save(false) });
if (SRDotDX.config.markMyRaidsVisted) { optsMarkMyRaidsVisited.ele().checked = true }
if (SRDotDX.config.formatLinkOutput) { optsFormatLinkOutput.ele().checked = 'checked'; }
if (SRDotDX.config.markImportedVisited) { optsMarkImportedVisited.ele().checked = 'checked'; }
if (SRDotDX.config.whisperTo != '') { optsWhisperTo.ele().value = SRDotDX.config.whisperTo; }
if (SRDotDX.config.autoImportPaste) { optsAutoImportPaste.ele().checked = 'checked'; } else { optsConfirmForLargePaste.ele().disabled=true; optsConfirmPasteSize.ele().disabled=true}
if (SRDotDX.config.confirmForLargePaste) { optsConfirmForLargePaste.ele().checked = 'checked'; } else { optsConfirmPasteSize.ele().disabled=true }
if (SRDotDX.config.confirmPasteSize>0) { optsConfirmPasteSize.ele().value = SRDotDX.config.confirmPasteSize }
if (SRDotDX.config.confirmDeletes) { optsConfirmDeletes.ele().checked = 'checked' }
if (SRDotDX.config.bckColor) { SRDotDX.gui.cHTML('#SRDotDX_colors_background').ele().value = SRDotDX.config.bckColor }
switch(SRDotDX.config.unvisitedRaidPruningMode) {
case 0: rbUnvisitedPruningAggressive.ele().checked = true; break;
case 1: rbUnvisitedPruningModerate.ele().checked = true; break;
case 2: rbUnvisitedPruningSlow.ele().checked = true; break;
case 3: rbUnvisitedPruningNone.ele().checked = true; break;
default: rbUnvisitedPruningAggressive.ele().checked = true; break;
}
if (SRDotDX.config.hideVisitedRaids) {optsHideVRaids.ele().checked = 'checked'}
if (SRDotDX.config.hideBotLinks) { optsHideBRaids.ele().checked = 'checked' }
if (SRDotDX.config.hideRaidLinks) {
optsHideARaids.ele().checked = true;
optsHideVRaids.ele().disabled = true;
optsHideBRaids.ele().disabled = true;
}
optsConfirmDeletes.ele().addEventListener('click', function () { SRDotDX.config.confirmDeletes = this.checked });
optsAutoImportPaste.ele().addEventListener('click', function (){ SRDotDX.config.autoImportPaste = this.checked;
if(!this.checked){ optsConfirmForLargePaste.ele().checked = false; SRDotDX.config.confirmForLargePaste = false }
optsConfirmForLargePaste.ele().disabled = !this.checked;
optsConfirmPasteSize.ele().disabled = !this.checked;
});
optsConfirmForLargePaste.ele().addEventListener('click', function () { optsConfirmPasteSize.ele().disabled = !this.checked; SRDotDX.config.confirmForLargePaste = this.checked });
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') });
optsMarkImportedVisited.ele().addEventListener("click", function() { SRDotDX.config.markImportedVisited = this.checked; });
optsWhisperTo.ele().addEventListener("change", function(){
console.log("[SRDotDX] Whisper person changed to " + this.value);
SRDotDX.config.whisperTo = this.value;
});
SRDotDX.gui.cHTML('#SRDotDX_colors_background').ele().addEventListener("change", function(){
SRDotDX.config.bckColor = this.value;
});
optsFormatLinkOutput.ele().addEventListener("click", function(){
SRDotDX.config.formatLinkOutput = this.checked;
});
optsMarkMyRaidsVisited.ele().addEventListener("click", function() {
SRDotDX.config.markMyRaidsVisted = this.checked;
});
optsHideARaids.ele().addEventListener("click",function() {
document.getElementById('SRDotDX_options_hideVisitedRaids').disabled = this.checked;
document.getElementById('SRDotDX_options_hideSeenRaids').disabled = this.checked;
SRDotDX.config.hideRaidLinks = this.checked;
SRDotDX.gui.cHTML('#SRDotDX_raidClass').html('.SRDotDX_raid {display: ' + (this.checked ? 'none !important' : 'block') + '}', true);
},true);
optsHideBRaids.ele().addEventListener("click",function() { SRDotDX.gui.switchBot('dotdx_chat_bot') },true);
optsHideVRaids.ele().addEventListener("click",function() {
SRDotDX.config.hideVisitedRaids = this.checked;
SRDotDX.gui.cHTML('#SRDotDX_visitedRaidClass').html('.SRDotDX_visitedRaid {display: ' + (this.checked ? 'none !important' : 'block') + '}', true);
},true);
rbUnvisitedPruningAggressive.ele().addEventListener("click",function() { SRDotDX.config.unvisitedRaidPruningMode = 0 },true);
rbUnvisitedPruningModerate.ele().addEventListener("click",function() { SRDotDX.config.unvisitedRaidPruningMode = 1 },true);
rbUnvisitedPruningSlow.ele().addEventListener("click",function() { SRDotDX.config.unvisitedRaidPruningMode = 2 },true);
rbUnvisitedPruningNone.ele().addEventListener("click",function() { SRDotDX.config.unvisitedRaidPruningMode = 3 },true);
//CHAT TAB CLICK SCROLL (id=chat_tab, class=chat_message_window)
SRDotDX.gui.cHTML('#chat_tab').ele().addEventListener("click", function () {
setTimeout(function(){
var els = document.getElementsByClassName('chat_message_window'), el;
i = els.length;
while (i--) {
el = els[i]; console.log("[SRDotDX] Scrolling chat window " + el.scrollTop + " : " + el.scrollHeight);
el.scrollTop = el.scrollHeight;
}
SRDotDX.gui.selectRaidsToJoin();
},50);
},true);
//RAIDS TAB CLICK EVENT LISTENER
SRDotDX.gui.cHTML('#lots_tab').ele().addEventListener("click", function(){setTimeout(SRDotDX.gui.selectRaidsToJoin,50)},true);
//FriendShare
SRDotDX.gui.refreshFriends();
// Filtering tab
var i = 0, isChecked, raid, parentTableId = '', parentTable = '';
while (i < SRDotDX.raidArray.length) {
raid = SRDotDX.raids[SRDotDX.raidArray[i]];
parentTableId = 'FPX_options_cbs_' + raid.id;
parentTable = SRDotDX.gui.cHTML('tr').set({id: parentTableId}).html(' \
' + raid.name + ' \
\
\
\
\
', false);
if (raid.stat == 'H') parentTable.attach('to','FPXRaidFilterWhatGuild');
else if (raid.stat == 'ESH') parentTable.attach('to','FPXRaidFilterWhatSpecial');
else if (raid.size > 1 && raid.size < 50) parentTable.attach('to','FPXRaidFilterWhatSmall');
else if (raid.size == 50) parentTable.attach('to','FPXRaidFilterWhatMedium');
else if (raid.size == 100) parentTable.attach('to','FPXRaidFilterWhatLarge');
else if (raid.size == 250) parentTable.attach('to','FPXRaidFilterWhatEpic');
else if (raid.size == 500) parentTable.attach('to','FPXRaidFilterWhatColossal');
for (var j=0; j<4; j++) {
var cbId = "cb_filter_" + raid.id + '_' + j; isChecked = !SRDotDX.config.filters[raid.id][j];
cb = SRDotDX.gui.cHTML('#' + cbId); cb.ele().checked = isChecked;
cb.ele().addEventListener("click",function() {
var raidId = '', diffIndex = '', reg = /cb_filter_([0-9a-z_]+)_([0-9])/i;
var ele = SRDotDX.gui.cHTML('#DotDX_filters').ele().innerHTML; i = reg.exec(this.id);
if (i != null) { raidId = i[1]; diffIndex = parseInt(i[2]) }
SRDotDX.config.setFilter(raidId,diffIndex,!this.checked);
reg = new RegExp('.DotDX_fltChat_'+raidId+'_'+diffIndex+', ','g');
if(SRDotDX.config.filterChatLinks) {
if (!this.checked && !reg.test(ele)) ele = '.DotDX_fltChat_' + raidId + '_' + diffIndex + ', ' + ele;
else if (this.checked) ele = ele.replace(reg,'');
}
reg = new RegExp('.DotDX_fltList_'+raidId+'_'+diffIndex+', ','g');
if(SRDotDX.config.filterRaidList) {
if (!this.checked && !reg.test(ele)) ele = '.DotDX_fltList_' + raidId + '_' + diffIndex + ', ' + ele;
else if (this.checked) ele = ele.replace(reg,'');
}
SRDotDX.gui.cHTML('#DotDX_filters').ele().innerHTML = ele;
var cbAllId = "cb_filter_" + raidId + '_all';
var f1 = SRDotDX.config.filters[raidId][0];
var f2 = SRDotDX.config.filters[raidId][1];
var f3 = SRDotDX.config.filters[raidId][2];
var f4 = SRDotDX.config.filters[raidId][3];
if ((!f1 && !f2 && !f3 && !f4) || (f1 && f2 && f3 && f4)) { var cb = SRDotDX.gui.cHTML('#' + cbAllId); cb.ele().checked = this.checked }
},true);
}
var allCbId = "cb_filter_" + raid.id + "_all";
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]);
var cb = SRDotDX.gui.cHTML('#' + allCbId); cb.ele().checked = isChecked;
cb.on("click",function() {
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;
if (i != null) raidId = i[1];
while (j < 4) {
cbId = 'cb_filter_' + raidId + '_' + j; subcb = SRDotDX.gui.cHTML('#' + cbId);
subcb.ele().checked = this.checked; SRDotDX.config.filters[raidId][j] = !this.checked;
reg = new RegExp('.DotDX_fltChat_'+raidId+'_'+j+', ','g');
if(SRDotDX.config.filterChatLinks) {
if (!this.checked && !reg.test(ele)) ele = '.DotDX_fltChat_' + raidId + '_' + j + ', ' + ele;
else if (this.checked) ele = ele.replace(reg,'');
}
reg = new RegExp('.DotDX_fltList_'+raidId+'_'+j+', ','g');
if(SRDotDX.config.filterRaidList) {
if (!this.checked && !reg.test(ele)) ele = '.DotDX_fltList_' + raidId + '_' + j + ', ' + ele;
else if (this.checked) ele = ele.replace(reg,'');
}
SRDotDX.gui.cHTML('#DotDX_filters').ele().innerHTML = ele; j++
}
},true); i++
}
var filterChatCb = SRDotDX.gui.cHTML('#SRDotDX_options_perRaidFilterLinks');
filterChatCb.on("click", function() { SRDotDX.config.filterChatLinks = this.checked; SRDotDX.gui.toggleFiltering();},true).ele().checked = SRDotDX.config.filterChatLinks;
var filterListCb = SRDotDX.gui.cHTML('#SRDotDX_options_perRaidFilterRaidList');
filterListCb.on("click", function() { SRDotDX.config.filterRaidList = this.checked; SRDotDX.gui.toggleFiltering();},true).ele().checked = SRDotDX.config.filterRaidList;
SRDotDX.gui.cHTML('li').set({class: 'rate'}).html('Reload Game ', false).attach('after','quicklinks_favorite_block');
//Chat buttons overlay div
document.getElementsByClassName('chat_message_window')[0].setAttribute('id','chat_message_window');
var hd = document.getElementById('chat_window_header').getElementsByClassName('room_name_container')[0].innerHTML;
document.getElementById('chat_window_header').getElementsByClassName('room_name_container')[0].innerHTML = hd + 'DotDX:
';
//for (i=0; iJoinImport Reload Bot ',true).attach("after",'chat_message_window');
//setTimeout(SRDotDX.gui.FPXFilterRaidListByName, 2500);
setTimeout(SRDotDX.gui.BeginDeletingExpiredUnvisitedRaids, 10000);
//setTimeout(SRDotDX.purge, 20000);
SRDotDX.util.updateUser(true);
console.log('[DotDX] DotDeXtension loading complete');
SRDotDX.gui.doStatusOutput('Loaded successfully', 2000, false);
setTimeout(SRDotDX.config.save, 2000);
}
else { setTimeout(SRDotDX.gui.load, 500)}
},
fsEleClick: function(e) {
e = e || window.event;
var el = e.target.id.split(':');
if (el[0] == 'fs') {
SRDotDX.config.friendUsers[el[1]][el[2]] = e.target.checked;
}
},
FPXraidLinkClick: function(id) {
if(!SRDotDX.gui.joining) {
//SRDotDX.request.kongData = 'kongregate_username='+holodeck._active_user.username()+'&kongregate_user_id='+holodeck._active_user.id()+'&kongregate_game_auth_token='+holodeck._active_user.gameAuthToken();
SRDotDX.request.joinRaid(SRDotDX.config.raidList[id]);
}
else SRDotDX.gui.joinRaidList.push(SRDotDX.gui.GetRaid(id));
},
FPXLandButtonHandler: function (ele, name) {
var x = name.charAt(name.length-1), sign = 1;
if(name.charAt(3)!='p')sign=-1;
document.FPXLandForm.elements["tf_"+x].value = parseInt(document.FPXLandForm.elements["tf_"+x].value, 10)+(10*sign);
SRDotDX.gui.FPXLandUpdater();
},
FPXLandUpdater: function () {
var owned = [0,0,0,0,0,0,0,0,0], els = document.FPXLandForm, i = 9;
while (i--) owned[i] = parseInt(els.elements['tf_'+(i+1)].value,10);
var ratio = FPX.LandCostRatio(owned), best = 0, cn; i = 9;
while (i--) {
cn = document.getElementById('b_'+(i+1)).className;
if (cn.indexOf('landpmbutton ') == -1) document.getElementById('b_'+(i+1)).className = cn.replace('landpmbuttonhigh','landpmbutton');
//document.getElementById('b_'+(i+1)).prevClassName = 'landpmbutton';
if (ratio[i] > ratio[best]) best = i;
}
cn = document.getElementById('b_'+(best+1)).className;
document.getElementById('b_'+(best+1)).className = cn.replace('landpmbutton','landpmbuttonhigh');
},
FPXLandButtonSave: function () {
var els = document.FPXLandForm, i = 9;
while (i--) SRDotDX.config.FPXLandOwnedCount[i] = els.elements['tf_'+(i+1)].value;
SRDotDX.config.save(false);
SRDotDX.gui.doStatusOutput('Land count saved!');
},
FPXraidListMouseDown: function(e) {
e.preventDefault(); e.stopPropagation();
var classtype = e.target.className, con; e = e || window.event;
console.log("[SRDotDX] Clicked on el with class:" + classtype + ", mouse button:" + e.which);
if (e.which == 1) {
switch (classtype) {
case 'dotdxRaidListDelete': SRDotDX.gui.deleteRaid(e.target.parentNode); break;
case 'DotDX_RaidLink': SRDotDX.gui.FPXraidLinkClick(e.target.parentNode.getAttribute("raidid")); break;
}
}
},
userContextMenuClick: function(e) {
e = e || window.event;
if(e.which == 1 && e.target.tagName.toLowerCase() == 'span') {
var initialClass = e.target.className.split(' ');
var classTokens = initialClass[0].split('_');
console.log('[DotDX] Chat menu click: user [' + initialClass[1] + '] action [' + classTokens[2]+']');
switch(classTokens[2]) {
case 'slap':
var num = Math.round((Math.random()*(SRDotDX.slapSentences.length-1)));
SRDotDX.gui.FPXdoWork('*' + SRDotDX.slapSentences[num].replace(//g,initialClass[1]) + '*');
break;
case 'mute':
SRDotDX.config.mutedUsers[initialClass[1]] = true;
SRDotDX.config.save(false);
break;
case 'friend':
if (typeof SRDotDX.config.friendUsers[initialClass[1]] == 'object') delete SRDotDX.config.friendUsers[initialClass[1]];
else SRDotDX.config.friendUsers[initialClass[1]] = [false,false,false,false,true];
SRDotDX.config.save(false);
SRDotDX.gui.refreshFriends();
break;
case 'name':
holodeck.showMiniProfile(initialClass[1]);
break;
}
e.target.className = initialClass[0];
document.getElementById('dotdx_usercontext').style.display = 'none';
}
},
userContextMenuOut: function(e) {
var el = e.toElement || e.relatedTarget;
if (el.parentNode == this || el == this) return;
var cMenu = document.getElementById('dotdx_usercontext');
for(var i=0; i<4; i++) cMenu.children[i].className = cMenu.children[i].className.split(' ')[0];
document.getElementById('dotdx_usercontext').style.display = 'none';
},
chatWindowContextMenu: function (e) {
e = e || window.event;
var clickedClass = e.target.className.split(" "), nick = "";
console.log('[DotDX] Chat window menu [' + e.target.className + ']');
switch (clickedClass[0]) {
case 'username':
if (clickedClass[1] != 'spritesite') {
e.preventDefault(); e.stopPropagation();
nick = clickedClass[1];
console.log("[DotDX] Open context menu, nick [" + nick + "], coords [" + e.clientX + "," + e.clientY + "]");
var cMenu = document.getElementById('dotdx_usercontext');
var tPane = document.getElementById('chat_tab_pane').getBoundingClientRect();
cMenu.children[0].innerHTML = nick;
cMenu.children[1].innerHTML = SRDotDX.config.friendUsers[nick] ? 'unFriend' : 'Friend';
for(var i=0; i<4; i++) cMenu.children[i].className += " "+nick;
cMenu.style.top = e.clientY - tPane.top - 14 + 'px';
cMenu.style.left = e.clientX - tPane.left - 3 + 'px';
cMenu.style.display = 'block';
return false;
}
break;
}
},
chatWindowMouseDown: function (e) {
e = e || window.event;
var clickedClass = e.target.className.split(" "), nick = "";
console.log('[DotDX] Chat window (' + e.which + ') [' + e.target.className + ']');
switch (clickedClass[0]) {
case 'username':
if (clickedClass[1] != 'spritesite') {
e.preventDefault(); e.stopPropagation();
nick = clickedClass[1];
if (e.which == 1) {
console.log("[DotDX] Whisp to user with nick [" + nick + "]");
holodeck.chatWindow().insertPrivateMessagePrefixFor(nick);
}
}
break;
case 'chatRaidLink':
if(e.which == 1) {
e.preventDefault(); e.stopPropagation();
var raid = clickedClass[1].split("|");
var rObj = {id:raid[0],hash:raid[1],boss:raid[2],diff:raid[3]};
if(!SRDotDX.gui.joining) {
//SRDotDX.request.kongData = 'kongregate_username='+holodeck._active_user.username()+'&kongregate_user_id='+holodeck._active_user.id()+'&kongregate_game_auth_token='+holodeck._active_user.gameAuthToken();
SRDotDX.request.joinRaid(rObj);
}
else SRDotDX.gui.joinRaidList.push(rObj);
}
break;
case 'dotdx_chat_button':
if(e.which == 1) {
switch(e.target.id) {
case 'dotdx_chat_join': SRDotDX.gui.joinSelectedRaids(true); break;
case 'dotdx_chat_import': SRDotDX.gui.importFromServer(); break;
case 'dotdx_chat_bot': SRDotDX.gui.switchBot(); break;
case 'dotdx_chat_reload': SRDotDX.reload(); break;
}
}
}
},
FPXraidLinkMouseDown: function (e,param1,param2,isChat) {
e = e || window.event;
if(isChat && e.which == 1) SRDotDX.gui.FPXraidLinkClick(param1);
},
raidListItemUpdateTimeSince: function(id) {
var raid = SRDotDX.config.raidList[id];
if (typeof raid == 'object') document.getElementById('timeSince_' + id).innerHTML = timeSince(new Date(raid.timeStamp))
},
raidListItemUpdate: function(id) {
var raid = SRDotDX.config.raidList[id];
if (typeof raid == 'object') {
var ele = document.getElementById("raid_list").firstChild;
while (ele) {
if (ele.getAttribute("raidid") == id) { ele.getElementsByClassName("DotDX_RaidListVisited")[0].innerHTML = (raid.visited ? '★':''); break; }
ele = ele.nextSibling;
}
}
else SRDotDX.gui.raidListItemRemoveById(id);
},
raidListItemRemoveById: function (id) {
var ele = document.getElementById('DotDX_' + id);
if (ele) ele.parentNode.removeChild(ele);
},
toggleCSS: function (p) {
if (p) {
document.head.removeChild(document.getElementById(p.id));
SRDotDX.gui.cHTML("style").set({type: "text/css", id: p.id}).text(p.cls).attach("to",document.head);
}
},
toggleRaid: function(type,id,tog) {
var d = document.getElementsByClassName("DotDX_raidId_" + id);
if (typeof SRDotDX.config.raidList[id] == 'object') {
var raid = SRDotDX.config.raidList[id];
raid = SRDotDX.getRaidDetails("&kv_difficulty="+raid.diff+"&kv_hash="+raid.hash+"&kv_raid_boss="+raid.boss+"&kv_raid_id="+raid.id);
}
var i = d.length;
while (i--) {
if (tog && d[i].className.indexOf('DotDX_' + type + 'Raid') < 0) d[i].className += ' DotDX_' + type + 'Raid';
else if (!tog && d[i].className.indexOf('DotDX_' + type + 'Raid') >= 0) d[i].className = d[i].className.replace(new RegExp('DotDX_' + type + 'Raid( |$)','i'),'');
if (typeof raid == 'object') d[i].getElementsByTagName('a')[0].innerHTML = raid.linkText();
}
}
},
nukeRaid: function (id) { if (SRDotDX.config.raidList[id]) { SRDotDX.config.raidList[id].nuked = true; SRDotDX.gui.toggleRaid('nuked', id, true) } },
searchPatterns: {
z1: ['kobold','scorp','ogre'],
z2: ['rhino','alice','lurker'],
z3: ['4ogre','squid','batman','drag','tainted'],
z4: ['bmane','3dawg','hydra','sircai','tyranthius'],
z5: ['ironclad','zombiehorde','stein','bogstench','nalagarst'],
z6: ['gunnar','nidhogg','kang','ulfrik','kalaxia'],
z7: ['maraak','erakka_sak','wexxa','guilbert','bellarius'],
z8: ['hargamesh','grimsly','rift','sisters','mardachus'],
z9: ['mesyra','nimrod','phaedra','tenebra','valanazes'],
'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'],
'z9.5': ['pumpkin','jacksrevenge1'],
z10: ['krugnug','tomb_gargoyle','leonine_watcher','centurion_marius','caracalla'],
z14: ['zugen','gulkinari','verkiteia','cannibal_barbarians'],
farm: ['maraak','erakka_sak','wexxa','guilbert','bellarius','drag','tainted','ogre','scorp','baroness'],
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'],
tower: ['thaltherda','hurkus','malleus'],
small: ['kobold','rhino','bmane','4ogre','serpina','dragons_lair','gunnar','hargamesh','ironclad','krugnug','maraak','thaltherda','zugen'],
medium: ['alice','erakka_sak','grimsly','3dawg','scorp','nidhogg','tomb_gargoyle','squid','tisiphone','zombiehorde','baroness','hurkus','gulkinari'],
large: ['ogre','batman','hydra','kang','leonine_watcher','lurker','rift','stein','wexxa','teremarthu','zralkthalat','malleus','verkiteia'],
epic: ['bogstench','centurion_marius','drag','tainted','guilbert','pumpkin','jacksrevenge1','mesyra','nimrod','phaedra','sircai','sisters','ulfrik','frogmen_assassins','burbata','yydians_sanctuary','grundus'],
colossal: ['bellarius','caracalla','kalaxia','tyranthius','mardachus','nalagarst','tenebra','valanazes','siculus','ruzzik','cannibal_barbarians','vortex_abomination'],
glyph: ['maraak','erakka_sak','wexxa','guilbert','bellarius'],
citadel: ['thaltherda','hurkus','malleus','yydians_sanctuary'],
aquatic: ['dirthax','frogmen_assassins','lurker','nidhogg','crabshark','squid','thaltherda'],
beastman: ['bmane','burbata','frogmen_assassins','batman','war_boar','hargamesh','hurkus','krugnug','malleus','scorp','ruzzik','squid'],
bludheim: ['gunnar','nidhogg','kang','ulfrik','kalaxia'],
colosseum: ['gladiators','serpina','crabshark','tisiphone','chimera'],
construct: ['cedric','erakka_sak','giantgolem','leonine_watcher','tomb_gargoyle','stein','yydians_sanctuary'],
demon: ['apoc_demon','3dawg','tyranthius','lunacy','salome','sircai','blobmonster','malchar','zralkthalat'],
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'],
human: ['agony','rhino','gladiators','baroness','warewolfpack','alice','cannibal_barbarians','guilbert','gunnar','pumpkin','jacksrevenge1','lunacy','slaughterers','ulfrik'],
magical: ['djinn','grimsly','hargamesh','fairy_prince','rift','sisters','vortex_abomination','grundus'],
ogre: ['ogre','4ogre','felendis','zugen'],
qwiladrian: ['gulkinari','teremarthu','vortex_abomination'],
ryndor: ['bmane','3dawg','hydra','sircai','tyranthius'],
siege: ['echidna','ulfrik','yydians_sanctuary'],
undead: ['agony','bogstench','serpina','ironclad','malleus','nalagarst','stein','siculus','zombiehorde','caracalla','centurion_marius'],
underground: ['maraak','erakka_sak','wexxa','guilbert','bellarius','spider','tomb_gargoyle','leonine_watcher','centurion_marius','caracalla','dragons_lair','kang','3dawg','lurker','salome','stein']
},
shortcuts: {
bb: { n: 'bb', bn: 'BB', desc: 'Briseis\' Blessing [magic]' },
bok: { n: 'bok', bn: 'BoK', desc: 'Book of Knowledge [consumable]' },
bsi: { n: 'bsi', bn: 'BSI', desc: 'Battle Strength Index (Base Attack + Base Defense) / Level' },
ck: { n: 'ck', bn: 'CK', desc: 'Chryseis\' Kiss [magic]' },
dah: { n: 'dah', bn: 'Dah', desc: 'Dahrizon [general]' },
dl: { n: 'dl', bn: 'DL', desc: 'Dragons Lair [raid]' },
gg: { n: 'gg', bn: 'GG', desc: 'Golden Garden [equip]'},
gid: { n: 'gid', bn: 'GID', desc: 'Greater Impending Doom [magic]' },
gl: { n: 'gl', bn: 'GL', desc: 'Greenleaf [equip]'},
il: { n: 'il', bn: 'IL', desc: 'Insanity Laughs [magic]' },
lsi: { n: 'lsi', bn: 'LSI', desc: 'Leveling Speed Index (Base Stamina * 2 + Base Energy) / Level' },
mach: { n: 'mach', bn: 'Mach', desc: 'Machaon the Healer [general]' },
nm: { n: 'nm', bn: 'NM', desc: 'Nightmare [difficulty]' },
pc: { n: 'pc', bn: 'PC', desc: 'Planet Coins [currency]' },
perc: { n: 'perc', bn: 'perc', desc: 'Perception [stat]' },
qm: { n: 'qm', bn: 'QM', desc: 'Quicken Mind [magic]' },
sock: { n: 'sock', bn: 'SoCK', desc: 'Sword of Conquered Kingdoms [equip]' },
sor: { n: 'sor', bn: 'SoR', desc: 'Shield of Ryndor [equip]' },
sp: { n: 'sp', bn: 'SP', desc: 'Stat Points [stat]' },
wr: { n: 'wr', bn: 'WR', desc: 'World Raid [raid]' }
},
raids: {
agony: {name: 'Agony', shortname: 'Agony', id: 'agony', type: 'Undead, Human', stat: 'H', size:101, duration:168, health: [700000000,875000000,1120000000,1400000000,0,0]},
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']},
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]},
spider: {name: 'Arachna', shortname: 'Arachna', id: 'spider', type: 'Underground', stat: 'H', size:50, duration:144, health: [22000000,27500000,35200000,44000000,0,0]},
rhino: {name: 'Ataxes', shortname: 'Ataxes', id: 'rhino', type: 'Human', stat: 'S', size:10, duration:120, health: [2000000,2500000,3200000,4000000,0,0]},
gladiators: {name: 'Batiatus Gladiators ', shortname: 'Gladiators ', id: 'gladiators', type: 'Colosseum, Human', stat: 'H', size:10, duration:120, health: [12000000,15000000,19200000,24000000,0,0]},
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]},
baroness: {name: 'The Baroness', shortname: 'Baroness', id: 'baroness', type: 'Human', stat: 'S', size:50, duration: 60, health: [68000000,85000000,108800000,136000000,0,0]},
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]},
alice: {name: 'Bloody Alice', shortname: 'Alice', id: 'alice', type: 'Human', stat: 'S', size:50, duration:120, health: [15000000,18750000,24000000,30000000,0,0]},
bogstench: {name: 'Bogstench', shortname: 'Bog', id: 'bogstench', type: 'Undead', stat: 'S', size:250, duration:96, health: [450000000,562500000,720000000,900000000,0,0]},
'4ogre': {name: 'Briareus the Butcher', shortname: 'Briareus', id: '4ogre', type: 'Ogre', stat: 'S', size:10, duration:72, health: [4500000,5625000,7200000,9000000,0,0]},
bmane: {name: 'Bloodmane', shortname: 'Bmane', id: 'bmane', type: 'Beastman, Ryndor', stat: 'S', size:10, duration:72, health: [7000000,8750000,11200000,14000000,0,0]},
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']},
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']},
cedric: {name: 'Cedric the Smashable', shortname: 'Cedric', id: 'cedric', type: 'Construct', stat: 'ESH', size:90000, duration:24, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
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']},
harpy: {name: 'Celeano', shortname: 'Cel', id: 'harpy', type: '', stat: 'H', size:10, duration:120, health: [3000000,3750000,4800000,6000000,0,0]},
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']},
kobold: {name: 'Chieftain Horgrak', shortname: 'Horgrak', id: 'kobold', type: '', stat: 'S', size:10, duration:168, health: [150000,187500,240000,300000,0,0]},
corrupterebus: {name: 'Corrupted Erebus', shortname: 'Cbus', id: 'corrupterebus', type: 'Dragon', stat: 'ESH', size:90000, duration:96, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
serpina: {name: 'Countess Serpina', shortname: 'Serp', id: 'serpina', type: 'Colosseum, Undead', stat: 'E', size:15, duration:5, health: [75000000,112500000,150000000,187500000,0,0]},
basilisk: {name: 'Deathglare', shortname: 'Deathglare', id: 'basilisk', type: '', stat: 'H', size:50, duration:144, health: [45000000,56250000,72000000,90000000,0,0]},
dirthax: {name: 'Dirthax', shortname: 'Dirthax', id: 'dirthax', type: 'Aquatic', stat: 'H', size:100, duration:168, health: [550000000,687500000,880000000,1100000000,0,0]},
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']},
echidna: {name: 'Echidna', shortname: 'Echidna', id: 'echidna', type: 'Dragon, Siege', stat: 'ESH', size:90000, duration:96, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
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]},
giantgolem: {name: 'Euphronios', shortname: 'Euphronios', id: 'giantgolem', type: 'Construct', stat: 'H', size:101, duration:168, health: [450000000,562500000,720000000,900000000,0,0]},
echthros: {name: 'Echthros', shortname: 'Echthros', id: 'echthros', type: '', stat: 'ESH', size:90000, duration:96, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
drag: {name: 'Erebus the Black', shortname: 'Ereb', id: 'drag', type: 'Dragon', stat: 'S', size:250, duration:168, health: [150000000,187500000,240000000,300000000,0,0]},
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']},
felendis: {name: 'Banhammer Brothers', shortname: 'Felendis', id: 'felendis', type: 'Ogre', stat: 'H', size:100, duration:168, health: [441823718,549238221,707842125,888007007,0,0]},
ogre: {name: 'General Grune', shortname: 'Grune', id: 'ogre', type: 'Ogre', stat: 'S', size:100, duration:172, health: [20000000,25000000,32000000,40000000,0,0]},
dreadbloom: {name: 'Giant Dreadbloom', shortname: 'Dreadbloom', id: 'dreadbloom', type: '', stat: 'H', size:101, duration:192, health: [900000000,1125000000,1440000000,1800000000,0,0]},
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]},
evilgnome: {name: 'Groblar Deathcap', shortname: 'Groblar', id: 'evilgnome', type: '', stat: 'H', size:10, duration:120, health: [6000000,7500000,9600000,12000000,0,0]},
grundus: {name: 'Grundus', shortname: 'Grundus', id: 'grundus', type: 'Dragon, Magical Creature',stat: 'H', size:101, duration:72, health: [800000000,1600000000,4000000000,12000000000]},
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]},
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']},
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]},
war_boar: {name: 'Hammer', shortname: 'Hammer', id: 'war_boar', type: 'Beastman', stat: 'H', size:50, duration:144, health: [220000000,275000000,352000000,440000000,0,0]},
hargamesh: {name: 'Hargamesh', shortname: 'Hargamesh', id: 'hargamesh', type: 'Beastman, Magical Creature',stat: 'S', size:10, duration:48, health: [18000000,22500000,28800000,36000000,0,0]},
grimsly: {name: 'Headmaster Grimsly', shortname: 'Grimsly', id: 'grimsly', type: 'Magical Creature', stat: 'S', size:50, duration:60, health: [72000000,90000000,115200000,144000000,0,0]},
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']},
hydra: {name: 'Hydra', shortname: 'Hydra', id: 'hydra', type: 'Ryndor', stat: 'S', size:100, duration:72, health: [65000000,81250000,104000000,130000000,0,0]},
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
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']},
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']},
kang: {name: 'Kang-Gsod', shortname: 'Kang', id: 'kang', type: 'Bludheim, Underground', stat: 'S', size:100, duration:72, health: [95000000,118750000,152000000,190000000,0,0]},
'3dawg': {name: 'Kerberos', shortname: 'Kerb', id: '3dawg', type: 'Demon, Underground, Ryndor', stat: 'S', size:50, duration:72, health: [35000000,43750000,56000000,70000000,0,0]},
kessovtowers: {name: 'Kessov Towers', shortname: 'Towers', id: 'kessovtowers', type: 'Siege', stat: 'ESH', size:90000, duration:120, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
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']},
kessovforts: {name: 'Kessov Forts', shortname: 'Forts', id: 'kessovforts', type: 'Siege', stat: 'ESH', size:90000, duration:120, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
kessovcastle: {name: 'Kessov Castle', shortname: 'Castle', id: 'kessovcastle', type: 'Siege', stat: 'ESH', size:90000, duration:144, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
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]},
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']},
krykagrius: {name: 'Krykagrius', shortname: 'Kryk', id: 'krykagrius', type: 'Dragon', stat: 'ESH', size:90000, duration:72, health: ['Unlimited','Unlimited','Unlimited','Unlimited','Unlimited','Unlimited']},
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']},
tyranthius: {name: 'Lord Tyranthius', shortname: 'Tyr', id: 'tyranthius', type: 'Demon, Ryndor', stat: 'S', size:500, duration:168, health: [600000000,750000000,960000000,1200000000,0,0]},
lunacy: {name: 'Lunatics', shortname: 'Lunatics', id: 'lunacy', type: 'Demon, Human', stat: 'H', size:50, duration:144, health: [180000000,225000000,288000000,360000000,0,0]},
lurker: {name: 'Lurking Horror', shortname: 'Lurking', id: 'lurker', type: 'Underground, Aquatic',stat: 'S', size:100, duration:120, health: [35000000,43750000,56000000,70000000,0,0]},
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']},
maraak: {name: 'Maraak the Impaler', shortname: 'Maraak', id: 'maraak', type: 'Underground', stat: 'S', size:10, duration:48, health: [15000000,18750000,24000000,30000000,0,0]},
mardachus: {name: 'Mardachus the Destroyer', shortname: 'Mard', id: 'mardachus', type: 'Dragon', stat: 'S', size:500, duration:96, health: [1100000000,1375000000,1760000000,2200000000,0,0]},
scorp: {name: 'Mazalu', shortname: 'Mazalu', id: 'scorp', type: 'Beastman', stat: 'S', size:50, duration:168, health: [5000000,6250000,8000000,10000000,0,0]},
mesyra: {name: 'Mesyra the Watcher', shortname: 'Mesyra', id: 'mesyra', type: 'Dragon', stat: 'S', size:250, duration:96, health: [1000000000,1250000000,1600000000,2000000000,0,0]},
nalagarst: {name: 'Nalagarst', shortname: 'Nala', id: 'nalagarst', type: 'Dragon, Undead', stat: 'S', size:500, duration:98, health: [700000000,875000000,1120000000,1400000000,0,0]},
nidhogg: {name: 'Nidhogg', shortname: 'Nidhogg', id: 'nidhogg', type: 'Bludheim, Aquatic', stat: 'S', size:50, duration:60, health: [52000000,65000000,83200000,104000000,0,0]},
nimrod: {name: 'Nimrod the Hunter', shortname: 'Nimrod', id: 'nimrod', type: 'Dragon', stat: 'S', size:250, duration:96, health: [1200000000,1500000000,1920000000,2400000000,0,0]},
phaedra: {name: 'Phaedra the Deceiver', shortname: 'Phaedra', id: 'phaedra', type: 'Dragon', stat: 'S', size:250, duration:96, health: [1400000000,1750000000,2240000000,2800000000,0,0]},
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]},
roc: {name: 'Ragetalon', shortname: 'Ragetalon', id: 'roc', type: '', stat: 'H', size:100, duration:168, health: [110000000,137500000,176000000,220000000,0,0]},
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]},
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']},
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]},
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']},
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']},
crabshark: {name: 'Scuttlegore', shortname: 'Scuttle', id: 'crabshark', type: 'Colosseum, Aquatic', stat: 'H', size:100, duration:168, health: [220000000,275000000,352000000,440000000,0,0]},
squid: {name: 'Scylla', shortname: 'Scylla', id: 'squid', type: 'Beastman, Aquatic', stat: 'S', size:50, duration:72, health: [25000000,31250000,40000000,50000000,0,0]},
sircai: {name: 'Sir Cai', shortname: 'Cai', id: 'sircai', type: 'Demon, Ryndor', stat: 'S', size:250, duration:168, health: [350000000,437500000,560000000,700000000,0,0]},
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]},
slaughterers: {name: 'Slaughterers Six', shortname: 'Slaughterers', id: 'slaughterers', type: 'Human', stat: 'H', size:10, duration:120, health: [24000000,30000000,38400000,48000000,0,0]},
stein: {name: 'Stein', shortname: 'Stein', id: 'stein', type: 'Undead, Underground, Construct',stat: 'S', size:100, duration:72, health: [80000000,100000000,128000000,160000000,0,0]},
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']},
tainted: {name: 'Tainted Erebus', shortname: 'Tainted', id: 'tainted', type: 'Dragon', stat: 'S', size:250, duration:168, health: [250000000,312500000,400000000,500000000,0,0]},
tenebra: {name: 'Tenebra Shadow Mistress', shortname: 'Tenebra', id: 'tenebra', type: 'Dragon', stat: 'S', size:500, duration:128, health: [2000000000,2500000000,3200000000,4000000000,0,0]},
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']},
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']},
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']},
chimera: {name: 'Tetrarchos', shortname: 'Tetrarchos', id: 'chimera', type: 'Colosseum', stat: 'H', size:50, duration:144, health: [90000000,112500000,144000000,180000000,0,0]},
gorgon: {name: 'Tithrasia', shortname: 'Tithrasia', id: 'gorgon', type: '', stat: 'H', size:10, duration:120, health: [18000000,22500000,28800000,36000000,0,0]},
ulfrik: {name: 'Ulfrik', shortname: 'Ulfrik', id: 'ulfrik', type: 'Bludheim, Siege, Human',stat: 'S', size:250, duration:96, health: [500000000,625000000,800000000,1000000000,0,0]},
valanazes: {name: 'Valanazes the Gold', shortname: 'Vala', id: 'valanazes', type: 'Dragon', stat: 'S', size:500, duration:128, health: [2400000000,3000000000,3840000000,4800000000,0,0]},
blobmonster: {name: 'Varlachleth', shortname: 'Varla', id: 'blobmonster', type: 'Demon', stat: 'H', size:100, duration:168, health: [330000000,412500000,528000000,660000000,0,0]},
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']},
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']},
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']},
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]},
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']},
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']},
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']},
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']},
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']},
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']},
zombiehorde: {name: 'Zombie Horde', shortname: 'Zombies', id: 'zombiehorde', type: 'Undead', stat: 'S', size:50, duration:60, health: [45000000,56250000,72000000,90000000,0,0]},
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']}
},
raidSizes: {
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
13: { name: 'Small', visible: 'Yes', pruneTimers: [1800,3600,7200]}, // 1h, 2h, 2h
15: { name: 'Small', visible: 'Yes', pruneTimers: [1800,3600,3600]}, // Serpina only, so 5h/5h/5h
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]},
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
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
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
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
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
90000:{ name: 'World', visible: 'Yes', ratios: [0,0,0,0,0,0], pruneTimers: [86400,86400,86400]} // 24h, 48h, 72h
},
//http://www.kongregate.com/games/5thPlanetGames/dawn-of-the-dragons?kv_action_type=raidhelp&kv_raid_id=4462809&kv_difficulty=4&kv_raid_boss=teremarthu&kv_hash=4LBo608xg9
lootTiers: {
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 },
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 },
zugen: { tiers: ['120.0m','180.0m','225.0m','240.0m','300.0m','400.0m','750.0m','1.000b','1.500b'], epics: [8,9,1,11,14,16,19,23,33], best: 4},
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 },
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},
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},
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 },
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 },
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 },
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 },
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 },
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 },
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 },
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 },
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 },
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 },
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},
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},
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},
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},
hjr: { tiers: ['30.00m','150.0m','180.0m','360.0m','750.0m','1.500b'], epics: [8,12,16,27,36,72], best: 0},
njr: { tiers: ['20.00m','100.0m','120.0m','240.0m','500.0m','1.000b'], epics: [8,12,16,27,36,72], best: 0},
ljr: { tiers: ['40.00m','200.0m','240.0m','480.0m','1.000b','2.000b'], epics: [8,12,16,27,36,72], best: 0},
nmjr: { tiers: ['60.00m','300.0m','360.0m','720.0m','1.500b','3.000b'], epics: [8,12,16,27,36,72], best: 0},
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},
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},
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},
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},
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 },
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 },
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 },
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 },
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 },
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 },
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 },
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 },
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},
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},
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 }
},
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'},
raidArray: [],
slapSentences: [
'slaps in the face with a rotten old fish',
'slaps around with a glove',
'slaps around with an armoured glove',
'hacks into \'s computer and slaps up side the head with a rubber chicken',
'slaps around a bit with a wet noddle',
'slaps about the head and shoulders with a rubber chicken',
'slaps \'s face so hard, has to walk backwards from now on',
'slaps some sense into with a red brick',
'slaps with a fire hose',
'slaps with a huge law suit',
'slaps with a great big, wet, 100% rubber duck',
'slaps with a large dildo'
],
reload: function() {
SRDotDX.echo('Reloading, please wait...');
activateGame();
//SRDotDX.gui.cHTML('#gameiframe').ele().src = 'http://web1.dawnofthedragons.com/kong?' + SRDotDX.request.kongData;
},
fails: 0,
load: function() {
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' ) {
ChatDialogue.prototype.sendInput = function () {
var a = this._input_node.value.match(/[\s\S]{1,240}(\s|$)/g);
var al = a.length-1, i;
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);
else for(i=0; i<=al; i++ ) this._holodeck.filterOutgoingMessage((i==0?'':'... ')+a[i]+(i==al?'':'...'), this._onInputFunction);
this._input_node.value = "";
};
ChatDialogue.prototype.SRDotDX_echo = function(msg){
var num = SRDotDX.gui.getChatNumber();
var pEle = document.getElementsByClassName('chat_message_window')[num].getElementsByTagName('p');
var lp = pEle.length-1;
if (lp >= 0 && pEle[lp].className == 'script') {
msg = pEle[lp].getElementsByTagName('span')[4].innerHTML + ' ' + msg;
pEle[lp].getElementsByTagName('span')[4].innerHTML = msg;
setTimeout(SRDotDX.gui.scrollChat,100,num);
}
else this.displayUnsanitizedMessage('DotDeXtension', ' ' + msg, {class: 'script'}, {non_user: true});
};
ChatDialogue.prototype.SRDotDX_emote = function(msg){
var user = holodeck._active_user.chatUsername();
this.displayUnsanitizedMessage(user, '**' + user + ' ' + msg + '**', {class: 'emote'}, {});
};
ChatDialogue.MESSAGE_TEMPLATE=new Template('#{timestamp} #{room} #{prefix}#{username} : #{message}
');
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)} };
ChatDialogue.prototype.displayUnsanitizedMessage = function(usr, msg, cls, pfx) {
cls || (cls = {});
pfx || (pfx = {});
var active_room, allow_mutes = (active_room = this._holodeck.chatWindow().activeRoom()) && !active_room.canUserModerate(active_room.self()) || pfx.whisper;
if (!allow_mutes || !this._user_manager.isMuted(usr)) {
//var e = !pfx.non_user ? "chat_message_window_username" : "chat_message_window_undecorated_username",
var f = usr == this._user_manager.username(), h = [], rm = '';
if (msg.charAt(0)=='[' && (msg.charAt(2)=='|' || msg.charAt(3)=='|')) { var sp = msg.split(']'); rm = sp[0].split('|')[0]+'] '; usr = sp[0].split('|')[1]; msg = sp[1]; h.push('bot') }
var e = [usr]; pfx = pfx['private'] ? 'To ' : '';
//this._messages_count % 2 && h.push("even");
cls['class'] && h.push(cls['class']);
if ((!cls['class'] || cls['class'].indexOf('emote') == -1) && msg.charAt(0) == '*' && msg.charAt(2) != '*') {
var msgLen = msg.length;
if (msgLen > 5) { msg = '**' + usr + ' ' + (msg.charAt(msgLen-1) == '*' ? msg.slice(1,msgLen-1) : msg.slice(1,msgLen)) + '**'; h.push('emote'); }
}
var rUsr = typeof h[1] == 'string' && h[1] == 'sent_whisper' ? this._user_manager.username() : usr;
var raid = SRDotDX.getRaidLink(msg,rUsr);
if (raid) {
h.push('SRDotDX_raid');
h.push('DotDX_diff_' + raid.diff);
h.push('DotDX_raidId_'+raid.id);
if(raid.visited) h.push('DotDX_visitedRaid');
if(raid.nuked) h.push('DotDX_nukedRaid');
h.push('DotDX_fltChat_' + raid.boss + '_' + (raid.diff - 1));
msg = raid.ptext + ''+raid.linkText()+' ' + raid.ntext;
SRDotDX.gui.toggleRaid('visited',raid.id,raid.visited);
SRDotDX.gui.joining ? SRDotDX.gui.pushRaidToJoinQueue(raid.id) : SRDotDX.gui.selectRaidsToJoin('chat');
}
else {
var linkArr = msg.match(/(^.*?)(https?:\/\/([\w\d\._]+)[\/]?.*?(\s|$))(.*$)/i);
if(linkArr != null && linkArr[0].indexOf('"cmd"') < 0 && linkArr[0].indexOf('href=') < 0 && linkArr.length == 6) msg = linkArr[1] + '[' + (SRDotDX.linkNames[linkArr[3]]?(SRDotDX.linkNames[linkArr[3]]+' link'):linkArr[3]) + '] ' + linkArr[4] + linkArr[5];
}
if(SRDotDX.config.mutedUsers[usr]) h.push('DotDX_nukedRaid');
if(SRDotDX.config.ignUsers[usr]) usr = SRDotDX.config.ignUsers[usr], e.push('ign');
var fCls = h.join(' ');
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)+') ');
f && e.push('is_self');
usr = ChatDialogue.MESSAGE_TEMPLATE.evaluate({prefix: pfx, username: usr, message: msg, classNames: fCls, userClassNames: e.join(' '), timestamp: ts, room: rm });
this.insert(usr);
}
};
ChatRoomGroup.prototype.buildRegularRoomNode = function(a){
var b = new Element("li", {"class": 0 === i % 2 ? "even room" : "odd room"});
b.room = a;
var c = (new Element("p",{"class": "name"})).update(a.name);
a.premium_only && (active_user.isPremium() || c.addClassName("upsell"), c.addClassName("premium_room_icon spritesite"));
b.insert(c);
b.insert((new Element("p", {"class": "user_count"+(a.joinable?"":" full")})).update(a.total_user_count));
b.insert(new Element("div", {style: "clear:both;"}));
return b
};
SRDotDX.util.updateUser = function(loading) {
if(loading || SRDotDX.config.kongUser == 'Guest') {
SRDotDX.config.kongUser = active_user.username();
SRDotDX.config.kongId = active_user.id();
SRDotDX.config.kongAuth = active_user.gameAuthToken();
}
}
SRDotDX.echo = function(msg) { holodeck.activeDialogue().SRDotDX_echo(msg) };
SRDotDX.util.getRoomNumber = function() { return parseInt(holodeck._chat_window._active_room.name().match(/[0-9]{1,2}/)) };
for (var i in SRDotDX.raids) SRDotDX.raidArray.push(i);
holodeck.addDotdChatCommand("stop",function(deck,text){
if(SRDotDX.gui.isPosting)
{
SRDotDX.gui.FPXStopPosting();
}else{SRDotDX.echo('/stop : Links are not being posted. Stop command invalid.');}
return false;
});
holodeck.addDotdChatCommand("e",function (deck, text){
var s = text.slice(2);
if(s != "") holodeck.activeDialogue().SRDotDX_emote(s);
else SRDotDX.echo('/e : Empty message specified');
return false;
}); //
holodeck.addDotdChatCommand("kill",function (deck, text){
document.getElementById("gameiframe").src = "";
SRDotDX.echo('Game window killed, have a nice chatting.');
return false;
});
holodeck.addDotdChatCommand("update", function(deck,text) {
var d = ""+SRDotDX.version.minor+" ";
d += 'Installed Version : '+SRDotDX.version.major+' ';
d += 'You can check ';
d += 'here (greasyfork) ';
d += ' or here (userscripts) ';
d += ' to see if your version is most current and update if needed.';
SRDotDX.echo(d);
return false;
});
holodeck.addDotdChatCommand("help", function(deck,text) {
var d = "Available chat commands: ";
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";
d += 'You can click here to navigate to script guide for detailed instructions or use /guide and /manual commands. ';
SRDotDX.echo(d);
return false;
});
holodeck.addDotdChatCommand("reload,relaod,rl,reloaf",function(deck,text){
SRDotDX.reload();
return false;
});
holodeck.addDotdChatCommand("mute",function (deck, text){
var s = String(text).split(" ");
if(s.length == 2 && s[1] != ""){
SRDotDX.config.mutedUsers[s[1]]=true;
SRDotDX.echo('User "' + s[1] + '" muted. Use the /unmute command to undo, and the /mutelist to see all muted users.');
SRDotDX.config.save(false);
}else {
SRDotDX.echo('/mute : Invalid parameters specified. The proper syntax is "/mute [username]". ');
}
return false;
});
holodeck.addDotdChatCommand("ign",function (deck, text){
var s = text.split(" ");
if(s.length == 3 && s[1] != "" && s[2] != "") {
SRDotDX.config.ignUsers[s[1]]=s[2];
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.');
SRDotDX.config.save(false);
}
else SRDotDX.echo('/ign : Invalid parameters specified. The proper syntax is "/ign [kong username] [in game name]".');
return false;
});
holodeck.addDotdChatCommand('unmute',function (deck, text) {
var s = String(text).split(' ');
if(s.length == 2 && s[1] != '') {
if(s[1] == 'all') {
for (var u in SRDotDX.config.mutedUsers) delete SRDotDX.config.mutedUsers[u];
SRDotDX.config.save(false);
SRDotDX.echo('All users unmuted.');
}
else if (SRDotDX.config.mutedUsers[s[1]]) {
delete SRDotDX.config.mutedUsers[s[1]];
SRDotDX.echo('User "' + s[1] + '" unmuted.');
SRDotDX.config.save(false);
}
else SRDotDX.echo('No muted user "' + s[1] + '" found.');
}
else SRDotDX.echo('/unmute : Invalid parameters specified. The proper syntax is "/unmute [username]". "/unmute all" can be used to unmute all muted users.');
return false;
});
holodeck.addDotdChatCommand('unign',function (deck, text) {
var s = String(text).split(' ');
if(s.length == 2 && s[1] != '') {
if(s[1] == 'all') {
for (var u in SRDotDX.config.ignUsers) delete SRDotDX.config.ignUsers[u];
SRDotDX.config.save(false);
SRDotDX.echo('All users removed from IGN list.');
}
else if (SRDotDX.config.ignUsers[s[1]]) {
delete SRDotDX.config.ignUsers[s[1]];
SRDotDX.echo('Removed ' + s[1] + '\'s IGN.');
SRDotDX.config.save(false);
}
else SRDotDX.echo('No IGN of user "' + s[1] + '" found.');
}
else SRDotDX.echo('/unign : Invalid parameters specified. The proper syntax is "/unign [username]". "/unign all" can be used to clear IGN list.');
return false;
});
holodeck.addDotdChatCommand('mutelist', function (deck, text) {
var s = 'List of users currently muted: ';
var i = 0;
for(var u in SRDotDX.config.mutedUsers) { s += u + ' '; i++ }
if (i == 0) s = 'No users currently muted. ';
s += ' Use the /mute and /unmute commands to add or remove users on this list.';
SRDotDX.echo(s);
return false;
});
holodeck.addDotdChatCommand('ignlist', function (deck, text) {
var s = 'List of known users IGN: ';
if (SRDotDX.config.ignUsers.length == 0) s = 'No users added to IGN list. ';
else for (var u in SRDotDX.config.ignUsers) s += u + ':' + SRDotDX.config.ignUsers[u] + ' ';
s += ' Use the /ign and /unign commands to add or remove users on this list.';
SRDotDX.echo(s);
return false;
});
holodeck.addDotdChatCommand('script', function(deck,text) {
SRDotDX.gui.FPXdoWork('Script links: https://greasyfork.org/scripts/406-mutik-s-dotd-script and http://userscripts.org/scripts/show/162897');
return false;
});
holodeck.addDotdChatCommand('clear',function(deck,text) {
holodeck.activeDialogue().clear();
return false
});
holodeck.addDotdChatCommand('wikil', function(deck,text) {
SRDotDX.gui.FPXdoWork('http://dotd.wikia.com/wiki/Dawn_of_the_Dragons_Wiki');
return false;
});
holodeck.addDotdChatCommand('import,imp', function(deck,text) {
if (/^(\/imp+)/i.test(text)) {
SRDotDX.echo('Importing all raids from server');
SRDotDX.request.raids();
}
else SRDotDX.echo('FAIL! ;)');
return false;
});
holodeck.addDotdChatCommand('friend', function(deck,text) {
var s = String(text).split(" ");
if(s.length == 2 && s[1] != ""){
if (typeof SRDotDX.config.friendUsers[s[1]] != 'object') {
SRDotDX.config.friendUsers[s[1]] = [false,false,false,false,true];
SRDotDX.config.save(false);
SRDotDX.gui.refreshFriends();
SRDotDX.echo('Added ' + s[1] + ' to friends');
}
}
return false;
});
holodeck.addDotdChatCommand('unfriend', function(deck,text) {
var s = String(text).split(" ");
if(s[1] == 'all') {
for (var u in SRDotDX.config.friendUsers) delete SRDotDX.config.friendUsers[u];
SRDotDX.config.save(false);
SRDotDX.gui.refreshFriends();
SRDotDX.echo('All users removed from friend list.');
}
else if (SRDotDX.config.friendUsers[s[1]]) {
delete SRDotDX.config.friendUsers[s[1]];
SRDotDX.config.save(false);
SRDotDX.gui.refreshFriends();
SRDotDX.echo('Removed ' + s[1] + ' from friends');
}
else SRDotDX.echo('User "' + s[1] + '" not found on friend list.');
return false;
});
holodeck.addDotdChatCommand('fs', function(deck,text) {
var cmd = text.split(' ');
if (cmd[0] == '/fs' && cmd[1]) {
SRDotDX.echo('Posting raid to friends');
document.getElementById('DotDX_raidsToSpam').value = cmd[1];
SRDotDX.gui.spamRaidsToFriends();
}
else SRDotDX.echo('Wrong syntax. Usage: /fs ');
return false;
});
holodeck.addDotdChatCommand('room', function(deck,text) {
var cmd = text.split(' ');
if (cmd[0] == '/room' && cmd[1]) {
SRDotDX.gui.gotoRoom(cmd[1]);
}
else SRDotDX.gui.gotoRoom(0);
return false;
});
holodeck.addDotdChatCommand('ijoin,join', function(deck,text) {
var mode = text.charAt(1) == 'j', joinStr = '';
if (mode) joinStr = text.slice(6), SRDotDX.gui.quickImportAndJoin(joinStr);
else joinStr = text.slice(7), SRDotDX.gui.quickImportAndJoin(joinStr,true);
return false;
});
holodeck.addDotdChatCommand('wiki', function(deck,text) {
var p = /^\/wiki (.*?)$/i.exec(text);
if (p) {
window.open('http://dotd.wikia.com/wiki/Special:Search?search=' + p[1]);
SRDotDX.echo('Wiki search opened.');
}
else SRDotDX.echo('/wiki : Invalid parameters specified');
return false;
});
holodeck.addDotdChatCommand('guide,manual', function(deck,text) {
window.open('https://docs.google.com/document/d/14X0WhnJrISQbxdfQv_scJbG1sUyXdE2g4iMfHmLM0E0/edit');
SRDotDX.echo('Script guide opened in new tab/window.');
return false;
});
holodeck.addDotdChatCommand('slap', function(deck,text) {
var p = /^\/slap (.*?)$/i.exec(text);
if (p) {
var num = Math.round((Math.random()*(SRDotDX.slapSentences.length-1)));
SRDotDX.gui.FPXdoWork('*' + SRDotDX.slapSentences[num].replace(//g,p[1]) + '*');
}
else SRDotDX.echo('/slap : Invalid parameters specified');
return false;
});
holodeck.addDotdChatCommand('sh', function(deck,text) {
var p = /^\/sh (.*?)$/i.exec(text);
if (p) {
var fnd1 = p[1].toLowerCase(), fnd2 = p[1].length, found = false, sho;
for (i in SRDotDX.shortcuts) {
if (SRDotDX.shortcuts.hasOwnProperty(i)) {
sho = SRDotDX.shortcuts[i];
if (sho.n.toLowerCase().indexOf(fnd1) > -1 && sho.n.length == fnd2) {
SRDotDX.echo('' + sho.bn + ' : ' + sho.desc);
found = true;
}
}
}
if (!found) SRDotDX.echo('/sh : Shortcut not found in db');
}
else SRDotDX.echo('/sh : No parameters specified');
return false;
});
holodeck.addDotdChatCommand('camp', function(deck,text) {
var name = text.split(' ');
name = typeof name[1] == "undefined" ? 'bob' : name[1].toLowerCase();
var num = SRDotDX.gui.getChatNumber();
var chatEle = document.getElementsByClassName('chat_message_window')[num];
if (chatEle.childElementCount == 0) document.getElementsByClassName('chat_message_window')[num].innerHTML = '';
var chatElem = document.getElementsByClassName('chat_message_window')[num].lastChild.lastChild;
switch(name){
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 ',true).attach('to',chatElem);
}
setTimeout(SRDotDX.gui.scrollChat,100,num);
return false;
});
holodeck.addDotdChatCommand('perc', function(deck,text) {
var bok = text.indexOf('bok',4);
var cwp = text.indexOf('cwp',4);
var empty = text.length < 6;
var output = "";
if (bok >= 0 || empty) output = "Book of Knowledge Perc. Tiers: \
1 – 3999: Brown/Grey \
4000 – 5999: Brown/Grey/Green \
6000 – 9999: Grey/Green \
10000 – 13999: Grey/Green/Blue \
14000 – 15999: Green/Blue \
16000 – 17999: Green/Blue/Purple \
18000 – 21999: Blue/Purple \
22000 – 23999: Blue/Purple/Orange \
24000 – 29999: Purple/Orange \
30000 - 32999: Orange \
33000 - 35999: Orange/Red \
36000+ : Red/Orange";
if (empty) output += " \
------------------------------------------------- ";
if (cwp >= 0 || empty) output += "Clockwork Parts Perc. Tiers: \
1-1999: 10x Perf. Clockwork Part \
2000-3999: 25x Perf. Clockwork Part \
4000-5999: 40x Perf. Clockwork Part \
6000-7999: 55x Perf. Clockwork Part \
8000-9999: 70x Perf. Clockwork Part \
10000-11999: 85x Perf. Clockwork Part \
12000-13999: 100x Perf. Clockwork Part \
14000-15999: 115x Perf. Clockwork Part \
16000-17999: 130x Perf. Clockwork Part \
18000-19999: 145x Perf. Clockwork Part \
20000-21999: 160x Perf. Clockwork Part \
22000-23999: 175x Perf. Clockwork Part \
24000-25999: 190x Perf. Clockwork Part \
26000-27999: 205x Perf. Clockwork Part \
28000-29999: 220x Perf. Clockwork Part \
30000-31999: 235x Perf. Clockwork Part \
32000-33999: ???x Perf. Clockwork Part \
34000-35999: ???x Perf. Clockwork Part \
36000+ : 260x Perf. Clockwork Part";
SRDotDX.echo(output);
return false;
});
holodeck.addDotdChatCommand('citadel', function(deck,text) {
SRDotDX.echo("Barrack Book = Grune N Quest \
Barrack Scroll 1 = Hydra NM Raid \
Barrack Scroll 2 = Research Library book \
Barrack Scroll 3 \
Armorsmith Book = Lurking Horror N Quest \
Armorsmith Scroll 1 = Nalagarst NM Raid \
Armorsmith Scroll 2 = Research Library 1 \
Armorsmith Scroll 3 \
Weaponsmith Book = Erebus N Quest \
Weaponsmith Scroll 1 = Baroness NM Raid \
Weaponsmith Scroll 2 = Research Library 1 \
Weaponsmith Scroll 3 \
Alchemist Book = Nalagarst N Quest \
Alchemist Scroll 1 = Kalaxia N Quest \
Alchemist Scroll 2 = Research Library 5 \
Alchemist Scroll 3 \
Research Book = Bellarius N Quest \
Research Library Scroll 1 = Mardachus NM Raid \
Research Library Scroll 2 = Valanazes NM Raid \
Research Library Scroll 3 = Teremarthu NM Raid \
Research Library Scroll 4 \
Research Library Scroll 5 \
Pet Emporium Book = Not Available \
Pet Emporium 1 = Research Library 4 \
Stable Book = Valanazes N Quest \
Stable Scroll 1 = Frog-men Assassins NM Raid \
Stable Scroll 2 = Research Library 2 \
Stable Scroll 3 \
Training Ground Book = Teremarthu N Quest \
Training Ground Scroll 1 = Research Library 3 \
Training Ground Scroll 2");
return false;
});
holodeck.addDotdChatCommand('raid', function(deck,text) {
var p = /^\/raid (.*?)(?: ([1-6]))?$/i.exec(text);
if (p) {
var msg = '', n, i;
var diff = !isNaN(p[2]) ? p[2] - 1 : -1;
var fnd = p[1].toLowerCase();
for (i in SRDotDX.raids) {
if (SRDotDX.raids.hasOwnProperty(i)) {
var raid = SRDotDX.raids[i];
if (raid.name.toLowerCase().indexOf(fnd) > -1) {
msg += '' + raid.name + ' ';
msg += ' ' + (raid.type == '' ? '' : raid.type + ' ') + SRDotDX.raidSizes[raid.size].name + ' Raid (' + (raid.size == 101 ? 100 : raid.size) + ' slots) | ' + raid.duration + 'h';
msg += '';
switch (diff) {
case 0: msg += ' '; break;
case 1: msg += ' '; break;
case 2: msg += ' '; break;
case 3: msg += ' '; break;
default: msg += ' '; break;
}
var size = raid.size < 20 ? 10 : raid.size, fs = [], j = 4;
while(j--) fs[j] = raid.health[j]/(size == 101 ? 100 : size);
msg += ' \
Normal Hard Legend NMare \
\
\
HP ' + SRDotDX.util.getShortNum(raid.health[0]) + ' ' + SRDotDX.util.getShortNum(raid.health[1]) + ' ' + SRDotDX.util.getShortNum(raid.health[2]) + ' ' + SRDotDX.util.getShortNum(raid.health[3]) + ' \
FS ' + SRDotDX.util.getShortNum(fs[0]) + ' ' + SRDotDX.util.getShortNum(fs[1]) + ' ' + SRDotDX.util.getShortNum(fs[2]) + ' ' + SRDotDX.util.getShortNum(fs[3]) + ' \
AP — — — ' + SRDotDX.util.getShortNum(fs[3]/2.0) + ' ';
if (typeof raid.lt != 'object' && raid.id != 'rhalmarius_the_despoiler' && raid.id != 'grundus') {
var ratio = SRDotDX.raidSizes[size].ratios;
var ename = SRDotDX.raidSizes[size].enames;
for(j=0; j<6; j++) {
if (ratio[j] > 0) msg += ''+ename[j]+' '+SRDotDX.util.getShortNum(fs[0]*ratio[j])+' '+SRDotDX.util.getShortNum(fs[1]*ratio[j])+' '+SRDotDX.util.getShortNum(fs[2]*ratio[j])+' '+SRDotDX.util.getShortNum(fs[3]*ratio[j])+' ';
}
}
else if(typeof raid.lt == 'object') {
var elen = SRDotDX.lootTiers[raid.lt[0]].tiers;
var eleh = SRDotDX.lootTiers[raid.lt[1]].tiers;
var elel = SRDotDX.lootTiers[raid.lt[2]].tiers;
var elenm= SRDotDX.lootTiers[raid.lt[3]].tiers;
var epics = SRDotDX.lootTiers[raid.lt[0]].epics;
var best = SRDotDX.lootTiers[raid.lt[0]].best;
for(j=0; j'+epics[j]+'E '+elen[j]+' '+eleh[j]+' '+elel[j]+' '+elenm[j]+' ';
}
}
msg += '
'
}
}
}
if (msg != '') {
SRDotDX.echo('*loading....*');
setTimeout( function(){
var chats = document.getElementsByClassName('chat_message_window');
for (i=1; i 0) {
var ele = elem[elem.length-1];
ele.innerHTML = ele.innerHTML.slice(0,-13) + msg;
chats[i].scrollTop = chats[i].scrollHeight;
break;
}
}
}, 100);
}
else SRDotDX.echo('No raids found matching: ' + p[1]);
}
else SRDotDX.echo('/raid : Invalid parameters specified (help )');
return false;
});
window.onbeforeunload = function() { SRDotDX.config.save(false) };
SRDotDX.fails = 0;
console.log('[DotDX] Core loaded. Loading user interface...');
SRDotDX.gui.load();
SRDotDX.request.init();
setTimeout(function() { delete SRDotDX.load }, 100);
}
else if (++SRDotDX.fails < 20) {
console.log('[DotDX] Missing needed Kong resources (try:' + SRDotDX.fails + '), retrying in 0.75 second...');
setTimeout( SRDotDX.load, 750);
}
else {
console.log('[DotDX] Unable to locate required Kong resources. Loading aborted');
setTimeout(function() { delete SRDotDX }, 1);
}
}
};
console.log('[DotDX] Initialized. Checking for needed Kong resources ...');
SRDotDX.load();
}
if (window.top == window.self && (/^http:\/\/www\.kongregate\.com\/games\/5thplanetgames\/dawn-of-the-dragons(?:\/?$|\?|#)/i.test(document.location.href))) { //main
console.log('[DotDX] Initializing ...');
document.addEventListener("dotd.req", function(param) {
var p = JSON.parse(param.data);
p.callback = function (e, r) {
this.onload = null;
this.onerror = null;
this.ontimeout = null;
this.event = e;
this.status = r.status;
this.responseText = r.responseText;
//console.log('[DotDX] Callback: ' + JSON.stringify(this));
var c = document.createEvent("MessageEvent");
if (c.initMessageEvent) c.initMessageEvent(this.eventName, false, false, JSON.stringify(this), document.location.protocol + "//" + document.location.hostname, 1, unsafeWindow, null);
else c = new MessageEvent(this.eventName, {"origin": document.location.protocol + "//" + document.location.hostname, "lastEventId": 1, "source": unsafeWindow, "data": JSON.stringify(this)});
document.dispatchEvent(c);
};
p.onload = p.callback.bind(p, "load");
p.onerror = p.callback.bind(p, "error");
p.ontimeout = p.callback.bind(p, "timeout");
//setTimeout(function(){ GM_xmlhttpRequest(p) }, 0);
GM_xmlhttpRequest(p);
});
var scr = document.createElement('script');
scr.appendChild(document.createTextNode('(' + main + ')()'));
(document.head || document.body || document.documentElement).appendChild(scr);
}