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.

Response script...

Old posts that have not been replied to for several years.
Locked
f
firedance

Response script...

Post by firedance »

well i found this scrip 'EasySpeak' and I tought that I needed a moore advanced but I couldent find any...
(EasySpeak makes the bot reply to like "hello" with "helloooo" etc)
so I tought that il try to make one. but im not so good at tcl so i got stuck directly =)
I want to have a command to add replys like .addrep "Hello" "Good to see yah"
So now my question is : what is the best way to do this? write all to a file and check the file every time someone sends a message? isnt there a better way?
User avatar
Dedan
Master
Posts: 260
Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis

Post by Dedan »

Code: Select all


set hello_flood_control 0

set hello_greetings {
  "hi"
  "hello"
  "good to see you"
}

bind pubm -|- "hello $botnick" hello:response

bind pubm -|- "hi $botnick" hello:response

proc hello:response {nick uhost handle channel text} {
  global hello_flood_control
  if {$hello_flood_control == "1"} {return 0}
  set hello_flood_control 1
  utimer 5 [list set hello_flood_control 0]
  set temp_hello $::hello_greetings
  set temp_hello [lindex $temp_hello [rand [llength $temp_hello]]]
  putquick "PRIVMSG $channel :$temp_hello $nick"
  return 0
}

I once was an intelligent young man, now i am old and i can not remember who i was.
f
firedance

Post by firedance »

no, I mean for not just hello, and it only responses one word to every command...
like "hello" "moo" and "1337" "lol" etc
and I want to be able to add triggers like
.addrep "muhahahah" "you are evil"
Locked