ID:263970
 
Code:
Chat code
mob/verb
View_Chat(msg as text)
set category = "Chat"
if(usr.muted == 1)
return
if(usr.online == 0)
return
if(usr.talking == 1)
usr << "<font size=1>You must wait until you can talk again."
spam += 1
usr.Auto_Mute()
return
else
usr.talking = 1
view(usr) << output("<font size=1><b><font color=#6699CC>[usr]: <font color=white>[msg]","Social")
sleep(20)
usr.talking = 0


Auto-Mute Code
mob/proc
Auto_Mute()
if(src.spam > 2)
world << "<b><font size=1><font color=aqua>Spam Information: [src] has been muted due to spam."
src.muted = 1
sleep(300)
src.muted = 0
world << "<b><font size=1><font color=aqua>Spam Information: [src] has been unmuted."


Problem description:
It wont mute them, or even say they are muted. Actualy, the full proc wont work.
Akito Bakasui wrote:
Code:
Chat code
> mob/verb
> View_Chat(msg as text)
> set category = "Chat"
> if(usr.muted)
> return
> if(!usr.online)
> return
> if(usr.talking)
> usr << "<font size=1>You must wait until you can talk again."
> spam += 1
> usr.Auto_Mute()
> return
> else
> usr.talking = 1
> view(usr) << output("<font size=1><b><font color=#6699CC>[usr]: <font color=white>[msg]","Social")
> sleep(20)
> usr.talking = 0
>

Auto-Mute Code
> mob/proc
> Auto_Mute()
> if(src.spam >= 2)
> world << "<b><font size=1><font color=aqua>Spam Information: [src] has been muted due to spam."
> src.muted = 1
> sleep(300)
> src.muted = 0
> world << "<b><font size=1><font color=aqua>Spam Information: [src] has been unmuted."
>


Read the code above i edited it.(i m in a hurry i have to leave)
In response to Hardik
Thanks, it's working now. But I think that it's too simple. I want to make a spam protector so you can't use certain words, html tags wont work, and if you say the same thing more than twice, you will be auto muted. Could someone tell me how I can do that? But not write one out, I wont learn anything then...
In response to Akito Bakasui
Things to read:
Lists (DM Reference)
Lists (DM Guide)
html_encode (DM Reference)
In response to Akito Bakasui
There are tutorials on these kinds of common things, too. Search. Try the Dream Makers guild. http://www.byond.com/developer/

And I just have to say,

not write one out, I wont learn anything then...

That's just the right attitude. Keep it up! Not to say code examples can't help learning, but mostly not alone, and certainly not if the guy just copipastes (TM) them.