| View previous topic :: View next topic |
| Author |
Message |
Flomsen Voice
Joined: 18 Sep 2006 Posts: 5
|
Posted: Mon Sep 18, 2006 5:23 pm Post subject: Trigger lost |
|
|
Hi all
Need some help to create get back trigger
i have this script but i'm lost now, i don't now what i have to do
someone plz help me
sorry for my english
Last edited by Flomsen on Wed Sep 20, 2006 9:38 am; edited 1 time in total |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Mon Sep 18, 2006 6:01 pm Post subject: |
|
|
Change all references to '#MYCHANNEL' to your actual channel name and rehash the bot. In main simply type !help (as stated in the script).
| Code: | | puthelp "NOTICE $nick :!help for commands" |
Cycle your channel to see the notice sent to every user that joins. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Flomsen Voice
Joined: 18 Sep 2006 Posts: 5
|
Posted: Mon Sep 18, 2006 6:23 pm Post subject: |
|
|
| yes i now about that, is not what im search after |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Mon Sep 18, 2006 7:11 pm Post subject: |
|
|
Can you possibly explain your problem in more detail, so we know the problem you have.
I suggest you change:
| Code: | | if {$chan == "#MYCHANNEL"} { |
To
| Code: | | if {[string match -nocase #mychannel $chan]} { |
_________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
metroid Owner
Joined: 16 Jun 2004 Posts: 771
|
Posted: Tue Sep 19, 2006 3:19 am Post subject: |
|
|
What he is aiming for is a direct copy of Quakenet's help bot interface.
Being able to go back and forth with the help and it's topics.
This is however hard in TCL and it requires alot more work than what you have right there  |
|
| Back to top |
|
 |
Flomsen Voice
Joined: 18 Sep 2006 Posts: 5
|
Posted: Tue Sep 19, 2006 3:48 am Post subject: |
|
|
| metroid wrote: | What he is aiming for is a direct copy of Quakenet's help bot interface.
Being able to go back and forth with the help and it's topics. |
Yes that if you run /msg G help on Qnet.
| metroid wrote: | This is however hard in TCL and it requires alot more work than what you have right there  |
Ok, i guess i need to find a new solution  |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Tue Sep 19, 2006 5:35 am Post subject: |
|
|
Looks like you'd have to create binds on the fly, to look for specific nick's selection, and unbind them when the output was finished.. Quite a bit of overhead.
Would be simpler to just make a staggered helpfile, with like:
| Code: |
##########################################################################
bind pub - !help proc:helpstuff
proc helpstuff {nick uhost hand chan text} {
set text [split $text]
if {[lindex $text 0] == ""} {
puthelp "PRIVMSG $nick :This is the default help, in english"
puthelp "PRIVMSG $nick :You can type !help swedish, !help german, !help support, !help faq, etc etc"
} elseif {[lindex $text 1] == "german"} {
# This is where german text would be
} elseif {[lindex $text 1] == "swedish"} {
# this is where swedish text would be
} elseif {([lindex $text 1] == "faq")
if {[lindex $text 2] == ""} {
# here you can make subcategories for "faq" questions
puthelp "PRIVMSG $nick :Please pick a category:"
puthelp "PRIVMSG $nick :!help faq 1 - Category 1 stuff"
puthelp "PRIVMSG $nick :!help faq 2 - Category 2 stuff"
} elseif {[lindex $text 2] == "1"} {
puthelp "PRIVMSG $nick :FAQ Category 1 answers here"
} elseif {[lindex $text 2] == "2"} {
puthelp "PRIVMSG $nick :FAQ Category 2 answers"
}
}
}
|
and so forth and so on...and no that's not tested and prolly doesn't work as-is  |
|
| Back to top |
|
 |
Flomsen Voice
Joined: 18 Sep 2006 Posts: 5
|
Posted: Tue Sep 19, 2006 7:02 am Post subject: |
|
|
i get this error on !help german
| Code: | [12:56:39] (MYBOT) [12:56] Tcl error [addinfo]: can't read "nextinfo(BB@whocare.org)": no such variable
[12:56:39] (MYBOT) [12:56] [BB!BB@whocare.org] !help german
|
i have edit this lines
Line 2
bind pub - !help proc:helpstuff
to
bind pub - !help helpstuff
Line 14
} elseif {([lindex $text 1] == "faq")
to
} elseif {[lindex $text 1] == "faq"} {
| Code: |
##########################################################################
bind pub - !help helpstuff
proc helpstuff {nick uhost hand chan text} {
set text [split $text]
if {[lindex $text 0] == ""} {
puthelp "PRIVMSG $nick :This is the default help, in english"
puthelp "PRIVMSG $nick :You can type !help swedish, !help german, !help support, !help faq"
} elseif {[lindex $text 1] == "german"} {
puthelp "PRIVMSG $nick :German stuff"
#This is where german text would be
} elseif {[lindex $text 1] == "swedish"} {
puthelp "PRIVMSG $nick :Swedish stuff"
#this is where swedish text would be
} elseif {[lindex $text 1] == "faq"} {
if {[lindex $text 2] == ""} {
#here you can make subcategories for "faq" questions
puthelp "PRIVMSG $nick :Please pick a category:"
puthelp "PRIVMSG $nick :!help faq 1 - Category 1 stuff"
puthelp "PRIVMSG $nick :!help faq 2 - Category 2 stuff"
} elseif {[lindex $text 2] == "1"} {
puthelp "PRIVMSG $nick :FAQ Category 1 answers here"
} elseif {[lindex $text 2] == "2"} {
puthelp "PRIVMSG $nick :FAQ Category 2 answers"
}
}
}
|
Last edited by Flomsen on Tue Sep 19, 2006 7:41 am; edited 1 time in total |
|
| Back to top |
|
 |
r0t3n Owner
Joined: 31 May 2005 Posts: 507 Location: UK
|
Posted: Tue Sep 19, 2006 7:11 am Post subject: |
|
|
On selection, hold the 'section' in a var when they select a new selection, then call the variable and go back to the page:
Example:
!help
# Main Interface
!help <topic>
# Info on <topic>
!help <topic2>
set help(goback,$nick) <topic>
# Info on topic2
!help goback
# Info on $help(goback,$nick)
... if you know what i mean... _________________ r0t3n @ #r0t3n @ Quakenet |
|
| Back to top |
|
 |
Flomsen Voice
Joined: 18 Sep 2006 Posts: 5
|
Posted: Tue Sep 19, 2006 8:53 am Post subject: |
|
|
somthing like this ?
| Code: | ####################
bind pub - !help helpstuff
bind msg * german
bind msg * swedish
bind msg * faq
proc helpstuff {nick uhost hand chan text} {
set text [split $text]
if {[lindex $text 0] == ""} {
puthelp "PRIVMSG $nick :This is the default help, in english"
puthelp "PRIVMSG $nick :You can type !help swedish, !help german, !help support, !help faq"
} elseif {[lindex $text 1] == "german"} {
puthelp "PRIVMSG $nick :GERMAN FAQ, select a NR and enter"
puthelp "PRIVMSG $nick :1) "
puthelp "PRIVMSG $nick :2) "
puthelp "PRIVMSG $nick :3) "
} elseif {[lindex $text 1] == "swedish"} {
puthelp "PRIVMSG $nick :SWEDISH FAQ, select a NR and enter"
puthelp "PRIVMSG $nick :1) "
puthelp "PRIVMSG $nick :2) "
puthelp "PRIVMSG $nick :3) "
} elseif {[lindex $text 1] == "faq"} {
puthelp "PRIVMSG $nick :FAQ select a NR and enter"
puthelp "PRIVMSG $nick :1) "
puthelp "PRIVMSG $nick :2) "
puthelp "PRIVMSG $nick :3) "
if {[lindex $text 2] == ""} {
#here you can make subcategories for "faq" questions
puthelp "PRIVMSG $nick :Please pick a category:"
puthelp "PRIVMSG $nick :!help faq 1 - Category 1 stuff"
puthelp "PRIVMSG $nick :!help faq 2 - Category 2 stuff"
} elseif {[lindex $text 2] == "1"} {
puthelp "PRIVMSG $nick :FAQ Category 1 answers here"
} elseif {[lindex $text 2] == "2"} {
puthelp "PRIVMSG $nick :FAQ Category 2 answers"
}
}
} |
|
|
| Back to top |
|
 |
|