Ir para conteúdo
  • 0

[Resolvido] Visualização de quests


DrewMarques

Pergunta

Ola Galera tou precisando de uma ajudinha aki no meu mordem acc  minha aba de quest fica assim

Spoiler

Screenshot_17.png.66311e664c463aa07e5a99facc12b0cc.png

 

Eu queria Deixar assim

Spoiler

Screenshot_18.png.354c6feeffde7772747260cfaf72ffd3.png

 

alguem pode me ajudar?

 

Minha injections.php

 

Spoiler

<?php
if ( ! defined('BASEPATH')) exit('No direct script access allowed');

$characterPageQuests = array();
/* A list of quests for character/view page. It will be listed on the page as a table to show acomplished missions.
Array contains array of quests which includes STORAGE ID, STORAGE VALUE (Required to finish quest) and NAME 
To create new quest copy line accross and change values.*/


$player = $GLOBALS['player'];
/* Eg. $characterPageQuests[] = array('storage'=>5000, 'value'=>1, 'name'=>'Demon Helmet Quest'); */

$characterPageQuests[] = array('storage'=>31441546, 'value'=>1, 'name'=>'First');
$characterPageQuests[] = array('storage'=>2353462, 'value'=>1, 'name'=>'Dark');
$characterPageQuests[] = array('storage'=>2353463, 'value'=>1, 'name'=>'Earth');
$characterPageQuests[] = array('storage'=>32542354, 'value'=>1, 'name'=>'Punch');
$characterPageQuests[] = array('storage'=>2353464, 'value'=>1, 'name'=>'Rock');
$characterPageQuests[] = array('storage'=>2353465, 'value'=>1, 'name'=>'Venom');
$characterPageQuests[] = array('storage'=>20112015, 'value'=>1, 'name'=>'Crystal');
$characterPageQuests[] = array('storage'=>2353466, 'value'=>1, 'name'=>'Boost Ice');
$characterPageQuests[] = array('storage'=>2353468, 'value'=>1, 'name'=>'Boost Free');
$characterPageQuests[] = array('storage'=>2353467, 'value'=>1, 'name'=>'Boost hell');
$characterPageQuests[] = array('storage'=>20112016, 'value'=>1, 'name'=>'Celebi');
$characterPageQuests[] = array('storage'=>2436754423, 'value'=>1, 'name'=>'Halloween');
$characterPageQuests[] = array('storage'=>243654651, 'value'=>1, 'name'=>'Shedinja');
$characterPageQuests[] = array('storage'=>90030, 'value'=>1, 'name'=>'Burned');
$characterPageQuests[] = array('storage'=>88185428, 'value'=>1, 'name'=>'Unown');
$characterPageQuests[] = array('storage'=>243243, 'value'=>1, 'name'=>'Rayquaza');
$characterPageQuests[] = array('storage'=>978524350, 'value'=>1, 'name'=>'Ultra ball');
$characterPageQuests[] = array('storage'=>20112027, 'value'=>1, 'name'=>'Lugia');
$characterPageQuests[] = array('storage'=>20112020, 'value'=>1, 'name'=>'Dragons Den');
$characterPageQuests[] = array('storage'=>314143, 'value'=>1, 'name'=>'Milotic');
$characterPageQuests[] = array('storage'=>550982398, 'value'=>1, 'name'=>'Farol');
$characterPageQuests[] = array('storage'=>95148455, 'value'=>1, 'name'=>'Conquest');
$characterPageQuests[] = array('storage'=>181656, 'value'=>1, 'name'=>'Policial Jenny');
$characterPageQuests[] = array('storage'=>243654649, 'value'=>1, 'name'=>'Pesadelo');
$characterPageQuests[] = array('storage'=>314150, 'value'=>1, 'name'=>'Mysterious');
$characterPageQuests[] = array('storage'=>20112018, 'value'=>1, 'name'=>'Specilist');
$characterPageQuests[] = array('storage'=>44457427, 'value'=>1, 'name'=>'Remembrance');

 if(count($characterPageQuests) != 0) {
        echo "<div class='bar'>Quests</div>";
    
        echo "<table width='100%'>";
        echo "<tr><td width='90%'><center><b>Nome da Quest/status/level</b></center></td><td><b><center>Status</center></b></td></tr>";
        $SQL = POT::getInstance()->getDBHandle();
        foreach($characterPageQuests as $value) {
            $quest = $SQL->query("SELECT `value` FROM `player_storage` WHERE `player_id` = ".$player->getId()." AND `key` = '".$value['storage']."' AND `value` = '".$value['value']."'")->fetch();
            $status = ($quest) ? "true" : "false";
            echo "<tr><td width='90%'><center>".$value['name']."</center></td><td><center><img src='../../../public/images/$status.gif'></center></td></tr>";
        }
        echo "</table>";
    }
?>

 

alguem

Screenshot_17.png.66311e664c463aa07e5a99facc12b0cc.png

Screenshot_18.png.354c6feeffde7772747260cfaf72ffd3.png

Link para o comentário
Compartilhar em outros sites

8 respostass a esta questão

Posts Recomendados

  • 0
  • Administrador

Solução:

 

Abra o injections.php do caminho injections\character_view\quests

 

Substitua isso:

if(count($characterPageQuests) != 0) {        echo "<div class='bar'>Quests</div>";            echo "<table width='100%'>";        echo "<tr><td width='90%'><center><b>Nome da Quest/status/level</b></center></td><td><b><center>Status</center></b></td></tr>";        $SQL = POTgetInstance()->getDBHandle();        foreach($characterPageQuests as $value) {            $quest = $SQL->query("SELECT `value` FROM `player_storage` WHERE `player_id` = ".$player->getId()." AND `key` = '".$value['storage']."' AND `value` = '".$value['value']."'")->fetch();            $status = ($quest) ? "true" : "false";            echo "<tr><td width='90%'><center>".$value['name']."</center></td><td><center><img src='../../../public/images/$status.gif'></center></td></tr>";        }        echo "</table>";    }

Por isso:

if(count($characterPageQuests) != 0) {	 echo "<div class='bar'>Quests</div><br>";		echo "<div width='100%' class='quest_viwer'>";		//echo "<tr><td width='90%'><b>Nome da Quest</b></td><td><b>Status</b></td></tr>";		$SQL = POTgetInstance()->getDBHandle();		foreach($characterPageQuests as $value) {			$quest = $SQL->query("SELECT `value` FROM `player_storage` WHERE `player_id` = ".$player->getId()." AND `key` = '".$value['storage']."' AND `value` = '".$value['value']."'")->fetch();			$status = ($quest) ? "true" : "false";			echo "<div class='quest $status'><center><img width='20%' src='../../../public/images/$status.gif'><br>".$value['name']."</center></div>";		}		echo "</div>";	}

 

Feito isso, adicione o código abaixo no final do arquivo system.css na pasta public\css:

.quest_viwer > .quest {	width: 75px;	height: 50px;	padding: 10px;	display: inline-block;}.quest.true {	color: rgb(0, 128, 0);}.quest.false {	color: rgb(255, 0, 0);}

 

Pronto a visualização ficará da forma como na imagem abaixo

 

Screenshot_18.png.354c6feeffde7772747260cfaf72ffd3.png

Link para o comentário
Compartilhar em outros sites

  • 0
  • Administrador

A questão neste tópico de suporte foi respondida e/ou o autor do tópico resolveu o problema. Este tópico está fechado e foi movido para Suporte - Resolvidos. Se você tiver outras dúvidas, crie um novo tópico.
Link para o comentário
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...