on *:INPUT:#: {
if ((%mimic == $null) && ($mid($1,1,1) != /)) { /echo -a dude... choose if mimic is on or of by right clicking in the channel window }
if ((%chan == $null) && ($mid($1,1,1) != /)) { /echo -a gotta pick a channel man! }
if ((%pmimic == $null) && ($mid($1,1,1) != /)) { /echo -a you biscuit eating bulldog, ickpay ifay igpay atinlay isay onay oray offay }
if ((%rmimic == $null) && ($mid($1,1,1) != /)) { /echo -a pick if its reversed or not, dude! }
}
on *:TEXT:*:%chan: {
if ($nick == dumbledore) { halt }
if (($me isin $1-) || (matt isin $1-) || (gay isin $1-) || (ttam isin $1-)) { halt }
if (%mimic == off) { halt }
if (%mimic == on) {
if ($nick != $me) goto tmimic
else { halt }
:tmimic
if (%chan == #mugglenet) { halt }
if (%rmimic == on) {
var %wcnt = $len($1-)
var %rword
while (%wcnt > 0) {
if ($mid($1-,%wcnt,1) == $chr(32)) {
set %wcnt %wcnt - 1
set %rword %rword $+ $chr(32) $+ $mid($1-,%wcnt,1)
set %wcnt %wcnt - 1
if (%wcnt != 0) { continue }
else { break }
}
else {
set %rword %rword $+ $mid($1-,%wcnt,1)
set %wcnt %wcnt - 1
if (%wcnt != 0) {
continue
}
}
else { break }
}
if (%wcnt == 0) {
/msg %chan %rword
}
}
elseif (%pmimic == on) {
if (%pmimic == on) {
var %wcnt = $len($1-)
if (%wcnt == 1) { halt }
elseif ($1- == ...) { halt }
var %pigword
var %place = 1
var %thisword
var %consonant
var %rest
var %endmark
var %letter?
goto pigword
}
:pigword
if (($mid($1-,%place,1) != a) && ($mid($1-,%place,1) != e) && ($mid($1-,%place,1) != i) && ($mid($1-,%place,1) != o) && ($mid($1-,%place,1) != u) && ($mid($1-,%place,1) != A) && ($mid($1-,%place,1) != E) && ($mid($1-,%place,1) != $chr(32)) && ($mid($1-,%place,1) != I) && ($mid($1-,%place,1) != O) && ($mid($1-,%place,1) != U)) {
goto consonant
}
else { goto rest )
}
if (%wcnt <= 0) /msg %chan %pigword
:rest
if (%wcnt > 0) {
if (($asc($mid($1-,%place,1)) isnum 97-122) || ($asc($mid($1-,%place,1)) isnum 65-90) || ($mid($1-,%place,1) == $chr(32))) {
if ($mid($1-,%place,1) != $chr(32)) {
set %word %word $+ $mid($1-,%place,1)
inc %place 1
dec %wcnt 1
if (%wcnt <= 0) {
goto 1word
}
elseif ($mid($1-,%place,1) != $chr(32)) { goto rest }
elseif ($mid($1-,%place,1) == $chr(32)) { goto next }
}
}
else {
inc %place 1
dec %wcnt 1
goto rest
}
}
else { goto 1word }
:next
set %consonant %consonant $+ ay
set %thisword %word $+ %consonant
unset %word
unset %consonant
goto space1
:1word
if ((%consonant != $null) || (%word != $null)) {
set %consonant %consonant $+ ay
set %pigword %word $+ %consonant
unset %word
unset %consonant
if (%endmark != $null) { set %pigword %pigword $+ %endmark }
/msg %chan %pigword
/halt
}
elseif ((%consonant == $null) && (%word == $null)) { halt }
:consonant
if (%wcnt > 0) {
if (($asc($mid($1-,%place,1)) isnum 97-122) || ($asc($mid($1-,%place,1)) isnum 65-90)) {
if ($mid($1-,%place,3) == the) {
inc %place 3
if ($mid($1-,%place,1) == $chr(32)) { goto the! }
else {
dec %place 3
set %consonant %consonant $+ $mid($1-,%place,1)
inc %place 1
dec %wcnt 1
goto pigword
}
}
else {
set %consonant %consonant $+ $mid($1-,%place,1)
inc %place 1
dec %wcnt 1
goto pigword
}
}
else {
inc %place 1
dec %wcnt 1
goto consonant
}
}
else { goto 1word }
:the!
dec %place 3
set %thisword the
unset %word
unset %consonant
goto space1
:space1
set %pigword %pigword $+ %thisword
unset %thisword
if ($mid($1-,%place,4) == the $+ $chr(32)) {
inc %place 4
dec %wcnt 4
}
else {
inc %place 1
dec %wcnt 1
}
goto spconsonant
:spconsonant
if (%wcnt > 0) {
if (($asc($mid($1-,%place,1)) isnum 97-122) || ($asc($mid($1-,%place,1)) isnum 65-90)) {
if (($mid($1-,%place,3) == the) && ($right($mid($1-,%place,4),1) !isalpha)) {
inc %place 3
set %thisword the
unset %word
unset %consonant
set %pigword %pigword $+ $chr(32) $+ %thisword
inc %place 4
dec %wcnt 4
if (%wcnt <= 0) { goto end }
else { goto spconsonant }
}
elseif (($mid($1-,%place,1) != a) && ($mid($1-,%place,1) != e) && ($mid($1-,%place,1) != i) && ($mid($1-,%place,1) != o) && ($mid($1-,%place,1) != u) && ($mid($1-,%place,1) != A) && ($mid($1-,%place,1) != E) && ($mid($1-,%place,1) != $chr(32)) && ($mid($1-,%place,1) != I) && ($mid($1-,%place,1) != O) && ($mid($1-,%place,1) != U) && ($mid($1-,%place,3) != the)) {
set %consonant %consonant $+ $mid($1-,%place,1)
inc %place 1
dec %wcnt 1
goto spconsonant
}
else { goto sprest }
}
else {
inc %place 1
dec %wcnt 1
goto spconsonant
}
}
else { goto sprest }
:end
if ((%consonant != $null) || (%word != $null)) {
/unset %word
/unset %consonant
unset %wcnt
unset %place
unset %thisword
/msg %chan %pigword
unset %pigword
/halt
}
else { halt }
:sprest
if (%wcnt > 0) {
if (($asc($mid($1-,%place,1)) isnum 97-122) || ($asc($mid($1-,%place,1)) isnum 65-90) || ($mid($1-,%place,1) == $chr(32))) {
if (($mid($1-,%place,1) != $chr(32)) && (%wcnt != 0)) {
set %word %word $+ $mid($1-,%place,1)
inc %place 1
dec %wcnt 1
goto sprest
}
else {
if ((%consonant != $null) || (%word != $null)) {
set %consonant %consonant $+ ay
set %thisword %word $+ %consonant
set %pigword %pigword $+ $chr(32) $+ %thisword
unset %thisword
inc %place 1
dec %wcnt 1
if (%wcnt <= 0) { goto end }
else {
unset %word
unset %consonant
goto spconsonant
}
}
elseif ((%consonant == $null) && (%word == $null)) { halt }
}
}
else {
inc %place 1
dec %wcnt 1
goto sprest
}
}
else {
if (%consonant != $null) { set %consonant %consonant $+ ay }
set %thisword %word $+ %consonant
set %pigword %pigword $+ $chr(32) $+ %thisword
goto end
}
}
else { /msg %chan $1- }
}
if (%mimic == off) { halt }
}
on *:ACTION:*:%chan: {
if (($me isin $1-) || (matt isin $1-) || (gay isin $1-)) { halt }
if (%mimic == on) {
if ($nick != $me) goto amimic
else { halt }
:amimic
if (%chan == #mugglenet) { halt }
if (%pmimic == on) {
if (%pmimic == on) {
var %wcnt = $len($1-)
if (%wcnt == 1) { halt }
elseif ($1- == ...) { halt }
var %pigword
var %place = 1
var %thisword
var %consonant
var %rest
var %endmark
goto pigword
}
:pigword
if (($mid($1-,%place,1) != a) && ($mid($1-,%place,1) != e) && ($mid($1-,%place,1) != i) && ($mid($1-,%place,1) != o) && ($mid($1-,%place,1) != u) && ($mid($1-,%place,1) != A) && ($mid($1-,%place,1) != E) && ($mid($1-,%place,1) != $chr(32)) && ($mid($1-,%place,1) != I) && ($mid($1-,%place,1) != O) && ($mid($1-,%place,1) != U)) {
goto consonant
}
else { goto rest )
}
if (%wcnt <= 0) /describe %chan %pigword
:rest
if (($mid($1-,%place,1) == $chr(33)) || ($mid($1-,%place,1) == $chr(46)) || ($mid($1-,%place,1) == $chr(63))) {
inc %place 1
dec %wcnt 1
goto rest
}
if ($mid($1-,%place,1) == ,) {
inc %place 1
dec %wcnt 1
goto rest
}
if ($mid($1-,%place,1) != $chr(32)) {
set %word %word $+ $mid($1-,%place,1)
inc %place 1
dec %wcnt 1
if (%wcnt <= 0) {
goto 1word
}
elseif ($mid($1-,%place,1) != $chr(32)) { goto rest }
elseif ($mid($1-,%place,1) == $chr(32)) { goto next }
}
:next
set %consonant %consonant $+ ay
set %thisword %word $+ %consonant
unset %word
unset %consonant
goto space1
:1word
set %consonant %consonant $+ ay
set %pigword %word $+ %consonant
unset %word
unset %consonant
if (%endmark != $null) { set %pigword %pigword $+ %endmark }
/describe %chan %pigword
/halt
:consonant
if (($mid($1-,%place,1) == $chr(33)) || ($mid($1-,%place,1) == $chr(46)) || ($mid($1-,%place,1) == $chr(63))) {
inc %place 1
dec %wcnt 1
goto consonant
}
if ($mid($1-,%place,1) == ,) {
inc %place 1
dec %wcnt 1
goto consonant
}
elseif ($mid($1-,%place,3) == the) {
inc %place 3
if ($mid($1-,%place,1) == $chr(32)) { goto the! }
else {
dec %place 3
set %consonant %consonant $+ $mid($1-,%place,1)
inc %place 1
dec %wcnt 1
goto pigword
}
}
else {
set %consonant %consonant $+ $mid($1-,%place,1)
inc %place 1
dec %wcnt 1
goto pigword
}
:the!
dec %place 3
set %thisword the
unset %word
unset %consonant
goto space1
:space1
set %pigword %pigword $+ %thisword
unset %thisword
if ($mid($1-,%place,4) == the $+ $chr(32)) {
inc %place 4
dec %wcnt 4
}
else {
inc %place 1
dec %wcnt 1
}
goto spconsonant
:spconsonant
if (($mid($1-,%place,1) == $chr(33)) || ($mid($1-,%place,1) == $chr(46)) || ($mid($1-,%place,1) == $chr(63))) {
inc %place 1
dec %wcnt 1
goto spconsonant
}
if ($mid($1-,%place,1) == ,) {
inc %place 1
dec %wcnt 1
goto spconsonant
}
if (($mid($1-,%place,1) != a) && ($mid($1-,%place,1) != e) && ($mid($1-,%place,1) != i) && ($mid($1-,%place,1) != o) && ($mid($1-,%place,1) != u) && ($mid($1-,%place,1) != A) && ($mid($1-,%place,1) != E) && ($mid($1-,%place,1) != $chr(32)) && ($mid($1-,%place,1) != I) && ($mid($1-,%place,1) != O) && ($mid($1-,%place,1) != U) && ($mid($1-,%place,3) != the)) {
set %consonant %consonant $+ $mid($1-,%place,1)
inc %place 1
dec %wcnt 1
goto spconsonant
}
elseif ($mid($1-,%place,4) == the $+ $chr(32)) {
set %thisword the
unset %word
unset %consonant
set %pigword %pigword $+ $chr(32) $+ %thisword
inc %place 4
dec %wcnt 4
if (%wcnt <= 0) { goto end }
else { goto spconsonant }
}
else {
goto sprest
}
:end
/unset %word
/unset %consonant
unset %wcnt
unset %place
unset %thisword
/describe %chan %pigword
unset %pigword
/halt
:sprest
if (($mid($1-,%place,1) == $chr(33)) || ($mid($1-,%place,1) == $chr(46)) || ($mid($1-,%place,1) == $chr(63))) {
inc %place 1
dec %wcnt 1
goto sprest
}
if ($mid($1-,%place,1) == ,) {
inc %place 1
dec %wcnt 1
goto sprest
}
if (($mid($1-,%place,1) != $chr(32)) && (%wcnt != 0)) {
set %word %word $+ $mid($1-,%place,1)
inc %place 1
dec %wcnt 1
goto sprest
}
else {
set %consonant %consonant $+ ay
set %thisword %word $+ %consonant
set %pigword %pigword $+ $chr(32) $+ %thisword
unset %thisword
unset %word
unset %consonant
inc %place 1
dec %wcnt 1
if (%wcnt <= 0) { goto end }
else { goto spconsonant }
}
}
else { /describe %chan $1- }
}
elseif (%mimic == off) { halt }
}
alias /mimchan {
if ($1 != off) { /set %chan $1 }
if ($1 == off) { /set %chan off }
}
alias /mimic {
if ($1 == on) { /set %mimic on }
if ($1 == off) { /set %mimic off }
}
alias /stop {
halt
}
menu channel {
Mimic
.Options:
.mimic
..$iif(%mimic == on,$style(1)) $+ On: /set %mimic on
..$iif(%mimic == off,$style(1)) $+ Off: /set %mimic off
.igpay atinlay
..$iif(%pmimic == on,$style(1)) $+ On: /set %pmimic on | /set %rmimic off
..$iif(%pmimic == off,$style(1)) $+ off: /set %pmimick off |
.Reverse
..$iif(%rmimic == on,$style(1)) $+ On: /set %rmimic on | /set %pmimic off
..$iif(%rmimic == off,$style(1)) $+ Off: /set %rmimic off
.Channel
..$iif(%chan == #ravenclaw,$style(1)) $+ #raven: /set %chan #ravenclaw
..$iif(%chan == #quidditchpitch,$style(1)) $+ #quidd: /set %chan #quidditchpitch
..$iif(%chan == #hawk_medicine,$style(1)) $+ #hawk: /set %chan #hawk_medicine
..$iif(%chan == #hop,$style(1)) $+ #hop: /set %chan #hop
..$iif(%chan == #hpp,$style(1)) $+ #hpp: /set %chan #hpp
..$iif(%chan == #nameless,$style(1)) $+ #name: /set %chan #nameless
..$iif(%chan == #tab_rehab,$style(1)) $+ #tab: /set %chan #tab_rehab
..$iif(%chan == #thereaperslayer,$style(1)) $+ #reapz: /set %chan #thereaperslayer
..$iif(%chan == #unnamed,$style(1)) $+ mine: /set %chan #unnamed
..$iif(%chan == #vitalchatroom,$style(1)) $+ #vtc: /set %chan #vitalchatroom
..$iif(%chan == #wids,$style(1)) $+ #wids: /set %chan #wids
;..$iif(%chan == #,$style(1)) $+ #: /set %chan #
..$iif(%chan == #kkpractice,$style(1)) $+ #kkpractice: /set %chan #kkpractice
..$iif(%chan == #house,$style(1)) $+ #house: /set %chan #house
..$iif(%chan == #mimick,$style(1)) $+ #mimick: /set %chan #mimick
..$iif(%chan == #rts,$style(1)) $+ #rts: /set %chan #rts
}