stylo Posted March 30, 2007 Share Posted March 30, 2007 Does anyone have a script that is against swear? Example: John: admin: John Please dont swear John: admin Admin: Do NOT swear. Admin: John muted ?!?! Link to comment
Guest Posted March 30, 2007 Share Posted March 30, 2007 Does anyone have a script that is against swear?Example: John: admin: John Please dont swear John: admin Admin: Do NOT swear. Admin: John muted ?!?! Yes If ($3 == swear) { if $readini(swears.ini,swears,$mta.name($1,$2) == 3) { !writeini -n swears.ini Swears $mta.name($1,$2) $calc (Swears.ini,swears,$mta.name($1,$2) + 1) mta.say $1 $mta.name($1,$2) Dont Swear Please } else mta.say $1 You have been warned 3 times Your Out! | .timer 1 2 mta.kick $1 $2 } Link to comment
lil Toady Posted March 30, 2007 Share Posted March 30, 2007 Wrong Marty, you have a way too much mistakes for such a little script on *:SIGNAL:mta.text:{ if (swear isin $3) { var %a = $readini($mta.dir $+ $1.ini,n,$2,swears) !writeini " $+ $mta.dir $+ $1.ini" $1 $2 swears $iif(%a > 2,3,$calc(%a + 1)) !inc %a mta.text $1 $mta.nick($1,$2) $+ , don't swear! ( $+ $replacex(%a,1,first,2,second,3,last) warning) if (%a > 2) mta.kick $1 $2 } } Link to comment
stylo Posted March 30, 2007 Author Share Posted March 30, 2007 Where do i have to put the words? + does it mute after 2 warnings? Link to comment
lil Toady Posted March 30, 2007 Share Posted March 30, 2007 change the mta.kick to mta.mute for mute, and um, put words? you asked only about the "swear" word. Well, just search the forum, there was about 457286245 topics about that Link to comment
SamB Posted March 30, 2007 Share Posted March 30, 2007 im sure that hash tables would be better at this then files. Link to comment
lil Toady Posted March 30, 2007 Share Posted March 30, 2007 im sure that hash tables would be better at this then files. No they won't. It would make sense if it was storing stuff for a long time about all the players in the server. Why would you want to create a new hash and controll it here and there, you'll need to write a few more funcs and process a few more events and they will just bring you more bugs, that's just useless here, in the script i posted i write the warnings to the mtama server ini, so after kick i wont even need to remove the warnings from it, mtama will do that for me. If you've heard somewhere that hashes are better that doesn't mean you have to use the everywhere, inis are quite good too Link to comment
stylo Posted March 30, 2007 Author Share Posted March 30, 2007 lol that was to indicate swear words coz i couldnt type f*c|< (srry guys had to explaine) and that stuff D: Link to comment
lil Toady Posted March 30, 2007 Share Posted March 30, 2007 put a $wildtok() in then (/help $wildtok) or use Search http://forum.mtavc.com/viewtopic.php?t=19430 Link to comment
FNdanielNL Posted October 26, 2007 Share Posted October 26, 2007 on *:SIGNAL:mta.text:{ if (swear isin $3) { var %a = $readini($mta.dir $+ $1.ini,n,$2,swears) !writeini " $+ $mta.dir $+ $1.ini" $1 $2 swears $iif(%a > 2,3,$calc(%a + 1)) !inc %a mta.text $1 $mta.nick($1,$2) $+ , don't swear! ( $+ $replacex(%a,1,first,2,second,3,last) warning) if (%a > 2) mta.kick $1 $2 } } can i do alias swear and then readini or txt or something whit a list of swearing words? And how to script then? I want that he reads all the swearing words from a other file, whit a list of swearwords... Link to comment
[UVA]Bart Posted October 26, 2007 Share Posted October 26, 2007 think this works just wrote it in here on *:SIGNAL:mta.command { if ($3 == !addword) { if ($4 == $null) mta.pm $1 $2 Error: !addword <the word you want to ban> else { if ($mta.level($1,$2) >= 4) { !writeini -n swear.ini banned $4 mta.pm $1 $2 The word $4 Has Been Banned } } } if ($3 == !remword) { if ($4 == $null) mta.pm $1 $2 Error: !remword <the word you want to unban> else { if ($mta.level($1,$2) >= 4) { !remini -n swear.ini banned $4 Banned mta.pm $1 $2 The word $4 Has Been UnBanned } } } } on *:SIGNAL:mta.text:{ if ($readini(swear.ini,banned,$3-)) { mta.text $1 $mta.nick($1,$2) $+ , don't swear! mta.pm $1 $2 Auto Muting For 60 seconds mta.mute $1 $2 !.timer 1 60 mta.unmute $1 $2 } } Link to comment
Recommended Posts