Help Entries starting with 'V'
@verb
- @verb <victim>=<actor>,<what>,<whatd>,<owhat>,<owhatd>,<awhat>,<args>
This command provides a way to do user-defined verbs with associated @attr/@oattr/@aattr groups. Invoking it does the following:
<actor> sees the contents of <victim>'s <what> attribute, or
<whatd> if <victim> doesn't have a <what>.
Everyone in the same room as <actor> sees the contents of
<victim>'s <owhat> attribute, with <actor>'s name prepended,
or <owhatd>, also with <actor>'s name prepended, if <victim>
doesn't have an <owhat>.
<victim> executes the contents of his <awhat> attribute.
By supplying up to ten <args>, you may pass those values on the stack (i.e. %0, %1, %2, etc. up through %9).
See "help @verb2" for more.
@verb2
In order to use this command, at least one of the following criterion
must apply:
1. The object which did the @verb is a wizard.
2. The object which did the @verb controls both <actor> and <victim>
3. The thing which triggered the @verb (such as through a $command on
the object which did the @verb) must be <actor>, AND the object
which did the @verb must be either privileged or control <victim>
or <victim> must be VISUAL.
See "help @verb3" for examples.
@verb3
Examples:
&VERB_EXAMPLE Test Object=$test:@verb me=%#,TEST,You just tested.,OTEST,
just tested the example.,ATEST,%N
test
> You just tested.
> [others see] Cyclonus just tested the example.
&TEST Test Object=You have just tested this object! &ATEST Test Object=@emit %0 has failed! &OTEST Test Object=tests test object. test > You have just tested this object! > [others see] Cyclonus tests test object. > Cyclonus has failed!
Another example follows in "help @verb4"
@verb4
In order to make this into a global command that anyone can use, we need to put it on a WIZARD object in the Master Room.
&DO_TEST Global=$test *:@select locate(%#,%0)=#-1,
{@pemit %#=I don't see that here.},
{@verb locate(%#,%0,n)=%#,
TEST,You test [capstr(%0)].,
OTEST,tests [capstr(%0)].,
ATEST}
&TEST Example=You test this fun example. &ATEST Example=POSE has been tested! test example > You test this fun example. > [others see] You test Example. > Example has been tested!
@version
@version Tells the player the name of the MUSH, which version of the code is currently running on the system, when it was compiled, and when the last restart was.
@VRML_URL
This provides an object (usually a room) with a VRML world. When a Pueblo-user enters this object, the VRML World listed in @VRML_URL will be loaded.
Example: @VRML_URL here=http://www.pennmush.org/pennmush.vrml
To learn about the VRML Format, have a look at the Pueblo Help, which mentions several good sites for learning.
V()
- V(<name of attribute>)
- V(<variable name>)
The first form of this function works just like get(me/<attribute name>). It is faster and more efficient than get(), however, and so it's better to use v() when you are getting attributes off an object or its parents.
The second form of this function provides a different way of getting the results of %-substitutions like %#, %N, %0, etc. Simply take the variable name (whatever follows the % symbol) and put it inside the v() function:
v(N) is equivalent to %N
v(!) is equivalent to %!
v(3) is equivalent to %3
VADD()
- vadd(<vector>, <vector>[,<delimiter>])
Returns the sum of two vectors. A vector is a list of numbers separated by spaces or a delimiter.
Example:
> think vadd(1 2 3,4 5 6)
5 7 9
> think vadd(0|0|0,1|2|3,|)
1|2|3
VALID()
- valid(<category>, <string>)
The valid() function checks to see if <string> is a valid member of <category>, and returns 1 if it is, 0 if not, and #-1 if an invalid category is used.
The categories are:
name Test for a valid object name.
attrname Test for a valid attribute name.
playername Test for a valid player name that can be set with
@name or @alias.
password Test for a valid password.
command Test for a valid command name for @command/add
function Test for a valid function name for @function
Example:
> think valid(name,Foobar)
1
> think valid(attrname,Foo bar)
0
VCROSS()
- vcross(<vector>, <vector>[,<delimiter>])
Returns the 3-dimensional vector that is the cross product of its 3-dimensional argument vectors. The cross product is defined as:
x = Ay * Bz - By * Az
y = Az * Bx - Bz * Ax
z = Ax * By - Bx * Ay
Example:
> think vcross(4 5 6, 7 8 9)
-3 6 -3
VDIM()
- vdim(<vector>[,<delimiter>])
Returns the dimensionality of a vector.
Example:
> think vdim(1 2 3 4)
4
VDOT()
- vdot(<vector>, <vector>[,<delimiter>])
Returns the dot product of two vectors. A dot product is the sum of the products of the corresponding elements of the two vectors, e.g. vdot(a b c,d e f) = ad + be + cf. The vectors must be of the same length.
Example:
> think vdot(1 2 3,2 3 4)
20
VERBOSE
Flag: VERBOSE (all types)
An object set VERBOSE echoes the commands it executes to its owner before executing them. This differs from the PUPPET flag in that the owner sees the command itself, rather than the output from the command. This flag is extremely useful in debugging, especially if used in conjunction with the PUPPET flag. VERBOSE output follows the format "#<object>] <command>". Something like "#1300] @trigger me/test" is a good example of typical VERBOSE output.
VERBS
For most verbs there are three forms: Verb (what the Enactor sees), Overb (what others in the area see) and Averb (the action to be taken when the event happens). Example: @Drop, @Odrop and @Adrop
VERSION()
version() returns a string which contains various version information for the MUSH you're on. numversion() returns an integer representation of the version/patchlevel which can be used for softcode comparison.
Example:
> say version()
You say "PennMUSH version 1.8.1 patchlevel 4 [12/06/2005]"
> say numversion()
You say "1008001004"
VISIBLE()
- visible(<object>, <victim>[/<attribute>])
If no attribute name is provided, this function returns 1 if <object> can examine <victim>, or 0, if it cannot. If an attribute name is given, the function returns 1 if <object> can see the attribute <attribute> on <victim>, or 0, if it cannot.
If <object>, <victim>, or <attribute> is invalid, the function returns 0.
VISUAL
Flag: VISUAL (all types)
When this flag is set on an object, it allows any other player to examine it and see all the object's attributes as if they owned it. It does not enable them to make changes to the object. Very useful for getting help with code.
VMAG()
- vmag(<vector>[,<delimiter>])
Returns the magnitude of a vector, using a Euclidean distance metric. That is, for vector a b c d, returns sqrt(a^2+b^2+c^2+d^2).
Example:
> think vmag(3 4)
5
VMAX()
- vmax(<vector>, <vector>[,<delimiter>])
Returns a new vector made out of the maximums of each corresponding pair of numbers from the two vectors. The vectors must be of the same length.
Example:
> think vmax(1 2 3, 4 1 2)
4 2 3
VMIN()
- vmin(<vector>, <vector>[,<delimiter>])
Returns a new vector made out of the minimums of each corresponding pair of numbers from the two vectors. The vectors must be of the same length.
Example:
> think vmin(1 2 3, 4 1 2)
1 1 2
VMUL()
- vmul(<vector|number>, <vector|number>[,<delimiter>])
Returns the result of either multiplying a vector by a number, or the element-wise product of two vectors. The element-wise product of a b c by w x z is aw bx cz
Example:
> think vmul(1 2 3,2)
2 4 6
> think vmul(1 2 3,2 3 4)
2 6 12
VSUB()
- vsub(<vector>, <vector>[,<delimiter>])
Returns the difference between two vectors.
Example:
> think vsub(3 4 5,3 2 1)
0 2 4
VUNIT()
- vunit(<vector>[,<delimiter>])
Returns the unit vector (a vector of magnitude 1), which points in the same direction as the given vector.
Example:
> think vunit(2 0 0)
1 0 0
> think vmul(vunit(5 6 7),vmag(5 6 7))
5 6 7
Generated at Mon Jul 2 00:35:04 2007