Welcome to the Builder Academy

Question What is wrong with this Vs. tbamud code

More
05 Apr 2013 23:56 #1812 by JTP
/* Insert this into spec_procs.c */
#define BOOK_ROOM 2306

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))) /* <-- something isnt right with this line */
{
return(FALSE);
}

if (port != obj)
return(FALSE);

act("$n starts to read from a book and suddenly is sucked inside.", FALSE, 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_ROOM);
return(TRUE);
}

Please Log in or Create an account to join the conversation.

More
06 Apr 2013 00:59 #1813 by Rumble
Not sure, but the same thing could be done much more easily with trigedit. TSTAT 100 or HELP PORTAL.

Rumble
The Builder Academy
tbamud.com 9091
rumble@tbamud.com

Please Log in or Create an account to join the conversation.

Time to create page: 0.381 seconds