ignite Posted February 12, 2008 Posted February 12, 2008 Donators energy regen seems to vary between 12% and 17% for different users, does anyone know why this could be happening ? There max energy is set to +2 for every level. Cron for donators: $query5="UPDATE users SET energy=energy+(maxenergy/(6.5)) WHERE energy<maxenergy AND donatordays>0"; Quote
ignite Posted February 22, 2008 Author Posted February 22, 2008 Re: Energy regen for donators bump Quote
Ishy Posted February 23, 2008 Posted February 23, 2008 Re: Energy regen for donators Hmm... Is there a certain percentage you want all the Energy Crons to go up by on every user? Quote
erus Posted February 27, 2008 Posted February 27, 2008 Re: Energy regen for donators Donators energy regen seems to vary between 12% and 17% for different users, does anyone know why this could be happening ? There max energy is set to +2 for every level. Cron for donators: $query5="UPDATE users SET energy=energy+(maxenergy/(6.5)) WHERE energy<maxenergy AND donatordays>0"; the reason for this is because the cron is updating the energy by a division and not %age so if said user has 100 energy the cron would devide this by 6.5 = 15.38% per tick and user 2 has 170 energy this would also be devived by 6.5 = 26.15% per tick this is the part you need to look at and set your formula to energy=energy+(maxenergy/(6.5)) = divides the max enery of a user by 6.5 then adds it = different %age per user you could always try this energy=energy+(maxenergy/(100)*20)) not sure if that is right but it should give 20% to all users (I am not a coder but good at mathematics) forgot a ')' 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.