egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Talking BOT

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Sat Sep 19, 2009 2:35 pm    Post subject: Talking BOT Reply with quote

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:

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

Quote:
<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..
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Mon Sep 21, 2009 12:44 pm    Post subject: Reply with quote

hello,

44 view no replay
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Callisto
Halfop


Joined: 13 Mar 2005
Posts: 86

PostPosted: Mon Sep 21, 2009 2:18 pm    Post subject: Reply with quote

Have you had a look at the bmotion bot?
Back to top
View user's profile Send private message
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Mon Sep 21, 2009 2:20 pm    Post subject: Reply with quote

Hello

yes i have seen this and used but i need something my own creation .
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
arfer
Master


Joined: 26 Nov 2004
Posts: 436
Location: Manchester, UK

PostPosted: Mon Sep 21, 2009 2:51 pm    Post subject: Reply with quote

Untested but should be OK

Code:

# 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
Back to top
View user's profile Send private message
TCL_no_TK
Owner


Joined: 25 Aug 2006
Posts: 509
Location: England, Yorkshire

PostPosted: Wed Sep 23, 2009 3:19 pm    Post subject: Reply with quote

Thanhas wrote:
Hello

yes i have seen this and used but i need something my own creation .
lol @ "my own creation" Laughing
_________________
TCL the misunderstood
Back to top
View user's profile Send private message Send e-mail
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Wed Sep 23, 2009 11:17 pm    Post subject: Reply with quote

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 Smile but anyway thank you all..

Best regards
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Thanhas
Op


Joined: 02 Sep 2006
Posts: 124
Location: Ottawa, Canada

PostPosted: Mon Sep 28, 2009 11:05 am    Post subject: Hope no one go mind my Post Reply with quote

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

don't worry its not easy Smile

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
Back to top
View user's profile Send private message Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber