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

HELP! Minimum Level for War server

noco2171

New Member
Joined
May 9, 2012
Messages
4
Reaction score
0
Is there any scripts or any settings to make players not go below a certain level?

For example: I have made a war OT where the starting level is 50. but when i die i drop to level 49. is there any way to set the minimum level to 50?

Also, is there any scripts to make players never loose equipment and bp, and how to make a admin account.

thanks
 
The function (in data, lib, 050-function.lua): function doPlayerAddMagLevel(cid, amount)

In case you don't have it.
LUA:
function doPlayerAddMagLevel(cid, amount)
	for i = 1, amount do
		doPlayerAddSpentMana(cid, (getPlayerRequiredMana(cid, getPlayerMagLevel(cid, true) + 1) - getPlayerSpentMana(cid)) / getConfigInfo('rateMagic'))
	end
	return true
end
 
ah, i already had it, what about the skills? for knights/pallys is it the same idea?

And when i set it to 45 for mages it only puts them up to 4ml, and for 20 for pallys they only go up to 3 but it works for knights
 
Last edited:
I'm not sure if there is a better alternative, but you can always check which amount gives a certain magiclevel/skills.
 
By testing it :p

Btw if the magiclevel function doesn't add the right level you can also try this function.
LUA:
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
 
ah right haha :$
That made it better, instead of 4 i got 24. but i kept changing the number untill i found the one that was equal to 45 :p it was 69
Thanks for helping me through this whole process haha, i think i have everything done now

I only need to find out how to make my character an admin >.<
 

Similar threads

Back
Top