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 

.commands replies with .website .other .other

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


Joined: 06 Jan 2006
Posts: 79

PostPosted: Wed Jun 14, 2006 6:45 pm    Post subject: .commands replies with .website .other .other Reply with quote

i need a script so when someone types ".commands" all the bot does is reply with a notice to the user with ".command1 .command2 .command3"

thanks Smile
Back to top
View user's profile Send private message AIM Address
whittinghamj
Op


Joined: 21 May 2006
Posts: 103

PostPosted: Wed Jun 14, 2006 8:51 pm    Post subject: Reply with quote

here is a script i wrote with help of others on the board. it works on any channel that has the flag command

Code:

bind pub -|- .command pub:dscmd

setudef flag command

proc pub:dscmd {nick uhost hand chan arg} {
set chan [string tolower $chan]
  if {[channel get $chan command]} {
  putserv "NOTICE $nick .command1"
  putserv "NOTICE $nick .command2"
  putserv "NOTICE $nick .command2"
 }
 }
 putlog "!COMMANDS"


once you add that go to your dcc / telnet window and type .chanset #chan +command and your all set. do this command for each channel you want the bot to respond to this trigger. -|- means anyone can use it. Read the eggdrop docs for bot / channel flags.
Back to top
View user's profile Send private message
R-WaT
Halfop


Joined: 06 Jan 2006
Posts: 79

PostPosted: Thu Jun 15, 2006 1:36 am    Post subject: Reply with quote

works, thanks.
Back to top
View user's profile Send private message AIM Address
R-WaT
Halfop


Joined: 06 Jan 2006
Posts: 79

PostPosted: Thu Jun 15, 2006 1:57 am    Post subject: Reply with quote

Now that .commands works ".command1 .command2 .command3" (i put them all in the same line though)..

Now I need it when someone typs .command1 or .command2 or .command3 it replies back with "this is command1" or "this is command2" etc.
Back to top
View user's profile Send private message AIM Address
Sir_Fz
Revered One


Joined: 27 Apr 2003
Posts: 3793
Location: Lebanon

PostPosted: Thu Jun 15, 2006 7:18 am    Post subject: Reply with quote

Looking at the code you've been given, aren't you able to implement it yourself now?
_________________
Follow me on GitHub

- Opposing

Public Tcl scripts
Back to top
View user's profile Send private message Visit poster's website
R-WaT
Halfop


Joined: 06 Jan 2006
Posts: 79

PostPosted: Thu Jun 15, 2006 3:10 pm    Post subject: Reply with quote

nope
Back to top
View user's profile Send private message AIM Address
R-WaT
Halfop


Joined: 06 Jan 2006
Posts: 79

PostPosted: Thu Jun 15, 2006 3:44 pm    Post subject: Reply with quote

oh btw.. im the only one that can see .commands Sad
Back to top
View user's profile Send private message AIM Address
krimson
Halfop


Joined: 19 Apr 2006
Posts: 86

PostPosted: Thu Jun 15, 2006 3:48 pm    Post subject: Reply with quote

1. of course you're the only one who sees .commands.
Code:
# this sends you a NOTICE with the text blablabla

putserv "NOTICE $nick blablabla"


2. if you want the text to go to the channel, you should replace
Code:
putserv "NOTICE $nick blablabla"

# with

putserv "PRIVMSG $chan blablabla"


3. to make all commands go in a single line, replace
Code:
putserv "NOTICE $nick .command1"
putserv "NOTICE $nick .command2"
putserv "NOTICE $nick .command2"

# with

putserv "NOTICE $nick :Available commands are .command1 .command2 .command3"
Back to top
View user's profile Send private message Send e-mail
R-WaT
Halfop


Joined: 06 Jan 2006
Posts: 79

PostPosted: Thu Jun 15, 2006 4:30 pm    Post subject: Reply with quote

krimson wrote:
1. of course you're the only one who sees .commands.
Code:
# this sends you a NOTICE with the text blablabla

putserv "NOTICE $nick blablabla"


2. if you want the text to go to the channel, you should replace
Code:
putserv "NOTICE $nick blablabla"

# with

putserv "PRIVMSG $chan blablabla"


3. to make all commands go in a single line, replace
Code:
putserv "NOTICE $nick .command1"
putserv "NOTICE $nick .command2"
putserv "NOTICE $nick .command2"

# with

putserv "NOTICE $nick :Available commands are .command1 .command2 .command3"


I know all that, im saying, that when someone else types .commands they say they don't see it, but when i type it, i see it.
Back to top
View user's profile Send private message AIM Address
krimson
Halfop


Joined: 19 Apr 2006
Posts: 86

PostPosted: Thu Jun 15, 2006 4:33 pm    Post subject: Reply with quote

did you change the -|- part in
Code:
bind pub -|- .command pub:dscmd
to something else? if you want the command to be available to everybody, you should leave it to -|-
Back to top
View user's profile Send private message Send e-mail
R-WaT
Halfop


Joined: 06 Jan 2006
Posts: 79

PostPosted: Thu Jun 15, 2006 4:55 pm    Post subject: Reply with quote

Code:
bind pub -|- .commands pub:dscmd

setudef flag commands

proc pub:dscmd {nick uhost hand chan arg} {
set chan [string tolower $chan]
  if {[channel get $chan commands]} {
  putserv "PRIVMSG $chan :.Website .Signup .Sponsors"
 }
 }
 putlog ".COMMANDS"


is what i have
Back to top
View user's profile Send private message AIM Address
krimson
Halfop


Joined: 19 Apr 2006
Posts: 86

PostPosted: Fri Jun 16, 2006 1:43 am    Post subject: Reply with quote

first of all, you don't need to use the line
Code:
set chan [string tolower $chan]


second, i've just tested it (without the above mentioned line), and works well, no matter if the eggdrop knows that user or not.
Back to top
View user's profile Send private message Send e-mail
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