Exemplo n.º 1
0
    $mode = 'itemmain';
} else {
    $mode = 'command';
}
$cmd = $main = '';
if ((strpos($action, 'corpse') === 0 || strpos($action, 'pacorpse') === 0) && $gamestate < 40) {
    $cid = strpos($action, 'corpse') === 0 ? str_replace('corpse', '', $action) : str_replace('pacorpse', '', $action);
    if ($cid) {
        $result = $db->query("SELECT * FROM {$tablepre}players WHERE pid='{$cid}' AND hp=0");
        if ($db->num_rows($result) > 0) {
            $edata = $db->fetch_array($result);
            include_once GAME_ROOT . './include/game/battle.func.php';
            findcorpse($edata);
            extract($edata, EXTR_PREFIX_ALL, 'w');
            init_battle(1);
            $main = 'battle';
        }
    }
}
if ($hp > 0 && $coldtimeon && $showcoldtimer && $rmcdtime) {
    $log .= "行动冷却时间:<span id=\"timer\" class=\"yellow\">0.0</span>秒<script type=\"text/javascript\">demiSecTimerStarter({$rmcdtime});</script><br>";
}
if ($club == 0) {
    include_once GAME_ROOT . './include/game/clubslct.func.php';
    getclub($name, $c1, $c2, $c3);
    $clubavl[0] = 0;
    $clubavl[1] = $c1;
    $clubavl[2] = $c2;
    $clubavl[3] = $c3;
}
include template('game');
Exemplo n.º 2
0
     $index = rand(1, count($stitemlist) - 1);
     list($itm[3], $itmk[3], $itme[3], $itms[3], $itmsk[3]) = explode(",", $stitemlist[$index]);
 } while (!$itmk[3]);
 do {
     $index = rand(1, count($stitemlist) - 1);
     list($itm[4], $itmk[4], $itme[4], $itms[4], $itmsk[4]) = explode(",", $stitemlist[$index]);
 } while (!$itmk[4] || $itmk[3] == $itmk[4]);
 if (strpos($wepk, 'WG') === 0) {
     $itm[3] = '手枪子弹';
     $itmk[3] = 'GB';
     $itme[3] = 1;
     $itms[3] = 12;
     $itmsk[3] = '';
 }
 include_once GAME_ROOT . './include/game/clubslct.func.php';
 getclub($name, $tc1, $tc2, $tc3);
 if ($tc1 == 7 || $tc2 == 7 || $tc3 == 7) {
     if (rand(1, 10) % 2 == 1) {
         $itm[4] = '生命探测器';
         $itmk[4] = 'ER';
         $itme[4] = 3;
         $itms[4] = 1;
         $itmsk[4] = '';
     } else {
         $itm[4] = '电池';
         $itmk[4] = 'BE';
         $itme[4] = 2;
         $itms[4] = 1;
         $itmsk[4] = '';
     }
 }
Exemplo n.º 3
0
function selectclub($id)
{
    global $name, $club;
    if ($club != 0) {
        return 1;
    }
    if ($id == 0) {
        return 2;
    }
    getclub($name, $c1, $c2, $c3);
    if ($id == 1) {
        $club = $c1;
        updateskill();
        return 0;
    }
    if ($id == 2) {
        $club = $c2;
        updateskill();
        return 0;
    }
    if ($id == 3) {
        $club = $c3;
        updateskill();
        return 0;
    }
    return 3;
}