|
NiteTrip Novice
Joined: 21 May 2002 Posts: 40 Location: Canada
|
Posted: Sun May 26, 2002 6:49 am
Encryption Script Version 1.0 |
Ok, someone wanted an encryption script and I thought it was a great idea, so i wrote one. I have more in store for this script, lots more but here is version 1, look for more versions to come. ( I don't know how this cut and paste will turn out, hopefully good), also you will have to edit the triggers at the end to suit your mud.
#alias encrypt {#var encrypted " ";#var alphabet "1234567890 '?qwertyuiopasdfghjklzxcvbnm,.!@#%^&*()";#var enkey ")(*&^%#@!.mnbvcxzlkjh,gfdsapoiuytrewq'? 0987654321";#var final " ";#var phrase {%lower( @phrase)};#var plen {%len( @phrase)};#var enlen @plen;#var words %numwords( @phrase);#while ( @words > 0) {#var backwards {%word( @phrase, @words)};#var final {@final @backwards};#add words -1};#var final {%trimleft( @final)};#while (@enlen > 0) {#var findit {%copy( @final, (@plen -(@enlen-1)), 1)};#var enpos {%pos( @findit, @alphabet)};#var encrypted {@encrypted%copy( @enkey, @enpos, 1)};#add enlen -1};#var phrase @encrypted} encryption
#alias say {#var phrase {%0};encrypt;~say @phrase} Encryption
#alias decrypt {#var decrypted " ";#var alphabet "1234567890 '?qwertyuiopasdfghjklzxcvbnm,.!@#%^&*()";#var enkey ")(*&^%#@!.mnbvcxzlkjh,gfdsapoiuytrewq'? 0987654321";#var final " ";#var phrase {%lower( @phrase)};#var plen {%len( @phrase)};#var enlen @plen;#while (@enlen > 0) {#var findit {%copy( @phrase, (@plen -(@enlen-1)), 1)};#var enpos {%pos( @findit, @enkey)};#var decrypted {@decrypted%copy( @alphabet, @enpos, 1)};#add enlen -1};#var words %numwords( @decrypted);#while ( @words > 0) {#var forward {%word( @decrypted, @words)};#var final {@final @forward};#add words -1};#var temp {%trimleft( @final)};} Encryption
#alias tell {#var phrase {%-2};encrypt;~tell %1 @phrase} Encryption
#alias t {#var phrase {%-2};encrypt;~tell %1 @phrase} Encryption
#alias {code} {#CLA encryption 1}
#alias {codeoff} {#CLA encryption 0}
#trigger {You tell %w '(*)'} {#var phrase {%1};decrypt;#sa decrypted- @decrypted } encryption
#trigger {You say, '(*)'} {#var phrase {%1};decrypt;#sa decrypted- @decrypted} encryption
#trigger {%w tells you '(*)'} {#var phrase {%1};decrypt;#sa decrypted- @decrypted} encryption
#trigger {%w says, '(*)'} {#var phrase {%1};decrypt;#sa decrypted- @decrypted} encryption |
|
|
|
NiteTrip Novice
Joined: 21 May 2002 Posts: 40 Location: Canada
|
Posted: Sun May 26, 2002 6:51 am |
oh yeah, i forgot, to turn it on type code, to turn it off type codeoff
:) |
|
|
|
NiteTrip Novice
Joined: 21 May 2002 Posts: 40 Location: Canada
|
Posted: Sun May 26, 2002 7:08 am |
Crap, I posted an old alias in there by accident. After you cut and paste all that, cut and paste this new decrypt alias:
#alias decrypt {#var decrypted " ";#var alphabet "1234567890 '?qwertyuiopasdfghjklzxcvbnm,.!@#%^&*()";#var enkey ")(*&^%#@!.mnbvcxzlkjh,gfdsapoiuytrewq'? 0987654321";#var final " ";#var phrase {%lower( @phrase)};#var plen {%len( @phrase)};#var enlen @plen;#while (@enlen > 0) {#var findit {%copy( @phrase, (@plen -(@enlen-1)), 1)};#var enpos {%pos( @findit, @enkey)};#var decrypted {@decrypted%copy( @alphabet, @enpos, 1)};#add enlen -1};#var words %numwords( @decrypted);#while ( @words > 0) {#var forward {%word( @decrypted, @words)};#var final {@final @forward};#add words -1};#var decrypted {%trimleft( @final)};} Encryption
i forgot to change the car name :)
sorry for the confusion and have fun! |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|