Knowledgebase
Storm Palace Hosting > Storm Hosting Help Desk > Knowledgebase

Ask a question:


Mouseover 3

Solution ;Mouseover script #3
;This script changes the state of its spot to multiple states depending on
;where the mouse is positioned in the spot.
;When the mouse is clicked it sends the user to a predetermined destination.
ON ENTER
{
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
{
moarray GLOBAL
mostate GLOBAL
[
;
;************************************************************************
;Put mouseover coordinates here in form:
;[ x_left x_right y_up y_down type destination ]
;Types are "rm" for room, "pal" for palace, "web" for web and "email" for email.
;Use "null" if you do not want the script to send you anywhere ON SELECT.
;The destination is the "room number" or the palace, web or email "address".
;Omit the http://, palace:// and mailto: portions of the address.
;Leave the first spot picture as <none>.
;Put spot pictures corresponding to coordinates, below, as second through Nth picture.

;
[ 100 150 100 120 "rm" "87" ]
[ 100 150 140 160 "rm" "88" ]
[ 100 150 160 180 "rm" "89" ]
[ 100 150 180 200 "rm" "90" ]
;************************************************************************
] 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 } ME GETSPOTSTATE mostate == NOT IF
30 ME SETALARM
}
 
Was this article helpful? yes / no
Article details
Article ID: 60
Category: Room Scripts
Date added: 04-02-2011 15:43:12
Views: 446
Rating (Votes): Article not rated yet (0)

 
<< Go back

Powered by Help Desk Software HESK™