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.

.commands replies with .website .other .other

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
R
R-WaT
Halfop
Posts: 79
Joined: Fri Jan 06, 2006 7:45 pm

.commands replies with .website .other .other

Post by R-WaT »

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 :)
w
whittinghamj
Op
Posts: 103
Joined: Sun May 21, 2006 4:50 pm

Post by whittinghamj »

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

Code: Select all

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.
R
R-WaT
Halfop
Posts: 79
Joined: Fri Jan 06, 2006 7:45 pm

Post by R-WaT »

works, thanks.
R
R-WaT
Halfop
Posts: 79
Joined: Fri Jan 06, 2006 7:45 pm

Post by R-WaT »

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.
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Looking at the code you've been given, aren't you able to implement it yourself now?
R
R-WaT
Halfop
Posts: 79
Joined: Fri Jan 06, 2006 7:45 pm

Post by R-WaT »

nope
R
R-WaT
Halfop
Posts: 79
Joined: Fri Jan 06, 2006 7:45 pm

Post by R-WaT »

oh btw.. im the only one that can see .commands :(
User avatar
krimson
Halfop
Posts: 86
Joined: Wed Apr 19, 2006 8:12 am

Post by krimson »

1. of course you're the only one who sees .commands.

Code: Select all

# 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: Select all

putserv "NOTICE $nick blablabla"

# with

putserv "PRIVMSG $chan blablabla"
3. to make all commands go in a single line, replace

Code: Select all

putserv "NOTICE $nick .command1"
putserv "NOTICE $nick .command2"
putserv "NOTICE $nick .command2"

# with

putserv "NOTICE $nick :Available commands are .command1 .command2 .command3"
R
R-WaT
Halfop
Posts: 79
Joined: Fri Jan 06, 2006 7:45 pm

Post by R-WaT »

krimson wrote:1. of course you're the only one who sees .commands.

Code: Select all

# 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: Select all

putserv "NOTICE $nick blablabla"

# with

putserv "PRIVMSG $chan blablabla"
3. to make all commands go in a single line, replace

Code: Select all

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.
User avatar
krimson
Halfop
Posts: 86
Joined: Wed Apr 19, 2006 8:12 am

Post by krimson »

did you change the -|- part in

Code: Select all

bind pub -|- .command pub:dscmd
to something else? if you want the command to be available to everybody, you should leave it to -|-
R
R-WaT
Halfop
Posts: 79
Joined: Fri Jan 06, 2006 7:45 pm

Post by R-WaT »

Code: Select all

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
User avatar
krimson
Halfop
Posts: 86
Joined: Wed Apr 19, 2006 8:12 am

Post by krimson »

first of all, you don't need to use the line

Code: Select all

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.
Post Reply