• TibiaFace

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

    .
    demo menumenu

    Afiliados



    Votar:

    Spells page en gesior 2012

    Compartir:

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

    1Resuelto Spells page en gesior 2012 Jue Mayo 18, 2017 10:39 pm

    Hokku

    Hokku
    Miembro
    Miembro
    Estoy intentando poner la web de spells en mi gesior 2012, uso forgotten server 1.1, tengo esta pagina de spells en mi web.
    spells.php:

    Este es el error que me aparece en la pagina de la web, si alguien puede hecharme un cable, gracias de antemano.

    Spells page en gesior 2012 14w848k

    2 participantes

    2Resuelto teste Vie Mayo 19, 2017 12:42 am

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    no te funciona por que te falta en tu base de datos esta tabla mysql

    Código:
    z_spells


    ejecuta esta tabla en tu phpadmin

    Código:
    CREATE TABLE IF NOT EXISTS `z_spells` (
      `name` varchar(255) NOT NULL,
      `spell` varchar(255) NOT NULL,
      `spell_type` varchar(255) NOT NULL,
      `mana` int(11) NOT NULL default '0',
      `lvl` int(11) NOT NULL default '0',
      `mlvl` int(11) NOT NULL default '0',
      `soul` int(11) NOT NULL default '0',
      `pacc` varchar(255) NOT NULL,
      `vocations` varchar(255) NOT NULL,
      `conj_count` int(11) NOT NULL default '0',
      `hide_spell` int(11) NOT NULL default '0'
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1;

    2 participantes
    http://www.tibiaface.com

    3Resuelto Re: Spells page en gesior 2012 Vie Mayo 19, 2017 12:12 pm

    Hokku

    Hokku
    Miembro
    Miembro
    maya hice la table y ya solo me sale error en la linea 20 del spells.php el de la 55 desaparecio

    2 participantes

    4Resuelto teste Vie Mayo 19, 2017 6:11 pm

    [Admin] God Maya

    [Admin] God Maya
    Administrador
    Administrador
    no compatible entonces con la tablas de base de datos


    mira remarke un archivo que hace una consulta al igual que cuando se intala la web bueno primero que nada

    tienes que a tu carpeta htdocs y crea una carpeta data y dentro un llamada spells y dentro pegar tu spells.xml ejemplo

    Código:
    htdocs\data\spells

    o

    Código:
    www\data\spells

    en tu web creas un submenu que se llame spells y creas un php spells.php y pegas esto dentro

    Código:
    <style type="text/css">
    td {
        color: white;
        height: 20px;
        color: #666;
    }
     
    </style>
    <?php
     

     
    $DIR = 'C:\xampp\htdocs\data\spells/';
       
    if(is_dir($DIR)) {
        $spells = simplexml_load_file($DIR.'spells.xml');
        $table_color_1 = '#FFF2db';
        $table_color_2 = '#FFF2db';
    ?>
    <h2>Spells </h2>
    <table style= border="0px" cellspacing="0px" cellpadding="4px" width="100%">
    <tr  bgcolor="#101010 ">
    <th style="color: #FF4500">Spell Name</th>
    <th style="color: #FF4500">Words</th>
    <th style="color: #FF4500">Mana Cost</th>
    <th style="color: #FF4500">Level Required</th>
    <th style="color: #FF4500">vocations</th>
    </tr>
     
     
    <?php
    $i = 1;
    foreach($spells as $spell) {
    $color = ($i % 2 ? $table_color_1 : $table_color_2);
    $i++;
     
        echo '
        <tr bgcolor="'.$color.'" id="spell_list">
            <td style="font-size: 10pt;">'.$spell['name'].'</td>
            <td style="font-size: 10pt;">'.$spell['words'].'</td>
            <td style="font-size: 10pt;">'.$spell['mana'].'</td>
            <td style="font-size: 10pt;">'.$spell['lvl'].'</td>
            <td style="font-size: 10pt;">'.$spell['vocations'].'</td>
        </tr>';
    }
    }
    else{alert('Error loading spells. Directory address must be correct.');}
    ?>
    </table>
     

    este archivo tiene una direccion que busca donde esta tu archivo :

    $DIR = 'C:\xampp\htdocs\data\spells/'; -------> eso te indica donde esta el archivo


    ejemlo para que te paresca el aprtado de de vocations tendras que editar cada una de tus spells colocandole la tag vocations. ejemplo:

    seplls normal

    <spells>
    <instant group="attack" spellid="62" name="Annihilation" words="exori gran ico" lvl="110" mana="300" prem="1" range="1" needtarget="1" needweapon="1" cooldown="30000" groupcooldown="4000" needlearn="0" script="attack/annihilation.lua">
    <vocation name="Knight" />
    <vocation name="Elite Knight" />
    </instant>

    spellls con el apartado vocations

    <spells>
    <instant group="attack" spellid="62" name="Annihilation" words="exori gran ico" lvl="110" mana="300" prem="1" range="1" needtarget="1" needweapon="1" cooldown="30000" groupcooldown="4000" needlearn="0" script="attack/annihilation.lua" vocations="knight y elite knight">
    <vocation name="Knight" />
    <vocation name="Elite Knight" />
    </instant>


    listo y con ellos se veran la spells

    2 participantes
    http://www.tibiaface.com

    5Resuelto Re: Spells page en gesior 2012 Vie Mayo 19, 2017 9:03 pm

    Hokku

    Hokku
    Miembro
    Miembro
    me funciona perfecto, muchisimas gracias maya, eres un grande!

    2 participantes

    Contenido patrocinado


    2 participantes

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