2022-06-06 21:30:34 +00:00
< ?
if ( isset ( $s [ 1 ]) && $s [ 1 ] == '3/altar' ) {
/*
2023-01-10 16:29:32 +00:00
АЛтарь
* Можно получить один из 4 eff
2022-06-06 21:30:34 +00:00
*/
2023-01-10 16:29:32 +00:00
//В с е переменные сохранять в массиве $vad !
2022-06-06 21:30:34 +00:00
$vad = array (
'go' => true
);
$vad [ 'test1' ] = mysql_fetch_array ( mysql_query ( 'SELECT COUNT(*) FROM `dungeon_actions` WHERE `dn` = "' . $u -> info [ 'dnow' ] . '" AND `vars` = "obj_act' . $obj [ 'id' ] . '" LIMIT 1' ));
if ( $vad [ 'test1' ][ 0 ] > 0 ) {
2023-01-10 16:29:32 +00:00
$r = 'Ничего не произошло...' ;
2022-06-06 21:30:34 +00:00
$vad [ 'go' ] = false ;
}
if ( $vad [ 'go' ] == true ) {
mysql_query ( ' INSERT INTO `dungeon_actions` ( `dn` , `time` , `x` , `y` , `uid` , `vars` , `vals` ) VALUES (
" '. $u->info ['dnow'].' " , " '.time().' " , " '. $obj['x'] .' " , " '. $obj['y'] .' " , " '. $u->info ['id'].' " , " obj_act'. $obj['id'] .' " , " '. $vad['bad'] .' "
) ' );
$vad [ 'i1' ] = array (
0 => 422 ,
1 => 423 ,
2 => 424 ,
3 => 425 ,
4 => 458
);
$vad [ 'i2' ] = array (
2023-01-10 16:29:32 +00:00
422 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("422","' . $u -> info [ 'id' ] . '","Благословение Чернокнижника","add_m6=5|nofastfinisheff=1|onlyOne=1","60","' . time () . '") ' ,
423 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("423","' . $u -> info [ 'id' ] . '","Благословение Эпископа","add_m10=5|nofastfinisheff=1|onlyOne=1","61","' . time () . '") ' ,
424 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("424","' . $u -> info [ 'id' ] . '","Благословение Офицера Глубин","add_speedhp=-50|nofastfinisheff=1|onlyOne=1","62","' . time () . '") ' ,
425 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("425","' . $u -> info [ 'id' ] . '","Благословение Стражей","add_m5=100|nofastfinisheff=1|onlyOne=1","63","' . time () . '") ' ,
458 => 'INSERT INTO `eff_users` (`id_eff`,`uid`,`name`,`data`,`overType`,`timeUse`) VALUES ("458","' . $u -> info [ 'id' ] . '","Благословение Повелителя","add_m7=5|nofastfinisheff=1|onlyOne=1","76","' . time () . '") ' );
2022-06-06 21:30:34 +00:00
$vad [ 'i1' ] = $vad [ 'i1' ][ rand ( 0 , count ( $vad [ 'i1' ]) - 1 )];
if ( isset ( $vad [ 'i2' ][ $vad [ 'i1' ]]) ) {
mysql_query ( 'DELETE FROM `eff_users` WHERE `uid` = "' . $u -> info [ 'id' ] . '" AND `id_eff` = "' . $vad [ 'i1' ] . '" AND `delete` = 0' );
mysql_query ( $vad [ 'i2' ][ $vad [ 'i1' ]]);
2023-01-10 16:29:32 +00:00
$r = 'Н а вас наложено заклятие!' ;
2022-06-06 21:30:34 +00:00
} else {
2023-01-10 16:29:32 +00:00
$r = 'Н а вас наложено заклятие! (эффект не найден, пожалуйся Админам)' ;
2022-06-06 21:30:34 +00:00
}
}
unset ( $vad );
}
?>