This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

Talking BOT

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
User avatar
Thanhas
Op
Posts: 124
Joined: Sat Sep 02, 2006 11:14 am
Location: Ottawa, Canada

Talking BOT

Post by Thanhas »

Hello Longs years ago i have created a bot my selfown in MIRC scripting which were talking on text

Iam giving some idea here you guys will get what i need

Code: Select all

on 1:TEXT:*hi*:#:/msg $chan $read(words/hi.txt) $nick
on 1:TEXT:*hello*:#:/msg $chan $read(words/hello.txt) $nick
on 1:TEXT:*ok*:#:/msg $chan $read(words/ok.txt) $nick
on 1:TEXT:*bye*:#:/msg $chan $read(words/bye.txt) $nick
on 1:TEXT:*why*:#:/msg $chan $read(words/why.txt) $nick
on 1:TEXT:*hiy*:#:/msg $chan $read(words/hiy.txt) $nick
on 1:TEXT:*never*:#:/msg $chan $read(words/never.txt) $nick
on 1:TEXT:*salam*:#:/msg $chan $read(words/salam.txt) $NICK
on 1:TEXT:*brb*:#:/msg $chan $read(words/brb.txt) $nick
on 1:TEXT:*mind*:#:/msg $chan $read(words/mind.txt) $nick
on 1:TEXT:*BOT*:#:/msg $chan $read(words/BOT.txt) $nick 
on 1:TEXT:*hehe*:#:/msg $chan $read(words/hehe.txt) $nick
on 1:TEXT:*[censored]*:#:/msg $chan $read(words/[censored].txt) $nick
on 1:TEXT:*name*:#:/msg $chan $read(words/name.txt) $nick
on 1:TEXT:*life*:#:/msg $chan $read(words/life.txt) $nick
on 1:TEXT:*how are you*:#:/msg $chan $read(words/howareyou.txt) $nick
on 1:TEXT:*nice*:#:/msg $chan $read(words/nice.txt) $nick
on 1:TEXT:*where are you from*:#:/msg $chan $read(words/whereareyoufrom.txt) $nick
on 1:TEXT:*what do you do*:#:/msg $chan $read(words/whatdoyoudo.txt) $nick
on 1:TEXT:*asl*:#:/msg $chan $read(words/asl.txt) $nick
on 1:TEXT:*whatdoyoudo*:#:/msg $chan $read(words/whatdoyoudo.txt) $nick
on 1:TEXT:*fight*:#:/msg $chan $read(words/fight.txt) $nick
on 1:TEXT:*believe*:#:/msg $chan $read(words/believe.txt) $nick
on 1:TEXT:*bore*:#:/msg $chan $read(words/bore.txt) $nick
on 1:TEXT:*brother*:#:/msg $chan $read(words/brother.txt) $nick
on 1:TEXT:*picture*:#:/msg $chan $read(words/picture.txt) $nick
on 1:TEXT:*dream*:#:/msg $chan $read(words/dream.txt) $nick
on 1:TEXT:*Afghanistan*:#:/msg $chan $read(words/Afghanistan.txt) $nick
on 1:TEXT:*fool*:#:/msg $chan $read(words/fool.txt) $nick
on 1:TEXT:*friendship*:#:/msg $chan $read(words/friendship.txt) $nick
on 1:TEXT:*girls*:#:/msg $chan $read(words/girls.txt) $nick
on 1:TEXT:*go*:#:/msg $chan $read(words/g0.txt) $nick
on 1:TEXT:*good*:#:/msg $chan $read(words/good.txt) $nick
on 1:TEXT:*home*:#:/msg $chan $read(words/home.txt) $nick
on 1:TEXT:*kandahaar*:#:/msg $chan $read(words/kandahaar.txt) $nick
on 1:TEXT:*movie*:#:/msg $chan $read(words/movie.txt) $nick
on 1:TEXT:*music*:#:/msg $chan $read(words/music.txt) $nick
on 1:TEXT:*shutup*:#:/msg $chan $read(words/shutup.txt) $nick
on 1:TEXT:*sleep*:#:/msg $chan $read(words/sleep.txt) $nick
on 1:TEXT:*sorry*:#:/msg $chan $read(words/sorry.txt) $nick
on 1:TEXT:*student*:#:/msg $chan $read(words/student.txt) $nick
on 1:TEXT:*stupid*:#:/msg $chan $read(words/stupid.txt) $nick
on 1:TEXT:*super*:#:/msg $chan $read(words/super.txt) $nick
on 1:TEXT:*sure*:#:/msg $chan $read(words/sure.txt) $nick
on 1:TEXT:*sweden*:#:/msg $chan $read(words/sweden.txt) $nick
on 1:TEXT:*why*:#:/msg $chan $read(words/why.txt) $nick
on 1:TEXT:*who*:#:/msg $chan $read(words/who.txt) $nick
on 1:TEXT:*want*:#:/msg $chan $read(words/want.txt) $nick
on 1:TEXT:*ping*:#:/msg $chan $read(words/ping.txt) $nick
on 1:TEXT:*10x*:#:/msg $chan $read(words/10x.txt) $nick
on 1:TEXT:*tns*:#:/msg $chan $read(words/10x.txt) $nick
on 1:TEXT:*thanks*:#:/msg $chan $read(words/10x.txt) $nick
on 1:TEXT:*tnx*:#:/msg $chan $read(words/10.txt) $nick
on 1:TEXT:*thanks*:#:/msg $chan $read(words/10x.txt) $nick
on 1:TEXT:*Pashtoon*:#:/msg $chan $read(words/Pashtoon.txt) $nick
on 1:TEXT:*Grana*:#:/msg $chan $read(words/Grana.txt) $nick
on 1:TEXT:*Kha*:#:/msg $chan $read(words/Kha.txt) $nick
every *.txt have text there or you can say answers
Shuold i Explain more? Due to flood stuff i need Few chnages in it
1 Bot shuold replay those msges where his nick is used
<User> Hello Bot
<BOt> Hello there User
<User> How are you
<BOT> No replay
<User> How are you Bot
<BOt> been bore today and you?

2 To Provinte from fllood i need Ignore or timer but timer will be good this will work in batter way, make for each Replay 6 secands

Thank you..
User avatar
Thanhas
Op
Posts: 124
Joined: Sat Sep 02, 2006 11:14 am
Location: Ottawa, Canada

Post by Thanhas »

hello,

44 view no replay
C
Callisto
Halfop
Posts: 86
Joined: Sun Mar 13, 2005 11:04 am

Post by Callisto »

Have you had a look at the bmotion bot?
User avatar
Thanhas
Op
Posts: 124
Joined: Sat Sep 02, 2006 11:14 am
Location: Ottawa, Canada

Post by Thanhas »

Hello

yes i have seen this and used but i need something my own creation .
User avatar
arfer
Master
Posts: 436
Joined: Fri Nov 26, 2004 8:45 pm
Location: Manchester, UK

Post by arfer »

Untested but should be OK

Code: Select all

# assumes the path to data files is scripts/talk/data
# patterns below use normal string matching chars (* for anything, ? for a single character)
# filename is assumed to be equal to the pattern less all string matching chars (plus .txt file extension)
# for example the response to a match for *how?are?you* will be in howareyou.txt (lower case)
# each possible response (from which one is chosen at random) should be on a seperate line in the associated file

set vTalkPatterns {
    *hi* *hello* *ok* *bye* *why* *hiy* *never* *salam* *brb* *mind* *bot* *hehe* *censored* *name*
    *life* *how?are?you* *nice* *where?are?you?from* *asl* *what?do?you?do* *fight*
    *believe* *bore* *brother* *picture* *dream* *afghanistan* *fool* *friendship* *girls* *go*
    *good* *home* *kandahaar* *movie* *music* *shutup* *sleep* *sorry* *student* *stupid* *super*
    *sure* *sweden* *why* *who* *want* *ping* *10x* *tns* *thanks* *tnx* *thanks* *pashtoon* *grana*
    *kha*
}

bind PUBM - * pTalkRespond

proc pTalkRespond {nick uhost hand chan text} {
    global vTalkPatterns
    foreach pattern $vTalkPatterns {
        if {[string match -nocase $pattern $text]} {
            set filename [regsub -all -- {[\?\*]} $pattern ""].txt
            break
        }
    }
    if {[info exists filename]} {
        if {[file exists [file join scripts talk data $filename]]} {
            set id [open [file join scripts talk data $filename] r]
            set data [split [read -nonewline $id] \n]
            close $id
            if {[llength $data] != 0} {
                set response [lindex $data [rand [llength $data]]]
                putserv "PRIVMSG $chan :$response"
            }
        }
    }
    return 0
}
I must have had nothing to do
User avatar
TCL_no_TK
Owner
Posts: 509
Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire

Post by TCL_no_TK »

Thanhas wrote:Hello

yes i have seen this and used but i need something my own creation .
lol @ "my own creation" :lol:
User avatar
Thanhas
Op
Posts: 124
Joined: Sat Sep 02, 2006 11:14 am
Location: Ottawa, Canada

Post by Thanhas »

hello,

Thank you so much Arfer i highly appreciate that you helped me alot.


and Thank TCL.._no_TK for replay but i ment alike my creation :) but anyway thank you all..

Best regards
User avatar
Thanhas
Op
Posts: 124
Joined: Sat Sep 02, 2006 11:14 am
Location: Ottawa, Canada

Hope no one go mind my Post

Post by Thanhas »

Hello i want to make this Topic more advance if someone give time
:)

don't worry its not easy :)

http://www.elbot.com/

Artificial Intelligence Bot ?

is that possible to be used for a TCL ?

lets see if hard work is a mission for you guys!

Thank you
Post Reply