ROOM ID 112 NAME "Jammin'" PICT "blpal31.gif" PICTURE ID 1 NAME "musicoff.gif" TRANSCOLOR 0 ENDPICTURE PICTURE ID 2 NAME "musicon.gif" TRANSCOLOR 0 ENDPICTURE PICTURE ID 3 NAME "arrowrr.gif" TRANSCOLOR 56 ENDPICTURE PICTURE ID 4 NAME "arrowll.gif" TRANSCOLOR 56 ENDPICTURE SPOT ID 1 NAME "Basic Scripts" OUTLINE 5,39 28,39 28,57 5,57 LOC 128,130 SCRIPT ; This script was written by Tandika Star ; email: Iptscrae@aol.com ; Palace: Behind the Wall, tomes.ksv.com:9998 ; This script may be freely distributed as long as all comments remain in place. ; This script allows a person to play "DJ" in the room, and push web-based midi files ; to the rest of the members in the room. ; There can only be one DJ at a time. If the current DJ leaves, they are removed as the ; DJ and someone else can take over. ON ENTER { 0 2 SETSPOTSTATELOCAL ;Makes sure that listening to the music is defaulted to off. [ 899772366 -1364275865 899772346 ] setprops "Welcome to Jammin'!" LOCALMSG "If there is a DJ on duty, you can listen to midis by selecting the\x0dMusic = Off\x0dButton." LOCALMSG "If you want to stop listening to music, select the button again." LOCALMSG "--WARNING--\x0dListening to midis will launch your browser!" LOCALMSG "You must have a midiplayer for your browser to hear the music." LOCALMSG "Minimize your browser after it launches." LOCALMSG ; The following checks to see if someone is the DJ and if so, announces who they are. { "There is no DJ on duty at this time!" LOCALMSG } { { "There is no DJ on duty at this time!" LOCALMSG } { 1 GETSPOTSTATE WHONAME " is the DJ on duty!" + LOCALMSG } 1 GETSPOTSTATE WHONAME "" == IFELSE } 0 1 GETSPOTSTATE == IFELSE } ON OUTCHAT { "set me up" djpass = ; This is the password to be the DJ. ; It can be changed to whatever you want. { { WHOME 1 SETSPOTSTATE ; Only one person can DJ at a time, and they have to quit WHOME 1 SETSPOTSTATELOCAL ; or leave the room to turn it over to someone else. WHOME WHONAME " you're now set up to DJ!" + LOCALMSG } { 1 GETSPOTSTATE WHONAME " is already the DJ for this room! " + LOCALMSG } 0 1 GETSPOTSTATE == 1 GETSPOTSTATE WHONAME "" == OR IFELSE "" CHATSTR = } CHATSTR "^" djpass + "$" + GREPSTR IF ; To quit being the DJ, the DJ says "djdone". { 0 1 SETSPOTSTATE "You are no longer the DJ!" LOCALMSG "" CHATSTR = } 1 GETSPOTSTATE WHOME == CHATSTR "^djdone$" GREPSTR AND IF } ON LEAVE { ; The following cleans up the room when the last person leaves and ; if the DJ leaves, removes them so someone else can be DJ. { 0 1 SETSPOTSTATE WHOME WHONAME " is no longer the DJ!" + ROOMMSG } 1 GETSPOTSTATE WHOME == IF } } ENDSCRIPT ENDSPOT SPOT ID 2 NAME "MusicButton" DONTMOVEHERE OUTLINE 6,342 98,342 98,378 6,378 LOC 52,361 PICTS 1,0,0 2,0,0 ENDPICTS SCRIPT ON SELECT { ;This section turns the music on and off for the listener. { 1 2 SETSPOTSTATELOCAL "The music is now on!" LOCALMSG } { 0 2 SETSPOTSTATELOCAL "The music is now off!" LOCALMSG } 0 2 GETSPOTSTATE == IFELSE } ON OUTCHAT { ; To play a midi, the DJ says: playit [web addy]. ; The address is standard URL form. For example, saying: ; playit http://www.atjade.net/redstrokes.mid ; will launch your browser and play that midi. { { "\x3bListening to: http://" "$1" GREPSUB + ".mid" + SAY "" CHATSTR = } { "" CHATSTR = "You're not the DJ!" LOCALMSG } WHOME 1 GETSPOTSTATE == IFELSE } CHATSTR "^playit http://(.*).mid$" GREPSTR IF } ON INCHAT { ; For the listener to hear the midi, the button has to be "on" ; (SPOTSTATE = 1) { { "$2" GREPSUB NETGOTO } 1 2 GETSPOTSTATE == IF } CHATSTR "^(.)Listening to: (.*)$" GREPSTR IF } ENDSCRIPT ENDSPOT DOOR ID 5 DONTMOVEHERE DEST 158 OUTLINE 441,3 510,3 510,30 441,30 LOC 475,16 PICTS 3,0,0 ENDPICTS SCRIPT ON INCHAT { nDoIt GLOBAL nDoIt EXEC } ON ENTER { { CLEARLOOSEPROPS PAINTCLEAR } NBRROOMUSERS 2 < IF } ENDSCRIPT ENDDOOR DOOR ID 6 DONTMOVEHERE DEST 172 OUTLINE 4,2 63,2 63,34 4,34 LOC 33,18 PICTS 4,0,0 ENDPICTS ENDDOOR ENDROOM