|
Book Portal [by Ryan Stuck] |
|
|
|
Posted Wednesday, August 12th @ 11:24:48 PM, by George Greer in the Specials dept.
Added Apr 27, 1998. Click the link below to read it or download it.
From: Ryan Stuck <bosstone1@earthling.net>
Subject: Book Portals
Here is an example of what this code does. When You walk into a room where
A book is you type 'Read (book_name) and you get transferred into the
book. Well it seems that way. Its my first piece of code that i actually
wrote so have fun with it.
/**************************************************************************
* Read Book Special Proc. - spec_procs.c spec_assign.c *
* Copyright 1998 Ryan William Stuck (Bosstone) Ready *2* Die? MUD *
* Original Author: Ryan Stuck (Bosstone) *
* Feel free to use this in your mud. But please email me at *
* Bosstone1@earthling.net just to let me know its in. Please keep these *
* Credits in with this code. And insert me into the muds credits. *
**************************************************************************/
/* Insert this into spec_procs.c */
#define BOOK_ROOM 800
SPECIAL (book)
{
struct obj_data *obj = (struct obj_data *) me;
struct obj_data *port;
char obj_name[MAX_STRING_LENGTH];
if (!CMD_IS("read")) return FALSE;
argument = one_argument(argument,obj_name);
if (!(port = get_obj_in_list_vis(ch,obj_name,world[ch->in_room].contents)))
{
return(FALSE);
}
if (port != obj)
return(FALSE);
act("$n starts to read from a book and suddenly is sucked inside.", FAL
SE, ch, port, 0, TO_ROOM);
act("You start to read from a book and you suddenly are sucked inside",
FALSE, ch, port, 0, TO_CHAR);
char_from_room(ch);
char_to_room(ch, real_room(BOOK_ROOM));
look_at_room(ch, 0);
act("$n suddenly materializes from nowhere...", FALSE, ch, 0, 0, TO_ROO
M);
return(TRUE);
}
Well thats it. I hope it brings you happy times. This is my first snippet
i have made and it works fine with any version of CircleMUD. Well. Happy
mudding. -Ryan a.k.a Bosstone
<< Body Parts [by Patrick Dughi] | Reply | View as text | Threaded | Butcher code [by Mendar] >> |
|
Related Links |
|
|
|
CircleMUD Snippets |
|
|
Note: Not all of these snippets will work perfectly with
your version of code, so be prepared to fix one
or two bugs that may arise, and please let me know
what you needed to do to fix it. Sending a corrected
version is always welcome.
|
Finally, if you wish to use any of the snippets from this
page, you are more than welcome, just mention the
authors in your credits. If you wish to release any
of these snippets to the public on another site,
contact me FIRST.
|
|
|
|
|
|
|