';
echo '';
echo '';
$conditions = "WHERE id='$slave'";
$roomId = getInfo(room,users,$conditions);
$room = getInfo(name,rooms,"WHERE id='$roomId'");
$placeId = getInfo(location,users,$conditions);
$place = getInfo(name,places,"WHERE id='$placeId'");
$townId = getInfo(town,users,$conditions);
$town = getInfo(name,towns,"WHERE id='$townId'");
$max = numRows(posts);
$userLocation = getInfo(location,users,"WHERE id='$slave'");
if (getInfo(id,fires,"WHERE room='$roomId'")) $font = " color=#f97400";
if (getInfo(id,fires,"WHERE place='$placeId'")) $placefont = " color=#f97400";
if (isFighting($userId) == "defense") $font = " color=#FF0000";
if (getInfo(user,travels,"WHERE user='$slave'")) {
$left = getInfo(arrival,travels,"WHERE user='$slave'") - time();
if ($left > 0) {
$hours = truncate($left / 3600);
$left = $left - ($hours * 3600);
$minutes = truncate($left / 60);
$seconds = $left - ($minutes * 60);
echo $slaveName.' is currently travelling. '.$slaveName.' will arrive in '.$hours.' hours, '.$minutes.' minutes and '.$seconds.' seconds.';
} else echo $slaveName.' is currently travelling. '.$slaveName.' will arrive in less than a minute\'s time.';
} elseif (getInfo(destination,place_travels,"WHERE place='$userLocation'")) {
$path = getInfo(path,place_travels,"WHERE place='$place'");
$path = explode('.',$path);
$time = count($path) * (20 * 60);
$time += getInfo(time,place_travels,"WHERE place='$place'");
$left = $time - time();
if ($left > 0) {
$hours = truncate($left / 3600);
$left = $left - ($hours * 3600);
$minutes = truncate($left / 60);
$seconds = $left - ($minutes * 60);
if ($place) echo ' '.$place.'';
if ($place && $room) echo ' > ';
if ($room) echo ''.$room.'. Travelling (by ship/caravan). Arrival in '.$hours.' hours, '.$minutes.' minutes and '.$seconds.' seconds.';
} else {
if ($place) echo ' '.$place.'';
if ($place && $room) echo ' > ';
if ($room) echo ''.$room.'. Travelling (by ship/caravan). '.$slaveName.' will arrive in less than a minute\'s time.';
}
} else {
echo 'Currently In : ';
if ($town) echo ''.$town.'';
if ($town && $place) echo ' > ';
if ($place) echo ''.$place.'';
if ($place && $room) echo ' > ';
if ($room) echo ''.$room.'';
}
echo " ";
$sex = getInfo(sex,users,"WHERE id='$slave'");
if ($sex == "m") $gender = "Male";
if ($sex == "f") $gender = "Female";
$status = getInfo(status,users,"WHERE id='$slave'");
$status = capitalize($status);
$job = getInfo(mode,npcs,"WHERE name='$slave'");
$health = getInfo(health,users,"WHERE id='$slave'");
$type = getInfo(type,npcs,"WHERE name='$slave'");
$movement = getInfo(movement,npcs,"WHERE name='$slave'");
$var = getInfo('var',npcs,"WHERE name='$slave'");
if ($movement == "wander") $move = "Wander aimlessly";
if ($movement == "follow") $move = "Follow ".getInfo(username,users,"WHERE id='$var'");
if ($movement == "") $move = "Stay in the same room";
if (getInfo(npc,npc_travel,"WHERE npc='$slave'")) $move = "Travelling";
$attacked = getInfo(counter,npcs,"WHERE name='$slave'");
if ($attacked == "") $attack = "Stand ground";
if ($attacked == "run") $attack = "Run away";
if ($attacked == "fight") $attack = "Fight back";
$fire = getInfo(fire,npcs,"WHERE name='$slave'");
if ($fire == "nothing") $fire = "Do nothing";
else $fire = "Extinguish";
echo "Gender : $gender ";
echo "Status : $status ";
echo "Health : $health/$type ";
echo "Movement : $move ";
echo "If Attacked : $attack ";
echo "Reaction to fire : $fire ";
echo "Current Job : ";
if ($job == "siege") {
$target = getInfo(target,npc_siege,"WHERE npc='$slave'");
$weapon = getInfo(weapon,npc_siege,"WHERE npc='$slave'");
$weaponType = getInfo(type,arsenals,"WHERE id='$weapon'");
$weaponType = getInfo(name,weapons,"WHERE id='$weaponType'");
$ammo = getInfo(ammo,npc_siege,"WHERE npc='$slave'");
$ammoType = getInfo(type,ammo,"WHERE id='$ammo'");
$ammoType = getInfo(name,ammunition,"WHERE id='$ammoType'");
$targetName = getInfo(name,places,"WHERE id='$target'");
if ($target) echo "Fire $weaponType [$weapon] ($ammoType) at $targetName ";
else echo "Man $weaponType [$weapon] ($ammoType) and return fire if attacked ";
}
if ($job == "protect") {
$protect = getInfo('var',npcs,"WHERE name='$slave'");
$protect = getInfo(username,users,"WHERE id='$protect'");
echo "Protect $protect ";
}
if ($job == "sell") {
echo "Automatically tend to the selling of items, if the npc is an employee in its current location ";
}
if ($job == "mine") {
echo "Automatically mine the crude resources in the room.";
}
if ($job == "forrage") {
echo "Pick up one item from the room every hour.";
}
if ($job == "") {
echo "This NPC is not set to do anything";
}
echo '';
echo ' | ';
echo '
';
echo '