SHAD Posted April 11, 2011 Share Posted April 11, 2011 I've tried but can't comeup with a good formula for a Hit/Miss. Here are the 2 vars, can anyone help me come up with a good Hit/Miss formula. $Player1Hit = 300; $Player2Dodge = 250; Quote Link to comment Share on other sites More sharing options...
Maniak Posted April 11, 2011 Share Posted April 11, 2011 Bring the Users Level, Agility and Will into it :) Quote Link to comment Share on other sites More sharing options...
SHAD Posted April 11, 2011 Author Share Posted April 11, 2011 Bring the Users Level, Agility and Will into it :) Just need a general hit/miss formula, it's not for mccodes. Quote Link to comment Share on other sites More sharing options...
Maniak Posted April 11, 2011 Share Posted April 11, 2011 Well, why is it in the Mccodes Section then? Quote Link to comment Share on other sites More sharing options...
Djkanna Posted April 11, 2011 Share Posted April 11, 2011 Thread Moved. Quote Link to comment Share on other sites More sharing options...
SHAD Posted April 12, 2011 Author Share Posted April 12, 2011 (edited) OK hoping someone can help me out here abit, the below code is just abit of the formula i am making for hit/miss but getting a problem. The output of the below code is 14.2857142857 but i want it just as 14,so how can that be achieved? $MYACCURACY = 1000; $HISDODGE = 700; $Divide = $MYACCURACY/$HISDODGE; $Multiply = $Divide*100/10; if($Multiply < 1) {$Multiply = 1;} else{abs(intval(round($Multiply)));} echo"{$Multiply}"; Thanks :) Edited April 12, 2011 by SHAD code tags didn't work for me :( Quote Link to comment Share on other sites More sharing options...
lucky3809 Posted April 13, 2011 Share Posted April 13, 2011 You can use floor or ceil instead of round Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.