BrutusMUD help


Level: 61

Using expressions (scripts 1 and 2):

say My name is @me
say You are @(actor)
wait 10
say @arg
if (isimmort(actor))
say @(actor) is immortal
say @(actor) is mortal

say 1+2*3 is @(1+2*3)
say @(actor) has inteligence @(int(actor))

let a = 5
let b = 7
say @(a*b+4)
wait 30
let oposit = fighting(actor)
if (oposit)
say @actor is fighting with @oposit
say @actor is not fighting

Scope of variables (scripts 3 and 4):

say Setting variables.
let my.jedna = 10
let zone.jedna = 20
let global.jedna = 30
let jedna = 40
say Variables set. Use sstat command to see them
wait 100
say Script finished, use sstat to see which variables remained.

say Script started. Use sstat command to see variables.
wait 100
say @my.jedna
say @zone.jedna
say @global.jedna
say @jedna
say End of script.

For more examples, see scripts in zone 0 (via vstat scr <number>).
To see how does it work load a mob, attach script to it via attach command
and then use commands deposit and withdraw to trigger example scripts.


Back to index


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