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!
darton
Op
Posts: 155 Joined: Sat Jan 21, 2006 11:03 am
Post
by darton » Sun Jan 22, 2006 8:45 am
Hello!
I want to have a script which can save something such as the rules in my channel and with !rules I can retrieve that what I have saved. Is that possible?
Sir_Fz
Revered One
Posts: 3793 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Jan 22, 2006 8:57 am
This belongs in the Scripts requests forum. My suggestion would be to do a forum
search or simply check the
Tcl Archive .
darton
Op
Posts: 155 Joined: Sat Jan 21, 2006 11:03 am
Post
by darton » Sun Jan 22, 2006 1:43 pm
OK, I tried this:
bind pub - !word
proc word {nick host hand chan rest} {
puthelp "privmsg $chan :text"
}
It works. But my channel is connected with a game. And when someone in game types something, in channel it is displayed as follows:
"player: text"
So when someone in game types "!word" the text should be displayed. I tried this script:
bind pub - *: !word
proc word {nick host hand chan rest} {
puthelp "privmsg $chan :text"
}
But this doesn't work. What can I do?
Alchera
Revered One
Posts: 3344 Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:
Post
by Alchera » Sun Jan 22, 2006 9:00 pm
"rest" contains any text used after the the trigger.
Add [SOLVED] to the thread title if your issue has been.
Search |
FAQ |
RTM
darton
Op
Posts: 155 Joined: Sat Jan 21, 2006 11:03 am
Post
by darton » Tue Jan 24, 2006 10:32 am
OK, I try to make it as easy as possible to understand.
You can see
here that I write a command in game and in the channel. But my bot answers only on the second command. What do I have to change with my script, that my bot answers on both commands?
Code: Select all
bind pub - !donate donate
proc donate {nick host hand chan rest} {
puthelp "privmsg $chan :!msg Donate is OFF!"
}
Sir_Fz
Revered One
Posts: 3793 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Tue Jan 24, 2006 6:01 pm
bind to msg, but that way you'll have to pass the #channame in your message.
darton
Op
Posts: 155 Joined: Sat Jan 21, 2006 11:03 am
Post
by darton » Wed Jan 25, 2006 1:13 pm
Where do I have to pass my channame in the script
Sir_Fz
Revered One
Posts: 3793 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Jan 25, 2006 4:08 pm
Code: Select all
bind msg - !donate msg:donate
proc msg:donate {nick uhost hand arg} {
set chan [lindex [split $arg] 0]
puthelp "privmsg $chan :!msg Donate is OFF!"
}
so /msg bot !donate
#channel .
darton
Op
Posts: 155 Joined: Sat Jan 21, 2006 11:03 am
Post
by darton » Wed Jan 25, 2006 5:42 pm
But I dont want to write everytime: /msg bot !donate #channel.
I only want to write !donate. It must be possible that the bot reacts also when !donate isnt at first position.
Sir_Fz
Revered One
Posts: 3793 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Jan 25, 2006 7:19 pm
Code: Select all
bind msgm - *!donate* msg:donate
proc msg:donate {nick uhost hand arg} {
foreach chan [channels] {
puthelp "privmsg $chan :!msg Donate is OFF!"
}
}
this will msg all channels "!msg Donate is OFF!" when someone msgs the bot !donate (anywhere in the sentence).
darton
Op
Posts: 155 Joined: Sat Jan 21, 2006 11:03 am
Post
by darton » Thu Jan 26, 2006 2:43 am
I typed this in my channel: sadfdfsg: !donate. But the bot didnt react.
Sir_Fz
Revered One
Posts: 3793 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Jan 26, 2006 5:01 am
Sir_Fz wrote: this will msg all channels "!msg Donate is OFF!" when someone msgs the bot !donate (anywhere in the sentence).
darton
Op
Posts: 155 Joined: Sat Jan 21, 2006 11:03 am
Post
by darton » Thu Jan 26, 2006 5:13 am
But it must be possible without messaging the bot.
Sir_Fz
Revered One
Posts: 3793 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Jan 26, 2006 8:48 am
Then use bind pubm . and NO, I'm not going to write it for you. Read tcl-commands.doc about the pubm bind.
darton
Op
Posts: 155 Joined: Sat Jan 21, 2006 11:03 am
Post
by darton » Thu Jan 26, 2006 3:50 pm
WOW, it really works. Is it possible that the Bot only considers the first 10 letters?