ROOM ID 142 NAME "Mosh / Dance Script" PICT "blpal38.gif" ARTIST "Installed by Alissa, Author Dr. X" PICTURE ID 1 NAME "arrowrr.gif" TRANSCOLOR 56 ENDPICTURE PICTURE ID 2 NAME "arrowll.gif" TRANSCOLOR 56 ENDPICTURE SPOT ID 1 OUTLINE 398,6 416,6 416,21 398,21 LOC 407,13 SCRIPT ; In the ENTER section, we initialize the ; shared variable "moshDel," which controls how fast each ; individual moshes. ON ENTER { "To mosh, type mosh. To turn mosh off, type nomosh" LOCALMSG moshDel GLOBAL 45 moshDel = } ; In the OUTCHAT block, we let the user decide if they've had enough, ; or if they're hungry for more ON OUTCHAT { moshDel GLOBAL { 45 moshDel = "Reseting Mosh" STATUSMSG "" CHATSTR = } CHATSTR LOWERCASE "mosh" == moshDel 1 < AND IF { 0 moshDel = "No Mosh For You" STATUSMSG "" CHATSTR = } CHATSTR LOWERCASE "nomosh" == IF } ; The INCHAT carries the real meat of the "mosh." ON INCHAT { moshDel GLOBAL { POSX px = POSY py = 0 i = { { 22 468 RANDOM + 22 340 RANDOM + SETPOS } i moshDel * ALARMEXEC i ++ } { i 20 < } WHILE px ITOA " " & py ITOA & " SETPOS" & STRTOATOM i moshDel * ALARMEXEC } CHATSTR LOWERCASE "mosh" == moshDel 10 > AND IF } } ENDSCRIPT ENDSPOT DOOR ID 2 DONTMOVEHERE DEST 152 OUTLINE 450,2 510,2 510,33 450,33 LOC 480,17 PICTS 1,0,0 ENDPICTS SCRIPT ON INCHAT { nDoIt GLOBAL nDoIt EXEC } ON ENTER { { CLEARLOOSEPROPS PAINTCLEAR } NBRROOMUSERS 2 < IF } ENDSCRIPT ENDDOOR DOOR ID 3 DONTMOVEHERE DEST 97 OUTLINE 3,2 62,2 62,32 3,32 LOC 32,17 PICTS 2,0,0 ENDPICTS ENDDOOR ENDROOM