Beispiel #1
0
function gamestateupdate()
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('sys'));
    if (!$gamestate) {
        //判定游戏准备
        if ($starttime && $now > $starttime - $startmin * 60) {
            gamestate_prepare_game();
        }
    }
    if ($gamestate == 10) {
        //判定游戏开始
        if ($now >= $starttime) {
            gamestate_start_game();
        }
    }
    if ($gamestate <= 50 && $bancombo == 1) {
        //判定限定解除
        if ($gamestate >= 40) {
            $gamestate = 21;
            systemputchat($now, 'bancombo');
        }
    }
}
Beispiel #2
0
function gamestateupdate()
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    $chprocess();
    eval(import_module('sys', 'gameflow_combo'));
    if ($gamestate < 40 && $gamestate >= 30 && $alivenum <= $combolimit) {
        //判定进入连斗条件1:停止激活时玩家数少于特定值
        $gamestate = 40;
        addnews($now, 'combo');
        systemputchat($now, 'combo');
    } elseif ($gamestate < 40 && $gamestate >= 20 && $combonum && $deathnum >= $combonum) {
        //判定进入连斗条件2:死亡人数超过特定公式计算出的值
        $real_combonum = $deathlimit + ceil($validnum / $deathdeno) * $deathnume;
        if ($deathnum >= $real_combonum) {
            $gamestate = 40;
            addnews($now, 'combo');
            systemputchat($now, 'combo');
        } else {
            $combonum = $real_combonum;
            addnews($now, 'comboupdate', $combonum, $deathnum);
            systemputchat($now, 'comboupdate', $combonum);
        }
    }
}
Beispiel #3
0
function gamestate_start_game()
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('sys'));
    $gamestate = 20;
    addnews($starttime, 'newgame', $gamenum);
    systemputchat($starttime, 'newgame');
}
Beispiel #4
0
function areawarn()
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('sys', 'map'));
    $areaaddlist = array_slice($arealist, $areanum + 1, $areaadd);
    $areawarn = 1;
    systemputchat($now, 'areawarn', $areaaddlist);
    return;
}
Beispiel #5
0
function duel($time = 0, $keyitm = '')
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('sys', 'player'));
    if ($gamestate < 30) {
        return 30;
    } elseif ($gamestate >= 50) {
        return 51;
    } else {
        $time = $time == 0 ? $now : $time;
        $gamestate = 50;
        save_gameinfo();
        addnews($time, 'duelkey', $name, $keyitm);
        addnews($time, 'duel');
        systemputchat($time, 'duel');
        return 50;
    }
}
Beispiel #6
0
function gameover($time = 0, $gmode = '', $winname = '')
{
    if (eval(__MAGIC__)) {
        return $___RET_VALUE;
    }
    eval(import_module('sys'));
    if ($gamestate < 10) {
        return;
    }
    if (!$gmode || $gmode == 'end2' && !$winname) {
        //在没提供游戏结束模式的情况下,自行判断模式
        if ($validnum <= 0) {
            //无激活者情况下,全部死亡
            $alivenum = 0;
            $winnum = 0;
            $winmode = 4;
            $winner = '';
        } else {
            //判断谁是最后幸存者
            $result = $db->query("SELECT * FROM {$tablepre}players WHERE hp>0 AND type=0");
            $alivenum = $db->num_rows($result);
            if (!$alivenum) {
                //全部死亡
                $winmode = 1;
                $winnum = 0;
                $winner = '';
            } else {
                if (!in_array($gametype, $teamwin_mode)) {
                    //非团队模式,判断最后幸存
                    if ($alivenum == 1) {
                        $winmode = 2;
                        $winnum = 1;
                        $wdata = $db->fetch_array($result);
                        $winner = $wdata['name'];
                        $db->query("UPDATE {$tablepre}players SET state='5' where pid='{$wdata['pid']}'");
                    } else {
                        //不满足游戏结束条件,返回
                        save_gameinfo();
                        return;
                    }
                } else {
                    $result = $db->query("SELECT teamID FROM {$tablepre}players WHERE type = 0 AND hp > 0");
                    $flag = 1;
                    $first = 1;
                    while ($data = $db->fetch_array($result)) {
                        if ($first) {
                            $first = 0;
                            $firstteamID = $data['teamID'];
                        } else {
                            if ($firstteamID != $data['teamID'] || !$data['teamID']) {
                                //如果有超过一种teamID,或有超过一个人没有teamID,则游戏还未就结束
                                $flag = 0;
                                break;
                            }
                        }
                    }
                    if ($flag && !$first) {
                        if (!$firstteamID) {
                            $db->query("UPDATE {$tablepre}players SET state='5' WHERE type = 0 AND hp > 0");
                            $result = $db->query("SELECT name,gd,icon,wep FROM {$tablepre}players WHERE type = 0 AND hp > 0");
                            $zz = $db->fetch_array($result);
                            $winner = $zz['name'];
                            $winnum = 1;
                        } else {
                            $db->query("UPDATE {$tablepre}players SET state='5' WHERE type = 0 AND teamID = '{$firstteamID}'");
                            $result = $db->query("SELECT name FROM {$tablepre}players WHERE type = 0 AND teamID = '{$firstteamID}'");
                            $winnum = $db->num_rows($result);
                            if ($winnum == 1) {
                                $result = $db->query("SELECT name,gd,icon,wep FROM {$tablepre}players WHERE type = 0 AND teamID = '{$firstteamID}'");
                                $zz = $db->fetch_array($result);
                                $winner = $zz['name'];
                            }
                        }
                    } else {
                        //不满足游戏结束条件,返回
                        save_gameinfo();
                        return;
                    }
                    if ($winnum > 1) {
                        $namelist = '';
                        $gdlist = '';
                        $iconlist = '';
                        $weplist = '';
                        while ($data = $db->fetch_array($result)) {
                            $namelist .= $data['name'] . ',';
                        }
                        $winner = substr($namelist, 0, -1);
                    }
                    $winmode = 2;
                }
            }
        }
    } else {
        //提供了游戏结束模式的情况下
        $winmode = substr($gmode, 3, 1);
        $winnum = 1;
        $winner = $winname;
    }
    $time = $time ? $time : $now;
    $result = $db->query("SELECT gid FROM {$wtablepre}winners ORDER BY gid DESC LIMIT 1");
    //判断当前游戏局数是否正确,以优胜列表为准
    if ($db->num_rows($result) && $gamenum <= $db->result($result, 0)) {
        $gamenum = $db->result($result, 0) + 1;
    }
    if ($winmode == 4 || $winmode == 0) {
        //无人参加;不需要记录任何资料
        $getime = $time;
        $db->query("INSERT INTO {$wtablepre}winners (gid,gametype,wmode,vnum,getime) VALUES ('{$gamenum}','{$gametype}','{$winmode}','{$validnum}','{$getime}')");
    } elseif ($winmode == 0 || $winmode == 1 || $winmode == 6) {
        //程序故障、全部死亡、GM中止,不需要记录优胜者资料
        $gstime = $starttime;
        $getime = $time;
        $gtime = $time - $starttime;
        $result = $db->query("SELECT name,killnum FROM {$tablepre}players WHERE type=0 order by killnum desc, lvl desc limit 1");
        $hk = $db->fetch_array($result);
        $hkill = $hk['killnum'];
        $hkp = $hk['name'];
        $db->query("INSERT INTO {$wtablepre}winners (gid,gametype,wmode,vnum,gtime,gstime,getime,hdmg,hdp,hkill,hkp) VALUES ('{$gamenum}','{$gametype}','{$winmode}','{$validnum}','{$gtime}','{$gstime}','{$getime}','{$hdamage}','{$hplayer}','{$hkill}','{$hkp}')");
    } else {
        //最后幸存、锁定解除、核爆全灭,需要记录优胜者资料
        if ($winnum == 1) {
            $result = $db->query("SELECT * FROM {$tablepre}players WHERE name='{$winner}' AND type=0");
            $pdata = $db->fetch_array($result);
            $result2 = $db->query("SELECT motto FROM {$gtablepre}users WHERE username='******'");
            $pdata['motto'] = $db->result($result2, 0);
            $result3 = $db->query("SELECT name,killnum FROM {$tablepre}players WHERE type=0 order by killnum desc, lvl desc limit 1");
            $hk = $db->fetch_array($result3);
            $pdata['hkill'] = $hk['killnum'];
            $pdata['hkp'] = $hk['name'];
            $pdata['wmode'] = $winmode;
            $pdata['vnum'] = $validnum;
            $pdata['gtime'] = $time - $starttime;
            $pdata['gstime'] = $starttime;
            $pdata['getime'] = $time;
            $pdata['hdmg'] = $hdamage;
            $pdata['hdp'] = $hplayer;
            $db->query("INSERT INTO {$wtablepre}winners (gid,gametype,name,pass,type,endtime,gd,sNo,icon,club,hp,mhp,sp,msp,att,def,pls,lvl,`exp`,money,bid,inf,rage,pose,tactic,killnum,state,wp,wk,wg,wc,wd,wf,teamID,teamPass,wep,wepk,wepe,weps,arb,arbk,arbe,arbs,arh,arhk,arhe,arhs,ara,arak,arae,aras,arf,arfk,arfe,arfs,art,artk,arte,arts,itm0,itmk0,itme0,itms0,itm1,itmk1,itme1,itms1,itm2,itmk2,itme2,itms2,itm3,itmk3,itme3,itms3,itm4,itmk4,itme4,itms4,itm5,itmk5,itme5,itms5,itm6,itmk6,itme6,itms6,motto,wmode,vnum,gtime,gstime,getime,hdmg,hdp,hkill,hkp,wepsk,arbsk,arhsk,arask,arfsk,artsk,itmsk0,itmsk1,itmsk2,itmsk3,itmsk4,itmsk5,itmsk6,cardname) VALUES ('" . $gamenum . "','" . $gametype . "','" . $pdata['name'] . "','" . $pdata['pass'] . "','" . $pdata['type'] . "','" . $pdata['endtime'] . "','" . $pdata['gd'] . "','" . $pdata['sNo'] . "','" . $pdata['icon'] . "','" . $pdata['club'] . "','" . $pdata['hp'] . "','" . $pdata['mhp'] . "','" . $pdata['sp'] . "','" . $pdata['msp'] . "','" . $pdata['att'] . "','" . $pdata['def'] . "','" . $pdata['pls'] . "','" . $pdata['lvl'] . "','" . $pdata['exp'] . "','" . $pdata['money'] . "','" . $pdata['bid'] . "','" . $pdata['inf'] . "','" . $pdata['rage'] . "','" . $pdata['pose'] . "','" . $pdata['tactic'] . "','" . $pdata['killnum'] . "','" . $pdata['state'] . "','" . $pdata['wp'] . "','" . $pdata['wk'] . "','" . $pdata['wg'] . "','" . $pdata['wc'] . "','" . $pdata['wd'] . "','" . $pdata['wf'] . "','" . $pdata['teamID'] . "','" . $pdata['teamPass'] . "','" . $pdata['wep'] . "','" . $pdata['wepk'] . "','" . $pdata['wepe'] . "','" . $pdata['weps'] . "','" . $pdata['arb'] . "','" . $pdata['arbk'] . "','" . $pdata['arbe'] . "','" . $pdata['arbs'] . "','" . $pdata['arh'] . "','" . $pdata['arhk'] . "','" . $pdata['arhe'] . "','" . $pdata['arhs'] . "','" . $pdata['ara'] . "','" . $pdata['arak'] . "','" . $pdata['arae'] . "','" . $pdata['aras'] . "','" . $pdata['arf'] . "','" . $pdata['arfk'] . "','" . $pdata['arfe'] . "','" . $pdata['arfs'] . "','" . $pdata['art'] . "','" . $pdata['artk'] . "','" . $pdata['arte'] . "','" . $pdata['arts'] . "','" . $pdata['itm0'] . "','" . $pdata['itmk0'] . "','" . $pdata['itme0'] . "','" . $pdata['itms0'] . "','" . $pdata['itm1'] . "','" . $pdata['itmk1'] . "','" . $pdata['itme1'] . "','" . $pdata['itms1'] . "','" . $pdata['itm2'] . "','" . $pdata['itmk2'] . "','" . $pdata['itme2'] . "','" . $pdata['itms2'] . "','" . $pdata['itm3'] . "','" . $pdata['itmk3'] . "','" . $pdata['itme3'] . "','" . $pdata['itms3'] . "','" . $pdata['itm4'] . "','" . $pdata['itmk4'] . "','" . $pdata['itme4'] . "','" . $pdata['itms4'] . "','" . $pdata['itm5'] . "','" . $pdata['itmk5'] . "','" . $pdata['itme5'] . "','" . $pdata['itms5'] . "','" . $pdata['itm6'] . "','" . $pdata['itmk6'] . "','" . $pdata['itme6'] . "','" . $pdata['itms6'] . "','" . $pdata['motto'] . "','" . $pdata['wmode'] . "','" . $pdata['vnum'] . "','" . $pdata['gtime'] . "','" . $pdata['gstime'] . "','" . $pdata['getime'] . "','" . $pdata['hdmg'] . "','" . $pdata['hdp'] . "','" . $pdata['hkill'] . "','" . $pdata['hkp'] . "','" . $pdata['wepsk'] . "','" . $pdata['arbsk'] . "','" . $pdata['arhsk'] . "','" . $pdata['arask'] . "','" . $pdata['arfsk'] . "','" . $pdata['artsk'] . "','" . $pdata['itmsk0'] . "','" . $pdata['itmsk1'] . "','" . $pdata['itmsk2'] . "','" . $pdata['itmsk3'] . "','" . $pdata['itmsk4'] . "','" . $pdata['itmsk5'] . "','" . $pdata['itmsk6'] . "','" . $pdata['cardname'] . "')");
        } else {
            $gstime = $starttime;
            $getime = $time;
            $gtime = $time - $starttime;
            $result = $db->query("SELECT name,killnum FROM {$tablepre}players WHERE type=0 order by killnum desc, lvl desc limit 1");
            $hk = $db->fetch_array($result);
            $hkill = $hk['killnum'];
            $hkp = $hk['name'];
            $db->query("INSERT INTO {$wtablepre}winners (gid,gametype,wmode,vnum,gtime,gstime,getime,hdmg,hdp,hkill,hkp,winnum,namelist,teamID) VALUES ('{$gamenum}','{$gametype}','{$winmode}','{$validnum}','{$gtime}','{$gstime}','{$getime}','{$hdamage}','{$hplayer}','{$hkill}','{$hkp}','{$winnum}','{$namelist}','{$firstteamID}')");
        }
    }
    post_gameover_events();
    rs_sttime();
    //重置游戏开始时间和当前游戏状态
    $gamestate = 0;
    save_gameinfo();
    //echo '**游戏结束**';
    //$gamestate = 0;
    //addnews($time, "end$winmode" , $winner);
    addnews($time, "end{$winmode}", $winner);
    //addnews($time, 'gameover',$gamenum);
    addnews($time, 'gameover', $gamenum);
    systemputchat($time, 'gameover');
    $newsinfo = nparse_news(0, 65535);
    $room_gprefix = '';
    if ($room_prefix != '') {
        $room_gprefix = substr($room_prefix, 0, 1) . '.';
    }
    writeover(GAME_ROOT . "./gamedata/bak/{$room_gprefix}{$gamenum}_newsinfo.html", $newsinfo, 'wb+');
    set_credits();
    return;
}
Beispiel #7
0
            for ($i = 0; $i < $roomtypelist[$roomdata['roomtype']]['pnum']; $i++) {
                if (!$roomdata['player'][$i]['forbidden']) {
                    $pname = $roomdata['player'][$i]['name'];
                    $pname = (string) $pname;
                    $result = $db->query("SELECT * FROM {$gtablepre}users WHERE username = '******'");
                    if ($db->num_rows($result) != 1) {
                        continue;
                    }
                    $pdata = $db->fetch_array($result);
                    enter_battlefield($pdata['username'], $pdata['password'], $pdata['gender'], $pdata['icon'], $pdata['card']);
                    $db->query("UPDATE {$tablepre}players SET teamID='{$roomtypelist[$roomdata['roomtype']]['teamID'][$roomtypelist[$roomdata['roomtype']]['leader-position'][$i]]}' WHERE name='{$pname}'");
                }
            }
            //进入连斗
            $gamestate = 40;
            addnews($now, 'combo');
            systemputchat($now, 'combo');
            save_gameinfo();
            //再次广播信息,这次让所有玩家跳转到游戏中
            $roomdata['roomstat'] = 0;
            $db->query("UPDATE {$gtablepre}rooms SET status=2 WHERE roomid='{$roomid}'");
            $roomdata['timestamp']++;
            $roomdata['chatdata'] = room_init($roomdata['roomtype'])['chatdata'];
            room_save_broadcast($roomid, $roomdata);
        }
    }
    die;
}
?>

Beispiel #8
0
     //判定进入连斗条件1:停止激活时玩家数少于特定值
     $gamestate = 40;
     addnews($now, 'combo');
     systemputchat($now, 'combo');
     $ginfochange = true;
 } elseif ($gamestate < 40 && $gamestate >= 20 && $combonum && $deathnum >= $combonum) {
     //判定进入连斗条件2:死亡人数超过特定公式计算出的值
     $real_combonum = $deathlimit + ceil($validnum / $deathdeno) * $deathnume;
     if ($deathnum >= $real_combonum) {
         $gamestate = 40;
         addnews($now, 'combo');
         systemputchat($now, 'combo');
     } else {
         $combonum = $real_combonum;
         addnews($now, 'comboupdate', $combonum, $deathnum);
         systemputchat($now, 'comboupdate', $combonum);
     }
     $ginfochange = true;
 }
 //	if((($gamestate == 30)&&($alivenum <= $combolimit))||($deathlimit&&($gamestate < 40)&&($gamestate >= 20)&&($deathnum >= $deathlimit))) {//判定进入连斗
 //		$gamestate = 40;
 //		//save_gameinfo();
 //		//$db->query("UPDATE {$tablepre}players SET teamID='',teamPass='' WHERE type=0 ");
 //		addnews($now,'combo');
 //		systemputchat($now,'combo');
 //		$ginfochange = true;
 //	}
 if ($gamestate >= 40 && $now > $afktime + $antiAFKertime * 60) {
     //判定自动反挂机
     include_once GAME_ROOT . './include/system.func.php';
     antiAFK();
Beispiel #9
0
function gameover($time = 0, $mode = '', $winname = '')
{
    global $gamestate, $winmode, $alivenum, $winner, $now, $gamenum, $db, $tablepre, $gamenum, $starttime, $validnum, $hdamage, $hplayer;
    if ($gamestate < 10) {
        return;
    }
    if (!$mode || $mode == 2 && !$winname) {
        //在没提供游戏结束模式的情况下,自行判断模式
        if ($validnum <= 0) {
            //无激活者情况下,全部死亡
            $alivenum = 0;
            $winmode = 4;
            $winner = '';
        } else {
            //判断谁是最后幸存者
            $result = $db->query("SELECT * FROM {$tablepre}players WHERE hp>0 AND type=0");
            $alivenum = $db->num_rows($result);
            if (!$alivenum) {
                //全部死亡
                $winmode = 1;
                $winner = '';
            } elseif ($alivenum == 1) {
                //最后幸存
                $winmode = 2;
                $wdata = $db->fetch_array($result);
                $winner = $wdata['name'];
                $db->query("UPDATE {$tablepre}players SET state='5' where pid='{$wdata['pid']}'");
            } else {
                //不满足游戏结束条件,返回
                save_gameinfo();
                return;
            }
        }
    } else {
        //提供了游戏结束模式的情况下
        $winmode = substr($mode, 3, 1);
        $winner = $winname;
    }
    $time = $time ? $time : $now;
    $result = $db->query("SELECT gid FROM {$tablepre}winners ORDER BY gid DESC LIMIT 1");
    //判断当前游戏局数是否正确,以优胜列表为准
    if ($db->num_rows($result) && $gamenum <= $db->result($result, 0)) {
        $gamenum = $db->result($result, 0) + 1;
    }
    if ($winmode == 4) {
        //无人参加;不需要记录任何资料
        $getime = $time;
        $db->query("INSERT INTO {$tablepre}winners (gid,wmode,vnum,getime) VALUES ('{$gamenum}','{$winmode}','{$validnum}','{$getime}')");
    } elseif ($winmode == 0 || $winmode == 1 || $winmode == 6) {
        //程序故障、全部死亡、GM中止,不需要记录优胜者资料
        $gstime = $starttime;
        $getime = $time;
        $gtime = $time - $starttime;
        $result = $db->query("SELECT name,killnum FROM {$tablepre}players WHERE type=0 order by killnum desc, lvl desc limit 1");
        $hk = $db->fetch_array($result);
        $hkill = $hk['killnum'];
        $hkp = $hk['name'];
        $db->query("INSERT INTO {$tablepre}winners (gid,wmode,vnum,gtime,gstime,getime,hdmg,hdp,hkill,hkp) VALUES ('{$gamenum}','{$winmode}','{$validnum}','{$gtime}','{$gstime}','{$getime}','{$hdamage}','{$hplayer}','{$hkill}','{$hkp}')");
    } else {
        //最后幸存、锁定解除、核爆全灭,需要记录优胜者资料
        $result = $db->query("SELECT * FROM {$tablepre}players WHERE name='{$winner}' AND type=0");
        $pdata = $db->fetch_array($result);
        $result2 = $db->query("SELECT motto FROM {$tablepre}users WHERE username='******'");
        $pdata['motto'] = $db->result($result2, 0);
        $result3 = $db->query("SELECT name,killnum FROM {$tablepre}players WHERE type=0 order by killnum desc, lvl desc limit 1");
        $hk = $db->fetch_array($result3);
        $pdata['hkill'] = $hk['killnum'];
        $pdata['hkp'] = $hk['name'];
        $pdata['wmode'] = $winmode;
        $pdata['vnum'] = $validnum;
        $pdata['gtime'] = $time - $starttime;
        $pdata['gstime'] = $starttime;
        $pdata['getime'] = $time;
        $pdata['hdmg'] = $hdamage;
        $pdata['hdp'] = $hplayer;
        $db->query("INSERT INTO {$tablepre}winners (gid,name,pass,type,endtime,gd,sNo,icon,club,hp,mhp,sp,msp,att,def,pls,lvl,`exp`,money,bid,inf,rage,pose,tactic,killnum,killnum2,state,wp,wk,wg,wc,wd,wf,teamID,teamPass,wep,wepk,wepe,weps,arb,arbk,arbe,arbs,arh,arhk,arhe,arhs,ara,arak,arae,aras,arf,arfk,arfe,arfs,art,artk,arte,arts,itm0,itmk0,itme0,itms0,itm1,itmk1,itme1,itms1,itm2,itmk2,itme2,itms2,itm3,itmk3,itme3,itms3,itm4,itmk4,itme4,itms4,itm5,itmk5,itme5,itms5,itm6,itmk6,itme6,itms6,motto,wmode,vnum,gtime,gstime,getime,hdmg,hdp,hkill,hkp,wepsk,arbsk,arhsk,arask,arfsk,artsk,itmsk0,itmsk1,itmsk2,itmsk3,itmsk4,itmsk5,itmsk6) VALUES ('" . $gamenum . "','" . $pdata['name'] . "','" . $pdata['pass'] . "','" . $pdata['type'] . "','" . $pdata['endtime'] . "','" . $pdata['gd'] . "','" . $pdata['sNo'] . "','" . $pdata['icon'] . "','" . $pdata['club'] . "','" . $pdata['hp'] . "','" . $pdata['mhp'] . "','" . $pdata['sp'] . "','" . $pdata['msp'] . "','" . $pdata['att'] . "','" . $pdata['def'] . "','" . $pdata['pls'] . "','" . $pdata['lvl'] . "','" . $pdata['exp'] . "','" . $pdata['money'] . "','" . $pdata['bid'] . "','" . $pdata['inf'] . "','" . $pdata['rage'] . "','" . $pdata['pose'] . "','" . $pdata['tactic'] . "','" . $pdata['killnum'] . "','" . $pdata['killnum2'] . "','" . $pdata['state'] . "','" . $pdata['wp'] . "','" . $pdata['wk'] . "','" . $pdata['wg'] . "','" . $pdata['wc'] . "','" . $pdata['wd'] . "','" . $pdata['wf'] . "','" . $pdata['teamID'] . "','" . $pdata['teamPass'] . "','" . $pdata['wep'] . "','" . $pdata['wepk'] . "','" . $pdata['wepe'] . "','" . $pdata['weps'] . "','" . $pdata['arb'] . "','" . $pdata['arbk'] . "','" . $pdata['arbe'] . "','" . $pdata['arbs'] . "','" . $pdata['arh'] . "','" . $pdata['arhk'] . "','" . $pdata['arhe'] . "','" . $pdata['arhs'] . "','" . $pdata['ara'] . "','" . $pdata['arak'] . "','" . $pdata['arae'] . "','" . $pdata['aras'] . "','" . $pdata['arf'] . "','" . $pdata['arfk'] . "','" . $pdata['arfe'] . "','" . $pdata['arfs'] . "','" . $pdata['art'] . "','" . $pdata['artk'] . "','" . $pdata['arte'] . "','" . $pdata['arts'] . "','" . $pdata['itm0'] . "','" . $pdata['itmk0'] . "','" . $pdata['itme0'] . "','" . $pdata['itms0'] . "','" . $pdata['itm1'] . "','" . $pdata['itmk1'] . "','" . $pdata['itme1'] . "','" . $pdata['itms1'] . "','" . $pdata['itm2'] . "','" . $pdata['itmk2'] . "','" . $pdata['itme2'] . "','" . $pdata['itms2'] . "','" . $pdata['itm3'] . "','" . $pdata['itmk3'] . "','" . $pdata['itme3'] . "','" . $pdata['itms3'] . "','" . $pdata['itm4'] . "','" . $pdata['itmk4'] . "','" . $pdata['itme4'] . "','" . $pdata['itms4'] . "','" . $pdata['itm5'] . "','" . $pdata['itmk5'] . "','" . $pdata['itme5'] . "','" . $pdata['itms5'] . "','" . $pdata['itm6'] . "','" . $pdata['itmk6'] . "','" . $pdata['itme6'] . "','" . $pdata['itms6'] . "','" . $pdata['motto'] . "','" . $pdata['wmode'] . "','" . $pdata['vnum'] . "','" . $pdata['gtime'] . "','" . $pdata['gstime'] . "','" . $pdata['getime'] . "','" . $pdata['hdmg'] . "','" . $pdata['hdp'] . "','" . $pdata['hkill'] . "','" . $pdata['hkp'] . "','" . $pdata['wepsk'] . "','" . $pdata['arbsk'] . "','" . $pdata['arhsk'] . "','" . $pdata['arask'] . "','" . $pdata['arfsk'] . "','" . $pdata['artsk'] . "','" . $pdata['itmsk0'] . "','" . $pdata['itmsk1'] . "','" . $pdata['itmsk2'] . "','" . $pdata['itmsk3'] . "','" . $pdata['itmsk4'] . "','" . $pdata['itmsk5'] . "','" . $pdata['itmsk6'] . "')");
    }
    //检查成就
    include_once GAME_ROOT . './include/game/achievement.func.php';
    check_end_achievement($winner, $winmode);
    rs_sttime();
    //重置游戏开始时间和当前游戏状态
    $gamestate = 0;
    save_gameinfo();
    //echo '**游戏结束**';
    //$gamestate = 0;
    //addnews($time, "end$winmode" , $winner);
    addnews($time, "end{$winmode}", $winner);
    //addnews($time, 'gameover',$gamenum);
    addnews($time, 'gameover', $gamenum);
    systemputchat($time, 'gameover');
    include_once './include/news.func.php';
    $newsinfo = nparse_news(0, 65535);
    writeover(GAME_ROOT . "./gamedata/bak/{$gamenum}_newsinfo.html", $newsinfo, 'wb+');
    //writeover(GAME_ROOT."./gamedata/bak/{$gamenum}_newsinfo.php",readover(GAME_ROOT.'./gamedata/newsinfo.php'),'wb+');
    //rs_sttime();
    //save_gameinfo();
    set_credits();
    return;
}