irswat Posted November 28, 2015 Author Posted November 28, 2015 (edited) Scriptname Profanity_Filter ;compliments of infinitetomm with additions from irswat string_var sv_DialText begin menumode 1009 ; only in dialogue mode let sv_DialText := GetUIString "DialogMenu/NOGLOW_BRANCH/DM_SpeakerText/string" PrintD "LUNETTE:: Dialogue Text Value is " + $sv_DialText let sv_DialText := Sv_ToLower sv_DialText if eval (Sv_Find "s#*!", sv_DialText) >-1 Sv_Replace "s#*!|****", sv_DialText SetUIString "DialogMenu/NOGLOW_BRANCH/DM_SpeakerText/string" $sv_DialText ; Set current text elseif eval (Sv_Find "f*#@", sv_DialText) >-1 Sv_Replace "f*#@|****", sv_DialText SetUIString "DialogMenu/NOGLOW_BRANCH/DM_SpeakerText/string" $sv_DialText ; Set current text elseif eval (Sv_Find "jerk off", sv_DialText) >-1 Sv_Replace "jerk off|**** ***", sv_DialText SetUIString "DialogMenu/NOGLOW_BRANCH/DM_SpeakerText/string" $sv_DialText ; Set current text elseif eval (Sv_Find "c*%!", sv_DialText) >-1 Sv_Replace "c*%!|****", sv_DialText SetUIString "DialogMenu/NOGLOW_BRANCH/DM_SpeakerText/string" $sv_DialText ; Set current text elseif eval (Sv_Find "b&@*$", sv_DialText) >-1 Sv_Replace "b&@*$|*****", sv_DialText SetUIString "DialogMenu/NOGLOW_BRANCH/DM_SpeakerText/string" $sv_DialText ; Set current text endif sv_destruct sv_DialText end Edited November 28, 2015 by irswat
TommInfinite Posted November 28, 2015 Posted November 28, 2015 haha your code edited by Nexus looks funny. All the answers are here (by Hemingway308 I presume)http://geck.bethsoft.com/index.php?title=Sv_Find Read about boolean for case-sensetivity.
Recommended Posts