Introduction to Scripts
Scripts add life to the MUD, they allow you to define special events that happen when the player does something, or which happen completely at random. The DG scripts reference gives a good intoduction to creating scripts so that won't be covered here. It is suggested that you read the DG scripts reference over before continuing on in this document.
tedit is the command to edit and view scripts.
The name of the script is the way you identify the script in the tedit list display, it has no bearing on how the script works, but is useful if you need to find a particular script later from a mass of them.
The intended for option lets you set if this script is designed for rooms, objects or mobs. Your choices are:
0: Mobiles, 1: Objects, 2: Rooms
The trigger types option lets you choose what trigger will cause this script to be executed. Your choices are:
For Mobiles:
1) Global 2) Random
3) Command 4) Speech
5) Act 6) Death
7) Greet 8) Greet-All
9) Entry 10) Receive
11) Fight 12) HitPrcnt
13) Bribe 14) Load
15) Memory
For objects:
1) Global 2) Random
3) Command 4) UNUSED
5) UNUSED 6) Timer
7) Get 8) Drop
9) Give 10) Wear
11) UNUSED 12) Remove
13) UNUSED 14) Load
15) UNUSED
And For Rooms:
1) Global 2) Random
3) Command 4) Speech
5) UNUSED 6) Zone Reset
7) Enter 8) Drop
9) UNUSED 10) UNUSED
11) UNUSED 12) UNUSED
13) UNUSED 14) UNUSED
15) UNUSED
The numeric argument's purpose differs with respect to the different triggers that can be used. All the information pertaining to the numeric arguments can be found in the DGscripts reference pages (the triggers page).
The arguments, like the numeric argument, differ according to what trigger is being used. See the DGscripts reference for the appropriate use of arguments.
The commands section contains the script itself. The script is entered using the standard text editor. It is recommended that you have the script written down on paper before starting so that you don't make a hard to fix mistake while using the text editor.
|