ID:155082
 
How would I go about making it to where a player gets a 10% boost to a certain stat?
Chwgt wrote:
How would I go about making it to where a player gets a 10% boost to a certain stat?

I know it's not going to be perfect coding but it's all just the math so

stat = stat+(stat*.1) //Multiplies stat by 10% then adds that to stat while making stat the result. Or
stat = stat*1.1 //Multiplies stat by 110% which effectively adds 10%


EDIT:
I don't think you need the parenthesis, not sure if DM follows the rules but I always like to put them regardless so I know what I was wanting when I look back at it.
In response to THESINKING (#1)
Thanks.
In response to THESINKING (#1)
Or


mob/proc/Addhealth(percentage)
health += health / 100 * percentage