Ir para conteúdo
  • Cadastre-se

Normal Player quando morre não perde NADA!


Posts Recomendados

PlayerDeath


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

config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL

function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
    if(config.deathListEnabled ~= TRUE) then
        return
    end

    local hitKillerName = "field item"
    local damageKillerName = ""
    if(lastHitKiller ~= FALSE) then
        if(isPlayer(lastHitKiller) == TRUE) then
            hitKillerName = getPlayerGUID(lastHitKiller)
        else
            hitKillerName = getCreatureName(lastHitKiller)
        end

        if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then
            if(isPlayer(mostDamageKiller) == TRUE) then
                damageKillerName = getPlayerGUID(mostDamageKiller)
            else
                damageKillerName = getCreatureName(mostDamageKiller)
            end
        end
    end

    db.query("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");")
    local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";")
    if(rows:getID() ~= -1) then
        local amount = rows:getRows(true) - config.maxDeathRecords
        if(amount > 0) then
            if(config.sqlType == DATABASE_ENGINE_SQLITE) then
                for i = 1, amount do
                    db.query("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);")
                end
            else
                db.query("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";")
            end
        end
    end
end
 

Link para o post
Compartilhar em outros sites
4 minutos atrás, Noob II disse:

PlayerDeath

 


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

config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL

function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
    if(config.deathListEnabled ~= TRUE) then
        return
    end

    local hitKillerName = "field item"
    local damageKillerName = ""
    if(lastHitKiller ~= FALSE) then
        if(isPlayer(lastHitKiller) == TRUE) then
            hitKillerName = getPlayerGUID(lastHitKiller)
        else
            hitKillerName = getCreatureName(lastHitKiller)
        end

        if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then
            if(isPlayer(mostDamageKiller) == TRUE) then
                damageKillerName = getPlayerGUID(mostDamageKiller)
            else
                damageKillerName = getCreatureName(mostDamageKiller)
            end
        end
    end

    db.query("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");")
    local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";")
    if(rows:getID() ~= -1) then
        local amount = rows:getRows(true) - config.maxDeathRecords
        if(amount > 0) then
            if(config.sqlType == DATABASE_ENGINE_SQLITE) then
                for i = 1, amount do
                    db.query("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);")
                end
            else
                db.query("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";")
            end
        end
    end
end
 

 

Mesma coisa, acho que vou deletar esse script.. :/

 

Olha o erro agora.

Spoiler

[1:53:52.048] [Error - CreatureScript Interface] [1:53:52.048] data/creaturescripts/scripts/playerdeath.lua:onDeath [1:53:52.048] Description: [1:53:52.048] (luaGetCreatureName) Creature not found [1:53:52.049] mysql_real_query(): INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (10, 1485136432, 358, '', ''); - MYSQL ERROR: Unknown column 'time' in 'field list' (1054) [1:53:52.049] mysql_real_query(): DELETE FROM `player_deaths` WHERE `player_id` = 10 ORDER BY `time` LIMIT 4; - MYSQL ERROR: Unknown column 'time' in 'order clause' (1054)

 

Editado por tirso
erro (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
4 minutos atrás, tirso disse:

Mesma coisa, acho que vou deletar esse script.. :/

 

Ultima vez:

 


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

config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL

function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
    if(config.deathListEnabled ~= TRUE) then
        return
    end

    local hitKillerName = "field item"
    local damageKillerName = ""
    if(lastHitKiller ~= FALSE) then
        if(isPlayer(lastHitKiller) == TRUE) then
            hitKillerName = getPlayerGUID(lastHitKiller)
        else
            hitKillerName = getCreatureName(lastHitKiller)
        end

        if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then
            if(isPlayer(mostDamageKiller) == TRUE) then
                damageKillerName = getPlayerGUID(mostDamageKiller)
            else
                damageKillerName = getCreatureName(mostDamageKiller)
            end
        end
    end

    db.executeQuery("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");")
    local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";")
    if(rows:getID() ~= -1) then
        local amount = rows:getRows(true) - config.maxDeathRecords
        if(amount > 0) then
            if(config.sqlType == DATABASE_ENGINE_SQLITE) then
                for i = 1, amount do
                    db.executeQuery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);")
                end
            else
                db.executeQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";")
            end
        end
    end
end
 

 

poste seu login,lua

Link para o post
Compartilhar em outros sites
4 minutos atrás, Noob II disse:

 

Ultima vez:

 

 


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

config.sqlType = config.sqlType == "sqlite" and DATABASE_ENGINE_SQLITE or DATABASE_ENGINE_MYSQL

function onDeath(cid, corpse, lastHitKiller, mostDamageKiller)
    if(config.deathListEnabled ~= TRUE) then
        return
    end

    local hitKillerName = "field item"
    local damageKillerName = ""
    if(lastHitKiller ~= FALSE) then
        if(isPlayer(lastHitKiller) == TRUE) then
            hitKillerName = getPlayerGUID(lastHitKiller)
        else
            hitKillerName = getCreatureName(lastHitKiller)
        end

        if(mostDamageKiller ~= FALSE and mostDamageKiller ~= lastHitKiller and getCreatureName(mostDamageKiller) ~= getCreatureName(lastHitKiller)) then
            if(isPlayer(mostDamageKiller) == TRUE) then
                damageKillerName = getPlayerGUID(mostDamageKiller)
            else
                damageKillerName = getCreatureName(mostDamageKiller)
            end
        end
    end

    db.executeQuery("INSERT INTO `player_deaths` (`player_id`, `time`, `level`, `killed_by`, `altkilled_by`) VALUES (" .. getPlayerGUID(cid) .. ", " .. os.time() .. ", " .. getPlayerLevel(cid) .. ", " .. db.escapeString(hitKillerName) .. ", " .. db.escapeString(damageKillerName) .. ");")
    local rows = db.getResult("SELECT `player_id` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. ";")
    if(rows:getID() ~= -1) then
        local amount = rows:getRows(true) - config.maxDeathRecords
        if(amount > 0) then
            if(config.sqlType == DATABASE_ENGINE_SQLITE) then
                for i = 1, amount do
                    db.executeQuery("DELETE FROM `player_deaths` WHERE `rowid` = (SELECT `rowid` FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT 1);")
                end
            else
                db.executeQuery("DELETE FROM `player_deaths` WHERE `player_id` = " .. getPlayerGUID(cid) .. " ORDER BY `time` LIMIT " .. amount .. ";")
            end
        end
    end
end
 

Spoiler

local config = {
    loginMessage = getConfigValue('loginMessage'),
    useFragHandler = getBooleanFromString(getConfigValue('useFragHandler'))
}

function onLogin(cid)
    local loss = getConfigValue('deathLostPercent')
    if(loss ~= nil) then
        doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, loss * 10)
    end

    local accountManager = getPlayerAccountManager(cid)
    if(accountManager == MANAGER_NONE) then
        local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage
        if(lastLogin > 0) then
            doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
            str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "."
        else
            str = str .. " Please choose your outfit."
            doPlayerSendOutfitWindow(cid)
        end

        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str)
    elseif(accountManager == MANAGER_NAMELOCK) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?")
    elseif(accountManager == MANAGER_ACCOUNT) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.")
    end

    if(not isPlayerGhost(cid)) then
        doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT)
    end

    registerCreatureEvent(cid, "Mail")
    registerCreatureEvent(cid, "GuildMotd")

    registerCreatureEvent(cid, "Idle")
    if(config.useFragHandler) then
        registerCreatureEvent(cid, "SkullCheck")
    end

    registerCreatureEvent(cid, "ReportBug")
    registerCreatureEvent(cid, "AdvanceSave")
    registerCreatureEvent(cid, "Events")
    registerCreatureEvent(cid, "Criredric")
    registerCreatureEvent(cid, "Vampire Bride")
    registerCreatureEvent(cid, "Nifra")
    registerCreatureEvent(cid, "Addons")
        registerCreatureEvent(cid, "Licznik")
    registerCreatureEvent(cid, "duszek")
    registerCreatureEvent(cid, "PlayerAdvance")
    registerCreatureEvent(cid, "Advance")
    registerCreatureEvent(cid, "DeathBroadcast")
    registerCreatureEvent(cid, "questLook")
    registerCreatureEvent(cid, "pvpArena")
        registerCreatureEvent(cid, "Aol")
        registerCreatureEvent(cid, "PlayerDeath")
        registerCreatureEvent(cid, "PlayerKill") 
        registerCreatureEvent(cid, "Kamulec")
        registerCreatureEvent(cid, "metin_death")  
    registerCreatureEvent(cid, "KillingInTheNameOf")
registerCreatureEvent(cid, "PlayerDeath")

    return true
end

 

poste seu login,lua

 

Link para o post
Compartilhar em outros sites

Faz assim use os scripts originais do seu servidor e adicione o system de loot que uso... 

 

Vá na pasta > Data > Creaturescripts > Scripts

Crie o arquivo levelprotection.lua e adicione dentro:

function onDeath(cid, corpse, deathList)
local config = {
skills = true, -- se ao morrer vai perder skills
magic = false, -- se vai perder magic level
level = 1000 -- até que level irá proteger o player
}
if isPlayer(cid) and getPlayerLevel(cid) <= config.level then
doCreatureSetDropLoot(cid, true)
if config.magic == false then doPlayerSetLossPercent(cid, false) end
if config.skills == false then doPlayerSetLossPercent(cid, false) end
return TRUE end return TRUE end



Depois volte na pasta Creaturescripts e abra o creaturescript.xml, adicione a seguinte tag:

<event type="death" name="ProtectLevel" event="script" value="levelprotection.lua"/>



Vá novamente em Creaturescripts > Scripts > Login.lua e adicione:

registerCreatureEvent(cid, "ProtectLevel")

 

creio eu que vai funcionar normal

Editado por Noob II (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
    <event type="login" name="PlayerLogin" event="script" value="login.lua"/>
        <event type="death" name="Aol" event="script" value="aol.lua"/>
    <event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
    <event type="receivemail" name="Mail" event="script" value="mail.lua"/>
    <event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
    <event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>

    <event type="think" name="Idle" event="script" value="idle.lua"/>
    <event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
        <event type="death" name="Golgordan" script="golgordan.lua"/>
        <event type="death" name="Werewolf" script="werewolf.lua"/>
        <event type="death" name="Undead Gladiator" script="undead gladiator.lua"/>
        <event type="think" name="Courtel" event="script" value="Courtel.lua"/>  
        <event type="think" name="Vampire Bride" event="script" value="Vampire Bride.lua"/>
        <event type="think" name="Nifra" event="script" value="nifra.lua"/>
        <event type="outfit" name="Addons" event="script" value="outfits.lua"/>
    <event type="advance" name="lvlup" event="script" value="lvlup.lua"/>
    <event type="kill" name="Licznik" event="script" value="licznik.lua"/>
    <event type="think"  name="lottery" interval="10800" event="script" value="lottery.lua"/>

    <event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/>
    <event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/>
    <event type="death" name="Reward" event="script" value="reward.lua"/>  
    <event type="login" name="Conected" script="conected.lua"/>
    <event type="advance" name="Advance" script="advance.lua"/>
        <event type="login" name="expRate" event="script" value="extraExpRate.lua"/>
    <event type="attack" name="AttackGuild" script="attackguild.lua"/>  
    <event type="kill" name="duszek" script="duszek.lua"/>
    <event type="login" name="fraglook_register" event="script" value="fraglook.lua"/> 
          <event type="look" name="fraglook" event="script" value="fraglook.lua"/>
    <event type="death" name="Portal" event="script" value="death portal.lua" />
    <event type="death" name="DeathBroadcast" event="script" value="deathBroadcast.lua"/>
    <event type="look" name="questlook" event="script" value="questlook.lua"/>
    <event type="death" name="metin_death" event="script" value="metin_kill.lua"/>  
    <event type="combat" name="Kamulec" event="script" value="metin_stones.lua"/>
        <event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>  
  
</creaturescripts>

Vamos lá! Removendo todos os arquivos que tenha "death".

 

<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
    <event type="login" name="PlayerLogin" event="script" value="login.lua"/>
    <event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
    <event type="receivemail" name="Mail" event="script" value="mail.lua"/>
    <event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
    <event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>

    <event type="think" name="Idle" event="script" value="idle.lua"/>
    <event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
        <event type="think" name="Courtel" event="script" value="Courtel.lua"/>  
        <event type="think" name="Vampire Bride" event="script" value="Vampire Bride.lua"/>
        <event type="think" name="Nifra" event="script" value="nifra.lua"/>
        <event type="outfit" name="Addons" event="script" value="outfits.lua"/>
    <event type="advance" name="lvlup" event="script" value="lvlup.lua"/>
    <event type="kill" name="Licznik" event="script" value="licznik.lua"/>
    <event type="think"  name="lottery" interval="10800" event="script" value="lottery.lua"/>

    <event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/>
    <event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/>
    <event type="login" name="Conected" script="conected.lua"/>
    <event type="advance" name="Advance" script="advance.lua"/>
        <event type="login" name="expRate" event="script" value="extraExpRate.lua"/>
    <event type="attack" name="AttackGuild" script="attackguild.lua"/>  
    <event type="kill" name="duszek" script="duszek.lua"/>
    <event type="login" name="fraglook_register" event="script" value="fraglook.lua"/> 
          <event type="look" name="fraglook" event="script" value="fraglook.lua"/>
    <event type="look" name="questlook" event="script" value="questlook.lua"/>
    <event type="combat" name="Kamulec" event="script" value="metin_stones.lua"/>
        <event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>  
  
</creaturescripts>

Ficando assim /\. Agora teste, se der certo ótimo facil descobrir a fonte do erro. Senão der certo volte como estava antes. E o Problema pode ser em player.cpp.

Importante que tenha registerCreatureEvent(cid, "PlayerDeath") registrado no login.lua

Teste e avise.

Link para o post
Compartilhar em outros sites
12 horas atrás, Noob II disse:

Faz assim use os scripts originais do seu servidor e adicione o system de loot que uso... 

 

Vá na pasta > Data > Creaturescripts > Scripts

Crie o arquivo levelprotection.lua e adicione dentro:


function onDeath(cid, corpse, deathList)
local config = {
skills = true, -- se ao morrer vai perder skills
magic = false, -- se vai perder magic level
level = 1000 -- até que level irá proteger o player
}
if isPlayer(cid) and getPlayerLevel(cid) <= config.level then
doCreatureSetDropLoot(cid, true)
if config.magic == false then doPlayerSetLossPercent(cid, false) end
if config.skills == false then doPlayerSetLossPercent(cid, false) end
return TRUE end return TRUE end



Depois volte na pasta Creaturescripts e abra o creaturescript.xml, adicione a seguinte tag:


<event type="death" name="ProtectLevel" event="script" value="levelprotection.lua"/>



Vá novamente em Creaturescripts > Scripts > Login.lua e adicione:


registerCreatureEvent(cid, "ProtectLevel")

 

creio eu que vai funcionar normal

 

Queria muito que tivesse funcionado :/

Spoiler

[14:34:54.846] [Error - CreatureScript Interface] [14:34:54.846] data/creaturescripts/scripts/playerdeath.lua:onDeath [14:34:54.846] Description: [14:34:54.846] (luaGetCreatureName) Creature not found [14:34:54.846] [Error - CreatureScript Interface] [14:34:54.846] data/creaturescripts/scripts/playerdeath.lua:onDeath [14:34:54.846] Description: [14:34:54.846] (luaGetCreatureName) Creature not found [14:34:54.846] [Error - CreatureScript Interface] [14:34:54.846] data/creaturescripts/scripts/playerdeath.lua:onDeath [14:34:54.846] Description: [14:34:54.846] (luaGetCreatureName) Creature not found [14:34:54.846] [Error - CreatureScript Interface] [14:34:54.846] data/creaturescripts/scripts/playerdeath.lua:onDeath [14:34:54.846] Description: [14:34:54.846] data/creaturescripts/scripts/playerdeath.lua:32: attempt to call field 'executeQuery' (a nil value) [14:34:54.846] stack traceback: [14:34:54.846] data/creaturescripts/scripts/playerdeath.lua:32: in function

 

12 horas atrás, Joaovettor disse:

<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
    <event type="login" name="PlayerLogin" event="script" value="login.lua"/>
        <event type="death" name="Aol" event="script" value="aol.lua"/>
    <event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
    <event type="receivemail" name="Mail" event="script" value="mail.lua"/>
    <event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
    <event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>

    <event type="think" name="Idle" event="script" value="idle.lua"/>
    <event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
        <event type="death" name="Golgordan" script="golgordan.lua"/>
        <event type="death" name="Werewolf" script="werewolf.lua"/>
        <event type="death" name="Undead Gladiator" script="undead gladiator.lua"/>
        <event type="think" name="Courtel" event="script" value="Courtel.lua"/>  
        <event type="think" name="Vampire Bride" event="script" value="Vampire Bride.lua"/>
        <event type="think" name="Nifra" event="script" value="nifra.lua"/>
        <event type="outfit" name="Addons" event="script" value="outfits.lua"/>
    <event type="advance" name="lvlup" event="script" value="lvlup.lua"/>
    <event type="kill" name="Licznik" event="script" value="licznik.lua"/>
    <event type="think"  name="lottery" interval="10800" event="script" value="lottery.lua"/>

    <event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/>
    <event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/>
    <event type="death" name="Reward" event="script" value="reward.lua"/>  
    <event type="login" name="Conected" script="conected.lua"/>
    <event type="advance" name="Advance" script="advance.lua"/>
        <event type="login" name="expRate" event="script" value="extraExpRate.lua"/>
    <event type="attack" name="AttackGuild" script="attackguild.lua"/>  
    <event type="kill" name="duszek" script="duszek.lua"/>
    <event type="login" name="fraglook_register" event="script" value="fraglook.lua"/> 
          <event type="look" name="fraglook" event="script" value="fraglook.lua"/>
    <event type="death" name="Portal" event="script" value="death portal.lua" />
    <event type="death" name="DeathBroadcast" event="script" value="deathBroadcast.lua"/>
    <event type="look" name="questlook" event="script" value="questlook.lua"/>
    <event type="death" name="metin_death" event="script" value="metin_kill.lua"/>  
    <event type="combat" name="Kamulec" event="script" value="metin_stones.lua"/>
        <event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>  
  
</creaturescripts>

Vamos lá! Removendo todos os arquivos que tenha "death".

 

<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
    <event type="login" name="PlayerLogin" event="script" value="login.lua"/>
    <event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
    <event type="receivemail" name="Mail" event="script" value="mail.lua"/>
    <event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
    <event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>

    <event type="think" name="Idle" event="script" value="idle.lua"/>
    <event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
        <event type="think" name="Courtel" event="script" value="Courtel.lua"/>  
        <event type="think" name="Vampire Bride" event="script" value="Vampire Bride.lua"/>
        <event type="think" name="Nifra" event="script" value="nifra.lua"/>
        <event type="outfit" name="Addons" event="script" value="outfits.lua"/>
    <event type="advance" name="lvlup" event="script" value="lvlup.lua"/>
    <event type="kill" name="Licznik" event="script" value="licznik.lua"/>
    <event type="think"  name="lottery" interval="10800" event="script" value="lottery.lua"/>

    <event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/>
    <event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/>
    <event type="login" name="Conected" script="conected.lua"/>
    <event type="advance" name="Advance" script="advance.lua"/>
        <event type="login" name="expRate" event="script" value="extraExpRate.lua"/>
    <event type="attack" name="AttackGuild" script="attackguild.lua"/>  
    <event type="kill" name="duszek" script="duszek.lua"/>
    <event type="login" name="fraglook_register" event="script" value="fraglook.lua"/> 
          <event type="look" name="fraglook" event="script" value="fraglook.lua"/>
    <event type="look" name="questlook" event="script" value="questlook.lua"/>
    <event type="combat" name="Kamulec" event="script" value="metin_stones.lua"/>
        <event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>  
  
</creaturescripts>

Ficando assim /\. Agora teste, se der certo ótimo facil descobrir a fonte do erro. Senão der certo volte como estava antes. E o Problema pode ser em player.cpp.

Importante que tenha registerCreatureEvent(cid, "PlayerDeath") registrado no login.lua

Teste e avise.

Me explique onde coloco isso...

É muita coisa na minha cabeça mano kkk

Link para o post
Compartilhar em outros sites

Fica em data/creaturescripts/scripts/login.lua e adicione a tag:

registerCreatureEvent(cid, "PlayerDeath")

 

E em creaturescripts.xml adicione:

 

<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
    <event type="login" name="PlayerLogin" event="script" value="login.lua"/>
    <event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
    <event type="receivemail" name="Mail" event="script" value="mail.lua"/>
    <event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
    <event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>

    <event type="think" name="Idle" event="script" value="idle.lua"/>
    <event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
        <event type="think" name="Courtel" event="script" value="Courtel.lua"/>  
        <event type="think" name="Vampire Bride" event="script" value="Vampire Bride.lua"/>
        <event type="think" name="Nifra" event="script" value="nifra.lua"/>
        <event type="outfit" name="Addons" event="script" value="outfits.lua"/>
    <event type="advance" name="lvlup" event="script" value="lvlup.lua"/>
    <event type="kill" name="Licznik" event="script" value="licznik.lua"/>
    <event type="think"  name="lottery" interval="10800" event="script" value="lottery.lua"/>

    <event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/>
    <event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/>
    <event type="login" name="Conected" script="conected.lua"/>
    <event type="advance" name="Advance" script="advance.lua"/>
        <event type="login" name="expRate" event="script" value="extraExpRate.lua"/>
    <event type="attack" name="AttackGuild" script="attackguild.lua"/>  
    <event type="kill" name="duszek" script="duszek.lua"/>
    <event type="login" name="fraglook_register" event="script" value="fraglook.lua"/> 
          <event type="look" name="fraglook" event="script" value="fraglook.lua"/>
    <event type="look" name="questlook" event="script" value="questlook.lua"/>
    <event type="combat" name="Kamulec" event="script" value="metin_stones.lua"/>
        <event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>  
  
</creaturescripts>

Link para o post
Compartilhar em outros sites
2 horas atrás, Joaovettor disse:

Fica em data/creaturescripts/scripts/login.lua e adicione a tag:

registerCreatureEvent(cid, "PlayerDeath")

 

E em creaturescripts.xml adicione:

 

<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
    <event type="login" name="PlayerLogin" event="script" value="login.lua"/>
    <event type="joinchannel" name="GuildMotd" event="script" value="guildmotd.lua"/>
    <event type="receivemail" name="Mail" event="script" value="mail.lua"/>
    <event type="reportbug" name="SaveReportBug" script="reportbug.lua"/>
    <event type="advance" name="AdvanceSave" event="script" value="advancesave.lua"/>

    <event type="think" name="Idle" event="script" value="idle.lua"/>
    <event type="think" name="SkullCheck" event="script" value="skullcheck.lua"/>
        <event type="think" name="Courtel" event="script" value="Courtel.lua"/>  
        <event type="think" name="Vampire Bride" event="script" value="Vampire Bride.lua"/>
        <event type="think" name="Nifra" event="script" value="nifra.lua"/>
        <event type="outfit" name="Addons" event="script" value="outfits.lua"/>
    <event type="advance" name="lvlup" event="script" value="lvlup.lua"/>
    <event type="kill" name="Licznik" event="script" value="licznik.lua"/>
    <event type="think"  name="lottery" interval="10800" event="script" value="lottery.lua"/>

    <event type="kill" name="KillingInTheNameOf" event="script" value="killinginthenameof.lua"/>
    <event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/>
    <event type="login" name="Conected" script="conected.lua"/>
    <event type="advance" name="Advance" script="advance.lua"/>
        <event type="login" name="expRate" event="script" value="extraExpRate.lua"/>
    <event type="attack" name="AttackGuild" script="attackguild.lua"/>  
    <event type="kill" name="duszek" script="duszek.lua"/>
    <event type="login" name="fraglook_register" event="script" value="fraglook.lua"/> 
          <event type="look" name="fraglook" event="script" value="fraglook.lua"/>
    <event type="look" name="questlook" event="script" value="questlook.lua"/>
    <event type="combat" name="Kamulec" event="script" value="metin_stones.lua"/>
        <event type="death" name="PlayerDeath" event="script" value="playerdeath.lua"/>  
  
</creaturescripts>

Não deu João :/

Será que se eu tirar esse script ele funciona?

 

EDIT*

Olha o erro depois que apaguei o broaddeath

Spoiler

[20:41:56.798] [Error - CreatureScript Interface] [20:41:56.798] data/creaturescripts/scripts/playerdeath.lua:onDeath [20:41:56.798] Description: [20:41:56.798] (luaGetCreatureName) Creature not found [20:41:56.798] [Error - CreatureScript Interface] [20:41:56.798] data/creaturescripts/scripts/playerdeath.lua:onDeath [20:41:56.798] Description: [20:41:56.798] (luaGetCreatureName) Creature not found [20:41:56.798] [Error - CreatureScript Interface] [20:41:56.798] data/creaturescripts/scripts/playerdeath.lua:onDeath [20:41:56.798] Description: [20:41:56.798] data/creaturescripts/scripts/playerdeath.lua:32: attempt to call field 'executeQuery' (a nil value) [20:41:56.798] stack traceback: [20:41:56.798] data/creaturescripts/scripts/playerdeath.lua:32: in function

 

Editado por tirso (veja o histórico de edições)
Link para o post
Compartilhar em outros sites

Volta tudo como estava antes, e o ERRO é em player.cpp 

É melhor voce salvar sua pasta Data e seu config.lua e pegar outro Server, anão ser que seu ot seja Open Source.

Editado por Joaovettor (veja o histórico de edições)
Link para o post
Compartilhar em outros sites
Agora, Joaovettor disse:

Volta como tudo como estava antes, e o ERRO é em player.cpp 

E como será que ajeito isso?

Porque parece que está igual OT de WAR ne? :s

Link para o post
Compartilhar em outros sites
3 minutos atrás, Joaovettor disse:

Editei meu comentario ve la xD

Tem que ter outra forma mais fácil... Não entendo muito dessas coisas... 

Mais valeu pela força.

Link para o post
Compartilhar em outros sites

Tirso baixe outro otserv, pega a pasta Data do seu otserv atual config.lua do seu otserv atual e coloque no outro, porque ai vai ficar tudo ok

Link para o post
Compartilhar em outros sites
30 minutos atrás, Joaovettor disse:

Tirso baixe outro otserv, pega a pasta Data do seu otserv atual config.lua do seu otserv atual e coloque no outro, porque ai vai ficar tudo ok

Blz João, vou tentar fazer pq uso maquina vps é tudo novo pra mim

valeu ai abraço

Link para o post
Compartilhar em outros sites

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

  • Conteúdo Similar

    • Por Jaurez
      .
    • Por Cat
      Em alguns casos, o tibia 8.60 comum não abre de jeito nenhum no map editor, mesmo desmarcando check file signatures e configurando o path corretamente.
       
      Este é o client 8.60 adaptado para o Remere's Map Editor. Resolvi postar já que ele foi removido do site oficial do RME. (ficou apenas a versão para linux lá)
      Se estiver tendo problemas para abrir a versão 8.60, tente utilizar este.
                                                                                                                     
      Baixar o Tibia Client 8.60 que funciona no Remere’s Map Editor
      Essa versão do Tibia 8.60 client resolve o erro unsupported client version ou Could not locate tibia.dat and/or tibia.spr, please navigate to your tibia 8.60 installation folder.
       
      Downloads
      https://tibiaking.com/applications/core/interface/file/attachment.php?id=47333

      Scan: https://www.virustotal.com/gui/file/333e172ac49ba2028db9eb5889994509e7d2de28ebccfa428c04e86defbe15cc
       
    • Por danilo belato
      Fala Galera To Com um problema aki 
       
      quero exporta umas sprites de um server para colocar em outro 
       
      eu clico na sprites ai aparece tds a forma delas do lado de la >>
       
      ai eu clico nela e ponho a opiçao de export mais quando salvo a sprite ela n abri 
       
      aparece isso quando tento vê-la 
       
      visualização não disponível ( no formatos png e bitmap)
       
      Agora no formato idc fala que o paint n pode ler 
       
      me ajudem ae...
    • Por Vitor Bicaleto
      Galera to com o script do addon doll aqui, quando eu digito apenas "!addon" ele aparece assim: Digite novamente, algo está errado!"
      quando digito por exemplo: "!addon citizen" ele não funciona e não da nenhum erro
       
      mesma coisa acontece com o mount doll.. 
    • Por Ayron5
      Substitui uma stone no serve, deu tudo certo fora  esse  erro ajudem  Valendo  Rep+  Grato  

      Erro: data/actions/scripts/boost.lua:557: table index is nil
       [Warning - Event::loadScript] Cannot load script (data/actions/scripts/boost.lua)

      Script:
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo