| View previous topic :: View next topic |
| Author |
Message |
Besse Voice
Joined: 06 Aug 2007 Posts: 8
|
Posted: Mon Aug 06, 2007 2:54 pm Post subject: Script posting rules one rule at each line |
|
|
Hi a friend have tried to make a script for my eggdrop ( v1.6.18, on Linux 2.6.17-10-generic ) that post some rules when triggered with !rules
| Code: | set chans "#legestuen"
set schelptrigger "!rules"
bind pub - $schelptrigger pub_help
####################
# RULES #
####################
proc schelp { nick } {
putserv "NOTICE $nick :These are the rules for #legestuen:"
putserv "NOTICE $nick :------------------------------------"
putserv "NOTICE $nick :Rules here"
putserv "NOTICE $nick :Rules here"
putserv "NOTICE $nick :------------------------------------"
}
|
but i get this error Tcl error [pub_help]: invalid command name "pub_help"
Can anyone help me pls ?
Regards
Besse
Oooops posted in the wrong forum.. should have been in scripting support sorry  |
|
| Back to top |
|
 |
nml375 Revered One
Joined: 04 Aug 2006 Posts: 2857
|
Posted: Mon Aug 06, 2007 3:36 pm Post subject: |
|
|
You've got different names in the binding and when you define the proc...
| Quote: | bind pub - $schelptrigger pub_help
####################
# RULES #
####################
proc schelp { nick } { |
_________________ NML_375, idling at #eggdrop@IrcNET |
|
| Back to top |
|
 |
awyeah Revered One

Joined: 26 Apr 2004 Posts: 1580 Location: Switzerland
|
Posted: Mon Aug 06, 2007 8:34 pm Post subject: |
|
|
This should do the work for you:
| Code: |
set chans "#legestuen"
set schelptrigger "!rules"
bind pub - $schelptrigger pub_help
proc pub_help {nick uhost hand chan text} {
putserv "NOTICE $nick :These are the rules for $::chans:"
putserv "NOTICE $nick :------------------------------------"
putserv "NOTICE $nick :Rules here"
putserv "NOTICE $nick :Rules here"
putserv "NOTICE $nick :------------------------------------"
}
|
_________________ ·awyeah·
==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
================================== |
|
| Back to top |
|
 |
Besse Voice
Joined: 06 Aug 2007 Posts: 8
|
Posted: Tue Aug 07, 2007 9:28 am Post subject: Script working |
|
|
The script is working now..
Thank you very much for your help  |
|
| Back to top |
|
 |
Elfriede Halfop
Joined: 07 Aug 2007 Posts: 67
|
Posted: Tue Aug 07, 2007 9:43 am Post subject: |
|
|
every second one line ?
how to configure output with a timer ? |
|
| Back to top |
|
 |
Besse Voice
Joined: 06 Aug 2007 Posts: 8
|
Posted: Tue Aug 07, 2007 9:56 am Post subject: msg chan instead of notice |
|
|
| How do i make it msg chan instead of notice ? |
|
| Back to top |
|
 |
Elfriede Halfop
Joined: 07 Aug 2007 Posts: 67
|
Posted: Tue Aug 07, 2007 10:13 am Post subject: |
|
|
| Code: |
putserv "PRIVMSG $Channel :------------------------------------"
|
|
|
| Back to top |
|
 |
Besse Voice
Joined: 06 Aug 2007 Posts: 8
|
Posted: Tue Aug 07, 2007 10:19 am Post subject: |
|
|
Thanks Elfriede  |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue Aug 07, 2007 11:49 am Post subject: |
|
|
In such cases, it would be better to use puthelp instead of putserv. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Besse Voice
Joined: 06 Aug 2007 Posts: 8
|
Posted: Tue Aug 07, 2007 1:40 pm Post subject: putserv or puthelp |
|
|
Sorry, but i'm still a newbie with eggdrops..
What is the differense between putserv and puthelp ? |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
Posted: Tue Aug 07, 2007 2:40 pm Post subject: |
|
|
puthelp uses the slowest Eggdrop queue, after it comes putserv and then putquick. Read Tcl-commands.doc about each. _________________ Follow me on GitHub
- Opposing
Public Tcl scripts |
|
| Back to top |
|
 |
Elfriede Halfop
Joined: 07 Aug 2007 Posts: 67
|
Posted: Thu Aug 09, 2007 5:35 pm Post subject: |
|
|
| Quote: |
putserv "NOTICE $nick :These are the rules for $::chans:"
putserv "NOTICE $nick :------------------------------------"
putserv "NOTICE $nick :Rules here"
putserv "NOTICE $nick :Rules here"
putserv "NOTICE $nick :------------------------------------"
}
|
Can somone plz tell me how i've to change, that each line we'll be posted every 1 second ?  |
|
| Back to top |
|
 |
Alchera Revered One

Joined: 11 Aug 2003 Posts: 3344 Location: Ballarat Victoria, Australia
|
Posted: Thu Aug 09, 2007 7:04 pm Post subject: |
|
|
If I am not mistaken, and you actually have tested this, it already does what you want; one line per second. _________________ Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM |
|
| Back to top |
|
 |
Sir_Fz Revered One

Joined: 27 Apr 2003 Posts: 3793 Location: Lebanon
|
|
| Back to top |
|
 |
|