Now, I know a fair number of people are going to hate me for all the scottish dwarves that will suddenly appear (I used it to give one my characters an accent), but I have created a script that will allow the replacement of words.
From a textfile called wordchange.txt in your Zmud root directory with the format:
Code:
oldword1,newword1
oldword2,newword2
oldword3,newword3
oldwordn,newwordn
And the script:
Code:
#ALIAS sa {#file 1 wordchange.txt;message="";#LOOP 1,%numwords( "%-1") {word=%word( "%-1", %i);#IF (%pos( %rightback( @word, 1), ",.;:!?")) {punct=%rightback( @word, 1);word=%leftback( @word, 1)} {punct=""};oword=%grep( 1, %concat( "^", @word, ","));#IF (@oword) { #IF (%numitems( @oword)>1) {oword=@word} {oword=%word( @oword, 2, ",");#IF (%pos( " (or) ", @oword)) {oword=%word( @oword, %random( 1, %numwords( @oword, " (or) ")), " (or) ")}}} {oword=@word};message=%concat( @message, @oword, @punct, " ")};message=%leftback( @message, 1);say @message;#close 1}
#ALIAS sayt {#file 1 wordchange.txt;message="";#LOOP 1,%numwords( "%-2") {word=%word( "%-2", %i);#IF (%pos( %rightback( @word, 1), ",.;:!?")) {punct=%rightback( @word, 1);word=%leftback( @word, 1)} {punct=""};oword=%grep( 1, %concat( "^", @word, ","));#IF (@oword) { #IF (%numitems( @oword)>1) {oword=@word} {oword=%word( @oword, 2, ",");#IF (%pos( " (or) ", @oword)) {oword=%word( @oword, %random( 1, %numwords( @oword, " (or) ")), " (or) ")}}} {oword=@word};message=%concat( @message, @oword, @punct, " ")};message=%leftback( @message, 1);sayto %1 @message;#close 1}
#ALIAS yel {#file 1 wordchange.txt;message="";#LOOP 1,%numwords( "%-1") {word=%word( "%-1", %i);#IF (%pos( %rightback( @word, 1), ",.;:!?")) {punct=%rightback( @word, 1);word=%leftback( @word, 1)} {punct=""};oword=%grep( 1, %concat( "^", @word, ","));#IF (@oword) { #IF (%numitems( @oword)>1) {oword=@word} {oword=%word( @oword, 2, ",");#IF (%pos( " (or) ", @oword)) {oword=%word( @oword, %random( 1, %numwords( @oword, " (or) ")), " (or) ")}}} {oword=@word};message=%concat( @message, @oword, @punct, " ")};message=%leftback( @message, 1);yell @message;#close 1}
#ALIAS tel {#file 1 wordchange.txt;message="";#LOOP 1,%numwords( "%-2") {word=%word( "%-2", %i);#IF (%pos( %rightback( @word, 1), ",.;:!?")) {punct=%rightback( @word, 1);word=%leftback( @word, 1)} {punct=""};oword=%grep( 1, %concat( "^", @word, ","));#IF (@oword) { #IF (%numitems( @oword)>1) {oword=@word} {oword=%word( @oword, 2, ",");#IF (%pos( " (or) ", @oword)) {oword=%word( @oword, %random( 1, %numwords( @oword, " (or) ")), " (or) ")}}} {oword=@word};message=%concat( @message, @oword, @punct, " ")};message=%leftback( @message, 1);tell %1 @message;#close 1}
#ALIAS rep {#file 1 wordchange.txt;message="";#LOOP 1,%numwords( "%-1") {word=%word( "%-1", %i);#IF (%pos( %rightback( @word, 1), ",.;:!?")) {punct=%rightback( @word, 1);word=%leftback( @word, 1)} {punct=""};oword=%grep( 1, %concat( "^", @word, ","));#IF (@oword) { #IF (%numitems( @oword)>1) {oword=@word} {oword=%word( @oword, 2, ",");#IF (%pos( " (or) ", @oword)) {oword=%word( @oword, %random( 1, %numwords( @oword, " (or) ")), " (or) ")}}} {oword=@word};message=%concat( @message, @oword, @punct, " ")};message=%leftback( @message, 1);reply @message;#close 1}
#ALIAS gt {#file 1 wordchange.txt;message="";#LOOP 1,%numwords( "%-1") {word=%word( "%-1", %i);#IF (%pos( %rightback( @word, 1), ",.;:!?")) {punct=%rightback( @word, 1);word=%leftback( @word, 1)} {punct=""};oword=%grep( 1, %concat( "^", @word, ","));#IF (@oword) { #IF (%numitems( @oword)>1) {oword=@word} {oword=%word( @oword, 2, ",");#IF (%pos( " (or) ", @oword)) {oword=%word( @oword, %random( 1, %numwords( @oword, " (or) ")), " (or) ")}}} {oword=@word};message=%concat( @message, @oword, @punct, " ")};message=%leftback( @message, 1);gtell @message;#close 1}
#TRIGGER {Opened wordchange.txt as file 1} {#gag (1)}
#TRIGGER {Closed wordchange.txt on file 1} {#gag (1)}
Sorry its not neater, but this is how Zmud exports code. Once you enter it into Zmud it should become more understandable.