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

TalkAction SetLvl Command! [Pro Elo HIT!]

Erexo

Kage
Premium User
Joined
Mar 27, 2010
Messages
741
Solutions
5
Reaction score
193
Location
Pr0land
GitHub
Erexo
Hello,
Today i've finished my pr0elo script (with my pro bro jobless friend Renusek) for set lvl, here u are :}.

talkactions.xml
XML:
<talkaction log="yes" words="/setlvl" access="4" event="script" value="setlvl.lua" />

setlvl.lua
Lua:
function onSay(cid, words, param, channel)
        if(param == '') then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
        return true
        end
                local t = string.explode(param, ",")
                t[2] = tonumber(t[2])
        if(not t[2]) then
                doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
        return true
        end
                local t = string.explode(param, ',')
                local nick, hp = getPlayerByNameWildcard(t[1]), tonumber(t[2])
                doPlayerAddExperience(nick, (getExperienceForLevel(hp) - getPlayerExperience(nick)))
                doCreatureAddHealth(nick, getCreatureMaxHealth(nick))
return true
end

--By Erexo & Renusek

How to use?
Code:
/setlvl nick, lvl

Thanks for nothing and good bye :ninja:

PS:
Please dont short my script :(
Its MY SCRIPT (and that fck ***** Renee), so please dont short that mada fakin script!
 
Last edited:
Usage also: /setlvl nic~, lvl

And your tabbing is fucking ugly.
Lua:
function onSay(cid, words, param, channel)
	if(param == '') then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires param.")
		return true
	end
	local t = string.explode(param, ",")
	t[2] = tonumber(t[2])
	if(not t[2]) then
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Command requires numeric param.")
	else
		local nick, lvl = getPlayerByNameWildcard(t[1]), t[2]
		doPlayerAddExperience(nick, (getExperienceForLevel(lvl) - getPlayerExperience(nick)))
	end
	return true
end
 
Back
Top