mload
mload <vnum> [room] [max]
Load a new mobile into a room.
A fresh copy of the mobile with the given vnum is created and placed in a
room. With no room given, it appears in the owner's current room. The
optional max limits how many of that mobile may exist before the load is
refused. The new mobile's own load handler fires.
Arguments
<vnum>— the prototype vnum to load. If no prototype has that vnum, the load fails (and so does not suppress the default action).[room]— the destination room. Defaults to the owner's room.[max]— the maximum number of this mobile allowed in the world; the load is refused if that many already exist. Defaults to (and is capped at) the system limit.
Returns
null. Like the other action commands, a
successful mload in the handle phase suppresses the event's default
action. A failed load (unknown vnum, or the max limit reached) does
not suppress it.
Examples
after command (say) {
mload 1
}
Mobile vnum 1 is loaded into the owner's current room. The script compiles and runs to completion.
handle command (cast) {
mload 1 [room $actor]
}
The mobile is loaded into the actor's room instead (see room).
See also
oload— load an object.selfpurge— a loaded mob removing itself.mob— look up a mobile prototype without loading it.- Handlers, events, and phases