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

Dead Body Problem

popoverde

Intermediate OT User
Joined
Jan 16, 2015
Messages
202
Reaction score
135
Location
[RPG]
Hello im turning rookgaard into pvp zone, already removed every non-pvp flag and put pvp-zone ones

but players dont leave a body after they get killed, they get insta ported to clipford temple,

What else i have to change? thanks! cool forum
 
Post your server version.
Are you sure all pvp zone is removed in the map? You can look if you have a preparedeath script in creaturescripts (if your server has that).
 
The Forgotten Server - Version 0.3 (Crying Damson).

inside creaturescripts Have playerdeath.lua


Code:
local config = {
    deathListEnabled = getConfigInfo('deathListEnabled'),
    sqlType = getConfigInfo('sqlType'),
    maxDeathRecords = getConfigInfo('maxDeathRecords')
}

function onDeath(cid, corpse, killer)
    doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, "You are dead.")
    if(config.deathListEnabled == "yes") then
        if(killer ~= FALSE) then
            if(isPlayer(killer) == TRUE) then
                killerName = getPlayerGUID(killer)
            else
                killerName = getCreatureName(killer)
            end
        else
            killerName = "field item"
        end

        db.executeQuery("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(killerName) .. ");")
        local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";")
        if(rows:getID() ~= -1) then
            local deathRecords = rows:numRows(true)
            if(config.sqlType == "sqlite") then
                while(deathRecords > config.maxDeathRecords) do
                    db.executeQuery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);")
                    deathRecords = deathRecords - 1
                end
            else
                while(deathRecords > config.maxDeathRecords) do
                    db.executeQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1;")
                    deathRecords = deathRecords - 1
                end
            end
        end
    end
end


there are few safe spots in the map but thats all
 
Is this problem only in rook or also on other places? Is there just no body created or are they also not losing anything?
Add this above the last end in that script.
Code:
return TRUE
 
only at rook, theres just no body created


dead players at thais leave a body



ok let me try

It looks like this not sure if im doing it correctly
Code:
                end
            end
        end
    return TRUE          
    end
end

Still no dead body :/

If a player die by a rat at sewer rats (non pvp zone) it create a dead body, plus he stay ''dead'' but if a player gets killed at rookgaard (pvp zone) theres no dead body plus he get instateleported to temple
 
Last edited by a moderator:
Don't add any zone at all, with holding ctrl while using the tools you can remove it, the pvp/no pvp zones.

The return TRUE should be above the last end btw (it's not related to the problem since the death type doesn't seem to have the no body create feature when returning false).
 
Back
Top