Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
akkappap
Newbie


Joined: 04 Feb 2006
Posts: 5

PostPosted: Thu Apr 03, 2008 4:52 pm   

Language script (DWARF)
 
I'm looking for a script I had a long time ago, which would automaticly change what you write into a dwarfish language.
I can't remember where I found it, and I remember it was just awesome! Would really like to find it again.
It did something like this;

say Hey you bastard! Leave that alone or i'll kick your ass!
- > would automaticly change that into:
say 'ey yo cheeky fooker! Lea' tha alon or Ah' kik yer arse!

Any of the brilliant minds here know where to find this awesome script?
Or possible make one? (sounds like a rough one to make)

Akky Very Happy
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Apr 03, 2008 5:06 pm   
 
The way you create these scripts is by running the %replace function on the parameter over and over until you get the string you want. Like:

#alias say {~say %replace(%replace(%-1,"hello","hi"),"Fang","Xianfu")}

say Hello Fang!
then results in:
say Hi Xianfu!

However (and it's a big however), anyone I catch using one of these scripts is getting a slap. They're so annoying :(
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
akkappap
Newbie


Joined: 04 Feb 2006
Posts: 5

PostPosted: Thu Apr 03, 2008 5:15 pm   
 
Ah that was the command I was looking for, couldn't figure it out :)
How can one make that work with a word list? (I could make a really huuuge alias I guess, but it seems a lot smoother to have it crosscheck with a list)
Thats how the old script I found worked, It came with a list in this fashion

About Aboot
After Efter
Around Roon'

And so on and so forth.. I've found a list of good dwarf words but no idea how to get it to work :)

I'm playing a MUD where I'm a dwarf character and supposed to talk like this.. so a script like this would be a lifesaver for those early hungover saturday mornings.. not annoying :)

Thanks for your quick response by the way!
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Thu Apr 03, 2008 6:09 pm   
 
Hmm... probably the easiest way would be like this:

tempString=%-1
#loopdb @CrappyAccentWordList {tempString=%replace(@tempString,%key,%val)}
say @tempString

Where @CrappyAccentWordList is a data record variable whose keys are the original words and whose values are what you want them to end up as. To add items to the list, do:

#addkey CrappyAccentWordList About Aboot

and so on. If you use phrases, do

#addkey CrappyAccentWordList {I'm a little teapot} {short and stout}

The one thing you need to be careful about is that none of the words replace something which might be replaced by one of the other items. For example:

#addkey CrappyAccentWordList {Hello} {Halloo}
#addkey CrappyaccentWordList {Hall} {hal'}

might result in you saying "hal'oo" sometimes.

Sounds like your whole MUD needs a slap if people actually expect that sort of thing ;P
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
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

© 2009 Zugg Software. Hosted by Wolfpaw.net