All pastes #571458 Raw Edit

Untitled

public text v1 · immutable
·published 2007-06-17 04:28 UTC
rendered paste body
;Ranbow Text Script

;June 2002 - Slight Changes Sept 2003

;By

;Chris shaw@ http://chrisshaw.cjb.net

;Also Robert Naylor (Pobice)@http://pobice.co.uk

menu channel {

  %rainbow_ON :/rainbow

}

alias Rainbow {

  If (%rainbow_ON = $style(0) Rainbow Text) { /set %rainbow_ON $style(1) Rainbow Text }

  Else { /set %rainbow_ON $style(0) Rainbow Text }

}

alias bowcleanup {

  /unset %text

  /unset %textpro

  /unset %textcount

  /unset %textrand

  /unset %testright

  /unset %testleft

  /unset %randnum

  /unset %textnew

  /unset %textsay

}

on 1:INPUT:*:{

  If (%rainbow_ON == $style(0)  Rainbow Text) {

    if ($1 == -rbt ) set %text $2-

    else { GOTO ONE }

  }

  else { if ($1 == -rbt ) set %text $2-

    else set %text $1-

  }

  If (/ isin %text) GOTO one

  if (%text isnum) GOTO one

  /set %textpro 0

  :THREE

  ;change the processing value here

  If (%textpro => 6) GOTO Four

  :FIVE

  /set %textcount $len(%text)

  if ($left(%text,1) isnum) {

    /set %textrand $rand(1,%textcount)

    GOTO six

  }

  if (%textpro == 0) /set %textrand $len(%text)

  Else /set %textrand $rand(1,%textcount)

  :SIX

  /set %testright $right(%text,%textrand)

  /set %testleft $left(%testright,1)

  if (%testleft isnum) GOTO FIVE

  if (%testleft == $chr(32)) GOTO FIVE

  :two

  /set %randnum $rand(2,13)

  If (%randnum == 8) Goto two

  /set %textnew  $+ %randnum $+ %testleft

  //set %textsay $replace(%text,%testleft,%textnew)

  /set %text %textsay

  /inc %textpro

  GOTO THREE

  :FOUR

  /say %textsay

  /bowcleanup

  /halt

  :one

  /bowcleanup

}

on 1:LOAD:/set %rainbow_ON $style(1) Rainbow Text