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 

help for script

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
alisetan
Voice


Joined: 21 May 2006
Posts: 36

PostPosted: Mon Jul 31, 2006 1:33 pm    Post subject: help for script Reply with quote

Code:
# Public command trigger
set tr "!"
set cc "!"

# Channels you _dont_ want the bot to reply to public triggers on (seperate with spaces):
set nopub "#q3f"

bind pub -|- ${tr}dj dj
bind pub -|- ${tr}request req

proc dj {nick host hand chan arg} {
    global url pathqstat cc nopub dj
        if ($nick == $dj) { set $dj None }
   if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
   if {$arg == ""} {
   putserv "notice $nick :Usage: ${cc}dj <Exact Nickname>"
return 0
}
set dj "$arg"
putserv "NOTICE $chan :DJ set to $dj"
}
proc req {nick host hand chan arg} {
   global url pathqstat cc nopub dj
        if ($dj == None)
        putserv "NOTICE $nick $nick No DJ Online!"
   if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
   if {$arg == ""} {
   putserv "notice $nick :Usage: ${cc}request <^BExact Songname^B>"
return 0
}
set songname "$arg"
putserv "PRIVMSG $dj :$nick requested $songname" from [ $nick ] [  chan ]
putserv "NOTICE $nick :You have request $songname. Please do not re-request this."
}


what error for this.. blurr.. anyone can help
Back to top
View user's profile Send private message
krimson
Halfop


Joined: 19 Apr 2006
Posts: 86

PostPosted: Mon Jul 31, 2006 2:47 pm    Post subject: Reply with quote

please post your code between [code] if you wish to get any help here

if you'd also post what error you recieve it would be much easier to debug
Back to top
View user's profile Send private message Send e-mail
alisetan
Voice


Joined: 21 May 2006
Posts: 36

PostPosted: Mon Jul 31, 2006 2:55 pm    Post subject: Re: help for script Reply with quote

alisetan wrote:
# Public command trigger
set tr "!"
set cc "!"

# Channels you _dont_ want the bot to reply to public triggers on (seperate with spaces):
set nopub "#q3f"

bind pub -|- ${tr}dj dj
bind pub -|- ${tr}request req

proc dj {nick host hand chan arg} {
global url pathqstat cc nopub dj
if ($nick == $dj) { set $dj None }
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :Usage: ${cc}dj <Exact Nickname>"
return 0
}
set dj "$arg"
putserv "NOTICE $chan Very HappyJ set to $dj"
}
proc req {nick host hand chan arg} {
global url pathqstat cc nopub dj
if ($dj == None)
putserv "NOTICE $nick $nick No DJ Online!"
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :Usage: ${cc}request <^BExact Songname^B>"
return 0
}
set songname "$arg"
putserv "PRIVMSG $dj :$nick requested $songname" from [ $nick ] [ chan ]
putserv "NOTICE $nick :You have request $songname. Please do not re-request this."
}


what error for this.. blurr.. anyone can help



when i type !dj nick

[19:52] Tcl error [dj]: can't read "dj": no such variable <-- this thing happen.. what i want to do is.. when tyep !dj nick it set the dj nick.. when type !dj none.. if somebody type !request the bot notice putserv "NOTICE $nick $nick No DJ Online!" if the dj available.. the request is on
Back to top
View user's profile Send private message
krimson
Halfop


Joined: 19 Apr 2006
Posts: 86

PostPosted: Mon Jul 31, 2006 4:26 pm    Post subject: Reply with quote

put this at the top of your script:
Code:
set dj "<dj's nick>"


and replace <dj's nick> with your dj's nick
Back to top
View user's profile Send private message Send e-mail
alisetan
Voice


Joined: 21 May 2006
Posts: 36

PostPosted: Tue Aug 01, 2006 1:32 am    Post subject: Reply with quote

krimson wrote:
put this at the top of your script:
Code:
set dj "<dj's nick>"


and replace <dj's nick> with your dj's nick


it is manual.. or auto adding nick dj??
Back to top
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Tue Aug 01, 2006 2:50 am    Post subject: Reply with quote

alisetan wrote:
krimson wrote:
put this at the top of your script:
Code:
set dj "<dj's nick>"


and replace <dj's nick> with your dj's nick


it is manual.. or auto adding nick dj??

That snippet is "manual".
_________________
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Back to top
View user's profile Send private message Visit poster's website
alisetan
Voice


Joined: 21 May 2006
Posts: 36

PostPosted: Tue Aug 01, 2006 3:58 am    Post subject: Reply with quote

krimson wrote:
put this at the top of your script:
Code:
set dj "<dj's nick>"


and replace <dj's nick> with your dj's nick



how in this thing i want if !dj none... the bot will notice no dj available

proc req {nick host hand chan arg} {
global url pathqstat cc nopub dj
if {[lsearch -exact $nopub [string tolower $chan]] >= 0} {return 0}
if {$arg == ""} {
putserv "notice $nick :Usage: ${cc}request <^BExact Songname^B>"
return 0
}
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help 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