| View previous topic :: View next topic |
| Author |
Message |
wiiguy Voice
Joined: 30 Nov 2007 Posts: 9
|
Posted: Fri Nov 30, 2007 3:36 pm Post subject: trigger script |
|
|
i dont know much about tcl so thats why i will request my script here
i need a script where you can add triggers for in a public channel.
for instance if i say "!command" it will say
"type .commands for the commands"
"type .8ball + quistion if you want a answer"
i liek it so that i can add the triggers just over irc instead each time editting a file
thnx for your time |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Fri Nov 30, 2007 5:02 pm Post subject: |
|
|
Not gonna bother making it add crap by the console, but here is a basic outline of a helpfile:
| Code: |
bind pub - !trigger triggerproc
proc triggerproc {name uhost hand chan text} {
puthelp "PRIVMSG $chan :This is your help text"
# etc whatever else you want
}
|
|
|
| Back to top |
|
 |
wiiguy Voice
Joined: 30 Nov 2007 Posts: 9
|
Posted: Mon Dec 03, 2007 7:23 am Post subject: |
|
|
thnx rosc2112 but i really need this
so people who want to help pls help if you dont want too its ok
i still want to request the script that can do those thing
and i have a example of what i want
i want that only half-ops or higher can add triggers
like this
!addtrigger [stats] [channel] [trigger] [msg] <---only operators or higher should see this the message that comes from this trigger
!delltrigger [channel] [trigger]
and as default they would use the !help trigger where all triggers would be listed for that channel where they use that !help trigger
[trigger] would be like hello and when they type !hello they would get the message they have entered trough notice
[channel] where they can use the trigger
[stats] if [stats] = +o then only the opperaotors or higher would see and use or [stats] = +v only voiced or higher people would use it or if [stats] = - then everyone in the channel is allowed to use it
and all those triggers should be seen in a notice and not in the channel or private
so if anyone can make this i would apprectiat it
thanks for your time reading this |
|
| Back to top |
|
 |
PisangGoreng Voice
Joined: 10 Dec 2007 Posts: 35 Location: Malaysia
|
Posted: Mon Dec 10, 2007 9:39 am Post subject: |
|
|
| rosc2112 wrote: | Not gonna bother making it add crap by the console, but here is a basic outline of a helpfile:
| Code: |
bind pub - !trigger triggerproc
proc triggerproc {name uhost hand chan text} {
puthelp "PRIVMSG $chan :This is your help text"
# etc whatever else you want
}
|
|
proc triggerproc {name uhost hand chan text} {
puthelp "PRIVMSG $chan :This is your help text"
# etc whatever else you want
}
can give example of that tcl.. name uhost hand chan text
what i should put at there.. me still new |
|
| Back to top |
|
 |
YooHoo Owner

Joined: 13 Feb 2003 Posts: 939 Location: Redwood Coast
|
Posted: Mon Dec 10, 2007 10:05 am Post subject: |
|
|
rosc2112 already gave you this example, you just alter the code to fit your needs. Here, I will make this into a simplistic script that makes the bot say hello to you using the command !hello:
| Code: | bind pub - !hello helloproc
proc helloproc {name uhost hand chan text} {
puthelp "PRIVMSG $chan :Hello"
} |
_________________
Johoho's TCL for beginners
 |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Mon Dec 10, 2007 7:06 pm Post subject: |
|
|
| rosc2112 wrote: |
| Code: |
bind pub - !trigger triggerproc
proc triggerproc {name uhost hand chan text} {
puthelp "PRIVMSG $chan :This is your help text"
# etc whatever else you want
}
|
|
| PisangGoreng wrote: |
can give example of that tcl.. name uhost hand chan text
what i should put at there.. me still new |
That IS the example... Try reading the tcl-commands.doc that comes with eggdrop, under the BINDS section, particular bind PUB.
"name uhost hand chan text" are the 5 variables that pub binds require in the proc they call. |
|
| Back to top |
|
 |
PisangGoreng Voice
Joined: 10 Dec 2007 Posts: 35 Location: Malaysia
|
Posted: Tue Dec 11, 2007 8:58 am Post subject: |
|
|
it post in chan la..
can it put on private msg ?
how to do like this
trigger available:
!bnc !psybnc !eggdrop !shell !ircd !shoutcast
!addon !vhost !payment !bank !contact
* please type the triggers in public channel
:end of trigger
many line.. |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Tue Dec 11, 2007 10:17 am Post subject: |
|
|
| Read the documentation. puthelp "PRIVMSG $nick :" is the usual way to send stuff to privmsg. |
|
| Back to top |
|
 |
PisangGoreng Voice
Joined: 10 Dec 2007 Posts: 35 Location: Malaysia
|
Posted: Tue Dec 11, 2007 11:00 am Post subject: |
|
|
| okie tengs.. |
|
| Back to top |
|
 |
PisangGoreng Voice
Joined: 10 Dec 2007 Posts: 35 Location: Malaysia
|
Posted: Tue Dec 11, 2007 11:22 am Post subject: |
|
|
proc menuproc {name uhost hand chan text} {
puthelp "PRIVMSG $nick :trigger available"
puthelp "PRIVMSG $nick :!bnc !psybnc !eggdrop !shell !ircd !shoutcast"
puthelp "PRIVMSG $nick :!addon !vhost !payment !bank !contact"
puthelp "PRIVMSG $nick :* please type the triggers in public channel"
Tcl error [menuproc]: can't read "nick": no such variable
huh..
why? |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Tue Dec 11, 2007 4:40 pm Post subject: |
|
|
| PisangGoreng wrote: | proc menuproc {name uhost hand chan text} {
puthelp "PRIVMSG $nick :trigger available"
puthelp "PRIVMSG $nick :!bnc !psybnc !eggdrop !shell !ircd !shoutcast"
puthelp "PRIVMSG $nick :!addon !vhost !payment !bank !contact"
puthelp "PRIVMSG $nick :* please type the triggers in public channel"
Tcl error [menuproc]: can't read "nick": no such variable
huh..
why? |
Try READING!
| Quote: | | proc menuproc {name uhost hand chan text} |
_________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
PisangGoreng Voice
Joined: 10 Dec 2007 Posts: 35 Location: Malaysia
|
Posted: Tue Dec 11, 2007 6:56 pm Post subject: |
|
|
| i dont get it .. |
|
| Back to top |
|
 |
YooHoo Owner

Joined: 13 Feb 2003 Posts: 939 Location: Redwood Coast
|
Posted: Tue Dec 11, 2007 8:52 pm Post subject: |
|
|
| PisangGoreng wrote: | | i dont get it .. | Because you are not paying attention to what we are trying to tell you. This procedure will spit out text when triggered with the command !triggers:
| Code: | bind pub -|- !triggers menuproc
proc menuproc {n u h c t} {
puthelp "PRIVMSG $n :trigger available"
puthelp "PRIVMSG $n :!bnc !psybnc !eggdrop !shell !ircd !shoutcast"
puthelp "PRIVMSG $n :!addon !vhost !payment !bank !contact"
puthelp "PRIVMSG $n :* please type the triggers in public channel"
} | maybe now you will understand how to make a pub proc... _________________
Johoho's TCL for beginners
 |
|
| Back to top |
|
 |
rosc2112 Revered One

Joined: 19 Feb 2006 Posts: 1454 Location: Northeast Pennsylvania
|
Posted: Tue Dec 11, 2007 9:49 pm Post subject: |
|
|
| PisangGoreng wrote: | proc menuproc {name uhost hand chan text} {
puthelp "PRIVMSG $nick :trigger available"
puthelp "PRIVMSG $nick :!bnc !psybnc !eggdrop !shell !ircd !shoutcast"
puthelp "PRIVMSG $nick :!addon !vhost !payment !bank !contact"
puthelp "PRIVMSG $nick :* please type the triggers in public channel"
Tcl error [menuproc]: can't read "nick": no such variable
huh..
why? |
Yer using $name not $nick in your proc..... Read the documentation..Last time.. |
|
| Back to top |
|
 |
PisangGoreng Voice
Joined: 10 Dec 2007 Posts: 35 Location: Malaysia
|
Posted: Tue Dec 11, 2007 9:57 pm Post subject: |
|
|
Oke..
I get it...
Thx For all your support..
i'm new..
i dont know..  |
|
| Back to top |
|
 |
|