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

Talk for lvl down

use this function.

http://otland.net/f163/doplayeraddfrags-doplayeraddlevel-25629/

this?
this will remove 1 level each time

Lua:
function onSay(cid, words, param)
    doPlayerAddLevel(cid, -1, FALSE)
  return TRUE
end

or?
this will remove 1 one of player... like !removelevel NAME

Lua:
function onSay(cid, words, param)
    if(param == "") then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Name required.")
        return TRUE
    end

    local player = getPlayerByNameWildcard(param)
    if getPlayerLevel(cid) >= 2 then
	doPlayerAddLevel(player, -1, FALSE)
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You cannot remove level from this player.")	
    end
    return TRUE
end
 
Last edited:
Script made by Mindrage on otfans.
You can add levels and decrease peoples levels.

This is how u use it,
/setlevel playername,level

Code:
function onSay(cid, words, param)
	if(param == "") then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Name and level required.")
		return TRUE
	end

	local t = string.explode(param, ",")
	local player = getPlayerByNameWildcard(t[1])
	local amount = tonumber(t[2])
	if(not t[2]) then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need to add a ,then the level to set.")
	end

if (doPlayerAddExp(player, getExperienceForLevel(amount)-(getPlayerExperience(player)))) == LUA_ERROR then
			doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Error")
	end
	doCreatureAddMana(player, getCreatureMaxMana(player)-getCreatureMana(player))
	doCreatureAddHealth(player, getCreatureMaxHealth(player)-getCreatureHealth(player))
		return TRUE
end
 
Back
Top