Re: [code] poofin special command

From: Rasmus 'Con' Ronlev (raro94ab@hp4.econ.cbs.dk)
Date: 02/23/97


On Sun, 23 Feb 1997, Adam Beytin wrote:

> Now, if you type in 'poofin ?' it will tell you 'THIS DOESN'T WORK YET!!'
> I had to put it that way, because I couldn't figure out how to get it to
> display your current poofin/poofout, and this is much harder because both
> types of poofs are under the same ACMD type.
> All I need to know is what to put in place of the
> send_to_char("THIS DOESN'T WORK YET!!\r\n", ch);

Well, I'm going to force some code down your throat *cackle* :)

ACMD(do_poofin)
{
  skip_spaces(&argument);
  if(!*argument)
  {
    send_to_char("Your poofin is: \r\n", ch);
    sprintf(buf, "%s %s", GET_NAME(ch), GET_POOFIN(ch));
    send_to_char(buf, ch);
  }
  else
  {
    send_to_char("You poofin is now: \r\n", ch);
    sprintf(buf, "%s %s", GET_NAME(ch), argument);
    send_to_char(buf, ch);
    strcpy(GET_POOFIN(ch), argument);
  }
}

The only thing you need to change is the poofin's to poofouts thruout'
this code, and it will do the 'right' thing with the poofout thing as
well. This code simply just displays the existing poof, when no argument
is given. If you don't want that - like you wan't to be able to reset the
poof, you should (in my oppinion) use a:

skip_spaces(&argument);
if(*argument == '?')
  blahblah....

statement instead.... just my three cents :)

Oh yes, and this code, as all other stuff is MailerCode (tm:)

Regards,
Con

d.
--
     Rasmus Rønlev DOEK'94      WWW: http://www.econ.cbs.dk/people/raro94ab
     Student instructor         MUD: exiled.mud.circlemud.org 5000
                                         199.199.16.100 5000
       Student, B.Sc in Computer Science and Business Administration.

+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
|    Or send 'info circle' to majordomo@cspo.queensu.ca     |
+-----------------------------------------------------------+



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