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 

HEllo, Auto-Answer

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive
View previous topic :: View next topic  
Author Message
isis123
Voice


Joined: 01 Sep 2005
Posts: 13

PostPosted: Thu Sep 01, 2005 12:21 pm    Post subject: HEllo, Auto-Answer Reply with quote

Hello, IŽd like to have an autoanswer script, which automatically respons on opening a query. What do I have to type? Thanks
Back to top
View user's profile Send private message
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Sep 01, 2005 12:24 pm    Post subject: Reply with quote

Code:
set response {
 "bla"
 "yeah, bla bla"
 "exetra.. bla"
}

bind msgm - * response

proc response {nick uhost hand arg} {
 puthelp "privmsg $nick :[lindex $::response [rand [llength $::response]]]"
}

This will respond with a random line from $response whenver someone sends a message to the bot.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
isis123
Voice


Joined: 01 Sep 2005
Posts: 13

PostPosted: Thu Sep 01, 2005 12:44 pm    Post subject: Reply with quote

thanks, very helpful. Another question just bothers me, I made an advertisement script, but the bot only posts in the first set channel, not in all.

Code:
set adchannel "#omfgnaps #jonathan"
set adtime 1

set adtext {
 {
  ":: IAC :: Du suchst oder hast Accounts? :: Von WoW bis Steam? :: Von GW bis ESL? :: Bei uns bist du richtig! :: IAC ::"
 }
 {
  ":: IAC :: "
 }
}

if {![string match "*go*" [timers]]} { timer $adtime go }

proc go {} {
 global adchannel adtime adtext
  set text [lindex $adtext [rand [llength $adtext]]]
  foreach line $text {
    putserv "PRIVMSG $adchannel :$line"
  }
 if {![string match "*go*" [timers]]} { timer $adtime go }
}





So in this case, it only posts in the first channel #omfgnaps, Whats wrong? thanks.[code]
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Thu Sep 01, 2005 1:15 pm    Post subject: Reply with quote

you don't have a loop by channels, which is curious, since you had that loop yesterday when you asked for timer help, and for some reason you have removed it
Back to top
View user's profile Send private message Visit poster's website
isis123
Voice


Joined: 01 Sep 2005
Posts: 13

PostPosted: Thu Sep 01, 2005 2:09 pm    Post subject: Reply with quote

demond wrote:
you don't have a loop by channels, which is curious, since you had that loop yesterday when you asked for timer help, and for some reason you have removed it


How do i fix that? Thanks
Back to top
View user's profile Send private message
demond
Revered One


Joined: 12 Jun 2004
Posts: 3073
Location: San Francisco, CA

PostPosted: Thu Sep 01, 2005 2:24 pm    Post subject: Reply with quote

just go back to your original code from yesterday
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    egghelp.org community Forum Index -> Archive 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