Forum

ASSIST, AMERICA'S ARMY COMMUNITY - RELIVE THE GLORY DAYS OF AMERICA'S ARMY 2.5

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Spanky

Pages: 1 ... 209 210 [211] 212 213 ... 564
3151
General Chat / Live Web Server List
« on: Saturday, January 05, 2013, 18:06:20 PM »
Thought I would share my code for the live server list linked to via the "Servers" or "Servers Online" links on this site. I'm not an expert coder so there might be inefficient code or flaws. If you see any, feel free to help improve the code :)

Here it is:
Code: [Select]
<?php
// start the clock!
$time_start microtime(true);
?>


<!-- ColorBox -->
<script>
$(document).ready(function(){
$(".media").colorbox({rel:'media'});
});
</script>

<?php
// ping the auth server to see if it's alive
function availableUrl($host$port=80$timeout=3) { 
  
$fp = @fSockOpen($host$port$errno$errstr$timeout); 
  return 
$fp!=false;
}
// put the availability into a var
$available availableUrl("auth.aa25.org");

// is the auth server dead?
if($available == false){
echo "<div id=\"servername\">ERROR</div><div id=\"serverinfo\">Authorization server is offline now. Check back later.</div>";
}
// no it's not, continue with code
else {

// load the code to get country name - http://chir.ag/projects/geoiploc/
require_once("geoiploc.php");

// create div at the top of the page to later insert number of players via jquery
echo "<div id=\"serverinfo\" class=\"top\"></div>";

/////////////////////////////////////////////////////
// this section grabs the original list, removes info not used, then sticks number of players up front to be used for sorting later on
/////////////////////////////////////////////////////
// grab jonny's list
$lines file('http://auth.aa25.org/srvlist.txt');

$servers = array();
// loop through the list line by line
foreach ($lines as $line_num => $line) {

// explode the line every space so we can call the values in the array as $pieces
// format: IP:Qport country honor tour pb passworded name map players maxplayers version auth hackhunter red green blue
$pieces explode(" "$line);

// skip if the server is empty
if($pieces[8] == 0) continue;

// stick the pieces together to re-build the line but this time put current players up front so we can sort later
// format: players, maxplayers, IP:Qport, map, name, red, green, blue
$piecesarray = array($pieces[8],$pieces[9],$pieces[0],$pieces[7],$pieces[6],$pieces[13],$pieces[14],$pieces[15]);

// implode pieces back into a line
$line implode(" ",$piecesarray);

// stick the line in an array
array_push($servers$line);

}
// end foreach

// sort the servers numerically
rsort($serversSORT_NUMERIC);




/////////////////////////////////////////////////////
// now that we have a list of servers that's sorted by amount of players, let's cut it up and display the info
/////////////////////////////////////////////////////
// Set counts to 0
$playercount 0;
$servercount 0;
$deadservercount 0;
$mAApPlayers 0;

// loop through the list line by line
foreach ($servers as $line_num => $line) {

// explode the line every space so we can call the values in the array as $pieces
$pieces explode(" "$line);

// figure out server name color, decode it and strip it of non-utf8 characters
$namecolor sprintf("%02X%02X%02X"$pieces[5], $pieces[6], $pieces[7]);
$name htmlspecialchars(preg_replace('/[^(\x20-\x7F)]*/',''urldecode($pieces[4])));

// split the IP and port
$ippieces explode(":"$pieces[2]);
$ip htmlspecialchars($ippieces[0]);
$qport htmlspecialchars($ippieces[1]);

// echo the info
$map htmlspecialchars(urldecode($pieces[3]));
$players htmlspecialchars($pieces[0]) . "/" htmlspecialchars($pieces[1]);

// query the server
////////////////////////////////////////////////////////////
// This code is from DRAAT, at least that's what VirtualKiller told me
// So, credits to Darky and VK but I did modify the code to suit this application
////////////////////////////////////////////////////////////
// open the connection
$sock fsockopen"udp://$ip"$qport$errno$errstr2);

//Write query packet to socket/send query to server
// we don't use if(!$sock) because UDP only knows if the server is down after sending but never receiving data
//New GameSpy protocol uses HEX query strings - the mid "AASF" could be replaced with anything
$queryString "\xFE\xFD\x00"."AASF"."\xFF\xFF\xFF"
fwrite($sock$queryString);
//set timeout to 2 seconds
stream_set_timeout($sock2);
//Read response from server - set to 8192 bytes (could probably be less, 1024 cuts off players but works good just for info)
$Info = @fread($sock2048);
//Close the socket
fclose($sock);

// timeout check
if(empty($Info))
{
echo "<div id=\"servername\">ERROR</div><div id=\"serverinfo\">Connection Timeout: can't connect to server ({$ip}). This server may be offline now.</div>";
// server didn't respond, add it to the count
$deadservercount++;
continue;
}

// Parse response packaet and load the contents into an array variable called $Infoarray
$Infoarray explode(chr(0), $Info);

// Post server info
$arrayLength count($Infoarray);

for (
$i 1$i $arrayLength$i++)
{
// show the server info
   
if ($Infoarray[$i] == "AASFhostname")
      {
   $port htmlspecialchars($Infoarray[$i+7]); // default is 1716
       
$map htmlspecialchars($Infoarray[$i+9]);
   $players htmlspecialchars($Infoarray[$i+13]);
   $playersfull htmlspecialchars($Infoarray[$i+17]);
   $full=null; if($players==$playersfull){$full=true;}; // is the server full of players?
   $round htmlspecialchars($Infoarray[$i+41]); // round 0/14 format
   $time htmlspecialchars($Infoarray[$i+43]);  // time left in the round 
   $version htmlspecialchars($Infoarray[$i+19]);
   // check if server owner set their contact e-mail
   
   if($Infoarray[$i+57] != "Non-disclosed" && is_string(trim($Infoarray[$i+57]))){
   $adminemail "<br />Contact: ".htmlspecialchars($Infoarray[$i+57]);
   }
   // no e-mail set, null out the var
   else{ $adminemail null; } 
}
}

// for some reason the auth server lags behind on updating the number of players in a server
// since we just queried the server directly, lets check again to see if there are 0 players
// if there are 0, skip ahead to the next server query
if($players == 0) continue;

// figure out what map image to load - yea, these aren't alphabetical, i ripped the order from tours.ini to make it easier to copy
switch($map){
case 'MOUT McKenna'$mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/mout_mckenna.png\" title=\"MOUT Mckenna\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/mout_mckenna_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
            case 
'Pipeline'$mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/pipeline.png\" title=\"Pipeline\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/pipeline_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Bridge Crossing':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/bridge.png\" title=\"Bridge Crossing\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/bridge_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Mountain Pass':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/mountain_pass.png\" title=\"Mountain Pass\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/mountain_pass_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Bridge SE':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/bridge_se.png\" title=\"Bridge SE\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/bridge_se_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Mountain Pass SE':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/mountain_pass_se.png\" title=\"Mountain Pass SE\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/mountain_pass_se_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Urban Assault':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/urban_assault.png\" title=\"Urban Assault\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/urban_assault_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Border':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/border.png\" title=\"Border\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/border_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Headquarters Raid':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/hq_raid.png\" title=\"Headquarters Raid\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/hq_raid_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Collapsed Tunnel':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/collapsed_tunnel.png\" title=\"Collapsed Tunnel\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/collapsed_tunnel_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Insurgent Camp':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/insurgent_camp.png\" title=\"Insurgent Camp\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/insurgent_camp_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'River Basin':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/river_basin.png\" title=\"River Basin\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/river_basin_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'FLS Assault':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/fls.png\" title=\"FLS Assault\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/fls_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'JRTC Farm Raid':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/jrtc_farm_raid.png\" title=\"JRTC Farm Raid\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/jrtc_farm_raid_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Mountain Ambush':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/mountain_ambush.png\" title=\"Mountain Ambush\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/mountain_ambush_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Swamp Raid':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/swamp_raid.png\" title=\"Swamp Raid\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/swamp_raid_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Weapons Cache':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/weapons_cache.png\" title=\"Weapons Cache\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/weapons_cache_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Weapons Cache SE':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/weapons_cache_se.png\" title=\"Weapons Cache SE\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/weapons_cache_se_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Radio Tower':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/radio_tower.png\" title=\"Radio Tower\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/radio_tower_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Woodland Outpost':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/woodland_outpost.png\" title=\"Woodland Outpost\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/woodland_outpost_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Dusk':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/dusk.png\" title=\"Dusk\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/dusk_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'SF CSAR':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/sf_csar.png\" title=\"SF CSAR\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/sf_csar_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'SF Hospital':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/sf_hospital.png\" title=\"SF Hospital\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/sf_hospital_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'SF Recon':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/sf_recon.png\" title=\"SF Recon\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/sf_recon_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'SF Sandstorm':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/sf_sandstorm.png\" title=\"SF Sandstorm\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/sf_sandstorm_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'SF Arctic':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/sf_arctic.png\" title=\"SF Arctic\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/sf_arctic_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'SF Oasis':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/sf_oasis.png\" title=\"SF Oasis\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/sf_oasis_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'SF Taiga':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/sf_taiga.png\" title=\"SF Taiga\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/sf_taiga_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'SF Village':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/sf_village.png\" title=\"SF Village\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/sf_village_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'SF Courtyard':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/sf_courtyard.png\" title=\"SF Courtyard\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/sf_courtyard_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'SF PCR':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/sf_pcr.png\" title=\"SF PCR\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/sf_pcr_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'SF Extraction':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/sf_extraction.png\" title=\"SF Extraction\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/sf_extraction_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'Pipeline SF':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/sf_pipeline.png\" title=\"SF Pipeline\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/sf_pipeline_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'SF Blizzard':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/sf_blizzard.png\" title=\"SF Blizzard\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/sf_blizzard_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'SF Water Treatment':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/sf_water_treatment.png\" title=\"SF Water Treatment\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/sf_water_treatment_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case 'SF Dockside':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/normal_aa/sf_dockside.png\" title=\"SF Dockside\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/normal_aa/sf_dockside_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Glass Kill House':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Glass%20Kill%20House.png\" title=\"[mAAp] Glass Kill House\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Glass%20Kill%20House_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] PBall':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/PBall.png\" title=\"[mAAp] PBall\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/PBall_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Teh Yeti\'s Lair':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Teh%20Yeti%27s%20Lair.png\" title=\"[mAAp] Teh Yeti\'s Lair\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Teh%20Yeti%27s%20Lair_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] UT04':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/UT04.png\" title=\"[mAAp] UT04\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/UT04_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Aztec':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Aztec.png\" title=\"[mAAp] Aztec\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Aztec_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Breakout':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Breakout.png\" title=\"[mAAp] Breakout\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Breakout_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Shipment':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Shipment.png\" title=\"[mAAp] Shipment\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Shipment_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Square':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Square.png\" title=\"[mAAp] Square\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Square_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Ice':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Ice.png\" title=\"[mAAp] Ice\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Ice_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Monkey Island':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Monkey%20Island.png\" title=\"[mAAp] Monkey Island\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Monkey%20Island_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Berg':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Berg.png\" title=\"[mAAp] Berg\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Berg_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Bridge Construction':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Bridge%20Construction.png\" title=\"[mAAp] Bridge Construction\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Bridge%20Construction_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Pipeline':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Pipeline.png\" title=\"[mAAp] Pipeline\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Pipeline_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Urban Assault SE':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Urban%20Assault%20SE.png\" title=\"[mAAp] Urban Assault SE\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Urban%20Assault%20SE_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Interdiction':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Interdiction.png\" title=\"[mAAp] Interdiction\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Interdiction_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] SF Refinery':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/SF%20Refinery.png\" title=\"[mAAp] SF Refinery\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/SF%20Refinery_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Rummage':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Rummage.png\" title=\"[mAAp] Rummage\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Rummage_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] City Block':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/City_Block.png\" title=\"[mAAp] City Block\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/City_Block_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Petrol':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Petrol.png\" title=\"[mAAp] Petrol\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Petrol_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Rooftop':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Rooftop.png\" title=\"[mAAp] Rooftop\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Rooftop_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Pool Day':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Pool_Day.png\" title=\"[mAAp] Pool Day\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Pool_Day_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] SF Contingency':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/SF_Contingency.png\" title=\"[mAAp] SF Contingency\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/SF_Contingency_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] SF Office Assault':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/SF_Office_Assault.png\" title=\"[mAAp] SF Office Assault\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/SF_Office_Assault_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
case '[mAAp] Steamroller':  $mapimg "<a class=\"media\" href=\"http://aao25.com/aa_shots/Steamroller.png\" title=\"[mAAp] Steamroller\" target=\"_blank\"><img src=\"http://aao25.com/aa_shots/Steamroller_t.png\" title=\"{$map}\" border=\"0\" /><br />{$map}</a>"; break;
            default: 
$mapimg ''; break;
          }

// Figure out country the server is hosted in
$host getCountryFromIP($ip" NamE ");

// echo out the information from above
echo "<div id=\"servername\"><font color=\"$namecolor\">$name</font><br />{$ip}:{$port} &bull; {$host}{$adminemail}</div>
<div id=\"serverinfo\">
{$mapimg}<br />
Round: 
{$round} {$time} &bull; Players: {$players}/{$playersfull}";
if(
$full==true){echo" <font color=\"red\">FULL</font>";};
echo
" &bull; v{$version}<br />
"
;

// show/hide players
$sn==1//unique server number in the list for show/hide via jquery
echo "<script>$('#players{$sn}').hide(); $('#ShowHidePlayers{$sn}').click(function() { $('#players{$sn}').slideToggle();});</script>
<br />
<a class=\"button\" id=\"ShowHidePlayers
{$sn}\">Show/Hide {$players}";
// break for proper players verbage
if($players == 1){$playersverbage "Player";}
else{
$playersverbage "Players";}
// resume button
echo {$playersverbage}</a>
<br />&nbsp;
"
;

echo 
"<div id=\"players{$sn}\">"// lets echo the players
$foo 0;
for (
$i 66$i $arrayLength$i++)
{
$foo++;

if($foo == 8){

if($Infoarray[$i] == "0"){

}else{
$username htmlspecialchars($Infoarray[$i]);
$honor htmlspecialchars($Infoarray[$i-1]);
// $ping = htmlspecialchars($Infoarray[$i+1]);
$kia abs(htmlspecialchars($Infoarray[$i+3])/10);
$enemy htmlspecialchars($Infoarray[$i+4])/10;
echo "<div id=\"left\"><a href=\"/list/btuser.php?u={$username}\" title=\"View this user on Battletracker\">{$username}</a></div><div id=\"right\">Honor: {$honor} &bull; K/D: {$enemy}/{$kia}</div><br />";
$foo 0;
}
}
}
// Use below line to show all values returned from the server
// echo"<pre>";print_r($Infoarray);echo"</pre>";

echo "</div>"// end player display code
$sn++; //add 1 to the server number count to keep them unique
echo "</div>"// end server information
////////////////////////////////////////////////////////////
// End server query
////////////////////////////////////////////////////////////

// count players and servers
$players htmlspecialchars($pieces[0]);
$playercount $playercount $players;
$servercount++;

// is this a mAAp map?
if(strpos($map"mAAp") !== false) {
// it is! let's create a tally for how many players are playing mAAp
$mAApPlayers $mAApPlayers $players;
}

}
// end foreach

// figure out verbage for number of servers
if($servercount == 1){$serverterm "server";}else{$serverterm "servers";};

// figure out mAAp players percentage
if(($mAApPlayers) != 0) {
$percentage = (float)($mAApPlayers/($mAApPlayers+$playercount))*100;
}
else {
$percentage 0;
}
$percentage round($percentage2);

// since we know the total number of players now that we've queried all the servers, lets append this info to a div at the top of the page using jquery
echo "<script>$('.top').append('There are currently {$playercount} players in {$servercount} active {$serverterm}.<br />');</script>";
if(!
$percentage==0){echo "<script>$('.top').append('{$mAApPlayers} ({$percentage}%) are";}else{echo"<script>$('.top').append('Nobody is";} echo" playing mAAp.');</script>";

}
// auth server alive check

// create teh footer
echo "<footer>";
// were there servers that didn't respond to the query?
if($deadservercount 0){
if($deadservercount == 1){echo "1 server didn't respond.<br />";}
else{echo "{$deadservercount} servers didn't respond.<br />";}
}
echo
"
List by JonnyM &bull; Server List v4.2 Code by Nate and Jared.
<br />
"
;
// what's our page load time?
$time_end microtime(true);
$time $time_end $time_start;
$time round($time2);
echo 
"Information gathered in {$time} seconds</footer>";
?>


I figured it'd be good to archive this in case it gets lost or whatever. Maybe this should be stickied?

3152
mAAp Project / Re: America's Army Resource Extractor v3.0
« on: Saturday, January 05, 2013, 18:04:02 PM »
Shouldn't this thread and the converter thread be moved into the mAAp section of the forum?

3153
mAAp Project / Re: Steamroller
« on: Saturday, January 05, 2013, 15:03:27 PM »
Battletracker was easy but I still believe it would have been better to start from scratch building a custom database for Assist instead of relying on another website that 1 person that's MIA has control over. We wouldn't have lost account issues, name changing retards, honor problems, confused players going to BT for help. It just would have been better. I do understand Jonny's reasoning for using BT. If it were up to me, I would have built something custom and left tracking out of it :)

3154
mAAp Project / Re: Steamroller
« on: Saturday, January 05, 2013, 14:51:15 PM »
I meant that we should name it as it is, without maap tags so the map will be full tracked(all stats) on BT.
ofc you can make assist display maap tag while they do not exist :)

It's a shame we just can't get rid of tracking and use a local database that we can manage and maintain.

3155
General Chat / Re: Weapon slots
« on: Saturday, January 05, 2013, 13:51:25 PM »
Only for tournament I believe. There might be a mod roaming around but I have no idea... It's been discussed before.

3156
Bug Reports / Re: PB kicked md5 ignoring
« on: Saturday, January 05, 2013, 13:48:06 PM »
Looks like that isn't the problem then. Stupid questions; Have you run the Fix PB in Assist? Are you running Assist and/or your user account on Windows as admin?

3157
Bug Reports / Re: mAAp in server rotation
« on: Saturday, January 05, 2013, 13:46:30 PM »
I don't get any error like that, it's just that the maps don't show up in the Cycle Maps list. If I select a mAAp map on the Server Control page it loads just fine.

3158
mAAp Project / Re: Steamroller
« on: Saturday, January 05, 2013, 13:19:00 PM »
Any idea what class that is on 2.5.0?
is it present?

It's ClassRiflemanM4A1AutoPS and it exists in 2.5, that's Rummage that I converted.

3159
Bug Reports / Re: mAAp in server rotation
« on: Saturday, January 05, 2013, 03:56:36 AM »
Hehe, yea, on 7.14.

I wasn't going to run the server until after the 7.20 update though.

Check it:

3160
Bug Reports / mAAp in server rotation
« on: Saturday, January 05, 2013, 03:21:37 AM »
I went to setup a second server to be mAAp only and I can't add mAAp maps in the rotation in the settings. I can see them in the Server Control though. It's a new install of Assist, deleted settings.dat too.

3161
mAAp Project / Re: mAAp pack 7.20 Bug Reports
« on: Saturday, January 05, 2013, 01:33:58 AM »
must be safe;

Yea, the AA devs did it, they figured it all out :)

3162
mAAp Project / Re: mAAp pack 7.20 Bug Reports
« on: Saturday, January 05, 2013, 00:36:50 AM »
Do you mean the one that comes with AA 2.5? The one on Dropbox is the one from AA 2.6. It has the missing Dusk meshes. I just looked at the 7.1 release I have and there isn't a M2-Architectural.usx.

*EDIT*
Yea, I just checked my 7.14 Assist install and the one that's in there is the one that came with AA 2.5. The one on Assist is from AA 2.6 with a new mesh or two. It should permanently override the old one, nothing was added or removed by us, it's an official file.

3163
mAAp Project / Re: Steamroller
« on: Friday, January 04, 2013, 23:33:33 PM »
Sorry, I just ran trough the map again, And I dont know if it because I was looking for it, but I just kept getting botherd by it.
Can you remove it?

No problem :) Removed and re-building now.

*EDIT*
Wow, Steamroller takes the cake for build time... 13 minutes.

3164
mAAp Project / Re: Steamroller
« on: Friday, January 04, 2013, 23:12:11 PM »
The litter is only 2 polys a piece and there was just shy of 200 of them. That's really nothing. But the signs, some were 200-700 polys a piece and there's quite a few of them. Then the shrubs are quite a few polys. I think I saved several thousand polys. I also culled the projectors but I didn't test if that actually works or not.

It's your map that you converted, it's your call. What would you like done?

3165
mAAp Project / Re: Steamroller
« on: Friday, January 04, 2013, 22:53:29 PM »
Spanky, if you decide that the pictures I added werent "good" enugh, please do it all the way.
Update T-mAAp_Pack_6.utx and create a thumb version I can use for the Assist client.

Done & done :) Sorry, your picture just really bothered me. It was extremely blurry and had aliasing jaggies. I re-did Ice and Office Assault as well.

Don't you agree that they look better?

As far as stuff popping in and out... it's all about a balance of distance. Too far and it's pointless but too close and it's extremely noticeable. If you don't like it then I can undo it. I could also set levels of quality so if someone has their settings on low, those objects don't appear at all.

Pages: 1 ... 209 210 [211] 212 213 ... 564

Download Assist

×

Download Game Client

Important: Battletracker no longer exists. However, old Battletracker accounts may still work. You can create a new 25Assist account here

Download Server Manager