Esempio n. 1
0
        $MadGD->addText($house['name'] . ' (' . $config['cities'][$house['town']] . ')')->setPosition();
        $row++;
    } else {
        $MadGD->addText($house['name'])->setPosition();
        $row++;
    }
}
// Player Guild
if ($character->getRank() != null) {
    $MadGD->addText('Guild Membership:', $MadGD->textBold)->setPosition(10, $row * $height);
    $MadGD->addText($character->getRank()->getName() . ' of the ' . $character->getRank()->getGuild()->getName())->setPosition();
    $row++;
}
// Player Last Login
$MadGD->addText('Last login:'******'Never logged in' : gmdate('M d Y, H:i:s T', $character->getLastLogin()))->setPosition();
$row++;
// Account Status
$MadGD->addText('Account Status:', $MadGD->textBold)->setPosition(10, $row * $height);
$MadGD->addText($character->getAccount()->getPremDays() > 0 ? 'Premium Account' : 'Free Account')->setPosition();
$row++;
// Define all of the slot ids with their names.
$slots = array(2 => 'amulet', 1 => 'helmet', 3 => 'backpack', 6 => 'lefthand', 4 => 'armor', 5 => 'righthand', 9 => 'ring', 7 => 'legs', 10 => 'ammunition', 8 => 'boots');
// Loop through all of the slots.
foreach ($slots as $pid => $name) {
    // Run a SQL query to fetch the slot items.
    $item = $SQL->query('SELECT `itemtype`, `count` FROM `player_items` WHERE `player_id` = ' . $character->getId() . ' AND `pid` = ' . $pid . ';')->fetch();
    // Continue to the next slot item in case there is no item at the current slot.
    if ($item['itemtype'] == null) {
        continue;
    }