Notice: Undefined index: language in /var/www/erevtools.com/public_html/config.php on line 21
eRevTools - Group Damage Calculator
"" && $_POST['battle'] <> "" && $_POST['battle'] <> "0" && $_SESSION['BATTLE'] == $_POST['battle']) { $query = "select a.playerid, a.userid, b.damage from users_playerslist a, players b where a.playerid = b.playerid and a.userid = ".$_SESSION['USERID']; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $weaponid = 0; $boosterid = 0; $hits = 0; if ($_POST['weapon'.$row['playerid']] <> "" && is_numeric($_POST['weapon'.$row['playerid']])) { $weaponid = $_POST['weapon'.$row['playerid']]; } if ($_POST['damagebooster'.$row['playerid']] <> "" && is_numeric($_POST['damagebooster'.$row['playerid']])) { $boosterid = $_POST['damagebooster'.$row['playerid']]; } if ($_POST['hits'.$row['playerid']] <> "" && is_numeric($_POST['hits'.$row['playerid']])) { $hits = $_POST['hits'.$row['playerid']]; } $query = "select * from users_playerslist_battles where userid = ".$row['userid']." and playerid = ".$row['playerid']." and warid = ".$_POST['battle']; $result2 = mysql_query($query); $numrows = mysql_num_rows($result2); if ($numrows > 0) { $query = "update users_playerslist_battles set weaponid = ".$weaponid.", boosterid = ".$boosterid.", hits = ".$hits.", damage = ".$row['damage']." where userid = ".$row['userid']." and playerid = ".$row['playerid']." and warid = ".$_POST['battle']; } else { $query = "insert into users_playerslist_battles (userid, playerid, warid, weaponid, boosterid, hits, damage) values (".$row['userid'].", ".$row['playerid'].", ".$_POST['battle'].", ".$weaponid.", ".$boosterid.", ".$hits.", ".$row['damage'].")"; } mysql_query($query); } } ?>

Group Damage Calculator



Notice: Undefined index: FBID in /var/www/erevtools.com/public_html/damagecalcgroup.php on line 43
eRev ID:
MU ID:

Notice: Undefined index: FBID in /var/www/erevtools.com/public_html/damagecalcgroup.php on line 47
Booster:

Notice: Undefined index: FBID in /var/www/erevtools.com/public_html/damagecalcgroup.php on line 76
Defense System:

Notice: Undefined index: FBID in /var/www/erevtools.com/public_html/damagecalcgroup.php on line 137
Weapon:
Natural Enemy: >

Notice: Undefined index: FBID in /var/www/erevtools.com/public_html/damagecalcgroup.php on line 168
Hits (10 energy per hit): ">

Notice: Undefined index: FBID in /var/www/erevtools.com/public_html/damagecalcgroup.php on line 171

Notice: Undefined index: FBID in /var/www/erevtools.com/public_html/damagecalcgroup.php on line 179

Notice: Undefined index: FBID in /var/www/erevtools.com/public_html/damagecalcgroup.php on line 183

Notice: Undefined index: FBID in /var/www/erevtools.com/public_html/damagecalcgroup.php on line 187
"") { getmufromerev($_POST['muid']); $players = 0; $query = "select * from players where muid = ".$_POST['muid']; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $erevid = $row['playerid']; $level = $row["level"]; $str = $row["strength"]; $rank = $row["militaryrank"]; $name = $row["name"]; $xp = $row["experience"]; $energy = $row["energy"]; $country = getcountry($row["countryid"]); $banned = $row["banned"]; $damagehit = $row["damage"]; $status = $row["status"]; $lastupdate = $row["lastupdate"]; $navyrank = $row["navyrank"]; $intelligence = $row["intelligence"]; $navydmg1hit = $row["navydmg1hit"]; $muid = $row["muid"]; $query = "select * from ranks where rankid = ".$rank; $result2 = mysql_query($query); while ($row = mysql_fetch_array($result2)) { $rankdescription = $row["description"]; } mysql_free_result($result2); $query = "select * from navyranks where navyrankid = ".$navyrank; $result2 = mysql_query($query); while ($row = mysql_fetch_array($result2)) { $navyrankdescription = $row["description"]; } mysql_free_result($result2); if ($weapontype == "Warship") { $basichit = $navydmg1hit; } else { $basichit = $damagehit; } $hit = $basichit; if (is_numeric($_POST["damagebooster"]) && !$_POST["damagebooster"]==0) { $hit = $basichit*$factor; } if (is_numeric($_POST["defensesystem"]) && !$_POST["defensesystem"]==0) { $hit = $hit - ($hit*$damagereduction); } if (isset($_POST["naturalenemy"])) { $hit = $hit + ($hit*0.10); } if ($firepower <> 0) { $hit = $hit*$firepower; } echo ""; $totaldamage = $totaldamage + $_POST["kills"]*$hit; $players++; } mysql_free_result($result); echo ""; } if ($_POST["erevid"] <> "") { $erevids = explode(";", $_POST["erevid"]); $erevids = array_unique($erevids); foreach ($erevids as $erevid) { if (is_numeric($erevid)) { $erevid = trim($erevid); set_time_limit(60); getplayerfromerev($erevid, false); $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 = getcountry($row["countryid"]); $banned = $row["banned"]; $damagehit = $row["damage"]; $status = $row["status"]; $lastupdate = $row["lastupdate"]; $navyrank = $row["navyrank"]; $intelligence = $row["intelligence"]; $navydmg1hit = $row["navydmg1hit"]; $muid = $row["muid"]; } } mysql_free_result($result); if ($name <> "") { $query = "select * from ranks where rankid = ".$rank; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $rankdescription = $row["description"]; } $query = "select * from navyranks where navyrankid = ".$navyrank; $result2 = mysql_query($query); while ($row = mysql_fetch_array($result2)) { $navyrankdescription = $row["description"]; } mysql_free_result($result2); if ($weapontype == "Warship") { $basichit = $navydmg1hit; } else { $basichit = $damagehit; } if (is_numeric($level) && is_numeric($str) && is_numeric($rank)) { //$basichit = (($level*5)+$str)*(1+($rank*0.05)); $hit = $basichit; if (is_numeric($_POST["damagebooster"]) && !$_POST["damagebooster"]==0) { $hit = $basichit*$factor; } if (is_numeric($_POST["defensesystem"]) && !$_POST["defensesystem"]==0) { $hit = $hit - ($basichit*$damagereduction); } if (isset($_POST["naturalenemy"])) { $hit = $hit + ($basichit*0.10); } } if ($firepower <> 0) { $hit = $hit*$firepower; } echo ""; $totaldamage = $totaldamage + $_POST["kills"]*$hit; } } } echo ""; } } else { $query = "select a.*, c.description as rankdesc from players a, users_playerslist b, ranks c where a.militaryrank = c.rankid and a.playerid = b.playerid and b.userid = ".$_SESSION['USERID']; $result = mysql_query($query); while ($row = mysql_fetch_array($result)) { $erevid = $row["playerid"]; $level = $row["level"]; $str = $row["strength"]; $rank = $row["militaryrank"]; $name = $row["name"]; $xp = $row["experience"]; $energy = $row["energy"]; $country = getcountry($row["countryid"]); $banned = $row["banned"]; $damagehit = $row["damage"]; $status = $row["status"]; $lastupdate = $row["lastupdate"]; $rankdescription = $row["rankdesc"]; $factor = 0; $firepower = 0; getplayerfromerev($erevid, false); echo ""; if ($_POST['battle'] <> "" && $_POST['battle'] <> "0") { $weaponid = 0; $boosterid = 0; $hits = 0; $damage = 0; $query = "select * from users_playerslist_battles where userid = ".$_SESSION['USERID']." and playerid = ".$erevid." and warid = ".$_POST['battle']; $result2 = mysql_query($query); while ($row2 = mysql_fetch_array($result2)) { $weaponid = $row2['weaponid']; $boosterid = $row2['boosterid']; $hits = $row2['hits']; $damage = $row2['damage']; } } echo ""; echo ""; echo ""; if (is_numeric($level) && is_numeric($str) && is_numeric($rank)) { // $basichit = (($level*5)+$str)*(1+($rank*0.05)); $hit = $damage; if (!$boosterid == 0) { $hit = $basichit*$factor; } if (is_numeric($_POST["defensesystem"]) && !$_POST["defensesystem"]==0) { $hit = $hit - ($basichit*$damagereduction); } if (isset($_POST["naturalenemy"])) { $hit = $hit + ($basichit*0.10); } } if ($firepower <> 0) { $hit = $hit*$firepower; } echo ""; $totaldamage = $totaldamage + $hits*$hit; $totalhits = $totalhits + $hits; if ($_POST['battle'] <> "" && $_POST['battle'] <> "0") { $query = "select * from wars_playersdamage where playerid = ".$erevid." and warid = ".$_POST['battle']; $result2 = mysql_query($query); $ahits = 0; $admg = 0; $dhits = 0; $ddmg = 0; while ($row2 = mysql_fetch_array($result2)) { if (side == "attack") { $ahits = $ahits + $row2['hits']; $admg = $admg + $row2['damage']; } else { $dhits = $dhits + $row2['hits']; $ddmg = $ddmg + $row2['damage']; } } echo ""; $totalahits = $totalahits + $ahits; $totaldhits = $totaldhits + $dhits; $totaladmg = $totaladmg + $admg; $totalddmg = $totalddmg + $ddmg; } else { echo ""; } } mysql_free_result($result); echo ""; $_SESSION['BATTLE'] = $_POST['battle']; } ?>
eRev IDName LevelStrengthIntelligence CountryMilitary UnitMilitary RankNavy Rank DamageTotal DamageLast Update
".$erevid."".$name."".$level."".$str."".$intelligence."".getmu($muid)."".$rank." - ".$rankdescription."".$navyrank." - ".$navyrankdescription."".number_format($hit, 0, '.', ',')."".number_format($_POST["kills"]*$hit, 0, '.', ',')."".$lastupdate."
Grand Total".$players."".number_format($totaldamage, 0, '.', ',')."
".$erevid."".$name."".$level."".$str."".$intelligence."".getmu($muid)."".$rank." - ".$rankdescription."".$navyrank." - ".$navyrankdescription."".number_format($hit, 0, '.', ',')."".number_format($_POST["kills"]*$hit, 0, '.', ',')."".$lastupdate."
Grand Total".number_format($totaldamage, 0, '.', ',')."
".$erevid."".$name."".$country."".number_format($hit, 0, '.', ',')."".number_format($hits*$hit, 0, '.', ',')."".$lastupdate.""; if ($ahits > 0) { echo "A:".number_format($ahits, 0, '.', ','); } if ($dhits > 0) { echo "D:".number_format($dhits, 0, '.', ','); } echo ""; if ($admg > 0) { echo "A:".number_format($admg, 0, '.', ','); } if ($ddmg > 0) { echo "D:".number_format($ddmg, 0, '.', ','); } echo "
Grand Total".number_format($totalhits, 0, '.', ',')."".number_format($totaldamage, 0, '.', ',')."A:".number_format($totalahits, 0, '.', ',')."
D:".number_format($totaldhits, 0, '.', ',')."
A:".number_format($totaladmg, 0, '.', ',')."
D:".number_format($totalddmg, 0, '.', ',')."