Re: [Newbie] Positions..

From: Bo Young (Jeepster11@email.msn.com)
Date: 11/13/98


Hope this is kinda what you are lookin' for.  Only thing is like Aaron
said if someone casts a fly spell, when the spell wears off you are no
longer flying, but big deal , just fly again :-) ...  If anyone wants to
improve
this, go ahead and resubmit it...

               >>----------------------Bo-------------------------->Young


A Chyld wrote:
>
>     ..Ok, so I'm trying to add a position to my mud..I'm adding
> POS_FLYING..Basically, I've added a pixie race, and I want Pixies to be
> able to fly without having to cast a spell - just by typing fly..I've
> added POS_FLYING to stucts.h and I've added "is hovering here." to
> act.informative.c..

// Oh yeah make sure you prototype wherever you put it and also add it in
interpreter.c

ACMD(do_fly)
{

if((GET_RACE(ch) != RACE_PIXIE) || (GET_RACE(ch) != RACE_DRAGON))
   {
    send_to_char("How do you expect to fly? You can barely walk!\r\n", ch);
    return;
   }

if(GET_MOVE(ch) < 30)
    {
    send_to_char("You do not have enough energy right now.\r\n", ch);
    return;
 }

if (AFF_FLAGGED(ch, AFF_FLIGHT))
   {
 if (GET_POS(ch) == POS_FLYING) {
      act("You begin to slowly drift to the ground.", FALSE, ch, 0, 0,
TO_CHAR);
      act("$n begins to slowly drift to the ground.", TRUE, ch, 0, 0,
TO_ROOM);
      GET_POS(ch) = POS_STANDING;
 }
 REMOVE_BIT_AR(AFF_FLAGS(ch), AFF_FLIGHT);
    return ;
    }

 SET_BIT_AR(AFF_FLAGS(ch), AFF_FLIGHT);

    if (GET_POS(ch) >= POS_SLEEPING) {
      act("You begin to float.", FALSE, ch, 0, 0, TO_CHAR);
      act("$n begins to float.", TRUE, ch, 0, 0, TO_ROOM);
      GET_POS(ch) = POS_FLYING;
 }

  return;
}


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
     +------------------------------------------------------------+



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