Ir para conteúdo

Featured Replies

  • Respostas 16
  • Visualizações 711
  • Created
  • Última resposta

Top Posters In This Topic

Postado

Teria que ver os logs para entender, mas oq vc precisa é +- aquilo

Toda terça-feira um tópico novo:

Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/

Peça sua spell (Suporte):                https://tibiaking.com/forums/topic/84162-peça-sua-spell/                        

Chuva de flechas (Spell):                https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/

Doom (Spell):                                https://tibiaking.com/forums/topic/51622-doom-spell/

Utilização do VS Code (Infra)       https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/

SD com Combo (Spell):                 https://tibiaking.com/forums/topic/94520-sd-modificada/

Alteração attack speed (C++):        https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/  

Bônus de Speed (NPC)                  https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
 

Postado
  • Autor

@jakons Vale ressaltar que é modern acc ta.

 

provalmente o erro ta aqui

 

$playerVoc = getVocationName($player->getVocation(), $player->getPromotion())

eu tiro ^e volta o site.

 

estou usando assim.

Spoiler

<?php
require_once("system/application/config/create_character.php"); 
    if(in_array(strtolower($player->name), $config['restricted_names']))
        error("You are not authorized to view this character.");
    else {
    if($player->isDeleted()) alert("This character has been deleted.");
    if($player->isNameLocked()) alert("This character has been name locked.");

    try {$comment = nl2br(decodeString(strip_tags($player->getComment())));}catch (Exception $e) {$comment = "Could not load comment.";}
    $nickname = ($account->getCustomField('nickname') == "") ? "Not set yet." : $account->getCustomField('nickname');
    try { $created = $player->getCreated(); } catch (Exception $e) { $created = time()-36000;}
    $playerVoc = getVocationName($player->getVocation(), $player->getPromotion())

?>
<!-- PROFILE MARKUP HERE-->
        
        <div id="visual-info-personagens" style="text-align: center;">
        </div>
        
        <table class="tableDetail" cellspacing="0">
    <br />
    <br />
    
    <!-- Player vocation -->
    <img src=".WEBSITE.'/public/vocations/<?php echo getVocationName($player->getVocation(), $player->getPromotion()); ?>.jpg">


        <tr><td width='40%'><center>Personagem:</center></td><td><?php echo getVocationName($player->getVocation(), $player->getPromotion()); ?></td></tr>
                

            <tr><td width='40%'><center>Nome</center></td><td><?php echo $player->getName();?></td></tr>
        
        <!-- Player level -->
        <tr><td width='40%'><center>Level:</center></td><td><?php echo $player->getLevel(); ?></td></tr>
            
        <!-- Player Status -->
        <tr><td width='40%'><center>Account:</center></td><td><?php echo $status = ($account->isPremium()) ? "Premium" : "Free"; ?></td></tr>
                
        <!-- Player guild -->
        <?php 
        
        
        $rank_of_player = $player->getRank();
        if(!empty($rank_of_player)) {
            $guild_id = $rank_of_player->getGuild()->getId();
            $guild_name = $rank_of_player->getGuild()->getName();
            echo "<tr><td width='40%'><center>Guild:</center></td><td>".$rank_of_player->getName()." of the <a href='../../guilds/view/$guild_id'>".$guild_name."</a></td></tr>";
        }
        ?>


        <tr><td width='40%'><center>Last Login: </center></td><td><?php echo $lastlogin = ($player->getLastLogin() == 0) ? "Never" : UNIX_TimeStamp($player->getLastLogin()); ?></td></tr> 
                
                <!-- Display player status -->
                <tr><td width='40%'><center>Status:</center></td><td> <?php echo $status = ($player->isOnline()) ? "<font color='green'>Online</font>" : "<font color='red'>Offline</font>"; ?></td>
                <!-- Display player status end -->
                <!-- Player skill -->


    
            
            
            </center>


  <?php
    list($health, $maxHealth, $mana, $maxMana) = array(
        $player->getHealth(),
        $player->getHealthMax(),
        $player->getMana(),
        $player->getManaMax()
    );
 
    $healthPercent = (int)(($health / $maxHealth) * 50);
    $manaPercent   = (int)(($mana / $maxMana) * 50);
?>
    <tr>
       <tr><td width='40%'><center>Player Health </td>
        <td bgcolor="">
            <?php echo $health, '/', $maxHealth;?>
            <div style="background:red; width:<?php echo $healthPercent, '%';?>; height:5px;border: 1px ;"></div>
        </td>
    </tr>
    
        
    
    <tr>
          <tr><td width='40%'><center>Player Mana </td>
        <td bgcolor="">
            <?php echo $mana, '/', $maxMana;?>
            <div style="background: blue; width:<?php echo $manaPercent, '%';?>; height:5px;border: 1px ;"></div>
     </td>
    </tr>
    
 
</div>

    </tr> 
                        </table>
                        </center>
                    </td>
                </tr>    

                
                </table>
                <div id="visual-info-personagens-Bot" style="text-align: center;">
                </div>
    
 
 
                
    <?php 
    $GLOBALS['player'] = $player;
    $ide = new IDE;
    try {
        $ide->loadInjections("character_view");
    }
        catch(Exception $e) {
            error($e->getMessage());
        }
    
}
?>

 

 

 

 

 

 

Na imagem devo colocar id, ou nome da vocation?

@Reds Pronto foi agr  não aparece a a imagem.

 

to usando assim . 

Spoiler

        <tr><td width='40%'><center> <img src="/public/vocations/<?php echo getVocationName($player->getVocation(), $player->getPromotion()); ?>.jpg">

 

Alguém ai pode me ajudar? consegui fazer aparecer a foto do jogador, porém aparece só uma que ta com id 1. as outras 2 3 4 5 não aparecem.

 

Dai quero que apereça a footo de cada vocação ja ta configurada os id na pasta .

só falta o codigo achar elas.

 

coloquei esse codigo; 

Spoiler

<?php    echo '<a href="'.WEBSITE.'/index.php/character/view/' . $vocation['id'] . '"><img src="'.WEBSITE.'/public/vocations/'. $i = $i + 1 .'.png" width="90" height="90" border="0"/>'; ?> 
 

 

Postado

Concatena certo no href pra pegar a vocação:

/' . $vocation['id'] .

Toda terça-feira um tópico novo:

Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/

Peça sua spell (Suporte):                https://tibiaking.com/forums/topic/84162-peça-sua-spell/                        

Chuva de flechas (Spell):                https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/

Doom (Spell):                                https://tibiaking.com/forums/topic/51622-doom-spell/

Utilização do VS Code (Infra)       https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/

SD com Combo (Spell):                 https://tibiaking.com/forums/topic/94520-sd-modificada/

Alteração attack speed (C++):        https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/  

Bônus de Speed (NPC)                  https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.7k

Informação Importante

Confirmação de Termo