PM.. This evolution on Finna's script may be handy...
Looking at what Finna wrote, I thought using an array may be a useful modification to Finna's script. This means all EDITS of songs take place in one part of the script... And therefore less likely to be messed up.
So PM, this should work also....
ON ENTER { "Say 'songlist' to see a list of
songs. To download a song, type the corresponding
number. To play it, type the number again. To stop a
song type: stop" LOCALMSG}
ON OUTCHAT {
my_musik GLOBAL
[ "iwannafuku.wav" "wantsumpussy.wav" "candyshop.wav"
"ac-dc_remix.wav" "BoomBoomBoom.wav" "CrazyFrog.wav"
"Brickhouse.wav" "MyHumps.wav" "Switch.wav"
"NoHeaven.wav" "monymony.wav" "DuttyWine.wav"
"londonbridge.wav" ] my_musik =
{ 0 tempvar =
{ tempvar ++ "___" & tempvar ITOA & LOGMSG } my_musik
FOREACH
"" GREPSUB CHATSTR = } CHATSTR LOWERCASE "^songlist$"
GREPSTR IF
{ ME UNLOCK
""GREPSUB CHATSTR = } CHATSTR LOWERCASE "^stop$"
GREPSTR IF
{;songs 1-9
CHATSTR ATOI yourNumber =
yourNumber --
{ my_musik yourNumber GET SOUND } { yourNumber ++
"Sorry, there is no song " yourNumber ITOA & SAY }
yourNumber my_musik LENGTH < IFELSE
"" GREPSUB CHATSTR =
} CHATSTR "^[0-9]$" GREPSTR IF
{;songs 10-99
CHATSTR ATOI yourNumber =
yourNumber --
{ my_musik yourNumber GET SOUND } { yourNumber ++
"Sorry, there is no song " yourNumber ITOA & SAY }
yourNumber my_musik LENGTH < IFELSE
;my_musik yourNumber GET SOUND
"" GREPSUB CHATSTR =
} CHATSTR "^[0-9][0-9]$" GREPSTR IF
}
|