Advertisement
Guest User

Untitled

a guest
May 28th, 2012
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <title>*BETA* Dps Calc. *BETA*</title>
  4. </head>
  5.  
  6. <body>
  7.  
  8. <form method = "post"
  9.         action = "characterbeta.php">
  10. <h3>Character -> Details -> Offense</h3>
  11. <h3>With <b><u>no weapon on</u></b></h3>
  12. <h3>At the current time this only supports 2h / or 1h with a shield / quiver. Any questions please message Adam#1323 directly.</h3>
  13. <fieldset>
  14. <table cellspacing="0" cellpadding ="0" border="0">
  15. <tr>
  16. <td>
  17. Primary stat</td><td><input type = "text"
  18.            name = "PrimaryStat"
  19.            value = "993" /></td>
  20. </tr>
  21. <tr>
  22. <td>
  23. Dmg Increased by Skills</td><td><input type = "text"
  24.            name = "DmgBySkills"
  25.            value = "0" /></td>
  26. </tr>
  27. <tr>
  28. <td>
  29. Critical Hit Chance</td><td><input type = "text"
  30.            name = "CritChance"
  31.            value = "9" /></td>
  32. </tr>
  33. <tr>
  34. <td>
  35. Critical Hit Dmg</td><td><input type = "text"
  36.            name = "CritDmg"
  37.            value = "50" /></tr>
  38. </table>
  39. </fieldset>
  40. <h3>Weapon</h3>
  41. <fieldset>
  42. WeaponMinDmg <input type = "text"
  43.            name = "WeaponMinDmg"
  44.            value = "343" /> <br />
  45. WeaponMaxDmg <input type = "text"
  46.            name = "WeaponMaxDmg"
  47.            value = "816" /> <br />
  48. Attacks per second (In Gray Text above the blue Mods)<input type = "text"
  49.            name = "WeaponAttackSpeed"
  50.            value = "1.4" /> <br />
  51. Primary stat <input type = "text"
  52.            name = "WeaponPrimaryStat"
  53.            value = "0" /><br />
  54. Critical Hit Chance <input type = "text"
  55.            name = "WeaponCritChance"
  56.            value = "0" /> <br />
  57. Critical Hit Dmg <input type = "text"
  58.            name = "WeaponCritDmg"
  59.            value = "0" /> <br />           
  60. </fieldset>
  61.  
  62. <h3>If DW, Weapon 2</h3>
  63. <fieldset>
  64. WeaponMinDmg <input type = "text"
  65.            name = "OMinDmg"
  66.            value = "159" /> <br />
  67. WeaponMaxDmg <input type = "text"
  68.            name = "OMaxDmg"
  69.            value = "247" /> <br />
  70. Attacks per second (In Gray Text above the blue Mods)<input type = "text"
  71.            name = "OAttackSpeed"
  72.            value = "1.2" /> <br />
  73. Primary stat <input type = "text"
  74.            name = "OPrimaryStat"
  75.            value = "150" /><br />
  76. Critical Hit Chance <input type = "text"
  77.            name = "OCritChance"
  78.            value = "0" /> <br />
  79. Critical Hit Dmg <input type = "text"
  80.            name = "OCritDmg"
  81.            value = "0" /> <br />           
  82. </fieldset>
  83.  
  84. <h3>Look at your gear, put in totals</h3>
  85. <fieldset>
  86. +Attack speed (add it all up)<input type = "text"
  87.            name = "AttackSpeed"
  88.            value = "0" /><br />
  89. +Damage (minimum values)<input type = "text"
  90.            name = "CDmgMin"
  91.            value = "6" /><br />
  92. +Damage (maximum values)<input type = "text"
  93.            name = "CDmgMax"
  94.            value = "12" /><br />
  95. </fieldset>
  96. <input  type="hidden"
  97.             name="hidden0"
  98.             value="submitted"/>
  99.  
  100. <button type = "submit">
  101.     calculate
  102. </button>
  103.  
  104. </form>
  105. </fieldset>
  106.  
  107. <?php
  108. $CPrimaryStat= filter_input(INPUT_POST, "PrimaryStat");
  109. $CSkill= filter_input(INPUT_POST, "DmgBySkills");
  110. $CAs= filter_input(INPUT_POST, "AttackSpeed");
  111. $CCrit= filter_input(INPUT_POST, "CritChance");
  112. $CCritDmg= filter_input(INPUT_POST, "CritDmg");
  113.  
  114. $Cmin= filter_input(INPUT_POST, "CDmgMin");
  115. $Cmax= filter_input(INPUT_POST, "CDmgMax");
  116.  
  117. $Wmax= filter_input(INPUT_POST, "WeaponMaxDmg");
  118. $Wmin= filter_input(INPUT_POST, "WeaponMinDmg");
  119. $WPrimaryStat= filter_input(INPUT_POST, "WeaponPrimaryStat");
  120. $WAs= filter_input(INPUT_POST, "WeaponAttackSpeed");
  121. $WCrit= filter_input(INPUT_POST, "WeaponCritChance");
  122. $WCritDmg= filter_input(INPUT_POST, "WeaponCritDmg");
  123.  
  124. $Omax= filter_input(INPUT_POST, "OMaxDmg");
  125. $Omin= filter_input(INPUT_POST, "OMinDmg");
  126. $OPrimaryStat= filter_input(INPUT_POST, "OPrimaryStat");
  127. $OAs= filter_input(INPUT_POST, "OAttackSpeed");
  128. $OCrit= filter_input(INPUT_POST, "OCritChance");
  129. $OCritDmg= filter_input(INPUT_POST, "OCritDmg");
  130.  
  131. if(isset($_POST['hidden0']))
  132. {
  133.     $wpndmg = ($Wmin + $Wmax)/2;
  134.     $chardmg = ($Cmin + $Cmax)/2;
  135.     if($Omax == 0){
  136.         $damage = $wpndmg + $chardmg;
  137.         $attackspeed = $WAs * (1+$CAs);
  138.         $crit = (($CCrit + $WCrit)/100) * (($WCritDmg + $CCritDmg)/100);
  139.         $primestat = $CPrimaryStat + $WPrimaryStat;
  140.     }else{
  141.         $odmg = ($Omin + $Omax)/2;
  142.         $damage = ($wpndmg + $odmg)/2 + $chardmg ;
  143.         $attackspeed = (($WAs + $OAs)/2) * (1+$CAs+.15);//This line is wrong.
  144.         /*
  145.        
  146.         This is wrong with the values I have saved you should get $Shown = 7722.29
  147.         to get that number $attackspeed needs to be between 1.48534 - 1.48535
  148.        
  149.         */
  150.         $crit = (($OCrit+$CCrit + $WCrit)/100) * (($OCritDmg+$WCritDmg + $CCritDmg)/100);
  151.         $primestat = $CPrimaryStat + $WPrimaryStat+$OPrimaryStat;
  152.     }
  153.         $Shown = (1+($primestat/100))*$damage*$attackspeed*(1+$crit)*(1+($CSkill/100));
  154.         echo $Shown;
  155.  
  156. }else{
  157.     print "Fill in the blanks please<br />";
  158. }  
  159. ?>
  160.  
  161. </body>
  162. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement