Author Topic: Ziggy Pro Bot, Extended Gibberish Detector.  (Read 2975 times)

onthecuttingedge2005

  • Guest
Ziggy Pro Bot, Extended Gibberish Detector.
« on: July 03, 2005, 12:23:39 am »
Extended Gibberish Detector, UPDATED AUGUST 24TH 1:04PM 2005.
NO FILES NEEDED.
By: Gerald L. Blakley
Code: [Select]
It adds to the Gibberish detector by:
1.Spotting Users who send blanks.
2.Spotting Single Gibberish Words that the current Gibberish detector doesn't pick up.
3.Optimized Debug to Function String count As Variable.

'ZIGGY PRO BOT, Count the number of words in OriginalSentence
     Dim Strip2
     CountWordsB = HalBrain.AlphaNumericalOnly(OriginalSentence)
     Strip2 = CountWordsB
     Strip2 = Trim(Strip2)
     Do While InStr(1, Strip2, "  ")
     Strip2 = Replace(Strip2, "  ", " ")
     Loop
     Dim bWords
     bWords = split(Strip2, " ")
     If UBound(bWords) + 1 Then
     DebugInfo = DebugInfo & "Words Counted at Top: " & "There are " & UBound(bWords) + 1 & " words in OriginalSentence: " & Strip2 & vbCrLf
     End If
     
'Ziggy Pro Bot, Convert numbered String Variables to Function Variables for Word count detection or any String variable.
'Also used for other scripts that need string variables passed down through code.
anArray = Array(1,2,3,4,5,6,7,8,9)    
anArray = Array("1","2","3","4","5","6","7","8","9")
For Each arrayElement In anArray
If Instr(1, DebugInfo, arrayElement, vbTextCompare) > 0 Then
NumberOfWords = arrayElement
DebugInfo = DebugInfo & "Count All Words: " & NumberOfWords & vbCrLf
Exit For
End If
Next
     
'ZIGGY PRO BOT, Extended Gibberish detector and response.
'Find a single word that's over 15 Characters in length.
'Find User Blanks.
If Garbage = "" Then Garbage = 0
If NumberOfWords < 2 And Len(OriginalSentence) > 15 Then Garbage = 1
If NumberOfWords < 1 And Len(OriginalSentence) < 1 Then Garbage = 1
If Garbage = 1 Then
LearningLevel = 0
Select Case (Int(Rnd * 8) + 1)
Case 1
GetResponse = "You make absolutely no sense" & "! " & vbCrLf
Case 2
GetResponse = "That's makes no sense to me" & "! " & vbCrLf
Case 3
GetResponse = "That's meaningless to me" & "! " & vbCrLf
Case 4
GetResponse = "That means nothing to me" & "! " & vbCrLf
Case 5
GetResponse = "You are so irritating" & "! " & vbCrLf
Case 6
GetResponse = "That's Nonsense" & "! " & vbCrLf
Case 7
GetResponse = "That's a bunch of garbage" & "! " & vbCrLf
Case 8
GetResponse = "If you are going to do that then why don't you go talk to someone else" & "! " & vbCrLf
End Select
End If
Jerry[8D]
« Last Edit: August 24, 2005, 04:18:01 pm by onthecuttingedge2005 »

onthecuttingedge2005

  • Guest
Ziggy Pro Bot, Extended Gibberish Detector.
« Reply #1 on: August 24, 2005, 05:15:56 am »
Hi Rob.

Is it possible to get the forum to post spaces inbetween quotes correctly, The forum posts two blank spaces as one space which can mess up a script and cause a script error.

Jerry.

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1469
    • View Profile
    • http://www.zabaware.com
Ziggy Pro Bot, Extended Gibberish Detector.
« Reply #2 on: August 24, 2005, 08:34:06 am »
quote:
Originally posted by onthecuttingedge2005

Hi Rob.

Is it possible to get the forum to post spaces inbetween quotes correctly, The forum posts two blank spaces as one space which can mess up a script and cause a script error.

Jerry.


The forum has a tag called "code" that you can put code in between. When writing a message, look at the toolbar buttons under Format and click the button that looks like "#"
Robert Medeksza

onthecuttingedge2005

  • Guest
Ziggy Pro Bot, Extended Gibberish Detector.
« Reply #3 on: August 24, 2005, 02:04:44 pm »
Thanks buddy.

Jerry.