Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Adding Stats costs more $ the higher THEIR Lv.


mrmiguu
 Share

Recommended Posts

Dim Total
Dim Cost

Total = (getplayerstr(index) + getplayerdef(index) + getplayermagi(index) + getplayerspeed(index) + 11)
Cost = total / 10

that 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 Total
Dim Cost

Total = (getplayerstr(index) + getplayerdef(index) + getplayermagi(index) + getplayerspeed(index) + 11)
Cost = total / 10

If getplayerpoints(index) < cost then
    call playermsg(index, "You do not have enough points to add increase your stats.", BRIGHTRED)
    Exit Sub
end if

```

that should work.
Link to comment
Share on other sites

```
oh it didnt sound like you meant that...

i beleive there is a parameter for which one to use, 0-3
youwould have to make a case select.
and do like..
[code
Dim Total
Dim Cost

case select (variable used for stat selection)
case 0
  stat = getplayerstr(index)
case 1
  stat - getplayerdef(index)
case 2
...
case 3
...
end case select

Total = (Stat + 11)
Cost = total / 10

If getplayerpoints(index) < cost then
    call playermsg(index, "You do not have enough points to add increase your stats.", BRIGHTRED)
    Exit Sub
end if

then in the -1 part you -cost

```
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...