Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate

Advertising

Paste Description for Mass Text

/mt
/mtrainbow
/reverse
/rainbow
/colors

Mass Text
Thursday, December 20th, 2007 at 2:01:30am UTC 

  1. alias colors {
  2.   var %length = $len($1-)
  3.   var %letter = 1
  4.   while (%letter <= %length) {
  5.     if ($mid($1-,%letter,1) == $chr(32)) {
  6.       var %output = %output $+ &
  7.       goto xxx
  8.     }
  9.     var %output = %output $+  $+ $rand(03,013) $+ $mid($1-,%letter,1)
  10.     :xxx
  11.     inc %letter
  12.   }
  13.   var %output = $replace(%output,$chr(38),$chr(32))
  14.   msg $active %output
  15. }
  16.  
  17. alias rev {
  18.   var %len = $len($1-)
  19.   var %return = $null
  20.   while (%len > 0) {
  21.     var %return = %return $+ $mid($1-,%len,1) $+ $chr(32)
  22.     dec %len
  23.   }
  24.   return %return
  25. }
  26. alias reverse //say $rev( $1- )
  27. alias mereverse //me $rev( $1- )
  28.  
  29. alias rainbow {
  30.   var %pos = 1, %color = 04, %result = $chr(3)
  31.   while (%pos <= $len($1-)) {
  32.     %result = %result $+ %color $+ $mid($1-,%pos,1) $+ $chr(3)
  33.     inc %pos
  34.     %color = $nextcolor(%color)
  35.   }
  36.   if ($isid) return %result
  37.   else say %result
  38. }
  39.  
  40. alias -l nextcolor {
  41.   if ($$1 == 04) return 07
  42.   elseif ($$1 == 07) return 08
  43.   elseif ($$1 == 08) return 09
  44.   elseif ($$1 == 09) return 11
  45.   elseif ($$1 == 11) return 12
  46.   elseif ($$1 == 12) return 02
  47.   elseif ($$1 == 02) return 06
  48.   elseif ($$1 == 06) return 13
  49.   elseif ($$1 == 13) return 04
  50. }
  51.  
  52. alias mt {
  53.   if ($bigtext.unsupp($1-)) {
  54.     echo -ac info * Characters not supported by Big Text present in your message: $bigtext.unsupp($1-)
  55.     return
  56.   }
  57.   var %lia, %lib, %lic, %lid, %lie, %i 1, %text $strip($1-, bur), %colregex /^(\d\d?(?:,\d\d?)?)/
  58.  
  59.   var %regex = /(?<= $+ $chr(3) $+ [0-9]| $+ $chr(3) $+ [0-9][0-9]) $+ $chr(44) $+ \d\d?/g, %res, %dummy = $regsub(%text, %regex, $null, %text)
  60.  
  61.   while (%i <= $len(%text)) {
  62.     if ($mid(%text, %i, 1) == $chr(3)) {
  63.       var %lia $+(%lia, $chr(3)), %lib $+(%lib, $chr(3)), %lic $+(%lic, $chr(3)), %lid $+(%lid, $chr(3)), %lie $+(%lie, $chr(3))
  64.       if ($mid(%text, $calc(%i + 1), 1) != $chr(32)) && ($regex(mtcol, $mid(%text, $calc(%i + 1), $mid(%text, $calc(%i + 1), 0)), %colregex)) {
  65.         var %m $regml(mtcol, 1)
  66.         var %lia %lia $+ %m, %lib %lib $+ %m, %lic %lic $+ %m, %lid %lid $+ %m, %lie %lie $+ %m
  67.         inc %i $len(%m)
  68.       }
  69.     }
  70.     else {
  71.       tokenize 32 $bigtext.char($mid(%text, %i, 1))
  72.       var %lia $+(%lia, $1), %lib $+(%lib, $2), %lic $+(%lic, $3), %lid $+(%lid, $4), %lie $+(%lie, $5)
  73.       ; if ($bigtext.kern($mid(%text, %i, 2))) {
  74.       var %lia $+(%lia, .), %lib $+(%lib, .), %lic $+(%lic, .), %lid $+(%lid, .), %lie $+(%lie, .)
  75.       ; }
  76.     }
  77.     inc %i
  78.   }
  79.   say $bigtext.format(%lia)
  80.   say $bigtext.format(%lib)
  81.   say $bigtext.format(%lic)
  82.   say $bigtext.format(%lid)
  83.   say $bigtext.format(%lie)
  84. }
  85.  
  86. ; You may customize this alias however you want to.
  87. ; It is Big Text's font, used above.
  88. ; The return value consists of dots and X's, to denote
  89. ;   unlit and lit points in the font, respectively;
  90. ;   there are 5 tokens of the same length, each
  91. ;   corresponding to a line in the 5-line output.
  92. ; Note how the . and X's look like the characters;
  93. ;   you can use this to your advantage!
  94. alias -l bigtext.char {
  95.   if ($1 === $chr(32)) || ($1 === $null) return $&
  96.     ... $&
  97.     ... $&
  98.     ... $&
  99.     ... $&
  100.     ...
  101.   if ($1 === $chr(160)) return $&
  102.     ..... $&
  103.     ..... $&
  104.     ..... $&
  105.     ..... $&
  106.     .....
  107.   elseif ($1 == 0) return $&
  108.     .XXXX. $&
  109.     XX..XX $&
  110.     XX.XXX $&
  111.     XXX.XX $&
  112.     .XXXX.
  113.   elseif ($1 == 1) return $&
  114.     .XXXX $&
  115.     XX.XX $&
  116.     ...XX $&
  117.     ...XX $&
  118.     ...XX
  119.   elseif ($1 == 2) return $&
  120.     XXXXX. $&
  121.     ....XX $&
  122.     ..XX.. $&
  123.     XX.... $&
  124.     XXXXXX
  125.   elseif ($1 == 3) return $&
  126.     XXXXX. $&
  127.     ....XX $&
  128.     .XXXX. $&
  129.     ....XX $&
  130.     XXXXX.
  131.   elseif ($1 == 4) return $&
  132.     .....XXX. $&
  133.     ...XX.XX. $&
  134.     .XX...XX. $&
  135.     XXXXXXXXX $&
  136.     ......XX.
  137.   elseif ($1 == 5) return $&
  138.     XXXXX $&
  139.     XX... $&
  140.     XXXX. $&
  141.     ...XX $&
  142.     XXXX.
  143.   elseif ($1 == 6) return $&
  144.     .XXXX. $&
  145.     XX.... $&
  146.     XXXXX. $&
  147.     XX..XX $&
  148.     .XXXX.
  149.   elseif ($1 == 7) return $&
  150.     XXXXXX $&
  151.     ...XX. $&
  152.     ..XX.. $&
  153.     .XX... $&
  154.     XX....
  155.   elseif ($1 == 8) return $&
  156.     .XXXX. $&
  157.     XX..XX $&
  158.     .XXXX. $&
  159.     XX..XX $&
  160.     .XXXX.
  161.   elseif ($1 == 9) return $&
  162.     .XXXX. $&
  163.     XX..XX $&
  164.     .XXXXX $&
  165.     ....XX $&
  166.     .XXXX.
  167.   elseif ($1 == A) return $&
  168.     .XXXX. $&
  169.     XX..XX $&
  170.     XXXXXX $&
  171.     XX..XX $&
  172.     XX..XX
  173.   elseif ($1 == B) return $&
  174.     XXXXX. $&
  175.     XX..XX $&
  176.     XXXXX. $&
  177.     XX..XX $&
  178.     XXXXX.
  179.   elseif ($1 == C) return $&
  180.     .XXXX. $&
  181.     XX..XX $&
  182.     XX.... $&
  183.     XX..XX $&
  184.     .XXXX.
  185.   elseif ($1 == D) return $&
  186.     XXXX.. $&
  187.     XX.XX. $&
  188.     XX..XX $&
  189.     XX..XX $&
  190.     XXXXX.
  191.   elseif ($1 == E) return $&
  192.     XXXXX $&
  193.     XX... $&
  194.     XXXX. $&
  195.     XX... $&
  196.     XXXXX
  197.   elseif ($1 == F) return $&
  198.     XXXXX $&
  199.     XX... $&
  200.     XXXX. $&
  201.     XX... $&
  202.     XX...
  203.   elseif ($1 == G) return $&
  204.     .XXXX. $&
  205.     XX.... $&
  206.     XX.XXX $&
  207.     XX..XX $&
  208.     .XXXXX
  209.   elseif ($1 == H) return $&
  210.     XX...XX $&
  211.     XX...XX $&
  212.     XXXXXXX $&
  213.     XX...XX $&
  214.     XX...XX
  215.   elseif ($1 == I) return $&
  216.     XXXX $&
  217.     .XX. $&
  218.     .XX. $&
  219.     .XX. $&
  220.     XXXX
  221.   elseif ($1 == J) return $&
  222.     ....XX $&
  223.     ....XX $&
  224.     ....XX $&
  225.     XX..XX $&
  226.     .XXXX.
  227.   elseif ($1 == K) return $&
  228.     XX..XX $&
  229.     XX.XX. $&
  230.     XXXX.. $&
  231.     XX.XX. $&
  232.     XX..XX
  233.   elseif ($1 == L) return $&
  234.     XX... $&
  235.     XX... $&
  236.     XX... $&
  237.     XX... $&
  238.     XXXXX
  239.   elseif ($1 == M) return $&
  240.     XX....XX $&
  241.     XXX..XXX $&
  242.     XXXXXXXX $&
  243.     XX.XX.XX $&
  244.     XX....XX
  245.   elseif ($1 == N) return $&
  246.     XX..XX $&
  247.     XXX.XX $&
  248.     XXXXXX $&
  249.     XX.XXX $&
  250.     XX..XX
  251.   elseif ($1 == O) return $&
  252.     .XXXX. $&
  253.     XX..XX $&
  254.     XX..XX $&
  255.     XX..XX $&
  256.     .XXXX.
  257.   elseif ($1 == P) return $&
  258.     XXXXX. $&
  259.     XX..XX $&
  260.     XXXXX. $&
  261.     XX.... $&
  262.     XX....
  263.   elseif ($1 == Q) return $&
  264.     .XXXX.. $&
  265.     XX..XX. $&
  266.     XX..XX. $&
  267.     XX..XX. $&
  268.     .XXXXXX
  269.   elseif ($1 == R) return $&
  270.     XXXXX. $&
  271.     XX..XX $&
  272.     XXXXX. $&
  273.     XX..XX $&
  274.     XX..XX
  275.   elseif ($1 == S) return $&
  276.     .XXXX. $&
  277.     XX.... $&
  278.     .XXXX. $&
  279.     ....XX $&
  280.     XXXXX.
  281.   elseif ($1 == T) return $&
  282.     XXXXXX $&
  283.     ..XX.. $&
  284.     ..XX.. $&
  285.     ..XX.. $&
  286.     ..XX..
  287.   elseif ($1 == U) return $&
  288.     XX..XX $&
  289.     XX..XX $&
  290.     XX..XX $&
  291.     XX..XX $&
  292.     .XXXX.
  293.   elseif ($1 == V) return $&
  294.     XX....XX $&
  295.     XX....XX $&
  296.     .XX..XX. $&
  297.     ..XXXX.. $&
  298.     ...XX...
  299.   elseif ($1 == W) return $&
  300.     XX...XX $&
  301.     XX...XX $&
  302.     XX.X.XX $&
  303.     XXXXXXX $&
  304.     .XX.XX.
  305.   elseif ($1 == X) return $&
  306.     XX...XX $&
  307.     .XX.XX. $&
  308.     ..XXX.. $&
  309.     .XX.XX. $&
  310.     XX...XX
  311.   elseif ($1 == Y) return $&
  312.     XX..XX $&
  313.     XX..XX $&
  314.     .XXXX. $&
  315.     ..XX.. $&
  316.     ..XX..
  317.   elseif ($1 == Z) return $&
  318.     XXXXXX $&
  319.     ...XX. $&
  320.     ..XX.. $&
  321.     .XX... $&
  322.     XXXXXX
  323.   elseif ($1 == $chr(35)) return $&
  324.     .XX..XX. $&
  325.     XXXXXXXX $&
  326.     .XX..XX. $&
  327.     XXXXXXXX $&
  328.     .XX..XX.
  329.   elseif ($1 == ') return $&
  330.     .XX $&
  331.     XX. $&
  332.     ... $&
  333.     ... $&
  334.     ...
  335.   elseif ($1 == ") return $&
  336.     XX..XX $&
  337.     XX..XX $&
  338.     ...... $&
  339.     ...... $&
  340.     ......
  341.   elseif ($1 == +) return $&
  342.     ...... $&
  343.     ..XX.. $&
  344.     XXXXXX $&
  345.     ..XX.. $&
  346.     ......
  347.   elseif ($1 == =) return $&
  348.     ...... $&
  349.     XXXXXX $&
  350.     ...... $&
  351.     XXXXXX $&
  352.     ......
  353.   elseif ($1 == -) return $&
  354.     ...... $&
  355.     ...... $&
  356.     XXXXXX $&
  357.     ...... $&
  358.     ......
  359.   elseif ($1 == _) return $&
  360.     ...... $&
  361.     ...... $&
  362.     ...... $&
  363.     ...... $&
  364.     XXXXXX
  365.   elseif ($1 == ?) return $&
  366.     XXXXX $&
  367.     ...XX $&
  368.     ..XX.. $&
  369.     ...... $&
  370.     ..XX..
  371.   elseif ($1 == :) return $&
  372.     .. $&
  373.     XX $&
  374.     .. $&
  375.     XX $&
  376.     ..
  377.   elseif ($1 == !) return $&
  378.     XX $&
  379.     XX $&
  380.     XX $&
  381.     .. $&
  382.     XX
  383.   elseif ($1 == ?) return $&
  384.     XXX. $&
  385.     ..XX $&
  386.     .XX. $&
  387.     .... $&
  388.     .XX.
  389.   elseif ($1 == .) return $&
  390.     .. $&
  391.     .. $&
  392.     .. $&
  393.     .. $&
  394.     XX
  395.   elseif ($1 == /) return $&
  396.     ....XX $&
  397.     ...XX. $&
  398.     ..XX.. $&
  399.     .XX... $&
  400.     XX....
  401.   elseif ($1 == \) return $&
  402.     XX.... $&
  403.     .XX... $&
  404.     ..XX.. $&
  405.     ...XX. $&
  406.     ....XX
  407.   elseif ($1 == $chr(40)) return $&
  408.     ...XX $&
  409.     .XX.. $&
  410.     XX... $&
  411.     .XX.. $&
  412.     ...XX
  413.   elseif ($1 == $chr(41)) return $&
  414.     XX... $&
  415.     ..XX. $&
  416.     ...XX $&
  417.     ..XX. $&
  418.     XX...
  419.   elseif ($1 == $chr(37)) return $&
  420.     XX..XX $&
  421.     ...XX. $&
  422.     ..XX.. $&
  423.     .XX... $&
  424.     XX..XX
  425.   elseif ($1 == [) return $&
  426.     XXXXX $&
  427.     XX... $&
  428.     XX... $&
  429.     XX... $&
  430.     XXXXX
  431.   elseif ($1 == ]) return $&
  432.     XXXXX $&
  433.     ...XX $&
  434.     ...XX $&
  435.     ...XX $&
  436.     XXXXX
  437.   elseif ($1 == |) return $&
  438.     .XX. $&
  439.     .XX. $&
  440.     .XX. $&
  441.     .XX. $&
  442.     .XX.
  443.   elseif ($1 == <) return $&
  444.     ....XX $&
  445.     ..XX.. $&
  446.     XX.... $&
  447.     ..XX.. $&
  448.     ....XX
  449.   elseif ($1 == >) return $&
  450.     XX.... $&
  451.     ..XX.. $&
  452.     ....XX $&
  453.     ..XX.. $&
  454.     XX....
  455.   elseif ($1 == ?) return $&
  456.     .... $&
  457.     .... $&
  458.     .XX. $&
  459.     ..XX $&
  460.     XXX.
  461.   elseif ($1 == ,) return $&
  462.     ... $&
  463.     ... $&
  464.     XXX $&
  465.     .XX $&
  466.     XX.
  467.   elseif ($1 == $chr(42)) return $&
  468.     .XXXX.. $&
  469.     XX..XX. $&
  470.     XX..XX. $&
  471.     XX..XX. $&
  472.     .XXXXXX
  473. }
  474.  
  475. ; Returns all unsupported characters within a Big Text message
  476. ; Supported characters are a-z, space, digits, #'"+=?:!?./\()%-[]<>|?,
  477. alias bigtext.unsupp {
  478.   var %res, %dummy = $regsub($1-, /[]a-z  0-9# $+ $chr(44) $+ '+=?:!?./\\()%[|<>_?"?-]/igS, $null, %res)
  479.   return %res
  480. }
  481.  
  482. ; Returns $true if a space should be added between two characters,
  483. ;   or $false if not.
  484. ; Note: This is here only for aesthetic purposes. :)
  485. alias bigtext.kern {
  486.   var %res $true
  487.   if ($regex($1-, /^(.|[_GDSQL-]T|[TPFVY7/"]J|T\.|L[1Y\\"]|[LTK<[]-|-[]>%\\]|S1|T4|\?\.|\.\?|[467L\\]?|?[J/]|L'|\/\/|\\\\|?J|[_?]?|[?T_]_|>\.|\.<)$/i)) %res = $false
  488.   return %res
  489. }
  490.  
  491. ; Takes an input string of the form:
  492. ; .XX..XX....XX.XX.XXXXX
  493. ; And formats it for display.
  494. alias bigtext.format {
  495.   var %res, %i 1, %previous 0, %current, %curcolor, %colregex /^(\d\d?(?:,\d\d?)?)/
  496.   while (%i <= $len($1-)) {
  497.     if ($mid($1-, %i, 1) == $chr(3)) {
  498.       if ($regex(mtcol, $mid($1-, $calc(%i + 1), $mid($1-, $calc(%i + 1), 0)), %colregex)) {
  499.         if ($gettok($regml(mtcol, 1), 1, 44) != %curcolor) {
  500.           %curcolor = $gettok($regml(mtcol, 1), 1, 44)
  501.           if (%i != 1) && ($mid($1-, $calc(%i - 1), 1) == X) %res = %res $+ $chr(15)
  502.         }
  503.         inc %i $len($regml(mtcol, 1))
  504.       }
  505.       elseif (%curcolor) {
  506.         %curcolor =
  507.         if (%i != 1) && ($mid($1-, $calc(%i - 1), 1) == X) %res = %res $+ $chr(15)
  508.       }
  509.     }
  510.     else {
  511.       %current = $iif($mid($1-, %i, 1) == ., 0, 1)
  512.       if (%previous != %current) {
  513.         %previous = %current
  514.         if (%curcolor) {
  515.           if (%current) %res = %res $+ $chr(3) $+ %curcolor $+ , $+ %curcolor
  516.           else %res = %res $+ $chr(3)
  517.         }
  518.         else %res = %res $+ $chr(22)
  519.       }
  520.       %res = %res $+ $chr(160)
  521.     }
  522.     inc %i
  523.   }
  524.   return %res
  525. }
  526.  
  527. alias mtrainbow //mt $rainbow( $+ $1- $+ )

advertising

Update the Post

Either update this post and resubmit it with changes, or make a new post.

You may also comment on this post.

update paste below
details of the post (optional)

Note: Only the paste content is required, though the following information can be useful to others.

Save name / title?

(space separated, optional)



Please note that information posted here will not expire by default. If you do not want it to expire, please set the expiry time above. If it is set to expire, web search engines will not be allowed to index it prior to it expiring. Items that are not marked to expire will be indexable by search engines. Be careful with your passwords. All illegal activities will be reported and any information will be handed over to the authorities, so be good.

comments powered by Disqus
worth-right
worth-right
worth-right