ID:271413
 
Okay you ahve your simple say code right?
mob/verb/Say(txt as text)
usr << "You say, '[txt]'
oview <<" [usr] says, '[txt]'"

right?
well people could just hold dow enter and it spams everyone so presumming you put your verb name as Say(txt as text you would change it into this.
mob/verb/say(txt as text)
if(txt)
if(length(txt)<200)
set category = "Soical" //What category it is in.
usr << "You say, '[txt]'" //what you see
oview() << "[usr] says, [txt]" //What everyone else sees

if(txt) check if there is a message there
if(length(txt)<200) checks if theres a message and if there is limits it to 200 character(letter number ect)
This would go, if anywhere, in Creations. However, I don't see much value in this thread at all.
In response to Garthor
well for one. it reduces spam on peoples servers by limiting the cahracters allowed in a message

two. it it reduces more spam by stopping people fromholding down enter
You should put in checks like this for practically everything you do. It isn't any big secret. Although I don't think things like how to produce safe and secure code are not pushed enough.

I believe there is article about this somewhere. There is also an article about how to stop spam. Both of them are in the depths of BYONDscape.com.

And by the way, you shouldn't/(can't?) put the:
set category = "Social"
there. It should be right after the declaration of the verb.

And if you want to be picky, since it is a "vocal" verb. ohearers() would be more appropriate than oview(). Then again they are usually the same.
In response to Drumersl
sorry i had copied that from my code, and it works great. besdie my problem with moving because of something messed up with the movement, from my staff code
In response to Black Wolf Production
Yes yes, all well and good, but there's no compelling reason as to why this thread needed to be posted.

It's not some startling revelation.
In response to Garthor
Some people figure out something simple yet neat, and feel it is absolutely necessary to share it with the world. I'm almost certain that this forum was for people to ask how to do stuff, and to have people reply with the answers, not for people to make random posts about how to do stuff. I guess they fooled me.
In response to Mikau
Nice to see you're proud of yourself, really. Don't let the other people get to you, they've grown bitter. ;)

I'd just add a html_encode() there. Look it up.
Also, instead of [usr], pick [usr.name]. When a player doesn't have a capital as first letter, [usr] would output; "the blabla". [usr.name] prevents this.