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

How to calculate skills' count on database for a given skill level?

fschuindt

Member
Joined
Oct 11, 2012
Messages
41
Reaction score
14
Location
Brazil
GitHub
fschuindt
Hi there, folks.

My player_skills table have the following structure:
SQL:
(`player_id` INT, `skillid` INT, `value` INT, `count` INT)

I know that the skillid goes from 0 to 6, to be: 0:fist, 1:club, 2:sword, 3:axe, 4:distance, 5:shielding, 6:fishing.

So if I want to create a given player with distance 90, I'll do something like:
SQL:
INSERT INTO `player_skills` (`player_id`, `skillid`, `value`, `count`) VALUES (8, 4, 90, 0);

That works, but the player keeps advancing distance like crazy. 91, 92, 93... Really fast. I think that the count column must be something other than zero. I've looked into some formulas for skill calculation on some wikis but I'm still confused. What's the value I should put on count and how to calculate it?

Thank you!
 
Back
Top