예제 #1
0
function createItemDiv($itemid, $itemName = '', $upgradeLevel = 0)
{
    unset($item);
    $msg = array();
    if (file_exists("images/items/" . $itemid . ".gif")) {
        $item['img'] = "<img src='images/items/" . $itemid . ".gif' />";
        $msg = '';
    } else {
        $msg = "<br><br><font color=\\'red\\' class=\\'attr\\'>Por favor criar um ticket na parte de atendimento com o nome desse item e o seguinte número: " . $itemid . ".</font>";
        $item['img'] = "<img width=32 heigth=32 src='images/shop/nophoto.png'/>";
    }
    $item['id'] = $itemid;
    $stonesDivs = array();
    $EQShower = new EQShower();
    unset($val);
    $val = array();
    $query = mysql_query("SELECT * FROM `s_items` INNER JOIN `s_attributes` ON s_items.itemid=s_attributes.item_id WHERE s_items.itemid=" . $item['id']);
    if ($query) {
        $result = mysql_fetch_assoc($query);
    }
    $name = ucwords($result['name']);
    if (empty($itemName)) {
        $val[0] = __INIMASC(strtolower($result['name']));
    } else {
        $val[0] = __INIMASC(strtolower($itemName));
    }
    $val[1] = $result['descr'];
    $hasSomething = false;
    if ($upgradeLevel and $upgradeLevel > 0) {
        if ($result['armor'] != null && $result['armor'] != '') {
            $result['armor'] = $result['armor'] + $upgradeLevel;
            $hasSomething = true;
        }
    }
    $val[2] = $result['armor'];
    $val[3] = $result['weight'];
    $val[4] = $result['containerSize'];
    if ($upgradeLevel and $upgradeLevel > 0) {
        if ($result['attack'] != null && $result['attack'] != '') {
            $result['attack'] = $result['attack'] + $upgradeLevel;
            $hasSomething = true;
        }
    }
    $val[5] = $result['attack'];
    $val[6] = $result['speed'];
    $val[13] = $result['extraDef'];
    if ($upgradeLevel and $upgradeLevel > 0) {
        if ($result['defense'] != null && $result['defense'] != '') {
            $result['defense'] = $result['defense'] + $upgradeLevel;
            $hasSomething = true;
        }
    }
    $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'];
    if ($upgradeLevel and $upgradeLevel > 0) {
        if ($result['range'] != null && $result['range'] != '') {
            if ($result['hitChance'] == null || $result['hitChance'] == '') {
                $result['hitChance'] = 0;
            }
            $result['hitChance'] = $result['hitChance'] + $upgradeLevel;
            if ($result['attack'] == null || $result['attack'] == '' || $result['attack'] == 0) {
                $val[5] = $upgradeLevel;
            }
            $hasSomething = true;
        }
    }
    $val[34] = $result['hitChance'];
    $val[35] = $result['shootType'];
    $val[36] = $result['itemQuality'];
    $val[37] = $result['healthGain'];
    $val[38] = $result['healthTicks'];
    $val[39] = $result['manaGain'];
    $val[40] = $result['manaTicks'];
    if ($upgradeLevel and $upgradeLevel > 0) {
        if (!$hasSomething && $upgradeLevel != null && $upgradeLevel != '' && $upgradeLevel != 0) {
            $val[2] = $upgradeLevel;
        }
    }
    $tooltip = $EQShower->item_info($val);
    if (empty($item)) {
        $tooltip = "<font class=\\'attr\\'>Bug. Por favor contate um administrador pelo ticket de atendimento.</font>";
    }
    $div = '<div style="width:100%;height:100%;text-align:center;vertical-align:middle" onmouseover="tooltip.show(\'' . $tooltip . $msg . '\', 225);" onmouseout="tooltip.hide();">' . $item['img'] . '</div>';
    return $div;
}
예제 #2
0
 function item_info($val, $attributes)
 {
     $EQShower = new EQShower();
     $cl = $EQShower->item_grade($attributes);
     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] . " oz {$desc_str}</font>";
     return $str;
 }
예제 #3
0
 unset($item);
 $lootids = explode(",", $monster['loot']);
 $msg = array();
 $cont = 1;
 foreach ($lootids as $lootid) {
     if (file_exists("images/items/" . $lootid . ".gif")) {
         $item[$cont]['img'] = "<img src='images/items/" . $lootid . ".gif' />";
         $msg[$cont] = '';
     } else {
         $msg[$cont] = "<br><br><font color=\\'red\\' class=\\'attr\\'>Por favor criar um ticket na parte de atendimento com o nome desse item e o seguinte número:" . $lootid . ".</font>";
         $item[$cont]['img'] = "<img width=32 heigth=32 src='images/shop/nophoto.png'/>";
     }
     $item[$cont]['id'] = $lootid;
     $cont = $cont + 1;
 }
 $EQShower = new EQShower();
 for ($i = 1; $i < $cont; $i++) {
     unset($val);
     $val = array();
     $query = mysql_query("SELECT * FROM `s_items` INNER JOIN `s_attributes` ON s_items.itemid=s_attributes.item_id WHERE s_items.itemid=" . $item[$i]['id']);
     if ($query) {
         $result = mysql_fetch_assoc($query);
     }
     $val[0] = __INIMASC(strtolower($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'];
예제 #4
0
 function item_info($val)
 {
     $EQShower = new EQShower();
     $cl = $EQShower->item_grade($val[36], $val[0]);
     empty($val[1]) ? $desc_str = "" : ($desc_str = "<br /><br />Descrição (inglês): <br>" . $val[1]);
     empty($val[2]) ? $arm_str = "" : ($arm_str = "Armadura: " . $val[2] . "<br />");
     empty($val[4]) ? $size_str = "" : ($size_str = "Espaços: " . $val[4] . "<br />");
     empty($val[5]) ? $att_str = "" : ($att_str = "Ataque: " . $val[5] . "<br />");
     if (empty($val[6])) {
         $sp_str = "";
     } elseif ($val[6] > 0) {
         $sp_str = "Bônus de velocidade: +" . $val[6] / 2 . "<br />";
     } else {
         $sp_str = "Bônus de velocidade: " . $val[6] / 2 . "<br />";
     }
     if (empty($val[13])) {
         $def_a = "";
     } elseif ($val[13] > 0) {
         $def_a = "+ " . $val[13] . "<br />";
     } else {
         $def_a = "- " . -1 * $val[13] . "<br />";
     }
     empty($val[7]) ? $def_str = "" : ($def_str = "Defesa: " . $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 = "Alcance: " . $val[12] . "<br />");
     if (empty($val[14])) {
         $sk_sh = "";
     } elseif ($val[14] > 0) {
         $sk_sh = "Shielding: +" . $val[14] . "<br />";
     } else {
         $sk_sh = "Shielding: " . $val[14] . "<br />";
     }
     empty($val[15]) ? $sk_mag = "" : ($sk_mag = "Magic level: +" . $val[15] . "<br />");
     empty($val[16]) ? $eb_all = "" : ($eb_all = "Resistência (todas): " . $val[16] . "%<br />");
     empty($val[17]) ? $charg_str = "" : ($charg_str = "Cargas: " . $val[17] . "<br />");
     empty($val[18]) ? $sk_dist = "" : ($sk_dist = "Distance Fighting: +" . $val[18] . "<br />");
     empty($val[19]) ? $eb_fire = "" : ($eb_fire = "Resistência contra fire: " . $val[19] . "%<br />");
     empty($val[20]) ? $eb_earth = "" : ($eb_earth = "Resistência conta earth: " . $val[20] . "%<br />");
     empty($val[21]) ? $eb_ice = "" : ($eb_ice = "Resistência conta ice: " . $val[21] . "%<br />");
     empty($val[22]) ? $eb_ene = "" : ($eb_ene = "Resistência conta energy: " . $val[22] . "%<br />");
     empty($val[23]) ? $eb_dth = "" : ($eb_dth = "Resistência conta death: " . $val[23] . "%<br />");
     empty($val[24]) ? $eb_hol = "" : ($eb_hol = "Resistência conta holy: " . $val[24] . "%<br />");
     empty($val[25]) ? $eb_pys = "" : ($eb_pys = "Resistência conta physical: " . $val[25] . "%<br />");
     empty($val[26]) ? $sk_axe = "" : ($sk_axe = "Axe Fighting: +" . $val[26] . "<br />");
     empty($val[27]) ? $sk_club = "" : ($sk_club = "Club Fighting: +" . $val[27] . "<br />");
     empty($val[28]) ? $sk_sword = "" : ($sk_sword = "Sword Fighting: +" . $val[28] . "<br />");
     empty($val[29]) ? $dura = "" : ($dura = "Duração: " . $val[29] . " minutos<br />");
     empty($val[30]) ? $sk_fist = "" : ($sk_fist = "Fist Fighting: +" . $val[30] . "<br />");
     empty($val[31]) ? $eb_mana = "" : ($eb_mana = "Resistência contra manadrain: " . $val[31] . "%<br />");
     empty($val[32]) ? $eb_life = "" : ($eb_life = "Resistência contra lifedrain: " . $val[32] . "%<br />");
     empty($val[33]) ? $eb_drop = "" : ($eb_drop = "Resistência contra drop: " . $val[33] . "%<br />");
     if (empty($val[34])) {
         $hit_ch = "";
     } elseif ($val[34] > 0) {
         $hit_ch = "Chance de acerto: +" . $val[34] . "%<br />";
     } else {
         $hit_ch = "Chance de acerto: " . $val[34] . "%<br />";
     }
     empty($val[35]) ? $sh_type = "" : ($sh_type = "Elemento: " . $val[35] . "<br />");
     if (empty($val[37]) or empty($val[38])) {
         $life_str = "";
     } else {
         $life_str = "Regeneração de vida: +" . $val[37] . " a cada " . $val[38] / 1000 . " segundos<br />";
     }
     if (empty($val[39]) or empty($val[40])) {
         $mana_str = "";
     } else {
         $mana_str = "Regeneração de mana: +" . $val[39] . " a cada " . $val[40] / 1000 . " segundos<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\\'>{$size_str} {$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} {$life_str} {$mana_str} {$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} <br>Peso: " . $val[3] . " oz {$desc_str}</font>";
     return $str;
 }