Ir para conteúdo

Featured Replies

Postado

tira aquele "a" de lá de cima do


local hitKillerName = "field item"

no caso ficar assim!!

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

Editado por Carinhah (veja o histórico de edições)

  • Respostas 8
  • Visualizações 1.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • cara to no notbook voltando pra casa da faculdade... tenta usar esses scripts ae!! First Items Playerdeath por enquanto é oque posso fazer por vc... estou no onibus com

Posted Images

Postado
  • Autor

ai apareceu isso no distro :

t load script (data/creaturescripts/scripts/playerdeath.lua)

data/creaturescripts/scripts/playerdeath.lua:14: ambiguous syntax (function call x new statement) near '('

>>> Baiak Slayer <<<

 

Baiak Slayer 24h PVP 8.6

Site e IP: baiakslayer.org

 

Informações:

 

» 24 Horas Online

» Mapa próprio da equipe Slayer (Spawns próprias)

» Vocações balanceadas

» Use o Cliente Baiak Slayer

» 40+ Raids Automáticas

» Grupo de Tutores Competentes

» Excelente Suporte In-Game

» 10.173+ Spawns

» War System full

» Sem Corrupção

» Task Completa

 

» EXP Rate: 250x Inicial (Estagiada)

» Skill Rate: 30 x

» Magic Rate: 15 x

» Loot Rate: Própria do Servidor (Eventos Double Loot)

 

Não perca mais tempo!

 

Entre e divirta-se!!

 

Citar

 

Postado
  • Autor

Cara .. eu botei isso e agora quem tiver usando bless no meu ot .. perde o loot FULL .. me diz o porq ? não aparece nenhum erro no distro , isso aconteceu depois que eu botei o seu script ou o do carinha ali emcima .. e quem tiver pk tbm , perde full loot se tiver usando bless :X

>>> Baiak Slayer <<<

 

Baiak Slayer 24h PVP 8.6

Site e IP: baiakslayer.org

 

Informações:

 

» 24 Horas Online

» Mapa próprio da equipe Slayer (Spawns próprias)

» Vocações balanceadas

» Use o Cliente Baiak Slayer

» 40+ Raids Automáticas

» Grupo de Tutores Competentes

» Excelente Suporte In-Game

» 10.173+ Spawns

» War System full

» Sem Corrupção

» Task Completa

 

» EXP Rate: 250x Inicial (Estagiada)

» Skill Rate: 30 x

» Magic Rate: 15 x

» Loot Rate: Própria do Servidor (Eventos Double Loot)

 

Não perca mais tempo!

 

Entre e divirta-se!!

 

Citar

 

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

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo