ID:294042
 
hey guys im haveing trouble knowing how to add the spam scrip into my ooc my ooc scrip is this
mob/var/say_delay = 0
mob/var/muted = 0
mob/var/mute_time = 0
mob/var/spammed = 0
var/World_Mute=0
var/Channel_Mute = 0



mob/verb/OOC(T as text)
set category = "Channels"

if(src.muted)
src << "You have been muted!"
return

if(World_Mute && !src.GMLevel)
src << "The world is Muted!"
return



if(!T)
spawn() alert("Your message may not be blank.")
return


if(lentext(T) > 150)
spawn() alert("Your message can not exceed 100 characters.")
T = copytext(T,1,150)

else
ChatLog(src,"OOC: [T]")
for(var/client/C)
if(!C)continue
if(!C.mob) continue
if(C.mob.Ignored.Find(usr)) continue
if(!src.in_guild)
if(C.mob.ooc_on)
C << {"<font color="#000066">{<font color="#FFFFFF">[src.title]<font color="#000066">}</font></font><font color=#999999>{[src.rank]} [src.name] OOC:<font color = [textcolor]> [s_smileys(T)]"}//[s_smileys(T)]
src.afk_time = 0
else
if(C.mob.ooc_on)
C << {"<font color="#000066">{<font color="#FFFFFF">[src.guild_name_html]<font color="#000066">}</font><font color="#000066">{<font color="#FFFFFF">[src.title]<font color="#000066">}</font></font><font color=#999999>{[src.rank]} [src.name] OOC:<font color = [textcolor]> [s_smileys(T)]"}
src.afk_time = 0

src.say_delay ++
src.afk_time = 0
spawn(100) src.say_delay = 0
spawn(100) src.muted = 0




mob/PC/verb/Emote(T as text)
set category = "Channels"
var/list/L
L = list("font size")

if(!src.GMLevel)
if(World_Mute == 1)
src << "The world is muted!"
return


if(Channel_Mute && !src.GMLevel)
src << "All Chat Channels are Muted!"
return

if(src.muted)
src << "You have been muted!"
return

if(src.say_delay >= 3)
alert("Flood Supression: You must wait 8 seconds before using Emote again.")
src.spammed ++
src.AUTO_BAN()
src.muted = 1
sleep(300)
src.muted = 0
sleep(1200)
src.spammed = 0
return

for(var/X in L)
if(findtext(T,X))
alert("You may not change your font size.")
return

if(isnull(T) | T == "" | !T)
alert("Your message may not be blank.")
return

if(lentext(T) > 50)
alert("Your message can not exceed 50 characters.")
return

T = html_encode(T)

ChatLog(src,"Emote: [T]")
for(var/client/C)
if(C.mob.ooc_on)
C << {"<font color="#0099CC">[src.name] [T]"}
src.say_delay += 1
sleep(80)
src.say_delay = 0
src.muted = 0

-----------------------------------------------------------

sorry about that

and heres the spam scrip how would i add it into that to make it work

proc/SGS_Filter_txt(txt)
var/stars
var/s_amount
var/mem
var/find_t
var/txtLen
var/Words[]
Words = new /list/
Words = list(...)//Add more if you want i left soem extra spaces and u can add your own
if(Words.len)
memo:
for(mem = 1,mem < Words.len + 1,mem++)
find_t = findtext(txt,Words[mem])
if(find_t)
txtLen = length(Words[mem])
stars = null
s_amount = null
for(s_amount = 0,s_amount < txtLen,s_amount++)
stars += "+"
txt = copytext(txt,1,find_t) + stars + copytext(txt,find_t+txtLen,0)
if(findtext(txt,Words[mem])) goto memo
return txt
mob/var/tmp/SGS_kick_for_repeat
mob/var/tmp/SGS_remember_txt
mob/var/tmp/SGS_locked = 0
var/list/SGS_Spam_log_file
proc/SGS_AntiSpam(txt)
var/spam = list("<beep>")
for(var/m in spam)
if(SGS_allow_beep == 0)
if(findtext(txt,m))
return ""
else if(SGS_allowhtml == 0) return SGS_AntiSpam2(copytext(html_encode(txt),1,SGS_Brake_txt))
else if(SGS_allowhtml == 1) return SGS_AntiSpam2(copytext(html_encode(txt),1,SGS_Brake_txt))
proc/SGS_AntiSpam2(txt)
if(usr.SGS_locked == 0)
if(usr.SGS_remember_txt == txt)
usr.SGS_kick_for_repeat ++
else
usr.SGS_remember_txt = txt
usr.SGS_kick_for_repeat = null
usr.SGS_kick_for_repeat ++
if(usr.SGS_kick_for_repeat == SGS_spam_num)
usr.SGS_locked = 1
usr.SGS_kick_for_repeat = null
usr.SGS_remember_txt = null
spawn(SGS_Bantime) usr.SGS_locked = 0
return txt
SGS_reset()
proc/SGS_reset()
spawn(SGS_Waittime) usr.SGS_kick_for_repeat = null
proc/Safe_Guard(txt)
return SGS_Filter_txt(SGS_AntiSpam(txt))
var/SGS_Brake_txt = 200
var/SGS_spam_num = 0
var/SGS_allow_beep = 0
var/SGS_Safe_Log_txt = 0
var/SGS_allowhtml = 0
var/SGS_CrashGuard = 0
var/SGS_Waittime = 0
var/SGS_Bantime = 0
mob/var/SGS_Stop_all_txt = 0
var/tmp/def = 30
var/tmp/lagset = 0
var/tmp/clag = 0
var/tmp/tick_mem = world.tick_lag
world
proc
Lag_Guard()
set background = 1
spawn while(1)
if(lagset == 0)
if(world.cpu >= def)
world.tick_lag++
world.tick_lag = round(world.tick_lag)
if(world.cpu < def)
if(world.tick_lag == tick_mem)
..()
else
world.tick_lag--
world.tick_lag = round(world.tick_lag)
else
if(world.cpu >= clag)
world.tick_lag++
world.tick_lag = round(world.tick_lag)
if(world.cpu < clag)
if(world.tick_lag == tick_mem)
..()
else
world.tick_lag--
world.tick_lag = round(world.tick_lag)
sleep(75) //Checks every 7.5 seconds

world
New()
..()
Lag_Guard()
I'm sorry, we don't handle developer questions. Those are better asken on the Developer Forum.

Remember to encase all code in <DM></DM> tags when asking for help.