View Single Post
  #13  
Old 07-30-2008, 04:33 AM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by wild8900 View Post
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.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.

Last edited by Switch; 07-30-2008 at 04:45 AM..
Reply With Quote