;Alan's Menu script ;Creates a pull-down menu effect ;Place the following script a spot ;Place the following pictures in the spot ;- menu button as the first picture ;- highlighted menu button as the second picture ;- highlighted menu button and menu options as the third picture ON ENTER { doorpic GLOBAL ME doorpic = 0 ME SETSPOTSTATELOCAL 30 ME SETALARM } ON ALARM { ;************************************************************************ ;Define the position of the spot 22 xleft = 60 xright = 10 ytop = 35 ybottom = ;************************************************************************ { { 1 ME SETSPOTSTATELOCAL } { 0 ME SETSPOTSTATELOCAL } MOUSEPOS DUP ytop >= SWAP ybottom <= AND SWAP DUP xleft >= SWAP xright <= AND AND IFELSE } ME GETSPOTSTATE 2 == NOT IF 30 ME SETALARM } ON SELECT { 2 ME SETSPOTSTATELOCAL } ;Place the following script in a spot shaped like the menu options ;Place the following pictures in the spot: ;- blank ;- highlighted menu option just below menu button ;- highlighted menu option just below previous picture, etc. ON ENTER { 0 ME SETSPOTSTATELOCAL 0 ME SETALARM } ON SELECT { moarray GLOBAL mostate GLOBAL { ; ;************************************************************************* ;Put everything you want to do ON SELECT here. ;The default transports you to the destination you entered in the ON ALARM portion. ; moarray mostate 1 - GET temparray = temparray 4 GET type = temparray 5 GET destination = { destination " GOTOROOM" & STRTOATOM EXEC } type "rm" == IF { "\"palace://" destination & "\" NETGOTO" & STRTOATOM EXEC } type "pal" == IF { "\"http://" destination & "\" NETGOTO" & STRTOATOM EXEC } type "web" == IF { "\"mailto://" destination & "\" NETGOTO" & STRTOATOM EXEC } type "email" == IF ;************************************************************************* } mostate IF } ON ALARM { doorpic GLOBAL { moarray GLOBAL mostate GLOBAL [ ; ;************************************************************************ ;Put mouseover coordinates here in form: ;[ x_left x_right y_top y_bottom type destination ] ;Types are "rm" for room, "pal" for palace, "web" for web and "email" for email. ;The destination is the "room number" or the palace, web or email "address". ;Use "" for the type and destination if you do not want the script to send you anywhere ON SELECT. ;Omit the http://, palace:// and mailto: portions of the address. ;Leave the first spot picture as . ;Put spot pictures corresponding to coordinates, below, as second through Nth picture. ; [ 22 164 36 54 "" "" ] [ 22 164 54 69 "" "" ] [ 22 164 69 88 "" "" ] [ 22 164 88 105 "" "" ] [ 22 164 105 126 "" "" ] [ 22 164 126 149 "" "" ] [ 22 164 149 168 "" "" ] ;************************************************************************ ] moarray = moarray LENGTH moarraylength = 0 mostate = 0 i = { moarray i GET temparray = { i 1 + mostate = } MOUSEPOS DUP temparray 2 GET >= SWAP temparray 3 GET <= AND SWAP DUP temparray 0 GET >= SWAP temparray 1 GET <= AND AND IF i ++ } { i moarraylength < } WHILE { mostate ME SETSPOTSTATELOCAL { 0 doorpic SETSPOTSTATELOCAL } mostate NOT IF } ME GETSPOTSTATE mostate == NOT IF } doorpic GETSPOTSTATE 2 == IF 30 ME SETALARM }