Esempio n. 1
0
//} else {
//	$query = $db->query("SELECT name,gd,sNo,icon,lvl,exp,killnum,teamID FROM {$tablepre}players WHERE type=0 AND hp>0 order by killnum desc, lvl desc limit $alivelimit");
//}
while ($playerdata = $db->fetch_array($query)) {
    $playerdata['iconImg'] = "{$playerdata['gd']}_{$playerdata['icon']}.gif";
    $result = $db->query("SELECT motto FROM {$gtablepre}users WHERE username = '******'name'] . "'");
    $playerdata['motto'] = $db->result($result, 0);
    /**
     * 摸东西模式下按照破解层数排名,而不是按照杀人数
     */
    if ($gametype == 1) {
        $playerdata['killnum'] = (int) \skillbase\skill_getvalue_direct(424, 'lvl', $playerdata['nskillpara']);
    }
    if ($gametype == 2) {
        $playerdata['killnum'] = (int) \skillbase\skill_getvalue_direct(475, 'wpt', $playerdata['nskillpara']);
        $playerdata['bounty'] = (int) \skillbase\skill_getvalue_direct(475, 'bounty', $playerdata['nskillpara']);
    }
    $alivedata[] = $playerdata;
}
function cmp_by_killnum($a, $b)
{
    if ($a['killnum'] == $b['killnum']) {
        if ($a['pid'] == $b['pid']) {
            return 0;
        }
        if ($a['pid'] > $b['pid']) {
            return -1;
        } else {
            return 1;
        }
        //杀人数相同的,后入场靠前
Esempio n. 2
0
    exit;
}
//if($alivemode == 'all') {
//	$query = $db->query("SELECT name,gd,sNo,icon,lvl,exp,killnum,teamID FROM {$tablepre}players WHERE type=0 AND hp>0 order by killnum desc, lvl desc");
//} else {
//	$query = $db->query("SELECT name,gd,sNo,icon,lvl,exp,killnum,teamID FROM {$tablepre}players WHERE type=0 AND hp>0 order by killnum desc, lvl desc limit $alivelimit");
//}
while ($playerdata = $db->fetch_array($query)) {
    $playerdata['iconImg'] = "{$playerdata['gd']}_{$playerdata['icon']}.gif";
    $result = $db->query("SELECT motto FROM {$gtablepre}users WHERE username = '******'name'] . "'");
    $playerdata['motto'] = $db->result($result, 0);
    /**
     * 摸东西模式下按照破解层数排名,而不是按照杀人数
     */
    if ($gametype == 1) {
        $playerdata['killnum'] = (int) \skillbase\skill_getvalue_direct(424, 'lvl', $playerdata['nskillpara']);
    }
    $alivedata[] = $playerdata;
}
function cmp_by_killnum($a, $b)
{
    if ($a['killnum'] == $b['killnum']) {
        if ($a['pid'] == $b['pid']) {
            return 0;
        }
        if ($a['pid'] > $b['pid']) {
            return -1;
        } else {
            return 1;
        }
        //杀人数相同的,后入场靠前