function RenderTamedMob() { global $options; global $data_buffer, $imageoptions, $zmap; $itemid = $options['tamingmob']; // TamingMob manipulates body X/Y $info = GetItemWZInfo($itemid, CURRENT_LOCALE); $mainx = $imageoptions['mainx']; $mainy = $imageoptions['mainy']; if ($info !== null) { $block = $info[$options['stance']][$options['stance_frame']]; foreach ($block as $innerid => $innerblock) { if (!$innerblock instanceof TreeNode) { continue; } $zval = $innerblock['z']; if ($zval == 'tamingMobBack') { // Nexon'd $zval = 'tamingMobRear'; } if (is_string($zval)) { $zval = $zmap[$zval]; } $objectdata = array('info' => $innerblock, 'itemid' => $itemid, 'category' => 'tamingmob', 'vslot' => array(), 'islot' => 'Tm'); $x = $mainx; $y = $mainy; $mappings = $objectdata['info']['map']; if (!isset($mappings)) { continue; } else { $imageoptions['mainx'] = $mainx + $mappings['navel']['X']; $imageoptions['mainy'] = $mainy + $mappings['navel']['Y'] + 20; } $copy = $mappings->getArrayCopy(); krsort($copy); foreach ($copy as $mapname => $mapping) { if (!isset($data_buffer['body_map'][$mapname])) { $data_buffer['body_map'][$mapname][0] = $x + $mapping['X']; $data_buffer['body_map'][$mapname][1] = $y + $mapping['Y']; } else { $x = $data_buffer['body_map'][$mapname][0] - $mapping['X']; $y = $data_buffer['body_map'][$mapname][1] - $mapping['Y']; } } if (DEBUGGING) { echo 'Final map ' . $x . ', ' . $y . "\r\n"; } $objectdata['x'] = $x; $objectdata['y'] = $y; $objectdata['image'] = $options['stance'] . '.' . $options['stance_frame'] . '.' . $innerid . '.png'; if (DEBUGGING) { echo 'Image ' . $objectdata['image'] . "\r\n"; } $foundinfo = true; $data_buffer['zlayers'][$zval][] = $objectdata; } $data_buffer['item_locations'][$itemid] = GetItemDataLocation($data_buffer['main-dir'], $itemid); $options['stance'] = 'sit'; } }
function RenderCashItem($itemid) { global $char_body_position, $char_stance, $char_stance_frame; global $mainx, $mainy, $main_dir; global $extra_layers; $iteminfo = get_data($itemid); $item_section_id = $itemid % 1000; $support_guys_and_gals = $item_section_id >= 73 && $item_section_id <= 74; if (isset($iteminfo['effect']['default']) && !isset($iteminfo['effect'][$char_stance])) { $iteminfo['effect'][$char_stance] = $iteminfo['effect']['default']; } $iteminfo = $iteminfo['effect'][$char_stance]; $block = isset($iteminfo[$char_stance_frame]) ? $iteminfo[$char_stance_frame] : null; if ($block === null) { if (DEBUGGING) { echo 'Block not found for: ' . $itemid . '!!!' . "\r\n"; } return; } $x = $mainx; $y = $mainy; // If no pos, use mainx/y // If pos, use $ispos = isset($iteminfo['pos']) && $iteminfo['pos'] != 0; if ($ispos) { $x = $char_body_position['navel'][0]; $y = $char_body_position['navel'][1] - 30; } if (DEBUGGING) { print_r($iteminfo); } if (isset($block['origin']['X'])) { if (DEBUGGING) { echo 'found xy' . "\r\n"; } $x -= $block['origin']['X']; $y -= $block['origin']['Y']; } $img_location = GetItemDataLocation($main_dir, $itemid) . 'effect.' . $block['..']->name . '.' . $block->name . '.png'; $layer = $block['..']['z']; $extra_layers[$layer][] = array($img_location, $x, $y); }
?> <?php if (!EMS && ($__is_viewing_self || !IsHiddenObject('familiars'))) { MakeHideToggleButton('familiars'); ?> <p class="lead">Familiars</p> <table cellspacing="10" cellpadding="6"> <?php // Familiars $q = $__char_db->query("\nSELECT\n\tIF(f.name = '', (\n\t\tSELECT `value` FROM strings WHERE objectid = fi.mob_id AND objecttype = 'mob' AND `key` = 'name'\n\t\t), f.name) AS `name`,\n\tfi.familiar_id\nFROM\n\tfamiliars f\nLEFT JOIN\n\tphpvana_familiar_info fi\n\tON\n\t\tfi.familiar_id = f.mobid\nWHERE\n\tf.character_id = " . $internal_id); while ($row = $q->fetch_row()) { ?> <tr> <td align="center"><img src="<?php echo GetItemDataLocation('//static_images.mapler.me/', $row[1]) . 'stand.0.png'; ?> " title="<?php echo $row[0]; ?> " /></td> <td><?php echo $row[0]; ?> </td> </tr> <?php } ?> </table> <?php
function GetItemIcon($id, $locale, $addition = '') { global $subdomain; $data_domain = ''; if ($locale == 'ems') { $data_domain = 'EMS/'; } else { $data_domain = ''; } $domain = '//static_images.mapler.me/' . $data_domain; //$id = GetItemIconID($id); return GetItemDataLocation($domain, $id) . 'info.icon' . $addition . '.png'; }