Valhalla Legends Forums Archive | Battle.net Bot Development | Source Codes/bots

AuthorMessageTime
haZe
Now, I wasn't sure if this topic went in this forum section so go ahead and move it if you feel the need skywing

But anyways does anyone have any source that WORKS (warz, fuck you)? I need to expiriment...I have an anti-profanity code (below) but I need a bot to implant it in..If someone would do me a huge favor and either a) implent the code below into a module on ur bot and send me the compiled exe or b) gimme some source that actually connects (without bnls usernames/logins plz..i got none lol)

profanity filter code:
[code]
Public Function ProfanityFilter(strMessage As String) As String
If InStr(strMessage, "fuck") Then strMessage = Replace(strMessage, "fuck", "*****")
If InStr(strMessage, "FUCK") Then strMessage = Replace(strMessage, "FUCK", "*****")
If InStr(strMessage, "cocksucker") Then strMessage = Replace(strMessage, "cocksucker", "*****")
If InStr(strMessage, "bitch") Then strMessage = Replace(strMessage, "bitch", "*****")
If InStr(strMessage, "slut") Then strMessage = Replace(strMessage, "slut", "*****")
If InStr(strMessage, "hoe") Then strMessage = Replace(strMessage, "hoe", "*****")
If InStr(strMessage, "piss") Then strMessage = Replace(strMessage, "piss", "*****")
If InStr(strMessage, "fuq") Then strMessage = Replace(strMessage, "fuq", "*****")
If InStr(strMessage, "fuk") Then strMessage = Replace(strMessage, "fuk", "*****")
If InStr(strMessage, "cock") Then strMessage = Replace(strMessage, "cock", "*****")
If InStr(strMessage, "ass") Then strMessage = Replace(strMessage, "ass", "*****")
If InStr(strMessage, "shit") Then strMessage = Replace(strMessage, "shit", "*****")
If InStr(strMessage, "whore") Then strMessage = Replace(strMessage, "whore", "*****")
If InStr(strMessage, "nigga") Then strMessage = Replace(strMessage, "nigga", "*****")
If InStr(strMessage, "nigger") Then strMessage = Replace(strMessage, "nigger", "*****")
If InStr(strMessage, "gook") Then strMessage = Replace(strMessage, "gook", "*****")
If InStr(strMessage, "penis") Then strMessage = Replace(strMessage, "penis", "*****")
If InStr(strMessage, "vagina") Then strMessage = Replace(strMessage, "vagina", "*****")
If InStr(strMessage, "asshole") Then strMessage = Replace(strMessage, "asshole", "*****")
If InStr(strMessage, "cunt") Then strMessage = Replace(strMessage, "cunt", "*****")
If InStr(strMessage, "!@!@%&") Then strMessage = Replace(strMessage, "!@!@%&", "*****")
If InStr(strMessage, "!#!@$&") Then strMessage = Replace(strMessage, "!#!@$&", "*****")
If InStr(strMessage, "!&!@$") Then strMessage = Replace(strMessage, "!&!@$", "*****")
If InStr(strMessage, "$!@%") Then strMessage = Replace(strMessage, "$!@%", "*****")
If InStr(strMessage, "!@!#&") Then strMessage = Replace(strMessage, "!@!#&", "*****")
If InStr(strMessage, "$%&%") Then strMessage = Replace(strMessage, "$%&%", "*****")
If InStr(strMessage, "!@!@!@") Then strMessage = Replace(strMessage, "!@!@!@", "*****")
ProfanityFilter = strMessage
End Function
[/code]

Yes, this did come out of an ethbot. I used the ProfanityUnfilter function and reversed it =D
December 26, 2002, 9:20 PM
Etheran
err ;p
December 27, 2002, 4:16 AM
RhiNo
haze you know u want to really say who reversed it for you because you didnt know how
December 27, 2002, 10:37 AM
haZe
LOL! As if! Rhino your version didn't work. You left 0's and other things in there that weren't supposed to be in there.
December 27, 2002, 1:22 PM
warz
Do I even know you? Do you even know me?
December 27, 2002, 2:18 PM
Yoni
Umm... Why would you want to filter profanity?
If it offended you for some reason I'd understand, but you said "warz, fuck you" in the same message, so I don't think that's the case.
December 27, 2002, 2:55 PM
haZe
parents made me =D
December 27, 2002, 3:21 PM
SiMi
repleace all the other stuff and put this in the midleIf InStr(strMessage, "fuck") Then strMessage = Replace(strMessage, "dfsadfsaf", "*****")

Hrm should help
December 27, 2002, 4:06 PM
SKiLLs
Well it would work better if you did this.

[code]
Public Function ProfanityFilter(strMessage As String) As String
If InStr(LCase(strMessage), "fuck") Then strMessage = Replace(strMessage, "fuck", "*****")
If InStr(LCase(strMessage), "cocksucker") Then strMessage = Replace(strMessage, "cocksucker", "*****")
If InStr(LCase(strMessage), "bitch") Then strMessage = Replace(strMessage, "bitch", "*****")
If InStr(LCase(strMessage), "slut") Then strMessage = Replace(strMessage, "slut", "*****")
If InStr(LCase(strMessage), "hoe") Then strMessage = Replace(strMessage, "hoe", "*****")
If InStr(LCase(strMessage), "piss") Then strMessage = Replace(strMessage, "piss", "*****")
If InStr(LCase(strMessage), "fuq") Then strMessage = Replace(strMessage, "fuq", "*****")
If InStr(LCase(strMessage), "fuk") Then strMessage = Replace(strMessage, "fuk", "*****")
If InStr(LCase(strMessage), "cock") Then strMessage = Replace(strMessage, "cock", "*****")
If InStr(LCase(strMessage), "ass") Then strMessage = Replace(strMessage, "ass", "*****")
If InStr(LCase(strMessage), "shit") Then strMessage = Replace(strMessage, "shit", "*****")
If InStr(LCase(strMessage), "whore") Then strMessage = Replace(strMessage, "whore", "*****")
If InStr(LCase(strMessage), "nigga") Then strMessage = Replace(strMessage, "nigga", "*****")
If InStr(LCase(strMessage), "nigger") Then strMessage = Replace(strMessage, "nigger", "*****")
If InStr(LCase(strMessage), "gook") Then strMessage = Replace(strMessage, "gook", "*****")
If InStr(LCase(strMessage), "penis") Then strMessage = Replace(strMessage, "penis", "*****")
If InStr(LCase(strMessage), "vagina") Then strMessage = Replace(strMessage, "vagina", "*****")
If InStr(LCase(strMessage), "asshole") Then strMessage = Replace(strMessage, "asshole", "*****")
If InStr(LCase(strMessage), "cunt") Then strMessage = Replace(strMessage, "cunt", "*****")
If InStr(strMessage, "!@!@%&") Then strMessage = Replace(strMessage, "!@!@%&", "*****")
If InStr(strMessage, "!#!@$&") Then strMessage = Replace(strMessage, "!#!@$&", "*****")
If InStr(strMessage, "!&!@$") Then strMessage = Replace(strMessage, "!&!@$", "*****")
If InStr(strMessage, "$!@%") Then strMessage = Replace(strMessage, "$!@%", "*****")
If InStr(strMessage, "!@!#&") Then strMessage = Replace(strMessage, "!@!#&", "*****")
If InStr(strMessage, "$%&%") Then strMessage = Replace(strMessage, "$%&%", "*****")
If InStr(strMessage, "!@!@!@") Then strMessage = Replace(strMessage, "!@!@!@", "*****")
ProfanityFilter = strMessage
End Function
[/code]
December 27, 2002, 4:26 PM
haZe
how so...how did that help =[
December 27, 2002, 4:30 PM
Grok
Hmm, that is messy.  The If() is redundant because Replace will not work if the search string is not found.

[code]
Public Sub ProFilter(ByRef Message As String)
   Dim aSmut() As String
   Dim lCnt As Long
   aSmut = Split("fuck,cocksucker,bitch,slut,hoe,piss,cock,nigger", ",")
   For lCnt = 0 To UBound(aSmut)
       Message = Replace(Message, aSmut(lCnt), String(Len(aSmut(lCnt)), "*"))
   Next lCnt
End Sub
[/code]

Maybe someone will like that better.  You could improve on it by making the array static or global, so that you only split it once, or when words are added.
December 27, 2002, 6:11 PM
SKiLLs
[quote]how so...how did that help =[[/quote]

Lets say they say the word like "fuk" and they say it like "FuK". Then it would not find it as a bad word! by puting LCase("Word") and the "lower case cuz word" would find the word. If you understand what I mean.
December 30, 2002, 1:59 AM
Zakath
Good grief. How can VB not have a function analogous to stricmp()?
December 30, 2002, 1:45 PM
Skywing
[quote]Good grief. How can VB not have a function analogous to stricmp()?[/quote]
BTW, stricmp is a Microsoft VC-specific extension.
December 30, 2002, 2:59 PM
Zakath
Oh. :-[

Don't I feel silly now.
December 30, 2002, 5:33 PM

Search