Changing classes after lvl

Hello this is my first tutorial that will help counting :)

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

Thats great but where are the classes located/stored?

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

http://www.touchofdeathforums.com/community/index.php?/topic/117005-eo-locked-classes/

but then the classes.ini loads all of the classes when you create a new char

scratch that I derped

and what version of eclipse is this for?

Ehh why I gave the link to the class cornet blocked during registration … :)

each version eo …

This will come in handy, nice job.

Thank you for your comments :)

this system does it then make the new class stats not be aplied? like if someones stat in strength is 12 and the new class’s stat is 10 will it lower the layer’s stat?

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

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?

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

er excuse me what if i want to change the class from event and reset the stat,and lvland make it into skill point? 😄

omg programming really looks complicated in my eyes 😧  , im not smart 😆

Great first tutorial!  😄

Log in to reply