Re: OUTLAW Function

From: Colin R. James (jamesc@limestone.kosone.com)
Date: 01/03/96


On Wed, 3 Jan 1996, Brian Christopher Guilbault wrote:

> And Another Question for You All-
> 

 in interpreter.c use these lines:

  { "outla"     , POS_DEAD     , do_outlaw     , 1, 0 },
  { "outlaw"    , POS_DEAD     , do_outlaw     , 1, SCMD_OUTLAW },

That should just about do it, the rest of the function looks fine at 
a glance, I've been awake for 20 hours so I _think_ this is it.


> > 
> 
> /* in interpreter.c command list */
> { "outlaw"     , POS_DEAD    , do_outlaw     , 1, 0 },
> 
> /* the actual function */
> ACMD(do_outlaw) /* function created by xyzzy for outlaws */
> {
> 
>     if (subcmd != SCMD_OUTLAW) {   /* Safety feature added by Dante */
>     send_to_char("Becoming an OUTLAW is a serious matter. You must\r\n", ch);
>     send_to_char("type the entire word 'outlaw'. You may also want\r\n", ch);
>     send_to_char("to read 'help outlaw' before continuing with this.\r\n", ch);
>     return;
>     }
> 
>   if (PLR_FLAGGED(ch, PLR_OUTLAW))
>   {
> 	send_to_char("You're already an outlaw. No turning back.\n\r",ch);
> 	return;
>   }
>   if(IS_AFFECTED(ch, AFF_CHARM))
>   {
> 	send_to_char("You cannot become an OUTLAW while charmed.\n\r",ch);
>   	return;
>   }
>   if (GET_LEVEL(ch) < 15)
>   {
>         send_to_char("You are to low of a level, you may die instantly.\n\r",ch);
>         return;
>   }
> 
>     send_to_char("Are you absolutely certain that you wish to become an OUTLAW?\r\n
> 	       You can kill or be killed as an OUTLAW!  That is your warning\r\n
>                Type 'yes' to become OUTLAW, or 'no' to keep from being OUTLAW: ", ch); 
> 
>     if (!strcmp(arg, "yes") || !strcmp(arg, "YES")) {	
>     SET_BIT(PLR_FLAGS(ch),PLR_OUTLAW);
> 	send_to_char("You are now an outlaw, there is no turning back!\n\r",ch);
> 	return;
>   }
> }   
> 
> 
> 



This archive was generated by hypermail 2b30 : 12/07/00 PST