Help Entries starting with 'B'


@boot

Disconnects the player from the game, with a standard message unless the /silent switch is given.

The /port switch takes a descriptor number instead (the "Port" number in WHO for wizards).

The /me switch boots any single descriptor for the same player which has been idle for at least 1 minute. Players can use this command to terminate hung connections.

Only admin and those with the "boot" power can @boot other players.


@BREAK

@break stops the execution of further commands in the current action list if <boolean> is a true value. It doesn't affect new queue entries made by previous commands in the action list. Very useful to people who don't like @switch. If <command> is given, it is executed instead of the rest of the commands in the current queue.

@assert does the inverse: it stops execution if <boolean> evaluates to false.

Example:

> @va obj=$testme *:@pemit %#=Before break;@break %0;@pemit %#=After break
> testme 0
Before break
After break
> testme 1
Before break

Example:

> @force me={@switch 1=1, think Third; think First; @break 1; think Second}
First
Third
(The @switch is run, which queues 'think Third', think First is
run, displaying 'First', command execution is broken (so we never
think Second), and then the queued 'think Third' is run, displaying
Third. If you figured that out, you have a very good understanding
of the PennMUSH queue. :)

See also:


@buy

Sets the message that is shown to anyone who buys something from the object, using the 'buy' command. The item purchased is passed in as %0, and the amount paid as %1.

See also:


BAND()

Does a bitwise AND of all its arguments, returning the result (A number with only the bits set in every argument set in it).


BASECONV()

Converts <number>, which is in base <from base> into base <to base>. The bases can be between 2 (binary) and 36.


BEEP()

Sends <number> "alert" bell characters. <number> must be in the range 1 to 5, or, if unspecified, defaults to 1. This function may only be used by royalty and wizards.


BEFORE()

Returns the portion of <string1> that occurs before <string2>. If <string2> isn't in <string1>, <string1> is returned. This is case-sensitive.

Example:

> think before(foo bar baz,bar)
foo
> think before(foo bar baz,r)
foo ba

See also:


BEING KILLED

Getting killed is no big deal. If you are killed, you return to your home, and all things you carry return to their homes. You also collect 50 pennies in insurance money (unless you have >= 10000 pennies or you were killed via the Wizard slay command). See 'MONEY'. Generally, killing is not encouraged unless absolutely necessary. It can be extremely rude and annoying.

Many MUSHes choose to disable the kill command.

See also:


Bitwise functions

These functions treat integers as a sequence of binary bits (Either 0 or 1) and manipulate them.

For example, 2 is represented as '0010' and 4 as '0100'. If these two numbers are bitwise-or'ed together with BOR(), the result is 6, or (In binary) '0110'. These functions are useful for storing small lists of toggle (Yes/No) options efficiently.

  baseconv()    band()        bnand()       bnot()        bor()
  bxor()        shl()         shr()

BNAND()

Returns its first argument with every bit that was set in the second argument cleared.


BNOT()

Returns the bitwise complement of its argument. Every bit set in it is cleared, and every clear bit is set.


Boolean functions

Boolean functions all return 0 or 1 as an answer. Your MUSH may be configured to use traditional PennMUSH booleans, in which case non-zero numbers, non-negative db#'s, and strings are all considered "true" when passed to these functions. Alternatively, your MUSH may be using TinyMUSH 2.2 booleans, in which case only non-zero numbers are "true".

  and()         cand()        cor()         eq()          gt()
  gte()         lt()          lte()         nand()        neq()
  nor()         not()         or()          t()           xor()

See also:


BOOLEAN VALUES
  A boolean variable, for those of you not familiar with programming, 
  is a variable that is either true or false. Normally, a value of
  1 is considered "true" and a value of 0 is considered "false". Many
  MUSH functions return either 1 if they are true or 0 if false.
  For example, the hasflag() function tests to see if an object has
  a certain flag set on it. If
        hasflag(<object>,<flag name>) 
  is true (the object has the flag), it will return 1. If it is false, 
  it will return 0. 

Other functions expect to operate on boolean values. What they consider "true" or "false", however, depends on the setting of the "tiny_booleans" config option (@config tiny will show this).

(continued in help boolean2)


BOOLEAN2
  If tiny_booleans is...
  no                       FALSE: null string, 0, any negative db
                           TRUE:  everything else
  yes                      TRUE:  numbers other than 0
                                  strings beginning with numbers other than 0
                           FALSE: everything else 
  Or, put another way:
  Value                 tiny_booleans=no        tiny_booleans=yes  Gotcha
  0                     FALSE                   FALSE
  non-zero number       TRUE                    TRUE 
  #<non-negative>       TRUE                    FALSE               *
  #<negative>           FALSE                   FALSE                
  null string           FALSE                   FALSE
  0<non-numbers..>      TRUE                    FALSE               *
  <non-numbers...>      TRUE                    FALSE               *

(continued in help boolean3)


BOOLEAN3
  Examples (assuming tiny_booleans is "no"):     
    not(foo) = 0  
    not(<null string>) = 1
    not(-66) = 0
    not(0) = 1
    not(#-1) = 1
    not(#12) = 0
  And so on...
  (note: These rules only apply when a function expects a Boolean
  value, not for strings that expect other values.)

See also:


BOR()

Does a bitwise OR of all its arguments, returning the result. (A number with a bit set if that bit appears in any of its arguments).


BOUND()

bound() returns <number> if it is between <lower bound> and <higher bound>. If it's lower than the lower bound, the lower bound is returned. If it's higher than the higher bound, the higher bound is returned.

See also:


BRACKETS()

Returns a count of the number of left and right square brackets, parentheses, and curly braces in the string, in that order, as a space-separated list of numbers. This is useful for finding missing or extra brackets in MUSH code.

Example:

> @desc me=This is [ansi(h,a test)] of the { brackets() function.
> think brackets(v(desc))
1 1 2 2 1 0

brief

This command works like an abbreviated version of examine. It does not print out all the attributes on the object.

See also:


BUILDER

BUILDER

BUILDER is actually an @power rather than a flag. Some MUSHes choose to limit the building commands (@dig, @open, and sometimes even @create) to registered builders only. If you are on a MUSH that does this, you will not be able to use these commands unless you have the power. Only wizards can grant @powers. To see if building is limited, check @command for the various building commands.

See also:


buy

When you try buying an item, PRICELIST attributes on nearby objects (or <vendor> if given) will be checked for matching item:costs. If <cost> is given, the first item that matches that cost will be purchased. Otherwise, the first matching item that you can afford will be purchased.

If the pricelist match contains a list of prices, ITEM:30,20,10, the first one you can afford will be the resulting price.

ex: > &PRICELIST vendor=coke:20 pepsi:20 > &drink.coke vendor=You enjoy a delicious coke. > &drink.pepsi vendor=It tastes like a funny coke. > @BUY vendor=u(drink.%0) > buy coke You enjoy a delicious coke.

See also:


BXOR()

Does a bitwise XOR of all its arguments, returning the result. (A number with a bit set if it's set in only one of its arguments).


Generated at Mon Jul 2 00:35:04 2007