Удаление устаревшего неиспользуемого материала и кода.
This commit is contained in:
@@ -1 +0,0 @@
|
||||
(function(){function m(){var b={id:341269,t:50,j:true,js:13,rand:Math.random(),r:escape(f.referrer)},a;if(a=screen){b.s=[a.width,a.height].join("*");b.d=a.colorDepth||a.pixelDepth}a=[];for(var c in b)a.push(c+"="+b[c]);c=f.createElement("div");var e=f.createElement("a");e.setAttribute("target","_blank");e.setAttribute("href","http://top.mail.ru/jump?from="+b.id);b=f.createElement("img");b.setAttribute("src","http://top.list.ru/counter?"+a.join(";"));b.setAttribute("title","Рейтинг@Mail.ru");b.setAttribute("border",0);b.setAttribute("height",31);b.setAttribute("width",88);e.appendChild(b);c.appendChild(e);return c}function n(b){b=b+108E5;var a=new Date(b),c=a.getUTCMonth();if(c>2&&c<9)return b+36E5;if(c<2||c>9)return b;var e=a.getUTCDate();c=c===2;if(e<=24)return c?b:b+36E5;var d=a.getUTCDay();if(d===0)return a.getUTCHours()>=2?c?b+36E5:b:c?b:b+36E5;return e-d<=24?c?b:b+36E5:c?b+36E5:b}function o(b){b=new Date(b);var a=b.getUTCMonth()+1;if(a<10)a="0"+a;var c=b.getUTCDate();if(c<10)c="0"+c;var e=b.getUTCHours();if(e<10)e="0"+e;var d=b.getUTCMinutes();if(d<10)d="0"+d;return b.getUTCFullYear()+"."+a+"."+c+"В "+e+":"+d}function p(b){var a=q.ru,c=f.createElement("div"),e,d;(e=c.style).display="inline-block";e.whiteSpace="pre";if(e=b.align){var h;d=f.createElement("a");d.target="_blank";d.href="http://capitalcity.combats.com/encicl/"+((h=parseInt(e))===50?"alchemist":"alignment")+".html";if(a=parseFloat(e)===7?a["7="]:a[h])d.title=a;a=f.createElement("img");a.src="http://img.combats.ru/i/align"+e+".gif";a.width=12;a.height=15;a.border=0;d.appendChild(a);c.appendChild(d)}if(b.hasOwnProperty("clan")){e=b.clan;d=f.createElement("a");d.target="_blank";d.href="/clans_inf.pl?"+e;d.title="Рнформация Рѕ клане "+e;a=f.createElement("img");a.src="http://img.combats.ru/i/klan/"+e+".gif";a.width=24;a.height=15;a.border=0;d.appendChild(a);c.appendChild(d)}d=f.createElement("b");d.appendChild(f.createTextNode(e=b.login));c.appendChild(d);c.appendChild(f.createTextNode("В ["+b.level+"]"));d=f.createElement("a");d.target="_blank";d.href="/inf.pl?"+b.id;d.title="Рнформация Рѕ "+e;a=f.createElement("img");a.src="http://img.combats.ru/i/inf.gif";a.width=12;a.height=11;a.border=0;d.appendChild(a);c.appendChild(d);return c}function r(b,a,c){a=a;i||(i=j());g||(g=new i);switch(b){case "get":case "GET":if(c!=undefined)a+=c;g.open("GET",a,false);g.send();break;case "post":case "POST":g.open("POST",a,false);g.send(c);break}if((b=g.status)!==200)return parseInt(b,10);else{var e;try{var d=g.responseText;e=d.substring(0,2)==="//"?k(d.substring(2)):d=="undefined"?void 0:k(d)}catch(h){e=500}return e}}var f=document,l=window,q={ru:{"1":"Белое братство","2":"Хаос","3":"Темное братство","7=":"Нейтральное братство","7":"Орден Очищения Стихий","50":"Алхимики"}},k=typeof JSON==="object"&&JSON.parse?JSON.parse:function(b){return eval("("+b+")")},i,g,j=function(){j=undefined;var b;if(b=l.XMLHttpRequest)return b;if(b=l.ActiveXObject){var a;try{a=new b("MSxml2.XMLHTTP.6.0")}catch(c){}if(a){a=null;return function(){return new b("MSxml2.XMLHTTP.6.0")}}try{a=new b("MSxml2.XMLHTTP.3.0")}catch(e){}if(a){a=null;return function(){return new b("MSxml2.XMLHTTP.3.0")}}try{a=new b("MSxml2.XMLHTTP")}catch(d){}if(a){a=null;return function(){return new b("MSxml2.XMLHTTP")}}try{a=new b("Microsoft.XMLHTTP")}catch(h){}if(a){a=null;return function(){return new b("Microsoft.XMLHTTP")}}}};(function(b){var a=b.CombatsUI;a||(b.CombatsUI=a={});a.CounterMailRu=m;a.UTCMsec2Moscow=n;a.UTCMsec2PlainText=o;a.UserLink=p;a.SyncJSON=r;this.DLoad&&(new this.DLoad.pkg("CombatsUI")).use("LocalText").complete()})(this)})()
|
||||
@@ -1 +0,0 @@
|
||||
(function(){function n(b,a,e){e||(e=r);var d={};b=[b];for(var f,j={},h;h=b.length;){f=s;for(var c=0;c<h;c++){var g=b[c];if(!(!g||j[g])){var i=e[g];if(i)f=f.concat(i);if(i=a[g])for(var k in i)!i.hasOwnProperty(k)||d.hasOwnProperty(k)||(d[k]=i[k]);j[g]=true}}b=f}return d}function o(b,a){if(b=="ru"){a=t(a)%100;return a%10===1&&a%100!==11?1:a%10>=2&&a%10<=4&&(a%100<10||a%100>=20)?2:0}else return b=="en"?a==1||a==-1?1:0:0}function u(b,a,e){var d=a[e+"G"];if(d)return d;a=a[e];if(b=="ru")if(v.test(a))return"F";else if(w.test(a))return"P";return"M"}function x(b,a,e,d){var f,j=e&&e;f=p[b]||(p[b]=n(b,y));if(a<=0)return"0 "+(d&&f["second0"+d]||f.second0);var h,c;l.length=0;for(var g=z;g-=2;){c=m[g];if(a>=c){if(c===1)h=a;else a-=(h=A(a/c))*c;c=m[g+1]+o(b,h);l.push(h+" "+(d&&f[c+d]||f[c]));if(e&&!--j)break}}return l.join(" ")}function q(b){var a=b.LocalText;a||(b.LocalText=a={});a.Inherit=n;a.PluralForm=o;a.Gender=u;a.PeriodToText=x;a.ExportTo=q}var r={ja:["en","zh"],en:["ru"]},s=[],l=[],t=Math.abs,A=Math.floor,v=/[ая]$/i,w=/[иы]$/i,y={ru:{year0:"лет",year1:"год",year2:"года",month0:"месяцев",month1:"месяц",month2:"месяца",week0:"недель",week1:"неделя",week1ACC:"неделю",week2:"недели",day0:"дней",day1:"день",day2:"дня",hour0:"часов",hour1:"час",hour2:"часа",minute0:"минут",minute1:"минута",minute1ACC:"минуту",minute2:"минуты",second0:"секунд",second1:"секунда",second1ACC:"секунду",second2:"секунды"},en:{year0:"years",year1:"year",month0:"months",month1:"month",week0:"weeks",week1:"week",day0:"days",day1:"day",hour0:"hours",hour1:"hour",minute0:"minutes",minute1:"minute",second0:"seconds",second1:"second"}},m=[0,0,1,"second",60,"minute",3600,"hour",86400,"day",604800,"week",2592E3,"month",31536E3,"year"],z=m.length,p={};q(this);typeof DLoad==="object"&&(new DLoad.pkg("LocalText")).complete()})()
|
||||
@@ -1 +0,0 @@
|
||||
(function(){function v(a){if(!a._e_version)for(func in j)a[func]=j[func];return a}function w(a){this.o=this.original=a}function q(a,b){w.prototype[b]=function(c,d,i){if(typeof i==="undefined"){if(this[a+"|"+c]===d)return this;this[a+"|"+c]=d;this.original[a](c,d)}else{var f=[];for(g=len=arguments.length;g-- >1;){var l=arguments[g],h=arguments[--g];if(this[a+"|"+h]!==d){this[a+"|"+h]=d;f.push(h,l)}}f.length&&this.original[a].apply(this.original,f)}return this}}function u(a,b){w.prototype[b]=function(c){if(this[a]===c)return this;this[a]=c;this.original[a](c);return this}}function y(a){this.o=this.original=a}function s(a,b,c,d,i,f){var l;try{var h="";if(c||c==0)h=' name="'+c+'"';var z="";if(b)z=' type="'+b+'"';l=n.createElement("<input"+h+z+"/>")}catch(A){l=n.createElement("input")}l.name=c;l.type=b;b=v(l);if(i&&(d||d==0))b.sp(i,d);a&&a.AppendChild(b);if(f)if(typeof f==="object")b.sp(f);else return b;return a}function p(a,b,c){var d=b.length,i;for(i=0;i<d;i++){var f=b[i];if(typeof f==="object"){var l;for(l in f){var h=f[l];if(c)a[c](l,h);else a[l]=h;h&&h.addRewritable&&h.addRewritable(a,c,l,h.addRewritableKey)}}else{h=b[i+1];if(c)a[c](f,h);else a[f]=h;i++;h&&h.addRewritable&&h.addRewritable(a,c,f,h.addRewritableKey)}}}var x=window;if(x._e)return true;var n=document,r,o=true;if(typeof Element!="undefined")r=Element;else o=false;if(o)try{r.prototype._e_version="2"}catch(B){o=false}var j={_e_version:"2",AppendText:function(a,b,c){var d=n.createTextNode(a);a.hasOwnProperty("addRewritable")&&a.addRewritable(d,"","data",a.addRewritableKey);this.appendChild(d);if(b){if(typeof c==="undefined")return d;b[c]=new y(d)}return this},AppendChild:function(a){this.appendChild(a);return this},SetProperties:function(){p(this,arguments);return this},SetStyle:function(){p(this.style,arguments);return this},SetAttributes:function(){p(this,arguments,"setAttribute");return this},SetClass:function(a){this.SetProperties("className",a);return this},Title:function(a){a=["title",a];p(this,a,"setAttribute");p(this,a);return this},AppendElement:function(a,b){this.appendChild(t(a,b));return this},AppendElementNext:function(a,b){var c=t(a,b);this.appendChild(c);return c},CacheSetter:function(a,b){a[b]=new w(this);return this},checkbox:function(a,b,c,d){a=s(this,"checkbox",a,c,"defaultChecked",1);a.value=b;return d?a:this},submit:function(a,b,c){return s(this,"submit",a,b,"value",c)},button:function(a,b){return s(this,"button",null,a,"value",b)},hidden:function(a,b,c){return s(this,"hidden",a,b,"value",c)},input:function(a,b,c){return s(this,"text",a,b,"value",c)},td:o?function(){return this.insertCell(-1)}:function(){return v(this.insertCell(-1))},tr:o?function(){return this.insertRow(-1)}:function(){return v(this.insertRow(-1))}},m={AppendText:["at"],AppendChild:["ac"],SetProperties:["sp"],SetStyle:["st","ss"],SetAttributes:["sa"],SetClass:["sc"],AppendElement:["e"],AppendElementNext:["ex"],AddEvent:["ev"],Title:["tt"],CacheSetter:["c"]};(function(a,b){if(o){var c=function(){var d=b();r.prototype[a]=d;return d.apply(this,arguments)};r.prototype[a]=c;j[a]=c}else j[a]=function(){var d=arguments.callee.real;if(!d){d=b();arguments.callee.real=d}if(!arguments.callee.install){j[a]=d;for(var i=m[a].length;i--;)j[m[a][i]]=d;arguments.callee.install=1}this[a]=d;return d.apply(this,arguments)}})("AddEvent",function(){return this.addEventListener?function(a,b){this.addEventListener(a,b,false);return this}:this.attachEvent?function(a,b){this.attachEvent("on"+a,b);return this}:function(){return this}});var e;for(e in m)for(var g=m[e].length;g--;)j[m[e][g]]=j[e];if(o)for(e in j)r.prototype[e]=j[e];e="SetStyle";q(e,e);var k=m[e];for(g=k.length;g--;)q(e,k[g]);e="SetProperties";q(e,e);k=m[e];for(g=k.length;g--;)q(e,k[g]);e="SetAttributes";q(e,e);k=m[e];for(g=k.length;g--;)q(e,k[g]);e="SetClass";u(e,e);k=m[e];for(g=k.length;g--;)u(e,k[g]);e="Title";u(e,e);k=m[e];for(g=k.length;g--;)u(e,k[g]);var t=o?function(a,b){a=n.createElement(a);if(b)typeof b==="object"?a.SetAttributes(b):p(a,["className",b]);return a}:function(a,b){a=n.createElement(a);var c;for(c in j)a[c]=j[c];if(b)typeof b==="object"?a.SetAttributes(b):p(a,["className",b]);return a};y.prototype.data=function(a){if(this.d===a)return this;this.d=a;a.hasOwnProperty("addRewritable")&&a.addRewritable(tnode,"","data",a.addRewritableKey);this.original.data=a;return this};x._e=t;t.add=o?function(a,b){r.prototype[a]=b;j[a]=b}:function(a,b){j[a]=b};t.post=function(){var a=n.createElement("form");a.method="POST";a.style.display="none";var b=arguments.length,c;for(c=0;c<b;c++){var d=arguments[c];if(typeof d==="object"){var i;for(i in d){var f=n.createElement("input");f.name=i;f.value=d[i];a.appendChild(f)}}else{f=n.createElement("input");f.name=d;f.value=arguments[c+1];a.appendChild(f);c++}}n.body.appendChild(a);a.submit()};typeof x.DLoad==="object"&&(new DLoad.pkg("_e")).complete()})()
|
||||
-166
@@ -1,166 +0,0 @@
|
||||
var _e
|
||||
;(function(){ // Global closure START
|
||||
if(_e){ return }
|
||||
|
||||
// Helpers
|
||||
// Create 'input' reliably with correct call or broken IE<8 call.
|
||||
// Pre-8 IE:
|
||||
// 1) Doesn't allow to set name on dynamicaly created element.
|
||||
// 2) Doesn't allow to set type after element is appended to tree.
|
||||
function input(type, name){
|
||||
var ielem
|
||||
try{ // Old IE way
|
||||
var namea=''; if(name || name==0){ namea=' name="'+name+'"' }
|
||||
var typea=''; if(type){ typea=' type="'+type+'"' }
|
||||
ielem=document.createElement('<input'+namea+typea+'/>')
|
||||
}
|
||||
catch(err){ ielem=document.createElement('input') } // Correct way
|
||||
ielem.name=name; ielem.type=type // Correct way + double it just in case IE way works for some weird reason
|
||||
return _e(ielem)
|
||||
}
|
||||
|
||||
function input_return(where, type, name, value, prop, return_new){
|
||||
var ielem=input(type, name)
|
||||
if(prop && (value || value==0)){ ielem.sp(prop, value) }
|
||||
if(where){ where.AppendChild(ielem) } // IE doesn't allows to change input type after append.
|
||||
if(return_new){
|
||||
if(typeof(return_new)=='object'){ ielem.sp(return_new) } else { return ielem }
|
||||
}
|
||||
return where
|
||||
}
|
||||
|
||||
// Copies properties from arguments to target object. Arguments can be any of
|
||||
// complete objects - every property will be copied from it or pair
|
||||
// of key+value strings. You can also mix them.
|
||||
function set_properties(target, args, method){
|
||||
var len=args.length
|
||||
for(var idx=0; idx<len; idx++){
|
||||
var arg=args[idx]
|
||||
if(typeof arg=='object'){
|
||||
for(var prop in arg){
|
||||
var value=arg[prop]
|
||||
if(method){ target[method](prop, value) } else { target[prop]=value }
|
||||
if(value && value.addRewritable){ value.addRewritable(target, method, prop, value.addRewritableKey) }
|
||||
}
|
||||
} else {
|
||||
var value=args[idx+1]
|
||||
if(method){ target[method](arg, value) } else { target[arg]=value }
|
||||
idx++
|
||||
if(value && value.addRewritable){ value.addRewritable(target, method, arg, value.addRewritableKey) }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var _e_prototype={
|
||||
'__is_e':function(){ return true },
|
||||
'AppendText':function(text, args){
|
||||
if(text===''){ return this }
|
||||
if(typeof(args)!='object'){
|
||||
var tnode=document.createTextNode(text)
|
||||
if(text && text.addRewritable){ text.addRewritable(tnode, '', 'data', text.addRewritableKey) }
|
||||
this.appendChild(tnode)
|
||||
return this
|
||||
}
|
||||
if(args.br){
|
||||
var parts=text.split('\n')
|
||||
for(var idx=0; idx<parts.length-1; idx++){
|
||||
this.appendChild(document.createTextNode(parts[idx]))
|
||||
this.appendChild(document.createElement('br'))
|
||||
}
|
||||
// *** FIX ***: this must be adjusted to work with rewriter!
|
||||
this.appendChild(document.createTextNode(parts[parts.length-1]))
|
||||
} else {
|
||||
this.appendChild(document.createTextNode(text))
|
||||
}
|
||||
return this
|
||||
},
|
||||
'AppendChild':function(child){ this.appendChild(child); return this },
|
||||
'SetProperties':function(){ set_properties(this, arguments); return this },
|
||||
'SetStyle':function(){ set_properties(this.style, arguments); return this },
|
||||
'SetAttributes':function(){ set_properties(this, arguments, 'setAttribute'); return this },
|
||||
'SetClass':function(className){ this.SetProperties('className', className); return this; },
|
||||
'AppendElement':function(element_name, attrs){ this.AppendChild(_e(element_name, attrs)); return this },
|
||||
'Title':function(title){ var prop=['title', title]; set_properties(this, prop, 'setAttribute'); set_properties(this, prop); return this },
|
||||
// Returns newly created element instead of "this".
|
||||
'AppendElementNext':function(element_name, attrs){ var ne=_e(element_name, attrs); this.AppendChild(ne); return ne },
|
||||
'AddEvent':function(event, func){ if (this.addEventListener){ this.addEventListener(event, func, false) } else if (this.attachEvent){ this.attachEvent('on'+event, func) } return this },
|
||||
// Pre-cooked elements
|
||||
'checkbox':function(name, value, checked, return_new){ var ch=input_return(this, 'checkbox', name, checked, 'defaultChecked', 1); ch.value=value; if(return_new){ return ch } else { return this } },
|
||||
'submit':function(name, value, return_new){ return input_return(this, 'submit', name, value, 'value', return_new) },
|
||||
'button':function(value, return_new){ return input_return(this, 'button', null, value, 'value', return_new) },
|
||||
'hidden':function(name, value, return_new){ return input_return(this, 'hidden', name, value, 'value', return_new) },
|
||||
'input':function(name, value, return_new){ return input_return(this, 'text', name, value, 'value', return_new) },
|
||||
// Table-cell. *** Not chained - returns new element! ***
|
||||
'td':function(){ return _e(this.insertCell(-1)) },
|
||||
// Table-row. *** Not chained - returns new element! ***
|
||||
'tr':function(){ return _e(this.insertRow(-1)) }
|
||||
}
|
||||
|
||||
// Aliases
|
||||
var aliases={
|
||||
'AppendText':['at'],
|
||||
'AppendChild':['ac'],
|
||||
'SetProperties':['sp'],
|
||||
'SetStyle':['st', 'ss'],
|
||||
'SetAttributes':['sa'],
|
||||
'SetClass':['sc'],
|
||||
'AppendElement':['e'],
|
||||
'AppendElementNext':['ex'],
|
||||
'AddEvent':['ev'],
|
||||
'Title':['tt']
|
||||
}
|
||||
|
||||
for(var orig in aliases){ var idx=aliases[orig].length; while(idx--){ _e_prototype[aliases[orig][idx]]=_e_prototype[orig] } }
|
||||
|
||||
_e=function(element_name, attrs){
|
||||
var element=typeof(element_name)=='string'?document.createElement(element_name):element_name
|
||||
if(!element.__is_e){ for(func in _e_prototype){ element[func]=_e_prototype[func] } }
|
||||
if(attrs){
|
||||
if(typeof(attrs)=='object'){ element.SetAttributes(attrs) }
|
||||
else { element.SetProperties('className', attrs) }
|
||||
}
|
||||
return element
|
||||
}
|
||||
|
||||
// Global _e object level methods
|
||||
|
||||
_e.add=function(name, func){ _e_prototype[name]=func }
|
||||
|
||||
_e.post=function(){
|
||||
var form=document.createElement('form')
|
||||
form.method='POST'
|
||||
form.style.display='none'
|
||||
var len=arguments.length
|
||||
for(var idx=0; idx<len; idx++){
|
||||
var arg=arguments[idx]
|
||||
if(typeof arg=='object'){
|
||||
for(prop in arg){
|
||||
var input=document.createElement('input')
|
||||
input.name=prop
|
||||
input.value=arg[prop]
|
||||
form.appendChild(input)
|
||||
}
|
||||
} else {
|
||||
var input=document.createElement('input')
|
||||
input.name=arg
|
||||
input.value=arguments[idx+1]
|
||||
form.appendChild(input)
|
||||
idx++
|
||||
}
|
||||
}
|
||||
document.body.appendChild(form)
|
||||
form.submit()
|
||||
}
|
||||
|
||||
var head=document.getElementsByTagName('head')[0]
|
||||
var haveCSS={}
|
||||
_e.css=function(src, encoding){
|
||||
if(haveCSS[src]){ return }
|
||||
var css=_e('link')
|
||||
css.sa('rel', 'stylesheet', 'type', 'text/css', 'href', src)
|
||||
if(encoding){ css.sa('charset', encoding) }
|
||||
head.appendChild(css)
|
||||
haveCSS[src]=true
|
||||
}
|
||||
|
||||
})() // Global closure END
|
||||
@@ -1,31 +0,0 @@
|
||||
function FindFrameDocument(a,b){if(a=a.document)if(a=a.getElementById(b))if(a=a.contentWindow||a.contentDocument)return a.document||a}var fw=[];
|
||||
var rnd=Math.random(),
|
||||
redHP=0.33,
|
||||
yellowHP=0.66,
|
||||
TimerOn=-1,
|
||||
tkHP,maxHP,
|
||||
speed=100,
|
||||
mspeed=100,
|
||||
chat_version=-1;
|
||||
function setHP(a,b,c){
|
||||
tkHP=a;maxHP=b;vrem=c;
|
||||
if(TimerOn>=0){clearTimeout(TimerOn);TimerOn=-1}
|
||||
setHPlocal()}
|
||||
function setHPlocal(){
|
||||
if(tkHP>maxHP){tkHP=maxHP;TimerOn=-1
|
||||
}else TimerOn=0;
|
||||
var a=Math.round(120/maxHP*tkHP),
|
||||
b=120-a,
|
||||
c=FindFrameDocument(top,main_uid);
|
||||
if(c){var d=c.getElementById("HP");
|
||||
if(d){var e=c.getElementById("HP1");
|
||||
c=c.getElementById("HP2");
|
||||
e.width=a;
|
||||
c.width=b;
|
||||
c.style.display=b?"":"none";
|
||||
e.src=tkHP/maxHP<redHP?"i/1red.gif":tkHP/maxHP<yellowHP?"i/1yellow.gif":"i/1green.gif";
|
||||
d.innerHTML=Math.round(tkHP)+"/"+maxHP}}
|
||||
if(vrem>0){tkHP+=maxHP/(vrem*60);}
|
||||
if(TimerOn!=-1)TimerOn=setTimeout(setHPlocal,delay*100)
|
||||
}
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
document.onmousedown = Down;
|
||||
function Down() {top.CtrlPress = window.event.ctrlKey}
|
||||
|
||||
// Разрешенные смайлики
|
||||
var sm = new Array("horse",60,40, "hug",48,20, "laugh",15,15, "susel",70,34 , "fingal",22,15, "eek",15,15, "flowers",28,29, "smoke",20,20, "hi",31,28, "bye",15,15,
|
||||
"king",21,22, "king2",28,24, "boks2",28,21, "boks",62,28, "gent",15,21, "lady",15,19, "tongue",15,15, "smil",16,16, "rotate",15,15,
|
||||
"ponder",21,15, "bow",15,21, "smile",18,18, "angel",42,43, "angel2",26,25, "hello",25,27, "dont",26,26, "idea",26,27, "mol",27,22, "super",26,28,
|
||||
"beer",15,15, "drink",19,17, "baby",15,18, "tongue2",15,15, "sword",49,18, "agree",37,15,
|
||||
"loveya",27,15, "kiss",15,15, "kiss2",15,15, "kiss3",15,15, "kiss4",37,15, "rose",15,15, "love",27,28,
|
||||
"love2", 55,24, "inv",80,20,
|
||||
"confused",15,22, "yes",15,15, "no",15,15, "shuffle",15,20, "nono",22,19, "maniac",70,25, "privet",27,29, "ok",22,16, "ninja",15,15,
|
||||
"pif",46,26, "smash",30,26, "alien",13,15, "pirate",23,19, "gun",40,18, "trup",20,20,
|
||||
"mdr",56,15, "sneeze",15,20, "mad",15,15, "friday",57,28, "cry",16,16, "grust",15,15, "rupor",38,18,
|
||||
"fie",15,15, "nnn",82,16, "row",36,15, "red",15,15, "lick",15,15,
|
||||
"help",23,15, "wink",15,15, "jeer",26,16, "tease",33,19, "str", 35, 25, "kruger",34,27, "girl",37,26, "Knight1",69,37, "rev",40,25, "smile100",44,39, "smile118",25,25,
|
||||
"smile149", 54,37, "smile166",46,29, "smile237",35,35, "smile245",50,30, "smile28",33,34, "smile289",46,31, "smile314",36,29, "smile36",50,46, "smile39",46,48,
|
||||
"smile44",27,26, "smile70",50,32
|
||||
);
|
||||
|
||||
function AddLogin()
|
||||
{ var o = window.event.srcElement;
|
||||
if (o.tagName == "SPAN") {
|
||||
var login=o.innerText;
|
||||
if (o.alt != null && o.alt.length>0) login=o.alt;
|
||||
var i1,i2;
|
||||
if ((i1 = login.indexOf('['))>=0 && (i2 = login.indexOf(']'))>0) login=login.substring(i1+1, i2);
|
||||
if (o.className.substr(0,1) == "p") { top.AddToPrivate(login, false) }
|
||||
else if (o.className == "s") {top.AddToSms(login, false) }
|
||||
else { top.AddTo(login) }
|
||||
}
|
||||
}
|
||||
|
||||
function ClipBoard(text)
|
||||
{
|
||||
//var holdtext.innerText = text;
|
||||
var Copied = text;//holdtext.createTextRange();
|
||||
Copied.execCommand("RemoveFormat");
|
||||
Copied.execCommand("Copy");
|
||||
}
|
||||
|
||||
function OpenMenu(th) {
|
||||
var el, x, y, login, login2;
|
||||
el = document.all("oMenu");
|
||||
var o = window.event.srcElement;
|
||||
if (o.tagName != "SPAN") return true;
|
||||
x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft - 3;
|
||||
y = window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop;
|
||||
|
||||
if (window.event.clientY + 72 > document.body.clientHeight) { y-=68 } else { y-=2 }
|
||||
login = o.innerText;
|
||||
if (o.alt != null && o.alt.length>0) login = o.alt;
|
||||
window.event.returnValue=false;
|
||||
var i1, i2;
|
||||
if ((i1 = login.indexOf('['))>=0 && (i2 = login.indexOf(']'))>0) login=login.substring(i1+1, i2);
|
||||
var login2 = login;
|
||||
login2 = login2.replace('%', '%25');
|
||||
while (login2.indexOf('+')>=0) login2 = login2.replace('+', '%2B');
|
||||
while (login2.indexOf('#')>=0) login2 = login2.replace('#', '%23');
|
||||
while (login2.indexOf('?')>=0) login2 = login2.replace('?', '%3F');
|
||||
|
||||
el.innerHTML = '<A class=menuItem HREF="javascript:top.AddTo(\''+login+'\');cMenu()">TO</A>'+
|
||||
'<A class=menuItem HREF="javascript:top.AddToPrivate(\''+login+'\');cMenu()">PRIVATE</A>'+
|
||||
'<A class=menuItem HREF="" target=_blank onclick="OpenInfo(\''+login2+'\');return false;">INFO</A>'+
|
||||
'<A class=menuItem HREF="javascript:ClipBoard(\''+login+'\');cMenu()">COPY</A>';
|
||||
|
||||
el.style.left = x + "px";
|
||||
el.style.top = y + "px";
|
||||
el.style.visibility = "visible";
|
||||
}
|
||||
|
||||
function OpenInfo(login) {
|
||||
var lar = login.split(/,/g);
|
||||
for (i=0;i<lar.length;i++) {
|
||||
if (lar[i].match(/^(k|c)lan$/i)) {
|
||||
window.open('http://capitalcity.combats.com/encicl/clans.html');
|
||||
} else {
|
||||
window.open('/inf.pl?login='+top.trim(lar[i]));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function cMenu() {
|
||||
document.all("oMenu").style.visibility = "hidden";
|
||||
document.all("oMenu").style.top="0px";
|
||||
top.frames['bottom'].window.document.F1.text.focus();
|
||||
}
|
||||
|
||||
function closeMenu(event) {
|
||||
if (window.event && window.event.toElement) {
|
||||
var cls = window.event.toElement.className;
|
||||
if (cls=='menuItem' || cls=='menu') return;
|
||||
}
|
||||
document.all("oMenu").style.visibility = "hidden";
|
||||
document.all("oMenu").style.top="0px";
|
||||
return false;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
function getalign(al)
|
||||
{
|
||||
al+="";
|
||||
if (al.substring(0,1)=="3") return("Темное братство");
|
||||
if (al.substring(0,1)=="2") return("Хаос");
|
||||
if (al.substring(0,1)=="1") return("Белое братство");
|
||||
if (al=="0.5" || al.substring(0,1)=="7") return("Нейтрал");
|
||||
return("");
|
||||
}
|
||||
|
||||
function drwfl(name, id, level, align, klan)
|
||||
{
|
||||
var s="";
|
||||
|
||||
if (align!="0") s+="<IMG SRC='i/align_"+align+".gif' WIDTH=12 HEIGHT=15 ALT=\""+getalign(align)+"\">";
|
||||
if (klan) s+="<IMG SRC='i/klan/"+klan+".gif' WIDTH=24 HEIGHT=15 ALT=''>";
|
||||
s+="<B>"+name+"</B> ";
|
||||
if (level!=-1) s+="["+level+"]";
|
||||
if (id!=-1) s+="<A HREF="+id+"'../inf.php?' target='_blank'><IMG SRC=i/inf.gif WIDTH=12 HEIGHT=11 ALT='Инф. о "+name+"'></A>";
|
||||
|
||||
document.write(s);
|
||||
}
|
||||
@@ -1,346 +0,0 @@
|
||||
var Hint3Name = '';
|
||||
|
||||
step=0;
|
||||
top.is_qlaunch = 0;
|
||||
function errmess(s)
|
||||
{
|
||||
messid.innerHTML='<B>'+s+'</B>';
|
||||
highlight();
|
||||
}
|
||||
function highlight()
|
||||
{
|
||||
if (step) return(0);
|
||||
step=10;
|
||||
setTimeout(dohi,50);
|
||||
}
|
||||
|
||||
function dohi()
|
||||
{
|
||||
var hx=new Array(0,1,2,3,4,5,6,7,8,9,"A","B","C","D","E","F");
|
||||
step--;
|
||||
messid.style.color="#"+hx[Math.floor(15-step/2)]+((step&1)?"F":"8")+"0000";
|
||||
if (step>0) setTimeout(dohi,50);
|
||||
}
|
||||
|
||||
function fixspaces(s)
|
||||
{
|
||||
while (s.substr(s.length-1,s.length)==" ") s=s.substr(0,s.length-1);
|
||||
while (s.substr(0,1)==" ") s=s.substr(1,s.length);
|
||||
return(s);
|
||||
}
|
||||
|
||||
|
||||
// Заголовок, название скрипта, имя поля с логином
|
||||
function bank_open(ac_list, ac_def, skipz, name) {
|
||||
var ac = ac_list.split(',');
|
||||
var s;
|
||||
var addon = '<INPUT type=hidden name="ac_open" value="' + Math.random() +'">';
|
||||
var hint = 'Выберите счёт и введите пароль';
|
||||
var title = 'Счёт в банке';
|
||||
var opt = '<select name="num" size=0 style="width: 100px">';
|
||||
for (var i=0; i<ac.length; i++){
|
||||
opt += '<option value="' + ac[i] + '"' +((ac_def && (ac_def == ac[i]))?' selected':'')+ '>'+ ac[i] + '</option>';
|
||||
}
|
||||
opt += '</select>';
|
||||
//alert (opt);
|
||||
s='<table border=0 width=100% cellspacing="0" cellpadding="2" ><tr>'+
|
||||
'<form action="?" method="POST" name=slform>'+
|
||||
'<input type=hidden name=edit value=2>'+
|
||||
'<td colspan=2 align=center>'+ hint + '</TD></TR>' +
|
||||
'<TR><TD width=84% align=right style="padding-left:5">' + opt+ ' <input style="width: 100px" type="password" name="psw" size="12" maxlength="30"></TD>' +
|
||||
'<TD width=16%><INPUT type=image SRC="#IMGSRC#" WIDTH="27" HEIGHT="20" BORDER=0 ALT="" >'+(addon?addon:'')+'</TD></TR></FORM></TABLE>';
|
||||
s = crtmagic('', title, s,"",skipz);
|
||||
if (!name) {name = "hint4"};
|
||||
|
||||
document.all(name).innerHTML = s;
|
||||
document.all(name).style.visibility = "visible";
|
||||
if (!skipz) {
|
||||
document.all(name).style.left = 100;
|
||||
document.all(name).style.zIndex = 200;
|
||||
document.all(name).style.top = document.body.scrollTop+50;
|
||||
}
|
||||
document.all('num').focus();
|
||||
Hint3Name = 'num';
|
||||
|
||||
|
||||
|
||||
for (var i=0; i<ac.length; i++){
|
||||
opt += '<option value="' + ac[i] + '"' +((ac_def && ac_def == ac[i])?' selected':'')+ '>'+ ac[i] + '</option>';
|
||||
}
|
||||
opt += '</select>';
|
||||
|
||||
}
|
||||
|
||||
function bank_info() {
|
||||
alert('У Вас нет активных счетов. \n\n На правах рекламы: Вы можете открыть счёт в Банке БК,'+
|
||||
' на Страшилкиной улице*\n\n* Мелким шрифтом: услуга платная.');
|
||||
}
|
||||
|
||||
function bank_blocked(tm) {
|
||||
var s = 'Ваши счета заблокированы (ещё '+ tm + ').';
|
||||
alert(s);
|
||||
}
|
||||
|
||||
function get_bank_pwd(){
|
||||
|
||||
}
|
||||
|
||||
function b_confirm(script, txt, mtype, addon, need_defend) {
|
||||
|
||||
if (need_defend && defend==false) {
|
||||
defend=-1
|
||||
// errmess("Блок не выбран."); return false;
|
||||
}
|
||||
|
||||
if (need_defend) {
|
||||
addon+="<INPUT type=hidden name='mdefend' value='"+defend+"'>";
|
||||
addon+="<INPUT type=hidden name='enemy' value='"+enemy+"'>";
|
||||
addon+="<INPUT type=hidden name='myid' value='"+myid+"'>";
|
||||
}
|
||||
|
||||
dialogconfirm('Подтверждение', '/battle.pl', '<TABLE width=100%><TD><B>'+txt+'</B><BR>Использовать сейчас?</TABLE>'+addon, mtype);
|
||||
}
|
||||
|
||||
|
||||
function dialogconfirm(title, script, text, mtype) {
|
||||
var s;
|
||||
|
||||
s='<table border=0 width=100% cellspacing="0" cellpadding="2"><tr><form action="'+script+'" method=POST name=slform><td colspan=2>'+
|
||||
text+'</TD></TR><TR><TD width=50% align=left><INPUT TYPE="button" name="tmpname423" value="Да" style="width:70%" onclick="if (!top.is_qlaunch) { slform.submit(); } else { top.QLaunchQuery(slform.use.value); closehint3(); } "></TD><TD width=50% align=right><INPUT type=button style="width:70%" value="Нет" onclick="closehint3();"></TD></TR></FORM></TABLE>';
|
||||
|
||||
s = crtmagic(mtype, title, s);
|
||||
document.all("hint4").innerHTML = s;
|
||||
|
||||
document.all("hint4").style.visibility = "visible";
|
||||
document.all("hint4").style.left = 100;
|
||||
document.all("hint4").style.zIndex = 200;
|
||||
document.all("hint4").style.top = document.body.scrollTop+50;
|
||||
document.all("tmpname423").focus();
|
||||
Hint3Name = name;
|
||||
}
|
||||
|
||||
function dialogOK(title, text, mtype) {
|
||||
var s;
|
||||
|
||||
s='<table border=0 width=100% cellspacing="0" cellpadding="2"><tr><td colspan=2>'+
|
||||
text+'</TD></TR><TR><TD width=100% align=right><INPUT type=button style="width:70%" value="Закрыть" onclick="closehint3();"></TD></TR></FORM></TABLE>';
|
||||
|
||||
s = crtmagic(mtype, title, s);
|
||||
document.all("hint4").innerHTML = s;
|
||||
document.all("hint4").style.visibility = "visible";
|
||||
document.all("hint4").style.left = 100;
|
||||
document.all("hint4").style.zIndex = 200;
|
||||
document.all("hint4").style.top = document.body.scrollTop+50;
|
||||
Hint3Name = name;
|
||||
}
|
||||
|
||||
|
||||
function foundmagictype (mtypes) {
|
||||
if (mtypes) {
|
||||
mtypes=mtypes+"";
|
||||
if (mtypes.indexOf(',') == -1) return parseInt(mtypes);
|
||||
var s=mtypes.split(',');
|
||||
var found=0;
|
||||
var doubl=0;
|
||||
var maxfound=0;
|
||||
|
||||
for (i=0; i < s.length; i++) {
|
||||
var k=parseInt(s[i]);
|
||||
if (k > maxfound) {
|
||||
found=i + 1;
|
||||
maxfound=k;
|
||||
doubl=0;
|
||||
} else {
|
||||
if (k == maxfound) {doubl=1;}
|
||||
}
|
||||
}
|
||||
if (doubl) {return 0};
|
||||
|
||||
return found;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
// Для магии. Заголовок, название скрипта, название магии, номер вещицы в рюкзаке, логин по умолчанию, описание доп. поля
|
||||
function magicklogin(title, script, magickname, n, defaultlogin, extparam, mtype) {
|
||||
var s = '<table border=0 width=100% cellspacing="0" cellpadding="2"><tr><form action="'+script+'" method=POST name=slform><input type=hidden name="use" value="'+magickname+'"><input type=hidden name="n" value="'+n+'"><td colspan=2>'+
|
||||
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD style="padding-left:5" width=50% align=right><INPUT TYPE="text" NAME="param" value="'+defaultlogin+'" style="width: 100%"></TD><TD width=50%><IMG SRC="#IMGSRC#" WIDTH="27" HEIGHT="20" BORDER=0 ALT="" onclick="slform.param.value=fixspaces(slform.param.value); if (!top.is_qlaunch) { slform.submit(); } else { top.QLaunchQuery(\'' + magickname + '\', slform.param.value); closehint3(); } " onmouseover="this.style.cursor = \'hand\';" onmouseout="this.style.cursor = \'\';"></TD></TR>';
|
||||
if (extparam != null && extparam != '') {
|
||||
s = s + '<TR><td style="padding-left:5">'+extparam+'<BR><INPUT style="width: 100%" TYPE="text" NAME="param2"></TD><TD></TR>';
|
||||
}
|
||||
s = s + '</FORM></TABLE>';
|
||||
s = crtmagic(mtype, title, s);
|
||||
document.all("hint4").innerHTML = s;
|
||||
document.all("hint4").style.visibility = "visible";
|
||||
document.all("hint4").style.left = 100;
|
||||
document.all("hint4").style.zIndex = 200;
|
||||
document.all("hint4").style.top = document.body.scrollTop+50;
|
||||
document.all("param").focus();
|
||||
Hint3Name = 'param';
|
||||
}
|
||||
|
||||
// Магия
|
||||
function UseMagick(title, script, name, extparam, n, extparam2, mtype) {
|
||||
var image = name;
|
||||
var path = ('' + name).split('/');
|
||||
name = path[ path.length - 1 ];
|
||||
if ((extparam != null)&&(extparam != '')) {
|
||||
|
||||
var t1='text',t2='text';
|
||||
|
||||
if (extparam.substr(0,1) == "!")
|
||||
{
|
||||
t1='password';
|
||||
extparam=extparam.substr(1,extparam.length);
|
||||
}
|
||||
|
||||
var s = '<table border=0 width=100% cellspacing="1" cellpadding="0"><TR><form action="'+script+'" method=POST name=slform><input type=hidden name="use" value="'+name+'"><input type=hidden name="n" value="'+n+'"><td colspan=2 align=left><NOBR><SMALL>'+
|
||||
extparam + ':</NOBR></TD></TR><TR><TD width=100% align=left style="padding-left:5"><INPUT tabindex=1 style="width: 100%" TYPE="'+t1+'" id="param" NAME="param" value=""></TD><TD width=10%><IMG SRC="#IMGSRC#" WIDTH="27" HEIGHT="20" BORDER=0 ALT="" tabindex=3 onclick="if (!top.is_qlaunch) { slform.submit(); } else { top.QLaunchQuery(\'' + name + '\', slform.param.value ' + ((extparam2 != null && extparam2 != '') ? ', slform.param2.value' : '') + ' ); closehint3(); } " onmouseover="this.style.cursor = \'hand\';" onmouseout="this.style.cursor = \'\';"></TD></TR>';
|
||||
if (extparam2 != null && extparam2 != '') {
|
||||
if (extparam2.substr(0,1) == "!")
|
||||
{
|
||||
t2='password';
|
||||
extparam2=extparam2.substr(1,extparam2.length);
|
||||
}
|
||||
s = s + '<TR><td colspan=2><NOBR><SMALL>'+extparam2+':</NOBR><TR style="padding-left:5"><TD><INPUT tabindex=2 TYPE="'+t2+'" id="param2" NAME="param2" style="width: 50%"></TD><TD></TR>';
|
||||
}
|
||||
s += '</FORM></TABLE>';
|
||||
s = crtmagic(mtype, title, s);
|
||||
document.all("hint4").innerHTML = s;
|
||||
document.all("hint4").style.visibility = "visible";
|
||||
document.all("hint4").style.left = 100;
|
||||
document.all("hint4").style.zIndex = 200;
|
||||
document.all("hint4").style.top = document.body.scrollTop+50;
|
||||
document.all("param").focus();
|
||||
Hint3Name = 'param';
|
||||
} else {
|
||||
dialogconfirm('Подтверждение', script, '<TABLE width=100%><TD><IMG src="http://img.combats.com/i/items/'+image+'.gif"></TD><TD>Использовать сейчас?</TABLE>'+
|
||||
'<input type=hidden name="use" id="use" value="'+name+'"><input type=hidden name="n" value="'+n+'">', mtype);
|
||||
}
|
||||
}
|
||||
|
||||
// Закрывает окно ввода логина
|
||||
function closehint3()
|
||||
{
|
||||
top.is_qlaunch = 0;
|
||||
document.all("hint4").style.visibility="hidden";
|
||||
Hint3Name='';
|
||||
}
|
||||
|
||||
// Для боевой магии. Заголовок, название магии, номер вещицы в рюкзаке
|
||||
function Bmagicklogin (title, magickname, n, defaultlogin, extparam, mtype) {
|
||||
if (defend==false) {
|
||||
defend=-1;
|
||||
// errmess("Блок не выбран."); return false;
|
||||
}
|
||||
|
||||
var s = '<table border=0 width=100% cellspacing="0" cellpadding="2"><tr><form action="/battle.pl" method=POST name="bmagic" onsubmit="bmagic.mdefend.value=defend;"><input type=hidden name="use" value="'+magickname+'"><input type=hidden name="n" value="'+n+'"><input type=hidden name="mdefend" value="'+defend+'"><input type=hidden name="enemy" value="'+enemy+'"><input type=hidden name="myid" value="'+myid+'"><td colspan=2 align=left>'+
|
||||
'Укажите логин персонажа:<small><BR>(можно щелкнуть по логину в чате)</TD></TR><TR><TD width=50% align=right><INPUT style="width: 100%" TYPE="text" id="param" NAME="param" value="'+defaultlogin+'"></TD><TD width=50%><INPUT type=image SRC="#IMGSRC#" WIDTH="27" HEIGHT="20" BORDER=0 ALT="" onclick="bmagic.param.value=fixspaces(bmagic.param.value);"></TD></TR>';
|
||||
if (extparam != null && extparam != '') {
|
||||
s = s + '<TR><td colspan=2>'+extparam+'<TR><TD style="padding-left:5"><INPUT style="width: 100%" TYPE="text" NAME="param2"><TD></TD></TR>';
|
||||
}
|
||||
s = s + '</FORM></TABLE>';
|
||||
s = crtmagic(mtype, title, s);
|
||||
|
||||
document.all("hint4").innerHTML= s;
|
||||
document.all("hint4").style.visibility = "visible";
|
||||
document.all("hint4").style.left = 100;
|
||||
document.all("hint4").style.zIndex = 200;
|
||||
document.all("hint4").style.top = 60;
|
||||
document.all("param").focus();
|
||||
Hint3Name = 'param';
|
||||
}
|
||||
|
||||
// Магия
|
||||
function BUseMagick(name, extparam, n, mtype) {
|
||||
if (defend==false) {
|
||||
defend=-1;
|
||||
// errmess("Блок не выбран."); return false;
|
||||
}
|
||||
|
||||
if ((extparam != null)&&(extparam != '')) {
|
||||
var s = prompt(extparam+':', '');
|
||||
if ((s != null)&&(s != '')) {
|
||||
re = /\%/g; s=s.replace(re, "%25");
|
||||
re = /\+/g; s=s.replace(re, "%2B");
|
||||
re = /\#/g; s=s.replace(re, "%23");
|
||||
re = /\?/g; s=s.replace(re, "%3F");
|
||||
re = /\&/g; s=s.replace(re, "%26");
|
||||
window.location.href='/battle.pl?use='+name+'¶m='+s+'&n='+n+'&mdefend='+defend+'&enemy='+enemy+'&myid='+myid;
|
||||
}
|
||||
} else {
|
||||
dialogconfirm('Подтверждение', '/battle.pl', '<TABLE width=100%><TD><IMG src="http://img.combats.com/i/items/'+name+'.gif"></TD><TD>Использовать сейчас?</TABLE>'+
|
||||
'<input type=hidden name="use" value="'+name+'"><input type=hidden name="n" value="'+n+'"><input type=hidden name="mdefend" value="'+defend+'"><input type=hidden name="enemy" value="'+enemy+'"><input type=hidden name="myid" value="'+myid+'">', mtype);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
function crtmagic(mtype, title, body, subm, noclose) {
|
||||
return crtmagic_full(mtype, title, body, subm, noclose, 270, 0);
|
||||
}
|
||||
function crtmagic_full(mtype, title, body, subm, noclose, dx, dy) {
|
||||
//name, XYX, X1-X2-Y2, pad.LRU
|
||||
mtype=foundmagictype(mtype);
|
||||
|
||||
var names=new Array(
|
||||
'neitral',17, 6, 14, 17, 14, 7,0,0, 3,
|
||||
'fire', 57, 30, 33, 20, 21, 14, 11, 12, 0,
|
||||
'water', 57, 30, 33, 20, 21, 14, 11, 12, 0,
|
||||
'air', 57, 30, 33, 20, 21, 14, 11, 12, 0,
|
||||
'earth', 57,30, 33, 20, 21, 14, 11, 12, 0,
|
||||
'white', 51, 25, 46, 44, 44, 10, 5, 5, 0,
|
||||
'gray', 51, 25, 46, 44, 44, 10, 5, 5, 0,
|
||||
'black', 51, 25, 46, 44, 44, 10, 5, 5, 0);
|
||||
var colors=new Array('B1A993','DDD5BF', 'ACA396','D3CEC8', '96B0C6', 'BDCDDB', 'AEC0C9', 'CFE1EA', 'AAA291', 'D5CDBC', 'BCBBB6', 'EFEEE9', '969592', 'DADADA', '72726B', 'A6A6A0');
|
||||
|
||||
while (body.indexOf('#IMGSRC#')>=0) body = body.replace('#IMGSRC#', 'http://img.combats.com/i/misc/dmagic/'+names[mtype*10]+'_30.gif');
|
||||
var s='<table width="'+dx+(dy?'" height="'+dy:'')+'" border="0" align="center" cellpadding="0" cellspacing="0">'+
|
||||
'<tr>'+
|
||||
'<td width="100%">'+
|
||||
'<table width="100%" border="0" cellspacing="0" cellpadding="0">'+
|
||||
'<tr><td>'+
|
||||
'<table width="100%" border="0" cellpadding="0" cellspacing="0">'+
|
||||
'<tr>'+
|
||||
'<td width="'+names[mtype*10+1]+'" align="left"><img src="http://img.combats.com/i/misc/dmagic/b'+names[mtype*10]+'_03.gif" width="'+names[mtype*10+1]+'" height="'+names[mtype*10+2]+'"></td>'+
|
||||
'<td width="100%" align="right" background="http://img.combats.com/i/misc/dmagic/b'+names[mtype*10]+'_05.gif"></td>'+
|
||||
'<td width="'+names[mtype*10+3]+'" align="right"><img src="http://img.combats.com/i/misc/dmagic/b'+names[mtype*10]+'_07.gif" width="'+names[mtype*10+3]+'" height="'+names[mtype*10+2]+'"></td>'+
|
||||
'</tr>'+
|
||||
'</table></td>'+
|
||||
'</tr>'+
|
||||
'<tr><td>'+
|
||||
'<table width="100%" border="0" cellspacing="0" cellpadding="0">'+
|
||||
'<tr>'+
|
||||
(names[mtype*10+7]?'<td width="'+names[mtype*10+7]+'"><SPAN style="width:'+names[mtype*10+7]+'"> </SPAN></td>':'')+
|
||||
'<td width="5" background="http://img.combats.com/i/misc/dmagic/b'+names[mtype*10]+'_17.gif"> </td>'+
|
||||
'<td width="100%">'+
|
||||
'<table width="100%" border="0" cellspacing="0" cellpadding="0">'+
|
||||
'<tr><td bgcolor="#'+colors[mtype*2]+'"'+(names[mtype*10+9]?' style="padding-top: '+names[mtype*10+9]+'"':'')+' >'+
|
||||
'<table border=0 width=100% cellspacing="0" cellpadding="0"><td style="padding-left: 20" align=center><B>'+title+
|
||||
'</td><td width=20 align=right valign=top style="cursor: hand" '+(noclose?'':'onclick="closehint3();" ') + 'style=\'filter:Gray()\' onmouseover="this.filters.Gray.Enabled=false" onmouseout="this.filters.Gray.Enabled=true"><IMG src="http://img.combats.com/i/clear.gif" width=13 height=13> </td></table>'+
|
||||
'</td></tr>'+
|
||||
'<tr>'+
|
||||
'<td align="center" bgcolor="#'+colors[mtype*2+1]+'">'+body+
|
||||
'</tr>'+
|
||||
'</table></td>'+
|
||||
'<td width="5" background="http://img.combats.com/i/misc/dmagic/b'+names[mtype*10]+'_19.gif"> </td>'+
|
||||
(names[mtype*10+8]?'<td width="'+names[mtype*10+8]+'"><SPAN style="width:'+names[mtype*10+8]+'"> </SPAN></td></td>':'')+
|
||||
'</tr>'+
|
||||
'</table></td>'+
|
||||
'</tr>'+
|
||||
'<tr><td>'+
|
||||
'<table width="100%" border="0" cellpadding="0" cellspacing="0">'+
|
||||
'<tr>'+
|
||||
'<td width="'+names[mtype*10+4]+'" align="left"><img src="http://img.combats.com/i/misc/dmagic/b'+names[mtype*10]+'_27.gif" width="'+names[mtype*10+4]+'" height="'+names[mtype*10+6]+'"></td>'+
|
||||
'<td width="100%" align="right" background="http://img.combats.com/i/misc/dmagic/b'+names[mtype*10]+'_29.gif"></td>'+
|
||||
'<td width="'+names[mtype*10+5]+'" align="right"><img src="http://img.combats.com/i/misc/dmagic/b'+names[mtype*10]+'_31.gif" width="'+names[mtype*10+5]+'" height="'+names[mtype*10+6]+'"></td>'+
|
||||
'</tr>'+
|
||||
'</table></td>'+
|
||||
'</tr>'+
|
||||
'</table></td>'+
|
||||
'</tr>'+
|
||||
'</table>';
|
||||
|
||||
return s;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
|
||||
function qn_win(t,obr) {
|
||||
$('#qsst').html(
|
||||
'<table width="710" border="0" cellspacing="0" cellpadding="0">'+
|
||||
'<tr>'+
|
||||
'<td width="12"><div style="position:relative;"> <img style="display:block; position:absolute; top:-27px; left:598px;" src="i/ric1_2g.png" width="147" height="72">'+
|
||||
'<img style="display:block; position:absolute; top:-27px; left:-35px;" src="i/ric12g.png" width="147" height="72"></div></td>'+
|
||||
'<td height="9" background="i/line_32g.png"><img src="http://img.combatz.ru/1x1.gif" style="display:block" height="1" width="1"></td>'+
|
||||
'<td width="12"></td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td background="i/line_12g.png"> </td>'+
|
||||
'<td bgcolor="#EBEBEB" style="padding:20px">'+
|
||||
'<!-- enter -->'+
|
||||
'<div style="width:150px;float:left;text-align:center;"><img src="http://combatz.ru/bot_q/'+obr+'.jpg" width="140" height="170"><br><br><center><a href="javascript:void(0)" onclick="top.qn_slk(\''+obr+'\')">Свернуть</a></center></div><div style="width:485px;float:right;">'+t+'</div>'+
|
||||
'<!-- enter -->'+
|
||||
'</td>'+
|
||||
'<td background="i/line_22g.png"> </td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td><div style="position:relative;"> <img style="display:block; position:absolute; top:-32px; left:606px;" src="i/ric2_2g.png" width="111" height="63"> <img style="display:block; position:absolute; top:-32px; left:-7px;" src="i/ric22g.png" width="111" height="63"> </div></td>'+
|
||||
'<td height="9" background="i/line_42g.png"><img style="display:block" height="1" width="1"></td>'+
|
||||
'<td></td>'+
|
||||
'</tr>'+
|
||||
'</table>'
|
||||
);
|
||||
if(top.qst_sml == '') {
|
||||
$('#qsst').css('display','block');
|
||||
}else{
|
||||
if(top.qst_sml != obr) {
|
||||
$('#mini_qsst').html('<img src="http://combatz.ru/bot_q/mini_'+obr+'.png" width="50" height="50">');
|
||||
}
|
||||
}
|
||||
$('#qsst').center();
|
||||
}
|
||||
@@ -1,280 +0,0 @@
|
||||
function H(isOutBox){
|
||||
this.document = document;
|
||||
this.isOutBox = isOutBox;
|
||||
this.iframe = this.isOutBox ? $('#mainbox') : $('body');
|
||||
|
||||
// DOM-элемент, который перехватывает клик по логину
|
||||
//this.grabLogin = null;
|
||||
// DOM-элемент, который перехватывает клик по названию шмотки
|
||||
//this.grabItem = null;
|
||||
this.grabLogin = new Grabber({inputClass: 'grabLogin'});
|
||||
this.grabItem = new Grabber({inputClass: 'grabLogin'});
|
||||
// storage
|
||||
this.data = {};
|
||||
}
|
||||
|
||||
H.prototype.toString = function(){
|
||||
return 'This is H-object';
|
||||
}
|
||||
|
||||
H.prototype.getMainBox = function(){
|
||||
return this.isOutBox ? this.iframe.contents().find('body') : $('body');
|
||||
}
|
||||
|
||||
H.prototype.loadMainBox = function(location){
|
||||
location = location || '/main.php';
|
||||
this.iframe.attr('src',location);
|
||||
}
|
||||
|
||||
H.prototype.loadDocument = function(location){
|
||||
this.document.location = location;
|
||||
}
|
||||
|
||||
// ======== storage
|
||||
|
||||
H.prototype.set = function(key, value){
|
||||
this.data[key] = value;
|
||||
}
|
||||
|
||||
H.prototype.get = function(key, defaultValue){
|
||||
return undefined == this.data[key] ? defaultValue : this.data[key];
|
||||
}
|
||||
|
||||
H.prototype.setHP = function(id, curHP, maxHP){
|
||||
curHP = curHP || 0;
|
||||
maxHP = maxHP || 0;
|
||||
var hp = this.getMainBox().find('#hpKey_'+id);
|
||||
if(hp.length < 1){
|
||||
return false;
|
||||
}
|
||||
var hpA = $('img:eq(1)', hp);
|
||||
var hpB = $('img:eq(2)', hp);
|
||||
var redHP = 0.33; // меньше 30% красный цвет
|
||||
var yellowHP = 0.66; // меньше 60% желтый цвет, иначе зеленый
|
||||
if(curHP > maxHP){
|
||||
curHP = maxHP;
|
||||
}
|
||||
var text = curHP + '/' + maxHP;
|
||||
var lengthHP = 170 - (text.length - 1) * 8;
|
||||
var sizeFirst = Math.round((lengthHP / maxHP) * curHP);
|
||||
var sizeSecond = lengthHP - sizeFirst;
|
||||
hpA.attr('width', sizeFirst);
|
||||
hpB.attr('width', sizeSecond);
|
||||
if(curHP / maxHP < redHP){
|
||||
hpA.attr('src', '/i/1red.gif');
|
||||
}else{
|
||||
if(curHP / maxHP < yellowHP){
|
||||
hpA.attr('src', '/i/1yellow.gif');
|
||||
}else{
|
||||
hpA.attr('src', '/i/1green.gif');
|
||||
}
|
||||
}
|
||||
hp.html(hp.html().substring(0, hp.html().lastIndexOf(':') + 1) + Math.round(curHP) + "/" + maxHP);
|
||||
}
|
||||
|
||||
/* ------------------ перехват клика по логину юзера -------------------------------------------- * /
|
||||
H.prototype.setGrabLogin = function(input){
|
||||
var obj = this;
|
||||
this.clearGrabLogin();
|
||||
var tmp = $(input);
|
||||
if(tmp.length > 0){
|
||||
this.grabLogin = tmp.get(0);
|
||||
$(this.grabLogin)
|
||||
.addClass('grabLogin')
|
||||
.dblclick(function(){obj.toggleGrabLogin(this)})
|
||||
.select();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
H.prototype.clearGrabLogin = function(){
|
||||
$(this.grabLogin).removeClass('grabLogin');
|
||||
this.grabLogin = null;
|
||||
},
|
||||
|
||||
H.prototype.toggleGrabLogin = function(input){
|
||||
if($(input).hasClass('grabLogin')){
|
||||
this.clearGrabLogin();
|
||||
}else{
|
||||
this.setGrabLogin($(input));
|
||||
}
|
||||
}
|
||||
/* -------------------------------- простые диалоги --------------------------------------------- */
|
||||
|
||||
H.prototype.sdOptionsDefault = {
|
||||
formMethod: 'POST',
|
||||
formAction: '',
|
||||
formClass: '',
|
||||
title: 'заголовок не указан',
|
||||
width: 250,
|
||||
data: {},
|
||||
content: '<span>контент не указан</span>',
|
||||
onSubmit: function(){return true;},
|
||||
onClose: function(){this.remove()}
|
||||
}
|
||||
|
||||
H.prototype._sd = function(options){
|
||||
options = $.extend({}, this.sdOptionsDefault, options);
|
||||
var m = $('<div class="sd-container"></div>').css('width',options.width);
|
||||
var t = $('<div class="sd-title">').text(options.title);
|
||||
var c = $('<img class="sd-closer" src="/i/clear.gif" title="Закрыть окно" alt="X">')
|
||||
.click(function(){return options.onClose.call($(this).closest('div.sd-container'))});
|
||||
var f = $('<form class="sd-form"></form>')
|
||||
.attr('method', options.formMethod)
|
||||
.attr('action', options.formAction)
|
||||
.submit(function(){return options.onSubmit.call($(this).closest('div.sd-container'))});
|
||||
for(var i in options.data){
|
||||
$('<input type=hidden>').attr('name',i).val(options.data[i]).appendTo(f);
|
||||
}
|
||||
if(options.formClass){
|
||||
f.addClass(options.formClass);
|
||||
}
|
||||
$('div.sd-container', this.getMainBox()).remove();
|
||||
return m.append(t.prepend(c)).append(f.append(options.content));
|
||||
}
|
||||
|
||||
H.prototype.sd = function(options){
|
||||
var tmp = this._sd(options);
|
||||
return this.getMainBox().append(tmp);
|
||||
}
|
||||
|
||||
H.prototype.sdOneInput = function(options){
|
||||
var onSubmit2 = options.onSubmit;
|
||||
options = $.extend({},this.sdOptionsDefault, {inputName: 'target', inputValue: '', grabber: null}, options);
|
||||
var i = $('<input type="text" class="text">')
|
||||
.css({'width': options.width - 45})
|
||||
.attr('name',options.inputName)
|
||||
.val(options.inputValue);
|
||||
if(options.grabber && this[options.grabber] instanceof Grabber){
|
||||
this[options.grabber].set(i);
|
||||
}else{
|
||||
i.select();
|
||||
}
|
||||
options.content.append($('<div></div>')
|
||||
.append(i)
|
||||
.append('<input type="submit" class="button" style="width:33px;" value=" »» ">'));
|
||||
options.onSubmit = function(){
|
||||
var v = i.val($.trim(i.val())).val();
|
||||
if(v.length <= 0){
|
||||
alert('Не заполнено обязательное поле');
|
||||
return false
|
||||
}
|
||||
if(typeof onSubmit2 == 'function'){
|
||||
return onSubmit2.call(this);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return this.sd(options);
|
||||
}
|
||||
|
||||
H.prototype.sdLogin = function(options){
|
||||
options.content = $('<div>Укажите логин персонажа:<br><small>(можно кликнуть по логину в чате)</small></div>');
|
||||
options.grabber = 'grabLogin';
|
||||
return this.sdOneInput(options);
|
||||
}
|
||||
|
||||
H.prototype.sdItem = function(options){
|
||||
options.content = $('<div>Укажите название или s/n предмета:<br><small>(можно кликнуть по названию в рюкзаке)</small></div>');
|
||||
options.grabber = 'grabItem';
|
||||
options.width = 270;
|
||||
return this.sdOneInput(options);
|
||||
}
|
||||
/**
|
||||
* Функция для обратной совместимости
|
||||
* Не надо её использовать в новом коде!
|
||||
*/
|
||||
H.prototype.sdFindLogin = function(title, formAction, inputName, inputValue){
|
||||
return this.sdLogin({
|
||||
title: title,
|
||||
formAction: formAction,
|
||||
inputName: inputName,
|
||||
inputValue: inputValue});
|
||||
}
|
||||
|
||||
/**
|
||||
* Функция для обратной совместимости
|
||||
* Не надо её использовать в новом коде!
|
||||
*/
|
||||
H.prototype.sdFindItem = function(title, formAction, inputName, inputValue){
|
||||
return this.sdItem({
|
||||
title: title,
|
||||
formAction: formAction,
|
||||
inputName: inputName,
|
||||
inputValue: inputValue});
|
||||
}
|
||||
/* ----------------------- вывод системных сообщений -------------------------------------------- */
|
||||
|
||||
H.prototype._popupConfig = {
|
||||
'd':[10000, 'Отладочное сообщение'],
|
||||
'i':[3000 , 'Сообщение'],
|
||||
'w':[5000 , 'Предупреждение'],
|
||||
'e':[0 , 'Ошибка']
|
||||
}
|
||||
|
||||
H.prototype.msgPopup = function(type, text){
|
||||
if(this._popupConfig[type] == undefined){
|
||||
type = 'w';
|
||||
}
|
||||
var conf = this._popupConfig[type];
|
||||
$.jGrowl(text,{
|
||||
header: '<img src="/i/jgrowl_moover.png" alt="<>" class="jgrowl-moover" title="Передвинуть"> ' + conf[1],
|
||||
glue: 'before',
|
||||
life: conf[0],
|
||||
sticky: conf[0] <= 0,
|
||||
theme: 'msg_' + type
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/* ================== перехват клика на логине/шмотке и т.п. ==================================== */
|
||||
|
||||
function Grabber(options){
|
||||
this.options = $.extend({}, this.optionsDef, options);
|
||||
this.input = null;
|
||||
|
||||
}
|
||||
Grabber.prototype.toString = function(){
|
||||
return 'This is Grabber-object';
|
||||
}
|
||||
|
||||
Grabber.prototype.optionsDef = {
|
||||
inputClass: 'grab'
|
||||
}
|
||||
|
||||
Grabber.prototype.get = function(){
|
||||
return this.input;
|
||||
}
|
||||
|
||||
Grabber.prototype.isActive = function(){
|
||||
return $(this.input).is(':visible');
|
||||
}
|
||||
|
||||
Grabber.prototype.set = function(input){
|
||||
var obj = this;
|
||||
this.clear();
|
||||
var tmp = $(input);
|
||||
if(tmp.length > 0){
|
||||
this.input = tmp.get(0);
|
||||
$(this.input)
|
||||
.addClass(this.options.inputClass)
|
||||
.dblclick(function(){obj.toggle(this)})
|
||||
.select();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Grabber.prototype.clear = function(){
|
||||
$(this.input).removeClass(this.options.inputClass);
|
||||
this.input = null;
|
||||
},
|
||||
|
||||
Grabber.prototype.toggle = function(input){
|
||||
if($(input).hasClass(this.options.inputClass)){
|
||||
this.clear();
|
||||
}else{
|
||||
this.set($(input));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
|
||||
var CtrlPress=false,doc=document;
|
||||
var rnd=Math.random(),
|
||||
redHP=0.33,
|
||||
yellowHP=0.66,
|
||||
TimerOn=-1,
|
||||
tkHP,
|
||||
maxHP,
|
||||
speed=100,
|
||||
mspeed=100;
|
||||
function setHP(a,b,c){
|
||||
tkHP=a;
|
||||
maxHP=b;
|
||||
vrem=c;
|
||||
if(TimerOn>=0){
|
||||
clearTimeout(TimerOn);TimerOn=-1}setHPlocal()}
|
||||
|
||||
function setHPlocal(){
|
||||
if(tkHP>maxHP){tkHP=maxHP;TimerOn=-1
|
||||
}else TimerOn=0;var a=Math.round(tkHP)+"/"+maxHP;a=120;var b=Math.round(a/maxHP*tkHP);a=a-b;if(doc.all("HP")){doc.HP1.width=b;doc.HP2.width=a;doc.HP2.display=a?"":"none";doc.HP1.src=tkHP/maxHP<redHP?"i/1red.gif":tkHP/maxHP<yellowHP?"i/1yellow.gif":"i/1green.gif";b=doc.all("HP").innerHTML;doc.all("HP").innerHTML=Math.round(tkHP)+"/"+maxHP}if(vrem>0){tkHP+=maxHP/(vrem*60);}if(TimerOn!=-1)TimerOn=setTimeout("setHPlocal()",delay*100)}
|
||||
-119
@@ -1,119 +0,0 @@
|
||||
function NewErrorTrap() { return true; }
|
||||
function errtrap(nick)
|
||||
{
|
||||
var OldErrorTrap = window.onerror;
|
||||
window.onerror = NewErrorTrap;
|
||||
if (window.opener) { // && window.opener.top.delay) {
|
||||
document.write('<IMG SRC=../i/lock3.gif WIDTH=20 HEIGHT=15 ALT="Приватное сообщение" onclick="window.opener.top.AddToPrivate(\''+nick+'\', true)" style="cursor:hand">');
|
||||
}
|
||||
if (document.log != null) { window.top.location="/index.htm"; }
|
||||
window.onerror = OldErrorTrap;
|
||||
}
|
||||
|
||||
function fastshow (content) {
|
||||
var el = document.getElementById("mmoves");
|
||||
var o = window.event.srcElement;
|
||||
if (content!='' && el.style.visibility != "visible") {el.innerHTML = '<small>'+content+'</small>';}
|
||||
var x = window.event.clientX + document.documentElement.scrollLeft + document.body.scrollLeft + 3;
|
||||
var y = window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop+5;
|
||||
el.style.left = x + "px";
|
||||
el.style.top = y + "px";
|
||||
if (el.style.visibility != "visible") {
|
||||
el.style.visibility = "visible";
|
||||
}
|
||||
}
|
||||
|
||||
var gift = new Array('','',''); // gift_from_before, gift_from_after, gift_from_anonym;
|
||||
|
||||
function quoteString(str){
|
||||
str = str.replace(/\\/g,'\\\\');
|
||||
str = str.replace(/\'/g,'\\\'');
|
||||
str = str.replace(/\"/g,'\\"');
|
||||
str = str.replace(/\n/g,'\\n');
|
||||
return "'" + str + "'";
|
||||
}
|
||||
|
||||
function DrawGift(name, flag, title, text, from, uid, width, height){
|
||||
var s = ('<IMG SRC="../i/items/'+name+'.gif" WIDTH='+width+' HEIGHT='+height+' style="cursor: hand;" ALT="');
|
||||
if (text)s+=text+"\n";
|
||||
s += (from?(gift[0] + from + gift[1]):gift[2]) + '"' +
|
||||
' onclick="HideGift();ShowGift('+ quoteString(title)+ ', ' + quoteString(name) +', ' +
|
||||
flag + ', ' + quoteString(text)+', '+ quoteString(from)+', this.offsetTop'+(uid?(',\''+uid+'\''):'')+');"'+
|
||||
'>';
|
||||
document.writeln(s);
|
||||
}
|
||||
|
||||
|
||||
function DG1(name, flag, title, text, from, uid){
|
||||
DrawGift(name, flag, title, text, from, uid, 61, 60);
|
||||
}
|
||||
|
||||
function DG2(name, flag, title, text, from, uid){
|
||||
DrawGift(name, flag, title, text, from, uid, 80, 74);
|
||||
}
|
||||
|
||||
function DF(name, flag, title, text, from, uid){
|
||||
DrawGift(name, flag, title, text, from, uid, 60, 60);
|
||||
}
|
||||
|
||||
function quote_url(s){
|
||||
var from = Array('+', ' ', '#');
|
||||
var to = Array('%2B', '+', '%23');
|
||||
for(var i=0;i<from.length;++i) while(s.indexOf(from[i])>=0) s= s.replace(from[i],to[i]);
|
||||
return s;
|
||||
}
|
||||
|
||||
function ShowGift(title, name, img, text, from, y, uid) {
|
||||
|
||||
var el = document.getElementById("mgift");
|
||||
var o = window.event.srcElement;
|
||||
var stitle = (img & 8)?
|
||||
'' + title + '':
|
||||
((img & 2)?'<a target=_blank href="../i/items/big/3d'+name+'.jpg">' + title + '</a>':
|
||||
title);
|
||||
if (el.style.visibility !='visible'){
|
||||
if (uid){
|
||||
if (parseInt(uid))from = gift[0] + '<a target=_blank href="/inf.php?'+uid+'">' + from + '</a>' + gift[1];
|
||||
else from = gift[0] + from + gift[1];
|
||||
}else if (from) from = gift[0] + ((from == 'АНТИБК Online')?from:'<a target=_blank href="/inf.php?login='+quote_url(from)+'">' + from + '</a>') + gift[1];
|
||||
if (!from) from = gift[2];
|
||||
document.getElementById("mgift_sign").innerHTML = '<small>' + (text?text+'<br>':'') + from + '</small>';
|
||||
document.getElementById("mgift_title").innerHTML = '<small><b>' + stitle + '</b></small>';
|
||||
var eimg = document.getElementById("mgift_pict");
|
||||
if (!(img & 6)){
|
||||
eimg.innerHTML = '<br><img src=../i/items/' +name+ '.gif alt="'+title+'"><br><br>';
|
||||
} else {
|
||||
var s = ((img & 4)?'middle/':'big/3d');
|
||||
eimg.innerHTML = '<img width=240 src="../i/items/' + s + name + '.jpg" '+ (img==5?'':' height=180')+'alt="' + title + '">';
|
||||
}
|
||||
}
|
||||
var x = 15;
|
||||
// var y = y; # window.event.clientY + document.documentElement.scrollTop + document.body.scrollTop;
|
||||
el.style.left = x + "px";
|
||||
el.style.top = y + "px";
|
||||
if (el.style.visibility != "visible") {
|
||||
el.style.visibility = "visible";
|
||||
}
|
||||
}
|
||||
|
||||
function hideshow () {
|
||||
document.getElementById("mmoves").style.visibility = 'hidden';
|
||||
}
|
||||
|
||||
function HideGift () {
|
||||
document.getElementById("mgift").style.visibility = 'hidden';
|
||||
}
|
||||
|
||||
function drawDivs(){
|
||||
document.writeln('<div id="mmoves" style="background-color:#FFFFCC; visibility:hidden; overflow:visible; position:absolute; border-color:#666666; border-style:solid; border-width: 1px; padding: 2px; white-space: nowrap;"></div>');
|
||||
document.writeln('<div id="mgift" style="background-color:#FFFFCC; z-index:99; visibility:hidden; overflow:visible; position:absolute; border-color:#666666; border-style:solid; border-width: 1px; padding: 2px;">');
|
||||
document.writeln('<table width=240 border=0 cellpadding=0 cellspacing=0>' +
|
||||
'<tr><td align=left id=mgift_title></td><td align=right><font color=red>'+
|
||||
'<a href="javascript:void(0);" onclick="HideGift(); return 0;"><b>x</b></a>'+
|
||||
'</font></td></tr>'+
|
||||
'<tr><td colspan=2><img src="../i/1x1.gif" alt="" width=240 height=1 border=0></td></tr>'+
|
||||
'<tr><td colspan=2 id=mgift_pict align=center bgcolor="#dedede"><td></tr>' +
|
||||
'<tr><td colspan=2 id=mgift_sign></td></tr></table></div>');
|
||||
|
||||
}
|
||||
|
||||
@@ -1,138 +0,0 @@
|
||||
//------------------------------------
|
||||
function MagicInput(options, data, callback){
|
||||
this.data = data;
|
||||
this.options = options;
|
||||
this._callback = callback;
|
||||
}
|
||||
|
||||
MagicInput.prototype.toString = function(){
|
||||
return 'This is MagicInput object';
|
||||
}
|
||||
|
||||
MagicInput.prototype.callback = function(){
|
||||
this._callback.apply(this, arguments);
|
||||
}
|
||||
|
||||
MagicInput.instance = function(el, data, callback){
|
||||
// var options = $(el).mapAttributes('mi-', true);
|
||||
el = $(el);
|
||||
var options = {};
|
||||
options['action'] = el.attr('mi-action');
|
||||
options['title'] = el.attr('mi-title');
|
||||
options['iface'] = el.attr('mi-iface');
|
||||
options['data'] = el.attr('mi-data');
|
||||
try{
|
||||
$.extend(data, options.data ? $.parseJSON(options.data) : {});
|
||||
delete options.data;
|
||||
options.iface = 'mi' + options.iface.substring(0,1).toUpperCase() + options.iface.substring(1);
|
||||
return input = new window[options.iface](options, data, callback);
|
||||
}catch(e){
|
||||
console.log('MagicInput::instance ' + e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
//------------------------------------
|
||||
function miNone(options, callback){
|
||||
miNote.superclass.constructor.apply(this, arguments);
|
||||
this.callback();
|
||||
}
|
||||
extend(miNone, MagicInput);
|
||||
|
||||
miNone.prototype.toString = function(){
|
||||
return 'This is miNone object';
|
||||
}
|
||||
//------------------------------------
|
||||
function miNote(options, callback){
|
||||
miNote.superclass.constructor.apply(this, arguments);
|
||||
if(confirm('Eniieuciaaou "'+this.options.title+'" nae?an?')){
|
||||
this.callback()
|
||||
}
|
||||
}
|
||||
extend(miNote, MagicInput);
|
||||
|
||||
miNote.prototype.toString = function(){
|
||||
return 'This is miNote object';
|
||||
}
|
||||
//------------------------------------
|
||||
function miDialog(options, data, callback, content, dialogOptions){
|
||||
miDialog.superclass.constructor.apply(this, arguments);
|
||||
var mi = this;
|
||||
this.dialog = content.dialog($.extend({},{
|
||||
title: this.options.title,
|
||||
resizable: false,
|
||||
minHeight: 20,
|
||||
dialogClass: 'sand-style mi-container',
|
||||
beforeClose: function(e, ui){
|
||||
var tmp = true;
|
||||
if(1 * $(this).attr('submit')){
|
||||
mi._collect.call(mi);
|
||||
if(tmp = mi._validation.call(mi)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
$(this).attr('submit', 0);
|
||||
return tmp;
|
||||
},
|
||||
close: function(e, ui){
|
||||
if(1 * $(this).attr('submit')){
|
||||
mi.callback();
|
||||
}
|
||||
mi.destroy();
|
||||
}
|
||||
}, dialogOptions))
|
||||
.on('click','.dialog-submit',function(){
|
||||
$(this).closest('.ui-dialog-content').attr('submit', 1).dialog('close')
|
||||
})
|
||||
}
|
||||
extend(miDialog, MagicInput);
|
||||
|
||||
miDialog.prototype.toString = function(){
|
||||
return 'This is ABSTRACT miDialog object';
|
||||
}
|
||||
|
||||
miDialog.prototype.destroy = function(){
|
||||
this.dialog.dialog('destroy').remove();
|
||||
}
|
||||
|
||||
miDialog._oneInput = function(p){
|
||||
var i = $('<input type='+(p.type ? p.type : 'text')+' class=text>').attr('name',p.name);
|
||||
if(p.grabber){
|
||||
h[p.grabber].set(i);
|
||||
}else{
|
||||
i.select();
|
||||
}
|
||||
return $('<div class=oneinput></div>')
|
||||
.append('<input type=button class="button dialog-submit" value=" »» ">')
|
||||
.append($('<div></div>').append(i));
|
||||
}
|
||||
|
||||
miDialog.prototype._collect = function(){
|
||||
var mi = this;
|
||||
this.dialog.find('[name]').each(function(){
|
||||
var el = $(this);
|
||||
if(el.is('input[type="checkbox"]')){
|
||||
mi.data[el.attr('name')] = ~~el.is(':checked');
|
||||
return;
|
||||
}
|
||||
mi.data[el.attr('name')] = el.val();
|
||||
})
|
||||
}
|
||||
|
||||
miDialog.prototype._validation = function(){
|
||||
return true;
|
||||
}
|
||||
|
||||
function miUser(options, data, callback){
|
||||
var mi = this;
|
||||
miUser.superclass.constructor.call(this, options, data, callback,
|
||||
$('<div>Укажите логин персонажа :<br /><small>(можно кликнуть по логину в чате)</small></div>')
|
||||
.append(miDialog._oneInput({name:'victim',grabber:'grabLogin'})),
|
||||
{width: 250});
|
||||
}
|
||||
extend(miUser, miDialog);
|
||||
|
||||
miUser.prototype._validation = function(){
|
||||
this.data.victim = $.trim(this.data.victim);
|
||||
return miUser.superclass._validation.apply(this)
|
||||
&& this.data.victim.length > 0;
|
||||
}
|
||||
-56
File diff suppressed because one or more lines are too long
@@ -1,21 +0,0 @@
|
||||
function DrawBar(title, id, flags, link_text, link){
|
||||
// alert(title + document);
|
||||
var s ='<table width="100%" border=0 cellspacing=0 cellpadding=1 background="http://img.combats.com/i/icon/back.gif">' +
|
||||
'<tr><td valign=top>';
|
||||
var sz = 11, num = 1;
|
||||
var rnd = Math.random();
|
||||
s += '<a name="bar__'+id+'" href="?edit='+rnd+'&bar='+id+'&a=explore&is_open='+(1-(flags & 1))+'#bar_'+id+'">';
|
||||
if (flags & 1) {
|
||||
s+= '<img width='+sz+' height=9 alt="Скрыть" border=0 src="http://img.combats.com/i/icon/'+num+'minus.gif">';
|
||||
} else {
|
||||
s+= '<img width='+sz+' height=9 alt="Показать" border=0 src="http://img.combats.com/i/icon/'+num+'plus.gif">';
|
||||
}
|
||||
s += '</a> </td>';
|
||||
s += '<td> </td><td bgcolor="#e2e0e0"><small> <b>'+title+':<b> </small></td>';
|
||||
if (link_text){
|
||||
s += '<td> </td><td bgcolor="#e2e0e0"><small> <a href="'+link+'">'+link_text+'</a> </small></td>';
|
||||
}
|
||||
s += '</tr></table>';
|
||||
// window.clipboardData.setData('Text', s);
|
||||
document.writeln(s);
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
var RecoverScroll=
|
||||
{
|
||||
|
||||
timer:null, x:0, y:0, actOnHash:false, cookieId:"RecoverScroll", expiry : "", dataCode:0, logged:0,
|
||||
|
||||
start : function( pageIdent, days )
|
||||
{
|
||||
this.installHandler=function(obj,evt,func) {
|
||||
window.attachEvent ? obj.attachEvent(evt,func) : obj.addEventListener(evt.replace(/^on/i,""),func,false);
|
||||
return func;
|
||||
}
|
||||
this.installHandler( window, 'onload', function(){ RecoverScroll.init( pageIdent, days ); } );
|
||||
},
|
||||
|
||||
init : function( pageName, days )
|
||||
{
|
||||
var dt, duration;
|
||||
|
||||
if( typeof window.pageXOffset != 'undefined' )
|
||||
this.dataCode = 1;
|
||||
else
|
||||
if( document.documentElement )
|
||||
this.dataCode = 3;
|
||||
else
|
||||
if( document.body && typeof document.body.scrollTop != 'undefined' )
|
||||
this.dataCode = 2;
|
||||
|
||||
if( pageName )
|
||||
this.cookieId = pageName.replace( /[\s\=\;\,]/g, '_' );
|
||||
|
||||
if( days && ( duration = parseInt( days ) ) != NaN )
|
||||
{
|
||||
dt = new Date();
|
||||
|
||||
dt.setDate( dt.getDate() + duration );
|
||||
|
||||
this.expiry = ";expires=" + dt.toUTCString();
|
||||
}
|
||||
|
||||
this.installHandler( window, 'onscroll', function(){ RecoverScroll.reset() } );
|
||||
|
||||
this.go();
|
||||
},
|
||||
|
||||
go : function( )
|
||||
{
|
||||
var sx, sy, offsetData;
|
||||
|
||||
if( ( window.location.hash == "" || this.actOnHash )
|
||||
// && location.search.length == 0
|
||||
&& ( offsetData = this.readCookie( this.cookieId )) != ""
|
||||
&& ( offsetData = offsetData.split('|') ).length == 4
|
||||
&& !isNaN( sx = Number( offsetData[ 1 ] ) ) && !isNaN( sy = Number( offsetData[3] ) ) )
|
||||
{
|
||||
|
||||
if(!!window.SoftScroll && SoftScroll.scrollTo)
|
||||
{ SoftScroll.init(); SoftScroll.scrollTo(sx, sy); }
|
||||
else
|
||||
window.scrollTo(sx, sy);
|
||||
}
|
||||
|
||||
this.record();
|
||||
},
|
||||
|
||||
sf : function( str )
|
||||
{
|
||||
return unescape(str).replace(/(.)(.*)/, function(a,b,c){return c+b;});
|
||||
},
|
||||
|
||||
reset : function()
|
||||
{
|
||||
clearTimeout( this.timer );
|
||||
this.timer = setTimeout( function(){ RecoverScroll.record(); }, 50 );
|
||||
},
|
||||
|
||||
record : function()
|
||||
{
|
||||
var cStr;
|
||||
|
||||
this.getScrollData();
|
||||
|
||||
this.setTempCookie( this.cookieId, cStr='x|'+this.x+'|y|'+this.y );
|
||||
},
|
||||
|
||||
setTempCookie : function(cName, cValue)
|
||||
{
|
||||
document.cookie = cName + "=" + cValue + this.expiry;
|
||||
},
|
||||
|
||||
readCookie : function(cookieName)
|
||||
{
|
||||
var cValue="";
|
||||
|
||||
if(typeof document.cookie!='undefined')
|
||||
cValue=(cValue=document.cookie.match(new RegExp("(^|;|\\s)"+cookieName+'=([^;]+);?'))) ? cValue[2] : "";
|
||||
|
||||
return cValue;
|
||||
},
|
||||
|
||||
hash : function()
|
||||
{
|
||||
this.actOnHash = true;
|
||||
},
|
||||
|
||||
getScrollData : function()
|
||||
{
|
||||
switch( this.dataCode )
|
||||
{
|
||||
case 3 : this.x = Math.max(document.documentElement.scrollLeft, document.body.scrollLeft);
|
||||
this.y = Math.max(document.documentElement.scrollTop, document.body.scrollTop);
|
||||
break;
|
||||
|
||||
case 2 : this.x = document.body.scrollLeft;
|
||||
this.y = document.body.scrollTop;
|
||||
break;
|
||||
|
||||
case 1 : this.x = window.pageXOffset; this.y = window.pageYOffset; break;
|
||||
}
|
||||
},
|
||||
|
||||
installHandler : function(){},
|
||||
}
|
||||
-201
@@ -1,201 +0,0 @@
|
||||
isIE = document.all;
|
||||
isNN = !document.all&&document.getElementById;
|
||||
isN4 = document.layers;
|
||||
isHot = false;
|
||||
document.onmousedown = ddInit;
|
||||
document.onmouseup = Function("ddEnabled=false");
|
||||
|
||||
function ddInit(e) {
|
||||
topDog = isIE ? "BODY" : "HTML";
|
||||
whichDog = isIE ? document.all.theLayer : document.getElementById("theLayer");
|
||||
hotDog = isIE ? event.srcElement : e.target;
|
||||
while(hotDog.id != "titleBar"&&hotDog.tagName != topDog) {
|
||||
hotDog = isIE ? hotDog.parentElement : hotDog.parentNode;
|
||||
}
|
||||
if(hotDog.id == "titleBar") {
|
||||
offsetx = isIE ? event.clientX : e.clientX;
|
||||
offsety = isIE ? event.clientY : e.clientY;
|
||||
nowX = parseInt(whichDog.style.left);
|
||||
nowY = parseInt(whichDog.style.top);
|
||||
ddEnabled = true;
|
||||
document.onmousemove = dd;
|
||||
}
|
||||
}
|
||||
|
||||
function dd(e) {
|
||||
if(!ddEnabled) return;
|
||||
whichDog.style.left = isIE ? nowX+event.clientX-offsetx : nowX+e.clientX-offsetx;
|
||||
whichDog.style.top = isIE ? nowY+event.clientY-offsety : nowY+e.clientY-offsety;
|
||||
return false;
|
||||
}
|
||||
|
||||
function mousePageXY(e) {
|
||||
var x = 0, y = 0;
|
||||
if(e.pageX || e.pageY) {
|
||||
x = e.pageX;
|
||||
y = e.pageY;
|
||||
} else if (e.clientX || e.clientY) {
|
||||
x = e.clientX + (document.documentElement.scrollLeft || document.body.scrollLeft) - document.documentElement.clientLeft;
|
||||
y = e.clientY + (document.documentElement.scrollTop || document.body.scrollTop) - document.documentElement.clientTop;
|
||||
}
|
||||
return {"x":x, "y":y};
|
||||
}
|
||||
|
||||
var win = {
|
||||
winc:{},
|
||||
wsdr:null,
|
||||
scor:{},
|
||||
openw:function(id, title, text, date, type, style) {
|
||||
if($('#win_'+id).attr('id') == undefined) {
|
||||
this.add(id, title, text, date, type, 1, '');
|
||||
}
|
||||
},
|
||||
WstartDrag:function(id) {
|
||||
$('#wupbox').css({'display':'block', 'cursor':'move'});
|
||||
this.wsdr = id;
|
||||
$('.w1').css({'z-index':1102});
|
||||
$('#win_'+id).css({'z-index':1103});
|
||||
delete cm;
|
||||
},
|
||||
WmoveDrag:function(e) {
|
||||
var x = mousePageXY(e)['x'], y = mousePageXY(e)['y'];
|
||||
if(this.scor.x == undefined) {
|
||||
this.scor.x = x;
|
||||
this.scor.y = y;
|
||||
this.scor.x2 = unpx($('#win_'+this.wsdr).css('left'));
|
||||
this.scor.y2 = unpx($('#win_'+this.wsdr).css('top'));
|
||||
}
|
||||
x = x-this.scor.x;
|
||||
y = y-this.scor.y;
|
||||
x += this.scor.x2;
|
||||
y += this.scor.y2;
|
||||
if(x < 9) { x = 9; }
|
||||
if(x + $('#win_'+this.wsdr).width() > $(window).width() - 9) {
|
||||
x = $(window).width() - 9 - $('#win_'+this.wsdr).width();
|
||||
}
|
||||
if(y < 35) { y = 35; }
|
||||
if(y + $('#win_'+this.wsdr).height() > $(window).height() - 35) {
|
||||
y = $(window).height() - 35 - $('#win_'+this.wsdr).height();
|
||||
}
|
||||
$('#win_'+this.wsdr).css({'top':y+'px','left':x+'px'});
|
||||
},
|
||||
WstopDrag:function() {
|
||||
$('#wupbox').css({'display':'none', 'cursor':'move'});
|
||||
this.wsdr = null;
|
||||
this.scor = {};
|
||||
},
|
||||
add:function(id, title, text, date, type, style, css) {
|
||||
var nw = '';
|
||||
if($('#win_'+id).attr('id') == undefined) {
|
||||
var acts = {};
|
||||
|
||||
if(date.usewin != undefined){
|
||||
acts[0] = 'onmouseup="'+date.usewin+'"';
|
||||
}
|
||||
|
||||
if(date.n != undefined){
|
||||
text += '<div style="margin-left: 11px;">'+date.n+'</div>';
|
||||
}
|
||||
|
||||
var kyps = ['', ''];
|
||||
|
||||
if(type == 0) {
|
||||
nw = text;
|
||||
} else if(type == 1) {
|
||||
nw = text;
|
||||
} else if(type == 2) {
|
||||
nw = '<div>'+text+'</div><div style="padding:5px"><div style="float:left"><button onclick="'+date.a1+';win.closew(\''+id+'\');" class="btnnew" id="winyesbtnfox'+id+'" style="width:100px">Aa</button></div><div style="float:right"><button class="btnnew" onClick="'+date.a2+';win.closew(\''+id+'\')" style="width:100px">Iao</button></div><br></div>';
|
||||
kyps[0] = ''+date.a1+';win.closew(\\\''+id+'\\\');win.addaction(0,\\\'\\\');';
|
||||
} else if(type == 3) {
|
||||
nw = '<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>'+text+'</td><td width="40" align="center" valign="middle"><img style="margin-top:5px;cursor:pointer" onClick="'+date.a1+';win.closew(\''+id+'\');" src="http://img.originalcombats.com/i/b__ok.gif" width="25" height="18"><br><img onClick="win.closew(\''+id+'\')" style="cursor:pointer" src="http://img.originalcombats.com/i/b__cancel.jpg" width="25" height="18"></td></tr></table>';
|
||||
kyps[0] = ''+date.a1+';win.closew(\\\''+id+'\\\');win.addaction(0,\\\'\\\');';
|
||||
} else if(type == 4) {
|
||||
nw = text[0];
|
||||
}
|
||||
|
||||
if(date.d != undefined) {
|
||||
nw = nw+date.d;
|
||||
}
|
||||
|
||||
nw = '<div style="margin: 2px;'+css+'">'+nw+'</div>';
|
||||
|
||||
if(title != '') {
|
||||
nw = '<div class="wi'+style+'s10" onselectstart="return false">'+
|
||||
'<table width="100%" border="0" cellspacing="0" cellpadding="0">'+
|
||||
'<tr>'+
|
||||
'<td rowspan="2" style="cursor: move;" onmousedown="win.WstartDrag(\''+id+'\')" '+acts[0]+'><b>'+title+'</b></td>'+
|
||||
'<td width="15" align="right"><img style="display:block" onclick="win.closew(\''+id+'\')" src="http://img.originalcombats.com/i/clear.gif" width="13" height="13"></td>'+
|
||||
'</tr>'+
|
||||
'</table>'+
|
||||
'</div>'+nw;
|
||||
}
|
||||
|
||||
nw = '<table onclick="win.addaction(0,\''+kyps[0]+'\')" border="0" cellspacing="0" cellpadding="0">'+
|
||||
'<tr>'+
|
||||
'<td class="wi'+style+'s0"></td>'+
|
||||
'<td class="wi'+style+'s1"></td>'+
|
||||
'<td class="wi'+style+'s2"></td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td class="wi'+style+'s3"><img src="http://img.originalcombats.com/1x1.gif" width="5" height="1"></td>'+
|
||||
'<td class="wi'+style+'s7" id="win_main_'+id+'">'+nw+'</td>'+
|
||||
'<td class="wi'+style+'s4"><img src="http://img.originalcombats.com/1x1.gif" width="5" height="1"></td>'+
|
||||
'</tr>'+
|
||||
'<tr>'+
|
||||
'<td class="wi'+style+'s5"></td>'+
|
||||
'<td class="wi'+style+'s6"></td>'+
|
||||
'<td class="wi'+style+'s8"><div id="win_a_'+id+'" class="wi'+style+'s9"></div></td>'+
|
||||
'</tr>'+
|
||||
'</table>';
|
||||
|
||||
nw = '<div class="w1" '+acts[0]+' id="win_'+id+'">'+nw+'</div>';
|
||||
|
||||
$('#windows').html($('#windows').html()+nw);
|
||||
$('#win_'+id).center();
|
||||
if(type == 2 || type == 3) {
|
||||
if(type == 2) {
|
||||
$('#winyesbtnfox'+id).focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
delete nw;
|
||||
},
|
||||
addaction:function(nm, vl) {
|
||||
key_actions[nm] = vl;
|
||||
if(nm != 2) {
|
||||
key_actions[2] = 1;
|
||||
}
|
||||
},
|
||||
closew:function(id) {
|
||||
$('#win_'+id).html('');
|
||||
$('#win_'+id).remove();
|
||||
}
|
||||
}
|
||||
|
||||
function hideMe() {
|
||||
if (isIE||isNN) {
|
||||
whichDog.style.visibility = "hidden";
|
||||
} else if (isN4) {
|
||||
document.theLayer.visibility = "hide";
|
||||
}
|
||||
}
|
||||
|
||||
function showForm(title, text, input_name, input_value, hidden_name, hidden_value, action) {
|
||||
document.getElementById('ftitle').innerHTML = title;
|
||||
document.getElementById('ftext').innerHTML = text;
|
||||
document.getElementById('finput').name = input_name;
|
||||
document.getElementById('finput').value = input_value;
|
||||
document.getElementById('fhinput').name = hidden_name;
|
||||
document.getElementById('fhinput').value = hidden_value;
|
||||
if(action != ""){
|
||||
document.getElementById('fuse').action = action;
|
||||
}
|
||||
|
||||
whichDog.style.left = (document.body.clientWidth - 240)/2;
|
||||
if(isIE||isNN) {
|
||||
whichDog.style.visibility = "visible";
|
||||
} else if (isN4) {
|
||||
document.theLayer.visibility = "show";
|
||||
}
|
||||
document.getElementById('finput').focus();
|
||||
}
|
||||
Reference in New Issue
Block a user