jcrocker801 Posted March 13, 2009 Share Posted March 13, 2009 i need help getting this formula to work right for the game ...ok so i dont wnt peoepl to lvl to fast for the game..they are hitting each other and gaining ground to fast,,,i can tkeep up with the cities or the stuff for them..lvl 15 poeple are hitting poeple lvl 90 or higher with much higher stats to catch up to them when they are not equipped. this is the formula i am using ...can someone help me please $expgain=rand($qe/50,$ge/50 ) is the original //this is tfor a max of 75 $expgain=rand*$qe/2,$qe); im using the second formula the first one is the original. rand is set at a value for example if i were to say rand(1,100) one would be the lowest you can have and 100 the max), so if you take that apply it to the variables you can see how this code works. the $qe varlaible is the quantiny of experience inolved in the comparison later coded as the diference between the two players in the attack Quote Link to comment Share on other sites More sharing options...
POG1 Posted March 13, 2009 Share Posted March 13, 2009 Re: help with this formula The second will produce an error and why not just add an exp cap? Quote Link to comment Share on other sites More sharing options...
AlabamaHit Posted March 29, 2009 Share Posted March 29, 2009 Re: help with this formula max of 75 what % ? thats easy... try this out. $expgain = rand($qe/50,$qe/50) > $ir['exp_needed']/100*75 ? $ir['exp_needed']/100*75 : rand($qe/50,$qe/50); Quote Link to comment Share on other sites More sharing options...
POG1 Posted March 30, 2009 Share Posted March 30, 2009 Re: help with this formula @alabamaHit I think this needs changing: rand($qe/50,$qe/50) it will result in the same value for both parameters Quote Link to comment Share on other sites More sharing options...
AlabamaHit Posted March 30, 2009 Share Posted March 30, 2009 Re: help with this formula Yeah I agree. I just used it cause he claims it was his original. I guess who ever gave him the codes or where he donwloaded it someone messed them up lol 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.