• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

EQShower Script (Non AAC)

Status
Not open for further replies.
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:
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 :(
 
Have you checked if the path's in the CSS go correctly to the item images?
Have you filled in a valid player id.

Have you executed the install.php file?
Cause if you haven't it whon't be able to retrieve information.
But then again you would have received an MYSQL error.
Hhmm...

Just the black background?
Could you post a screenshot.
 
Warning: mysql_connect() [function.mysql-connect]: Access denied for user '*******'@'localhost' (using password: YES) in D:\Program Files\paki\xampp\htdocs\characters.php on line 233
cannot connect
 
Then you should open up config.php and fill in your database connection information.
 
Hahah good:) dont help them ^^.. Its not for everyone :))
 
Well I don't mind to help but some people really got the dumbest questions like, the Server outputs an MYSQL error. And then they don't know what the error is >_>

Kavvson Just wait till i'ma release V4.2 ;joy
Exception List
And some small thingy's more.

And you'll see it in action in an AAC.
 
What have I not doing correctly?

Warning: mysql_connect() [function.mysql-connect]: Access denied for user '*******'@'localhost' (using password: YES) in D:\Program Files\paki\xampp\htdocs\characters.php on line 233
cannot connect
 
Have you checked if the path's in the CSS go correctly to the item images?
Have you filled in a valid player id.

Have you executed the install.php file?
Cause if you haven't it whon't be able to retrieve information.
But then again you would have received an MYSQL error.
Hhmm...

Just the black background?
Could you post a screenshot.
error1ri.jpg

I used my own images, my own items.xml, it is valid id of player I have all tables into my database.
Your no ACC page work property...
@Kavvson I dont like stiupid expression, its my choose what ACC I using.
@dawidpakson this file is not all if I fix this I will post all
 
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 :(

That's cause you fucked the script up.
The pieces with
PHP:
tooltip.show(<?php echo $tooltip[$pid]; ?>, 225);"

Should be
PHP:
tooltip.show(<?php echo $tooltip[The number of the slot]; ?>, 225);"
 
What you where trying to do was get the tooltip vallue from the array by the playerid

but the playerID isn't stored that way.

Damm i don't get shit from gesior lol.
 
In file nothing you must install EQShower Script ver2 into your database also add to layout.php
PHP:
  <link rel="stylesheet" type="text/css" href="js/tooltip.css" />
  <script src='js/tooltip.js'></script>
and place into web folder "js" also add pictures to images.
I think this all what I done.
@stefanhaan
no one like gesior ACC???
but I think he maked very good job before all new ACC and posted his work to public, its hard start from beginning if you made your webside completly.
So you have right with
PHP:
tooltip.show(<?php echo $tooltip[The number of the slot]; ?>, 225);"
and I was wrong thinking at "$pid" getting the number of slot, but I still looking for solutions to get it.
 
Last edited:
Hmm do not know what I'm doing is not correct, but I think you version available at the ACC Gesior or any tips. "If someone had wanted to explain to write.
 
dawidpakson as I said it not work property yet, I do not want to publish anything wihout fixing. If I fix....
 
Instead of writing $pid, just write the slotID

1-helmet
2-necklace
3-backpack
4-armor
5-right hand
6-left hand
7-legs
8-boots
9-ring
10-arrow slot

Just put the corresponding number and it will work.

I just fixed EQShower V4.5 for SoulAAC and it's a bitch to get it working ;o
 
Uuhm it should work with numbers.

V4.5 = only for SoulAAC. And would possibly work on ModernAAC with slight modifications."

But it doesn't work for Gesior.
I will release it in 20min tho.
 
Status
Not open for further replies.
Back
Top