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 script
Goto page 1, 2  Next
 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
wiiguy
Voice


Joined: 30 Nov 2007
Posts: 9

PostPosted: Fri Nov 30, 2007 3:36 pm    Post subject: trigger script Reply with quote

i dont know much about tcl so thats why i will request my script here Smile

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


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

PostPosted: Fri Nov 30, 2007 5:02 pm    Post subject: Reply with quote

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


Joined: 30 Nov 2007
Posts: 9

PostPosted: Mon Dec 03, 2007 7:23 am    Post subject: Reply with quote

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


Joined: 10 Dec 2007
Posts: 35
Location: Malaysia

PostPosted: Mon Dec 10, 2007 9:39 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Mon Dec 10, 2007 10:05 am    Post subject: Reply with quote

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"
}

_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
rosc2112
Revered One


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

PostPosted: Mon Dec 10, 2007 7:06 pm    Post subject: Reply with quote

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


Joined: 10 Dec 2007
Posts: 35
Location: Malaysia

PostPosted: Tue Dec 11, 2007 8:58 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
rosc2112
Revered One


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

PostPosted: Tue Dec 11, 2007 10:17 am    Post subject: Reply with quote

Read the documentation. puthelp "PRIVMSG $nick :" is the usual way to send stuff to privmsg.
Back to top
View user's profile Send private message
PisangGoreng
Voice


Joined: 10 Dec 2007
Posts: 35
Location: Malaysia

PostPosted: Tue Dec 11, 2007 11:00 am    Post subject: Reply with quote

okie tengs..
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
PisangGoreng
Voice


Joined: 10 Dec 2007
Posts: 35
Location: Malaysia

PostPosted: Tue Dec 11, 2007 11:22 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Alchera
Revered One


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

PostPosted: Tue Dec 11, 2007 4:40 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
PisangGoreng
Voice


Joined: 10 Dec 2007
Posts: 35
Location: Malaysia

PostPosted: Tue Dec 11, 2007 6:56 pm    Post subject: Reply with quote

i dont get it ..
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
YooHoo
Owner


Joined: 13 Feb 2003
Posts: 939
Location: Redwood Coast

PostPosted: Tue Dec 11, 2007 8:52 pm    Post subject: Reply with quote

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...
_________________
Mr. Green
Johoho's TCL for beginners
Mr. Green
Back to top
View user's profile Send private message Send e-mail
rosc2112
Revered One


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

PostPosted: Tue Dec 11, 2007 9:49 pm    Post subject: Reply with quote

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


Joined: 10 Dec 2007
Posts: 35
Location: Malaysia

PostPosted: Tue Dec 11, 2007 9:57 pm    Post subject: Reply with quote

Oke..
I get it...
Thx For all your support..
i'm new..
i dont know.. Sad Sad
Back to top
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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