# DISPLAYCURRENTCHAR # # diplay the picture and basic values of the character # # must be fed with all basic and secondary values calculated by fetchcurrentchar.inc # can give access to planning with $searchcurrentchar <> "no" # can display extensive stats of the character when fed with $ext="yes" # can display small pictures of people in same building with links with $displayneighbours="yes" # can display visited picture building and link for exit to town with $showcurrentbuilding="yes" $factor = 3; # reduction factor for character sprites ?>
|
|
# display the character short summary besides his picture
if (!$notmyown) { echo ""; }
echoAL("".$name."");
if (!$notmyown) { echo ""; }
echoA(" Level ".$level." ".$racename." ".$classname); echo " \n"; echoA ("Hit points="); if ($hp <= 0) { echoA ("".$hp.""); } else { echoA ($hp); } echoA ("/".$hpmax); if ($hp <= -10) { echoA(", dead"); } else { if ($hp <= 0) { echoA(", unconscious"); } } if ($deathpenalty > 0) { echoA(", Vitae=-".$deathpenalty.""); } echo " \n"; $b1 = $xp - $TXPlevel[$level-1]; $b2 = $TXPlevel[$level] - $TXPlevel[$level-1]; $per = (int)(100*$b1/$b2); echoA($xp." XPs (".$per."%) \n"); echoA ($totalgold." gold \n"); if ($weapon <> 0) { echoA ($Tweapon[$weapon]." in hand, "); } else { echoA ("Bare hands, "); } if ($armor <> 0) { echoA ("wearing ".$Tarmor[$armor]); if ($shield <> 0) { echoA (" and "); } } if ($shield <> 0) { echoA ("holding ".$Tarmor[$shield]); } if (($armor == 0) and ($shield == 0)) { echoA ("in clothes"); } echo " \n"; # allow access to planning if the character is the user's current one if ($searchcurrentchar <> "no") { # fetch and display current turn include Inc("fetchthetick.inc"); echoA (GiveDate($turn + $pi, "complete")." \n"); if (!$notmyown) { echo "
|
if ($admitentrance == "yes") { $result = mysql_query("SELECT * FROM Towns WHERE MapX='$xmap' AND MapY='$ymap'"); if (mysql_num_rows($result) <> '0') { $row = mysql_fetch_array($result); $townname = $row["Name"]; echo ""; echoAL("Enter ".$townname); echo ""; } } # if wanted display the visited building, with a link to go back to the city if ($showcurrentbuilding == "yes") { if ($hp <= 0) { echoA("Being unconscious, you cannot exit your location"); } else { $result = mysql_query("SELECT * FROM Buildings WHERE Id=$v"); $row = mysql_fetch_array($result); $imagegif = $row["Gif"]; $imagealt = $row["AltTxt"]; $size = GetImageSize (Inc($imagegif)); $sizeX = $size[0]; $sizeY = $size[1]; echo ""); } } ?> |
| ";
echoA("also in the building : "); /* echo ""; echoAL("Chat"); echo "";*/ echo " | ";
while ($row=mysql_fetch_array($result)) {
$idperso = $row["Id"];
$nameperso = $row["Name"];
$imageperso = $row["Image"];
$size = GetImageSize (Inc($imageperso));
$charsizeX = (int)($size[0]/$factor);
$charsizeY = (int)($size[1]/$factor);
echo " |
| "; echoA("Strength"); echo " | "; echoA("Dexterity"); echo " | "; echoA("Constitution"); echo " | "; echoA("Intelligence"); echo " | "; echoA("Wisdom"); echo " | "; echoA("Charisma"); echo " |
| "; echoA($att[$i]); echo " | "; } echo "