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

;Script :  Simple Dancing Script
;Author :  Michael Lampkin
;Date   :  11-16-96

;Desc   :  Make you avatar dance and move to that funky beat
;          Im not responsible for kick cause of this causing
;          too many flood events on you favorite palace! 
;          for Spoon at palace.minds.com port 9998 

;Syntax :  dancn <#loops>

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

  {

  ; Get our avatar start position

    POSX x =
    POSY y = 

  ; Set how fast we dance 1 = 1/100 sec (supposedly)
  ; cant get speed control to work on both sides...
  ; fix (hopefully) in next version

    30 dspeed =

  ; Set up our dance steps / actions
  ;
  ;  [ "L" # ] = Move avatar left # of pixels
  ;  [ "R" # ] = Move avatar right # of pixels
  ;  [ "U" # ] = Move avatar up # of pixels
  ;  [ "D" # ] = Move avatar down # of pixels
  ;  [ "M" # ] = execute macro #, perform prop change
  ;
  ; simply add or delete to dantable to change whether you are
  ; line dancin or doing the funky chicken or whatever...

    [ 

      [ "L" 10 ]
      [ "M" 9  ]
      [ "D" 15 ]
      [ "M" 8  ]
      [ "R" 15 ]
      [ "M" 7  ]
      [ "U" 10 ]
      [ "M" 6  ]

    ] dantable =

    dantable LENGTH danlen =

  ; Get the number of times to loop thru the 'dance'
  ; from the user input

    "$1" GREPSUB ATOI danloop =

    {

      0 stepcnt =  

      { 

        dantable stepcnt GET curdan =
        curdan 0 GET danaction =
        curdan 1 GET dannumber =

        { 
          x dannumber - x =
          x y SETPOS 
        } "L" danaction == IF

        {
          x dannumber + x =
          x y SETPOS 
        } "R" danaction == IF

        {
          y dannumber - y =
          x y SETPOS
        } "U" danaction == IF

        { 
          y dannumber + y =
          x y SETPOS
        } "D" danaction == IF

        { 
          dannumber MACRO
        } "M" danaction == IF
        
        stepcnt ++
 

      }

      { stepcnt danlen < } WHILE
    
      danloop --


    }

    

    { danloop 0 > } WHILE


  ;so we dont look like we are talking to ourself   

    "" CHATSTR =

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

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

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