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

its possible?

Scorpvm 101

Active Member
Joined
Feb 23, 2010
Messages
460
Solutions
3
Reaction score
28
Location
Spain
Hi guys,
Is possible when a person steps on the ground give 2 level?
Example: if I am level 8 and the step on the ground up to me level 10.
And if a person is level ten to tell you, sorry you are level 10 and can not get more level.

If its possible can give me script?
 
data/movements/scripts/level.lua
LUA:
function onStepIn(cid, item, pos)
if getPlayerLevel(cid) == 8 then
   doPlayerAddExp(cid,5100)
elseif getPlayerLevel(cid) == 10 then
       doPlayerSendCancel(cid, "sorry you are level 10 and can not get more level.")
       end
return true
end

data/movements/movements.xml
XML:
<movevent type="StepIn" uniqueid="25567" event="script" value="level.lua"/>
Put that uniqueID for the tile you want to give level at RME
 
LUA:
local lvl = 10

function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) then
		if getPlayerLevel(cid) < lvl then
			doPlayerAddLevel(cid, lvl - getPlayerLevel(cid), true)
		else
			doPlayerSendCancel(cid, 'You are already level ' .. lvl .. '.')
		end
	end
end
 
LUA:
local lvl = 10

function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) then
		if getPlayerLevel(cid) < lvl then
			doPlayerAddLevel(cid, lvl - getPlayerLevel(cid), true)
		else
			doPlayerSendCancel(cid, 'You are already level ' .. lvl .. '.')
		end
	end
end

if I am level 8
LUA:
if getPlayerLevel(cid) < lvl then
:(
 
Last edited:
Back
Top