first, I'd (did :) make another object type, item_portal. Then make a nice, all purpose virtual object for the portal. #138 portal~ the portal~ A shimmering portal floats here before you.~ item_portal 0 0 0 0 0 0 0 0 0 0 so, when you go to make the spell, create_portal or whatever, make it tar_obj_world | tar_char_world. (thats in SPELLO in spell_parser). in spells.c (this is a manual spell), make sure you have a target, be it mob or obj, load up a copy of your portal item, and set one of the values = victim->in_room or object->in_room. like this: struct obj_data *portal; portal = read_object(138, VIRTUAL); if (victim) GET_OBJ_VAL(portal, 0) = victim->in_room; else if (object) GET_OBJ_VAL(portal, 0) = object->in_room; if (portal) obj_to_room(portal, ch->in_room); act("$p materializes at the center of the room.", FALSE, ch, portal, 0, TO_ROOM); then you wanna go to do_enter in act.movement.c and make the function check for the existence of a portal object in the room, and see if the player's argument is the name of the portal. If so, move the char to the room number (this is a REAL room numbe) specified. You probably need to take precautions against indefinite portals, or players renting portals (especially if you use real room numbers). Fireball
This archive was generated by hypermail 2b30 : 12/07/00 PST