I decided to make a new thread from http://otland.net/f118/gesior-aac-equipment-shower-84027/ because it wasn't quite stable enough to use. SO from the help of Kavvson, TomCrusher, and stefanhaan I have edited and made a simple setup for the EQShower. Rep++ these guys! (and me, i need love too lol)
Image:
Founders Thread: http://otland.net/f118/soulaac-eqshower-v4-84005/
Setup:
1) Installing the Items:
1a) Make sure you move the equipshower folding into your htdocs.
1b) To install the items to the database you need to set the $db_name/$username/$password in the eqshower-config.php file, then go to http://localhost/equipshower/install/install.php (It will load the database and add all the items required).
Note: you might want to rename or remove the install file after successfully doing this, for security reasons
2) Edit characters.php:
Open your characters.php file and search for this:
2a) Next highlight the code from that point down until you reach:
2b) Now you can add this new code to replace it:
3) Edit config-and-functions.php:
add this code to your config-and-functions.php file (start or end, make sure its within <?PHP or ?>):
4) Edit layout.php:
add this code inside to your layout.php file:
make sure it is below the <head> section.
5) Edit config.php:
Add this code to config/config.php file (anywhere is fine):
6) Moving Files:
Move the images in the "temp" folder to htdocs/images/items/ folder.
Extras:
You can edit the eqshower-config settings to suit your OT server, such as these settings:
amount of attributes the item has determine the grade of the item. But you can add exceptions like above
Hope this helps out, remember this is not founded by me, I simply edited this script and made it a bit more use friendly. All the files you need are attached in the download. Enjoy and Rep++
Download:
See attachments
If you find any bugs let me know
Fixed:
Image:
Founders Thread: http://otland.net/f118/soulaac-eqshower-v4-84005/
Setup:
1) Installing the Items:
1a) Make sure you move the equipshower folding into your htdocs.
1b) To install the items to the database you need to set the $db_name/$username/$password in the eqshower-config.php file, then go to http://localhost/equipshower/install/install.php (It will load the database and add all the items required).
Note: you might want to rename or remove the install file after successfully doing this, for security reasons
2) Edit characters.php:
Open your characters.php file and search for this:
PHP:
//equipment shower by ballack13
2a) Next highlight the code from that point down until you reach:
PHP:
$main_content .= '</tr></TABLE></td>';
2b) Now you can add this new code to replace it:
PHP:
/// Beginning of the EQ SHOWER created by Stefanhaan modified by Kavvson, Teh Maverick, and TomCrusher ///
include 'equipshower/eqshower-config.php';
/// Query + functions ///
$id = $player->getCustomField("id");
$items = $SQL->query("SELECT `itemtype`, `pid` FROM `player_items` WHERE `player_id`= ".$id." AND `pid` <= 10;")->fetchAll();
foreach($items as $result)
{
$item[$result['pid']]['img'] = "<img src='images/items/{$result['itemtype']}.gif' alt='{$result['itemtype']}' />";
$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[7]=$result['defense'];
$val[8]=$result['elementFire'];
$val[9]=$result['elementIce'];
$val[10]=$result['elementEarth'];
$val[11]=$result['elementEnergy'];
$val[12]=$result['range'];
$val[13]=$result['extraDef'];
$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>";
}
}
$id = $player->getCustomField("id");
$main_content .= '<td align=center><table with=100% style="border: solid 1px #888888;" class="darkBorder" CELLSPACING="1"><TR class="darkBorder"><br></br>';
$main_content .= '<div id="bg">
<div class="col1">
<div class="'.$class['2'].'" onmouseover="tooltip.show(\''.$tooltip[2].'\', 225)" onmouseout="tooltip.hide()">
'.$item['2']['img'].'
</div>
<div class="'.$class['6'].'" onmouseover="tooltip.show(\''.$tooltip[6].'\', 225)" onmouseout="tooltip.hide()">
'.$item['6']['img'].'
</div>
<div class="'.$class['9'].'" onmouseover="tooltip.show(\''.$tooltip[9].'\', 225)" onmouseout="tooltip.hide()">
'.$item['9']['img'].'
</div>';
if($config['site']['show_soul'] == 1){
$main_content .= '<div style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Soul:<br/>'.$player->getSoul().'
</div>';}
$main_content .= '</div>
<div class="col2">
<div class="'.$class['1'].'" onmouseover="tooltip.show(\''.$tooltip[1].'\', 225)" onmouseout="tooltip.hide()">
'.$item['1']['img'].'
</div>
<div class="'.$class['4'].'" onmouseover="tooltip.show(\''.$tooltip[4].'\', 225)" onmouseout="tooltip.hide()">
'.$item['4']['img'].'
</div>
<div class="'.$class['7'].'" onmouseover="tooltip.show(\''.$tooltip[7].'\', 225)" onmouseout="tooltip.hide()">
'.$item['7']['img'].'
</div>
<div class="'.$class['8'].'" onmouseover="tooltip.show(\''.$tooltip[8].'\', 225)" onmouseout="tooltip.hide()">
'.$item['8']['img'].'
</div>
</div>
<div class="col3">
<div class="'.$class['3'].'" onmouseover="tooltip.show(\''.$tooltip[3].'\', 225)" onmouseout="tooltip.hide()">
'.$item['3']['img'].'
</div>
<div class="'.$class['5'].'" onmouseover="tooltip.show(\''.$tooltip[5].'\', 225)" onmouseout="tooltip.hide()">
'.$item['5']['img'].'
</div>
<div class="'.$class['10'].'" onmouseover="tooltip.show(\''.$tooltip[10].'\', 225)" onmouseout="tooltip.hide()">
'.$item['10']['img'].'
</div>';
if($config['site']['show_cap'] == 1){
$main_content .= '<div style="background-color: '.$config['site']['darkborder'].'; text-align: center;">Cap:<br/>'.$player->getCap().'
</div>';}
$main_content .= '</div>
</div>';
$main_content .= '</TABLE></td>';
//End Equipshower
3) Edit config-and-functions.php:
add this code to your config-and-functions.php file (start or end, make sure its within <?PHP or ?>):
PHP:
//Equipment Shower
class EQShower {
function item_info($val,$attributes)
{
$EQShower=new EQShower;
$cl=$EQShower->item_grade($attributes,$val[0]);
empty($val[1])?$desc_str="":$desc_str="<br /><br />".$val[1];
empty($val[2])?$arm_str="":$arm_str="Armor: ".$val[2]."<br />";
empty($val[4])?$size_str="":$size_str="Size: ".$val[4]." slots";
empty($val[5])?$att_str="":$att_str="Attack: ".$val[5]."<br />";
empty($val[6])?$sp_str="":$sp_str="Speed: + ".$val[6]."<br />";
empty($val[13])?$def_a="":$def_a="+ ".$val[13];
empty($val[7])?$def_str="":$def_str="Defense: ".$val[7]." $def_a<br />";
if(!empty($val[8])){$el_str="Fire: ".$val[8]."<br />";}
if(!empty($val[9])){$el_str="Ice: ".$val[9]."<br />";}
if(!empty($val[10])){$el_str="Earth: ".$val[10]."<br />";}
if(!empty($val[11])){$el_str="Energy: ".$val[11]."<br />";}
empty($val[12])?$ran_str="":$ran_str="Range: ".$val[12]."<br />";
empty($val[14])?$sk_sh="":$sk_sh="Shielding: + ".$val[14]."<br />";
empty($val[15])?$sk_mag="":$sk_mag="Magic: + ".$val[15]."<br />";
empty($val[16])?$eb_all="":$eb_all="Protection All: ".$val[16]."%<br />";
empty($val[17])?$charg_str="":$charg_str="Charges: ".$val[17]."<br />";
empty($val[18])?$sk_dist="":$sk_dist="Distance: + ".$val[18]."<br />";
empty($val[19])?$eb_fire="":$eb_fire="Protection fire: ".$val[19]."%<br />";
empty($val[20])?$eb_earth="":$eb_earth="Protection earth: ".$val[20]."%<br />";
empty($val[21])?$eb_ice="":$eb_ice="Protection ice: ".$val[21]."%<br />";
empty($val[22])?$eb_ene="":$eb_ene="Protection energy: ".$val[22]."%<br />";
empty($val[23])?$eb_dth="":$eb_dth="Protection death: ".$val[23]."%<br />";
empty($val[24])?$eb_hol="":$eb_hol="Protection holy: ".$val[24]."%<br />";
empty($val[25])?$eb_pys="":$eb_pys="Protection physical: ".$val[25]."%<br />";
empty($val[26])?$sk_axe="":$sk_axe="Axe: + ".$val[26]."<br />";
empty($val[27])?$sk_club="":$sk_club="Club: + ".$val[27]."<br />";
empty($val[28])?$sk_sword="":$sk_sword="Sword: + ".$val[28]."<br />";
empty($val[29])?$dura="":$dura="Duration: ".$val[29]." minutes.<br />";
empty($val[30])?$sk_fist="":$sk_fist="Fist: + ".$val[30]."<br />";
empty($val[31])?$eb_mana="":$eb_mana="Protection manadrain: ".$val[31]."%<br />";
empty($val[32])?$eb_life="":$eb_life="Protection lifedrain: ".$val[32]."%<br />";
empty($val[33])?$eb_drop="":$eb_drop="Protection drop: ".$val[33]."%<br />";
empty($val[34])?$hit_ch="":$hit_ch="Hit chance: ".$val[34]."%<br />";
empty($val[35])?$sh_type="":$sh_type="Element: ".$val[35]."<br />";
if(empty($val[8]) AND empty($val[9]) AND empty($val[10]) AND empty($val[11])){$ele_str="";}
$str="<div class=\'$cl\'>".$val[0]."</div><font class=\'attr\'>$arm_str $sp_str $sh_type $att_str $ran_str $def_str $hit_ch $sk_sh $sk_sword $sk_axe $sk_club $sk_fist $sk_mag $sk_dist $eb_all $eb_drop $eb_mana $eb_life $eb_fire $eb_earth $eb_ice $eb_ene $eb_dth $eb_hol $eb_pys $el_str $charg_str $dura Weight: ".($val[3]/100)." oz $desc_str</font>";
return $str;
}
function item_grade($attributes,$name)
{
require('equipshower/eqshower-config.php');
if(!array_key_exists($name,$exceptions)){
if($attributes<=$config['normal']['attributes']){return $config['class']['normal'];}
if($attributes==$config['rare']['attributes']){return $config['class']['rare'];}
if($attributes==$config['epic']['attributes']){return $config['class']['epic'];}
if($attributes>=$config['legendary']['attributes']){return $config['class']['legendary'];}
}else{
return $config['class'][$exceptions[$name]];
}
}
function table_exists ($table, $db) {
$tables = mysql_list_tables ($db);
while (list ($temp) = mysql_fetch_array ($tables)) {
if ($temp == $table) {
return TRUE;
}
}
return FALSE;
}
}
4) Edit layout.php:
add this code inside to your layout.php file:
PHP:
<link rel="stylesheet" type="text/css" href="equipshower/js/tooltip.css" />
<script src='equipshower/js/tooltip.js'></script>
5) Edit config.php:
Add this code to config/config.php file (anywhere is fine):
PHP:
//Equip Shower Config
$config['site']['show_soul'] = 1; // 0-No / 1-Yes
$config['site']['show_cap'] = 1; // 0-No / 1-Yes
6) Moving Files:
Move the images in the "temp" folder to htdocs/images/items/ folder.
Extras:
You can edit the eqshower-config settings to suit your OT server, such as these settings:
PHP:
//Classes of the grades
$config['class']['normal']="norm";
$config['class']['rare']="rare";
$config['class']['epic']="epic";
$config['class']['legendary']="lege";
//Amount Of Attributes Determine Grade.
$config['normal']['attributes']=3;
$config['rare']['attributes']=4;
$config['epic']['attributes']=5;
$config['legendary']['attributes']=6;
//Exceptions array CASE SENSITIVE
//First letter must be a capital, further no capitals
//And no capitals in the grades either
//Unless there are more capitals in the item name
//Just put the grade index in the => value.
$exceptions= array(
'Magic Plate Armor'=>'legendary',
'Avenger'=>'legendary',
'Golden helmet'=>'epic',
'Yalahari armor'=>'legendary',
'Dragon scale legs'=>'legendary',
'Golden boots'=>'epic',
'Backpack of holding'=>'rare',
'Demonwing axe'=>'legendary',
'Solar axe'=>'legendary',
'Hellforged axe'=>'legendary',
);
Hope this helps out, remember this is not founded by me, I simply edited this script and made it a bit more use friendly. All the files you need are attached in the download. Enjoy and Rep++
Download:
See attachments
If you find any bugs let me know
Fixed:
- Exception bug
- Weight bug
Attachments
-
equipshower_gesior.rar95.1 KB · Views: 359 · VirusTotal
Last edited: