[Gesior AAC] Equipment Shower + Quest + Hp/Exp Status v3

Norix

Hosting Service !
Joined
Jan 18, 2008
Messages
544
Best answers
0
Reaction score
7
Location
Germany
I updated the Script to version 3. Now there are all my scripts in one, so Quest Status, Equipment Shower and Hp/Mana/Exp Status.
Hope you like it. Just replace this in characters php on ~line 79.

PHP:
			//modified status scripts by ballack13
			$main_content .= '<table width=100%><tr>';
                        //equipment shower by ballack13
			$id = $player->getCustomField("id");
			$number_of_items = 1;
			$main_content .= '<td align=center><table with=100% style="border: solid 1px #888888;" CELLSPACING="1"><TR>';		
                        $list = array('2','1','3','6','4','5','9','7','10','8'); 
                        foreach ($list as $pid => $name) {
                        $top = $SQL->query('SELECT * FROM player_items WHERE player_id = '.$id.' AND pid = '.$list[$pid].';')->fetch();
                           if($top[itemtype] == false) {
                           if($list[$pid] == '8') {
			$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>';
			}
				if(is_int($number_of_items / 3)){
			$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="http://otland.net/images/items/'.$list[$pid].'.gif"/></TD></tr><tr>';
				} else {
			$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="http://otland.net/images/items/'.$list[$pid].'.gif"/></TD>';
			}
				$number_of_items++;
			}
			else
			{
                           if($list[$pid] == '8') {
			$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>';
			}
				if(is_int($number_of_items / 3))
			$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="http://otland.net/images/items/'.$top[itemtype].'.gif" width="45"/></TD></tr><tr>';
				else
			$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="http://otland.net/images/items/'.$top[itemtype].'.gif" width="45"/></TD>';
				$number_of_items++;
			}
                           if($list[$pid] == '8') {
			$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Cap:<br/>'.$player->getCap().'</td>';
			}
			}
			$main_content .= '</tr></TABLE></td>';

                  //Hp/Mana/Exp Status by ballack13
                        $hp = ($player->getHealth() / $player->getHealthMax() * 100);
                        $mana = ($player->getMana() / $player->getManaMax() * 100);
          		$main_content .= '<td align=center ><table width=100%><tr><td align=center><table CELLSPACING="1" CELLPADDING="4"><tr><td BGCOLOR="#D4C0A1" align="left" width="20%"><b>Player Health:</b></td>
                  		          <td BGCOLOR="#D4C0A1" align="left">'.$player->getHealth().'/'.$player->getHealthMax().'<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.$hp.'%; height: 3px;"></td></tr>
                  		          <tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Mana:</b></td><td BGCOLOR="#F1E0C6" align="left">'.$player->getMana().'/'.$player->getManaMax().'<div style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: blue; width: '.$mana.'%; height: 3px;"></td></tr></table><tr>';

                        $next = ($player->getLevel() + 1);
                        $exp = ((50 / 3) * ($player->getLevel() * $player->getLevel() * $player->getLevel()) - (100 * ($player->getLevel() * $player->getLevel())) + ((850/3) * $player->getLevel()) - 200);
                        $expnext = ((50 / 3) * ($next * $next * $next) - (100 * ($next * $next)) + ((850/3) * $next) - 200 - $player->getExperience());
                        $expresult = (100 - ($expnext / (($expnext  + $player->getExperience()) - $exp) * 100));
           	        $main_content .= '<tr><table CELLSPACING="1" CELLPADDING="4"><tr><td BGCOLOR="#D4C0A1" align="left" width="20%"><b>Player Level:</b></td><td BGCOLOR="#D4C0A1" align="left">'.$player->getLevel().'</td></tr>
                        		  <tr><td BGCOLOR="#F1E0C6" align="left"><b>Player Experience:</b></td><td BGCOLOR="#F1E0C6" align="left">'.$player->getExperience().' EXP.</td></tr>
                		          <tr><td BGCOLOR="#D4C0A1" align="left"><b>To Next Level:</b></td><td BGCOLOR="#D4C0A1" align="left">You need <b>'.$expnext.' EXP</b> to Level <b>'.$next.'</b>.<div title="99.320604545 %" style="width: 100%; height: 3px; border: 1px solid #000;"><div style="background: red; width: '.$expresult.'%; height: 3px;"></td></tr></table></td></tr></table></tr></TABLE></td>';

			//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>';
Screen:


Please rep++ !!

Your's Norix
 

Attachments

Last edited:

vDk

Member
Joined
Jul 22, 2007
Messages
795
Best answers
0
Reaction score
14
Location
Poland, Kraków
Sorry for 2 post but i can't edit
Can you make default image when player don't have equip items?

Look:


//sry for my english o.o
 

Xampy

PHP | SQL | LUA | C++
Joined
Jun 22, 2008
Messages
1,104
Best answers
0
Reaction score
16
Location
Barcelona (Spain)
@up:
Use this:

PHP:
            $main_content .= '<table width=100%><tr><td align=center WIDTH=20>';
            $id = $player->getCustomField("id");

            $main_content .= '<table width=100% style="border: solid 1px #888888;" CELLSPACING="1"><TR>';        
                        $list = array('2','1','3'); 
                        foreach ($list as $pid => $name) {
                        $top = $SQL->query('SELECT * FROM player_items WHERE player_id = '.$id.' AND pid = '.$list[$pid].';')->fetch();
                           if($top[itemtype] == false) {
            $main_content .= '<TD width=21% style="background-color: '.$config['site']['darkborder'].'"><img src="images/items/blank.gif"/></TD>';
            }
            else
            {
            $main_content .= '<TD width=50% style="background-color: '.$config['site']['darkborder'].'"><img src="images/items/'.$top[itemtype].'.gif"/></TD>';
            }
            }
            $main_content .= '</tr>';
                        $list = array('6','4','5'); 
                        foreach ($list as $pid => $name) {
                        $top = $SQL->query('SELECT * FROM player_items WHERE player_id = '.$id.' AND pid = '.$list[$pid].';')->fetch();
                           if($top[itemtype] == false) {
            $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'"><img src="images/items/blank.gif"/></TD>';
            }
            else
            {
            $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'"><img src="images/items/'.$top[itemtype].'.gif"/></TD>';
            }
            }
            $main_content .= '</tr>';
                        $list = array('9','7','10'); 
                        foreach ($list as $pid => $name) {
                        $top = $SQL->query('SELECT * FROM player_items WHERE player_id = '.$id.' AND pid = '.$list[$pid].';')->fetch();
                           if($top[itemtype] == false) {
            $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'"><img src="images/items/blank.gif"/></TD>';
            }
            else
            {
            $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'"><img src="images/items/'.$top[itemtype].'.gif"/></TD>';
            }
            }
            $main_content .= '</tr>';
                        $top = $SQL->query('SELECT * FROM player_items WHERE player_id = '.$id.' AND pid = 8;')->fetch();
            $main_content .= '<tr><td style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><font size="1">Soul:<br/>'.$player->getSoul().'</font></td><td style="background-color: '.$config['site']['darkborder'].'"><img src="images/items/'.$top[itemtype].'.gif"/></td><td style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><font size="1">Cap:<br/>'.$player->getCap().'</font></td></tr>';
            
            $main_content .= '</TABLE></td>';

            $id = $player->getCustomField("id");
            $number_of_quests = 0;
            $main_content .= '<td align=center><br><TABLE BORDER=0 CELLSPACING=1 CELLPADDING=4 WIDTH=180%><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></td></tr></table>';
 

Pitufo™

InfinityOT.com
Joined
Feb 14, 2008
Messages
1,438
Best answers
0
Reaction score
7
Location
Mexico, Cuernavaca
easy... vexilla.net/items/ and then use Turtle or something like that and all files will be taken to your selected folder :D
 

Grehy

Killroy
Joined
Nov 21, 2008
Messages
2,628
Best answers
0
Reaction score
30
Location
United States
Sorry but I didn't see any explanation for it, but how do I get the images to show? I just have the broken links now, thanks!
 

Swij

Active Member
Joined
Mar 2, 2009
Messages
120
Best answers
0
Reaction score
28
Location
Sweden, Jönköping
@pitufo, could you release it and by the way. the legs are at the shoes position and the shoes are at the legs position
@Thread Awsome script and thanks for releasing
 
OP
Norix

Norix

Hosting Service !
Joined
Jan 18, 2008
Messages
544
Best answers
0
Reaction score
7
Location
Germany
Updated to version 2:
Compressed Script and made blank images for empty slots.

Code without quest status:
PHP:
                        //equipment shower by ballack13
			$id = $player->getCustomField("id");
			$number_of_items = 1;
			$main_content .= '<table with=100% style="border: solid 1px #888888;" CELLSPACING="1"><TR>';		
                        $list = array('2','1','3','6','4','5','9','7','10','8'); 
                        foreach ($list as $pid => $name) {
                        $top = $SQL->query('SELECT * FROM player_items WHERE player_id = '.$id.' AND pid = '.$list[$pid].';')->fetch();
                           if($top[itemtype] == false) {
                           if($list[$pid] == '8') {
			$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>';
			}
				if(is_int($number_of_items / 3)){
			$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD></tr><tr>';
				} else {
			$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD>';
			}
				$number_of_items++;
			}
			else
			{
                           if($list[$pid] == '8') {
			$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>';
			}
				if(is_int($number_of_items / 3))
			$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD></tr><tr>';
				else
			$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD>';
				$number_of_items++;
			}
                           if($list[$pid] == '8') {
			$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Cap:<br/>'.$player->getCap().'</td>';
			}
			}
			$main_content .= '</tr>';
			$main_content .= '</TABLE>';
Code with queststatus:
PHP:
			$main_content .= '<table width=100%><tr><td align=center width=25%>';
                        //equipment shower by ballack13
			$id = $player->getCustomField("id");
			$number_of_items = 1;
			$main_content .= '<table with=100% style="border: solid 1px #888888;" CELLSPACING="1"><TR>';		
                        $list = array('2','1','3','6','4','5','9','7','10','8'); 
                        foreach ($list as $pid => $name) {
                        $top = $SQL->query('SELECT * FROM player_items WHERE player_id = '.$id.' AND pid = '.$list[$pid].';')->fetch();
                           if($top[itemtype] == false) {
                           if($list[$pid] == '8') {
			$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>';
			}
				if(is_int($number_of_items / 3)){
			$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD></tr><tr>';
				} else {
			$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"/></TD>';
			}
				$number_of_items++;
			}
			else
			{
                           if($list[$pid] == '8') {
			$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'</td>';
			}
				if(is_int($number_of_items / 3))
			$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD></tr><tr>';
				else
			$main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$top[itemtype].'.gif" width="45"/></TD>';
				$number_of_items++;
			}
                           if($list[$pid] == '8') {
			$main_content .= '<td style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Cap:<br/>'.$player->getCap().'</td>';
			}
			}
			$main_content .= '</tr>';
			$main_content .= '</TABLE></td>';
			//quest status by ballack13
			$id = $player->getCustomField("id");
			$number_of_quests = 0;
			$main_content .= '<td align=center><br><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></td></tr></table>';
Screen:


Plans for v3: Exp Status, Health Status, ...

Plz rep++

Your's ballack13
 
Top