Ir para conteúdo

Featured Replies

  • Respostas 18
  • Visualizações 3.9k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

  • data/talkactions/script Crie um arquivo deathlist.lua e coloque o seguinte script. Depois vai em data/talkactions/talkactions.xml E adicione a linha

  • Matheus, dai o tibia iria fechar sozinho, sem mostrar para enviar o relatório, iria fechar de qualquer jeito, não? Amigo, use o do Matheus, mas antes faça isso: Vá até a pasta Talkactions abra

Postado

data/talkactions/script

Crie um arquivo deathlist.lua

e coloque o seguinte script.

function onSay(cid, words, param)

local target = db.getResult("SELECT `name`, `id` FROM `players` WHERE `name` = " .. db.escapeString(param) .. ";")

if(target:getID() ~= -1) then

local targetName = target:getDataString("name")

local targetGUID = target:getDataInt("id")

target:free()

local str = ""

local deaths = db.getResult("SELECT `time`, `level`, `killed_by`, `altkilled_by` FROM `player_deaths` WHERE `player_id` = " .. targetGUID .. " ORDER BY `time` DESC;")

if(deaths:getID() ~= -1) then

local breakline = ""

while(true) do

if(str ~= "") then

breakline = "\n"

end

local time = os.date("%d %B %Y %X ", deaths:getDataInt("time"))

local level = deaths:getDataInt("level")

local killed = ""

local lastHitKiller = deaths:getDataString("killed_by")

local mostDamageKiller = deaths:getDataString("altkilled_by")

if(tonumber(lastHitKiller)) then

killed = getPlayerNameByGUID(tonumber(lastHitKiller))

else

killed = getArticle(lastHitKiller) .. " " .. string.lower(lastHitKiller)

end

if(mostDamageKiller ~= "") then

if(tonumber(mostDamageKiller)) then

killed = killed .. " and by " .. getPlayerNameByGUID(tonumber(mostDamageKiller))

else

killed = killed .. " and by " .. getArticle(mostDamageKiller) .. " " .. string.lower(mostDamageKiller)

end

end

str = str .. breakline .. " " .. time .. " Died at Level " .. level .. " by " .. killed .. "."

if not(deaths:next()) then

break

end

end

deaths:free()

else

str = "No deaths recorded."

end

doPlayerPopupFYI(cid, "Deathlist for player: " .. targetName .. ".\n\n" .. str)

else

doPlayerSendCancel(cid, "Este Jogador Não Existe")

end

return TRUE

end

Depois vai em data/talkactions/talkactions.xml

E adicione a linha

<talkaction words="!deathlist" script="deathlist.lua"/>

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