$itemstats->additem($row); } } if ($epicbg) { $query = "SELECT items.icon, items.id FROM items \r\n JOIN titles ON items.id = titles.item_id\r\n JOIN character_inventory ON items.id = character_inventory.itemid\r\n WHERE character_inventory.id = {$charID}\r\n AND titles.class = {$class}\r\n ORDER BY items.id DESC\r\n LIMIT 0, 1;"; if (defined('DB_PERFORMANCE')) { dbp_query_stat('query', $query); } //added 9/28/2014 $results = mysql_query($query); if ($row = mysql_fetch_array($results)) { $epicicon = sprintf($path['EPIC'], $row['icon']); } } $chardata = array('FIRST_NAME' => $name, 'LAST_NAME' => $last_name, 'TITLE' => $title, 'GUILD_NAME' => $guild_name, 'GUILD_RANK' => $guild_rank, 'LEVEL' => $level, 'CLASS' => $dbclassnames[$class], 'RACE' => $dbracenames[$race], 'DEITY' => $dbdeities[$deity]); $stats = array('REGEN' => $itemstats->regen(), 'FT' => $itemstats->FT(), 'DS' => $itemstats->DS(), 'HASTE' => $itemstats->haste() . "%", 'HP' => GetMaxHP($level, $class, $baseSTA + $itemstats->STA(), $itemstats->hp()), 'MANA' => GetMaxMana($level, $class, $baseINT + $itemstats->INT(), $baseWIS + $itemstats->WIS(), +$itemstats->mana()), 'ENDR' => GetMaxEndurance($baseSTR + $itemstats->STR(), $baseSTA + $itemstats->STA(), $baseDEX + $itemstats->DEX(), $baseAGI + $itemstats->AGI(), $level, $itemstats->endurance()), 'AC' => GetMaxAC($baseAGI + $itemstats->AGI(), $level, $defense, $class, $itemstats->AC(), $race), 'ATK' => GetMaxAtk($itemstats->attack(), $baseSTR + $itemstats->STR(), $offense), 'STR' => $baseSTR + $itemstats->STR(), 'STA' => $baseSTA + $itemstats->STA(), 'DEX' => $baseDEX + $itemstats->DEX(), 'AGI' => $baseAGI + $itemstats->AGI(), 'INT' => $baseINT + $itemstats->INT(), 'WIS' => $baseWIS + $itemstats->WIS(), 'CHA' => $baseCHA + $itemstats->CHA(), 'PR' => PRbyRace($race) + $PRbyClass[$class] + $itemstats->PR(), 'FR' => FRbyRace($race) + $FRbyClass[$class] + $itemstats->FR(), 'MR' => MRbyRace($race) + $MRbyClass[$class] + $itemstats->MR(), 'DR' => DRbyRace($race) + $DRbyClass[$class] + $itemstats->DR(), 'CR' => CRbyRace($race) + $CRbyClass[$class] + $itemstats->CR(), 'WT' => round($itemstats->WT() / 10)); /************************************************** ** DO NOT USE png_message_die past this point ** **************************************************/ //create image $image = imagecreatetruecolor($signaturewidth, $signatureheight); //apply background color $bgcolor = imagecolorallocate($image, $bgcolor['r'], $bgcolor['g'], $bgcolor['b']); imagefilledrectangle($image, 0, 0, $signaturewidth - 1, $signatureheight - 1, $bgcolor); //apply background image if ($background) { $tempimage = imagecreatefrompng($background); imagecopy($image, $tempimage, 0, 0, 0, 0, $signaturewidth, $signatureheight); imagedestroy($tempimage); } //aply alpha screen to bg
} } if ($tempitem->type() == EQUIPMENT) { $itemstats->additem($row); } if ($tempitem->type() == EQUIPMENT || $tempitem->type() == INVENTORY) { $itemstats->addWT($row['weight']); } $allitems[$tempitem->slot()] = $tempitem; } //drop page $d_title = " - " . $name . $language['PAGE_TITLES_CHARACTER']; include "include/header.php"; //build body template $template->set_filenames(array('character' => 'character_body.tpl')); $template->assign_vars(array('HIGHLIGHT_GM' => $highlightgm && $gm ? "GM" : "", 'REGEN' => $itemstats->regen(), 'FT' => $itemstats->FT(), 'DS' => $itemstats->DS(), 'HASTE' => $itemstats->haste(), 'FIRST_NAME' => $name, 'LAST_NAME' => $last_name, 'TITLE' => $title, 'GUILD_NAME' => $guild_name, 'LEVEL' => $level, 'CLASS' => $dbclassnames[$class], 'RACE' => $dbracenames[$race], 'CLASS_NUM' => $class, 'DEITY' => $dbdeities[$deity], 'HP' => GetMaxHP($level, $class, $baseSTA + $itemstats->STA(), $itemstats->hp()), 'MANA' => GetMaxMana($level, $class, $baseINT + $itemstats->INT(), $baseWIS + $itemstats->WIS(), +$itemstats->mana()), 'ENDR' => GetMaxEndurance($baseSTR + $itemstats->STR(), $baseSTA + $itemstats->STA(), $baseDEX + $itemstats->DEX(), $baseAGI + $itemstats->AGI(), $level, $itemstats->endurance()), 'AC' => GetMaxAC($baseAGI + $itemstats->AGI(), $level, $defense, $class, $itemstats->AC(), $race), 'ATK' => GetMaxAtk($itemstats->attack(), $baseSTR + $itemstats->STR(), $offense), 'STR' => $baseSTR + $itemstats->STR(), 'STA' => $baseSTA + $itemstats->STA(), 'DEX' => $baseDEX + $itemstats->DEX(), 'AGI' => $baseAGI + $itemstats->AGI(), 'INT' => $baseINT + $itemstats->INT(), 'WIS' => $baseWIS + $itemstats->WIS(), 'CHA' => $baseCHA + $itemstats->CHA(), 'HSTR' => $itemstats->HSTR(), 'HSTA' => $itemstats->HSTA(), 'HDEX' => $itemstats->HDEX(), 'HAGI' => $itemstats->HAGI(), 'HINT' => $itemstats->HINT(), 'HWIS' => $itemstats->HWIS(), 'HCHA' => $itemstats->HCHA(), 'POISON' => PRbyRace($race) + $PRbyClass[$class] + $itemstats->PR(), 'FIRE' => FRbyRace($race) + $FRbyClass[$class] + $itemstats->FR(), 'MAGIC' => MRbyRace($race) + $MRbyClass[$class] + $itemstats->MR(), 'DISEASE' => DRbyRace($race) + $DRbyClass[$class] + $itemstats->DR(), 'COLD' => CRbyRace($race) + $CRbyClass[$class] + $itemstats->CR(), 'HPOISON' => $itemstats->HPR(), 'HFIRE' => $itemstats->HFR(), 'HMAGIC' => $itemstats->HMR(), 'HDISEASE' => $itemstats->HDR(), 'HCOLD' => $itemstats->HCR(), 'WEIGHT' => round($itemstats->WT() / 10), 'PP' => $mypermission['coininventory'] ? $language['MESSAGE_DISABLED'] : $pp, 'GP' => $mypermission['coininventory'] ? $language['MESSAGE_DISABLED'] : $gp, 'SP' => $mypermission['coininventory'] ? $language['MESSAGE_DISABLED'] : $sp, 'CP' => $mypermission['coininventory'] ? $language['MESSAGE_DISABLED'] : $cp, 'BPP' => $mypermission['coinbank'] ? $language['MESSAGE_DISABLED'] : $bpp, 'BGP' => $mypermission['coinbank'] ? $language['MESSAGE_DISABLED'] : $bgp, 'BSP' => $mypermission['coinbank'] ? $language['MESSAGE_DISABLED'] : $bsp, 'BCP' => $mypermission['coinbank'] ? $language['MESSAGE_DISABLED'] : $bcp, 'L_HEADER_INVENTORY' => $language['CHAR_INVENTORY'], 'L_HEADER_BANK' => $language['CHAR_BANK'], 'L_REGEN' => $language['CHAR_REGEN'], 'L_FT' => $language['CHAR_FT'], 'L_DS' => $language['CHAR_DS'], 'L_HASTE' => $language['CHAR_HASTE'], 'L_HP' => $language['CHAR_HP'], 'L_MANA' => $language['CHAR_MANA'], 'L_ENDR' => $language['CHAR_ENDR'], 'L_AC' => $language['CHAR_AC'], 'L_ATK' => $language['CHAR_ATK'], 'L_STR' => $language['CHAR_STR'], 'L_STA' => $language['CHAR_STA'], 'L_DEX' => $language['CHAR_DEX'], 'L_AGI' => $language['CHAR_AGI'], 'L_INT' => $language['CHAR_INT'], 'L_WIS' => $language['CHAR_WIS'], 'L_CHA' => $language['CHAR_CHA'], 'L_HSTR' => $language['CHAR_HSTR'], 'L_HSTA' => $language['CHAR_HSTA'], 'L_HDEX' => $language['CHAR_HDEX'], 'L_HAGI' => $language['CHAR_HAGI'], 'L_HINT' => $language['CHAR_HINT'], 'L_HWIS' => $language['CHAR_HWIS'], 'L_HCHA' => $language['CHAR_HCHA'], 'L_POISON' => $language['CHAR_POISON'], 'L_MAGIC' => $language['CHAR_MAGIC'], 'L_DISEASE' => $language['CHAR_DISEASE'], 'L_FIRE' => $language['CHAR_FIRE'], 'L_COLD' => $language['CHAR_COLD'], 'L_HPOISON' => $language['CHAR_HPOISON'], 'L_HMAGIC' => $language['CHAR_HMAGIC'], 'L_HDISEASE' => $language['CHAR_HDISEASE'], 'L_HFIRE' => $language['CHAR_HFIRE'], 'L_HCOLD' => $language['CHAR_HCOLD'], 'L_WEIGHT' => $language['CHAR_WEIGHT'], 'L_AAS' => $language['BUTTON_AAS'], 'L_KEYS' => $language['BUTTON_KEYS'], 'L_FLAGS' => $language['BUTTON_FLAGS'], 'L_SKILLS' => $language['BUTTON_SKILLS'], 'L_CORPSE' => $language['BUTTON_CORPSE'], 'L_INVENTORY' => $language['BUTTON_INVENTORY'], 'L_FACTION' => $language['BUTTON_FACTION'], 'L_BOOKMARK' => $language['BUTTON_BOOKMARK'], 'L_CHARMOVE' => $language['BUTTON_CHARMOVE'], 'L_CONTAINER' => $language['CHAR_CONTAINER'], 'L_DONE' => $language['BUTTON_DONE'])); //dump inventory items ICONS foreach ($allitems as $value) { if ($value->type() == INVENTORY && $mypermission['bags']) { continue; } if ($value->type() == EQUIPMENT || $value->type() == INVENTORY) { $template->assign_block_vars("invitem", array('SLOT' => $value->slot(), 'ICON' => $value->icon(), 'ISBAG' => $value->slotcount() > 0 ? "true" : "false")); } } //dump bags windows foreach ($allitems as $value) { if ($value->type() == INVENTORY && $mypermission['bags']) { continue; } if ($value->type() == BANK && $mypermission['bank']) {