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

Solved Reset level 130 after downgrade to 129

Mister Budex

BudexOT.com
Joined
Jun 22, 2016
Messages
1,547
Solutions
18
Reaction score
378
Allright , Hello, im searching for script which is working like :
when u make acc u are 130 .. i have it and works fine..
my problem is when someone die he be 129 level but i want to he reset again to 130.
Checked alot on google and otland, didnt found helpful script for this problem.
thanks
 
Solution
creaturescripts/scripts create a new lua file, rename to lowlevellock
and paste this code

Lua:
Lua:
function onLogin(cid)
    if getPlayerLevel(cid) < 130 then
        doPlayerAddExperience(cid, (getExperienceForLevel(130) - getPlayerExperience(cid)))
    end
    return true
end

XML:
XML:
<event type="login" name="Lowlevellock" event="script" value="lowlevellock.lua" />
You need a onDeath / onPrepareDeath script to set the level to w/e it would be and if that is below 130 set it to 130.
I guess you could also use onLogin for it.

Best would how ever be to change the Player::death? function.
 
You need a onDeath / onPrepareDeath script to set the level to w/e it would be and if that is below 130 set it to 130.
I guess you could also use onLogin for it.

Best would how ever be to change the Player::death? function.
Allright, can you give me instructions what to do :p? im not verry good there :D
 
creaturescripts/scripts create a new lua file, rename to lowlevellock
and paste this code

Lua:
Lua:
function onLogin(cid)
    if getPlayerLevel(cid) < 130 then
        doPlayerAddExperience(cid, (getExperienceForLevel(130) - getPlayerExperience(cid)))
    end
    return true
end

XML:
XML:
<event type="login" name="Lowlevellock" event="script" value="lowlevellock.lua" />
 
Last edited by a moderator:
Solution
creaturescripts/scripts create a new lua file, rename to lowlevellock
and paste this code

LUA:

function onLogin(cid)
if getPlayerLevel(cid) < 130 then
doPlayerAddExperience(cid, (getExperienceForLevel(130) - getPlayerExperience(cid)))
end
return TRUE
end

XML:
<event type="login" name="Lowlevellock" event="script" value="lowlevellock.lua"/>

Please use code tags [ code = lua ] [/ code ] without the spaces.

https://otland.net/threads/how-to-display-code-properly-in-your-post.168098/
 
creaturescripts/scripts create a new lua file, rename to lowlevellock
and paste this code

LUA:

function onLogin(cid)
if getPlayerLevel(cid) < 130 then
doPlayerAddExperience(cid, (getExperienceForLevel(130) - getPlayerExperience(cid)))
end
return TRUE
end

XML:
<event type="login" name="Lowlevellock" event="script" value="lowlevellock.lua"/>
lol fml. I had no idea this was a real function.
Lua:
getExperienceForLevel(lv)
 
creaturescripts/scripts create a new lua file, rename to lowlevellock
and paste this code

LUA:

function onLogin(cid)
if getPlayerLevel(cid) < 130 then
doPlayerAddExperience(cid, (getExperienceForLevel(130) - getPlayerExperience(cid)))
end
return TRUE
end

XML:
<event type="login" name="Lowlevellock" event="script" value="lowlevellock.lua"/>
Thanks, Solved my problem ! :)
 
I just want to ask, this way when player log in he see "you advanced from lvl xxx to lvl 130"? or see gained exp above head after login?
 
Back
Top