Valon328 Posted October 12, 2009 Author Share Posted October 12, 2009 I heard the word filter doesnt work, are there any new ones anyone made? :icon_music: Link to comment Share on other sites More sharing options...
Patrick Posted October 12, 2009 Share Posted October 12, 2009 Wouldn't it be like.if playermsg = (… lol ...)Change to (... rofl ...) Link to comment Share on other sites More sharing options...
Valon328 Posted October 12, 2009 Author Share Posted October 12, 2009 @üÑÂøчġġÑâ€Ã‘‚:> Wouldn't it be like.> if playermsg = (… lol ...)> Change to (... rofl ...)I don't think so D: Link to comment Share on other sites More sharing options...
anasky Posted October 15, 2009 Share Posted October 15, 2009 I think what Nugget made actually comes close.First, search for the sub where you recieve the text (before sending back to the map).Second, make a Function:```Public Function WordFilter(message-var As String) 'change this If message-var = Trim$("lol") Then WordFilter = "rofl" ElseIf message-var = Trim$("...") Then WordFilter = "" End IfEnd Sub 'not sure, never made a function by hand xD```It's very basic and will only work if the entire message is lol or …, but it does work.I don't know the command to check for every word, but you got your basic. Link to comment Share on other sites More sharing options...
kris_hole Posted October 26, 2009 Share Posted October 26, 2009 could you not jsut putReplace(TestSay, "shit", "Stercus")if it doesnt find the word it shouldnt cause an error so Link to comment Share on other sites More sharing options...
anasky Posted October 26, 2009 Share Posted October 26, 2009 ```Public Function Replace(message-var As String, WhatShouldBeFiltered As String, WhatToReplace As String) 'change this If message-var = Trim$(WhatShouldBeFiltered) Then Replace = WhatToReplace End IfEnd Sub 'not sure, never made a function by hand xD```There you go.Just call it like you did, and he actually replaces it (make sure to call it where he sends the message to the map, you've got to find it yourself). Link to comment Share on other sites More sharing options...
balliztik1 Posted October 27, 2009 Share Posted October 27, 2009 But for a long list, you'd need to create a loop of some sort, or do it all by hand. I remade the word filter from TE a while back. You might want to check it out. Note that the associated tutorial no longer works with the latest version, but if you know the source, it won't be a problem.http://www.touchofdeathforums.com/smf/index.php/topic,16815.0.html Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now