• TibiaFace

    Tibiaface | Una comunidad Open Tibia donde encontras : mapas, scripts, Otserver, npc y amigos etc ...

    .
    demo menumenu

    Afiliados



    Votar:

    [Talkactions] Ayuda (Talkaction) Top Frags y Top Level?

    Compartir:

    Ver el tema anterior Ver el tema siguiente Ir abajo  Mensaje (Página 1 de 1.)

    gettro

    gettro
    Miembro
    Miembro
    Descripcion escribió:Hola Tibiaface

    e andado buscando en mi ot y en el foro  y no eh encontrado nada igual o almenos algo que me funcione...

    busco un talkaction que me de los top 10 Fragers

    y otro que me de  los top 10 level sencillos o con vocacion y level

    alguno de ustedes podria facilitarme uno o ayudarme porfavor si lo tienen en alguno de sus ots?

    ayudo con un like y gracias de antemano

    Mi ot es version 8.60  The OTX Server version (2.x.S  -3 ) 32 bits

    (y) Smile
    Imagen Explicativa escribió:Imagen Explicativa: [Talkactions] Ayuda (Talkaction) Top Frags y Top Level? Tibiaf10
    Version del Scripts: OTx Old Version(0.3.7)

    https://www.facebook.com/abductionglobal/?modal=admin_todo_tour

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    MOD rank frag

    Código:

    <?xml version="1.0" encoding="UTF-8"?>
    <mod name="rank frag" version="1.0" author="Mulizeu" contact="xtibia.com" enabled="yes">
    <config name="rankf_func"><![CDATA[
    storage = 824544
    function getPlayerFrags(cid)
        local time = os.time()
        local times = {today = (time - 86400), week = (time - (7 * 86400))}
        local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC")
        if(result:getID() ~= -1) then
            repeat
                local content = {date = result:getDataInt("date")}
                if(content.date > times.today) then
                    table.insert(contents.day, content)
                elseif(content.date > times.week) then
                    table.insert(contents.week, content)
                else
                    table.insert(contents.month, content)
                end
            until not result:next()
            result:free()
        end
        local size = {day = table.maxn(contents.day),week = table.maxn(contents.week),month = table.maxn(contents.month)}
        return size.day + size.week + size.month
    end
    function setFrags(cid)
    if not isCreature(cid) then return LUA_ERROR end
    setPlayerStorageValue(cid, storage, getPlayerFrags(cid))
    doPlayerSave(cid)
    end
    function getRankStorage(cid, value, max, RankName) -- by vodka
    local str =""
    str = "--[".. (RankName == nil and "RANK STORAGE" or ""..RankName.."") .."]--\n\n"
    local query = db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = "..value.." ORDER BY cast(value as INTEGER) DESC;")
    if (query:getID() ~= -1) then k = 1 repeat if k > max then break end
    str = str .. "\n " .. k .. ". "..getPlayerNameByGUID(query:getDataString("player_id")).." - [" .. query:getDataInt("value") .. "]"
    k = k + 1 until not query:next() end return doPlayerPopupFYI(cid, str)
    end
    ]]></config>
    <talkaction words="/rankfrags;!rankfrags" event="buffer"><![CDATA[
    domodlib('rankf_func')
    return getRankStorage(cid, storage, 20, "Rank Frag")
    ]]></talkaction>
    <event type="login" name="RankfLogin" event="script"><![CDATA[
    function onLogin(cid)
    registerCreatureEvent(cid, "RankfKill")
    registerCreatureEvent(cid, "RankfLogin")
    setFrags(cid)
    return true
    end]]></event>   
    <event type="kill" name="RankfKill" event="script"><![CDATA[
    domodlib('rankf_func')
    function onKill(cid, target, lastHit)
    if (isPlayer(cid) == true) and (isPlayer(target) == true) then
    addEvent(setFrags, 1000, cid)
    end
    return true
    end]]></event>
    </mod>


    y es posible con este talkactiont engas los queires del rakin

    Código:

    function onSay(cid, words, param)
        local hs = db.getResult("SELECT `name`, `level`, `experience` FROM `players` WHERE `vocation`>=1 ORDER By `experience` DESC LIMIT 30")
        local highscores = {}
        local str="Rookgaard level highscores!\n # Name  Level  Exp\n"
        if(hs:getID() ~= -1) then
            while(true) do
                table.insert(highscores, {hs:getDataString("name"), hs:getDataString("level"), hs:getDataInt("experience")})
                if not(hs:next()) then
                    break
                end
            end
        hs:free()
        end
       
        for i=1, #highscores do
            str = str..""..i..". "..highscores[i][1].."  "..highscores[i][2].."  "..highscores[i][3].."\n"
        end
        doPlayerPopupFYI(cid, str)
        return TRUE
    end



    [Talkactions] Ayuda (Talkaction) Top Frags y Top Level? YNU5B25
    https://www.tibiaface.com

    gettro

    gettro
    Miembro
    Miembro
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:MOD rank frag

    Código:

    <?xml version="1.0" encoding="UTF-8"?>
    <mod name="rank frag" version="1.0" author="Mulizeu" contact="xtibia.com" enabled="yes">
    <config name="rankf_func"><![CDATA[
    storage = 824544
    function getPlayerFrags(cid)
        local time = os.time()
        local times = {today = (time - 86400), week = (time - (7 * 86400))}
        local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC")
        if(result:getID() ~= -1) then
            repeat
                local content = {date = result:getDataInt("date")}
                if(content.date > times.today) then
                    table.insert(contents.day, content)
                elseif(content.date > times.week) then
                    table.insert(contents.week, content)
                else
                    table.insert(contents.month, content)
                end
            until not result:next()
            result:free()
        end
        local size = {day = table.maxn(contents.day),week = table.maxn(contents.week),month = table.maxn(contents.month)}
        return size.day + size.week + size.month
    end
    function setFrags(cid)
    if not isCreature(cid) then return LUA_ERROR end
    setPlayerStorageValue(cid, storage, getPlayerFrags(cid))
    doPlayerSave(cid)
    end
    function getRankStorage(cid, value, max, RankName) -- by vodka
    local str =""
    str = "--[".. (RankName == nil and "RANK STORAGE" or ""..RankName.."") .."]--\n\n"
    local query = db.getResult("SELECT `player_id`, `value` FROM `player_storage` WHERE `key` = "..value.." ORDER BY cast(value as INTEGER) DESC;")
    if (query:getID() ~= -1) then k = 1 repeat if k > max then break end
    str = str .. "\n " .. k .. ". "..getPlayerNameByGUID(query:getDataString("player_id")).." - [" .. query:getDataInt("value") .. "]"
    k = k + 1 until not query:next() end return doPlayerPopupFYI(cid, str)
    end
    ]]></config>
    <talkaction words="/rankfrags;!rankfrags" event="buffer"><![CDATA[
    domodlib('rankf_func')
    return getRankStorage(cid, storage, 20, "Rank Frag")
    ]]></talkaction>
    <event type="login" name="RankfLogin" event="script"><![CDATA[
    function onLogin(cid)
    registerCreatureEvent(cid, "RankfKill")
    registerCreatureEvent(cid, "RankfLogin")
    setFrags(cid)
    return true
    end]]></event>   
    <event type="kill" name="RankfKill" event="script"><![CDATA[
    domodlib('rankf_func')
    function onKill(cid, target, lastHit)
    if (isPlayer(cid) == true) and (isPlayer(target) == true) then
    addEvent(setFrags, 1000, cid)
    end
    return true
    end]]></event>
    </mod>


    y es posible con este talkactiont engas los queires del rakin

    Código:

    function onSay(cid, words, param)
        local hs = db.getResult("SELECT `name`, `level`, `experience` FROM `players` WHERE `vocation`>=1 ORDER By `experience` DESC LIMIT 30")
        local highscores = {}
        local str="Rookgaard level highscores!\n # Name  Level  Exp\n"
        if(hs:getID() ~= -1) then
            while(true) do
                table.insert(highscores, {hs:getDataString("name"), hs:getDataString("level"), hs:getDataInt("experience")})
                if not(hs:next()) then
                    break
                end
            end
        hs:free()
        end
       
        for i=1, #highscores do
            str = str..""..i..". "..highscores[i][1].."  "..highscores[i][2].."  "..highscores[i][3].."\n"
        end
        doPlayerPopupFYI(cid, str)
        return TRUE
    end


    Bro el Top levels me funciono perfecto !!

    pero el top frags me arrojo este error que es ?


    Código:
    [14/4/2020 12:51:22] >>> Loading talkactions... [Error - LuaInterface::loadFile] data/talkactions/scripts/topfrags.lua:1: unexpected symbol near '<'
    [14/4/2020 12:51:23] [Error - Event::checkScript] Cannot load script (data/talkactions/scripts/topfrags.lua)
    [14/4/2020 12:51:23] data/talkactions/scripts/topfrags.lua:1: unexpected symbol near '<'
    [14/4/2020 12:51:23] (done).

    https://www.facebook.com/abductionglobal/?modal=admin_todo_tour

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    pa su informacion el top frag es un mod no un talkactions



    [Talkactions] Ayuda (Talkaction) Top Frags y Top Level? YNU5B25
    https://www.tibiaface.com

    gettro

    gettro
    Miembro
    Miembro
    Very Happy Resuelto Gracias Very Happy

    https://www.facebook.com/abductionglobal/?modal=admin_todo_tour

    Contenido patrocinado


    Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje (Página 1 de 1.)

    Permisos de este foro:
    No puedes responder a temas en este foro.

     

    BienvenidosTibiaFace es una comunidad de Open Tibia. Para participar debes estar registrado (click para Regístrate).