• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    [Web] no carga en la web

    Compartir:

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

    1[Web] no carga en la web Empty [Web] no carga en la web Mar Jul 27, 2021 3:33 pm

    ioke

    ioke
    Miembro
    Miembro
    Descripcion escribió:data/creaturescripts/hunter.lua

    Código:
    local kills = 29998 -- storage of kills

    function onKill(cid, target, lastHit)
       if isPlayer(target) or isSummon(target) then return true end -- if target is not player and summon
       if getCreatureStorage(cid, kills) == -1 then doCreatureSetStorage(cid, kills, 0) end -- start from 0
       doCreatureSetStorage(cid, kills, getCreatureStorage(cid, kills) + 1) --add monster kills
       doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, getCreatureStorage(cid, kills) .. " monsters already killed.") --message

       return true
    end


    data/creaturescripts.xml

    Código:
    <event type="kill" name="hunter" event="script" value="hunter.lua"/>


    data/creaturescripts/login.lua

    Código:
    registerCreatureEvent(cid, "hunter")


    gesior pMake a file tophunter.php

    Código:
    <?php
       $result = $SQL->query("SELECT `players`.`name`, `player_storage`.`value` FROM `players` JOIN `player_storage` ON `players`.`id` = `player_storage`.`player_id` WHERE `player_storage`.`key` = 29998
       ORDER BY CAST(`player_storage`.`value` AS UNSIGNED) DESC LIMIT 30 ;");
           $main_content .= '<div style="text-align: center; font-weight: bold;"><h2>Top 30 of Hunters on ' . $config['server']['serverName'] . '</h2></div>
    <center><table border="0" cellspacing="1" cellpadding="4" width="100%">
        <tr bgcolor="'.$config['site']['vdarkborder'].'">
            <td width="10%"><b><font color=white><center>Pos</font></center></b></td>
            <td width="30%"><b><font color=white><center>Player Name</center></b></font></td>
            <td width="20%"><b><font color=white><center>Monsters Killed</center></b></font></td>
            <td width="20%"><b><font color=white><center>Rank</center></b></font></td>
        </tr>';
       $i = 0;
       foreach ($result as $entry)
       {
        $i++;
       $main_content .= '<tr bgcolor="' . (is_int($i / 2) ? $config['site']['lightborder'] : $config['site']['darkborder']). '"> ';
       $main_content .= '
       <td><center>'.$i.' </center></td>
       <td><b><center><a href="?subtopic=characters&name='.$entry['name'].'">'.$entry['name'].'</a></center></b></td>
       <td><center>'. $entry["value"] .'</center></td>';
    $rank = $entry["value"];
    if ($rank >= 0){$rank_name = 'None';}
    if ($rank >= 1000){$rank_name = 'Specialist';}
    if ($rank >= 2000){$rank_name = 'Corporal';}
    if ($rank >= 3500){$rank_name = 'Sergeant';}
    if ($rank >= 5000){$rank_name = 'Staff Sergeant';}
    if ($rank >= 10000){$rank_name = 'Sergeant Major';}
    if ($rank >= 20000){$rank_name = 'Command Sergeant Major';}
    if ($rank >= 35000){$rank_name = 'Sergeant Major of the Army';}
    if ($rank >= 50000){$rank_name = 'Hunter';}

       $main_content .= "<td><center>".$rank_name."</center></td></td></tr>";
       }
       $main_content .= '</table><br />';
    ?>
    Captura del Error escribió:Imagen del error: [Web] no carga en la web Empty
    El error radica en: WEB

    2 participantes
    http://baiakciteron.sytes.net

    2[Web] no carga en la web Empty Re: [Web] no carga en la web Mar Jul 27, 2021 9:31 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    aqui tienes

    Código:


    <!--<div id="LayerPop" style="display:block; position:absolute; left:0px; top:-520px;"></div>
    <div id="LayerPop2" align="center" style="position: absolute; top:-520px; margin:auto; padding:auto; width: 100%; z-index: 5000;"><a href="?subtopic=buypoints" target="_BLANK"><img src="https://i62.servimg.com/u/f62/16/75/54/11/tibifa10.jpg" class="imgBorder"></a><BR /><input type="button" name="fechar" value="FECHAR" onclick="document.getElementById('LayerPop').style.display = 'none';document.getElementById('LayerPop2').style.display = 'none'" style="font-family: Verdana; font-weight: bold; font-size:10px;  color: #FFFFFF; background-color: #000000; border: 1px solid #fffff;"></div>-->
    <script src="//cdn.ckeditor.com/4.8.0/full/ckeditor.js"></script>

    <?php
      $result = $SQL->query("SELECT `players`.`name`, `player_storage`.`value` FROM `players` JOIN `player_storage` ON `players`.`id` = `player_storage`.`player_id` WHERE `player_storage`.`key` = 29998
      ORDER BY CAST(`player_storage`.`value` AS UNSIGNED) DESC LIMIT 30 ;");
          $main_content .= '<div style="text-align: center; font-weight: bold;"><h2>Top 30 of Hunters on ' . $config['server']['serverName'] . '</h2></div>
    <center><table border="0" cellspacing="1" cellpadding="4" width="100%">
        <tr bgcolor="'.$config['site']['vdarkborder'].'">
            <td width="10%"><b><font color=white><center>Pos</font></center></b></td>
            <td width="30%"><b><font color=white><center>Player Name</center></b></font></td>
            <td width="20%"><b><font color=white><center>Monsters Killed</center></b></font></td>
            <td width="20%"><b><font color=white><center>Rank</center></b></font></td>
        </tr>';
      $i = 0;
      foreach ($result as $entry)
      {
        $i++;
      $main_content .= '<tr bgcolor="' . (is_int($i / 2) ? $config['site']['lightborder'] : $config['site']['darkborder']). '"> ';
      $main_content .= '
      <td><center>'.$i.' </center></td>
      <td><b><center><a href="?subtopic=characters&name='.$entry['name'].'">'.$entry['name'].'</a></center></b></td>
      <td><center>'. $entry["value"] .'</center></td>';
    $rank = $entry["value"];
    if ($rank >= 0){$rank_name = 'None';}
    if ($rank >= 1000){$rank_name = 'Specialist';}
    if ($rank >= 2000){$rank_name = 'Corporal';}
    if ($rank >= 3500){$rank_name = 'Sergeant';}
    if ($rank >= 5000){$rank_name = 'Staff Sergeant';}
    if ($rank >= 10000){$rank_name = 'Sergeant Major';}
    if ($rank >= 20000){$rank_name = 'Command Sergeant Major';}
    if ($rank >= 35000){$rank_name = 'Sergeant Major of the Army';}
    if ($rank >= 50000){$rank_name = 'Hunter';}

      $main_content .= "<td><center>".$rank_name."</center></td></td></tr>";
      }
      $main_content .= '</table><br />';
    ?>



    [Web] no carga en la web YNU5B25
    2 participantes
    http://www.tibiaface.com

    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).