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

[Proposal] onSkillAdvance and some losePercent in Config.lua

Virgel

New Member
Joined
Jun 14, 2007
Messages
150
Reaction score
2
It would be cool to see this in TFS 0.3...
Is it posible to build functions to check and reduce skills?
Like:

onSkillAdvance()
getPlayerSkill(cid, skill) (returns the amount of the skill)
doPlayerSetSkill(cid,skill,num)

Its important to reduce the skill without any crashes! Example(Fist):
To check if the amount of a skill is allowed:

Code:
onSkillAdvance()
     maxSkill = getPlayerStorage(cid,num)
     fist = getPlayerSkill(cid,0)
     if fist > maxSkill then
          newfist = fist-1
          doPlayerSetSkill(cid,0,newfist)
     end
end

Another Idea is to add in config:
loseBackpackPercent
loseExpPercent
loseSkillPercent

What do you think about it?
 
It would be cool to see this in TFS 0.3...
Is it posible to build functions to check and reduce skills?
Like:

onSkillAdvance()
getPlayerSkill(cid, skill) (returns the amount of the skill)
doPlayerSetSkill(cid,skill,num)

Its important to reduce the skill without any crashes! Example(Fist):
To check if the amount of a skill is allowed:

Code:
onSkillAdvance()
     maxSkill = getPlayerStorage(cid,num)
     fist = getPlayerSkill(cid,0)
     if fist > maxSkill then
          newfist = fist-1
          doPlayerSetSkill(cid,0,newfist)
     end
end

Another Idea is to add in config:
loseBackpackPercent
loseExpPercent
loseSkillPercent

What do you think about it?

You already can manage loseBackpackPercent
loseExpPercent
loseSkillPercent, in your SQL database...or with DoPlayerSetLossPercent, DoPlayerSetLossSkill.

Also for skills reduceing...yep, it will be nice to have a function which can reduce skills ingame, cuz I think DoPlayerAddSkillTry cannot reduce skills ;]
 
Back
Top