BrutusMUD help

SCRIPT SPECIAL COMMANDS

Level: 61

wait <numeric expression>
block script execution give time in mud pulses. Standard mud pulse is
1/10s.

commanddelay <numeric expression>
constant wait after each command

commanddelay <numeric expression>,<numeric expression>
random wait after each command

commandlimit <numeric expression>
modify number of allowed executed commands in scripts (def 2000),
when this limit is exceeded script stops with error
"maximum commands reached", wait restores this limit to default
value so use this command again after wait

let <variable name> = <expression>
create and set variable

if (<expression>){
}
else{
}

if (<expression>){
}

for (i=0; i<10; i++){
if (i==5)
continue #skip value 5

if (i==8)
break #exit for block
...
}

foreach (array as value){
say value: @value
}

foreach (array as index=>value){
say index: @index, value: @value
}

while (i<10){
...
i++
}

switch (i){
case 1:
say only 1
break
case 2:
case 3:
say 2 or 3
case 4:
say 2 or 3 or 4
break
default :
say default
}

The expression is true if:
- integer type and not zero
- string type and not ""
- other type and valid (see valid function bellow)

signal <name> <msg-expr>
- sends signal and passes <msg-expr> to it. All mud entities with signal
trigger attached with argument <name> will catch it.
Note: <name> is any name of the signal
<msg-expr> is expression of any type, but receiving script
must handle it right.

 

Back to index

 
 

© Michal Kumžák 2011 | Provozováno na CMS E4E | Mapa webu