The Basics
What is a room script?
A room script is a set of instructions placed in a room to
cause it to do special things. Popular examples of room scripts
are:
- room animation
- prop dispensing
Scripts are placed in 'spots'. Some spots are 'doors' which
can take the user to another room. Spots have information associated
with them, one of the most important being the spot number.
How do they work?
Room scripts are written in a computer language called Iptscrae.
They can respond to the following specific events:
- signing on
- entering the room
- hearing someone (including you) saying something
- you saying something
- selecting a spot with the mouse
- a timed event
- leaving a room, and,
- changing an avatar via keyboard entry (macros)
How do you put a script in a room?
In order to add a script to a room you must turn on 'Authoring'.
This requires you to be an Owner or Operator (depending on how
the Palace is set up).
- If you are an Operator and do not have Authoring privilege
you will need to get it from the Owner of your Palace
- If you have Authoring privilege but Authoring is not enabled,
use the `authoring on command to turn it on
Once you have turned on Authoring, you create a new spot using
the Operator pull-down menu. Once you have created a spot you
can assign basic information to it, assign graphics and/or scripts
to it and change its shape:
- Palace will assign a spot number to each new spot. This number
may be changed if desired but make sure you do not have more
than one spot with the same number.
- Generally, scripted spots should be 'Normal' rather than
'Passage'.
- The order of graphics assigned to a spot is the order they
will be shown when changing the 'state' of a spot. Thus, if you
want a spot to change from one picture to a second and then a
third, make the first picture the first picture in the spot,
the second picture the second picture in the spot, etc.
- Scripts usually apply to the specific spot they're in. However,
scripts from one spot can cause things to happen in other spots
(like changing a picture in another spot).
Exercise 1-1:
Create a new room.
Create a new spot in that room.
- name it "Spot Message"
- designate it as 'Normal'
- specify that it show the frame and name.
Place the following script in the spot:
ON SELECT { "You have successfully added this script to your
room." LOCALMSG }
Turn off Authoring and 'select' the spot. You should get a
message saying " You have successfully added this script
to your room."