Notice: Undefined index: language in /var/www/erevtools.com/public_html/config.php on line 21
eRevTools - Medal Calculator
"") { $erevid = $_POST["erevid"]; } if ($_GET["erevid"] <> "") { $erevid = $_GET["erevid"]; } if ($erevid <> "") { getplayerfromerev($erevid, true); $query = "select * from players where playerid = ".$erevid; $result = mysql_query($query); $numrows = mysql_num_rows($result); if ($numrows > 0) { while ($row = mysql_fetch_array($result)) { $level = $row["level"]; $str = $row["strength"]; $rank = $row["militaryrank"]; $name = $row["name"]; $xp = $row["experience"]; $energy = $row["energy"]; $country = $row["country"]; $banned = $row["banned"]; $damagehit = $row["damage"]; $status = $row["status"]; $intelligence = $row["intelligence"]; $navyrank = $row["navyrank"]; $tp = $row["tp"]; $ta = $row["ta"]; $tr = $row["tr"]; $sl = $row["sl"]; } } mysql_free_result($result); } ?>

Medal Calculator


eRev ID:
Name:
Level:
Strength:
Military Rank:
Booster:
Intelligence:
Navy Rank:
Defense System:
Natural Enemy: >
Hits (10 energy per hit): ">

True Patriot


".number_format(tpmedal($tp), 0, '.', ',')."

".number_format($tp, 0, '.', ',')." / ".number_format(nexttpdmg($tp), 0, '.', ',')."

"; echo "

True Ally


".number_format(tamedal($ta), 0, '.', ',')."

".number_format($ta, 0, '.', ',')." / ".number_format(nexttadmg($ta), 0, '.', ',')."

"; echo "

True Revolutionary


".number_format(trmedal($tr), 0, '.', ',')."

".number_format($tr, 0, '.', ',')." / ".number_format(nexttrdmg($tr), 0, '.', ',')."

"; echo "

Sea Legend


".number_format(slmedal($sl), 0, '.', ',')."

".number_format($sl, 0, '.', ',')." / ".number_format(nextsldmg($sl), 0, '.', ',')."

"; ?>

Land Weapons


"; if (is_numeric($_POST["kills"])) { $gold = 0; $damage = $_POST["kills"]*$hit; echo ""; $tpmedalgain = tpmedal($tp+$damage)-tpmedal($tp); $tpmedalpl = ($tpmedalgain*5)-$gold; $tamedalgain = tamedal($ta+$damage)-tamedal($ta); $tamedalpl = ($tamedalgain*2.5)-$gold; $trmedalgain = trmedal($tr+$damage)-trmedal($tr); $trmedalpl = ($trmedalgain*5)-$gold; echo ""; } else { echo ""; } $query = "select * from weapons where weapontype in ('Weapon', 'Tank', 'Helicopter', 'RPG') order by weaponid"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $damage = 0; $gold = 0; // Save avg price $price = preg_replace('/\W/', '.', $_POST["unitprice".$row['weaponid']]); if (is_numeric($price)) { if ($price > 0) { saveweaponprice($row['weaponid'], $price, $row['avgprice']); } } echo ""; echo ""; if (is_numeric($_POST["kills"])) { echo ""; $damage = $_POST["kills"]*$hit*$row['firepower']; } else { echo ""; } if ($row['weaponid'] <> 16) { echo ""; } else { echo ""; } echo ""; if (is_numeric($price) && is_numeric($_POST["kills"])) { if ($price > 0) { echo ""; $gold = $price*$_POST["kills"]; } else { echo ""; $gold = $row['avgprice']*$_POST["kills"]; } } else { echo ""; $gold = $row['avgprice']*$_POST["kills"]; } $tpmedalgain = tpmedal($tp+$damage)-tpmedal($tp); $tpmedalpl = ($tpmedalgain*5)-$gold; $tamedalgain = tamedal($ta+$damage)-tamedal($ta); $tamedalpl = ($tamedalgain*2.5)-$gold; $trmedalgain = trmedal($tr+$damage)-trmedal($tr); $trmedalpl = ($trmedalgain*5)-$gold; echo ""; echo ""; } mysql_free_result($result); echo "
WeaponFire PowerDamageTotal DamageUnit Price (g)Avg. Unit Price (g)Total Cost (g)TP Medals GainTP Medals Profit/LossTA Medals GainTA Medals Profit/LossTR Medals GainTR Medals Profit/Loss
No weapon1.00".number_format($hit, 0, '.', ',')."".number_format($damage, 0, '.', ',')."".$tpmedalgain."".number_format($tpmedalpl, 2, '.', ',')."".$tamedalgain."".number_format($tamedalpl, 2, '.', ',')."".$trmedalgain."".number_format($trmedalpl, 2, '.', ',')."
".$row['description']."".$row['firepower']."".number_format($row['firepower']*$hit, 0, '.', ',')."".number_format($_POST["kills"]*$hit*$row['firepower'], 0, '.', ',')."".number_format($row['avgprice'], 3, '.', ',')."".number_format($price*$_POST["kills"], 2, '.', ',')."".number_format($row['avgprice']*$_POST["kills"], 2, '.', ',')."".number_format($row['avgprice']*$_POST["kills"], 2, '.', ',')."".$tpmedalgain."".number_format($tpmedalpl, 2, '.', ',')."".$tamedalgain."".number_format($tamedalpl, 2, '.', ',')."".$trmedalgain."".number_format($trmedalpl, 2, '.', ',')."

"; // Naval weapons echo "

Naval Weapons


"; echo ""; if (is_numeric($_POST["kills"])) { $gold = 0; $damage = $_POST["kills"]*$navyhit; echo ""; $slmedalgain = slmedal($sl+$damage)-slmedal($sl); $slmedalpl = ($slmedalgain*5)-$gold; echo ""; } else { echo ""; } $query = "select * from weapons where weapontype in ('Warship', 'RPG') order by firepower"; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $damage = 0; $gold = 0; // Save price and calc new avg price $price = preg_replace('/\W/', '.', $_POST["unitprice".$row['weaponid']]); if (is_numeric($price)) { if ($price > 0) { saveweaponprice($row['weaponid'], $price, $row['avgprice']); } } echo ""; echo ""; if (is_numeric($_POST["kills"])) { echo ""; $damage = $_POST["kills"]*$navyhit*$row['firepower']; } else { echo ""; } if ($row['weaponid'] <> 16) { echo ""; } else { echo ""; } echo ""; if (is_numeric($price) && is_numeric($_POST["kills"])) { if ($price > 0) { echo ""; $gold = $price*$_POST["kills"]; } else { echo ""; $gold = $row['avgprice']*$_POST["kills"]; } } else { echo ""; $gold = $row['avgprice']*$_POST["kills"]; } $slmedalgain = slmedal($sl+$damage)-slmedal($sl); $slmedalpl = ($slmedalgain*5)-$gold; echo ""; echo ""; } mysql_free_result($result); ?>
WeaponFire PowerDamageTotal DamageUnit Price (g)Avg. Unit Price (g)Total Cost (g)SL Medals GainSL Medals Profit/Loss
No weapon1.00".number_format($navyhit, 0, '.', ',')."".number_format($damage, 0, '.', ',')."".$slmedalgain."".number_format($slmedalpl, 2, '.', ',')."
".$row['description']."".$row['firepower']."".number_format($row['firepower']*$navyhit, 0, '.', ',')."".number_format($_POST["kills"]*$navyhit*$row['firepower'], 0, '.', ',')."".number_format($row['avgprice'], 3, '.', ',')."".number_format($price*$_POST["kills"], 2, '.', ',')."".number_format($row['avgprice']*$_POST["kills"], 2, '.', ',')."".number_format($row['avgprice']*$_POST["kills"], 2, '.', ',')."".$slmedalgain."".number_format($slmedalpl, 2, '.', ',')."