Вход Регистрация
Файл: element_starting_game.php
Строк: 236
<?php
$starting_on 
'';
require_once 
'./element_options/element_options.php';

    
// Если пользователь не авторизован/зарегистрирован, делаем следующеё
    
if (!$user) { 
    
        if (
$go == 'male' or $go == 'female') {
            
$login 'Странник';
            
$password md5(md5('element'.rand(0,1000)));
            
            
$refferer = (isset($_COOKIE['refferer']) AND is_numeric($_COOKIE['refferer'])) ? (int)mysql_real_escape_string($_COOKIE['refferer']) : false;
            if (
$refferer$ref $refferer; else $ref $refferer 0;
                
            
// Регистрация / Посл. вход / Почта / Бан / Ник / Стихия / Пол
            
$lost_other time().' '.time().' 0 0 1 1 1 0';
            
mysql_query("INSERT INTO `element_user` SET `lost_login` = '$login',
                                                        `lost_password` = '
$password',
                                                        `lost_level` = '1',
                                                        `lost_exp` = '0 0',
                                                        `lost_male` = '
$go',
                                                        `lost_params_strlen` = '100',
                                                        `lost_params_heatpoints` = '100',
                                                        `lost_params_energy` = '20:20:"
.time()."',
                                                        `lost_params_protection` = '100',
                                                        `lost_params_summa` = '300',
                                                        `lost_other` = '
$lost_other',
                                                        `lost_labirint` = '0:0:0:0:0:0:0:0:0',
                                                        `lost_abilities_ogon` = '0',
                                                        `lost_abilities_voda` = '0',
                                                        `lost_abilities_zemlya` = '0',
                                                        `lost_abilities_vozduh` = '0',
                                                        `lost_arena_tvt_rating` = '1000',
                                                        `lost_arena_pvp_rating` = '1000',
                                                        `lost_refferer` = '
$ref',
                                                        `lost_params_training` = '0:0:0',
                                                        `lost_start_ip` = '"
.my_ip()."',
                                                        `lost_ip` = '"
.my_ip()."',
                                                        `lost_user_agent` = '"
.$_SERVER['HTTP_USER_AGENT']."',
                                                        `lost_user_agent_2` = '"
.$_SERVER['HTTP_USER_AGENT']."'");
            
$insert_user mysql_insert_id();
            
            if (
$ref 0) {
                
mysql_query("INSERT INTO `element_refferer` SET `id_user` = '$ref', `id_refferer` = '$insert_user'");
            }
            
            
setcookie('id', (int)$insert_usertime()+3600*24*365'/');
            
setcookie('password',$passwordtime()+3600*24*365'/');    
            
header('location: /start');
            exit;
        }
    
    
$title 'Выбор пола';
    require_once 
'./element_include/element_head.php';
    require_once 
'./element_include/element_header_user_false.php';
    echo 
'<div class="cntr game-master mt5 mb5 small">Приветствуем Вас в <span class="bold">Мире Стихий!</span><br/>Выберите пожалуйста Ваш пол: </div>';
    echo 
'<div class="nfl cntr p5 mb5 mt5 w80 mlra">';
    
        echo 
'<span class="inbl w45 va_t">
                <a class="atask" href="/start?go=male">
                    <span class="inbl prel">
                        <img alt="male" src="/images/male.jpg" alt=""/>
                    </span><br/>
                    <span class="mt3">Мужчина</span>
                </a>
              </span>'
;
    
        echo 
'<span class="inbl w45 va_t">
                <a class="atask" href="/start?go=female">
                    <span class="inbl prel">
                        <img alt="female" src="/images/female.jpg" alt=""/>
                    </span><br/>
                    <span class="mt3">Женщина</span>
                </a>
              </span>'
;
    
    echo 
'</div>';
    echo 
'<div class="cntr mb5 mt5"><a class="button w50" href="/">Выход</a></div>';
    require_once 
'./element_include/element_foot_user_battle_true.php'
    exit;
    }
    
    
$training_battle readcache('ElementUser'.$user['lost_id'].'training');
    
    
// Если не прошел обучение
    
if ($user['lost_race'] == AND !$training_battle) {
    
        if (
$go == 'start') {
            require_once 
'./element_function/element_function_battle.php';
            
$bot_hp GenerationMaxHeatpoints(125);
            
$myy_hp GenerationMaxHeatpoints($user['lost_params_heatpoints']);
        
            
$journal = array('<span class="lngreen bold">Обучение началось!</span>');
            
$training = array('bot'   => array('other_hp' => $bot_hp'battle_hp' => $bot_hp'time' => false'life' => 0),
                              
'user'  => array('other_hp' => $myy_hp'battle_hp' => $myy_hp'time' => false'life' => 0),
                              
'other' => array('training' => 1'timer' => time()));
                    
            
writecache('element_training_journal_user_id'.$user['lost_id'], $journal);        
            
writecache('element_training_user_id'.$user['lost_id'], $training);
            
writecache('ElementUser'.$user['lost_id'].'training'true);
            
header('Location: /training');
            exit;
        }
    
    
$title 'Выбор стихии';
    require_once 
'./element_include/element_head.php';
    require_once 
'./element_include/element_header_user_false.php';
    echo 
'<div class="cntr game-master mt5 mb5 small"><img alt="female" src="/images/help.jpg" alt=""/><br/>Отлично! Теперь пройдите обучение и выберите для себя подходящую стихию!</div>';
    echo 
'<div class="cntr small mt10 mb5"><a class="button w70" href="/start?go=start">Начать обучение!</a></div>';
    require_once 
'./element_include/element_foot_user_battle_true.php'
    exit;
    }
    
    
    
// Если прошел обучение, но не выбрал стихию
    
if ($user['lost_race'] == AND $training_battle) {
    
        
// Выбираем стихию
        
if ($id AND $id >= AND $id <= 4) {
            
$user['lost_race'] = $id;
            
writecache('element_users_id_'.$user['lost_id'], $user);
            
user_list_update($user['lost_id']);    
            
header('Location: /');
            exit;
        }
    
    
$title 'Выбор стихии';
    require_once 
'./element_include/element_head.php';
    require_once 
'./element_include/element_header_user_false.php';
    echo 
'<div class="cntr game-master mt5 mb5 small">Вы успешно прошли обучение!<br/>Каждая стихия дает плюсы своему умению в бою. Теперь выберите пожалуйста стихию, за которую Вы хотите играть!</div>';
    
    echo 
'<div class="nfl cntr small p5 mb5 mt5 mlra">';
        

        echo 
'<span class="inbl w23 va_t">
                <a class="atask" href="/start?id=1">
                    <span class="inbl prel">
                        <img width="45" height="45" alt="male" src="/images/race/ogon.png" alt=""/>
                    </span><br/>
                    <span class="mt3">Огонь</span>
                </a>
              </span>'
;
    
        echo 
'<span class="inbl w23 va_t">
                <a class="atask" href="/start?id=2">
                    <span class="inbl prel">
                        <img width="45" height="45" alt="female" src="/images/race/voda.png" alt=""/>
                    </span><br/>
                    <span class="mt3">Вода</span>
                </a>
              </span>'
;     

        echo 
'<span class="inbl w23 va_t">
                <a class="atask" href="/start?id=3">
                    <span class="inbl prel">
                        <img width="45" height="45" alt="male" src="/images/race/vozdukh.png" alt=""/>
                    </span><br/>
                    <span class="mt3">Воздух</span>
                </a>
              </span>'
;
    
        echo 
'<span class="inbl w23 va_t">
                <a class="atask" href="/start?id=4">
                    <span class="inbl prel">
                        <img width="45" height="45" alt="female" src="/images/race/zemlya.png" alt=""/>
                    </span><br/>
                    <span class="mt3">Земля</span>
                </a>
              </span>'
;             
    
    echo 
'</div>';
    
    echo 
'<div class="nfl cntr small p5 mb5 mt5 mlra">';
    echo 
'<div class="white ml2 mr2 small">';
    echo 
'<img src="/images/icons/1_online.png"> <span class="error1 bold">Стихия Огня</span><br/> При активности умения "<span class="bold">Огненная сила</span>", добавляет <span class="yellow1 bold">+10%</span> к Вашему урону';
    echo 
'</div>';
    echo 
'<div class="hr mt5 mb5"></div>';
    
    echo 
'<div class="white ml2 mr2 mb5 small">';
    echo 
'<img src="/images/icons/2_online.png"> <span class="admin bold">Стихия Воды</span><br/> При активности умения "<span class="bold">Водяной крит</span>", добавляет <span class="yellow1 bold">+10%</span> к критическому урону';
    echo 
'</div>';
    echo 
'<div class="hr mt5 mb5"></div>';
    
    echo 
'<div class="white ml2 mr2 mb5 small">';
    echo 
'<img src="/images/icons/3_online.png"> <span class="ccc bold">Стихия Воздуха</span><br/> При срабатывании умения "<span class="bold">Ловушка ветра</span>", добавляет <span class="yellow1 bold">+10%</span> к забираемому здоровья врага';
    echo 
'</div>';
    echo 
'<div class="hr mt5 mb5"></div>';
    
    echo 
'<div class="white ml2 mr2 mb5 small">';
    echo 
'<img src="/images/icons/4_online.png"> <span class="lngreen bold">Стихия Земли</span><br/> При активности умения "<span class="bold">Земляная стойкость</span>", поглощает урон врага по вам на <span class="yellow1 bold">+10%</span> урон';
    echo 
'</div>';
    echo 
'</div>';
    
    require_once 
'./element_include/element_foot_user_battle_true.php'
    exit;
    }
    
header('Location: /');
?>
Онлайн: 0
Реклама