Home | Manuals | Client Manual | Advanced Features

Advanced Features

Font size: Decrease font Enlarge font
image

This section describes advanced features you can use to enhance your Palace experience even further: * Standard user commands * Creating and maintaining your own room * Automating yourself with Iptscrae


  •  

Standard user commands

The Palace software possesses a number of special commands allowing you to personalize your experience online. All special commands consist of text typed into the Input Box, and most of them begin with a single quote (' ).

Although the special commands available may vary from site to site, you can see the standard list in the section

Palace Command Summary.

 


Creating and maintaining your own room

Sometimes, you will visit a Palace site where the operator lets you create your own room. These member rooms exist only temporarily, deleting themselves whenever (A) there is no one inside and (B) when their owners disconnect from the current server. There are number of special commands associated with member rooms. Like most special commands, these are typed directly into the Input Box, and begin with a single quote (').

Member rooms have the following guidelines:

 

'newroom roomName

Creates a new room with a cloudy sky background. If you don't supply roomName, the new room will be called "Jim's room" (or whatever your name is). When you create a room you become its owner (similar to being a "channel op" on IRC), and may use all of the special commands listed below within that room. If the room empties out and you log off, the room will disappear.
'rdelete

Deletes the room. This command is rarely necessary, as the room will disappear of its own accord anyway.
'rowner userName

Allows you to transfer ownership of the room to userName.
'rname roomName

Renames the room to roomName.
'rpicture filename

Allows you to specify a new background picture for the room. You may use any of the default Palace pictures, (the bar, the study and the beach are the most popular -- look in your Pictures folder to see the list). You can use a custom picture of your own creation if you wish, but only people who have a copy of that graphic will be able to see it; everyone else will see a black background.
'rkick userName

Kicks userName out of the room. The person will be kept out for the remainder of their session, or until ownership is transferred.
NOTE: They can get around this by logging off. If you are having a real security problem you can either use a password, close the room entirely with the rclose command, or page a operator for assistance.

'runkick userName

Cancels the effects of an 'rkick command.
'rpassword yourPassword

Denies entrance to the room except to those who know yourPassword. When someone tries to get in, the server will deny access and request that the person type 'password yourPassword to get in. For example, if you create a room and type:
'rpassword mojo

Other users will be unable to enter your room unless they type:
'password mojo

'rclose

Closes (locks) the room, preventing access by anybody except the room owner. If everybody inside leaves, the room automatically opens.
'ropen

Opens (unlocks) the room.
'rscripts on

'rscripts off

Determines whether or not user scripts can run within the room. Scripts are on by default.
'rpainting on

'rpainting off

Turns painting on and off within the room. Painting (otherwise known as drawing) is on by default. The owner can do some painting (to make a sign) and then turn painting off to make a temporarily-permanent sign.
'rguests on

'rguests off

Denies access to guests (non-members).
'rhide on

'rhide off

Removes the room from the Room List (for all except operators and owners, who can still see it).
'runhide

Cancels the effects of an 'rhide command. Same as 'rhide off.

Automating yourself with Iptscrae

As if you didn't already have enough to keep you happily Palace-hopping for a long time, there are many more options available to you once you begin to master the intricacies of Iptscrae, the Palace programming language. Your initial introduction to Iptscrae will most likely be in the form of your own cyborg.ipt file (or "Cyborg Script"), that contains the routines used to automate aspects of your avatar's behavior online. This section provides a cursory overview of the contents of the cyborg.ipt file, and explains the operation of this file in its default state. For more information on Iptscrae, see the Iptscrae Language Guide.

NOTE: Modifying the cyborg.ipt file requires a degree of familiarity with Iptscrae that is beyond the scope of this guide. Since the same commands and syntax are used to create Palace Server Scripts and Cyborg Scripts alike, would-be authors will want to read the Iptscrae Language Guide.

Your cyborg.ipt file

This section describes your Cyborg.ipt file, examining its structure and operation line-by-line. To make any changes desired, you'll need to open this file with a text editor or word processor capable of saving in ASCII ("text only") format. Always remember to make a backup copy before editing your cyborg.ipt file.

The cyborg.ipt file is a script, written in Iptscrae. Scripts contain handlers, which respond to events. These handlers are themselves contain short programs called atomlists. An atomlist could also be called a subroutine. To get a clearer understanding of what this means, let's take a look at your default cyborg.ipt file.

The INCHAT handler

The first block of statements in your file is your INCHAT handler (as indicated by the words ON INCHAT and the open curly bracket in the first line):

ON INCHAT
{
; expressive prop changes - in response to what others say
{ "Lightbulb" DONPROP { DOFFPROP } 120 ALARMEXEC } CHATSTR "you genius" == IF

...

INCHAT is where you store atomlists that respond to words you hear others say; atomlists in this handler are triggered by any CHAT event. You'll notice lots of curly brackets throughout the script. These curly brackets indicate additional atomlists. Subject to syntax requirements, atomlists can contain other atomlists, but each must be opened and closed with the corresponding curly bracket. You can tell when a script has reached its end by counting and pairing the open curly brackets with the closed ones. You'll notice that the first open-curly bracket above has no partner. More on that soon...

The line starting with a semicolon (;) is a comment. The software ignores everything on the line after the semicolon. Commenting your code is good programming practice, and it will save you a lot of time when you come back to this file several months after editing it.

The functional stuff is contained in the IF statement that follows the comment. This statement causes your avatar to don a lightbulb prop for 120 ticks (a tick is about 1/60th of a second, so this is about 2 seconds) and then remove it, provided someone says the trigger phrase appearing in quotes ("you genius").

This sample lends itself to fairly easy editing. Without altering the structure of the statements or atomlists involved, you can easily edit this IF statement, or duplicate it to have your avatar don different props in response to different trigger statements. Be sure your new prop names refer to actual props in your satchel, or your script will do nothing. You can also change the number of ticks between donning and doffing the prop.

FINGER information. We know the INCHAT handler isn't done yet, because our first open-curly bracket in the cyborg.ipt file hasn't been matched with a close-curly bracket. The next section, therefore, is also executed on response to INCHAT...

; this is your FINGER information - replace the stuff in quotes with
; information about yourself.
{
"^\x0d"
"\x0d" +
WHOCHAT PRIVATEMSG
} CHATSTR "finger" == CHATSTR ";finger" == OR
WHOCHAT WHOME == NOT AND IF
}

As the comment tells us, this routine allows you to provide others with some information about you when they select you for whisper mode and say "finger". To edit it, simply replace and (including the angle brackets) with whatever information you want to put there. If you want to add additional information lines, copy the format of the "\x0d" + (including the plus sign at the end). Unless you're an Iptscrae expert, you should probably leave the rest of this structure alone.

The OUTCHAT handler

If you pair up the curly brackets here you will find that the last one is an extra; we now know that we have reached the end of our INCHAT handler. The next block of statements comprise the OUTCHAT handler.

ON OUTCHAT
{
; more expressive prop changes (in response to what YOU say)
{
{ "Lightbulb" DONPROP { DOFFPROP } 120 ALARMEXEC } 30 ALARMEXEC
} CHATSTR "a.* idea" GREPSTR IF

This is the beginning of your OUTCHAT handler, which contains atomlists that execute whenever you say something. The IF statement is very similar to the one encountered in the INCHAT handler. In this example, the IF statement evaluates each of your outgoing messages to see if it matches the specified target condition (the "a.* idea"), and executes a don/doff routine if it does.

The "a.* idea" target condition looks for the letter a, followed by anything, followed by the word idea, anywhere in the outgoing message (GREPSTR instead of SUBSTR). Phrases like a good idea and I have an insane idea, man meet this criteria, and will trigger the Lightbulb prop routine.

ZAP routine. Your OUTCHAT handler also contains a ZAP routine:

; Zap somebody by positioning the mouse and then say "zap"
{ "!)fazein Zap!" MOUSEPOS SAYAT
255 0 0 PENCOLOR 2 PENSIZE
POSX POSY MOUSEPOS LINE
PAINTUNDO
"" CHATSTR =
} CHATSTR "zap" == IF

This zap routine listens for you to say zap, whereupon it quickly performs a series of related actions:

 

  1. It plays the fazein audiofile and places the word Zap! in a spiky balloon at the position of the mouse pointer ( "!)fazein Zap!" MOUSEPOS SAYAT ).

  2. It sets the system pen to bright red (255 red, 0 green and 0 blue), and makes it two pixels wide ( 2 PENSIZE ).

  3. It draws a line (using the pen's current color and size) from your avatar's position ( POSX POSY ) to the mouse pointer's position ( MOUSEPOS ). This creates a laser beam effect.

  4. It erases the line ( PAINTUNDO ).

  5. It removes your "zap" statement from the CHAT string, so no one sees it
    ( "" CHATSTR = ).

There have been so many variations on this script that it would take a good-sized document to list them all. The Zap script is probably the most heavily-edited atomlist in the Iptscrae annals. For starters, you might want to experiment with changing the target message and the audiofile played, or the color and size of the pen.

Cleaning your room. The next atomlist is useful when a room gets too cluttered to see what's going on.

; clean the room by saying "clean"
{
CLEARLOOSEPROPS
PAINTCLEAR
} CHATSTR "clean" == IF

This atomlist waits for you to say clean, and then removes all loose props from the current room ( CLEARLOOSEPROPS ) and deletes all painted lines on the screen (PAINTCLEAR ).

Spoofing. The next statement is a spoofing atomlist.

; spoof somebody by positioning the mouse on their mouth
; and then typing "msay blah blah"
{ "$1" GREPSUB chatter =
chatter MOUSEPOS SAYAT
"" CHATSTR =
} CHATSTR "^msay (.*)$" GREPSTR IF

If you're into spoofing people (putting words in their mouths), this atomlist makes it a lot easier than using the *X,Y function. It waits for you to say anything that starts with the word msay. When you do, everything after the word msay is sent to a cartoon balloon that magically appears at your cursor's position. It then sets the CHAT string to (nothing) so that no one sees your original utterance. This is such a useful routine that you should probably keep it just the way it is.

Final OUTCHAT atomlist. Here is the final atomlist in your OUTCHAT handler:

; give another user a prop
{ "$1" GREPSUB who = "$2" GREPSUB prop =
prop who WHOPOS ADDLOOSEPROP
} CHATSTR "^give (.*) (.*)$" GREPSTR IF
}

We can tell this is the last statement because of the extra closed-curly bracket at the end of the sample (which matches the one we encountered on the first line of this handler). The routine waits for you to say anything matching the structure of give person prop. The first word after give is called and passed to a symbol called who, while the final word is called $2 and is passed to a symbol called prop. A copy of prop is then added to the screen at the position of who. This cannot be used to place a prop on a person, but rather puts it right next to them.

NOTE: If the user specified is not present in the room or the prop named is not in your prop file, this routine will not work.

SIGNON handler

Finally, we come to the last handler in your cyborg.ipt file:

ON SIGNON {
"*64,64 !It's " USERNAME + SAY
1 MACRO
}

This is your ON SIGNON handler, which consists of only one atomlist. When you first enter any Palace site, this routine does two things. First it causes you to say
It's your_name! in a spiky balloon at position 64 x 64 on the screen. Next it runs "macro" number 1, setting your initial appearance (this is equivalent to selecting the first avatar from the Avatars window, or pressing the F1 key).

You'll notice that the syntax and special characters used to indicate the location and style of the announcement are the same as those used in the Input Box to create special talking effects. By experimenting with these text-based functions (and the others available via the Input Box) you can edit this script to trigger complex strings of text, sound and avatar actions whenever you enter a Palace site.

Subscribe to comments feed Comments (0 posted):

Post your comment comment

Please enter the code you see in the image:

  • email Email to a friend
  • print Print version
  • Plain text Plain text
Tags
No tags for this article
Rate this article
0