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

Changing classes after lvl


Alerd
 Share

Recommended Posts

Hello this is my first tutorial that will help counting ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)

Open server search ctrl+f

```

Call SetPlayerExp(Index, expRollover)

```

In this paste:

```

Select Case GetPlayerLevel(Index)

Case 15

If GetPlayerClass(Index) = 1 Then

SetPlayerClass Index, 2

SetPlayerSprite Index, 2

SetPlayerStat Index, Strength, GetPlayerStat(Index, Strength) + 10

SetPlayerStat Index, Endurance, GetPlayerStat(Index, Endurance) + 10

SendStats Index

Call PlayerMsg(Index, "Upgrade Class ![:)](http://www.touchofdeathforums.com/community/public/style_emoticons/<#EMO_DIR#>/smile.png)", Yellow)

End If

End Select

```

```
case 15 >> the level at which a character is transformed

If GetPlayerClass(Index) = 1 Then >>>class number which is required

SetPlayerClass Index, 2>>>In what class changes

SetPlayerSprite Index, 2 >>>It is known

SetPlayerStat Index, Strength, GetPlayerStat(Index, Strength) [color]+ 10[/color] <<
```
Link to comment
Share on other sites

in server classes.ini hide new classes look for this tut

[http://www.touchofdeathforums.com/community/index.php?/topic/117005-eo-locked-classes/](http://www.touchofdeathforums.com/community/index.php?/topic/117005-eo-locked-classes/)
Link to comment
Share on other sites

> I'm sorry but I'm not able to check if your answer if you swap + to -

Thats fine I think Ive worked it out but I do have a question that is vital to me

how would I make this so a player could choose there class advancement? here is my plan - everyone starts out as the same class, at level 5 the can become either a mage, priest, hunter or warrior. how would I go about this?
Link to comment
Share on other sites

To make sure the stat doesn't go over the class max you would have to edit it to remove the stats that are over.

Example:

```
Dim extraStats As Long

extraStats = 0

Select Case GetPlayerLevel(Index)

Case 15

If GetPlayerClass(Index) = 1 Then

SetPlayerClass Index, 2

SetPlayerSprite Index, 2

SetPlayerStat Index, Strength, GetPlayerStat(Index, Strength) + 10

If GetPlayerStat(Index, Strength) + 10 > 30 Then

extraStats = extraStats + GetPlayerStat(Index, Strength) - 30

SetPlayerStat Index, Strength, 30

'replace 30 with whatever the classes max is

End If

SetPlayerStat Index, Endurance, GetPlayerStat(Index, Endurance) + 10

If GetPlayerStat(Index, Endurance) + 10 > 40 Then

extraStats = extraStats + GetPlayerStat(Index, Endurance) - 40

SetPlayerStat Index, Endurance, 40

'replace 40 with whatever the classes max is

End If

SetPlayerPOINTS Index, GetPlayerPOINTS(Index + extraStats)

SendStats Index

SendPlayerData Index

Call PlayerMsg(Index, "Upgrade Class", Yellow)

End If

End Select
```
Link to comment
Share on other sites

  • 1 year later...

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...