Re: Named Exits help

From: Brandon Brown (BBrown@uasoft.com)
Date: 09/24/00


Griffin,

> Hello, I am new to being an IMPL, I know how to code, but very little.
> I have searched the web for a snippet or a piece of code that allowes
named
> exits. I so far havent found anything. By named exits i mean, go shop
> go palice, ect... If anyone would be kind enough to tell me how to do this
> I would be VERY grateful. I am using windows 98 and MSC++6, Please help.

    I coded this a while ago - 'borrowed' the idea from a game called Modus
Operandi.  It's actually enormously simple and I did it when I had an even
weaker grip on the code than I do now.

    Look at your current movement and directions code - herein is where I
added mine.  I'm not going to give you the actually code for two reasons a)
you'll never learn anything b) my code is so incomprehensible with commented
out parts here and there it's simply not worth translating. ;)  But here's
how I went about doing it:

    Add two or three new exits (go, go-a, go-b), etc, depending on how many
go exits you'd like to exist in a room.

    Create a go command to look for these exits and move players around if
they exist.

    Really simple :)  This probably isn't the best way to do it - I'm sure
there's easier and less draining ways - but it's how I pulled it together
and it works quite nicely for me :)  I used the gen-desc to hold a string
that'd show:

sprintf(buf2, "$n %s %s", GET_LASTNAME(ch), (EXIT(ch,
GO)->general_description));

    Which helps to differentiate between different exits - rather than
taking the whole '$n has left the room' approach which is so horribly boring
;)

    Anyways, hope that helps :)

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  B. Brown                                                     TimeTraveller
  Senior Programmer                                      'Lost in Time,
  U&A Software InterActive                            'and Loving it!'
  http://www.uasoft.com/staff/bbrown/         http://www.uasoft.com/
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-


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



This archive was generated by hypermail 2b30 : 04/11/01 PDT