;;; Raincolor Smilie Face Color Changer
;;; Changes the color of your smilie face and baloons with each message
;;; Changes it through the colors instead of randomly like other scripts
;;; "raincolor" turns it on and off
;;; By "the" Orion©
raincolor GLOBAL
CurColor GLOBAL
{
"$1" GREPSUB x =
{
x "on" SUBSTR x "[yt+]" GREPSTR OR raincolor =
} { raincolor NOT raincolor =
} x "^(.+)$" GREPSTR IFELSE
"Raincolor is "
{ "Off" } { "On" } raincolor IFELSE
+ STATUSMSG
"" CHATSTR =
} CHATSTR LOWERCASE "^raincolor(.*)$" GREPSTR IF
{
{ CurColor ++ } { 0 CurColor = } CurColor 15 < IFELSE
CurColor SETCOLOR
} raincolor NOT
"" CHATSTR == NOT AND
CHATSTR "^[;'`~]" GREPSTR NOT AND
WHOTARGET NOT AND IF
"the" Orion©
USA
Cool, thanks! I like the traps for ; and whispering, too
BTW,
{ CurColor ++ } { 0 CurColor = } CurColor 15 < IFELSE
could also be
CurColor 1 + 16 % CurColor =
;oh, and dropping raincolor and using a semaphore value like -1 for CurColor reduces the global load to one variable (handy for big cyborgs)
;By Xochi