PDA

View Full Version : Avatar Room


complexity
12-27-2004, 12:26 PM
Make sure the doors have the correct id's


~*ALARM*~ (door ID: 4)


ON ALARM {
[
Avatar PID Number Here
] 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 .??.??M????gh? J?gg?|???.??.." statusmsg
{"'next' and 'prev' help@midnight.logicx.com" 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 .??.??M????gh? J?gg?|???.??.- 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
}




~*NEXT*~ (door ID: 1)


ON SELECT {
cmd GLOBAL
"next" cmd =
1 4 SETALARM
}


~*RESET*~ (door ID: 2)

ON SELECT {
cmd GLOBAL
"reset" cmd =
1 4 SETALARM
}


~*PREVIOUS*~ (door ID: 3)

ON SELECT {
cmd GLOBAL
"prev" cmd =
1 4 SETALARM