示例#1
0
        $hair = $itemid % 10000;
        if (DEBUGGING) {
            echo "Found hair: " . $itemid . " > " . $hair . "\r\n";
        }
        unset($options['slots'][$slot]);
    } else {
        $data = GetItemWZInfo($itemid, CURRENT_LOCALE);
        if (!isset($data['info'])) {
            if (DEBUGGING) {
                echo "Skipping item " . $itemid . "\r\n";
            }
            unset($options['slots'][$slot]);
            continue;
        }
    }
    $used_wz_dirs[GetWZItemTypeName($itemid)] = $itemid;
}
// Fix up base position
$skin = 2000 + $skin % 1000;
if ($options['tamingmob'] > 0) {
    RenderTamedMob();
}
// Set global position values
$iteminfo = GetItemWZInfo($skin, CURRENT_LOCALE);
$map_node = $iteminfo[$options['stance']][$options['stance_frame']]['body']['map'];
$data_buffer['body_map']['navel'][0] = $imageoptions['mainx'] + $map_node['navel']['X'];
$data_buffer['body_map']['navel'][1] = $imageoptions['mainy'] + $map_node['navel']['Y'];
if (DEBUGGING) {
    echo 'Did find map: navel ' . $data_buffer['body_map']['navel'][0] . ', ' . $data_buffer['body_map']['navel'][1] . ' > ' . $map_node['navel']['X'] . ' - ' . $map_node['navel']['Y'] . "\r\n";
}
// Check if main slots are used
示例#2
0
function GetItemDataLocation($location, $id)
{
    $inv = GetItemInventory($id);
    $type = GetItemType($id);
    if ($type == 996) {
        $url = $location . 'Character/Familiar/' . str_pad($id, 7, '0', STR_PAD_LEFT) . '.img/';
    } elseif ($type < 5) {
        switch ($type) {
            case 0:
            case 1:
                $url = $location . 'Character/' . str_pad($id, 8, '0', STR_PAD_LEFT) . '.img/';
                break;
            case 2:
                $url = $location . 'Character/Face/' . str_pad($id, 8, '0', STR_PAD_LEFT) . '.img/';
                break;
            case 3:
                $url = $location . 'Character/Hair/' . str_pad($id, 8, '0', STR_PAD_LEFT) . '.img/';
                break;
        }
    } elseif ($inv == 1) {
        $name = GetWZItemTypeName($id);
        $url = $location . 'Character/' . $name . '/' . str_pad($id, 8, '0', STR_PAD_LEFT) . '.img/';
    } else {
        if ($type == 500) {
            $url = $location . 'Inventory/Pet/' . $id . '.img/';
        } else {
            $typeid = str_pad($type, 4, '0', STR_PAD_LEFT) . '.img';
            $typename = '';
            switch (floor($type / 100)) {
                case 2:
                    $typename = 'Consume';
                    break;
                case 3:
                    $typename = 'Install';
                    break;
                case 4:
                    $typename = 'Etc';
                    break;
                case 5:
                    $typename = 'Cash';
                    break;
            }
            $url = $location . 'Inventory/' . $typename . '/' . $typeid . '/' . str_pad($id, 8, '0', STR_PAD_LEFT) . '/';
        }
    }
    return $url;
}