Ir para conteúdo
  • 0

Quests no Gesior


20cm

Pergunta

Olá, tenho esse script de ver quests no gesior: (characters.php)

			//quest status by ballack13
		$id = $player->getCustomField("id");
		$number_of_quests = 0;
		$main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD align="left" COLSPAN=2 CLASS=white><B>Quests</B></TD></TD align="right"></TD></TR>';		
					$quests = array('Annihilator' => 5000,'Demon Helmet' => 2645,'Pits of Inferno' => 5550,'Inquisition' => 6076,'Mountain Annihilator' => 8850,'Djinn Tower' => 9050,'Jugga Jungle Quest' => 8884,'Yalahari Quest' => 5429);
					foreach ($quests as $storage => $name) {
			if(is_int($number_of_quests / 2))
				$bgcolor = $config['site']['darkborder'];
			else
				$bgcolor = $config['site']['lightborder'];
			$number_of_quests++;
		$main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=95%>'.$storage.'</TD>';
					$quest = $SQL->query('SELECT * FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$quests[$storage].';')->fetch();
					   if($quest == false) {
		$main_content .= '<TD><img src="images/false.png"/></TD></TR>';
					}
		else
		{
		$main_content .= '<TD><img src="images/true.png"/></TD></TR>';
		}
		}
		$main_content .= '</TABLE>'; 

Bom, ele funciona mas ele funciona sem checar o valor da storage

Queria que ele só mostrasse o true.png caso a storage fosse x

Por exemplo:

 

 

$x = array('anihhilator','quest2')

 

$y = array(4256,3467)

 

$z = array(2,6)

 

 

 

Só soltava o true.png caso o storage 4256 fosse 2, e o storage 3467 fosse 6

Exemplo: se o player tivesse storage 4256 = 2 e a 3467 = 5 ficaria assim:

 

Annihilator: true.png

Quest2: false.png

 

Acho que deu pra entender

 

Esperando resposta, obrigado bjs fui

Editado por 20cm
Link para o comentário
Compartilhar em outros sites

7 respostass a esta questão

Posts Recomendados

  • 0

            //quest status by ballack13
           $id = $player->getCustomField("id");
           $number_of_quests = 0;
           $main_content .= '<TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=100%><TR BGCOLOR='.$config['site']['vdarkborder'].'><TD align="left" COLSPAN=2 CLASS=white><B>Quests</B></TD></TD align="right"></TD></TR>';                
           $quests = array('Quest I' => 4256,'Quest II' => 3467);
           $values = array(4256 => 2, 3467 => 6);
           foreach ($quests as $storage => $name) 
           {
               if(is_int($number_of_quests / 2))
                   $bgcolor = $config['site']['darkborder'];
               else
                   $bgcolor = $config['site']['lightborder'];

               $number_of_quests++;
               $main_content .= '<TR BGCOLOR="'.$bgcolor.'"><TD WIDTH=95%>'.$storage.'</TD>';
               $quest = $SQL->query('SELECT value FROM player_storage WHERE player_id = '.$id.' AND `key` = '.$quests[$storage].';')->fetch();


               if($quest["value"] < $values[$quests[$storage]]){
               $main_content .= '<TD><img src="images/false.png"/></TD></TR>';
                                   }
           else
           {
           $main_content .= '<TD><img src="images/true.png"/></TD></TR>';
           }
           }
           $main_content .= '</TABLE>';

 


           $quests = array('Quest I' => 4256,'Quest II' => 3467);
           $values = array(4256 => 2, 3467 => 6);

 

Mexe nesses dois arrays aí.

 

flw

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...