Advertisement
Yarukinasu

rave

Mar 22nd, 2011
309
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. HEXADECIMAL = "0 1 2 3 4 5 6 7 8 9 A B C D E F"
  2. HEXLENGTH = (listlen $HEXADECIMAL)
  3.  
  4. curfogcolor = "F F 0 0 0 0"
  5.  
  6. hexupdate = [
  7.   tmparg = (getalias $arg1)
  8.   tmpindex = (findlist $HEXADECIMAL (at $tmparg))
  9.   if $arg2 [
  10.     if (< (findlist $HEXADECIMAL (at $tmparg 1)) (- $HEXLENGTH 1)) [
  11.       tmpindex = (concat $tmpindex (+ (findlist $HEXADECIMAL (at $tmparg 1)) 1)) ] [
  12.       tmpindex = (concat (+ $tmpindex 1) 0) ] ] [
  13.     if (> (findlist $HEXADECIMAL (at $tmparg 1))) [
  14.       tmpindex = (concat $tmpindex (- (findlist $HEXADECIMAL (at $tmparg 1)) 1)) ] [
  15.       tmpindex = (concat (- $tmpindex 1) (- $HEXLENGTH 1)) ] ]
  16.   $arg1 = (concat (at $HEXADECIMAL (at $tmpindex)) (at $HEXADECIMAL (at $tmpindex 1))) ]
  17. isf = [ result (&& [ strcmp (at $arg1) "F" ] [ strcmp (at $arg1 1) "F" ]) ]
  18. iszero = [ result (&& [ strcmp (at $arg1) "0" ] [ strcmp (at $arg1 1) "0" ]) ]
  19. rave = [
  20.   fogr = (concat (at $curfogcolor) (at $curfogcolor 1))
  21.   fogg = (concat (at $curfogcolor 2) (at $curfogcolor 3))
  22.   fogb = (concat (at $curfogcolor 4) (at $curfogcolor 5))
  23.   if (isf $fogr) [
  24.     if (isf $fogg) [ hexupdate fogr 0 ] [
  25.       if (iszero $fogb) [ hexupdate fogg 1 ] [ hexupdate fogb 0 ] ] ] [
  26.   if (isf $fogg) [
  27.     if (isf $fogb) [ hexupdate fogg 0 ] [
  28.       if (iszero $fogr) [ hexupdate fogb 1 ] [ hexupdate fogr 0 ] ] ] [
  29.   if (isf $fogb) [
  30.     if (isf $fogr) [ hexupdate fogb 0 ] [
  31.       if (iszero $fogg) [ hexupdate fogr 1 ] [ hexupdate fogg 0 ] ] ] ] ]
  32.   curfogcolor = (concat $fogr $fogg $fogb)
  33.   tmpcurfogcolor = (at $curfogcolor)
  34.   loop i (- (listlen $curfogcolor) 1) [
  35.     tmpcurfogcolor = (concatword $tmpcurfogcolor (at $curfogcolor (+ $i 1))) ]
  36.   fogcolour (concatword "0x" $tmpcurfogcolor)
  37.   sleep 0 rave ]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement