'This IS MY FIRST PLUGIN created while chatting to a chatbot called
'AIM: VAVAVIRGIL who is always spouting facts about smoking.
' i thought it would be usefull if i could figure out how to respond
'to this. One problem which i have not been able to figure out is.
'HOW TO MAKE THE Q&A section of this code...... HELPME PLEASE ANYONE ..
'Also How Do i Add These Files To the MENU inside THE EDITOR
' This code was adapted from other codes found across the FORUM.
' I HAVE FOUND THE FORUM A USEFUL TRAINING RESOURCE *VONSMITH* *CUTTING EDGE* *MAVERICK* *DON* to name a few.
' THIS SCRIPT IS TRANSFERABLE
' I USE THIS SCRIPT TO PUT MY OWN SPECIFIC TOPICS IN TO HAL
' Please feel free to adapt this code for yourown spcific topics
' although XTF BRAINS & ATF BRAINS ARE wonderfull. SOMETIMEs They Pickup a lot of BOGUS information, this help you to direct hal to specific KNOWLEDGE.
'SMOKING SCRIPTS
'hal hates smoking he has many facts reminding you of the fact
'------Check Keyword Trigger----------------------------------------
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "KEYWORDSMOKING.brn") = "TRUE" Then
AnswerSent = "" & Trim(OriginalSentence)
'-----Edit Learned file ------
'---NB: this file you will have to sensor and copy new data to the statementSMOKING.brn---
HalBrain.AppendFile WorkingDir & "SMOKING" & ".brn", AnswerSent
End If
'------IF KEYWORD TRIGGER THEn LOOKIN STATEMENT FOR RESPonSE--------
If HalBrain.TopicSearch(OriginalSentence, WorkingDir & "KEYWORDSMOKING.brn") = "TRUE" Then
Smoking = HalBrain.ChooseSentenceFromFile(WorkingDir & "statementSMOKING.brn")
'------CHECK DEBUG INFO ---------------------------------------------
GetResponse = Smoking & VbCrLf
DebugInfo = DebugInfo & "The user is talking about smoking: " & Smoking & VbCrLf
Else
DebugInfo = DebugInfo & "Hal has found nothing about smoking: " & Smoking & VbCrLf
End If
'--------WANTED Q&A SCRIPT -----------------------------------------------------
files needed
KEYWORDSMOKING.BRN
statementSMOKING.brn
smoking.brn
[8D][

]
Download Attachment:
Smoking Scripts.zip5.11 KB
Download Attachment:
statementSMOKING.brn7.73 KB
Download Attachment:
KEYWORDSMOKING.brn532 Bytes
Download Attachment:
smoking.brn1.55 KB