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 script

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
w
wiiguy
Voice
Posts: 9
Joined: Fri Nov 30, 2007 3:30 pm

trigger script

Post by wiiguy »

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

Post by rosc2112 »

Not gonna bother making it add crap by the console, but here is a basic outline of a helpfile:

Code: Select all

bind pub - !trigger triggerproc

proc triggerproc {name uhost hand chan text} {
        puthelp "PRIVMSG $chan :This is your help text"
        # etc whatever else you want
}
w
wiiguy
Voice
Posts: 9
Joined: Fri Nov 30, 2007 3:30 pm

Post by wiiguy »

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
P
PisangGoreng
Voice
Posts: 35
Joined: Mon Dec 10, 2007 9:19 am
Location: Malaysia
Contact:

Post by PisangGoreng »

rosc2112 wrote:Not gonna bother making it add crap by the console, but here is a basic outline of a helpfile:

Code: Select all

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
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

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

bind pub - !hello helloproc

proc helloproc {name uhost hand chan text} {
        puthelp "PRIVMSG $chan :Hello"
} 
User avatar
rosc2112
Revered One
Posts: 1454
Joined: Sun Feb 19, 2006 8:36 pm
Location: Northeast Pennsylvania

Post by rosc2112 »

rosc2112 wrote:

Code: Select all

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.
P
PisangGoreng
Voice
Posts: 35
Joined: Mon Dec 10, 2007 9:19 am
Location: Malaysia
Contact:

Post by PisangGoreng »

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

Post by rosc2112 »

Read the documentation. puthelp "PRIVMSG $nick :" is the usual way to send stuff to privmsg.
P
PisangGoreng
Voice
Posts: 35
Joined: Mon Dec 10, 2007 9:19 am
Location: Malaysia
Contact:

Post by PisangGoreng »

okie tengs..
P
PisangGoreng
Voice
Posts: 35
Joined: Mon Dec 10, 2007 9:19 am
Location: Malaysia
Contact:

Post by PisangGoreng »

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

Post by Alchera »

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!
proc menuproc {name uhost hand chan text}
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
P
PisangGoreng
Voice
Posts: 35
Joined: Mon Dec 10, 2007 9:19 am
Location: Malaysia
Contact:

Post by PisangGoreng »

i dont get it ..
User avatar
YooHoo
Owner
Posts: 939
Joined: Thu Feb 13, 2003 10:07 pm
Location: Redwood Coast

Post by YooHoo »

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

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

Post by rosc2112 »

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..
P
PisangGoreng
Voice
Posts: 35
Joined: Mon Dec 10, 2007 9:19 am
Location: Malaysia
Contact:

Post by PisangGoreng »

Oke..
I get it...
Thx For all your support..
i'm new..
i dont know.. :( :(
Post Reply