• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action Exp Scroll Gives 1 Lvl And Magic Skill Scroll

Add in 050-function.lua
Code:
function doPlayerAddSkillLevel(cid, skill, amount)
     for i = 1, amount do
         doPlayerAddSkillTry(cid, skill, (getPlayerRequiredSkillTries(cid, skill, getPlayerSkillLevel(cid, skill) + 1) - getPlayerSkillTries(cid, skill)), false)
     end
     return true
end
How to use
Code:
doPlayerAddSkillLevel(cid, SKILL_SWORD, 2)

Code:
     setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage) + 1)

a bit more explain cause it's 6:56 AM :D
The third parameter is the value it should set, so it gets the current value + 1, this way it counts.
 
Add in 050-function.lua
Code:
function doPlayerAddSkillLevel(cid, skill, amount)
     for i = 1, amount do
         doPlayerAddSkillTry(cid, skill, (getPlayerRequiredSkillTries(cid, skill, getPlayerSkillLevel(cid, skill) + 1) - getPlayerSkillTries(cid, skill)), false)
     end
     return true
end
How to use
Code:
doPlayerAddSkillLevel(cid, SKILL_SWORD, 2)


The third parameter is the value it should set, so it gets the current value + 1, this way it counts.

Yup, Understood It :D
Thank you teacher ^_^
 
Back
Top