egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Trigger lost

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help
View previous topic :: View next topic  
Author Message
Flomsen
Voice


Joined: 18 Sep 2006
Posts: 5

PostPosted: Mon Sep 18, 2006 5:23 pm    Post subject: Trigger lost Reply with quote

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 Crying or Very sad

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
View user's profile Send private message
Alchera
Revered One


Joined: 11 Aug 2003
Posts: 3344
Location: Ballarat Victoria, Australia

PostPosted: Mon Sep 18, 2006 6:01 pm    Post subject: Reply with quote

Change all references to '#MYCHANNEL' to your actual channel name and rehash the bot. In main simply type !help (as stated in the script). Razz
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
View user's profile Send private message Visit poster's website
Flomsen
Voice


Joined: 18 Sep 2006
Posts: 5

PostPosted: Mon Sep 18, 2006 6:23 pm    Post subject: Reply with quote

yes i now about that, is not what im search after
Back to top
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Mon Sep 18, 2006 7:11 pm    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
metroid
Owner


Joined: 16 Jun 2004
Posts: 771

PostPosted: Tue Sep 19, 2006 3:19 am    Post subject: Reply with quote

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 Wink
Back to top
View user's profile Send private message
Flomsen
Voice


Joined: 18 Sep 2006
Posts: 5

PostPosted: Tue Sep 19, 2006 3:48 am    Post subject: Reply with quote

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 Wink


Ok, i guess i need to find a new solution Embarassed
Back to top
View user's profile Send private message
rosc2112
Revered One


Joined: 19 Feb 2006
Posts: 1454
Location: Northeast Pennsylvania

PostPosted: Tue Sep 19, 2006 5:35 am    Post subject: Reply with quote

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 Smile
Back to top
View user's profile Send private message
Flomsen
Voice


Joined: 18 Sep 2006
Posts: 5

PostPosted: Tue Sep 19, 2006 7:02 am    Post subject: Reply with quote

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
View user's profile Send private message
r0t3n
Owner


Joined: 31 May 2005
Posts: 507
Location: UK

PostPosted: Tue Sep 19, 2006 7:11 am    Post subject: Reply with quote

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
View user's profile Send private message MSN Messenger
Flomsen
Voice


Joined: 18 Sep 2006
Posts: 5

PostPosted: Tue Sep 19, 2006 8:53 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Scripting Help All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber