$days OR dragonkills>0 OR pk>0 OR experience>$exp) " . "AND (level>=$lev1 AND level<=$lev2) AND (alive=1) " . "AND (laston<'$last' OR loggedin=0) AND (acctid<>$id) " . "ORDER BY location='$loc' DESC, location, level DESC, " . "experience DESC, dragonkills DESC"; } $result = db_query($sql); $pvp = array(); while($row = db_fetch_assoc($result)) { $pvp[] = $row; } $pvp = modulehook("pvpmodifytargets", $pvp); tlschema("pvp"); $n = translate_inline("Name"); $l = translate_inline("Level"); $loc = translate_inline("Location"); $ops = translate_inline("Ops"); $bio = translate_inline("Bio"); $att = translate_inline("Attack"); rawoutput(""); rawoutput(""); $loc_counts = array(); $num = count($pvp); $j = 0; for ($i=0;$i<$num;$i++){ $row = $pvp[$i]; if (isset($row['invalid']) && $row['invalid']) continue; if (!isset($loc_counts[$row['location']])) $loc_counts[$row['location']] = 0; $loc_counts[$row['location']]++; if ($row['location'] != $location) continue; $j++; $biolink="bio.php?char=".$row['acctid']."&ret=".urlencode($_SERVER['REQUEST_URI']); addnav("", $biolink); rawoutput(""); rawoutput(""); rawoutput(""); rawoutput(""); rawoutput(""); rawoutput(""); } if (!isset($loc_counts[$location]) || $loc_counts[$location]==0){ $noone = translate_inline("`iThere are no available targets.`i"); output_notl("", true); } rawoutput("
$n$l$loc$ops
"); if ($row['clanshort']>"" && $row['clanrank'] > CLAN_APPLICANT) { output_notl("%s<`2%s%s>`0 ", $clanrankcolors[$row['clanrank']], $row['clanshort'], $clanrankcolors[$row['clanrank']], true); } output_notl("`@%s`0", $row['name']); rawoutput(""); output_notl("%s", $row['level']); rawoutput(""); output_notl("%s", $row['location']); rawoutput("[ $bio | "); if($row['pvpflag']>$pvptimeout){ output("`i(Attacked too recently)`i"); }elseif ($location!=$row['location']){ output("`i(Can't reach them from here)`i"); }else{ rawoutput("$att"); addnav("","$link$extra&name=".$row['acctid']); } rawoutput(" ]
$noone
",true); if ($num != 0 && (!isset($loc_counts[$location]) || $loc_counts[$location] != $num)) { output("`n`n`&As you listen to different people around you talking, you glean the following additional information:`n"); foreach ($loc_counts as $loc=>$count) { if ($loc == $location) continue; $args = modulehook("pvpcount", array('count'=>$count,'loc'=>$loc)); if (isset($args['handled']) && $args['handled']) continue; if ($count == 1) { output("`&There is `^%s`& person sleeping in %s whom you might find interesting.`0`n", $count, $loc); } else { output("`&There are `^%s`& people sleeping in %s whom you might find interesting.`0`n", $count, $loc); } } } tlschema(); } ?>