• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    [Sistema] CASTLE 24HRS + AVISO GUILD DOMINATE PARA SU SITIO

    Compartir:

    Ir a la página : Precedente  1, 2

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

    JeisonG-vnzla

    JeisonG-vnzla
    Miembro
    Miembro
    [Tienes que estar registrado y conectado para ver este vínculo]

    mira como se ve el script y sigue el mismo error

    +8
    JeisonG-vnzla
    yakaaz
    Dzidek
    godfrosty
    TheFlariuz
    Jazet96
    [Admin] God Maya
    Sotomayor
    12 participantes

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    JeisonG-vnzla escribió:[Tienes que estar registrado y conectado para ver este vínculo]

    mira como se ve el script y sigue el mismo error

    agrega esto a tu layout.php
    Código:

    <?php
    $castle = $SQL->query('SELECT c.id AS id, g.logo_gfx_name AS `logo`, g.name AS guildname, c.guild_id AS guild_id
          FROM castelo_guerra AS c
      INNER JOIN guilds AS g
          ON g.id = c.guild_id
      ORDER BY id DESC LIMIT 10;');
    ?>

    <style type="text/css" media="all">

     
      #warcastle {
        text-decoration: none;
         text-align: center;
        cursor: auto;
        top: 50px;
        left:20px;
      }
    </style>

    <br>
      <div id="warcastle" style="margin-top:35px; height:215px; width:165px; margin-left: 23px;  background-image:url(./layouts/tibiarl/images/themeboxes/warcastle.png);">
      <br>
      <?php
        $b = 1;
        foreach($castle as $guild) {
          echo '<div style="float:center;margin:auto"><br><br><br><br>
          <a href="?subtopic=guilds&action=show&guild='.$guild['guild_id'].'" style="background: transparent url(layouts/tibiarl/images/menu/fire.gif);font-size:14px;text-shadow: 0.1em 0.1em #333" class="topfont">
          <img class="img" src="guild_image.php?id='.$guild['guild_id'].'" width=64 height=64><br>
          '.$guild['guildname'].'
          </a>
          </div>';
          $b++;
        }
        ?>
    </div>   <br>



    [Sistema] CASTLE 24HRS + AVISO GUILD DOMINATE PARA SU SITIO - Página 2 YNU5B25
    +8
    JeisonG-vnzla
    yakaaz
    Dzidek
    godfrosty
    TheFlariuz
    Jazet96
    [Admin] God Maya
    Sotomayor
    12 participantes
    http://www.tibiaface.com

    lsenturion

    lsenturion
    Miembro
    Miembro
    El mapa no aparece, en donde lo encuentro?

    +8
    JeisonG-vnzla
    yakaaz
    Dzidek
    godfrosty
    TheFlariuz
    Jazet96
    [Admin] God Maya
    Sotomayor
    12 participantes
    http://krudaserver.com

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    lsenturion escribió:El mapa no aparece, en donde lo encuentro?

    buscalo con el minimap



    [Sistema] CASTLE 24HRS + AVISO GUILD DOMINATE PARA SU SITIO - Página 2 YNU5B25
    +8
    JeisonG-vnzla
    yakaaz
    Dzidek
    godfrosty
    TheFlariuz
    Jazet96
    [Admin] God Maya
    Sotomayor
    12 participantes
    http://www.tibiaface.com

    ioke

    ioke
    Miembro
    Miembro
    Como hago para que la imagen del la guild no siempre sea la default esque siempre me sale por defecto el logo default y quiero mesalga laimagen que suben los lideresd e las guilds.


    Código:
    <?php
    $consulta = $SQL->query('SELECT `guild` FROM `castelo_guerra` ORDER BY `id` ASC;');
    $number_of_rows = 0;

    foreach($consulta as $guildid){
    $id = $guildid['guild'];
    }
    $consulta2 = $SQL->query('SELECT `name`, `logo_gfx_name` FROM `guilds` WHERE id = '.$id.';');
    ?>
    <style type="text/css" media="all">
    a.castlefont {
    font-family: Verdana, Arial, Helvetica;
    font-size: 13px;
    color: #ffcc33;
    text-shadow:#000 1px -1px 2px, #000 -1px 1px 2px, #000 1px 1px 2px, #000 -1px -1px 2px;
    text-decoration:none
    }
    a:castle.topfont {
    font-family: Verdana, Arial, Helvetica;
    font-size: 10px;
    color: #CCC;
    text-decoration:none
    }
    </style>
    <div id="warcastle" style="margin-top:20px; height:143px; width:180px; background-image:url(<?PHP echo $layout_name; ?>/images/themeboxes/warcastle.gif);">
    </br>
    </br>
    </br>
    <?php
    foreach($consulta2 as $guild){
    echo '
    <div align="center">
    <a class="castlefont" href="?subtopic=guilds&action=show&guild=' . $id . '">

    <img src="images/' . ((!empty($guild['logo_gfx_name']) && file_exists('images/' . $guild['logo_gfx_name'])) ? $guild['logo_gfx_name'] : 'default_guild_logo.gif') . '" width="64" height="64" border="0"/>
    <br/>
    <div id="textcastle" style="margin-top:3px;">' . $guild['name'] . '</br></div>
    </a>
    </div>
    </td>
    </tr>
    </table>
    ';
    }
    ?>

    </div>

    +8
    JeisonG-vnzla
    yakaaz
    Dzidek
    godfrosty
    TheFlariuz
    Jazet96
    [Admin] God Maya
    Sotomayor
    12 participantes
    http://baiakciteron.sytes.net

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    verifica si en tu base de datos

    $consulta2 = $SQL->query('SELECT `name`, `logo_gfx_name` FROM `guilds` WHERE id = '.$id.';');


    logo_gfx_name ----asi se llama la tabla de tu guild la que guarda elnombr de la imagen



    [Sistema] CASTLE 24HRS + AVISO GUILD DOMINATE PARA SU SITIO - Página 2 YNU5B25
    +8
    JeisonG-vnzla
    yakaaz
    Dzidek
    godfrosty
    TheFlariuz
    Jazet96
    [Admin] God Maya
    Sotomayor
    12 participantes
    http://www.tibiaface.com

    ioke

    ioke
    Miembro
    Miembro
    [Sistema] CASTLE 24HRS + AVISO GUILD DOMINATE PARA SU SITIO - Página 2 Sin_tz12




    esa tabla ya la habia visto aprece estar vacia, he probado de remplazar todos los logo_gfx_name del script por el guild_logo que sale en mi db que ahi se ve que se alojan las imagenes pero igual no funciona sigue saliendo al imagen default a ver si puedes ayudarme gracias



    Ya lo repare probando muchas maneras y lo conseguí.

    Cambie esto

    Código:
    $consulta2 = $SQL->query('SELECT `name`, `logo_gfx_name` FROM `guilds` WHERE id = '.$id.';');

    Por esto

    Código:
     $consulta2 = $SQL->query('SELECT `name`, `id` FROM `guilds` WHERE id = '.$id.';');

    Y esto

    Código:
    <img src="images/' . ((!empty($guild['logo_gfx_name']) && file_exists('images/' . $guild['logo_gfx_name'])) ? $guild['logo_gfx_name'] : 'default_guild_logo.gif') . '" width="64" height="64" border="0"/>

    Por esto

    Código:
    <img src="guild_image.php?id=' . $guild['id'] . '" width="64" height="64" border="0"/>

    Pongo mi solución por si alguien le sirve tambien.

    +8
    JeisonG-vnzla
    yakaaz
    Dzidek
    godfrosty
    TheFlariuz
    Jazet96
    [Admin] God Maya
    Sotomayor
    12 participantes
    http://baiakciteron.sytes.net

    Morfar

    Morfar
    Miembro
    Miembro
    ioke escribió:[Sistema] CASTLE 24HRS + AVISO GUILD DOMINATE PARA SU SITIO - Página 2 Sin_tz12




    esa tabla ya la habia visto aprece estar vacia, he probado de remplazar todos los logo_gfx_name del script por el guild_logo que sale en mi db que ahi se ve que se alojan las imagenes pero igual no funciona sigue saliendo al imagen default a ver si puedes ayudarme gracias



    Ya lo repare probando muchas maneras y lo conseguí.

    Cambie esto

    Código:
    $consulta2 = $SQL->query('SELECT `name`, `logo_gfx_name` FROM `guilds` WHERE id = '.$id.';');

    Por esto

    Código:
     $consulta2 = $SQL->query('SELECT `name`, `id` FROM `guilds` WHERE id = '.$id.';');

    Y esto

    Código:
    <img src="images/' . ((!empty($guild['logo_gfx_name']) && file_exists('images/' . $guild['logo_gfx_name'])) ? $guild['logo_gfx_name'] : 'default_guild_logo.gif') . '" width="64" height="64" border="0"/>

    Por esto

    Código:
    <img src="guild_image.php?id=' . $guild['id'] . '" width="64" height="64" border="0"/>

    Pongo mi solución por si alguien le sirve tambien.

    Pero cada que dominan el castillo si se te actualiza automaticamente en la web amigo?

    +8
    JeisonG-vnzla
    yakaaz
    Dzidek
    godfrosty
    TheFlariuz
    Jazet96
    [Admin] God Maya
    Sotomayor
    12 participantes

    ioke

    ioke
    Miembro
    Miembro
    Como hago para poner un storage a la guild que conquiste el castillo? esque tengo un NPC que quiero que solo lo usen los de la guild que conquisten el castillo.

    Código:
    function onStepIn(cid, item, pos, fromPosition)
    local pos = getThingPos(cid)
     
    if item.actionid == 16203 then
        if not isPlayer(cid) then
            return true
        end
        if (getPlayerGuildId(cid) == guildVencedora()) then
            doSendMagicEffect(getThingPos(cid), 14)
            doSendAnimatedText(pos, "Welcome", math.random(1, 255))
        else
            doSendMagicEffect(getThingPos(cid), 2)
            doTeleportThing(cid, fromPosition, false)
            doPlayerSendCancel(cid, "[Castle Siege] You do not belong to the dominant guild.")
        end
      return true
     end

    if item.actionid == 16202 then
        if not isPlayer(cid) then
          return true
        end

        if getPlayerGuildId(cid) > 0 then
            if (getPlayerGuildId(cid) == guildVencedora()) then
                doPlayerSendCancel(cid, "[Castle Siege] Your guild is already dominating.")       
                return false
            end

        if (getPlayerGuildId(cid) ~= guildVencedora()) and (getPlayerLevel(cid) >= 100) then
            doPlayerSendTextMessage(cid, 20, "[Castle Siege] You and your guild are in charge, the former owners can take revenge!")
            setGlobalStorageValue(COH_PREPARE1, -1)
            setGlobalStorageValue(COH_PREPARE2, -1)
            db.query("INSERT INTO `castelo_guerra` (`guild`) VALUES (" .. getPlayerGuildId(cid) .. ");")
    doRemoveItem(getTileItemById({x = 32351, y = 32241, z = 7},1387).uid)

            doCastleRemoveEnemies()
            doBroadcastMessage("[Castle Siege] The player ["..getCreatureName(cid).."] and your guild ["..getPlayerGuildName(cid).."] are in charge of the castle, go dominate and stop it!")
        end
        else
            doSendMagicEffect(pos, 2) 
            doTeleportThing(cid, fromPosition, false)
            doPlayerSendCancel(cid, "[Castle Siege] You don't have a guild.")
        end
    return true
     end

    if item.actionid == 16200 then
      if not isPlayer(cid) then
          return true
      end
      if getPlayerGuildId(cid) > 0 then
        doSendAnimatedText(pos, "C.Siege", math.random(1, 255))
        if (getPlayerGuildId(cid) == guildVencedora()) and (getGlobalStorageValue(COH_PREPARE1) ~= getPlayerGuildName(cid)) and ((getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid))) then
            setGlobalStorageValue(COH_PREPARE1, getPlayerGuildName(cid))
            doBroadcastMessage("[Castle Siege] Heads up! The guild "..getPlayerGuildName(cid).." is trying to dominate the castle, get ready!")
        end
        else
            doSendMagicEffect(pos, 2) 
            doTeleportThing(cid, fromPosition, false)
            doPlayerSendCancel(cid, "[Castle Siege] You don't have a guild.") 
        return true
        end 
    end
     
    if item.actionid == 16201 then
        if not isPlayer(cid) then
            return true
        end
        doSendAnimatedText(pos, "C.Siege", math.random(1, 255))
        if (getPlayerGuildId(cid) == guildVencedora()) and (getGlobalStorageValue(COH_PREPARE2) ~= getPlayerGuildName(cid)) then
            setGlobalStorageValue(COH_PREPARE2, getPlayerGuildName(cid))
            doBroadcastMessage("[Castle Siege] Heads up! The guild "..getPlayerGuildName(cid).." is very close to the domain, attack!")
        end
        end
        return true
    end

    +8
    JeisonG-vnzla
    yakaaz
    Dzidek
    godfrosty
    TheFlariuz
    Jazet96
    [Admin] God Maya
    Sotomayor
    12 participantes
    http://baiakciteron.sytes.net

    35[Sistema] CASTLE 24HRS + AVISO GUILD DOMINATE PARA SU SITIO - Página 2 Empty Erro distro Miér Ene 03, 2024 9:12 am

    botcell

    botcell
    Nuevo Miembro
    Nuevo Miembro
    Estou com esse erro

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

    +8
    JeisonG-vnzla
    yakaaz
    Dzidek
    godfrosty
    TheFlariuz
    Jazet96
    [Admin] God Maya
    Sotomayor
    12 participantes

    Contenido patrocinado


    +8
    JeisonG-vnzla
    yakaaz
    Dzidek
    godfrosty
    TheFlariuz
    Jazet96
    [Admin] God Maya
    Sotomayor
    12 participantes

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

    Ir a la página : Precedente  1, 2

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