• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Change new character skills, stats and level

klepacz

New Member
Joined
Aug 12, 2015
Messages
35
Reaction score
0
Im dealing with easy problem (at least i thought so ;D)
What is the most efficient way to change level, stats and skills of new characters? TFS 1.2

About level
I'm using znote, i can easy edit level in config, but for different vocations stats would be wrong - i can't do it.
I can also use addExperience in login script - seems good

About stats
If i would use addExperience the stats should be fixed, but i can also make a login script - setMaxHealth, setMaxMana, setCapacity depending on player - also seems good

About skills
This is the biggest problem. I was thinking about changing DB values in login script - it may work, but i don't really know how skill_tries works. Every time i hit the value is changed by 3. When i change for example skill_sword to 100 and skill_sword _tries would still be 0 the character will skill faster or it doesn't metter? The same thing with maglevel - i can always change maglevel value in DB, but manaspent will still be 0.

Maybe i can change all the values by DB querry, i dont know what way is the best. Can you help me? (mostly to understand how skill_xxx_tries and manaspent work)
 
Im dealing with easy problem (at least i thought so ;D)
What is the most efficient way to change level, stats and skills of new characters? TFS 1.2

About level
I'm using znote, i can easy edit level in config, but for different vocations stats would be wrong - i can't do it.
I can also use addExperience in login script - seems good
This can be handled in an existing script, for example firstitems.lua
https://github.com/otland/forgottenserver/blob/master/data/creaturescripts/scripts/firstitems.lua

About stats
If i would use addExperience the stats should be fixed, but i can also make a login script - setMaxHealth, setMaxMana, setCapacity depending on player - also seems good
This should be handled inside vocations.xml
https://github.com/otland/forgottenserver/blob/master/data/XML/vocations.xml

About skills
This is the biggest problem. I was thinking about changing DB values in login script - it may work, but i don't really know how skill_tries works. Every time i hit the value is changed by 3. When i change for example skill_sword to 100 and skill_sword _tries would still be 0 the character will skill faster or it doesn't metter? The same thing with maglevel - i can always change maglevel value in DB, but manaspent will still be 0.

Maybe i can change all the values by DB querry, i dont know what way is the best. Can you help me? (mostly to understand how skill_xxx_tries and manaspent work)
This can also be handled in an existing script, for example firstitems.lua
https://github.com/otland/forgottenserver/blob/master/data/creaturescripts/scripts/firstitems.lua

Modifying this script should help you accomplish what you are looking to do, just take the relevant code out and place it in firstitems.lua
https://github.com/otland/forgotten...9f205c/data/talkactions/scripts/add_skill.lua
 
Back
Top