Quote:
Originally Posted by wild8900
Im having more problems with formulas. Im trying to get the maxhp to be itself + a percentage of it per each point of vitality. The way I have it setup now adds on the percentage each time you add to vitality manually. At level 1 your maxhp is 100 so I guess the base is 100.
clientr.maxhp=int(clientr.maxhp+(clientr.maxhp*0.0 8));
What I'm aiming for a script to check it and adjust it automatically which if I used my formula it would increase nonstop...
|
You need to have the stats (vitality) determine part of it.
For example
clientr.maxhp=int(clientr.vitality*5*2+(clientr.vi tality*0.08));
If you start with 10 vitality, this'd equal 100hp (I forget if int rounds xD)
Then with 11 vitality it'd be 110
Then with 12 vitality it'd be 120
Then with 13 vitality it'd be 131
etc.
You can't have clientr.maxhp part of it because that's a loop.
How much do you want the HP to go up by, though? That's the real issue.
Edit:
clientr.maxhp=int(100*player.level+(clientr.vitali ty*0.08));
Base = 100 so that should work. xD
You'd need more than 8 percent for the vitality to take effect.
Edit 2:
You'd need to have an "onVitalityUp()" for each time vitality goes up so you can use clientr.maxhp as a percentage without looping.