;************************************************************
;************************************************************

;Script :  NewRainbowBeam 1.1
;Author :  Michael Lampkin
;Date   :  11-16-96

;Desc   :  Puts a Rainbow beam from user to cursor 44 pixels
;          high (y axis), places a prop at the target site... 
;          uses sound file found at palace.minds.com port 9998 
;          follow the web link.

;Modifications -
;
;  Realized after I put up the prior ver... that like the original 
;  Rainbow Beam, this one's beam became thinner the further
;  vertical you aimed, eventually becoming a single line which
;  changed color.  The modification has corrected that problem
;  so that a full beam should appear no matter where you aim.

;Syntax :  rbeamer 

;************************************************************

  {

  
  ;Set beam start position  & target loc

    POSX x =
    POSY y = 

    MOUSEPOS my = mx =

  ;Prepare to draw beam, set up colors table
  ;User may add or delete colors from the table w/o ill effect
  ; simply add or delete a color set "[ r g b ]"
     
    1 PENSIZE
    PENBACK

    [ [ 0   128 255 ]
      [ 0   255 255 ]
      [ 0   255 128 ]
      [ 0   255 0   ]
      [ 128 255 0   ]
      [ 255 255 0   ]
      [ 255 255 128 ]
      [ 255 255 255 ]
      [ 255 128 0   ]
      [ 255 0   0   ] ] coltab =

    coltab LENGTH numcol =

    x mx - x mx - * dx =
    y my - y my - * dy =

    ;Loop thru color table & draw beam 44 pixels high

    0 i = 
    { 
      coltab i numcol % GET curcol =
      curcol 0 GET r =
      curcol 1 GET g =
      curcol 2 GET b =
      r g b PENCOLOR
 
      {
        x y mx my i + LINE
        x y mx my i - LINE 
      } 
      { 
        x y mx i + my LINE
        x y mx i - my LINE
      } dx dy >= IFELSE
 
     i ++
    }
    { i 22 < } WHILE


  ;now clear the mess we've made... and make a sound (minds sound)

    ")cmmplc" SAY 
    
    0 i = 
    { 
      PAINTUNDO 
      PAINTUNDO 
      i ++ 
    } 
    { i 22 < } WHILE

  ;if a prop was named, place at end of beam

    "$1" GREPSUB mx 20 - my 10 - ADDLOOSEPROP

  ;so we dont look like we are talking to ourself   

    "" CHATSTR =

  }   CHATSTR "rbeamer (.*)$" GREPSTR IF

    Source: geocities.com/siliconvalley/network/8524/scripts

               ( geocities.com/siliconvalley/network/8524)                   ( geocities.com/siliconvalley/network)                   ( geocities.com/siliconvalley)