Room Scripts For Your Pserver |
So you want to make a palace?
Ok, you started up your Pserver. Congratulations! You have a few rooms. But now you want
to make your rooms interactive, and have no idea what to do? Add some cool scripts like
the ones you've seen at other palaces. You can find some basic scripts here for beginners,
and some tips on using them.
Where do I put these scripts? If you have to ask
this you should probably think twice about making a palace. Ok we'll give you a hint. Room
Scripts are put into doors you create in a palace room. Go to the wizard menu and select
New Door. On PC first select authoring mode. Then New Door will be active. Make
the Door, then double click the door and select the edit script button. Copy a script from
this page and paste it into the door. Cool you're all set!
The following are the most requested palace scripts. Have fun with them. Edit them to your liking. |
Download a Sound from a Palace Room
ON SELECT { "soundname" sound }
Tip: to send a sound from the server, the sounds must be in your server's media folder
(same folder as the the background gifs for your palace). This script can also be
used ON ENTER.
Make the Room Talk
(when you enter or click on something in the room, text appears from that spot)
Script:
ON ENTER
{ "@126,23 Wanna Play a Game?" localmsg }
ON SELECT { "@126,23 Wanna Play a Game?" localmsg }
Make it say the users name in the text:
ON SELECT
{
"@340,278 Hey " USERNAME + " wanna chat with me? " + localmsg
}
*Quick tip to get the coordinates... point your mouse and type msay test. Look in
your log.
Simple
Censor: Make a badword come out as something else. Change badword
to be the censored word, change the word palace to be the word you want the
person to say instead.
Script:
ON OUTCHAT {
{
"$1palace$2" GREPSUB CHATSTR =
} { CHATSTR "^(.*)badword(.*)$" GREPSTR } WHILE
{
"$1palace$2" GREPSUB CHATSTR =
} { CHATSTR "^(.*)badword2(.*)$" GREPSTR } WHILE
}
For
A Complete Censor Script click here...
Password A Room
Put this script in a room. Say the password in this room to get to the secret
room. The
secret room's ID gets put in place of 150.
ON OUTCHAT {
{ "" CHATSTR = 150 GOTOROOM } CHATSTR "PASSWORD" ==
IF
}
Member
Rooms: Have a member click a thumbnail of the room pic to create the room.
script:
ON SELECT {
"`newroom" say "`rpicture roomname.gif" say }
Tip: Make sure to turn the `memberrooms option on in your server preferences.
Dressup -Offer and Accept. To see how this script works,
check out Avatar Palace, Mansion, Welcome, Wonderland.
(Exchange props with other members) Click here for the script
Palace Links Click a tile to get sent to that palace.
ON SELECT {
")pop Please wait..." LOCALMSG
"Transferring to palace.thepalace.com, port 9998" LOCALMSG
USERNAME " has gone to Main Palace via warp!" + ROOMMSG
{"palace://palace.thepalace.com:9998" NETGOTO} 300 ALARMEXEC
}
Link A Web Page
ON SELECT {
"http://www.thepalace.com/" NETGOTO }
Animated
Graphics Scripts
ON ENTER
{ 10 ME SETALARM }
ON ALARM
{ { 1 ME SETSPOTSTATELOCAL }
{ ME GETSPOTSTATE 1 + ME SETSPOTSTATELOCAL }
ME GETSPOTSTATE 5 > IFELSE
10 ME SETALARM
}
Alternatating graphics should to be added to this door. Choose Pict in the door info and
add them.
Clean your room of loose props
after the last person leaves.
(never have loose props left behind in a room again)
Script:
ON LEAVE
{
{
CLEARLOOSEPROPS
} NBRROOMUSERS 1 <= IF
}
PROP SCRIPTS:
Note: prop scripts use prop ids. Replace the numbers
(prop ids) in these Prop Scripts, with the prop ID's for the your new props.
How to get prop IDs?
Put the following script in your cyborg file ON
OUTCHAT section.
Then restart palace client. Put on a prop and say dump, and look in your log. You can
continuously dump props and then paste them all in from your log at one time, by using the
dump script below.
Script for ON OUTCHAT section of your cyborg.ipt
;dump
{
"" CHATSTR =
"" ttosay =
{ " " topprop itoa + theprop =
theprop ttosay + ttosay =
mousepos dropprop
} {topprop} while
"\"" ttosay + "\" " + logmsg
} CHATSTR "dump" == IF
Spot Prop
Script (Click a spot to put on a prop)
Script:
ON SELECT {
[-1366152781 -1366152767 -1366152758 -1366152748 -1366152735 -1366152726] SETPROPS }
*Use ON ENTER instead of ON SELECT to get a prop on entering a room.
Prop
Generator Script with 3 buttons, Next, Previous, Reset, click here
*Tip for On Select Scripts: Make the doors "don't move
here" they can also be set to normal.
This setting is in the door info.
*Safety Warning. Never have the same exact script in
the same room twice.
Never have the same type script ie. ON SELECT, ON ENTER, in the same door twice.
Both of these errors may crash your palace.
All scripts on this page are from many sources.
copyright 12/98 Cyberia