|
poon Beginner
Joined: 11 Oct 2001 Posts: 12 Location: USA
|
Posted: Sun Nov 04, 2001 7:06 pm
talking in character. |
What I would like to do is make it so that
when I use tells or says or shouts, they
look in character. For example, I play an
orc on my mud. I like to talk dumb.
Here is an example:
You tell Ugnuk: mez wuz tinking, wez shuld
find grunk and git himz to git us sum
muny.
Translation:
You tell Ugnuk: i was thinking, we should
find grunk and get him to get us some
money.
Any ideas on how to set up Zmud to do this
automatically for me, to where I would just
type in my tells/says/shouts normally and
Zmud would translate them?
I was thinking of using %replace, but I am
pretty much a novice at creating complex
triggers, aliases and the such.
I am using windows 95, and Zmud 6.16
If you have any other questions, post them
and I will happily respond.
Thanks in advance for any help.
Poon Urk'Krak |
|
|
|
Tarn GURU
Joined: 10 Oct 2000 Posts: 873 Location: USA
|
Posted: Mon Nov 05, 2001 5:42 am |
A good thread to look at:
http://www.zuggsoft.com/forum/topic.asp?TOPIC_ID=2998&FORUM_ID=7&CAT_ID=1&Topic_Title=Stuttering+Alias%2Ftrigger&Forum_Title=zMUD+General+Discussion
There are a few other posts if you use the Forum search, keyword 'stutter'.
It sounds like what you're asking for might be a little different, but I'm not sure.
Do you have a way you want to modify words, like the stuttering does, or a straight lookup table like:
I -> mez
was -> wuz
thinking -> tinking
money -> muny
And are you pretty effective about 'talking dumb' to begin with, so a few simple swaps are enough, or do we need to have some way of dumbing down words that are too long/ have too many syllables but aren't in the dictionary?
-Tarn |
|
|
|
Acaila Apprentice
Joined: 30 Aug 2001 Posts: 187 Location: Netherlands
|
Posted: Mon Nov 05, 2001 7:53 pm |
If you put all the words you want translated in a database variable, then all you have to do is loop through that variable, replacing every word in your text with the corresponding "dumb word".
#VARIABLE DumbWords {some=sum|him=himz|get=git|should=shuld|money=muny|me=mez|thinking=tinking}
#ALIAS say {
#VARIABLE Temp "%-1"
#LOOPDB {@DumbWords} {#VARIABLE Temp %replace( @Temp, %key, %val)}
~say @Temp
}
Just expand the DumbWords variable if you want more words translated.
Acaila |
|
|
|
poon Beginner
Joined: 11 Oct 2001 Posts: 12 Location: USA
|
Posted: Mon Nov 05, 2001 11:35 pm |
Well first off, thanks Tarn and Acaila.
I've seen the stutter setup before and I
actually thought of that as well, also
remember it being really complex. At least
it looked complex to me when I read it.
So I decided to try out Acaila's idea, since
it was fairly simple and looked like it
would do exactly what I was hoping for.
I put everything in just as you put it down
in your post, with the exception of changing
him=himz to he=himz and me=mez to i=mez, and
it did not work. Here is an example of what
I tried to say:
say hmm, lets see if he can get the money, or should i get the money. i'm thinking of it.
and it returned
"You say: hmm, lets see if he can get the money, or should i get the money. i'm thinking of it."
on the mud."
I'm sorry for being a pain, but any
suggestions?
Poon Urk'Krak |
|
|
|
poon Beginner
Joined: 11 Oct 2001 Posts: 12 Location: USA
|
Posted: Tue Nov 06, 2001 1:31 am |
Okay, figured out what the problem was.
Instead of entering in all the words via
#VARIABLE, I had to add them in seperately
via #ADDKEY.
example:
#ADDKEY DumbWords some sum
Okay, now it is actually converting the
words. However a new problem has popped up.
Here is the sentence I used:
hmm, lets see if he can get the money, or should i get the money. i'm thinking of it.
Here is what came out:
hmm, lets see mezf hmezmz can gmezt thmezmz muny, or shuld mez gmezt thmezmz muny. mez'm thmeznkmezng of mezt.
Look at "mezf" in the first line. It used to
be "if" it seems to be replacing the letter
"i" with "mez" whereever "i" pops up, so
if becomes mezf. Is there a way to make it
so that the word is only translated IF it
has no other characters beside it?
For example:
"if" would not be translated to "mezf"
but "i" would be translated to "mez"
I understand that this would mean it would
not be translated if it had punctuation by
it, like: Here is the money. "money" would
not be translated because it has a period
beside it. I would just have to move the
period one space away, so that "money" would
be translated to "muny"
Again, thanks in advance for any help.
Poon Urk'Krak |
|
|
|
Acaila Apprentice
Joined: 30 Aug 2001 Posts: 187 Location: Netherlands
|
Posted: Tue Nov 06, 2001 7:21 am |
Well, you could try putting spaces around each word and its dumb-version in the variable, but that would only correct a part of your problems. Let me think on it some more when I'm more awake :)
Acaila |
|
|
|
Acaila Apprentice
Joined: 30 Aug 2001 Posts: 187 Location: Netherlands
|
Posted: Tue Nov 06, 2001 5:25 pm |
Okay, let me start by saying that that piece of code gave me some serious headaches today...
BUT I've finally got it working (after trying a LOT of approaches and syntaxes).
Here it is:
#VAR DumbWords {some=sum|him=himz|get=git|should=shuld|money=muny|me=mez|thinking=tinking|i=mez|he=hez}
#ALIAS say {
#VARIABLE Temp "%-1"
#VARIABLE Temp %replace(%replace(%replace(%replace(@Temp," ","|"),",","|,|"),".","|.|"),"||","|")
#LOOPDB {@DumbWords} {#VARIABLE Temp %replace( @Temp,~|%key~|,~|%val~|)}
#VARIABLE Temp %replace(%replace(%replace(@Temp,"|"," ")," ,",",")," .",".")
~say @Temp}
I tested it with:
say hmm, let's see if he can give us some money, or i should get him some money.
And it returns:
say hmm, let's see if hez can give us sum muny, or mez shuld git himz sum muny.
*SWEAR WORD HERE*
I don't know what happened, but somehow between posting this it won't work anymore....
The error is somewhere in the #LOOPDB part, but I can't find it understand what happened. Maybe it still works for you?
Acaila |
|
|
|
Acaila Apprentice
Joined: 30 Aug 2001 Posts: 187 Location: Netherlands
|
Posted: Tue Nov 06, 2001 7:44 pm |
Hehe, I guess my own version got screwed somehow, but this one is still working :)
Acaila |
|
|
|
poon Beginner
Joined: 11 Oct 2001 Posts: 12 Location: USA
|
Posted: Fri Nov 09, 2001 1:14 am |
Thanks a ton, Acaila
That works great!
Poon Urk'Krak |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Thu Mar 07, 2002 8:16 pm |
Hey poon,
Is there a way you can post your script in the finished scripts area. I would be kind of neat to see the "In Character" stupid talk script
Darmir
"A gentle answer turns way wrath,
but a harsh word stirs up anger"
Proverbs 15:1 |
|
|
|
nutsnbolts Apprentice
Joined: 01 May 2002 Posts: 188 Location: USA
|
Posted: Sun Jun 30, 2002 5:59 pm |
Can someone post the finished script?
Thank you for everything, it's always appreciated. |
|
|
|
darmir Sorcerer
Joined: 10 Oct 2000 Posts: 706 Location: USA
|
Posted: Fri Jun 11, 2004 5:34 pm |
Is anyone using this script? I would like to see a finished copy of this. I am getting a many finished scripts together as I can to have a zscript website.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Fri Jun 11, 2004 7:03 pm |
Finished copy was posted by Acaila almost 3 years ago. The only change needed is to use #ADDKEY rather than #VARIABLE to create the record variable.
#ADDK DumbWords {some=sum|him=himz|get=git|should=shuld|money=muny|me=mez|thinking=tinking|i=mez|he=hez}
#ALIAS say {
#VARIABLE Temp "%-1"
#VARIABLE Temp %replace(%replace(%replace(%replace(@Temp," ","|"),",","|,|"),".","|.|"),"||","|")
#LOOPDB {@DumbWords} {#VARIABLE Temp %replace( @Temp,~|%key~|,~|%val~|)}
#VARIABLE Temp %replace(%replace(%replace(@Temp,"|"," ")," ,",",")," .",".")
~say @Temp} |
|
|
|
|
|
|
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
|
|