Knowledgebase
Storm Palace Hosting > Storm Hosting Help Desk > Knowledgebase

Ask a question:


Mouseover 1b

Solution ;Mouseover script #1b
;This script displays a message when the mouse is over specified locations.
ON ENTER
{
msgarray GLOBAL
[
;Put messages here in form: "message" ***
"Hey, look outside Doc. Volcanic ash is falling on Christmas eve again!"
"Q, Would you put the cat out and bring the blue mouse in?"
"Super Dena says it is too snow, some Last Resort Christmas magic."
"All the wizards and friends who gather here from around the world"
"Wish everyone the Merriest Christmas ever from Last Resort."
;***end of messages***
] msgarray =
msg GLOBAL
msgarray LENGTH RANDOM msg = ;start on a random one
0 ME SETALARM
}

ON ALARM
{
msgarray GLOBAL
msg GLOBAL
[
;***Set spot coordinates in form: [ x_left x_right y_up y_down 0 ] ***
[ 82 112 10 48 0 ]
[ 260 293 20 54 0 ]
[ 420 458 26 59 0 ]
[ 80 120 106 143 0 ]
[ 260 305 101 149 0 ]
;***end of spot coords***
] moarray =
{ temparray =
MOUSEPOS DUP temparray 2 GET >= SWAP temparray 3 GET <= AND
SWAP DUP temparray 0 GET >= SWAP temparray 1 GET <= AND AND mouseover =
{
{ temparray 0 GET temparray 1 GET + 2 / x =
temparray 2 GET temparray 3 GET + 2 / y =
msg 1 + msgarray LENGTH % msg = ;get next msg.
"@" x ITOA & "," & y ITOA & msgarray msg GET & LOCALMSG
} mouseover IF
mouseover temparray 4 PUT
} temparray 4 GET mouseover == NOT IF
i ++
} moarray FOREACH
30 ME SETALARM
}
 
Was this article helpful? yes / no
Article details
Article ID: 58
Category: Room Scripts
Date added: 04-02-2011 15:42:12
Views: 579
Rating (Votes): Article rated 1.0/5.0 (1)

 
<< Go back

Powered by Help Desk Software HESK™