Lucius commented on a Page, 3D text  -  May 11, 2011

Nicely spotted.
Here's my version.

alias -l spaces { return $+(,%3d.2,$chr(44),%3d.2,_)   }
Menu Nicklist,query,channel {
  .3dtext
  ..on: set %3dtext on 
  ..off: unset %3dtext  
  ...Bold
  ....On: set %3dbold 
  ....Off: unset %3dbold
  .Scheme
  ;####         v-text-v        v-background-v   v-endbrack-v   v-1stbrack-v
  ..Red (d):  set %3d.1 07 | set %3d.2 05 | set %3d.3 01 | set %3d.4 04
  ..Red (l):  set %3d.1 01 | set %3d.2 04 | set %3d.3 05 | set %3d.4 07
  ..Green..:  set %3d.1 00 | set %3d.2 03 | set %3d.3 01 | set %3d.4 09
  ..Blue...:  set %3d.1 14 | set %3d.2 02 | set %3d.3 01 | set %3d.4 12
  ..Teal...:  set %3d.1 00 | set %3d.2 10 | set %3d.3 02 | set %3d.4 11
  ..White..:  set %3d.1 00 | set %3d.2 14 | set %3d.3 01 | set %3d.4 15
  ..Pink...:  set %3d.1 08 | set %3d.2 13 | set %3d.3 12 | set %3d.4 07
  ..BLIND..:  set %3d.1 01 | set %3d.2 08 | set %3d.3 14 | set %3d.4 00
}
on *:Input:*: {
  if (%3dtext) && ($len($1-) < 49) {
    if ($left($1,1) == /) || ($left($1,1) == !) || ($left($1,1) == .) { goto skipper }
    msg $active %3dbold $regsubex($regsubex($1-,/(?!\s)(.)/g,$+($chr(3),%3d.4,$chr(44),%3d.2,$chr(40),$&
      $+($chr(3),%3d.1,$chr(44),%3d.2,\1),$+($chr(3),%3d.3,$chr(41),$chr(3)))),/(\s)/g,$spaces(\1)))
    haltdef

  }
  :skipper
}

Both ryan and I ended up with pretty much the same script. three extra colour schemes (added later) and the command triggers as well as a length check. More than 48 letters/numbers/spaces and it messed up the regex, so I set it to just skip and save the error message. (mine does not have the underline though)
(the bold variable was simply the CTRL+B bold character but hawkee doesn't recognise it, remember to add it in when/if you copy it (line 7) hehe)
Enjoy!
And remember Jethro did the hard work, we just played with it a bit. ;]

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.