Jump to content
coders-irc_Bot

Emboss for mIRC

Recommended Posts

  • Administrators
;# Emboss Fonts for mIRC. Based on font from TOIlet @ Caca Labs
;# /emb <text>  and  /enb2 <text>
;# /emb [-m|-n target] <text> -- to message or notice target(s).
;# /emb [-cmd ["]custom["]] <text> -- send by arbitrary command.
;# Bold and Reverse control codes, work. Color support coming...
;# The missing characters # $ % are not a perfect compromise.
emb2 { emb -2 $1- } 
emb {
  var %cmd = say
  while (-* iswm $1) { ; -switches
    if ($1 == -cmd) && ($regex($2-,/(?:"([^"]*)"|\S+)(.*)/)) {
      var %cmd = $regml(1) | tokenize 32 $regml(2)
    }
    elseif ($1 == -m) { var %cmd = msg $2    | tokenize 32 $3- }
    elseif ($1 == -n) { var %cmd = notice $2 | tokenize 32 $3- }
    elseif ($1 == -2) { var %emb2 = $true    | tokenize 32 $2- }
    else { break } ; unknown switch.
  }
  var %a, %b1, %b2, %b3
  %a = $chr(32) $+ !"&'()*+,-./#$%—0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`{|}~
  %b1 = ..,.┃,┛┛,┏┛┃.,┛,.┛,━.,┛.┛,.┃.,.,..,..,..┛,.╻╻.,┏┳┓,┏┓╻,....,
  %b2 = ..,.┛,..,┃━┏┛,.,┃.,.┃,━┏┛,━┏┛,.,━┛,..,.┛.,╺┏┏╸,┗╋┓,┏━┛,━━━┛,
  %b3 = ..,.┛,..,━━┛.,.,.┛,━.,┛.┛,.┛.,┛,..,.┛,┛..,╺┏┏╸,┗┻┛,╹┗┛,....,
  %b1 = %b1 $+ ┏━┃,━┃.,━━┃,━━┃,┃.┃,┏━┛,┏━┛,┏━┃,┏━┃,┏━┃,..,..,..┛,...,┛..,┏━┃,┏━┃,
  %b2 = %b2 $+ ┃┛┃,.┃.,┏━┛,━━┃,━━┃,━━┃,┏━┃,..┃,┏━┃,━━┃,.┛,.┛,┛..,━━┛,..┛,..┛,┃┛┛,
  %b3 = %b3 $+ ━━┛,━━┛,━━┛,━━┛,..┛,━━┛,━━┛,..┛,━━┛,━━┛,.┛,.┛,..┛,━━┛,┛..,.┛.,━━┛,
  %b1 = %b1 $+ ┏━┃,┏━.,┏━┛,┏━.,┏━┛,┏━┛,┏━┛,┃.┃,┛,.┛,┃.┃,┃..,┏┏.,┏━.,┏━┃,┏━┃,┏━┃.,┏━┃,
  %b2 = %b2 $+ ┏━┃,┏━┃,┃..,┃.┃,┏━┛,┏━┛,┃.┃,┏━┃,┃,.┃,┏┛.,┃..,┃┃┃,┃.┃,┃.┃,┏━┛,┃.┃.,┏┏┛,
  %b3 = %b3 $+ ┛.┛,━━.,━━┛,━━.,━━┛,┛..,━━┛,┛.┛,┛,━┛,┛.┛,━━┛,┛┛┛,┛.┛,━━┛,┛..,━━━┛,┛.┛,
  %b1 = %b1 $+ ┏━┛,━┏┛,┃.┃,┃.┃,┃┃┃,┃.┃,┃.┃,━━┃,┏┛,┛..,━┃,.┛.,...,┛.,.┏┛,┃,━┃.,.┛.┛
  %b2 = %b2 $+ ━━┃,.┃.,┃.┃,┃.┃,┃┃┃,.┛.,━┏┛,┏┛.,┃.,.┛.,.┃,┛.┛,...,.┛,━┃.,┃,.┏┛,┛.┛.
  %b3 = %b3 $+ ━━┛,.┛.,━━┛,.┛.,━━┛,┛.┛,.┛.,━━┛,━┛,..┛,━┛,...,━━┛,..,.━┛,┛,━┛.,....
  var %s = $replace($upper($1-),$chr(160),$chr(32),Ä,AE,Ö,OE,Ü,UE,ß,SS,--,—)
  var %i = 1, %n = 3
  while (%i <= %n) {
    if (%emb2) var %b $+ %i $replace(%b [ $+ [ %i ] ],━,═,┃,║,┏,╔,┛,╝)
    %cmd $replace($regsubex(%s,/(*UTF8)(.)/g, $& 
      $iif($gettok(%b [ $+ [ %i ] ],$poscs(%a,\t),44),$v1,\t)),.,$chr(160))
    inc %i
  } 
  if (!$event) && (!$editbox($active)) editbox -ap /emb $+ $iif(%emb2,2)
} ; by Raccoon 2016

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...