';
if (($type == "clothing") || ($type == "armour") || ($type == "weapon")) {
echo '';
echo ' ';
echo ' | ';
$width = "70%";
}
echo '';
echo 'Price : '.$price.' gold';
if ($currencies) {
$max = count($currencies);
for ($i = 0;$i < $max;$i++) {
$currency = $currencies[$i];
$currency = explode(':',$currency);
echo ' = '.ceil($price / $currency[1]).' '.$currency[0];
}
}
echo ' ';
echo 'Stock : '.$stock.' left ';
echo 'Type : '.$typeName.' ';
if ($type == "food") echo '+'.$stat.' hunger per portion ';
if ($type == "drink") echo '+'.$stat.' mana per portion ';
if ($type == "poison") echo '-'.$stat.' health ';
if ($type == "alcohol") echo '+'.$stat.' hunger, +'.round($stat / 4).' intoxication per portion ';
if (($type == "food") || ($type == "drink") || ($type == "alcohol")) {
if (!$pawn) {
echo $totalPortions.' portions ';
} else {
$originalPortions = getInfo(portions,items,"WHERE id='$pawn'");
echo $totalPortions.'/'.$originalPortions.' portions left ';
}
}
if ($type == "weapon") {
echo "Deals ".$stat." damage ";
switch ($sex) {
case "m":
echo "Gender : Male ";
break;
case "f":
echo "Gender : Female ";
break;
}
}
if ($type == "armour") {
echo "Absorbs ".$stat." damage ";
switch ($sex) {
case "m":
echo "Gender : Male ";
break;
case "f":
echo "Gender : Female ";
break;
}
}
if (($type == "armour") || ($type == "weapon")) {
$originalPortions = getInfo(portions,items,"WHERE id='$pawn'");
echo $totalPortions.'/'.$originalPortions.' health left ';
}
if ($type == "clothing")
switch ($sex) {
case "m":
echo "Gender : Male ";
break;
case "f":
echo "Gender : Female ";
break;
}
echo "Weight: ".weigh_item($ii)."kg";
echo ' | ';
echo '';
if ($type != "other") echo ''.$description.'';
else echo 'A written document.';
$enchantment = $row['enchantment'];
if ($enchantment) {
$spell = getInfo(spell,enchantments,"WHERE id='$enchantment'");
$mana = getInfo(mana,enchantments,"WHERE id='$enchantment'");
$var1 = getInfo(var1,enchantments,"WHERE id='$enchantment'");
$var2 = getInfo(var2,enchantments,"WHERE id='$enchantment'");
$var3 = getInfo(var3,enchantments,"WHERE id='$enchantment'");
if ($spell == "revitalize") $e = "Enchanted to cast revitalize. Raises fatigue of a user by $var1 points.";
if ($spell == "calmAnimals") $e = "Enchanted to cast calm animals. Keeps all NPC creatures on whom this spell is cast from attacking anyone for $var1 hours.";
if ($spell == "divineIntervention") $e = "Enchanted to cast divine intervention. Has a $var2% chance to force a user into their untransformed state for $var1 posts. Requires the user's hair as an ingredient.";
if ($spell == "protection") $e = "Enchanted with protection from curses. $var1% chance of blocking a curse from being cast on the wearer.";
if ($spell == "trace") $e = "Enchanted to cast trace. Has a $var1% chance of revealing the building a user is in.";
if ($spell == "insomniac") $e = "Enchanted to cast insomniac. Will keep a user from passing out from fatigue or sleeping voluntarily until their fatigue drops to -$var1.";
if ($spell == "enrageBeasts") $e = "Enchanted to cast enrage beasts. Makes all NPC creatures on whom this spell is cast attack anyone including their owners and masters for $var1 hours.";
if ($spell == "demonicPossession") $e = "Enchanted to cast demonic possession. Has a $var2% chance of forcing a user into their transformed state for $var1 posts. Requires the user's hair as an ingredient.";
if ($spell == "raiseTheDead") $e = "Enchanted to cast raise the dead. Has a $var2% chance of bringing any corpse (NPC or PC) back to life as a $var1 health undead NPC creature under the caster's command.";
echo " $e";
}
echo ' | ';
echo '
';
echo '