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.
Old posts that have not been replied to for several years.
crazy-nic
Voice
Posts: 19 Joined: Wed Jul 02, 2003 12:44 am
Post
by crazy-nic » Thu Aug 07, 2003 7:17 am
hmm..... can someone help me like i wan my bot to say someting like on !help
it will say in msg
<botnick>hello
<botnick>how may i help you
something like tat
note: i dun wan everything in the same line.i want it separate lines
how is it so i hope you guys could help me out.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Aug 07, 2003 8:04 am
bind pub m !help proc:name
and create the proc.
crazy-nic
Voice
Posts: 19 Joined: Wed Jul 02, 2003 12:44 am
Post
by crazy-nic » Thu Aug 07, 2003 8:18 am
bind pub m !help help
proc help {nick host handle chan text} {
putserv "Privmsg $nick :Hello"
Putserv "Privmsg $nick :how may i help you?"
}
is it like tat?
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Aug 07, 2003 9:22 am
yes, but before u ask.. u have to try.
crazy-nic
Voice
Posts: 19 Joined: Wed Jul 02, 2003 12:44 am
Post
by crazy-nic » Thu Aug 07, 2003 10:13 am
thanks it works.... thanks alot.....
crazy-nic
Voice
Posts: 19 Joined: Wed Jul 02, 2003 12:44 am
Post
by crazy-nic » Sun Aug 10, 2003 2:11 am
hi there i'll like to ask if i would like to only excute the command when an unknown user which is a voice or op can use the commands what should i do
bind pub - !hello hellop
proc hellop {{nick uhost hand channel rest} {
global botnick
puthelp "PRIVMSG $nick :hello there your channel +v/+o"
}
only Voice ad ops can use the commands if non voice or ops in channel then the command will not take effect.
Ofloo
Owner
Posts: 953 Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:
Post
by Ofloo » Sun Aug 10, 2003 4:16 am
hope that this is to some help
Code: Select all
bind pub - !ohelp ohelp:pub
proc ohelp:pub {nick uhost hand chan arg} {
if {[isop $nick $chan] == 1} {
putserv "NOTICE $nick :line1"
putserv "NOTICE $nick :line2"
putserv "NOTICE $nick :line3"
} else {
putserv "NOTICE $nick :Dude you don't got acces to that list !!"
}
}
bind pub - !help help:pub
proc help:pub {nick uhost hand chan arg} {
if {[isvoice $nick $chan] == 1} {
putserv "NOTICE $nick :line1"
putserv "NOTICE $nick :line2"
putserv "NOTICE $nick :line3"
} else {
putserv "NOTICE $nick :Dude you don't got acces to that list !!"
}
}
Or both seperate msg same trigger
Code: Select all
bind pub - !help help:pub
proc help:pub {nick uhost hand chan arg} {
if {[isop $nick $chan] == 1} {
putserv "NOTICE $nick :line1"
putserv "NOTICE $nick :line2"
putserv "NOTICE $nick :line3"
}
if {[isvoice $nick $chan] == 1} {
putserv "NOTICE $nick :line1"
putserv "NOTICE $nick :line2"
putserv "NOTICE $nick :line3"
} else {
putserv "NOTICE $nick :Dude you don't got acces to that list !!"
}
}
or both same trigger same msg
Code: Select all
bind pub - !help help:pub
proc help:pub {nick uhost hand chan arg} {
set line1 "your msg"
set line2 "your msg"
set line3 "your msg"
if {[isop $nick $chan] == 1} {
putserv "NOTICE $nick :$line1"
putserv "NOTICE $nick :$line2"
putserv "NOTICE $nick :$line3"
}
if {[isvoice $nick $chan] == 1} {
putserv "NOTICE $nick :$line1"
putserv "NOTICE $nick :$line2"
putserv "NOTICE $nick :$line3"
} else {
putserv "NOTICE $nick :Dude you don't got acces to that list !!"
}
}
Last edited by
Ofloo on Sun Aug 10, 2003 4:23 am, edited 2 times in total.
XplaiN but think of me as stupid
Ofloo
Owner
Posts: 953 Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:
Post
by Ofloo » Sun Aug 10, 2003 4:16 am
if the server supports halfop you can also add "ishalfop"
XplaiN but think of me as stupid
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Aug 10, 2003 5:25 am
u can make it shorter like this:
Code: Select all
if {[isop $nick $chan] || [ishalfop $nick $chan ] || [isvoice $nick $chan] } {
putserv....
} else {
putserv....
}
Ofloo
Owner
Posts: 953 Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:
Post
by Ofloo » Sun Aug 10, 2003 5:54 am
true and not true that only counts for the last one :p cause with the other 2 ones you can set an different msg for ops and voiced users and first one you can also change the trigger so .. you should keep that in mind, but true for the last one its shorter
oh and tnx for pointing that out cause i was wondering what the syntax was for that
XplaiN but think of me as stupid
crazy-nic
Voice
Posts: 19 Joined: Wed Jul 02, 2003 12:44 am
Post
by crazy-nic » Tue Aug 12, 2003 8:00 am
Why i cannot make it into on message then the command works?
i cant seem to make it work
bind msg m .join pub_join
proc pub_join {n u h c a} {
set chan [lindex $a 0]
if {![string match #* $chan]} {
puthelp "privmsg $n :$n: Channel must have a # in front."
return 0
}
channel add $chan
puthelp "privmsg $nick :Roger that! $nick."
}
Ofloo
Owner
Posts: 953 Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:
Post
by Ofloo » Tue Aug 12, 2003 8:38 am
whats that ? its not a msg on joine eh it seems ur verrifiying something is a channel ?
its a msg join script from i what i can tell
To make the bot join a channel
if you want an on join script
you should use
Code: Select all
bind join - * join:pub
proc join:pub {nick uhost handle channel} {
...
but why use ops .. cause an user is only op after joining the channel not on joining it .. beter use on mode or something so if he gets opped he gets the msg ..
or if thats not what you mean plz specify cause your being little unclear
XplaiN but think of me as stupid
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Tue Aug 12, 2003 9:26 am
no, I guess what he wants is a script that makes the bot join a new channel when a master msg it
.join #channel
so I think this should be it:
Code: Select all
bind msg m .join pub_join
proc pub_join {nick uhost hand arg} {
set chan [lindex [split $arg] 0]
if {[string match $chan "#*"]} {
channel add $chan
} else {
puthelp "PRIVMSG $nick :$chan is invalid, it should have # infron of it"
}
user
Posts: 1452 Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway
Post
by user » Tue Aug 12, 2003 9:35 am
'catch' the 'channel add' and display the error message instead of doing the manual #* match. There are more prefixes than just "#", and coding it this way will leave the boring stuff to the eggdrop
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Tue Aug 12, 2003 9:50 am
I know there are better ways, but I couldn't figure out how.
how to catch the channel add ?