%clone()

Aliases%clone( )
Parametersmixed @entity

    Clones the given entity and returns a pointer to it. Currently only items
and rooms can be cloned.

Items:

If the script owner is a mobile then the clone will be placed in their
inventory, otherwise it will be placed in the same room as the script
owner (or @roomId). You can feel free to move it wherever you want via
the returned pointer.

Example:

@clone = %clone( @o ) // Clone whatever @o is.
%move( @clone, 115611 ) // Move to Elkin fountain room.

Rooms:

Due to the nature of rooms being unique, when you clone a room you
create a duplicate room in almost every way. However, the room's ID
will be assigned from the available pool of free assingment room IDs.
Additionally, only triggers that have labels will be cloned for the
room. Cloned triggers are facilitated through the trigger assignment
engine, which means that a reload of the area for the master room will
update the triggers for the clone-- this will kill any running scripts
and so you should be sure to re-generate any necessary scripts if this
is an issue for your room (see the on_area_load trigger).

Example:

@shelterRoomId = 123456

@clone = %clone( @shelterRoomId )

@exit = %load( exit, down, @shelterRoomId, @clone->id )
@exit->flags->isNoDirection = true

%echo( "You have finished building your shelter." );
%echo( "You can now 'enter' it." );