Proper Sentences

Started by najdorf, February 02, 2009, 12:04:46 AM

I want to write a script in my client that fixes every improper sentence?

1. Check the sentence's last char.
2. If not . o , or ? or !  -----> Add . to the end.
3. Check if 1st character is Capital or not.
4. If not, capitalize it.
5. paste the sentence again.

Do you know a function that can detect capital character? If so, in which client (because i couldnt find it in the clients i use)?

Also, if we can have this in game also, wouldn't it be great?

First thing you'd want to do is make sure this sort of thing only worked when you were talking/shouting/saying/telling/emoting so that commands don't get fouled up by it.
Quote from: WarriorPoet
I play this game to pretend to chop muthafuckaz up with bone swords.
Quote from: SmuzI come to the GDB to roleplay being deep and wise.
Quote from: VanthSynthesis, you scare me a little bit.

I'd like this to be hardcoded. Always felt it should be.

Another way to do it is to learn to do it manually. As in ... type properly :). Sorry a non constructive post, but. ... couldnt help it.

I typo worse than Ghost types, so that's out of the question.

I always fear that everyone know who I play because of my dyslexic typing tendency of making me switch letters around.
Quote from: Twilight on January 22, 2013, 08:17:47 PMGreb - To scavenge, forage, and if Whira is with you, loot the dead.
Grebber - One who grebs.

Quote from: Synthesis on February 02, 2009, 12:10:08 AM
First thing you'd want to do is make sure this sort of thing only worked when you were talking/shouting/saying/telling/emoting so that commands don't get fouled up by it.

All is ready but the problem of detecting a capital letter.

What client(s) do you use? 

Try looking for the arguments "match case" or "same case".  I have no idea how the script would work but if you did something like have it run a find on all say/tell/shout/ask commands in the manner of "say a"  "say b"  "say c" ...all the way to Z...with matching of cases for lowercase only then you could possibly have it search for all possible verbal commands that begin with lowercase letters (all 26 of them).  Then you could have the script change the first character to a capital.  Do you understand what I'm saying?  Also, then you run into the problems if you use the world "say" in a sentence because then the script might confuse the next word with the beginning of a sentence.

I don't know shit about scripting, but that is the only idea I could think of.  It probably isn't much help, but hopefully this sparks some ideas or guides you in the right direction.

I can probably do something in zMUD for you, in Perl. Because it would be Perl, it would also be regular expressions, which can then be used in most MUD clients.

But it's heatwave central in Australia and I'm usually too grouchy to do my OWN work, let alone others, so don't consider me beholden to it.
Quote from: Agameth
Goat porn is not prohibited in the Highlord's city.

i did it also. actually, most of the clients client can do it. there is a string function "toupper". I just get the first word, and it's first letter as an input to the function.

thanks