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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » Finished MUD Scripts
FiendishX
Wanderer


Joined: 19 Nov 2005
Posts: 53

PostPosted: Tue Jul 15, 2008 5:31 am   

zmud drunk typing
 
I was bored last night and made a script that lets you pretend to be drunk just like everyone else. Only now you can do it without effort. It's simple, yet effective.
You can't paste data records into the command line, so this needs to be put into a text file and then imported.
Code:
#CLASS {DrunkTyping} {setdef}
#ALIAS drunk {#VARIABLE drunkstring {%lower( " %-2")};#LOOP %len( @drunkstring) {#VARIABLE drunkstring %insert( "|", @drunkstring, %eval( %i*2))};#VARIABLE drunkstring %delnitem( @drunkstring, %numitems( @drunkstring));#LOOP %numitems( @drunkstring) {#IF (%random( 1000)>900) {#VARIABLE drunkreplacement %db( @drunkkeymap, %item( @drunkstring, %i));#VARIABLE drunkstring %replaceitem( %item( @drunkreplacement, %random( 1, %numitems( @drunkreplacement))), %i, @drunkstring)}};#LOOP 1,%eval( %numitems( @drunkstring)-1) {#IF (%random( 1000)<50) {#VARIABLE drunkreplacement %item( @drunkstring, %i);#VARIABLE drunkstring %replaceitem( %item( @drunkstring, %eval( %i+1)), %i, @drunkstring);#VARIABLE drunkstring %replaceitem( @drunkreplacement, %eval( %i+1), @drunkstring)}};#SEND {%1 %replace( @drunkstring, "|", "")}}
#VAR drunkstring {}
#VAR drunkkeymap {qa|w|s|qwq|w|e|a|s|dew|e|r|s|d|fre|r|t|d|f|gtr|t|y|f|g|hyt|y|u|g|h|juy|u|i|h|j|kiu|i|o|j|k|loi|o|p|k|lpo|p|laq|w|a|s|zsa|w|e|s|d|z|xds|e|d|f|x|cfd|r|f|t|g|c|vgf|v|g|b|h|y|thg|b|h|y|u|j|njh|u|j|i|n|m|kkj|i|k|m|l|o|,lk|o|l|,|pza|z|s|xxz|s|x|d|ccx|d|c|f|vvc|f|v|g|bbv|g|h|b|nnb|h|n|j|mmn|j|m|k|,,,|.|m|l.,|.|/|l }
#VAR drunkreplacement {}
#CLASS 0

Usage:
drunk <channel> <message>
or
drunk {<tell/page/etc> <player>} <message>
Reply with quote
Qaiia
Wanderer


Joined: 06 Apr 2007
Posts: 59

PostPosted: Tue Jul 15, 2008 12:35 pm   
 
Would you mind posting a small example of the output, please? :)
_________________
Citrus: The Juicy Alternative
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Tue Jul 15, 2008 12:59 pm   
 
To avoid the quite naff drunk {tell mike} blah syntax, you could just have it always display the first two words verbatim. It won't make much difference to most text.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
FiendishX
Wanderer


Joined: 19 Nov 2005
Posts: 53

PostPosted: Tue Jul 15, 2008 9:40 pm   
 
Qaiia wrote:
Would you mind posting a small example of the output, please? :)

Heh, sure.

Eight test outputs just using the default values:
(Group) Fiendish: 'this isw teet for qiiaa or hbe drun ktyping scrlpt's ojtpu.t what do hou htink,w aiia?'
(Group) Fiendish: 't his is atest for qaiia of hre drunk tyipngs cdipg's uotput. what doyou thinj, qaiai?'
(Group) Fiendish: 'this is a tezt tro qalia kfthe druni typing script'soutptu. wyat eo you think, qakia?'
(Group) Fiendish: 'this is stest for qaiia ofreg drnuk typing script's outupt. wjat do you think,qaiia?'
(Group) Fiendish: 'tyis is a test vor qaiai of the dunrk typlng csript'soutpky. wja tdo toj think, qaiiw?'
(Group) Fiendish: 'this is a testforsaii aof tbe dryn, typings drkpts output. hwat od oyu think, qzlia?'
(Group) Fiendish: 'this isa test tof qaiia of the deunk typijg srcipt's ouprut. what dl you think, qaiia?'
(Group) Fiendish: 'thsi os a testfor qaiia lc teh rdunktyping scrpi'tso utputl shat eo hou think, qaiis?'


Two numbers can be changed in the script to alter how messed up it gets.

Quote:
To avoid the quite naff drunk {tell mike} blah syntax, you could just have it always display the first two words verbatim. It won't make much difference to most text.

Yeah, I considered that. But I didn't want short messages to always be correct.
Reply with quote
Qaiia
Wanderer


Joined: 06 Apr 2007
Posts: 59

PostPosted: Wed Jul 16, 2008 5:51 pm   
 
What's sad is that I see people typing like that naturally in-game. I like the first one about "teet". Good times.

Pretty good, though I would suggest swapping 's' for 'sh' more often.
_________________
Citrus: The Juicy Alternative
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Thu Aug 07, 2008 12:11 am   
 
Fang Xianfu wrote:
To avoid the quite naff drunk {tell mike} blah syntax, you could just have it always display the first two words verbatim. It won't make much difference to most text.

Wouldn't an #if take care of that?
like
#IF (%ismember( %-1, @drunk_chat_extras))
#var drunk_chat_extras {page|whisper|tell}

something like that in there....would allow for separation between channels and tells/whispers/pages
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Fri Aug 15, 2008 12:14 am   
 
Yes Vitae, it would... If anyone takes a look at the stuff I was involved with doing the speech impediments (stutter I think is the only one here, though lisp may be as well) you'll see we handled it that way. Sorta. :D
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
FiendishX
Wanderer


Joined: 19 Nov 2005
Posts: 53

PostPosted: Fri Aug 29, 2008 8:00 pm   
 
Vitae wrote:
Wouldn't an #if take care of that?
like
#IF (%ismember( %-1, @drunk_chat_extras))
#var drunk_chat_extras {page|whisper|tell}

something like that in there....would allow for separation between channels and tells/whispers/pages
Sure, but then it wouldn't be portable. My way doesn't care what MUD you're on.
Reply with quote
Vitae
Enchanter


Joined: 17 Jun 2005
Posts: 673
Location: New York

PostPosted: Fri Aug 29, 2008 9:57 pm   
 
There IS no other MUD! ;-)
_________________
http://www.Aardwolf.com
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Mon Sep 15, 2008 5:31 pm   
 
The #IF Also wouldn't care what MUD you were on.... It just wouldn't ever "drunkify" those words.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » Finished MUD Scripts 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