Agon Posted October 6, 2009 Posted October 6, 2009 Basically, I'm trying to adjust this to give less experience, and more cash. $stole=make_bigint(rand($r['money']/500,$r['money']/20)); print "You beat {$r['username']} and stole \$$stole"; $qe=$r['level']*$r['level']*$r['level']; $expgain=rand($qe/4,$qe/2); $expperc=(int) ($expgain/$ir['exp_needed']*100); print " and gained $expperc% EXP!"; mysql_query("UPDATE users SET exp=exp+$expgain,money=money+$stole WHERE userid=$userid",$c); Quote
Curt Posted October 6, 2009 Posted October 6, 2009 This is a simple one.... this determines how much money you get... $stole=make_bigint(rand($r['money']/500,$r['money']/20)); and this determines how much exp you get... $qe=$r['level']*$r['level']*$r['level']; $expgain=rand($qe/4,$qe/2); You could simply take away one of the $r['level'] (qe=$r['level']*$r['level']*$r['level'];) and that would give u less exp i think...also multiply money by rand number between 1,20 instead of dividing ($r['money']/20));)that would give u more money..... but you need to learn to change this around until you find what suits you hope that helps you later EDIT"" just relized u could possibly take more money than the player actually has doing it the way i said... and easy way would simply be : $stole=make_bigint(rand($r['money']*.05,$r['money']*.20)); Quote
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.