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

[Request] Dont lose experience when killed by monster.

Nonks

New Member
Joined
Oct 13, 2008
Messages
3
Reaction score
0
Hey guys i've looked everywhere, and i'm not able to find such script, so i guess it doesnt exist.
So i'm requesting your help, cuz i'm not able to do such script, so here is the deal: I need a script that make the player dont lose any exp if he get killed by a monster, but keep loosing if killed by player. Can anyone do that? Rep++


thanks in advance.
 
LUA:
function onPrepareDeath(cid, deathList)
    if isPlayer(cid) and isMonster(deathList[0]) or isMonster(deathList[1]) then 
        doPlayerSetLossSkill(cid, false)
    end
    return true
end

function onLogin(cid)
    registerCreatureEvent(cid, "noLose")
    doPlayerSetLossSkill(cid, true)
    return true
end

XML:
<event type="preparedeath" name="noLose" event="script" value="noLose.lua">
<event type="login" name="noLose_login" event="script" value="noLose.lua">
 
Last edited:
if that one does not work try:
LUA:
function onPrepareDeath(cid, deathList)
    if isPlayer(cid) and isMonster(deathList[0]) or isMonster(deathList[1]) then 
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 0)
    end
    return true
end
 
function onLogin(cid)
    registerCreatureEvent(cid, "noLose")
    return true
end
 
Can someone make script. When player died by monster he lose 25% and when by player he lose 75%
LUA:
function onPrepareDeath(cid, deathList)
    if isPlayer(cid) then 
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, isPlayer(deathList[1]) and 75 or 25)
    end
    return true
end
 
function onLogin(cid)
    registerCreatureEvent(cid, "percent")
    return true
end

XML:
<event type="preparedeath" name="percent" event="script" value="percent.lua">
<event type="login" name="percent_login" event="script" value="percent.lua">
 
Back
Top