| View previous topic :: View next topic |
| Author |
Message |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
Posted: Wed Jun 14, 2006 6:45 pm Post subject: .commands replies with .website .other .other |
|
|
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  |
|
| Back to top |
|
 |
whittinghamj Op
Joined: 21 May 2006 Posts: 103
|
Posted: Wed Jun 14, 2006 8:51 pm Post subject: |
|
|
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 |
|
 |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
Posted: Thu Jun 15, 2006 1:36 am Post subject: |
|
|
| works, thanks. |
|
| Back to top |
|
 |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
Posted: Thu Jun 15, 2006 1:57 am Post subject: |
|
|
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 |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Thu Jun 15, 2006 7:18 am Post subject: |
|
|
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 |
|
 |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
Posted: Thu Jun 15, 2006 3:10 pm Post subject: |
|
|
| nope |
|
| Back to top |
|
 |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
Posted: Thu Jun 15, 2006 3:44 pm Post subject: |
|
|
oh btw.. im the only one that can see .commands  |
|
| Back to top |
|
 |
krimson Halfop

Joined: 19 Apr 2006 Posts: 86
|
Posted: Thu Jun 15, 2006 3:48 pm Post subject: |
|
|
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 |
|
 |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
Posted: Thu Jun 15, 2006 4:30 pm Post subject: |
|
|
| 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 |
|
 |
krimson Halfop

Joined: 19 Apr 2006 Posts: 86
|
Posted: Thu Jun 15, 2006 4:33 pm Post subject: |
|
|
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 |
|
 |
R-WaT Halfop
Joined: 06 Jan 2006 Posts: 79
|
Posted: Thu Jun 15, 2006 4:55 pm Post subject: |
|
|
| 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 |
|
 |
krimson Halfop

Joined: 19 Apr 2006 Posts: 86
|
Posted: Fri Jun 16, 2006 1:43 am Post subject: |
|
|
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 |
|
 |
|