TomCrusher
Jeg er ingenting
Gesior ACC
I tried to add it to creatures.php but statistics shows only the black box, can someone explain me what I did wrong here is the file:
ofc I added needed JS files and all to layout.php but not work property
I tried to add it to creatures.php but statistics shows only the black box, can someone explain me what I did wrong here is the file:
PHP:
//-- start of status items..
mysql_connect("localhost", "******", "*******")or die("cannot connect");
$id = $player->getCustomField("id");
$query=mysql_query("SELECT * FROM `player_items` WHERE `player_id`='.$id.' AND `pid`<=10");
if($query){
while ($result=mysql_fetch_array($query))
{
$item[$result['pid']]['img']="<img src='items/".$result['itemtype'].".gif' />";
$item[$result['pid']]['id']=$result['itemtype'];
$class[$result['pid']]="a0-".$result['pid'];
}
$EQShower=new EQShower;
for($i=1;$i<=10;$i++)
{
$num_attr=0;
unset($val);$val=array();
$query=mysql_query("SELECT * FROM `s_items` INNER JOIN `s_attributes` ON s_items.id=s_attributes.item_id WHERE s_items.itemid=".$item[$i]['id']);
if($query)$result=mysql_fetch_assoc($query);
$val[0]=ucfirst($result['name']);
$val[1]=$result['descr'];
$val[2]=$result['armor'];
$val[3]=$result['weight'];
$val[4]=$result['containerSize'];
$val[5]=$result['attack'];
$val[6]=$result['speed'];
$val[13]=$result['extraDef'];
$val[7]=$result['defense'];
$val[8]=$result['elementFire'];
$val[9]=$result['elementIce'];
$val[10]=$result['elementEarth'];
$val[11]=$result['elementEnergy'];
$val[12]=$result['range'];
$val[14]=$result['skillShield'];
$val[15]=$result['magicLevelPoints'];
$val[16]=$result['absorbPercentall'];
$val[17]=$result['charges'];
$val[18]=$result['skillDist'];
$val[19]=$result['absorbPercentFire'];
$val[20]=$result['absorbPercentEarth'];
$val[21]=$result['absorbPercentIce'];
$val[22]=$result['absorbPercentEnergy'];
$val[23]=$result['absorbPercentDeath'];
$val[24]=$result['absorbPercentHoly'];
$val[25]=$result['absorbPercentPhysical'];
$val[26]=$result['skillAxe'];
$val[27]=$result['skillClub'];
$val[28]=$result['skillSword'];
$val[29]=$result['duration'];
$val[30]=$result['skillFist'];
$val[31]=$result['absorbPercentManaDrain'];
$val[32]=$result['absorbPercentLifeDrain'];
$val[33]=$result['preventDrop'];
$val[34]=$result['hitChance'];
$val[35]=$result['shootType'];
foreach($val as $attribute)
{
if(!empty($attribute))$num_attr++;
}
$tooltip[$i]=$EQShower->item_info($val,$num_attr);
if(empty($item[$i])){
$class[$i]="a".$i;
$tooltip[$i]="<font class=\'attr\'>Empty item slot.</font>";
}
}
}
$main_content .= '<table width=100%><tr><td align=center WIDTH=20>';
$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="images/items/'.$list[$pid].'.gif"; onmouseover="tooltip.show(<?php echo $tooltip[$pid]; ?>, 225);"onmouseout="tooltip.hide();"/></TD></tr><tr>'; }
else { $main_content .= '<TD style="background-color: '.$config['site']['darkborder'].'; text-align: center;"><img src="images/items/'.$list[$pid].'.gif"; onmouseover="tooltip.show(<?php echo $tooltip[$pid]; ?>, 225);"onmouseout="tooltip.hide();"/></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"; onmouseover="tooltip.show(<?php echo $tooltip[$pid]; ?>, 225);"onmouseout="tooltip.hide();"/></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"; onmouseover="tooltip.show(<?php echo $tooltip[$pid]; ?>, 225);"onmouseout="tooltip.hide();"/></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 .= '</TABLE></td>';
ofc I added needed JS files and all to layout.php but not work property