kadevidaloka 2 Postado Julho 2, 2009 Share Postado Julho 2, 2009 Bom tou com os seguintes bugs no meu server o primeiro e que quando o player morre nao perde nada,e ta tudo configurado direitinho no config lua e o segundo e q quando o player compra promotion e morre perde todos os levels! por favor se eu postei na seçao errada pode mover nao sabia aonde postar entao postei aki... ajudem me por favor meu server abriu hj e ja tem 12 players online quem souber como me ajudar responde aew ou me add msn henriquemoreira2006@hotmail.com Link para o comentário https://xtibia.com/forum/topic/115473-ajuda-bug/ Compartilhar em outros sites More sharing options...
tozinho123 0 Postado Julho 3, 2009 Share Postado Julho 3, 2009 o seu server é tfs8.31+? se for ve o data/creaturescripts/scripts/playerdeath.lua apaga o que tem la e coloca: local config = { deathListEnabled = getBooleanFromString(getConfigInfo('deathListEnabled')), sqlType = getConfigInfo('sqlType'), maxDeathRecords = getConfigInfo('maxDeathRecords') } function onDeath(cid, corpse, lastHitKiller, mostDamageKiller) if(config.deathListEnabled == TRUE) then 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:numRows(true) - config.maxDeathRecords) if(amount > 0) then if(config.sqlType == "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 end se nao for isso me manda por pm que tento te ajudar :smile_positivo: Link para o comentário https://xtibia.com/forum/topic/115473-ajuda-bug/#findComment-756685 Compartilhar em outros sites More sharing options...
satan666 12 Postado Julho 3, 2009 Share Postado Julho 3, 2009 o seu server é tfs8.31+? se for ve o data/creaturescripts/scripts/playerdeath.lua apaga o que tem la e coloca: se nao for isso me manda por pm que tento te ajudar :smile_positivo: errado cara isso nao tem nada a ver com o problema dele. local config = {deathListEnabled = getBooleanFromString(getConfigInfo('deathListEnabled')), sqlType = getConfigInfo('sqlType'), maxDeathRecords = getConfigInfo('maxDeathRecords') } isso e pra a lista de mortes do player nao afeta a porcentagem de perda por morte. Link para o comentário https://xtibia.com/forum/topic/115473-ajuda-bug/#findComment-756723 Compartilhar em outros sites More sharing options...
Posts Recomendados