Valhalla Legends Archive

Programming => Battle.net Bot Development => Topic started by: haZe on December 26, 2002, 03:20 PM

Title: Source Codes/bots
Post by: haZe on December 26, 2002, 03:20 PM
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:
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

Yes, this did come out of an ethbot. I used the ProfanityUnfilter function and reversed it =D
Title: Re: Source Codes/bots
Post by: Etheran on December 26, 2002, 10:16 PM
err ;p
Title: Re: Source Codes/bots
Post by: RhiNo on December 27, 2002, 04:37 AM
haze you know u want to really say who reversed it for you because you didnt know how
Title: Re: Source Codes/bots
Post by: haZe on December 27, 2002, 07:22 AM
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.
Title: Re: Source Codes/bots
Post by: warz on December 27, 2002, 08:18 AM
Do I even know you? Do you even know me?
Title: Re: Source Codes/bots
Post by: Yoni on December 27, 2002, 08:55 AM
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.
Title: Re: Source Codes/bots
Post by: haZe on December 27, 2002, 09:21 AM
parents made me =D
Title: Re: Source Codes/bots
Post by: SiMi on December 27, 2002, 10:06 AM
repleace all the other stuff and put this in the midleIf InStr(strMessage, "fuck") Then strMessage = Replace(strMessage, "dfsadfsaf", "*****")

Hrm should help
Title: Re: Source Codes/bots
Post by: SKiLLs on December 27, 2002, 10:26 AM
Well it would work better if you did this.

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
Title: Re: Source Codes/bots
Post by: haZe on December 27, 2002, 10:30 AM
how so...how did that help =[
Title: Re: Source Codes/bots
Post by: Grok on December 27, 2002, 12:11 PM
Hmm, that is messy.  The If() is redundant because Replace will not work if the search string is not found.

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

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.
Title: Re: Source Codes/bots
Post by: SKiLLs on December 29, 2002, 07:59 PM
Quotehow so...how did that help =[

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.
Title: Re: Source Codes/bots
Post by: Zakath on December 30, 2002, 07:45 AM
Good grief. How can VB not have a function analogous to stricmp()?
Title: Re: Source Codes/bots
Post by: Skywing on December 30, 2002, 08:59 AM
QuoteGood grief. How can VB not have a function analogous to stricmp()?
BTW, stricmp is a Microsoft VC-specific extension.
Title: Re: Source Codes/bots
Post by: Zakath on December 30, 2002, 11:33 AM
Oh. :-[

Don't I feel silly now.