Someone asked me how to display player outfits, addons and mounts on 'characters' page. I didn't prepare whole script, but I wrote PHP code to read that data from database with Gesior2012:
You can pass these values to Outfit Generator script to show outfit images with addons/mounts.
PHP:
<?php
define('PSTRG_RESERVED_RANGE_START', 10000000);
define('PSTRG_OUTFITS_RANGE_START', PSTRG_RESERVED_RANGE_START + 1000);
define('PSTRG_OUTFITS_RANGE_SIZE', 500);
define('PSTRG_MOUNTS_RANGE_START', PSTRG_RESERVED_RANGE_START + 2001);
define('PSTRG_MOUNTS_CURRENTMOUNT', PSTRG_MOUNTS_RANGE_START + 10);
$outfits = [];
$mounts = [];
$player = new Player(1);
$playerStorages = $player->getStorages();
for($key = PSTRG_OUTFITS_RANGE_START + 1; $key < PSTRG_OUTFITS_RANGE_START + PSTRG_OUTFITS_RANGE_SIZE; $key++)
{
if (isset($playerStorages[$key])) {
$value = $playerStorages[$key];
$outfitType = ($value & 0xFFFF0000) >> 16;
$outfitAddonToImageGenerator = ($value & 0x0000FFFF);
$outfitHasAddon1 = ($value & 0x0000FFFF & 1) > 0;
$outfitHasAddon2 = ($value & 0x0000FFFF & 2) > 0;
$outfits[] = [
'look_type' => $outfitType,
'look_addon' => $outfitAddonToImageGenerator,
'has_addon_1' => $outfitHasAddon1,
'has_addon_2' => $outfitHasAddon2,
];
} else {
break;
}
}
for ($mountId = 1; $mountId < 300; $mountId++) {
$tmpMountId = $mountId - 1;
$key = PSTRG_MOUNTS_RANGE_START + ($tmpMountId / 31);
if (isset($playerStorages[$key])) {
if(((1 << ($tmpMountId % 31)) & $playerStorages[$key]) != 0) {
$mounts[] = $mountId;
}
}
}
echo '<pre>';
var_dump($outfits);
var_dump($mounts);
echo '</pre>';