Example #1
0
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;
}
Example #2
0
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);
    }
}
Example #3
0
if (filemtime($mapitemfile) > filemtime($writefile)) {
    $mixhelpinfo = "<div align=\"middle\"><table>\n\t\t<tr>\n\t\t\t<td class=\"b1\" height=20px><span>所在地点</span></td>\n\t\t\t<td class=\"b1\"><span>物品名称</span></td>\n\t\t\t<td class=\"b1\"><span>物品类型</span></td>\n\t\t\t<td class=\"b1\"><span>效/耐</span></td>\n\t\t\t<td class=\"b1\"><span>物品属性</span></td>\n\t\t\t<td class=\"b1\"><span>刷新时间与数量</span></td>\n\t\t</tr>\n\t\t";
    $file = GAME_ROOT . '/include/modules/base/itemmain/config/mapitem.config.php';
    $itemlist = openfile($file);
    $in = sizeof($itemlist);
    for ($i = 1; $i < $in; $i++) {
        if (!empty($itemlist[$i]) && strpos($itemlist[$i], ',') !== false) {
            list($iarea, $imap, $inum, $iname, $ikind, $ieff, $ista, $iskind) = explode(',', $itemlist[$i]);
            if ($imap == 99) {
                $mixhelpinfo .= "<tr><td class=\"b3\" height=20px><span>全图随机</span></td>\n";
            } else {
                $mixhelpinfo .= "<tr><td class=\"b3\" height=20px><span>{$plsinfo[$imap]}</span></td>\n";
            }
            $mixhelpinfo .= "<td class=\"b3\"><span>{$iname}</span></td>\n";
            $mixhelpinfo .= "<td class=\"b3\"><span>";
            $mixhelpinfo .= \itemmain\parse_itmk_words($ikind, 0);
            if (substr($ikind, 0, 2) == "TO") {
                $mixhelpinfo .= "(已埋设)";
            } else {
                if (substr($ikind, 0, 2) == "TN") {
                    $mixhelpinfo .= "(可拾取)";
                } else {
                    if ($ikind[0] == "P") {
                        if ($ikind[strlen($ikind) - 1] == "2") {
                            $mixhelpinfo .= "(猛毒)";
                        } else {
                            $mixhelpinfo .= "(有毒)";
                        }
                    }
                }
            }
Example #4
0
<?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])) {