function prepare_shopitem($sn) { if (eval(__MAGIC__)) { return $___RET_VALUE; } eval(import_module('sys', 'map', 'itemmain')); $arean = floor($areanum / $areaadd); $result = $db->query("SELECT * FROM {$tablepre}shopitem WHERE kind = '{$sn}' AND area <= '{$arean}' AND num > '0' AND price > '0' ORDER BY sid"); $shopnum = $db->num_rows($result); for ($i = 0; $i < $shopnum; $i++) { $itemdata[$i] = $db->fetch_array($result); $itemdata[$i]['itmk_words'] = \itemmain\parse_itmk_words($itemdata[$i]['itmk'], 1); $itemdata[$i]['itmsk_words'] = \itemmain\parse_itmsk_words($itemdata[$i]['itmsk'], 1); } return $itemdata; }
function npcinfo_gen_item_description($itm, $itmk, $itme, $itms, $itmsk) { if (eval(__MAGIC__)) { return $___RET_VALUE; } echo $itm; if ($itmk != '') { echo '/' . \itemmain\parse_itmk_words($itmk); } if ($itme != '') { echo '/' . $itme; } if ($itms != '') { echo '/' . $itms; } if (\itemmain\count_itmsk_num($itmsk) > 0) { echo '/' . \itemmain\parse_itmsk_words($itmsk); } }
} else { if (substr($ikind, 0, 2) == "TN") { $mixhelpinfo .= "(可拾取)"; } else { if ($ikind[0] == "P") { if ($ikind[strlen($ikind) - 1] == "2") { $mixhelpinfo .= "(猛毒)"; } else { $mixhelpinfo .= "(有毒)"; } } } } $mixhelpinfo .= "</span></td>\n"; $mixhelpinfo .= "<td class=\"b3\"><span>{$ieff}/{$ista}</span></td>\n"; $mixhelpinfo .= "<td class=\"b3\"><span>"; $mixhelpinfo .= \itemmain\parse_itmsk_words($iskind, 0); $mixhelpinfo .= "</span></td>\n"; $mixhelpinfo .= "<td class=\"b3\"><span>"; if ($iarea == 99) { $mixhelpinfo .= "每禁"; } else { $mixhelpinfo .= "{$iarea}禁"; } $mixhelpinfo .= "刷新{$inum}个</span></td></tr>\n"; } } $mixhelpinfo .= "</table></div><br>\n"; writeover($writefile, $mixhelpinfo); } include template('itemhelpmain');
<?php define('CURSCRIPT', 'help'); define('IN_HELP', TRUE); require './include/common.inc.php'; eval(import_module('itemmain')); $mixfile = GAME_ROOT . './include/modules/base/itemmix/itemmix/config/itemmix.config.php'; require $mixfile; $writefile = GAME_ROOT . TPLDIR . '/mixhelp.htm'; if (filemtime($mixfile) > filemtime($writefile)) { $mixitem = array(); foreach ($mixinfo as $mix) { if ($mix['class'] !== 'hidden') { $mixitmk = \itemmain\parse_itmk_words($mix['result'][1]); $mixitmsk = \itemmain\parse_itmsk_words($mix['result'][4]); if ($mixitmsk == '--') { $mixitmsk = ''; } $mixitem[$mix['class']][] = array('stuff' => $mix['stuff'], 'result' => array($mix['result'][0], $mixitmk, $mix['result'][2], $mix['result'][3], $mixitmsk)); } } $mixclass = array('wp' => array('殴系武器', 'yellow'), 'wk' => array('斩系武器', 'yellow'), 'wg' => array('射系武器', 'yellow'), 'wc' => array('投系武器', 'yellow'), 'wd' => array('爆系武器', 'yellow'), 'wf' => array('灵系武器', 'yellow'), 'w' => array('其他装备', 'yellow'), 'h' => array('补给品', 'lime'), 'pokemon' => array('小黄系道具', 'yellow'), 'ocg' => array('游戏王系道具', 'clan'), 'key' => array('KEY系道具', 'lime'), 'cube' => array('方块系道具', 'yellow'), 'item' => array('其他道具', 'yellow')); $mixhelpinfo = ''; include_once GAME_ROOT . './include/itemplace.func.php'; foreach ($mixitem as $class => $list) { $classname = $mixclass[$class][0]; $classcolor = $mixclass[$class][1]; $mixhelpinfo .= "<p><span class=\"{$classcolor}\">{$classname}合成表</span>:</p>\n"; $mixhelpinfo .= "<table>\r\n\t\t\t<tr>\r\n\t\t\t\t<td class=\"b1\" height=20px><span>合成材料一</span></td>\r\n\t\t\t\t<td class=\"b1\"><span>合成材料二</span></td>\r\n\t\t\t\t<td class=\"b1\"><span>合成材料三</span></td>\r\n\t\t\t\t<td class=\"b1\"><span>合成材料四</span></td>\r\n\t\t\t\t<td class=\"b1\"><span>合成材料五</span></td>\r\n\t\t\t\t<td class=\"b1\"></td>\r\n\t\t\t\t<td class=\"b1\"><span>合成结果</span></td>\r\n\t\t\t\t<td class=\"b1\"><span>用途</span></td>\r\n\t\t\t</tr>\r\n\t\t\t"; foreach ($list as $val) { if (!empty($val['result'][4])) {