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.

helpe to finish.

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
User avatar
Fiby
Voice
Posts: 7
Joined: Sat Feb 23, 2008 11:29 am
Location: Spain
Contact:

helpe to finish.

Post by Fiby »

need a script that pics randomly a nick from my channel userlist and sends it a message.

Code: Select all


set messg "here put my message"

set mychanlist [chanlist #madrid]

set randomnick [lindex $mychanlist [rand [llength $mychanlist]]]
	putmsg "PRIVMSG $randomnick : $messg"
this code its good? or not? o how it's?

:oops:
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

You didn't specify when do you want this message to be sent, however this is your code edited to make your bot send the message on public command !randmsg:

Code: Select all

set randmessg "here put my message"

bind pub - !randmsg send:randmsg

proc send:randmsg {nick uhost hand chan arg} {
 global randmessg
 set mychanlist [chanlist $chan]
 set randomnick [lindex $mychanlist [rand [llength $mychanlist]]]
 puthelp "PRIVMSG $randomnick :$randmessg"
}
Edit: Changed putmsg to puthelp.
Last edited by Sir_Fz on Sat Feb 23, 2008 2:50 pm, edited 2 times in total.
User avatar
Fiby
Voice
Posts: 7
Joined: Sat Feb 23, 2008 11:29 am
Location: Spain
Contact:

Post by Fiby »

sssssmmmmmmuuuuuaaaaaaaaakkkkkkksssssssssss ;*****

thanks Sir_Fz

:roll:
Post Reply