-
Notifications
You must be signed in to change notification settings - Fork 12
Scripting
There is a very, very basic internal scripting language that can be used through triggers, etc. You can also run scripts directly from from the game prompt using @pgm in the following manner:
@pgm <script>
At the moment, there is no protection at all as to what can be modified and by whom, besides the limitations of the script functions and the direct interpretation afforded by '@pgm' being restricted to admin or higher permissions.
The language syntax, structure, etc is based on Fuzzball MPI (http://www.fuzzball.org/docs/mpihelp.html). Every function returns a String, but there are essentially three cases: an empty string (""), a string representation of a value ("5"), and a string token (":true"). These loosely equate to void, int/number, and boolean return types.
add (+), sub (-)
returns: int/number
eq, gt (>), ge (>=), lt (<), le (<=)
returns: :true or :false
and, if, or
returns: :true or :false
set
sets an interpreter variable
returns: empty string
prop
returns: the property with the specified name from the given object
store
store a value in a property set on the given object
returns: empty string
give
give a player an item
returns: empty string
create_item
create a new item based on a prototype
returns: int/number
dbref
determine the database reference number of the object specified by name
returns: int/number