Spot Numbers
How do I know what spot numbers to use?
There are several ways you may be able to determine this:
- There may be some written material provided with the script
that explains what scripts to put in what spots.
- Find someone who understands Iptscrae and let them tell you
what spot numbers to use.
- Try to figure it out yourself. Sometimes you will be able
to find comments in the code which will tell you what spot numbers
to use. If not, you may be able to figure it out by looking for
specific Iptscrae commands. If you're lucky, the script will
be coded to work in any spot (see "ME", below)
What Iptscrae comands should I look for?
The following Iptscrae commands control spots. By looking
for them in your spot script you might be able to figure out what
spot numbers each script should be in. However, be warned - this
can be very difficult to do. Even a simple script can be very
hard to understand:
- <spot number> GETSPOTSTATE (gets the 'state' of the
spot. State 0 will cause the first picture to be displayed, state
1 will cause the second picture to be displayed, etc.)
- <spot number> INSPOT (determines if a person's av is
within the boundaries of the spot)
- <spot number> ISLOCKED (determines if the spot is locked
or not)
- <spot number> LOCK (locks the spot - used for spots
that are spots)
- <spot number> SELECT (causes the spot script to be
executed as if it had been manually selected)
- <ticks> <spot number> SETALARM (causes a spot
script to be executed at a later time)
- X Y <spot number> SETLOC (moves the position of the
spot)
- X Y <spot number> SETPICLOC (moves the position of
the spot picture currently being displayed)
- N <spot number> SETSPOTSTATE (changes the 'state' of
the spot for all users)
- N <spot number> SETSPOTSTATELOCAL (changes the 'state'
of the spot for the particular user)
- <spot number> SPOTDEST (determines the destination
of the spot if it is a 'passage')
- <spot number> SPOTNAME (determines the name of the
spot)
- NN SPOTIDX (determines the spot number of the nth spot in
the room)
- <spot number> UNLOCK (unlocks the spot - used for spots
that are spots)
Notes:
- X Y are the x and y coordinates for the command.
- N is the state of the spot. State 0 will cause the first
picture to be displayed, state 1 will cause the second picture
to be displayed, etc.
NN is the n'th spot in the room.
- You may see the word "ME" used where you expected
to see a spot number. "ME" takes on the value of the
spot it is in so works in spots with any number. If you get to
where you can write spot scripts it is a good idea to use ME
instead of a specific spot number so that the scripts can be
placed in any spot.
I think I know what the proper spot numbers are. What should
I do?
If the script resides in a single spot, looking for any spot
commands as listed above should tell you which spot the script
was written for. You can either change the spot number to match
the script or try to change the script to the spot number you
have the script in.
Obviously, the first option is the safest. However, if you
change the spot number to match, make sure you do not have any
other spots in the room with the same number. If you have a lot
of spots in the room this might not be easy to accomplish. Now
would be a good time to call in your Iptscrae expert.
If the room uses multiple scripts in multiple spots it will
be more difficult to determine what spots to put each script in.
You can either make an educated guess based on the information,
above, or call in your Iptscrae expert.
Exercise 2-1:
The following is a popular link-room script. It causes a room
to work as follows:
When the first spot (with script 1) is selected it causes the
second spot (with script 2) to show a picture which changes each
time the first spot is selected. When the second spot is selected,
the user is taken to the palace indicated in the picture.
Script 1:
ON SELECT
{
{ 2 GETSPOTSTATE 1 + 2 SETSPOTSTATELOCAL } { 0 2 SETSPOTSTATELOCAL
} 2 GETSPOTSTATE 3 < IFELSE
}
Script 2:
ON SELECT
{
[ "palace.chatserve.com:9998" "cug.chatserve.com:9998"
"awf.chatserve.com:9998" "sam.chatserve.com:9998"
] links =
"palace://" links ME GETSPOTSTATE GET & NETGOTO
}
Determine the number of the spot each script should be in.
If you're having trouble with this, don't be discouraged. Although
this is a simple example it is difficult to read unless you're
familiar with Iptscrae.