Prop Generator with Next, Previous, Reset Buttons. Make 3 Doors in this room, and use the following scripts for each.

First door should have ID 1.    Name the Door Reset

;RESET DOOR id1
ON ENTER { 
CurRec GLOBAL 0 CurRec =
bname GLOBAL "prop" bname =
AlarmId GLOBAL 3 AlarmId =
}
ON SELECT { {"" SOUND
{ t = t ME SETSPOTSTATELOCAL } [ 0 1 ] FOREACH
"Resetting Buttons to Start" logmsg
x1 GLOBAL
0 x1 =
} 10 ALARMEXEC
CurRec GLOBAL 0 CurRec =
"Resetting buttons to start" LOGMSG naked
}


Second door ID 7 . Name the door Previous


;BACK DOOR id7
ON SELECT {"Pop" SOUND
{ t = t ME SETSPOTSTATELOCAL } [ 0 1 ] FOREACH
CurRec GLOBAL CurRec --
AlarmId GLOBAL 1 AlarmId SETALARM 
}


Door 3 Names Previous:

ON SELECT {
cmd GLOBAL
"prev" cmd =
1 4 SETALARM
}


Third door ID 3, Name this door Next.  This is where you put your prop ids, which get listed right under the ON ALARM as shows in sample below.  Each prop id must begin and end with a quote.


ON ALARM { [
" 938479697 938479723 938479747 938480989 938481007 939694254" 
" 938619620 938619682 938383357 938619836" 
" 941514994 941515191" 
" 938813490 938237949 938245250 938666717" 
] TheArray =
TheArray LENGTH NoArray =
bname GLOBAL 
CurRec GLOBAL
{ 1 CurRec = } CurRec NoArray > IF
{ NoArray CurRec = } CurRec 1 < IF
bname ": row " + CurRec itoa + "/" + NoArray itoa + logmsg
"[" TheArray CurRec 1 - get + "] SETPROPS" + STRTOATOM EXEC
}
ON SELECT {"Pop" SOUND
{ t = t ME SETSPOTSTATELOCAL } [ 0 1 ] FOREACH
CurRec GLOBAL CurRec ++
AlarmId GLOBAL 1 AlarmId SETALARM 
}


See previous page for instructions on obtaining the prop ids. Also for the above script to work properly,  make sure the sound Pop is in your server's media folder, and spelled exactly like the one in the script.


Important Tips for maintaining your prop generator:

After some time you will `flushprops on your server, how often depends of the number of visitors and the props cached. The props in your generator may stop working after a time. To make sure this never happens, take precaution. Make a few hidden rooms, make the rooms `wizardsonly on. Ok now the fun part...Place each prop piece that is part of your generator in these rooms. An easy way is using the dump script.  The next time you're ready to flush the server props, go through these rooms so your client caches them. Ok now it's safe to `purgeprops. 

If you are on the latest server build your props will not get flushed from the hidden rooms, so there is no need to go through each room when you flushprops. Just flush your props when necessary and your all set.


<< Back