IMM_ATTACH
Keywords: IMM_ATTACH, WIZ_ATTACH
=== STAFF MANUAL ===
Usage: attach mtr <script vid> <mob>
attach otr <script vid> <object>
attach wtr <script vid> <room vid>
Description:
Attach a script prototype to a live entity. Unlike the
attachments that come from an entity's prototype or from a
zone reset, the trigger added by attach is instance-only --
it rides on this specific live mob, object, or room and is
gone once the target is extracted, reset, or the server
reboots. Use it to hot-patch a running mob during an event,
drop a one-shot trigger on a test object, or inspect how a
script behaves without editing the prototype.
Target Types:
mtr ......... Mob trigger. The third argument is a
character name, resolved with normal world
visibility. Staff targets are refused with
"Staff can't have scripts.".
otr ......... Object trigger. The third argument is an
object name, resolved against your
inventory, your equipment, and the current
room -- any object visible to you.
wtr ......... World (room) trigger. The third argument
must be a room VID. Room lookup uses
find_target_room, so any visible room
reachable by VID works. A plain room name
returns "You need to supply a room number.".
Output:
On success the invoker sees:
Trigger <vid> (<script name>) attached to <target>.
Where <target> is the mob's name, the object's short
description (falling back to its keywords), or the room's
VID.
Common failure messages:
That trigger does not exist.
That mob does not exist.
That object does not exist.
Please specify 'mtr', 'otr', or 'wtr'.
Restrictions:
- Requires the Script staff permission.
- All three arguments (type, trigger vid, target)
are required; any missing argument reprints the usage
line.
- mtr attachments on staff characters are explicitly
refused -- staff cannot carry scripts.
Notes:
- The attached trigger is a fresh TrigData instance
built via TrigData::Create. Each attach creates a
new instance, so stacking the same script multiple
times on the same target is allowed.
- Because the attach is live-state only, it does not
survive a zone reset or reboot. To make a script part
of a prototype permanently, add the VID through the
appropriate medit / oedit / zedit entry.
- To remove an attached trigger later, use detach
with the matching target and either the trigger's
name or the literal keyword all.
Related Helpfiles: WIZ_DETACH, WIZ_VATTACHED
=== END MANUAL ===