2023-06-23 14:44:24 +00:00
< ? php
if ( ! defined ( 'GAME_VERSION' )) {
require_once '_incl_data/autoload.php' ;
}
use Core\ { Config , Database , Db };
use User\ItemsModel ;
use User\UserIp ;
2023-07-31 17:06:51 +00:00
2024-01-05 22:14:35 +00:00
function var_info ( $vars , $d = false ) : void
2022-07-01 12:45:43 +00:00
{
2023-04-10 21:51:54 +00:00
echo " <pre> \n " ;
2022-06-06 21:30:34 +00:00
var_dump ( $vars );
echo " </pre> \n " ;
2022-12-19 18:26:14 +00:00
if ( $d ) {
exit ();
}
2022-06-06 21:30:34 +00:00
}
2022-07-01 12:45:43 +00:00
2022-12-19 21:24:12 +00:00
Database :: init ();
2022-12-19 18:26:14 +00:00
define ( 'IP' , UserIp :: get ());
2022-06-06 21:30:34 +00:00
2022-12-19 18:26:14 +00:00
$magic = new Magic ();
$u = User :: start ();
$filter = new Filter ();
$q = new Quests ;
2023-04-15 19:18:30 +00:00
$code = PassGen :: intCode (); //для ссылок вида ?rnd=XXXXXX, вроде как-то борется с кешированием, но это не точно.
2022-06-06 21:30:34 +00:00
2023-04-18 09:21:54 +00:00
//$training_manager = TrainingManager::getInstance($u->info['id']);
2023-01-18 17:24:00 +00:00
2023-01-10 16:29:32 +00:00
/** Восстанавливаем всем ботам, которые не в бою здоровье до максимума. */
2023-06-11 11:51:42 +00:00
Db :: sql (
2024-01-05 22:14:35 +00:00
'update stats set hpnow = hpall, mpnow = mpall where id in (select id from users where bot = 2 and battle = 0)'
2022-12-19 18:26:14 +00:00
);
2022-06-06 21:30:34 +00:00
2022-07-01 12:45:43 +00:00
if ( $u -> info [ 'banned' ] > 0 ) {
header ( 'location: /index.php' );
die ();
2022-06-06 21:30:34 +00:00
}
2022-07-01 12:45:43 +00:00
if ( $u -> info [ 'bithday' ] == '01.01.1800' && $u -> info [ 'inTurnirnew' ] == 0 ) {
unset ( $_GET , $_POST );
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
#--------для общаги, и позже для почты
2022-07-01 12:45:43 +00:00
$sleep = $u -> testAction ( '`vars` = "sleep" AND `uid` = "' . $u -> info [ 'id' ] . '" LIMIT 1' , 1 );
2023-08-15 22:48:29 +00:00
if ( $u -> room [ 'file' ] != " room_hostel " && $u -> room [ 'file' ] != " an/room_hostel " && ! empty ( $sleep )) {
2023-04-10 21:51:54 +00:00
Db :: sql ( 'update actions set vars = ? where id = ?' , [ 'unsleep' , $sleep [ 'id' ]]);
2022-07-01 12:45:43 +00:00
}
if ( $u -> room [ 'file' ] == " room_hostel " || $u -> room [ 'file' ] == " post " ) {
$trololo = 0 ;
} else {
$trololo = 1 ;
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
#--------для общаги, и позже для почты
2023-04-10 21:51:54 +00:00
if (( $u -> info [ 'online' ] < time () - 60 || $u -> info [ 'afk' ] != '' )) {
2023-09-30 15:18:58 +00:00
$filter -> setOnline ( 0 , $u -> info [ 'id' ]);
2023-04-15 19:18:30 +00:00
Db :: sql (
2024-01-05 22:14:35 +00:00
'update users set online = unix_timestamp(), timemain = unix_timestamp(), afk = ? where id = ?' ,
2023-04-15 19:18:30 +00:00
[ '' , $u -> info [ 'id' ]]
);
2022-07-01 12:45:43 +00:00
} elseif ( $u -> info [ 'timeMain' ] < time () - 60 || $u -> info [ 'afk' ] != '' ) {
2023-04-15 19:18:30 +00:00
Db :: sql (
2024-01-05 22:14:35 +00:00
'update users set online = unix_timestamp(), timemain = unix_timestamp(), afk = ? where id = ?' ,
2023-04-15 19:18:30 +00:00
[ '' , $u -> info [ 'id' ]]
);
2022-06-06 21:30:34 +00:00
}
2022-07-01 12:45:43 +00:00
if ( ! isset ( $u -> info [ 'id' ]) || ( $u -> info [ 'joinIP' ] == 1 && $u -> info [ 'ip' ] != $_SERVER [ 'HTTP_X_REAL_IP' ]) || $u -> info [ 'banned' ] > 0 ) {
2022-12-19 21:24:12 +00:00
die ( Config :: get ( 'exit' ));
2022-06-06 21:30:34 +00:00
}
2023-01-10 16:29:32 +00:00
//Показываем системку и заносим данные
2022-12-19 18:26:14 +00:00
if ( $u -> info [ 'battle_text' ] != '' && $u -> info [ 'last_b' ] > 0 ) {
2023-04-15 19:18:30 +00:00
Db :: sql (
'insert into battle_last (battle_id, uid, time, act, lvl, align, clan, exp) values (?,?,unix_timestamp(),?,?,?,?,?)' ,
[
$u -> info [ 'last_b' ],
$u -> info [ 'id' ],
$u -> info [ 'last_a' ],
$u -> info [ 'level' ],
$u -> info [ 'align' ],
$u -> info [ 'clan' ],
$u -> info [ 'exp' ],
]
);
2022-06-06 21:30:34 +00:00
}
2022-07-01 12:45:43 +00:00
$act = - 2 ;
$act2 = 0 ;
$u -> stats = $u -> getStats ( $u -> info [ 'id' ], 0 );
2023-06-11 11:51:42 +00:00
$u -> aves = ItemsModel :: inventoryWeightAndItemQuantity ();
2022-07-01 12:45:43 +00:00
if ( ! isset ( $u -> stats [ 'act' ])) {
$u -> stats [ 'act' ] = 0 ;
2022-06-06 21:30:34 +00:00
}
2022-07-01 12:45:43 +00:00
if ( $u -> stats [ 'act' ] == 1 ) {
$act = 1 ;
2022-06-06 21:30:34 +00:00
}
2022-07-01 12:45:43 +00:00
$u -> rgd = $u -> regen ( $u -> info [ 'id' ], 0 , 0 );
2022-06-06 21:30:34 +00:00
2023-01-10 16:29:32 +00:00
//Проверка уровня
2022-06-06 21:30:34 +00:00
$ul = $u -> testLevel ();
2022-07-01 12:45:43 +00:00
if ( isset ( $_GET [ 'atak_user' ]) && $u -> info [ 'battle' ] == 0 && $_GET [ 'atak_user' ] != $u -> info [ 'id' ]) {
if ( $u -> room [ 'noatack' ] == 0 ) {
2023-04-10 21:51:54 +00:00
$clan = Db :: getValue ( 'select clan from users where id = ?' , [( int ) $_GET [ 'atak_user' ]]);
2023-04-15 19:18:30 +00:00
$cruw = Db :: getRow (
'select id, type from clan_wars where ((clan1 = ? and clan2 = ?) or (clan1 = ? and clan2 = ?)) and time_finish > unix_timestamp() limit 1' ,
[
$clan ,
$u -> info [ 'clan' ],
$u -> info [ 'clan' ],
$clan ,
]
);
2023-04-10 21:51:54 +00:00
unset ( $clan );
2022-07-01 12:45:43 +00:00
if ( isset ( $cruw [ 'id' ])) {
$cruw = $cruw [ 'type' ];
} else {
$cruw = 0 ;
}
2023-04-15 19:18:30 +00:00
$ua = Db :: getRow (
'select * from users left join stats on users.id = stats.id where (atack > unix_timestamp() or atack = 1 or 1 = ? or 2 = ?) and stats.id = ?' ,
[
$cruw ,
$cruw ,
( int ) $_GET [ 'atak_user' ],
]
);
$check = Db :: getValue (
2024-01-05 22:14:35 +00:00
'select id from eff_users where id_eff = 478 and uid = ? and `delete` = 0 order by overtype desc limit 1' ,
2023-04-15 19:18:30 +00:00
[ $u -> info [ 'id' ]]
);
$check2 = Db :: getValue (
2024-01-05 22:14:35 +00:00
'select id from eff_users where id_eff = 479 and uid = ? and `delete` = 0 order by overtype desc limit 1' ,
2023-04-15 19:18:30 +00:00
[ $ua [ 'id' ]]
);
$check3 = Db :: getValue (
'select id from battle_last where uid = ? and battle_id = ? limit 1' , [ $u -> info [ 'id' ], $ua [ 'battle' ]]
);
2022-07-01 12:45:43 +00:00
if ( $ua [ 'no_ip' ] == 'trupojor' && $ua [ 'level' ] == 9 && $u -> info [ 'level' ] > 9 ) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Нельзя нападать на монстра этого уровня!' ;
2022-07-01 12:45:43 +00:00
} elseif ( $ua [ 'no_ip' ] == 'trupojor' && $ua [ 'level' ] == 10 && $u -> info [ 'level' ] < 10 ) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Нельзя нападать на монстра этого уровня!' ;
2022-07-01 12:45:43 +00:00
} elseif ( $ua [ 'no_ip' ] != 'trupojor' && $ua [ 'level' ] != $u -> info [ 'level' ]) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Нападать можно на персонажей только своего уровня!' ;
2023-04-10 21:51:54 +00:00
} elseif ( isset ( $check3 )) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Нельзя вмешаться, вы уже были в этом поединке.' ;
2023-04-10 21:51:54 +00:00
} elseif ( $ua [ 'no_ip' ] == 'trupojor' && isset ( $check )) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Нельзя нападать на монстра чаще одного раза в 3 часа!' ;
2023-04-10 21:51:54 +00:00
} elseif ( isset ( $check2 )) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Персонаж имеет защиту от нападения!' ;
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $ua [ 'id' ]) && $ua [ 'online' ] > time () - 520 ) {
2023-01-10 16:29:32 +00:00
$usta = $u -> getStats ( $ua [ 'id' ], 0 ); // статы цели
$minHp = floor ( $usta [ 'hpAll' ] / 100 * 33 ); // минимальный запас здоровья цели при котором можно напасть
2022-07-01 12:45:43 +00:00
if ( $ua [ 'battle' ] > 0 ) {
2023-04-15 19:18:30 +00:00
$uabt = Db :: getRow (
'select id, type, invis from battle where id = ? and team_win = -1 limit 1' , [ $ua [ 'battle' ]]
);
2022-07-01 12:45:43 +00:00
if ( ! isset ( $uabt [ 'id' ])) {
$ua [ 'battle' ] = 0 ;
}
}
if ( $ua [ 'battle' ] == 0 && $minHp > $usta [ 'hpNow' ]) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Нельзя напасть, у противника не восстановилось здоровье' ;
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $uabt [ 'id' ]) && $uabt [ 'type' ] == 500 && $ua [ 'team' ] == 1 ) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Нельзя сражаться на стороне монстров!' ;
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $uabt [ 'id' ]) && $uabt [ 'invis' ] > 0 ) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Нельзя вмешиваться в невидимый бой!' ;
2022-07-01 12:45:43 +00:00
} elseif ( $magic -> testTravma ( $ua [ 'id' ], 3 )) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Противник тяжело травмирован, нельзя напасть!' ;
2022-07-01 12:45:43 +00:00
} elseif ( $magic -> testTravma ( $u -> info [ 'id' ], 2 )) {
2023-01-10 16:29:32 +00:00
$u -> error = 'Вы травмированы, нельзя напасть!' ;
2022-07-01 12:45:43 +00:00
} elseif ( $ua [ 'room' ] == $u -> info [ 'room' ] && ( $minHp <= $usta [ 'hpNow' ] || $ua [ 'battle' ] > 0 )) {
if ( $ua [ 'type_pers' ] == 0 ) {
if ( $cruw == 2 ) {
$ua [ 'type_pers' ] = 99 ;
} else {
$ua [ 'type_pers' ] = 50 ;
}
}
if ( $ua [ 'no_ip' ] == 'trupojor' ) {
$ua [ 'type_pers' ] = 500 ;
}
2023-04-15 19:18:30 +00:00
Db :: sql (
2024-01-05 22:14:35 +00:00
'update stats set hpnow = ?, mpnow = ? where id = ?' ,
[
2023-07-31 17:06:51 +00:00
$usta [ 'hpNow' ],
$usta [ 'mpNow' ],
$usta [ 'id' ],
]
2023-04-15 19:18:30 +00:00
);
2022-07-01 12:45:43 +00:00
2022-12-19 18:26:14 +00:00
$goodt = $magic -> atackUser (
$u -> info [ 'id' ], $ua [ 'id' ], $ua [ 'team' ], $ua [ 'battle' ], $ua [ 'bbexp' ], $ua [ 'type_pers' ]
);
2022-07-01 12:45:43 +00:00
2023-04-10 21:51:54 +00:00
$sx = $u -> info [ 'sex' ] ? 'a' : '' ;
2022-07-01 12:45:43 +00:00
if ( $cruw == 2 ) {
2023-01-10 16:29:32 +00:00
$rtxt = '[img[items/pal_button9.gif]] "' . $u -> info [ 'login' ] . '" совершил' . $sx . ' кровавое нападение по метке на персонажа "' . $ua [ 'login' ] . '".' ;
2022-07-01 12:45:43 +00:00
} else {
2023-01-10 16:29:32 +00:00
$rtxt = '[img[items/pal_button8.gif]] "' . $u -> info [ 'login' ] . '" совершил' . $sx . ' нападение по метке на персонажа "' . $ua [ 'login' ] . '".' ;
2022-07-01 12:45:43 +00:00
}
if ( $goodt > 0 ) {
2023-01-28 02:24:37 +00:00
$chatDto = new ChatMessage ();
$chatDto -> setCity ( $u -> info [ 'city' ]);
$chatDto -> setRoom ( $u -> info [ 'room' ]);
$chatDto -> setText ( $rtxt );
$chatDto -> setType ( 6 );
$chatDto -> setTypeTime ( 1 );
( new Chat ()) -> sendMsg ( $chatDto );
2022-07-01 12:45:43 +00:00
}
unset ( $goodt );
header ( 'location: main.php' );
die ();
} else {
if ( $ua [ 'room' ] != $u -> info [ 'room' ]) {
2023-01-10 16:29:32 +00:00
//Персонаж в другой комнате
$u -> error = 'Персонаж находится в другой комнате' ;
2022-07-01 12:45:43 +00:00
} else {
2023-01-10 16:29:32 +00:00
$u -> error = 'Персонаж имеет слишком малый уровень жизней.' ;
2022-07-01 12:45:43 +00:00
}
}
} else {
2023-01-10 16:29:32 +00:00
//Н а персонажа нельзя напасть
$u -> error = 'Персонаж не в игре, либо на нем нет метки' ;
2022-07-01 12:45:43 +00:00
}
} else {
2023-01-10 16:29:32 +00:00
$u -> error = 'Вам запрещается атаковать без разрешения...' ;
2022-07-01 12:45:43 +00:00
}
2022-06-06 21:30:34 +00:00
}
2022-07-01 12:45:43 +00:00
if ( $ul == 1 ) {
$act = 1 ;
2022-06-06 21:30:34 +00:00
}
/*-----------------------*/
2022-07-01 12:45:43 +00:00
if ( $u -> info [ 'battle' ] == 0 ) {
2023-04-15 19:18:30 +00:00
$btl_last = Db :: getRow (
'select id, battle from battle_users where uid = ? and finish = 0 limit 1' , [ $u -> info [ 'id' ]]
);
2022-06-06 21:30:34 +00:00
}
2024-01-05 22:14:35 +00:00
if ( $magic -> youuse > 0 ) {
$act = 1 ;
}
//Получение статов
if ( $act != - 2 ) {
$u -> stats = $u -> getStats ( $u -> info [ 'id' ], 0 , 1 );
$u -> aves = ItemsModel :: inventoryWeightAndItemQuantity ();
if ( ! isset ( $sleep [ 'id' ])) {
$act2 = $u -> testItems ( $u -> info [ 'id' ], $u -> stats , 0 );
}
if ( $act2 != - 2 && $act == - 2 ) {
$act = $act2 ;
}
}
//Проверяем квесты на готовность
if ( in_array (
$u -> room [ 'file' ],
[ 'dungeon_enter' , 'dungeon_enter_all' , 'enterbezdna' , 'entercat' , 'enterdrago' , 'entergrib' , 'enternizin' , 'enterptp' , 'house_belaun' , 'dungeon' ]
)) {
$q -> testquest ();
}
$iloc = '' ;
$iloce = '' ;
$img = Config :: img ();
$sp = Db :: getRows (
'select * from items_local where (room = ? or room = -1) and `delete` = 0 and user_take = 0 and tr_login = ?' ,
[ $u -> info [ 'room' ], $u -> info [ 'login' ]]
);
foreach ( $sp as $pl ) {
$itmo = Db :: getRow ( 'select id, name, img from items_main where id = ?' , [ $pl [ 'item_id' ]]);
if ( isset ( $itmo [ 'id' ])) {
$tk = 1 ;
$glid = 0 ;
//
if ( $pl [ 'room' ] != - 1 && $pl [ 'room' ] != $u -> info [ 'room' ]) {
if ( isset ( $_GET [ 'take_loc_item' ]) && $_GET [ 'take_loc_item' ] == $pl [ 'id' ]) {
$iloce = 'Вы находитесь в другой комнате...' ;
}
$tk = 0 ;
} elseif ( $pl [ 'tr_login' ] != '0' && $pl [ 'tr_login' ] != $u -> info [ 'login' ]) {
if ( isset ( $_GET [ 'take_loc_item' ]) && $_GET [ 'take_loc_item' ] == $pl [ 'id' ]) {
$iloce = 'Данный предмет для другого персонажа...' ;
}
$tk = 0 ;
} elseif ( $pl [ 'tr_sex' ] != - 1 && $pl [ 'tr_sex' ] != $u -> info [ 'sex' ]) {
if ( isset ( $_GET [ 'take_loc_item' ]) && $_GET [ 'take_loc_item' ] == $pl [ 'id' ]) {
$iloce = 'Данный предмет для противоположного пола...' ;
}
$tk = 0 ;
}
if ( $pl [ 'time' ] + 86400 < time ()) {
//Н е успели поднять
$glid = 1 ;
Db :: sql ( 'update items_local set `delete` = unix_timestamp() where id = ?' , [ $pl [ 'id' ]]);
} elseif ( isset ( $_GET [ 'take_loc_item' ]) && $_GET [ 'take_loc_item' ] == $pl [ 'id' ]) {
//
if ( $u -> info [ 'battle' ] > 0 && $tk == 1 ) {
$iloce = 'Вы не можете поднять предмет, завершите поединок...' ;
} elseif ( $tk == 1 ) {
$iloce = 'Вы успешно подняли предмет "' . $itmo [ 'name' ] . '" в локации "' . $u -> room [ 'name' ] . '".' ;
Db :: sql (
'update items_local set `delete` = unix_timestamp(), user_take = ? where id = ?' ,
[ $u -> info [ 'id' ], $pl [ 'id' ]]
);
//выдаем предмет
$glid = 1 ;
if ( $pl [ 'data' ] == '0' ) {
ItemsModel :: addItem (
$pl [ 'item_id' ], $u -> info [ 'id' ], '|from_loc_id=' . $pl [ 'id' ] . '|from_loc=' . $u -> info [ 'room' ]
);
} else {
ItemsModel :: addItem (
$pl [ 'item_id' ], $u -> info [ 'id' ],
'|from_loc_id=' . $pl [ 'id' ] . '|from_loc=' . $u -> info [ 'room' ] . '|' . $pl [ 'data' ]
);
}
}
}
if ( $glid == 0 ) {
if ( $tk == 1 && $pl [ 'tr_login' ] == '0' ) {
$tk = 2 ;
}
$whoCanPickUp = '\n' . match ( true ) {
$pl [ 'tr_login' ] => " Предмет для игрока { $pl [ 'tr_login' ] } " ,
$pl [ 'tr_sex' ] == 0 => 'Предмет для мужчин' ,
$pl [ 'tr_sex' ] == 1 => 'Предмет для женщин' ,
default => 'Предмет может подобрать каждый'
};
$iloc .= <<< HTML
< a class = " tolobf $tk " href = " /main.php?take_loc_item { $pl [ 'id' ] } " target = " main " >
< div class = " outer " >
< div class = " middle " >
< div class = " inner " >
< img src = " $img /i/items/ { $itmo [ 'img' ] } " title = " Забрать « { $itmo [ 'name' ] } ». $whoCanPickUp " alt = " " >
</ div >
</ div >
</ div >
</ a >
HTML ;
}
}
unset ( $tk , $itmo );
}
$spl = Db :: getValue ( 'select exp from levels where nextlevel = ? order by exp limit 1' , [ $u -> info [ 'level' ] + 1 ]);
?>
< style >
/* Paste this css to your style sheet file or under head tag */
/* This only works with JavaScript ,
if it 's not present, don' t show loader */
. no - js #loader {
display : none ;
}
. js #loader {
display : block ;
position : absolute ;
left : 100 px ;
top : 0 ;
}
. se - pre - con {
position : fixed ;
left : 0 ;
top : 0 ;
width : 100 % ;
height : 100 % ;
z - index : 9999 ;
background : url ( default . gif ) center no - repeat #e2e0e1;
}
pre {
border : 1 px solid gray ;
border - radius : 5 px ;
padding : 3 px 6 px ;
background : #cecece;
color : black ;
font - family : Arial , sans - serif ;
font - size : 12 px ;
}
</ style >
< link href = " <?= Config::img() ?>/css/main.css " rel = " stylesheet " type = " text/css " >
< link rel = " stylesheet " href = " /css/training/modal.css " >
< div class = " se-pre-con " id = " se-pre-con " ></ div >
< ? php
if ( ! isset ( $_GET [ 'mAjax' ]) && ! isset ( $_GET [ 'ajaxHostel' ])) {
echo ' <! DOCTYPE html >
< div style = " padding-top:0; margin-top:17px; /*height:100%;*/ background-color:#e2e0e1; " > ' ;
}
2022-07-01 12:45:43 +00:00
if ( isset ( $btl_last [ 'id' ]) && $u -> info [ 'battle' ] == 0 ) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/btl_.php' );
2022-07-01 12:45:43 +00:00
$u -> info [ 'battle_lsto' ] = true ;
} elseif ( $u -> info [ 'battle' ] == 0 ) {
2023-01-10 16:29:32 +00:00
//Проверка/Снятие предметов
2022-07-01 12:45:43 +00:00
if ( ! isset ( $sleep [ 'id' ])) {
$act2 = $u -> testItems ( $u -> info [ 'id' ], $u -> stats , 0 );
}
if ( $act2 != - 2 && $act == - 2 ) {
$act = $act2 ;
}
if ( $u -> room [ 'block_all' ] != 0 ) {
unset ( $_GET [ 'inv' ], $_GET [ 'skills' ], $_GET [ 'anketa' ]);
}
if ( ! isset ( $u -> tfer [ 'id' ]) && $u -> room [ 'block_all' ] == 0 ) {
2023-01-10 16:29:32 +00:00
//Одеть/снять предмет
2022-07-01 12:45:43 +00:00
if ( isset ( $_GET [ 'rstv' ]) && isset ( $_GET [ 'inv' ])) {
2023-01-12 03:08:32 +00:00
$u -> freeStatsMod ( $_GET [ 'rstv' ], $_GET [ 'mf' ], $u -> info [ 'id' ]);
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'ufs2' ]) && isset ( $_GET [ 'inv' ])) {
2023-01-12 03:08:32 +00:00
$u -> freeStats2Item ( $_GET [ 'itmid' ], $_GET [ 'ufs2' ], $u -> info [ 'id' ], 1 );
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'ufs2mf' ]) && isset ( $_GET [ 'inv' ])) {
2023-01-12 03:08:32 +00:00
$u -> freeStats2Item ( $_GET [ 'itmid' ], $_GET [ 'ufs2mf' ], $u -> info [ 'id' ], 2 );
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'ufsmst' ]) && isset ( $_GET [ 'inv' ])) {
2023-01-12 03:08:32 +00:00
$u -> itemsSmSave ( $_GET [ 'itmid' ], $_GET [ 'ufsmst' ], $u -> info [ 'id' ]);
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'ufsms' ]) && isset ( $_GET [ 'inv' ])) {
2023-01-12 03:08:32 +00:00
$u -> itemsSmSave ( $_GET [ 'itmid' ], $_GET [ 'ufsms' ] + 100 , $u -> info [ 'id' ]);
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'ufs' ]) && isset ( $_GET [ 'inv' ])) {
2023-01-12 03:08:32 +00:00
$u -> freeStatsItem ( $_GET [ 'itmid' ], $_GET [ 'ufs' ], $u -> info [ 'id' ]);
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'sid' ]) && isset ( $_GET [ 'inv' ])) {
$act = $u -> snatItem ( $_GET [ 'sid' ], $u -> info [ 'id' ]);
} elseif ( isset ( $_GET [ 'oid' ]) && isset ( $_GET [ 'inv' ])) {
$act = $u -> odetItem ( $_GET [ 'oid' ], $u -> info [ 'id' ]);
} elseif ( isset ( $_GET [ 'item_rune' ]) && isset ( $_GET [ 'inv' ])) {
2023-01-12 03:08:32 +00:00
$u -> runeItem ( null );
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'remitem' ], $_GET [ 'inv' ])) {
$act = $u -> snatItemAll ( $u -> info [ 'id' ]);
} elseif ( isset ( $_GET [ 'delete' ]) && isset ( $_GET [ 'inv' ]) && $u -> newAct ( $_GET [ 'sd4' ])) {
if ( $u -> info [ 'allLock' ] < time ()) {
$u -> deleteItem ( intval ( $_GET [ 'delete' ]), $u -> info [ 'id' ]);
} else {
2023-01-10 16:29:32 +00:00
echo '<script>setTimeout(function(){alert("Вам запрещено удалять предметы до ' . date (
2022-12-19 18:26:14 +00:00
'd.m.y H:i' , $u -> info [ 'allLock' ]
) . '")},250);</script>' ;
2022-07-01 12:45:43 +00:00
}
} elseif ( isset ( $_GET [ 'unstack' ]) && isset ( $_GET [ 'inv' ]) && $u -> newAct ( $_GET [ 'sd4' ])) {
$u -> unstack ( intval ( $_GET [ 'unstack' ]), intval ( $_GET [ 'unstackCount' ]));
} elseif ( isset ( $_GET [ 'stack' ]) && isset ( $_GET [ 'inv' ])) {
$u -> stack ( $_GET [ 'stack' ]);
} elseif ( isset ( $_GET [ 'end_qst_now' ])) {
$q -> endq (( int ) $_GET [ 'end_qst_now' ], 'end' );
}
2023-01-10 16:29:32 +00:00
//Использовать эффект
2022-07-01 12:45:43 +00:00
if ( isset ( $_GET [ 'use_pid' ])) {
$magic -> useItems (( int ) $_GET [ 'use_pid' ]);
}
} else {
if ( $u -> room [ 'block_all' ] > 0 ) {
2023-01-10 16:29:32 +00:00
$u -> error = 'В данной локации запрещено пользоваться чем-либо...' ;
2022-07-01 12:45:43 +00:00
}
}
2022-06-06 21:30:34 +00:00
}
/*-----------------------*/
2022-12-19 18:26:14 +00:00
if ( isset ( $_GET [ 'security' ]) && ! isset ( $u -> tfer [ 'id' ]) && $trololo == 1 ) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/_changepass.php' );
2022-12-30 19:03:37 +00:00
} elseif ( isset ( $_GET [ 'friends' ]) && ! isset ( $u -> tfer [ 'id' ])) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/_friends.php' );
2022-07-01 12:45:43 +00:00
} elseif (( $u -> info [ 'admin' ] > 0 || $u -> info [ 'level' ] > 7 || $u -> info [ 'align' ] == 50 ) && isset ( $_GET [ 'notepad' ]) && ! isset ( $u -> tfer [ 'id' ])) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/notepad.php' );
2023-12-08 16:14:29 +00:00
} elseif ( isset ( $_GET [ 'moderation' ])) {
2022-12-30 19:03:37 +00:00
require_once ( 'modules_data/_mod.php' );
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'vip' ]) && ! isset ( $u -> tfer [ 'id' ])) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/vip.php' );
2023-04-15 19:18:30 +00:00
} elseif (
(
isset ( $_GET [ 'zayvka' ]) &&
$u -> info [ 'battle' ] == 0
) ||
(
isset ( $_GET [ 'zayvka' ]) &&
2024-01-08 01:33:20 +00:00
( ! isset ( $_GET [ 'r' ]) || $_GET [ 'r' ] == 6 || $_GET [ 'r' ] == 7 ) &&
2023-04-15 19:18:30 +00:00
$u -> info [ 'battle' ] > 0
) &&
! isset ( $u -> tfer [ 'id' ])
) {
require_once ( 'modules_data/_zv.php' );
2022-12-30 19:03:37 +00:00
} elseif ( isset ( $_GET [ 'alh' ]) && ! isset ( $u -> tfer [ 'id' ])) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/_alh.php' );
2023-07-19 12:36:13 +00:00
} elseif ( isset ( $_GET [ 'clan' ]) && ! isset ( $u -> tfer [ 'id' ])) {
2023-06-22 13:53:42 +00:00
require_once ( 'modules_data/_clan.php' ); //Панель кланов
} elseif ( isset ( $_GET [ 'alhp' ]) && ( $u -> info [ 'admin' ] == 1 || $u -> info [ 'align' ] == 50 ) && ! isset ( $u -> tfer [ 'id' ])) {
require_once ( 'modules_data/_alhp.php' ); //Панель алхимиков
} elseif ( $u -> info [ 'align' ] > 0 && ! isset ( $u -> tfer [ 'id' ]) && ! empty ( $_GET [ 'ap' ])) {
require_once ( 'modules_data/alignPanel.php' ); //Панель склонностей, GET чтобы вызывать по ссылке.
2022-07-01 12:45:43 +00:00
} elseif ( $u -> info [ 'battle' ] != 0 ) {
2023-01-10 16:29:32 +00:00
//поединок
2022-07-01 12:45:43 +00:00
if (( ! isset ( $btl_last [ 'id' ]) || $u -> info [ 'battle' ] > 0 ) && ! isset ( $u -> info [ 'battle_lsto' ])) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/btl_.php' );
2022-07-01 12:45:43 +00:00
echo '<script type="text/javascript" src="js/onlineList.js"></script>' ;
}
} else {
if ( isset ( $_GET [ 'talk' ]) && ! isset ( $u -> tfer [ 'id' ])) {
2023-12-08 17:32:22 +00:00
echo " <script>document.getElementById('se-pre-con').parentNode.removeChild(document.getElementById('se-pre-con'));</script> " ;
2022-07-01 12:45:43 +00:00
if ( $u -> info [ 'dnow' ] > 0 ) {
2022-12-19 18:26:14 +00:00
$d = new Dungeon ;
2022-07-01 12:45:43 +00:00
}
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/_dialog.php' );
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'inv' ]) && ! isset ( $u -> tfer [ 'id' ]) && $trololo == 1 ) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/_inv.php' );
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'add_eff' ]) && ! isset ( $u -> tfer [ 'id' ]) && $trololo == 1 ) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/add_eff.php' );
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'referals' ]) && $trololo == 1 && ! isset ( $u -> tfer [ 'id' ])) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/_ref.php' );
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'obraz' ]) && ! isset ( $u -> tfer [ 'id' ]) && $trololo == 1 ) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/_obraz.php' );
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'skills' ]) && ! isset ( $u -> tfer [ 'id' ]) && $trololo == 1 ) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/_umenie.php' );
2023-01-12 00:58:26 +00:00
} elseif (( isset ( $_GET [ 'transfer' ]) || isset ( $u -> tfer [ 'id' ])) && $u -> info [ 'level' ] >= Config :: get (
'level_ransfer'
) && $trololo == 1 && $u -> info [ 'inTurnir' ] == 0 && $u -> info [ 'inTurnirnew' ] == 0 ) {
2022-07-01 12:45:43 +00:00
if ( $u -> info [ 'allLock' ] > time ()) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/_locations.php' );
2023-01-10 16:29:32 +00:00
echo '<script>setTimeout(function(){alert("Вам запрещены передачи до ' . date (
2022-12-19 18:26:14 +00:00
'd.m.y H:i' , $u -> info [ 'allLock' ]
) . '")},250);</script>' ;
2022-07-01 12:45:43 +00:00
} else {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/_transfers.php' );
2022-07-01 12:45:43 +00:00
}
} elseif ( isset ( $_GET [ 'anketa' ]) && ! isset ( $u -> tfer [ 'id' ]) && $trololo == 1 ) {
2022-08-11 10:38:38 +00:00
require_once ( 'settings.php' );
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'newanimal' ]) && $trololo == 1 ) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/_newanimal.php' );
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'act_trf' ]) && $u -> room [ 'block_all' ] == 0 ) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/act_trf.php' );
2022-07-01 12:45:43 +00:00
} elseif ( isset ( $_GET [ 'titul' ]) && $u -> room [ 'block_all' ] == 0 ) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/titul.php' );
2022-07-01 12:45:43 +00:00
} elseif ( ! isset ( $u -> tfer [ 'id' ])) {
2022-08-11 10:38:38 +00:00
require_once ( 'modules_data/_locations.php' );
2022-07-01 12:45:43 +00:00
}
2022-06-06 21:30:34 +00:00
}
2022-07-01 12:45:43 +00:00
if ( $iloc != '' ) {
if ( $iloce != '' ) {
2023-04-10 21:51:54 +00:00
$iloc = '<div style="padding:10px; color: red;">' . $iloce . '</div>' . $iloc ;
2022-07-01 12:45:43 +00:00
}
2023-12-08 17:32:22 +00:00
$iloc = <<< HTML
< style >
. tolobf0 {
display : inline - block ;
width : 80 px ;
height : 80 px ;
background - color : #e5e5e5;
text - align : center ;
}
. tolobf0 : hover {
background - color : #d5d5d5;
text - align : center ;
}
. tolobf2 {
display : inline - block ;
width : 80 px ;
height : 80 px ;
background - color : #FFD700;
text - align : center ;
}
. tolobf2 : hover {
background - color : #DAA520;
text - align : center ;
}
. tolobf1 {
display : inline - block ;
width : 80 px ;
height : 80 px ;
background - color : #d5d5e5;
text - align : center ;
}
. tolobf1 : hover {
background - color : #d5d5d5;
text - align : center ;
}
. outer {
display : table ;
position : absolute ;
height : 80 px ;
width : 80 px ;
}
. middle {
display : table - cell ;
vertical - align : middle ;
}
. inner {
margin - left : auto ;
margin - right : auto ;
width : 80 px ;
}
</ style >
< h3 > В комнате разбросаны предметы </ h3 >
HTML ;
$tjs = $iloc ;
2022-07-01 12:45:43 +00:00
} else {
2023-12-08 17:32:22 +00:00
$tjs = '' ;
2022-06-06 21:30:34 +00:00
}
2022-07-01 12:45:43 +00:00
unset ( $iloc , $iloce );
2022-06-06 21:30:34 +00:00
2024-01-05 22:14:35 +00:00
/*-----------------------*/
2023-04-10 21:51:54 +00:00
//Сломаное обучение. Как оно достало! Ins. 🤬
//$training_manager->render();
2022-06-06 21:30:34 +00:00
?>
2023-12-08 17:32:22 +00:00
2022-06-06 21:30:34 +00:00
< script >
2023-12-08 17:32:22 +00:00
top . myexpLineTop27 ( '<?= $u->info[' exp '] ?>' , '<?= $spl ?>' );
top . frames [ 'main' ] . locitems = 1 ;
parent . $ ( '#canal1' ) . html ( '<?= $tjs ?>' )
top . sd4key = " <?= $u->info ['nextAct'] ?> " ;
var battle = < ? = ( int ) $u -> info [ 'battle' ] ?> ;
top . hic ();
2022-07-01 12:45:43 +00:00
//Loader
// Wait for window load
$ ( window ) . load ( function () {
// Animate loader off screen
$ ( " .se-pre-con " ) . fadeOut ( 100 );
});
2022-12-19 21:24:12 +00:00
</ script >
2023-06-11 11:51:42 +00:00