Knowledgebase
Storm Palace Hosting > Storm Hosting Help Desk > Knowledgebase

Ask a question:


Av room script 4 door

Solution selene hunted this one down ;)

Door # 1

;this is the only spot that is required!
;Simply put lines of data in here, according to the comment below
;script by Foxy Next
ON ALARM
{ [
;add avatar lines here
;format is [ [ -prop ids- ] "description to show in log" ]
[ [ ] "" ]
[ [ ] "" ]
] proparray =
nbrp GLOBAL rfs1 GLOBAL
proparray LENGTH nbrp =
{ proparray rfs1 GET cav =
cav 0 GET SETPROPS cav 1 GET prsc =
"Avatar " rfs1 1 + ITOA + "/" + nbrp ITOA + " " + prsc + " " + LOGMSG
} rfs1 nbrp < rfs1 -1 > AND IF
rfs2 GLOBAL rfs3 GLOBAL rfspd GLOBAL
{ { "Refreshing " ROOMNAME + " " + rfs2 ITOA + "/" + rfs3 EXEC LENGTH 1 - ITOA +
LOGMSG rfs1 ++ rfspd ME SETALARM
}
{ { rfs1 ++ rfspd ME SETALARM }
{ rfs2 ++ { 0 rfs2 = } rfs2 rfs3 EXEC LENGTH == IF
NAKED rfs3 EXEC rfs2 GET GOTOROOM
} rfs1 1 + nbrp < IFELSE
} rfs1 -1 == IFELSE
} rfs2 ISWIZARD AND IF
}
ON ENTER { rfs1 GLOBAL prpspt GLOBAL ME prpspt =
-1 rfs1 = 1 ME SETALARM }
ON SELECT{ rfs1 GLOBAL nbrp GLOBAL
rfs1 ++
{ 0 rfs1 = } rfs1 nbrp >= IF
1 ME SETALARM
}





************************************************************************

Door #2 Passage

;resets av
ON SELECT{ prpspt GLOBAL rfs1 GLOBAL
0 rfs1 = 1 prpspt SETALARM
}


*************************************************************************

Door #3 Passage

;back
ON SELECT{ prpspt GLOBAL rfs1 GLOBAL nbrp GLOBAL
rfs1 -- { nbrp 1 - rfs1 = } rfs1 -1 <= IF
1 prpspt SETALARM
}

***************************************************************************
Door #4 Normal


ON ALARM {
[
"958703651 958703668 958703674"
"958958815"
"958958805"
"958958773"
"958958837"
"957247021"
] thearray = thearray length noarray =
x1 GLOBAL
cmd GLOBAL
{
"There are " noarray ITOA + " avatars in this room." + statusmsg
{ "use 'rew' and 'forward' to select the ones you like" statusmsg } 60
ALARMEXEC
-1 x1 =
60 400 RANDOM + gotox =
60 200 RANDOM + gotoy =
{
i++
gotox POSX - 10 / POSX + newx =
gotoy POSY - 10 / POSY + newy =
newx newy SETPOS
} { i 30 < } WHILE
} cmd "init" == IF
{
x1 ++
{ 0 x1 = } 1 x1 + noarray > IF
"Now showing: avatar " 1 x1 + itoa + "/" + noarray itoa + logmsg
thearray x1 get xpropo =
"[" xpropo + "] SETPROPS" + xpropo =
xpropo STRTOATOM EXEC
} cmd "next" == IF
{
x1 --
{ noarray 1 - x1 = } x1 0 < IF
"Now showing: avatar " 1 x1 + itoa + "/" + noarray itoa + logmsg
thearray x1 get xpropo =
"[" xpropo + "] SETPROPS" + xpropo =
xpropo STRTOATOM EXEC
} cmd "prev" == IF
{
"Resetting Buttons to Start" logmsg
naked
-1 x1 =
} cmd "reset" == IF
}
;ON ENTER {
;x1 GLOBAL
;cmd GLOBAL
;"init" cmd =
;1 x1 =
;1 me SETALARM
}
ON SELECT {
"Original script by Sting." statusmsg
{"'next' and 'prev' scripting by andre@trimm.nl" statusmsg } 120 ALARMEXEC
{ "You can use this script as long as this message stays intact" statusmsg
} 240 ALARMEXEC
{ "by the way, it's no use clicking here !" statusmsg } 360 ALARMEXEC }
;get your avatar ids routine, by Foxy- say "avids <description"
;to get a line in your log to put in this script
ON OUTCHAT {
{ "" CHATSTR = "\x22 " 0 tbl =
{tbl USERPROP ITOA + " " + tbl ++
} {tbl NBRUSERPROPS == NOT} WHILE
" \x22;" + "$1" GREPSUB + LOGMSG
} CHATSTR "^avids(.*)" GREPSTR IF
}
 
Was this article helpful? yes / no
Article details
Article ID: 247
Category: Room Scripts
Date added: 07-26-2011 02:21:19
Views: 549
Rating (Votes): Article not rated yet (0)

 
<< Go back

Powered by Help Desk Software HESK™