This is probably the best code snippet submitted to Hawkee.com for 2 reasons. You can set it to automatically encode everything you type in like normal text, making it much easier to type full paragraphs in code. The second reason is that it automatically decodes all code sent by someone with this same code! In the next version, I plan on making it so that you can have an @ window with encodings and decodings, and possibly double encode the text.
Note: This document is COMMENTED by me to help you understand what does what. Hopefully Code Master helps with your text coding. Also look for special codes in the future, with a way to make it better for simple person to person codes.
Special thanks to xDaeMoN, for helping clean-up and bug-check my code!
;Code Master Version 1.0
;Scripted by supergeo
;Revised by xDaeMoN
;Special thanks to xDaeMoN for his help in fixing & cleaning up
;This script!
;Type /encode to encode text. You don't have to use this if you turned on automatic encoding by using /eall.
alias encode {
/* Messages the active window with a code and the encoded text.
The code is sent so that other users using this code will automatically decode the text.
Note: Anything witj 7eK8 in front of it will be decoded.
So this could lead to some accidental decoding.
This should never happen, but you never know.
But don't worry, you will still see the correct version
in this situation.
*/
msg $active 7eK8 $+ $encode($$?="Text to encode:",m)
echo -a Translation: $!
}
/* I've added this alias for if you want to decode some text. Your friend doesn't use this snippet? No problem. You can manually decode all text. Simply copy the text to decode, and type /decode. Then, paste the text into the popup box.
Note: It decodes using mime. */
alias decode { echo -a $decode($$?="Text to decode:",m) }
;Decoding trigger.
on *:Text:*:#: {
;Checks to see if code is in front
;Note: It will only automatically decode if the person that encoded the text sent this to you using this snippet. So have your friends use it too!
if ($left($1,4) = 7eK8) {
echo # Translation: $decode($right($1,-4),m)
}
}
;Use this to set it to automatically encode all of the text you send
;If you want to disable it's use, just use the command again.
alias eall {
if (%eall == on) unset %eall
else set %eall on
}
;This part of the script is for the auto-coding.
;If you have the option set for it, you can just type text and it will be encoded.
on *:Input:*: {
;Checks to see if you have auto-encode set to on
;Makes sure it isn't a command.
if (%eall == on) && ( /* !iswm $1 ) {
;Encodes and messages the text.
msg $active 7eK8 $+ $encode($1-,m)
;Gives the translation of it also.
echo -a Translation: $1-
halt
}
}
menu * {
Code Master
.Encode text: encode
.Decode text: decode
.Auto-Encode $iif(%eall == on, -Enabled-,-Disabled-): eall
.Credits: echo -a Made by supergeo. Thanks to xDaeMoN
}