Knowledgebase
Storm Palace Hosting > Storm Hosting Help Desk > Knowledgebase

Ask a question:


Counter

Solution ON SELECT {
{ME GetSpotState 1 + state =}{0 state =} ME GetSpotState 2 < IFELSE
state ME SetSpotState
}

Make three doors with your number pics 0-9 in each one.
Door for ones
ON ENTER
{
s_1 GLOBAL
ME s_1 =
0 ME SETALARM
}
ON SELECT
{
s_10 GLOBAL
{ 0 ME SETSPOTSTATE
s_10 SELECT
} { ME GETSPOTSTATE 1 + ME SETSPOTSTATE } ME GETSPOTSTATE 9 == IFELSE
}
ON ALARM {
s_10 GLOBAL
{ 0 ME SETSPOTSTATE
s_10 SELECT
} { ME GETSPOTSTATE 1 + ME SETSPOTSTATE } ME GETSPOTSTATE 9 == IFELSE
}

Door for tens
ON ENTER
{
s_10 GLOBAL
ME s_10 =
}
ON SELECT
{
s_100 GLOBAL
{ 0 ME SETSPOTSTATE
s_100 SELECT
} { ME GETSPOTSTATE 1 + ME SETSPOTSTATE } ME GETSPOTSTATE 9 == IFELSE
}

Door for hundreds
ON ENTER
{
s_100 GLOBAL
ME s_100 =
}
ON SELECT
{
s_1000 GLOBAL
{ 0 ME SETSPOTSTATE
s_1000 SELECT
} { ME GETSPOTSTATE 1 + ME SETSPOTSTATE } ME GETSPOTSTATE 9 == IFELSE
}
 
Was this article helpful? yes / no
Article details
Article ID: 333
Category: Room Scripts
Date added: 01-06-2014 09:04:22
Views: 559
Rating (Votes): Article not rated yet (0)

 
<< Go back

Powered by Help Desk Software HESK™