BestGames

Gostaria de reagir a esta mensagem? Crie uma conta em poucos cliques ou inicie sessão para continuar.

SEMPRE À ATIVA!


4 participantes

    [Talkactions] Deathlist Funcionando

    Obelisko754
    Obelisko754
    Cordenador
    Cordenador


    Mensagens : 101
    ZXG Coins : 6284
    Data de inscrição : 22/02/2012

    [Talkactions] Deathlist Funcionando Empty [Talkactions] Deathlist Funcionando

    Mensagem por Obelisko754 Sex Mar 16, 2012 6:56 pm

    Deathlist funcionando! [TFS 0.3.6+]

    Fala galera, muitos OTs estão com o comando Death List (!deathlist) bugado, então estava pesquisando algum script semelhante que não bugasse o servidor e achei!

    Vá até a pasta Talkactions abra o arquivo Talkactions.xml e adicione esta Tag:
    Código:
    <talkaction words="!deathlist" event="script" value="deathlist.lua"/>

    Depois de ter adicionado e salvado, vá até a pasta Scripts dentro da pasta Takactions e abra ou faça um script deathlist.lua e adicione isto dentro:

    Código:
    local config = {
    deathAssistCount = getConfigValue('deathAssistCount') + 1,
    maxDeathRecords = getConfigValue('maxDeathRecords'),
    limit = ""
    }
    if(config.deathAssistCount > 0) then
    config.limit = " LIMIT 0, " .. config.deathAssistCount
    end
    function onSay(cid, words, param, channel)
    local target = db.getResult("SELECT `name`, `id` FROM `players` WHERE `name` = " .. db.escapeString(param) .. ";")
    if(target:getID() == -1) then
    doPlayerSendCancel(cid, "A player with that name does not exist.")
    return true
    end
    local targetName, targetId = target:getDataString("name"), target:getDataInt("id")
    target:free()
    local str, deaths = "", db.getResult("SELECT `id`, `date`, `level` FROM `player_deaths` WHERE `player_id` = " .. targetId .." ORDER BY `date` DESC LIMIT 0, " .. config.maxDeathRecords)
    if(deaths:getID() ~= -1) then
    repeat
    local killers = db.getResult("SELECT environment_killers.name AS monster_name, players.name AS player_name FROM killers LEFT JOIN environment_killers ON killers.id = environment_killers.kill_id LEFT JOIN player_killers ON killers.id = player_killers.kill_id LEFT JOIN players ON players.id = player_killers.player_id WHERE killers.death_id = " .. deaths:getDataInt("id") .. " ORDER BY killers.final_hit DESC, killers.id ASC" .. config.limit)
    if(killers:getID() ~= -1) then
    if(str ~= "") then
    str = str .. "\n" .. os.date("%d %B %Y %X ", deaths:getDataLong("date"))
    else
    str = os.date("%d %B %Y %X ", deaths:getDataLong("date"))
    end
    local count, i = killers:getRows(false), 0
    repeat
    local monster = killers:getDataString("monster_name")
    if(i == 0 or i == (count - 1)) then
    monster = string.gsub(monster:gsub("an ", ""), "a ", "")
    end
    if(killers:getDataString("player_name") ~= "") then
    if(i == 0) then
    str = str .. "Killed at level " .. deaths:getDataInt("level") .. " by:\n  "
    elseif(i == count) then
    str = str .. " and by "
    elseif(i % 4 == 0) then
    str = str .. ",\n  "
    else
    str = str .. ", "
    end
    if(monster ~= "") then
    str = str .. monster .. " summoned by "
    end
    str = str .. killers:getDataString("player_name")
    else
    if(i == 0) then
    str = str .. "Died at level " .. deaths:getDataInt("level") .. " by:\n  "
    elseif(i == count) then
    str = str .. " and by "
    elseif(i % 4 == 0) then
    str = str .. ",\n  "
    else
    str = str .. ", "
    end
    str = str .. monster
    end
    i = i + 1
    if(i == count) then
    str = str .. "."
    end
    until not(killers:next())
    killers:free()
    end
    until not(deaths:next())
    deaths:free()
    else
    str = "No deaths recorded."
    end
    doPlayerPopupFYI(cid, "Deathlist for player: " .. targetName .. ".\n\n" .. str)
    return true
    end

    Pronto, seu deathlist agora está funcionando normalmente!

    Créditos:
    Desconhecido.~
    Jamerson Andre
    Jamerson Andre
    Admin
    Admin


    Mensagens : 442
    ZXG Coins : 5143
    Data de inscrição : 13/12/2011
    Idade : 26
    Localização : Maceio -Al


    Alerta:
    [Talkactions] Deathlist Funcionando Left_bar_bleue99/100[Talkactions] Deathlist Funcionando Empty_bar_bleue  (99/100)

    [Talkactions] Deathlist Funcionando Empty Re: [Talkactions] Deathlist Funcionando

    Mensagem por Jamerson Andre Sex Mar 16, 2012 7:15 pm

    vlws Very Happy
    DaNgeRoUs
    DaNgeRoUs
    Admin
    Admin


    Mensagens : 17
    ZXG Coins : 4470
    Data de inscrição : 14/03/2012
    Idade : 26
    Localização : Pelotas - Rio Grande Do Sul

    [Talkactions] Deathlist Funcionando Empty Re: [Talkactions] Deathlist Funcionando

    Mensagem por DaNgeRoUs Sáb Mar 17, 2012 12:45 am

    muito bom!!
    Baiakzik
    Baiakzik
    Cordenador
    Cordenador


    Mensagens : 83
    ZXG Coins : 6228
    Data de inscrição : 23/03/2012
    Idade : 22
    Localização : Rio De Janeiro

    [Talkactions] Deathlist Funcionando Empty Re: [Talkactions] Deathlist Funcionando

    Mensagem por Baiakzik Dom maio 13, 2012 12:45 pm

    Creditos Doidin ..

    Conteúdo patrocinado


    [Talkactions] Deathlist Funcionando Empty Re: [Talkactions] Deathlist Funcionando

    Mensagem por Conteúdo patrocinado


      Data/hora atual: Dom maio 19, 2024 2:26 pm