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

Lua [Death exp losing]

Toitsss

New Member
Joined
Sep 15, 2008
Messages
47
Reaction score
0
Hello, another thing i need, is when someone makes a new char, he'll be lvl 80. If he dies on level 80 he wont lose level 80, never. But if he dies on like lvl 85 he loses some %s. Ive tried many ways , but none of them works.
 
Something like:
function onDie(or onKill (idk))

level = getPlayerLevel(cid)
if level == 80 then
setPlayerDeathPrecent(cid, 0)
else
blabla
or something, havent been scripting or playing ots for about a year so the functions are probably wrong, but I think it should be done in that way~.
 
Lua:
function onKill(cid, target, flags)

level = getPlayerLevel(cid)
pname = getCreatureName(cid)

if level <= 80 then
db.executeQuery("UPDATE `players` SET `level` = 80 WHERE `name` = '" .. pname .. "';")
db.executeQuery("UPDATE `players` SET `experience` = 7915800 WHERE `name` = '" .. pname .. "';")
else
setPlayerDeathPrecent(cid, 30)

Wont work xD Donno how to do with the Death Procent
 
Last edited:
Back
Top