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.
Kaarel
Halfop
Posts: 91 Joined: Sat Apr 26, 2003 5:24 am
Post
by Kaarel » Mon Jun 02, 2003 5:50 am
I made a script for miRC
Code: Select all
on 1:voice:#:{
if ($nick == $me) { inc %voices }
else { halt }
}
menu channel {
voice
.yourself:/echo You have been given voices %voices times!
.public:/msg $chan I have given voices %voices times!
}
But I would like to know can anybody make that kind of script to bot, I would be nice if in there script will be a kick and ban counter too
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Mon Jun 02, 2003 6:40 am
Code: Select all
set vcount 0
bind mode - "* +v" my:voice
proc my:voice {nick uhost handle channel mode victim} {
global vcount
if {$nick != $::botnick} {
return
}
incr vcount
putserv "PRIVMSG $channel :I have voiced $vcount users!"
}
Once the game is over, the king and the pawn go back in the same box.
Kaarel
Halfop
Posts: 91 Joined: Sat Apr 26, 2003 5:24 am
Post
by Kaarel » Mon Jun 02, 2003 8:08 am
by what trigger I get the number of voices bot has gives
also my bot respond <Botman> [15:06] Tcl error [my:voice]: invalid command name "? " on !vcount
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Mon Jun 02, 2003 10:27 am
Add this code:
Code: Select all
bind pub o !vcount list:vcount
proc list:vcount {nick host handle channel text} {
putserv "PRIVMSG $channel :I have voiced $::vcount users!"
}
and remove the:
Code: Select all
putserv "PRIVMSG $channel :I have voiced $vcount users!"
from the first one.
Once the game is over, the king and the pawn go back in the same box.
Kaarel
Halfop
Posts: 91 Joined: Sat Apr 26, 2003 5:24 am
Post
by Kaarel » Mon Jun 02, 2003 11:07 am
Is that te right code
Code: Select all
set vcount 0
bind mode - "* +v" my:voice
proc my:voice {nick uhost handle channel mode victim} {
global vcount
if {$nick != $::botnick} {
return
}
incr vcount
bind pub o !vcount list:vcount
proc list:vcount {nick host handle channel text} {
putserv "PRIVMSG $channel :I have voiced $::vcount users!"
}
putserv "PRIVMSG $channel :I have voiced $vcount users!"
ReaLz
Op
Posts: 121 Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece
Post
by ReaLz » Mon Jun 02, 2003 11:47 am
remove this at the end:
Code: Select all
putserv "PRIVMSG $channel :I have voiced $vcount users!"
and if you want the bot to display anything about this script when you rehash, add this at the end of the file:
«A fantastic spaghetti is a spaghetti that does not exist»
ReaLz
Op
Posts: 121 Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece
Post
by ReaLz » Mon Jun 02, 2003 11:52 am
and also I noticed that you have mixed the codes...
remove these from the my:voice proc:
Code: Select all
bind pub o !vcount list:vcount
proc list:vcount {nick host handle channel text} {
putserv "PRIVMSG $channel :I have voiced $::vcount users!"
and add them after the my:voice proc.
the code should like this:
Code: Select all
set vcount 0
bind mode - "* +v" my:voice
bind pub o !vcount list:vcount
proc my:voice {nick uhost handle channel mode victim} {
global vcount
if {$nick != $::botnick} {
return
}
incr vcount
}
proc list:vcount {nick host handle channel text} {
putserv "PRIVMSG $channel :I have voiced $::vcount users!"
return 1
}
putlog "Voice counter loaded.."
«A fantastic spaghetti is a spaghetti that does not exist»
Kaarel
Halfop
Posts: 91 Joined: Sat Apr 26, 2003 5:24 am
Post
by Kaarel » Mon Jun 02, 2003 11:58 am
Ok, everything work but when my bot voice somebdy I get this error <Botman> [18:57] Tcl error [my:voice]: invalid command name "? "
What that means
ReaLz
Op
Posts: 121 Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece
Post
by ReaLz » Mon Jun 02, 2003 12:03 pm
did you try the new code that I gave you?
«A fantastic spaghetti is a spaghetti that does not exist»
Kaarel
Halfop
Posts: 91 Joined: Sat Apr 26, 2003 5:24 am
Post
by Kaarel » Mon Jun 02, 2003 12:07 pm
ReaLz wrote: did you try the new code that I gave you?
yes
<Botman> Gave voice to Kaarel on #kaarel
<Botman> [19:06] #kaarel: mode change '+v Kaarel' by Botman!~
Kaarel@213-35-147-242-dsl.prn.estpak.ee
<Botman> [19:06] Tcl error [my:voice]: invalid command name "? "
What I have to do
caesar
Mint Rubber
Posts: 3778 Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory
Post
by caesar » Mon Jun 02, 2003 12:15 pm
I don't see any "?" in the code. Humm.. Have you .rehash'ed it after doing the changes? Also, what version is it?
Once the game is over, the king and the pawn go back in the same box.
Kaarel
Halfop
Posts: 91 Joined: Sat Apr 26, 2003 5:24 am
Post
by Kaarel » Mon Jun 02, 2003 12:21 pm
caesar wrote: I don't see any "?" in the code. Humm.. Have you .rehash'ed it after doing the changes? Also, what version is it?
Yes a rehashed and even restarted the bot
version is Windrop 1.6.13
Can anybody try the same code in his bot, please
ReaLz
Op
Posts: 121 Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece
Post
by ReaLz » Mon Jun 02, 2003 12:29 pm
it works fine here... maybe it's a prob that you use windrop (?)
«A fantastic spaghetti is a spaghetti that does not exist»
MD87
Voice
Posts: 23 Joined: Sat Dec 14, 2002 9:04 am
Location: Leicester, UK
Contact:
Post
by MD87 » Mon Jun 02, 2003 12:34 pm
As a stab in the dark, your bot's name doesn't have [?] in it does it? (or anything similar)
// Edit - pah, should learn to read
Kaarel
Halfop
Posts: 91 Joined: Sat Apr 26, 2003 5:24 am
Post
by Kaarel » Mon Jun 02, 2003 12:40 pm
MD87 wrote: As a stab in the dark, your bot's name doesn't have [?] in it does it? (or anything similar)
// Edit - pah, should learn to read
No it does not have