Here is the meditate command, as coded by Plasma
(morrisal@pirates.armstrong.edu or Kaneda69@hotmail.com)
for AAEKILLA (mud.usacomputers.com 4000).

All I ask is that if you use this code, keep my name and
email in the comments, and email me any bugfixes or patches
for other code bases, as I will be glad to add them.

                Thanks,
                                -Plasma



For the meditate command, which gives clerics (And other
relegion based classes (such as monk)) the ability to
regain their hit points.  At the cost of their movement

#define		hpcost		3


void	do_meditate( CHAR_DATA *ch, char *argument)
{
	int	diff;/*Difference In Characters Max hp to hp*/
	int	price;/*How Much will it cost*/
	int	afford;/*If they can't do it all, how much can they afford */


	  if ( !IS_NPC( ch )
        	&& ch->level < skill_table[gsn_meditate].skill_level[ch->class] )
          {send_to_char("Go join the Church!!!", ch);
                return;}

	if (ch->position != POS_RESTING )
		{send_to_char("You MUST rest first!", ch);
			return;}


	if( ch->hit >= ch->max_hit )
		{send_to_char("Why bother, you're already at full health", ch);
			ch->move -= ch->move / 4;
			return;
		}

	diff = ch->max_hit - ch->hit;
	price = hpcost * diff;

	if (ch->move >= price)
		{send_to_char("You Levitate and Feel Fine", ch);
		 ch->hit = ch->max_hit;
		 ch->move -= price;
		return;
		}

	afford = ( (ch->move - (ch->move % hpcost) ) / hpcost );
	price = afford * hpcost;

	ch->hit += afford;
	ch->move -= price;

	send_to_char("You Levitate from the ground and feel better", ch);
	return;

}	



