• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    [Talkaction]!reset

    Compartir:

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

    1default [Talkaction]!reset el Jue Mar 28, 2013 10:54 am

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    Bueno aqui encontre lo que el gusta montar servidor pvp enforce o de war aqui les va el systema de reset.

    En data\talkactions\scripts crean un archivo .lua y pegan esto:


    Código:
    function onSay(cid, words, param)

    --[Configuracions de Condiciones]__

    config = { --[[verdadero / Falso]]

    needPa = false, -- Necesitas Premium Account? [true / false]
    needPz = false, -- Necesita estar en Protection Zone? [true / false]
    battle = false, -- Precisa estar sin Batle para Resetar? [true / false]
    withe = true, -- Players PK Withe pueden Resetar? [true / false]
    red = true, -- Players PK Red pueden Resetar? [true / false]
    tp = false, -- Teletransportar para el Templo despues de resetear? [true / false]
    look = true, -- Mostrar Resets en el Look de el Player? [true / false]
    addLimite = true, -- Abilitar Limite de Resets? [true / false]
    setClasse = false, -- Cambiar de vocacion cuando resetie? [true / false]
    storage = 1020, -- Storage [valor]


    --[Configuracion de Reset]__

    resetStatus = {

    player = getPlayerGUID(cid), -- Noo cambiar.
    lvl = 700000 , -- Level Necesario para Resetar. [valor]
    lvlreset = 10000, -- Level con el que apareceras despues del Reset. [valor]
    limite = 100, -- Máximo de resets que un player puede tener. [valor]
    newClasse = 1, -- Id de la vocacion que obtendras despues de la Reset. [valor]
    tempo= 5 -- Tiempo de un Player para deslogear para Resetar. En segundos. [valor]
    },
    }

    --[Funciones]__

    function Reseting(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    doPlayerSetVocation(cid, config.resetStatus.newClasse)
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    return TRUE
    end

    function noAll(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
    return TRUE
    end

    function noTeleporting(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doPlayerSetVocation(cid, config.resetStatus.newClasse)
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
    return TRUE
    end

    function noLook(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doPlayerSetVocation(cid, config.resetStatus.newClasse)
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
    return TRUE
    end

    function noClasse(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    return TRUE
    end

    function setClasse(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doPlayerSetVocation(cid, config.resetStatus.newClasse)
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    return TRUE
    end

    function look(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    return TRUE
    end

    function teleporting(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    return TRUE
    end

    function getResets(cid)
    resets = getPlayerStorageValue(cid,config.storage)

    if resets < 0 then
    resets = 0
    end
    return resets

    end


    local resets = getResets(cid)
    local needLvl ="Necesitas mas "..config.resetStatus.lvl-getPlayerLevel(cid).." levels para resetar."
    local msg ="~~[Reset: "..getResets(cid).."]~~ 'Reseteaste! Seras Deslogeado en "..config.resetStatus.tempo.." Segundos."


    --[Condiciones]__

    if(config.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
    doPlayerSendTextMessage(cid,22,"Necesitas estar en pz wen.")
    return TRUE

    elseif(config.addLimite == true) and (getResets(cid) == config.resetStatus.limite) then
    doPlayerSendTextMessage(cid, 22, "Tienes maximo de resets.")
    return TRUE

    elseif(config.withe == false) and (getCreatureSkullType(cid) == 3) then
    doPlayerSendTextMessage(cid,22,"Estas PK White, por Eso no puedes resetear.")
    return TRUE

    elseif(config.red == false) and (getCreatureSkullType(cid) == 4) then
    doPlayerSendTextMessage(cid,22,"Estas PK Red, por Eso no puedes resetear.")
    return TRUE

    elseif(config.needPa == true) and not isPremium(cid) then
    doPlayerSendTextMessage(cid,22,"Necesitas premi pa resetear.")
    return TRUE

    elseif(config.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
    doPlayerSendTextMessage(cid,22,"Necesitas estar sin Battle para Resetear.")
    return TRUE

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == true) then
    addEvent(Reseting, config.resetStatus.tempo* 1000, cid)

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == false) then
    addEvent(noAll, config.resetStatus.tempo* 1000, cid)

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == true) then
    addEvent(noTeleporting, config.resetStatus.tempo* 1000, cid)

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == true) then
    addEvent(noLook, config.resetStatus.tempo* 1000, cid)

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == false) then
    addEvent(noClasse, config.resetStatus.tempo* 1000, cid)

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == true) then
    addEvent(setClasse, config.resetStatus.tempo* 1000, cid)

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == false) then
    addEvent(look, config.resetStatus.tempo* 1000, cid)

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == false) then
    addEvent(teleporting, config.resetStatus.tempo* 1000, cid)

    elseif doPlayerSendCancel(cid, needLvl) then
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
    return TRUE
    end

    if doPlayerPopupFYI(cid, msg) then

    end
    return TRUE

    end



    y en talkactions.xml pegan estoo:



    Código:
    talkaction words="!reset" event="script" value="reset.lua"/



    99% MarcelloMkez
    1% Maya por Aportarlo

    Ver perfil de usuario https://www.tibiaface.com

    2default Re: [Talkaction]!reset el Mar Dic 15, 2015 9:09 pm

    Dalinger Uzcategui

    Dalinger Uzcategui
    Nuevo Miembro
    Nuevo Miembro
    Tengo una pregunta si quiero que un item sea el que me de el reset que hago?

    Ver perfil de usuario

    3default Re: [Talkaction]!reset el Miér Dic 16, 2015 11:32 am

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:Tengo una pregunta si quiero que un item sea el que me de el reset que hago?

    seria imposible mudar el script



    [Talkaction]!reset YNU5B25
    Ver perfil de usuario https://www.tibiaface.com

    4default Re: [Talkaction]!reset el Miér Feb 15, 2017 12:53 am

    victor10

    victor10
    Miembro
    Miembro
    Como hago para que el Gm haga el reset para todo los player con ese script? se puede?

    Ver perfil de usuario http://fervidox.wordpress.com/

    5default Re: [Talkaction]!reset el Miér Feb 15, 2017 1:39 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:Como hago para que el Gm haga el reset para todo los player con ese script? se puede?

    esto es el sistema de reset cuando player llega a cierto level manda reset



    Código:

    function onSay(cid, words, param)

    --[Configuracions de Condiciones]__

    config = { --[[verdadero / Falso]]

    needPa = false, -- Necesitas Premium Account? [true / false]
    needPz = false, -- Necesita estar en Protection Zone? [true / false]
    battle = false, -- Precisa estar sin Batle para Resetar? [true / false]
    withe = true, -- Players PK Withe pueden Resetar? [true / false]
    red = true, -- Players PK Red pueden Resetar? [true / false]
    tp = false, -- Teletransportar para el Templo despues de resetear? [true / false]
    look = true, -- Mostrar Resets en el Look de el Player? [true / false]
    addLimite = true, -- Abilitar Limite de Resets? [true / false]
    setClasse = false, -- Cambiar de vocacion cuando resetie? [true / false]
    storage = 1020, -- Storage [valor]


    --[Configuracion de Reset]__

    resetStatus = {

    player = getPlayerGUID(cid), -- Noo cambiar.
    lvl = 700000 , -- Level Necesario para Resetar. [valor]
    lvlreset = 10000, -- Level con el que apareceras despues del Reset. [valor]
    limite = 100, -- Máximo de resets que un player puede tener. [valor]
    newClasse = 1, -- Id de la vocacion que obtendras despues de la Reset. [valor]
    tempo= 5 -- Tiempo de un Player para deslogear para Resetar. En segundos. [valor]
    },
    }

    --[Funciones]__
    function getPlayerRebirth(cid)
        local Info = db.getResult("SELECT `Rebirths` FROM `players` WHERE `id` = " .. getPlayerGUID(cid) .. " LIMIT 1")
            if Info:getID() ~= LUA_ERROR then
            local rebs= Info:getDataInt("Rebirths")
            Info:free()
            return rebs
        end
        return LUA_ERROR
    end

    function doAddRebirth(cid, rebs)
        db.executeQuery("UPDATE `players` SET `Rebirths` = `Rebirths` + " .. rebs .. " WHERE `id` = " .. getPlayerGUID(cid) .. ";")
    end

    function Reseting(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doAddRebirth(cid,getPlayerRebirth(cid) + 1)
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    doPlayerSetVocation(cid, config.resetStatus.newClasse)
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    return TRUE
    end

    function noAll(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
    return TRUE
    end

    function noTeleporting(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doPlayerSetVocation(cid, config.resetStatus.newClasse)
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
    return TRUE
    end

    function noLook(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doPlayerSetVocation(cid, config.resetStatus.newClasse)
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
    return TRUE
    end

    function noClasse(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    return TRUE
    end

    function setClasse(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doPlayerSetVocation(cid, config.resetStatus.newClasse)
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    return TRUE
    end

    function look(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `description` = ' [Reset "..resets.."]' WHERE `players`.`id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    return TRUE
    end

    function teleporting(cid)
    resets = getResets(cid)
    setPlayerStorageValue(cid,config.storage,resets+1)
    doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
    doRemoveCreature(cid)
    db.executeQuery("UPDATE `players` SET `description` = '' WHERE `players`.`id` = "..config.resetStatus.player)
    db.executeQuery("UPDATE `players` SET `level` = "..config.resetStatus.lvlreset..", `experience` = 0 WHERE `id` = "..config.resetStatus.player)
    return TRUE
    end

    function getResets(cid)
    resets = getPlayerStorageValue(cid,config.storage)

    if resets < 0 then
    resets = 0
    end
    return resets

    end


    local resets = getResets(cid)
    local needLvl ="Necesitas mas "..config.resetStatus.lvl-getPlayerLevel(cid).." levels para resetar."
    local msg ="~~[Reset: "..getResets(cid).."]~~ 'Reseteaste! Seras Deslogeado en "..config.resetStatus.tempo.." Segundos."


    --[Condiciones]__

    if(config.needPz == true) and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
    doPlayerSendTextMessage(cid,22,"Necesitas estar en pz wen.")
    return TRUE

    elseif(config.addLimite == true) and (getResets(cid) == config.resetStatus.limite) then
    doPlayerSendTextMessage(cid, 22, "Tienes maximo de resets.")
    return TRUE

    elseif(config.withe == false) and (getCreatureSkullType(cid) == 3) then
    doPlayerSendTextMessage(cid,22,"Estas PK White, por Eso no puedes resetear.")
    return TRUE

    elseif(config.red == false) and (getCreatureSkullType(cid) == 4) then
    doPlayerSendTextMessage(cid,22,"Estas PK Red, por Eso no puedes resetear.")
    return TRUE

    elseif(config.needPa == true) and not isPremium(cid) then
    doPlayerSendTextMessage(cid,22,"Necesitas premi pa resetear.")
    return TRUE

    elseif(config.battle == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
    doPlayerSendTextMessage(cid,22,"Necesitas estar sin Battle para Resetear.")
    return TRUE

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == true) then
    addEvent(Reseting, config.resetStatus.tempo* 1000, cid)

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == false) then
    addEvent(noAll, config.resetStatus.tempo* 1000, cid)

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == true) then
    addEvent(noTeleporting, config.resetStatus.tempo* 1000, cid)

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == true) then
    addEvent(noLook, config.resetStatus.tempo* 1000, cid)

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == true) and (config.setClasse == false) then
    addEvent(noClasse, config.resetStatus.tempo* 1000, cid)

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == false) and (config.setClasse == true) then
    addEvent(setClasse, config.resetStatus.tempo* 1000, cid)

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == false) and (config.look == true) and (config.setClasse == false) then
    addEvent(look, config.resetStatus.tempo* 1000, cid)

    elseif getPlayerLevel(cid) >= config.resetStatus.lvl and (config.tp == true) and (config.look == false) and (config.setClasse == false) then
    addEvent(teleporting, config.resetStatus.tempo* 1000, cid)

    elseif doPlayerSendCancel(cid, needLvl) then
    doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
    return TRUE
    end

    if doPlayerPopupFYI(cid, msg) then

    end
    return TRUE

    end



    Código:
    ALTER TABLE `players` ADD `rebirths` INT NOT NULL DEFAULT 0;


    highscores.php

    Código:

    <?PHP
    $list = $_REQUEST['list'];
    $page = $_REQUEST['page'];
    switch($list)
    {
      case "fist":
      $id = 0;
      $list_name = 'Fist Fighting';
      break;
      case "club":
      $id = 1;
      $list_name = 'Club Fighting';
      break;
      case "sword":
      $id = 2;
      $list_name = 'Sword Fighting';
      break;
      case "axe":
      $id = 3;
      $list_name = 'Axe Fighting';
      break;
      case "distance":
      $id = 4;
      $list_name = 'Distance Fighting';
      break;
      case "shield":
      $id = 5;
      $list_name = 'Shielding';
      break;
      case "fishing":
      $id = 6;
      $list_name = 'Fishing';
      break;
    }
    if(!isset($id))
        if($list == "magic")
            $list_name = "Magic Level";
        elseif($list == "rebirths")
            $list_name = "rebirths";
        else
        {
            $list_name = 'Experience';
            $list = 'experience';
        }
    if(count($config['site']['worlds']) > 1)
    {
        $worlds .= '<i>Select world:</i> ';
        foreach($config['site']['worlds'] as $idd => $world_n)
        {
            if($idd == (int) $_GET['world'])
            {
                $world_id = $idd;
                $world_name = $world_n;
            }
        }
    }
            if($idd == (int) $_GET['world'])
            {
                $world_id = $idd;
                $world_name = $world_n;
            }
    if(!isset($world_id))
    {
        $world_id = 0;
        $world_name = $config['server']['serverName'];
    }
    $offset = $page * 100;
    if(isset($id))
        $skills = $SQL->query('SELECT name,online,value,level,vocation,promotion FROM players,player_skills WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND players.id = player_skills.player_id AND player_skills.skillid = '.$id.' ORDER BY value DESC, count DESC LIMIT 101 OFFSET '.$offset);
    elseif($list == "magic")
        $skills = $SQL->query('SELECT name,online,maglevel,level,vocation,promotion FROM players WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND name != "Account Manager" ORDER BY maglevel DESC, manaspent DESC LIMIT 101 OFFSET '.$offset);
    elseif($list == "rebirths")
        $skills = $SQL->query('SELECT name,online,rebirths,level,vocation,promotion FROM players WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND name != "Account Manager" ORDER BY rebirths DESC LIMIT 101 OFFSET '.$offset);
    elseif($list == "experience")
        $skills = $SQL->query('SELECT name,online,level,experience,vocation,promotion FROM players WHERE players.world_id = '.$world_id.' AND players.deleted = 0 AND players.group_id < '.$config['site']['players_group_id_block'].' AND name != "Account Manager" ORDER BY level DESC, experience DESC LIMIT 101 OFFSET '.$offset);
     
    //wyswietlanie wszystkiego
    $main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD><TD><CENTER><H2>Ranking for '.$list_name.' on '.$world_name.'</H2></CENTER><BR>';
        $main_content .= '<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR><TD></TD><TD>
    <FORM ACTION="?subtopic=highscores" METHOD=get><INPUT TYPE=hidden NAME=subtopic VALUE=highscores><INPUT TYPE=hidden NAME=list VALUE=experience>
    <TABLE WIDTH=100% BORDER=0 CELLSPACING=1 CELLPADDING=4><TR><TD BGCOLOR="'.$config['site']['vdarkborder'].'" CLASS=white><B>World Selection</B></TD></TR><TR><TD BGCOLOR="'.$config['site']['lightborder'].'">
        <TABLE BORDER=0 CELLPADDING=1><TR><TD>World: </TD><TD><SELECT SIZE="1" NAME="world"><OPTION VALUE="" SELECTED>(choose world)</OPTION>';
        foreach($config['site']['worlds'] as $id => $world_n)
    {
        $main_content .= '<OPTION VALUE="'.$id.'">'.$world_n.'</OPTION>';
    }
        $main_content .= '</SELECT> </TD><TD><INPUT TYPE=image NAME="Submit" ALT="Submit" SRC="'.$layout_name.'/images/buttons/sbutton_submit.gif" BORDER=0 WIDTH=120 HEIGHT=18>
            </TD></TR></TABLE></TABLE></FORM></TABLE><br><br><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%></TABLE><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD WIDTH=10% CLASS=whites><B>Rank</B></TD><TD WIDTH=75% CLASS=whites><B>Name</B></TD><TD WIDTH=15% CLASS=whites><b><center>Level</center></B></TD><TD WIDTH=5% CLASS=whites><b><center>Vip Status</center></B></TD>';
    if($list == "experience")
        $main_content .= '<TD CLASS=whites><b><center>Points</center></B></TD>';
    $main_content .= '</TR><TR>';
    foreach($skills as $skill)
     
    {
    $player = $ots->createObject('Player');
    $player->find($skill['name']);
    $account = $player->getAccount();
    $ban = '';
    if($account->isBanned())
    $ban = '<font color="red"> [Banished]</font>';
        if($number_of_rows < 100)
        {
            if($list == "magic")
                $skill['value'] = $skill['maglevel'];
            if($list == "rebirths")
                $skill['value'] = $skill['rebirths'];
            if($list == "experience")
                $skill['value'] = $skill['level'];
            if(!is_int($number_of_rows / 2)) { $bgcolor = $config['site']['darkborder']; } else { $bgcolor = $config['site']['lightborder']; } $number_of_rows++;
            $main_content .= '<tr bgcolor="'.$bgcolor.'"><td>'.($offset + $number_of_rows).'.</td><td><a href="?subtopic=characters&name='.urlencode($skill['name']).'">'.($skill['online']>0 ? "<font color="green">".$skill['name']."</font>" : "<font color="red">".$skill['name']."</font>").'</a> '.$ban.'<br><small>'.$skill['level'].' '.$vocation_name[$world_id][$skill['promotion']][$skill['vocation']].'</small></td><td><center>'.$skill['value'].'</center></td><td>'.$vipp.'</td>  ';
            if($list == "experience")
                $main_content .= '<td><center>'.$skill['experience'].'</center></td>';
            $main_content .= '</tr>';
        }
        else
            $show_link_to_next_page = TRUE;
            $vip = $SQL->query('SELECT `player_storage`.`player_id`, `player_storage`.`key`, `players`.`id` FROM `player_storage`, `players` WHERE `player_storage`.`player_id` = '.$player->getId().' AND `key` = 11551;')->fetchall();
    if($vip[0]['key'] == 11551)
        $vipp = '<center><font color="green"><b>VIP</b></font></center>';
    else
        $vipp = '<center><font color="red"><b>Non Vip</b></font></center>';
    }
    $main_content .= '</TABLE><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1 WIDTH=100%>';
    if($page > 0)
        $main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="?subtopic=highscores&list='.$list.'&page='.($page - 1).'" CLASS="size_xxs">Previous Page</A></TD></TR>';
    if($show_link_to_next_page)
        $main_content .= '<TR><TD WIDTH=100% ALIGN=right VALIGN=bottom><A HREF="?subtopic=highscores&list='.$list.'&page='.($page + 1).'" CLASS="size_xxs">Next Page</A></TD></TR>';
    $main_content .= '</TABLE></TD><TD WIDTH=5%><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=1 HEIGHT=1 BORDER=0></TD><TD WIDTH=15% VALIGN=top ALIGN=right><TABLE BORDER=0 CELLPADDING=4 CELLSPACING=1><TR BGCOLOR="'.$config['site']['vdarkborder'].'"><TD CLASS=whites><B>Choose a skill</B></TD></TR><TR BGCOLOR="'.$config['site']['lightborder'].'"><TD><A HREF="?subtopic=highscores&list=experience&world='.$world_id.'" CLASS="size_xs">Experience</A><BR><A HREF="?subtopic=highscores&list=magic&world='.$world_id.'" CLASS="size_xs">Magic</A><BR><A HREF="?subtopic=highscores&list=shield&world='.$world_id.'" CLASS="size_xs">Shielding</A><BR><A HREF="?subtopic=highscores&list=distance&world='.$world_id.'" CLASS="size_xs">Distance</A><BR><A HREF="?subtopic=highscores&list=club&world='.$world_id.'" CLASS="size_xs">Club</A><BR><A HREF="?subtopic=highscores&list=sword&world='.$world_id.'" CLASS="size_xs">Sword</A><BR><A HREF="?subtopic=highscores&list=axe&world='.$world_id.'" CLASS="size_xs">Axe</A><BR><A HREF="?subtopic=highscores&list=fist&world='.$world_id.'" CLASS="size_xs">Fist</A><BR><A HREF="?subtopic=highscores&list=fishing&world='.$world_id.'" CLASS="size_xs">Fishing</A><BR><A HREF="?subtopic=highscores&list=rebirths&world='.$world_id.'" CLASS="size_xs">rebirths</A><BR></TD></TR></TABLE></TD><TD><IMG SRC="'.$layout_name.'/images/general/blank.gif" WIDTH=10 HEIGHT=1 BORDER=0></TD></TR></TABLE>';
    $main_content .='autor: <a href="http://otland.net/members/god+batonik/">GoD BaToNiK</a>';
     
    ?>



    aqui lo tienes [Tienes que estar registrado y conectado para ver este vínculo] prueba hacer reset con un nuevo player



    aqui lo encuentra

    [Tienes que estar registrado y conectado para ver este vínculo]



    Última edición por [Admin] God Maya el Lun Jun 10, 2019 10:58 pm, editado 1 vez

    Ver perfil de usuario https://www.tibiaface.com

    6default Re: [Talkaction]!reset el Lun Jun 10, 2019 10:56 pm

    Maracucho2

    Maracucho2
    Nuevo Miembro
    Nuevo Miembro
    quí observa yo quisiera que me ayudaras en que te diga cuantos reset tu tienes a comulado. dándote click en ti mismo. Oh al menos por !comando Por ejemlo !reset rank. no se si me puedas ayudar?

    Ver perfil de usuario

    7default Re: [Talkaction]!reset el Mar Jun 11, 2019 8:01 am

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    [Tienes que estar registrado y conectado para ver este vínculo] escribió:quí observa yo quisiera que me ayudaras en que te diga cuantos reset tu tienes a comulado. dándote click en ti mismo. Oh al menos por !comando Por ejemlo !reset rank. no se si me puedas ayudar?

    todo esto en crearureescripts

    Código:

    function onLook(cid, thing, position, lookDistance)
            if isPlayer(thing.uid) == false then
                    return true
            end
          
            local name = getCreatureName(cid)
           
          function getPlayerReset()
     local Query = db.getResult("SELECT `resets` FROM `players` WHERE `players`.`name` = '"..name.."';")
    return Query:getDataInt("resets")
     
     
      end

    player = getPlayerReset()
             doPlayerSetSpecialDescription(cid, "  -  Resets: ["..(player).."]")
            return true
    end

    Código:
    <event type="look" name="Look" event="script" value="reset.lua"/>



    [Talkaction]!reset YNU5B25
    Ver perfil de usuario https://www.tibiaface.com

    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.

    Temas Recomendados×+

       

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