<html>
<head>
<title>Dps Calc.</title>
</head>
<body>
<form method = "post"
action = "character.php">
<h3>Character -> Details -> Offense</h3>
<h3>With no weapon on</h3>
<h3>At the current time this only supports 2h / or 1h with a shield / quiver. Any questions please message Adam#1323 directly.</h3>
<fieldset>
<table cellspacing="0" cellpadding ="0" border="0">
<tr>
<td>
Primary stat</td><td><input type = "text"
name = "PrimaryStat"
value = "0" /></td>
</tr>
<tr>
<td>
Dmg Increased by Skills</td><td><input type = "text"
name = "DmgBySkills"
value = "0" /></td>
</tr>
<tr>
<td>
Critical Hit Chance</td><td><input type = "text"
name = "CritChance"
value = "0" /></td>
</tr>
<tr>
<td>
Critical Hit Dmg</td><td><input type = "text"
name = "CritDmg"
value = "0" /></tr>
</table>
</fieldset>
<h3>Weapon</h3>
<fieldset>
WeaponMinDmg <input type = "text"
name = "WeaponMinDmg"
value = "0" /> <br />
WeaponMaxDmg <input type = "text"
name = "WeaponMaxDmg"
value = "0" /> <br />
Primary stat <input type = "text"
name = "WeaponPrimaryStat"
value = "0" /><br />
Attacks per second (In Gray Text above the blue Mods)<input type = "text"
name = "WeaponAttackSpeed"
value = "0" /> <br />
Critical Hit Chance <input type = "text"
name = "WeaponCritChance"
value = "0" /> <br />
Critical Hit Dmg <input type = "text"
name = "WeaponCritDmg"
value = "0" /> <br />
</fieldset>
<h3>Look at your gear, put in totals</h3>
<fieldset>
+Attack speed (add it all up)<input type = "text"
name = "AttackSpeed"
value = "0" /><br />
+Damage (minimum values)<input type = "text"
name = "CDmgMin"
value = "0" /><br />
+Damage (maximum values)<input type = "text"
name = "CDmgMax"
value = "0" /><br />
</fieldset>
<input type="hidden"
name="hidden0"
value="submitted"/>
<button type = "submit">
calculate
</button>
</form>
</fieldset>
<?php
$CPrimaryStat= filter_input(INPUT_POST, "PrimaryStat");
$CSkill= filter_input(INPUT_POST, "DmgBySkills");
$CAs= filter_input(INPUT_POST, "AttackSpeed");
$CCrit= filter_input(INPUT_POST, "CritChance");
$CCritDmg= filter_input(INPUT_POST, "CritDmg");
$Wmin= filter_input(INPUT_POST, "WeaponMinDmg");
$Cmin= filter_input(INPUT_POST, "CDmgMin");
$Cmax= filter_input(INPUT_POST, "CDmgMax");
$Wmax= filter_input(INPUT_POST, "WeaponMaxDmg");
$WPrimaryStat= filter_input(INPUT_POST, "WeaponPrimaryStat");
$WAs= filter_input(INPUT_POST, "WeaponAttackSpeed");
$WCrit= filter_input(INPUT_POST, "WeaponCritChance");
$WCritDmg= filter_input(INPUT_POST, "WeaponCritDmg");
if(isset($_POST['hidden0']))
{
$wpndmg = ($Wmin + $Wmax)/2;
$chardmg = ($Cmin + $Cmax)/2;
$damage = $wpndmg + $chardmg;
$attackspeed = $WAs * (1+$CAs);
$crit = (($CCrit + $WCrit)/100) * (($WCritDmg + $CCritDmg)/100);
$primestat = $CPrimaryStat + $WPrimaryStat;
$Shown = (1+($primestat/100))*$damage*$attackspeed*(1+$crit)*(1+($CSkill/100));
echo $Shown;
}else{
print "Fill in the blanks please<br />";
}
?>
</body>
</html>