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

TalkAction Downgrade Player to Lvl 1

perfection

FATAL DAMAGE
Joined
Aug 27, 2011
Messages
196
Reaction score
8
Lua:
function onSay(cid, words, param, channel)
	if(param == "") then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command param required.")
		return TRUE
	end

	local pid = getPlayerByNameWildcard(param)
	if(not pid) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Player " .. param .. " not Online.")
		return true
	end

	doPlayerAddLevel(pid, -getPlayerLevel(pid)+8)
	doCreatureAddHealth(pid, -getCreatureHealth(pid)+300)
	doPlayerAddMana(pid, -getCreatureMana(pid)+300)
	return TRUE
end

its now lvl 8 instead of lvl 1
 
It won't work. use:
Lua:
setCreatureMaxHealth(cid, health)
setCreatureMaxMana(cid, mana)
 
It won't work. use:
Lua:
setCreatureMaxHealth(cid, health)
setCreatureMaxMana(cid, mana)

i tried this at first ofc but it didnt work until the character dies :S so i put that one and it worked perfectly
 
Great script - it works on 0.4 but you need to do the following:

Change the second line from:
"if(param == "") then"
To:
to "if(param == '') then"
 
Back
Top