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.

HEllo, Auto-Answer

Old posts that have not been replied to for several years.
Locked
i
isis123
Voice
Posts: 13
Joined: Thu Sep 01, 2005 12:06 am

HEllo, Auto-Answer

Post by isis123 »

Hello, I´d like to have an autoanswer script, which automatically respons on opening a query. What do I have to type? Thanks
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

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.
i
isis123
Voice
Posts: 13
Joined: Thu Sep 01, 2005 12:06 am

Post by isis123 »

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: Select all

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.
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

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
i
isis123
Voice
Posts: 13
Joined: Thu Sep 01, 2005 12:06 am

Post by isis123 »

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
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

just go back to your original code from yesterday
Locked