• 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!

C++ Looking for specific script - on death respawn with chosen items

hayrien

New Member
Joined
Sep 2, 2014
Messages
85
Reaction score
3
Location
Norway
Hey, i am looking for a very specific script. It involves resetting level to 100 with a preset of skills and equipment after every death.
For the level part i am already looking into this part here.

Any help are appreciated.

edited: after every death.
 
Last edited:
1. Easy way (not 100% safe):
Edit player in database with SQL queries, but it will work only if player is offline.

2. Right way:
Add new Lua functions in C++, that will allow you to directly modify skill/skill tries/exp/magic level/mana spent variables in player.h, without calling 'addSkillTries'/'removeSkillTries`/'addExperience'/'removeExperience' and similar functions, which may change value to other value than you planned (ex. you run player:addExperience(1000) and expects to get +1000 exp, but some Player:onGainExperience Lua callback may apply +20% exp multiplier and change it to +1200 exp)
 
1. Easy way (not 100% safe):
Edit player in database with SQL queries, but it will work only if player is offline.

2. Right way:
Add new Lua functions in C++, that will allow you to directly modify skill/skill tries/exp/magic level/mana spent variables in player.h, without calling 'addSkillTries'/'removeSkillTries`/'addExperience'/'removeExperience' and similar functions, which may change value to other value than you planned (ex. you run player:addExperience(1000) and expects to get +1000 exp, but some Player:onGainExperience Lua callback may apply +20% exp multiplier and change it to +1200 exp)
thank you, figured it eventually!
 
There is limit of skills set to 10, u can change it to other values depends of character vocations.
For example knight sword fighting minimum skill could be 50 instead 10.

For magic level, u can do the same but it all depends of manaspend of your character :)

This is the way i prevent people from losing too many skills on my war server.
 
Back
Top