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.

Trigger lost

Help for those learning Tcl or writing their own scripts.
Post Reply
F
Flomsen
Voice
Posts: 5
Joined: Mon Sep 18, 2006 5:06 pm

Trigger lost

Post by Flomsen »

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 :cry:

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.
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Change all references to '#MYCHANNEL' to your actual channel name and rehash the bot. In main simply type !help (as stated in the script). :P

Code: Select all

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
F
Flomsen
Voice
Posts: 5
Joined: Mon Sep 18, 2006 5:06 pm

Post by Flomsen »

yes i now about that, is not what im search after
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

Can you possibly explain your problem in more detail, so we know the problem you have.

I suggest you change:

Code: Select all

if {$chan == "#MYCHANNEL"} {
To

Code: Select all

if {[string match -nocase #mychannel $chan]} {
r0t3n @ #r0t3n @ Quakenet
m
metroid
Owner
Posts: 771
Joined: Wed Jun 16, 2004 2:46 am

Post by metroid »

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 ;)
F
Flomsen
Voice
Posts: 5
Joined: Mon Sep 18, 2006 5:06 pm

Post by Flomsen »

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 :oops:
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

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

##########################################################################
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 :)
F
Flomsen
Voice
Posts: 5
Joined: Mon Sep 18, 2006 5:06 pm

Post by Flomsen »

i get this error on !help german

Code: Select all

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

########################################################################## 
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.
r
r0t3n
Owner
Posts: 507
Joined: Tue May 31, 2005 6:56 pm
Location: UK

Post by r0t3n »

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
F
Flomsen
Voice
Posts: 5
Joined: Mon Sep 18, 2006 5:06 pm

Post by Flomsen »

somthing like this ?

Code: Select all

####################
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" 
                    } 
           } 
} 
Post Reply