Re: [Newbie] Positions..

From: Phillip A. Ames (kirk47@juno.com)
Date: 11/11/98


On Wed, 11 Nov 1998 01:31:58 -0800 A Chyld <chyld@ELWHA.EVERGREEN.EDU>
writes:
>    ..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..
>
>    ..But now I'm pretty much stuck - I'm not sure how to add the
>command itself, or where it should go (haha)..I've already got races
>defined in structs.h, ect. as per the races snippet..So - I know this
>can't be explained in a simple one word response, but I was hoping
>someone out ther could give me a little more direction..
>
>                                                Jonathan Grant

Search for POS_STANDING or something....  Then look at how that code is
put together, copy it, paste it somewhere else, and then modify it to
your own needs.  Then, go to interpreter.c, copy the entry like "stand"
and then change it to something like {"fly", do_fly, 0, 0},   assuming
that you named the function do_fly.  As to where to put it, just make
sure you prototype it in interpreter.c...  If I were you I'd stick it in
act.other.c just because thats where I stick everything I dunno where I
should put it :)  You'll need to put a check in the command, something
like:
if(GET_RACE(ch) == RACE_PIXIE){
        send_to_char("You're not likely to be sprouting wings anytime
soon.\r\n", ch);
        return;
}

Hope that helps!

-Phillip


Phillip Ames    | Satisfaction is not guaranteed.
kirk47@juno.com | -Ferengi Rule of Acquisition #19
ICQ: 8778335    | AOL IM: Grathol
http://members.xoom.com/Gowron/index.html(Unfinished)

___________________________________________________________________
You don't need to buy Internet access to use free Internet e-mail.
Get completely free e-mail from Juno at http://www.juno.com
or call Juno at (800) 654-JUNO [654-5866]


     +------------------------------------------------------------+
     | 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