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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Melkimo
Voice
Posts: 2 Joined: Wed Jan 19, 2011 11:48 am
Post
by Melkimo » Wed Jan 19, 2011 12:25 pm
@Melkimo> !beer nadine
* +SecsyDiva gives a beer to nadine
atm it says:
* +SecsyDiva gives a beer to Melkimo
I am looking for how to make the bot respond to !(something) <nick refered too) message
But at this point I got to where it responds to the nick saying the !something (and ignores the $nick it should respond too)
Code: Select all
proc pub_water {nick uhost hand channel arg} {
global botnick
putserv "PRIVMSG $channel :\001ACTION gives $nick a bottle of water\001"
return 0
}
bind pub - !water pub_water
What should I change or add to make this work
It should be easy, but uhmm yea, I am looking over it.
doggo
Halfop
Posts: 97 Joined: Tue Jan 05, 2010 7:53 am
Contact:
Post
by doggo » Wed Jan 19, 2011 2:11 pm
Code: Select all
bind pub - !water pub_water
proc pub_water {nick uhost hand channel arg} {
set who [lindex $arg 0]
if {$who == ""} {set who $nick}
putserv "PRIVMSG $channel :\001ACTION gives $who a bottle of water\001"
}
[05:58pm] <doggo> !water
[05:58pm] * [spunky] gives doggo a bottle of water
[05:58pm] <doggo> !water [spunky]
[05:58pm] * [spunky] gives [spunky] a bottle of water
[06:00pm] <doggo> !water nadine
[06:00pm] * [spunky] gives nadine a bottle of water
Code: Select all
set who [lindex $arg 0]
sets the VAR who to the nick you want to give water to
Code: Select all
if {$who == ""} {set who $nick}
if who is empty then your nick or whoever triggered the cmd will be used
hope this helped
Melkimo
Voice
Posts: 2 Joined: Wed Jan 19, 2011 11:48 am
Post
by Melkimo » Wed Jan 19, 2011 8:03 pm
Yea that works ! Thanks
Is it possible to make the same !command in private with the bot but sending the output to a specified channel?
Like
/msg <bot> !beer Nadine #channel
And it responds in
#channel <botnick> /me gives Nadine a beer
TCL_no_TK
Owner
Posts: 509 Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire
Post
by TCL_no_TK » Thu Jan 20, 2011 6:24 pm
Code: Select all
proc pub_water {nick uhost hand channel arg} {
should be
Code: Select all
proc pub_water {nick uhost hand channel text} {
arg is special. and remenber to use
speechles
Revered One
Posts: 1398 Joined: Sat Aug 26, 2006 10:19 pm
Location: emerald triangle, california (coastal redwoods)
Post
by speechles » Thu Jan 20, 2011 6:42 pm
Actually, arg is fine. It's the word "A R G S" or args, which has special meaning. Just to clarify that part.
TCL_no_TK
Owner
Posts: 509 Joined: Fri Aug 25, 2006 7:05 pm
Location: England, Yorkshire
Post
by TCL_no_TK » Thu Jan 20, 2011 7:01 pm
lol was
close enough arg today, arg
s tomorrow maybe
Amr
Halfop
Posts: 94 Joined: Fri Sep 14, 2007 7:13 am
Location: Egypt
Post
by Amr » Sat Mar 26, 2011 1:35 pm
What about adding more , for example !shoot it will be "bot shoots $who"
!kill ..etc.