Nov
03
2002
0

Al Bhed Translator

Al Bhed TranslatorAn encoder / decoder for the Final Fantasy 10 language of Al Bhed. This small script I wrote which converts Al Bhed into English, and English into Al Bhed, the one main downside to the script is that all the letter changes are hardcoded as they are random.

Not really useful, but it was the first script I wrote for mIRC. Although being pointless, it did lead to more scripting being wrote, such as Away Beep, and eventually KalDLL.

; --- [ decode ] ----------------------------------------
on *:TEXT:*:#:{
  if (AlBhed: isin $1-) {
    var %decode obmdyjgnawkscripqhltezvxuf
   var %text $lower($2-)
    var %length $len(%text)
    var %out
    var %pos 1

    while (%pos <= %length) {
      var %value $mid(%text,%pos,1)
      if (%value != $chr(32)) {
        %value = $asc(%value) - 96
        %out = %out $+ $mid(%decode,%value,1)
      }
      else {
        %out = %out $chr(32)
      }
      inc %pos
    }
    echo $chan 12AlBhed: %out
  }
}

; --- [ encode ] ----------------------------------------
alias albhed {
  var %encode ibmduzgrofkschapqnltywjxev
  var %text $lower($1-)
  var %length $len(%text)
  var %out
  var %pos 1
 while (%pos <= %length) {
    var %value $mid(%text,%pos,1)
    if (%value != $chr(32)) {
      %value = $asc(%value) - 96
      %out = %out $+ $mid(%encode,%value,1)
    }
    else {
      %out = %out $chr(32)
    }
    inc %pos
  }

  say 4AlBhed: %out
}
Written by Kaluriel in: Addons / Mods | Tags: ,

Theme: TheBuckmaker.com Blog Themes | The best Webhosting Plans, Eigenes Internet Radio