chaoswar4u Posted March 29, 2007 Posted March 29, 2007 Im having problems regarding EXP given out when a user attacks. A few of my members I found it to attack each other for EXP however when they are around the same level each its giving them around 30 - 50% exp thus can level quite alot in a day. Now I no in the attacktake.php which has a formula for exp however I carnt get a good effect from it. Now unless I should be changing this from somewhere els I dont no. I just need help in either to bring down EXP when a user attacks and leaves or a way to limit the attacks a user can do per day to another user (e.g 5 attacks per day per 1 user id). Any help would be very greatful Thx all for your time and help if posted in advance. Quote
CraigF Posted March 29, 2007 Posted March 29, 2007 Re: EXP given in attacks? for v1, its in Attackwon.php mysql_query("UPDATE users SET exp=exp+$gain WHERE userid=$userid",$c); or something along them lines, well just change that Quote
CraigF Posted March 29, 2007 Posted March 29, 2007 Re: EXP given in attacks? correction: $expgain=rand($qe/4,$qe/2); $expperc=(int) ($expgain/$ir['exp_needed']*100); change that bit. $qe is the level*level*level Quote
kronow Posted March 29, 2007 Posted March 29, 2007 Re: EXP given in attacks? correction: $expgain=rand($qe/4,$qe/2); $expperc=(int) ($expgain/$ir['exp_needed']*100); change that bit. $qe is the level*level*level dont play with "$expperc=(int) ($expgain/$ir['exp_needed']*100);" taht is your globl exp formular Quote
CraigF Posted March 29, 2007 Posted March 29, 2007 Re: EXP given in attacks? i didnt say change that i said to change $expgain=rand($qe/4,$qe/2); well atleast i meant to :D Quote
chaoswar4u Posted March 30, 2007 Author Posted March 30, 2007 Re: EXP given in attacks? Thx for the replys people. Least for one thing i am changing the right bit of code. This peace of code $expgain=rand($qe/4,$qe/2); which number is best to be changed to alter EXP given. Im unsure how its calculating this so carnt understand whats happening. For example i run V2 mccodes and the formula is $expgain=rand($qe/2,$qe); Ive added a / and a number to the other $qe which mine hasn't got however if the values are set wrong it begings to give fixed amounts of hp and not be random. WIthout understanding the calculation its all guess work and causes players not to be happy with incorrect changes ?????????????????? :? Quote
CraigF Posted March 30, 2007 Posted March 30, 2007 Re: EXP given in attacks? yeah well do it and then just credit everyone like 50 crystals or something Quote
chaoswar4u Posted April 2, 2007 Author Posted April 2, 2007 Re: EXP given in attacks? Thx for the reply's. After much thought of not upseting my members i decided to make the formula change at certain levels. Thus as you go up levels the formula gets harder. A steady increase instead of an instant change seems to have worked in my game. Could be an idea in other games. 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.