battles/battle.php

275 lines
18 KiB
PHP
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<html>
<head>
<title>Бойцовский Клуб</title>
<meta content="бойцовский, клуб, oldbbk, игра, online" http-equiv="keywords" name="keywords">
<meta content="Бойцовский Клуб oldbbk" http-equiv=description name="description">
<meta content="text/html; charset=utf-8" http-equiv="content-type">
<script>
top.server="http://goldpaladin.ru";
function get_mainframe() {return top.frames['main']; }
function get_maindoc() { return this.document; }
var main_uid= 'main';</script>
<script language=javascript>
//<!--
var CtrlPress = false;
var SoundOff = true;
var VolumeControl=25;
var chScroll = true;
function soundD(){
if (top.frames['bottom'].document.getElementById('soundM').innerHTML=='' && SoundOff==false){
if (navigator.userAgent.match(/MSIE/)) {
// IE gets an OBJECT tag
musicTag='<object id="flashsound" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="1" height="1"><param name="movie" value="sound/Sound.swf?LevelVolume='+VolumeControl+'" /><param name="quality" value="high" /></object>';
}
else {
musicTag='<embed name="flashsound" src="sound/Sound.swf?LevelVolume='+VolumeControl+'" quality="best" width="1" height="1" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
}
top.frames['bottom'].document.getElementById('soundM').innerHTML=musicTag;
}
}
function AddTo(login){
if (CtrlPress){
login=login.replace('%', '%25');
while(login.indexOf('+')>=0) login=login.replace('+', '%2B');
while(login.indexOf('#')>=0) login=login.replace('#', '%23');
while(login.indexOf('?')>=0) login=login.replace('?', '%3F');
window.open('inf.php?login='+login, '_blank')
}
else {
var o=top.frames['main'].Hint3Name;
if ((o != null)&&(o != "")) {
top.frames['main'].document.all(o).value=login;
top.frames['main'].document.all(o).focus();
} else {
top.frames['bottom'].window.document.F1.text.focus();
top.frames['bottom'].document.forms[0].text.value='to ['+login+'] '+top.frames['bottom'].document.forms[0].text.value;
}
}
}
function AddToPrivate(login, nolookCtrl){
if (CtrlPress && !nolookCtrl) {
login=login.replace('%', '%25');
while (login.indexOf('+')>=0) login=login.replace('+', '%2B');
while (login.indexOf('#')>=0) login=login.replace('#', '%23');
while (login.indexOf('?')>=0) login=login.replace('?', '%3F');
window.open('inf.php?login='+login, '_blank')
} else {
top.frames['bottom'].window.document.F1.text.focus();
top.frames['bottom'].document.forms[0].text.value='private ['+login+'] ' + top.frames['bottom'].document.forms[0].text.value;
}
}
function setCookie(name, value) {document.cookie=name+"="+escape(value)+"; path=/";}
function getCookie(Name) {
var search=Name + "="
if (document.cookie.length > 0){
offset=document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end=document.cookie.indexOf(";", offset)
if (end == -1) end=document.cookie.length
return unescape(document.cookie.substring(offset, end))
}
}}
var rnd=Math.random();
//-- Смена хитпоинтов
var delay = 3; // Каждые n увеличение HP на 1%
var Mdelay = 12;
var redHP = 0.33; // меньше 30% красный цвет
var yellowHP = 0.66; // меньше 60% желтый цвет, иначе зеленый
var TimerOn = -1; // id таймера
var tkHP, maxHP;
function setHP(value, max) {
tkHP=value; maxHP=max;
if (TimerOn>=0) { clearTimeout(TimerOn); TimerOn=-1; }
setHPlocal();
}
function p(text, type) {
top.frames['chat'].p(text,type);
}
function show_new(id) {
top.frames['chat'].document.getElementById(''+id+'').style.color = "Red";
}
function setHPlocal() {
if (tkHP>maxHP) { tkHP=maxHP; }
var sz1 = Math.round((149/maxHP)*tkHP);
var sz2 = 150 - sz1;
if (top.frames['main'].document.getElementById('HP')) {
top.frames['main'].document.HP1.width=sz1;
top.frames['main'].document.HP2.width=sz2;
if (tkHP/maxHP < redHP) {
top.frames['main'].document.HP1.src='i/1red.gif';
} else {
if (tkHP/maxHP < yellowHP) {
top.frames['main'].document.HP1.src='i/1yellow.gif';
} else {
top.frames['main'].document.HP1.src='i/1green.gif';
}
}
var s = top.frames['main'].document.all("HP").innerHTML;
top.frames['main'].document.all("HP").innerHTML = s.substring(0, s.lastIndexOf(':')+1) + Math.round(tkHP)+"/"+maxHP;
}
tkHP = (tkHP+(maxHP/100));
if (tkHP<maxHP) {
TimerOn=setTimeout('setHPlocal()', delay*1000);
} else {
TimerOn=-1;
}
}
//-- Обновление чата
var ChatTimerID=-1; // id таймера для чата
var ChatDelay=15; // через сколько сек. рефрешить чат
var ChatNormDelay=15; // через сколько сек. рефрешить чат при нормальном обновлении
var ChatSlowDelay=60; // через сколько сек. рефрешить чат при медленном обновлении
var ChatOm=false; // фильтр сообщений в чате
var ChatSys=false; // фильтр системных сообщений в чате
var ChatSlow=false; // обновление чата раз в минуту
var ChatTranslit=false; // преобразование транслита
var lid=0; // номер последнего сообщения в чате
function RefreshChat(){
var s='&lid='+lid;
if (ChatOm) { s=s+'&om=1'; }
if (ChatSys) { s=s+'&sys=1'; }
if (ChatTimerID>=0) { clearTimeout(ChatTimerID); }
ChatTimerID=setTimeout('RefreshChat()', ChatDelay*1000);
top.frames['refreshed'].location='ch.php?show='+Math.random()+s;
}
// останавливает обновление чата
function StopRefreshChat(){
if(ChatTimerID>=0){clearTimeout(ChatTimerID); }
ChatTimerID=-1;
}
// сбрасывает таймер счетчика
function NextRefreshChat(){
if (ChatTimerID>=0) {clearTimeout(ChatTimerID); }
ChatTimerID=setTimeout('RefreshChat()', ChatDelay*1000);
}
// Прокрутка текста чата вниз
function srld(){
if(chScroll == true){
top.frames['chat'].window.scrollBy(0, 65000);
}
}
// Установка lid
function slid(newlid){
var o=top.frames['bottom'].F1;
if (o) {lid=newlid;o.lid.value=newlid;}
}
// Перезагружаем список online, делаем это не сразу, а с паузой
var OnlineDelay=12; // пауза в сек. перед релоудом списка online
var OnlineTimerOn=-1; // id таймера
var OnlineOldPosition=0; // Позиция списка перед релоудом
var OnlineStop=true; // ручное обновление чата
function rld(now) {
if (OnlineTimerOn < 0 || now) {
var tm=now ? 2000 : OnlineDelay*1000;
OnlineTimerOn=setTimeout('onlineReload('+now+')', tm);
}
}
function onlineReload(now) {
if (OnlineTimerOn >= 0) clearTimeout(OnlineTimerOn);
OnlineTimerOn=-1;
if (! OnlineStop || now) {
top.frames['online'].location='ch.php?online='+Math.round(Math.random()*100000);
//top.frames['online'].navigate('ch.php?online='+Math.round(Math.random()*100000));
}
rld();
}
var changeroom=1;
var localroom=1;
setInterval(function (){
if (localroom!=changeroom){
localroom=changeroom;
top.frames['online'].location='ch.php?online='+Math.round(Math.random()*100000);
}
}, 5000);
//-- Очистка чата
var ChatClearTimerID=-1; // id таймера для чата
var ChatClearDelay=900; // через сколько сек. чистим чат
var ChatClearSize=10000; // Сколько байт оставляем после чистки
function RefreshClearChat(){
if (ChatClearTimerID>=0) { clearTimeout(ChatClearTimerID); }
ChatClearTimerID=setTimeout('RefreshClearChat()', ChatClearDelay*1000);
var s=top.frames['chat'].document.all("mes").innerHTML;
var s2=top.frames['chat'].document.all("mes_sys").innerHTML;
if (s.length > ChatClearSize) { // Надо чистить чат
var j=s.lastIndexOf('<BR>', s.length-ChatClearSize);
top.frames['chat'].document.all("mes").innerHTML=s.substring(j, s.length);
}
if (s2.length > ChatClearSize) { // Надо чистить системные
var j2=s2.lastIndexOf('<BR>', s2.length-ChatClearSize);
top.frames['chat'].document.all("mes_sys").innerHTML=s2.substring(j2, s2.length);
}
}
//-- Прочие функции
var oldlocation='';
function cht(nm){
if (oldlocation == '') {
oldlocation=top.frames['main'].location.href;
var i=oldlocation.indexOf('?', 0);
if (i>0) { oldlocation=oldlocation.substring(0, i) }
}
//top.frames['main'].navigate(nm);
top.frames['main'].location=nm;
}
function returned(){
if (oldlocation != '') { top.frames['main'].location=oldlocation+'?tmp='+Math.random(); oldlocation=''; }
else { top.frames['main'].location='main.php?edit='+Math.random() }
}
function myscroll(){
OnlineOldPosition=top.frames['online'].document.body.scrollTop;
}
function CLR1(){
top.frames["bottom"].document.F1.text.value='';
top.frames["bottom"].document.F1.text.focus();
}
function CLR2(){
top.frames['chat'].document.all("mes").innerHTML='';
top.frames['chat'].document.all("oMenu").style.top="0px";
}
function strt(){// Начинаем
ChatTimerID=setTimeout('RefreshChat()', 1000);
OnlineTimerOn=setTimeout('onlineReload(true)', 2*1000);
ChatClearTimerID=setTimeout('RefreshClearChat()', ChatClearDelay*1000);
}
var user=getCookie("battle");
if ((user == null)||(user == "")) {
document.write('<body>Внимание! РС РёР»Рё РЅРµ ввели ваш логин/пароль РЅР° титульной странице или РІ вашем браузере отключена поддержка Cookie. Необходимо РёС… включить (это абсолютно безопасно!) для продолжения РёРіСЂС‹.<BR>');
document.write('Рменю браузера Internet Explorer выберите "Сервис" => "Свойства обозревателя" перейдите РЅР° закладку "Конфиденциальность" Рё передвиньте ползунок РІ положение "Средний". И попробуйте СЃРЅРѕРІР° зайти СЃ <A HREF="/">титульной страницы</A>.<BR>Рбраузере IE версии 5 меню: "Сервис" => "Свойства обозревателя" => "Безопасность" => "Интернет" РєРЅРѕРїРєР° "Другой" => файлы "cookie"<BR>Если Сѓ вас IE 4-Р№ версии, возможно вам РЅРµ удастся зайти, СЃ проблемой этой версии браузера РјС СЂР°Р±РѕС‚Р°РµРј, РЅРѕ РїРѕРєР° единственным решением является: обновление браузера РґРѕ 5-Р№ или 6-Р№ версии.<BR>Если ничего РЅРµ помогает, проверьте настройки вашего FireWall, если РѕРЅ установлен, СРѕ может РЅРµ пропускать активные страницы Рё cookie.</BODY>');
}
else {
//if (document.all && document.all.item && !window.opera && !document.layers) {
document.write(
'<frameset rows="37, *, 30, 5" frameborder="0" border="0" framespacing="0">'+
'<frame src="top.html" target="_top" scrolling="no" noresize="noresize" frameborder="0" border="0" framespacing="0" marginwidth="0" marginheight="7"></frame>'+
'<frameset cols="9, *, 9" frameborder="0" border="0" framespacing="0">'+
'<frame src="left.html" target="_top" scrolling="no" noresize="noresize" frameborder="0" border="0" framespacing="0" marginwidth="0" marginheight="0"></frame>'+
'<frameset rows="72%, *, 0" frameborder="1" border="3" framespacing="1" bordercolor="gray">'+
'<frame name="main" src="main.php?top='+rnd+'" style="border-bottom-width: 2px; border-bottom-style:solid; border-bottom-color:#B0B0B0"></frame>'+
'<frameset cols="*,220" border="3" frameborder="1">'+
'<frame name="chat" src="buttons.php?ch='+rnd+'" target="_top" scrolling="yes" framespacing="0" marginwidth="3" marginheight="3"></frame>'+
'<frame name="online" src="ch.php?online='+rnd+'" target="_blank" scrolling="yes" framespacing="0" marginwidth="3" marginheight="0"></frame>'+
'</frameset>'+
'<frame name="refreshed" target="_top" scrolling="no" noresize="noresize" src="refreshed.html"></frame>'+
'</frameset>'+
'<frame src="right.html" target="_top" scrolling="no" noresize="noresize" frameborder="0" border="0" framespacing="0" marginwidth="0" marginheight="0"></frame>'+
'</frameset>'+
'<frame name="bottom" scrolling="no" noresize="noresize" src="buttons.php?'+rnd+'"></frame>'+
'<frame src="bottom.html" target="_top" scrolling="no" noresize="noresize" frameborder="0" border="0" framespacing="0" marginwidth="0" marginheight="0"></frame>'+
'</frameset>');
/*} else { alert("You must use Internet Explorer 4.0 or higher"); history.back(-1);
}*/
//rld();
}
//-->
</script><noscript><span style="color:#ff0000">Внимание!</span> Рвашем браузере отключена поддержка JavaScript. Необходимо их включить (это абсолютно безопасно!) для продолжения игры.<br />Рменю браузера Internet Explorer выберите "Сервис" => "Свойства обозревателя" перейдите на закладку "Безопасность". Для зоны <b>Интернет</b> нажмите кнопку "Другой". Установите уровень безопасности "Средний", этого достаточно. Или же, в списке параметров найдите раздел "Сценарии" и там нужно разрешить выполнение Активных сценариев.<br /><span style="color:#ff0000">Attention!</span> Your browser does not support JavaScript. To continue the game, please turn the support on (it's absolutely safe).<br />In the Internet Explorer browser menu choose "Tools" => "Internet Options" and go to "Security". For the <b>Internet</b> zone press the "Custom level" button. State the "Medium", this will be enough. You can also find the "Scripting" page in the list of the parameters and allow Active Scripting there.</noscript></body></html>