75) $iEIAS = 75; $iWSM = $_POST['iWSM']; $iSIAS = $_POST['iSIAS']; if ($iSIAS < -80) $iSIAS =-80; if ($iSIAS > 140) $iSIAS =140; } else { $sClass = "Amazon"; $sWeapon = "1H Swing"; $sAttack = "Normal Attack"; $iEIAS = 0; $iWSM = 0; $iSIAS = 0; } ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// define ("MAX_ATTACKS", "16"); define ("MIN_ANI_SPEED", "15"); define ("MAX_ANI_SPEED", "175"); for ($i=0; $i\n"; print ""; print ""; print "\n"; print ""; print "\n"; print ""; $iReqEIAS = $iEIAS + $iWSM - $iSIAS; if ($iReqEIAS < 0) $iReqEIAS = 0; if ($iReqEIAS > 119) $iReqEIAS = 119; $iReqIAS = $iIAS[$iReqEIAS]; print "\n"; print ""; print "\n"; print "
Class\n"; print "EIAS to be attained "; print "
Weapon Type "; print "Skill IAS"; print "
Attack Type"; print "Item IAS you need "; print "
Weapon WSM"; print "

"; ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// if ($sClass=="Amazon") { $iAniStartFrame = 2; if ($sWeapon=="1H Swing") { $iAniLength = 16; $iAniActionFrame = 10; $iAniBaseMult = 239; } elseif ($sWeapon=="1H Thrust") { $iAniLength = 15; $iAniActionFrame = 9; $iAniBaseMult = 222; } elseif ($sWeapon=="2H Swing (Sword)") { $iAniLength = 20; $iAniActionFrame = 12; $iAniBaseMult = 288; } elseif ($sWeapon=="2H Swing (Other)") { $iAniLength = 20; $iAniActionFrame = 12; $iAniBaseMult = 288; } elseif ($sWeapon=="2H Thrust") { $iAniLength = 18; $iAniActionFrame = 11; $iAniBaseMult = 256; } } if ($sClass=="Assassin") { $iAniStartFrame = 0; if ($sWeapon=="1H Swing") { $iAniLength = 15; $iAniActionFrame = 7; $iAniBaseMult = 256; } elseif ($sWeapon=="1H Thrust") { $iAniLength = 15; $iAniActionFrame = 7; $iAniBaseMult = 256; } elseif ($sWeapon=="2H Swing (Sword)") { $iAniLength = 19; $iAniActionFrame = 9; $iAniBaseMult = 304; } elseif ($sWeapon=="2H Swing (Other)") { $iAniLength = 23; $iAniActionFrame = 11; $iAniBaseMult = 368; } elseif ($sWeapon=="2H Thrust") { $iAniLength = 23; $iAniActionFrame = 10; $iAniBaseMult = 352; } } if ($sClass=="Barbarian") { $iAniStartFrame = 0; if ($sWeapon=="1H Swing") { $iAniLength = 16; $iAniActionFrame = 7; $iAniBaseMult = 256; } elseif ($sWeapon=="1H Thrust") { $iAniLength = 16; $iAniActionFrame = 7; $iAniBaseMult = 256; } elseif ($sWeapon=="2H Swing (Sword)") { $iAniLength = 19; $iAniActionFrame = 9; $iAniBaseMult = 304; } elseif ($sWeapon=="2H Swing (Other)") { $iAniLength = 18; $iAniActionFrame = 8; $iAniBaseMult = 288; } elseif ($sWeapon=="2H Thrust") { $iAniLength = 19; $iAniActionFrame = 9; $iAniBaseMult = 304; } } if ($sClass=="Druid") { $iAniStartFrame = 0; if ($sWeapon=="1H Swing") { $iAniLength = 19; $iAniActionFrame = 9; $iAniBaseMult = 304; } elseif ($sWeapon=="1H Thrust") { $iAniLength = 19; $iAniActionFrame = 8; $iAniBaseMult = 304; } elseif ($sWeapon=="2H Swing (Sword)") { $iAniLength = 17; $iAniActionFrame = 9; $iAniBaseMult = 272; } elseif ($sWeapon=="2H Swing (Other)") { $iAniLength = 21; $iAniActionFrame = 10; $iAniBaseMult = 336; } elseif ($sWeapon=="2H Thrust") { $iAniLength = 23; $iAniActionFrame = 9; $iAniBaseMult = 328; } } if ($sClass=="Necromancer") { $iAniStartFrame = 0; if ($sWeapon=="1H Swing") { $iAniLength = 19; $iAniActionFrame = 9; $iAniBaseMult = 304; } elseif ($sWeapon=="1H Thrust") { $iAniLength = 19; $iAniActionFrame = 9; $iAniBaseMult = 304; } elseif ($sWeapon=="2H Swing (Sword)") { $iAniLength = 20; $iAniActionFrame = 11; $iAniBaseMult = 320; } elseif ($sWeapon=="2H Swing (Other)") { $iAniLength = 23; $iAniActionFrame = 11; $iAniBaseMult = 368; } elseif ($sWeapon=="2H Thrust") { $iAniLength = 24; $iAniActionFrame = 10; $iAniBaseMult = 360; } } if ($sClass=="Paladin") { $iAniStartFrame = 0; if ($sWeapon=="1H Swing") { $iAniLength = 15; $iAniActionFrame = 7; $iAniBaseMult = 256; } elseif ($sWeapon=="1H Thrust") { $iAniLength = 17; $iAniActionFrame = 8; $iAniBaseMult = 272; } elseif ($sWeapon=="2H Swing (Sword)") { $iAniLength = 18; $iAniActionFrame = 9; $iAniBaseMult = 288; } elseif ($sWeapon=="2H Swing (Other)") { $iAniLength = 18; $iAniActionFrame = 8; $iAniBaseMult = 288; } elseif ($sWeapon=="2H Thrust") { $iAniLength = 20; $iAniActionFrame = 8; $iAniBaseMult = 294; } } if ($sClass=="Sorceress") { $iAniStartFrame = 2; if ($sWeapon=="1H Swing") { $iAniLength = 20; $iAniActionFrame = 12; $iAniBaseMult = 288; } elseif ($sWeapon=="1H Thrust") { $iAniLength = 19; $iAniActionFrame = 11; $iAniBaseMult = 272; } elseif ($sWeapon=="2H Swing (Sword)") { $iAniLength = 18; $iAniActionFrame = 11; $iAniBaseMult = 256; } elseif ($sWeapon=="2H Swing (Other)") { $iAniLength = 24; $iAniActionFrame = 14; $iAniBaseMult = 352; } elseif ($sWeapon=="2H Thrust") { $iAniLength = 23; $iAniActionFrame = 13; $iAniBaseMult = 336; } } if ($sAttack=="Normal Attack") { $iAniRollback = 100; $iAniMaxAttacks = 1; } elseif ($sAttack=="Fend") { $iAniRollback = 60; if ($sClass=="Amazon") { $iAniMaxAttacks = 6; } else { $iAniMaxAttacks = 3; } } elseif ($sAttack=="Killer Scythe") { $iAniRollback = 80; $iAniMaxAttacks = 6; } elseif ($sAttack=="Zeal") { $iAniRollback = 100; $iAniMaxAttacks = 5; } elseif ($sAttack=="Fanatic Swing") { $iAniRollback = 60; $iAniMaxAttacks = 5; } $iAniBaseSpeed = 100; $iMinEIAS = -30; $iMaxEIAS = 75; ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// function CalcAttackSequence() { global $iAniLength, $iAniStartFrame, $iAniActionFrame, $iAniBaseMult; global $iAniBaseSpeed, $iAniRollback, $iAniMaxAttacks; global $iMinEIAS, $iMaxEIAS, $iStepEIAS; global $iCurEIAS, $aiFrames; for ($i=0; $iMAX_ANI_SPEED) return -1; $iAniIncr = ($iAniBaseMult * $iAniSpeed) / 100; if ($iAniActionFrame<=0) $iAniActionFrame = $iAniLength; while (TRUE) { $iFrame += 1; $iAniPos += $iAniIncr; $iAniFrame = $iAniPos / 256; if ($iAniPos>=($iAniLength*256)) break; // Check animation termination if (($iAttack<$iAniMaxAttacks) && ($iAniFrame>=$iAniActionFrame)) { $aiFrames[$iAttack] = $iFrame - $iLastAttackFrame; $iLastAttackFrame = $iFrame; $iAttack += 1; if ($iAttack<$iAniMaxAttacks) // Rollback { $iAniFrame = ($iAniFrame * (100-$iAniRollback)) / 100; $iAniPos = $iAniFrame * 256; } } } $aiFrames[$iAttack] = $iFrame - $iLastAttackFrame - 1; return $iFrame-1; } ///////////////////////////////////////////////////////////////////////////// // ///////////////////////////////////////////////////////////////////////////// if ( ($sClass!="Necromancer" && $sAttack=="Killer Scythe") || ($sClass!="Sorceress" && $sAttack=="Fanatic Swing") || ($sWeapon=="1H Swing" && $sAttack=="Killer Scythe") || ($sWeapon=="1H Thrust" && $sAttack=="Killer Scythe")) { print "(Not Available)
\n"; } else { print "\n"; print "\n"; if ($iAniMaxAttacks>1) print "\n"; if ($iAniMaxAttacks>2) print "\n"; if ($iAniMaxAttacks>3) print "\n"; if ($iAniMaxAttacks>4) print "\n"; if ($iAniMaxAttacks>5) print "\n"; if ($iAniMaxAttacks>1) { print "\n"; print "\n"; print "\n"; } print "\n"; $iPrevTotal = 999; for ($iCurEIAS=$iMinEIAS; $iCurEIAS<=$iMaxEIAS; $iCurEIAS+=1) { $iFrames = CalcAttackSequence(); $bDifferent = 0; $iTotal = 0; for ($i=0; $i<=$iAniMaxAttacks; $i++) { $iTotal += $aiFrames[$i]; } if ($iTotal<$iPrevTotal) { $iPrevTotal=$iTotal; $bDifferent = -1; } if ($bDifferent) { print "\n"; if ($sAttack!="Normal Attack") for ($i=0; $i<=$iAniMaxAttacks; $i++) print "\n"; print "\n"; if ($sAttack!="Normal Attack") { $fAverage = round($iFrames/$iAniMaxAttacks , 1); print "\n"; } print "\n"; } } print "
EIAS1st2nd3rd4th5th6thEndTotalAvg
$iCurEIAS$aiFrames[$i]$iFrames$fAverage
\n"; } ?>