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

Don't Lose Items upon death

Epicxz

Member
Joined
Apr 18, 2014
Messages
19
Reaction score
6
So is there a way to make automatic blessing/or AOL / or item loss chance 0, so that players dont lose items upon death? i cant seem to find it.

where can i find the file to do this?
 
okay thanks yeah im not exactly sure where to put that
im at login.lua which is


function onLogin(cid)
local player = Player(cid)

local loginStr = "Welcome to " .. configManager.getString(configKeys.SERVER_NAME) .. "!"
if player:getLastLoginSaved() <= 0 then
loginStr = loginStr .. " Please choose your outfit before I smack you in the face."
player:sendOutfitWindow()
else
if loginStr ~= "" then
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
end

loginStr = string.format("Your last visit was on %s.", os.date("%a %b %d %X %Y", player:getLastLoginSaved()))
end
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)

player:registerEvent("PlayerDeath")
return true
end
 
I guess you should add it after player death, but I dont know if this requires an additional script
Code:
function onLogin(cid)
local player = Player(cid)

local loginStr = "Welcome to " .. configManager.getString(configKeys.SERVER_NAME) .. "!"
if player:getLastLoginSaved() <= 0 then
loginStr = loginStr .. " Please choose your outfit before I smack you in the face."
player:sendOutfitWindow()
else
if loginStr ~= "" then
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
end

loginStr = string.format("Your last visit was on %s.", os.date("%a %b %d %X %Y", player:getLastLoginSaved()))
end
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)

player:registerEvent("PlayerDeath")
doPlayerSetLossPercent(cid,0)
return true
end
 
I guess you should add it after player death, but I dont know if this requires an additional script
Code:
function onLogin(cid)
local player = Player(cid)

local loginStr = "Welcome to " .. configManager.getString(configKeys.SERVER_NAME) .. "!"
if player:getLastLoginSaved() <= 0 then
loginStr = loginStr .. " Please choose your outfit before I smack you in the face."
player:sendOutfitWindow()
else
if loginStr ~= "" then
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)
end

loginStr = string.format("Your last visit was on %s.", os.date("%a %b %d %X %Y", player:getLastLoginSaved()))
end
player:sendTextMessage(MESSAGE_STATUS_DEFAULT, loginStr)

player:registerEvent("PlayerDeath")
doPlayerSetLossPercent(cid,0)
return true
end
yeah idk exactly either lets wait for Himii seems like he knows.

and yeah no worries not in a big hurry thanks a bunch
 
found simple solution do this in playerdeath.lua

@@ -5,6 +5,7 @@ function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjust
local player = Player(cid)

player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are dead.")
+ doSetCreatureDropLoot(cid, false)
if not deathListEnabled then
return
end


all you add is the -- doSetCreatureDropLoot(cid, false)

simple as that.
 
found simple solution do this in playerdeath.lua

@@ -5,6 +5,7 @@ function onDeath(cid, corpse, killer, mostDamage, unjustified, mostDamage_unjust
local player = Player(cid)

player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You are dead.")
+ doSetCreatureDropLoot(cid, false)
if not deathListEnabled then
return
end


all you add is the -- doSetCreatureDropLoot(cid, false)

simple as that.
i've tried here, didnt work for me
 
Back
Top