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 

helpe to finish.

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


Joined: 23 Feb 2008
Posts: 7
Location: Spain

PostPosted: Sat Feb 23, 2008 1:36 pm    Post subject: helpe to finish. Reply with quote

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

Code:


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?

Embarassed
Back to top
View user's profile Send private message Visit poster's website
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Sat Feb 23, 2008 1:50 pm    Post subject: Reply with quote

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:
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.
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts


Last edited by Sir_Fz on Sat Feb 23, 2008 2:50 pm; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
Fiby
Voice


Joined: 23 Feb 2008
Posts: 7
Location: Spain

PostPosted: Sat Feb 23, 2008 2:09 pm    Post subject: Reply with quote

sssssmmmmmmuuuuuaaaaaaaaakkkkkkksssssssssss ;*****

thanks Sir_Fz

Rolling Eyes
Back to top
View user's profile Send private message Visit poster's website
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