mrmiguu Posted October 15, 2008 Author Share Posted October 15, 2008 Could someone please come up with a formula for me to where whenever you add stat points, it checks all the stats Lv.'s and based on that it costs (1 + Int((GetPlayerStat(Index, str, def, magi, speed) + 10) \ 10)) Link to comment Share on other sites More sharing options...
shadowwulf Posted October 15, 2008 Share Posted October 15, 2008 Dim TotalDim CostTotal = (getplayerstr(index) + getplayerdef(index) + getplayermagi(index) + getplayerspeed(index) + 11)Cost = total / 10that is how you would figure the cost.I am a little confused at what you are doing with it though.Do you want say all 20 stats would make it.. 91/10 so 9 points.so in order to raise str you need 9 points?then in the sub for use player points, put like…```Dim TotalDim CostTotal = (getplayerstr(index) + getplayerdef(index) + getplayermagi(index) + getplayerspeed(index) + 11)Cost = total / 10If getplayerpoints(index) < cost then call playermsg(index, "You do not have enough points to add increase your stats.", BRIGHTRED) Exit Subend if```that should work. Link to comment Share on other sites More sharing options...
mrmiguu Posted October 15, 2008 Author Share Posted October 15, 2008 This method is flawed though because It checks the AVG of all the stat's Lv.'s rather than each stat's individual level. Can't I just have a loop check through each stat's Lv.? Link to comment Share on other sites More sharing options...
shadowwulf Posted October 15, 2008 Share Posted October 15, 2008 ```oh it didnt sound like you meant that...i beleive there is a parameter for which one to use, 0-3youwould have to make a case select.and do like..[codeDim TotalDim Costcase select (variable used for stat selection)case 0 stat = getplayerstr(index)case 1 stat - getplayerdef(index)case 2 ...case 3...end case selectTotal = (Stat + 11)Cost = total / 10If getplayerpoints(index) < cost then call playermsg(index, "You do not have enough points to add increase your stats.", BRIGHTRED) Exit Subend ifthen in the -1 part you -cost``` Link to comment Share on other sites More sharing options...
mrmiguu Posted October 15, 2008 Author Share Posted October 15, 2008 nvm, I fixed it by having the reduction for each specific stat in each stat's case. ty so much for all of your help! Link to comment Share on other sites More sharing options...
shadowwulf Posted October 15, 2008 Share Posted October 15, 2008 no problem.im so stuck in what im doing its nice to know i can help get something accomplished! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now