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

Condition.

Status
Not open for further replies.

Zonet

Web Developer
Joined
Sep 1, 2008
Messages
4,393
Reaction score
52
Location
Tibia VS RL-life, guess whos back?
Hello, since there's no command or no function to add skills or give magic level like doPlayerAddMagLevel oor such.

I wonder just when I'm adding condition with ticks -1 how much will it hold?

Yours,
Zonet.
 
This function is very handy for custom quests! Now you can add magic levels specified in 1 function!

Usage:
PHP:
doPlayerAddMagLevel(cid, 5)
This will add 5 magic-levels upon the players current magic level! If he had mlvl 55, he will now have 60.

Put this in your data/lib/functions.lua

PHP:
function doPlayerAddMagLevel(cid, add)
local current = getPlayerRequiredMana(cid, getPlayerMagLevel(cid))
local manaspend = ((getPlayerRequiredMana(cid, getPlayerMagLevel(cid)+add)) / getConfigInfo("rateMagic"))
	if isPlayer(cid) == TRUE then
		doPlayerAddSpentMana(cid, (current + manaspend))
	else
		error("Player not found in function doPlayerAddMagLevel")
	end
end

Tested on 0,3,4PL2

Here you go ;p
 
Status
Not open for further replies.
Back
Top