re: dig/copyto

From: George (greerga@dragon.ham.muohio.edu)
Date: 12/03/96


On Tue, 3 Dec 1996, Brian Williams - Nashak wrote:

>i.e. dig south 15053 would make a south exit to room 15053, and a north
>exit from 15053 to the room you are in.. and copyto just copies to

Off the top of my head, these should work, or come close...

[assuming no olc at all...]
ACMD(dig)
{
  [checks, can they do this, are rooms valid, the exit array exists, etc]
  r_* = real number, v_* = virtual number

  world[r_from_room].dir_option[dir]->to_room = v_to_room;
  world[r_to_room].dir_option[rev_dir(dir)]->to_room = v_from_room;
}

>description "copyto 1204 1205" would make 1205 desc same as 1204.. thanks
>to those who attempt to help me...

ACMD(copyto)
{
  [various checks here, like are they allowed to do this]

  /* If the target room has a description, remove it */
  if (world[r_room].description)
    free(world[r_room].description);

  /* Now create a copy of the source room and tack it on the target */
  world[r_room].description = str_dup(world[r_other_room].description);
}


+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST