The health of a player in the MudOS mudlib is measured in hit points. A player has a maximum number of hit points that he may have, which is set at creation time to be 25 + his constitution + a random number between 0 and 20. The current number of hit points is stored in the property "hit_points" and the maximum allowed is stored in "max_hp". If a player is at his maximum, he remains there unless someone or something damages him. If he is below his maximum, but above zero, he regains one hit point per 20 seconds. If his hit points fall below zero, the player dies and is turned into a ghost. Natural healing takes place in the procedure heal_up in /std/body/attack.c which is called in the heartbeat. heal_up keeps a running count of the number of calls made: every tenth call, it gives the player back one additional hit point and spell point, if he is below his maximum. You should not set the hit_points property directly. Instead you should call the receive_healing() lfun, also defined in /std/body/attack.c. It's a hook which lets the mudlib handle anything that needs to be done whenever healing is applied, mostly checking to see that max_hp is not exceeded. The maximum hit points a player may have does not go up in the game. The MudOS mudlib does not use the conventional system of level and experience points; instead, improvement is skill-based (see the help document on skills). Instead, each player has a defensive skill and the chance of his being hit, and the damage he takes, decreases as the player's defensive skills get better. Thus, instead of advanced players being able to take more damage, which is not especially realistic, they get hit less often and for less damage. Their maximum hits does not change. Besides natural healing, there are two ways a player may heal. First, he may buy bandages, healing elixirs, or other objects that will cause him to gain hit points. These objects can be used once and add a random number of hit points to his total. Second, the player may cast the heal spell on himself, or another player may cast it on him. This restores a number of hit points depending on the caster's skill and a random factor. The mudlib also comes with code to permit healing through drinking, although that code is commented out in the default distribution. Many people at TMI don't like the implications of having a healing system based on mass drunkenness, and we would encourage you not to use it in your mudlib. We think that between healing objects such as bandages and potions and healing spells (plus any NPCs you may make that dispense healing) players will be able to obtain healing adequately without alcohol. However, if you feel you must have pubs (sigh) you can install the alcohol system as well. To do this, you must do the following things. 1) In /std/living/attack.c, alter the procedure heal_up to decrease the player's drunkenness/hangover, as well as increase his hits and spell points. 2) Also in heal_up, change things so that hits and spells go up by rate instead of by one. 3) In attack.c, in execute_attack(), change the combat formula so that drunkenness reduces your hit probability. 4) In /cmds/std/_score.c, uncomment in the code to show the player's drunkenness. You'll also want to hook up the alcohol pub, /d/Fooland/drinkingpub.c so that players can get drinks... Drunkenness works like this. The player has a property "drunk" which keeps track of his sobriety. When drunk=0, he is sober. When the player buys a drink, two things happen. First, he gets an immediate hit point gain, the amount depending on the drink. Second, his drunk property is increased. The number of hit points the player gets back when he heals up is given by (drunk/5)+1. Each time the player heals up, his drunk property is reduced by one, until it reaches 1. When it reaches one, the player develops a hangover and the drunk property goes from 1 to -5. Thereafter the drunk begins to go up, until it reaches 0 and the player is fully sober again. Mobydick@TMI-2 11-16-92