IMM_SCRIPTCOPY
Keywords: IMM_SCRIPTCOPY, WIZ_SCRIPTCOPY
=== STAFF MANUAL ===
Usage: scriptcopy <source vid> <destination vid>
Description:
Duplicate a script (trigger) prototype to a fresh virtual ID.
The new prototype is a deep copy of the source's TrigData --
name, trigger type, narg, argument list, compiled bytecode,
and the complete command list all come along. The copy is
installed into trig_index immediately, and the destination
zone is marked dirty so its .trg file is rewritten on the
next OLC save pass.
Unlike mcopy / ocopy, which carry per-prototype side-car
data (trigger lists, behavior sets, initial globals) from the
source to the copy, scriptcopy only duplicates the trigger
itself. There is no side-car to copy -- the trigger IS the
thing being duplicated.
Arguments:
<source vid> ..... Virtual ID of the source script. Short
form :<number> inherits the zone from
the current room; full
<zone>:<number> targets any zone.
<destination vid> Virtual ID the new prototype will
occupy. Short form inherits the source
VID's zone rather than the current
room's.
Output:
On success the invoker sees:
Copied script <src> to <dst>.
And the staff wiznet records:
OLC: <name> copies script <src> to <dst>
Restrictions:
- Requires the Script staff permission and build
access to the destination zone.
- Both arguments are required. Omitting one prints
the shared usage line for the whole copy family:
"Usage: [rcopy|ocopy|mcopy|scriptcopy] <source>
<destination>".
- The destination VID must be well-formed and its
zone must already exist; otherwise the command reports
"Invalid destination VirtualID." or "The destination
zone does not exist.".
- The source script must already exist
("Source script not found.").
- The destination must be empty -- scriptcopy refuses
to overwrite:
"You cannot copy over an existing script."
Notes:
- The zone save is deferred. Your edit is live
immediately, but the new prototype only hits disk on
the next OLC save for the destination zone -- usually
as soon as you quit out of an editor or run
massolcsave.
- Unlike scriptmove, scriptcopy does not chase
world-wide references to the source VID. Mob trigger
lists, object trigger lists, and T zone resets that
referenced the source still point at the source, not
at the copy -- you must attach the copy yourself via
medit / oedit / zedit if you want those entities
to use the new VID.
- The copy is independent of the source: rewriting
the original afterwards does not touch the copy, and
vice versa.
Related Helpfiles: WIZ_MCOPY, WIZ_OCOPY, WIZ_RCOPY
=== END MANUAL ===