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.
Old posts that have not been replied to for several years.
-
EmOuBi
- Voice
- Posts: 9
- Joined: Wed Nov 24, 2004 4:30 pm
Post
by EmOuBi »
Hi folks
I want to modify one simple script:
Code: Select all
bind pub n !trigger pub_disc
proc pub_disc {nick mask hand channel args} {
global disc
puthelp "PRIVMSG $channel :[lindex $disc [rand [llength $disc]]]"
}
set disc {
"-Dialog1 -Dialog2 -Dialog3 "
"-Aaaa -Bbbb -Cccc"
}
Can anyone make this Dialog1, 2 and 3 to be shown on separate lines ?
Like:
<Botnick>-Dialog1
<Botnick>-Dialog2
<Botnick>-Dialog3
They must be a part of a one quote.
-
spock
- Master
- Posts: 319
- Joined: Thu Dec 12, 2002 8:40 pm
Post
by spock »
Code: Select all
foreach a [split [lindex $disc [rand [llength $disc]]]] { puthelp "PRIVMSG $channel :$a" }
photon?
-
EmOuBi
- Voice
- Posts: 9
- Joined: Wed Nov 24, 2004 4:30 pm
Post
by EmOuBi »
i'm tottaly newbie, where to put this
When I make:
Code: Select all
bind pub n !trigger pub_disc
proc pub_disc {nick mask hand channel args} {
global disc
puthelp "PRIVMSG $channel :[lindex $disc [rand [llength $disc]]]"
foreach a [split [lindex $disc [rand [llength $disc]]]] { puthelp "PRIVMSG $channel :$a" }
}
set disc {
"-Dialog -Dialog2 -Dialog3 "
"-Aaaa -Bbbb -Cccc"
}
The result is:
<me>!trigger
<botnick> -Aaaa -Bbbb -Cccc
<botnick> -Aaaa
<botnick> -Bbbb
<botnick> -Cccc
<me>!trigger
<botnick> -Aaaa -Bbbb -Cccc
<botnick> -Dialog
<botnick> -Dialog2
<botnick> -Dialog3