• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Windows Adding skills in database

Glidarn

Member
Joined
May 9, 2009
Messages
970
Reaction score
16
Location
Åkersberga, Sweden
AS the title says how do i fix this?

I tried /addskill player, shielding Didnt work he got like 50% then it stopped, the only thing that works is level and magic level.
 
Code:
function doPlayerAddMagLevel(cid, amount)
	for i = 1, amount do
		doPlayerAddSpentMana(cid, math.ceil((getPlayerRequiredMana(cid, getPlayerMagLevel(cid, true) + 1) - getPlayerSpentMana(cid)) / getConfigInfo('rateMagic')))
	end
	return true
end

function doPlayerAddSkill(cid, skill, amount, round)
	if(skill == SKILL__LEVEL) then
		return doPlayerAddLevel(cid, amount, round)
	elseif(skill == SKILL__MAGLEVEL) then
		return doPlayerAddMagLevel(cid, amount)
	end

	for i = 1, amount do
		doPlayerAddSkillTry(cid, skill, math.ceil((getPlayerRequiredSkillTries(cid, skill, getPlayerSkillLevel(cid, skill) + 1) - getPlayerSkillTries(cid, skill)) / getConfigInfo('rateSkill')))
	end
	return true
end

ss\
 
No, look in the script, there are 2 functions.
First one is for magic levels, the second is for skills.

Oh okey, i have been inactive for a long time, thanks.

@ Cykotitan, shall i replace my the whole 050-function to the one you posted? 'cause my 050-function is way longer then the one you posted
 
Back
Top