----- Original Message ----- From: "Jon Ridgwell" <j.ridgwell@virgin.net> > >ACMD(do_goto) > >{ > > room_rnum location; > > > >+ if (GET_LEVEL(ch) < LVL_IMPL) { > >+ if (ROOM_FLAGGED(location, ROOM_IMPLONLY)) { > >+ send_to_char("You are not godly enough to use that room!\r\n", ch); > >+ return; > >+ } > >+ } > > > > > > if ((location = find_target_room(ch, argument)) < 0) > > return; > > > You need to put your added code in here, after location has been initialized > with data. It'll work fine then =] For consistency, I prefer to put the code inside find_target_room, but what you have certainly works. Also, don't forget this: ASPELL(spell_teleport) { room_rnum to_room; if (victim == NULL || IS_NPC(victim)) return; do { to_room = number(0, top_of_world); - } while (ROOM_FLAGGED(to_room, ROOM_PRIVATE | ROOM_DEATH | ROOM_GODROOM)); + } while (ROOM_FLAGGED(to_room, ROOM_PRIVATE | ROOM_DEATH | ROOM_GODROOM | + ROOM_IMPONLY)); I also have ROOM_HOUSE in mine...not sure why the stock code doesn't. Anyway, this will prevent accidental intrusions by both mortals and immortals. Mike -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/06/01 PST