|
Joined: Apr 2005
Posts: 64
Babel fish
|
OP
Babel fish
Joined: Apr 2005
Posts: 64 |
Hi, I'm building a rip-off of the fishbot on Qnet for my own network in msl. Now I got one problem. It saves the nick who requested, but I can't let it see. on *:invite:*: {
if (%invitebot == on) { join $chan | set %invite $+ [ $chan ] $nick | describe $chan greets %invite $+ [ $chan ] }
elseif (%invitebot == off) { notice $nick Sorry, but invite is currently off. }
}
What is wrong by "describe $chan greets %invite ..."
|
|
|
|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 759 |
on *:invite:*: {
if (%invitebot == on) { join $chan | set $+(%,invite,$chan) $nick | describe $chan greets $($+(%,invite,$chan),2) }
elseif (%invitebot == off) { notice $nick Sorry, but invite is currently off. }
}
I always find using $+ for dynamic vars is less of a headache and easier to quickly type out.
$maybe
|
|
|
|
Joined: Apr 2005
Posts: 64
Babel fish
|
OP
Babel fish
Joined: Apr 2005
Posts: 64 |
on *:invite:*: {
if (%invitebot == on) { join $chan | set $+(%,invite,$chan) $nick | describe $chan greets $($+(%,invite,$chan),2) }
elseif (%invitebot == off) { notice $nick Sorry, but invite is currently off. }
}
I always find using $+ for dynamic vars is less of a headache and easier to quickly type out. Dank! My next problem: on *:part:#: {
inc $+(%,partcount,$chan)
timer2 1 5 unset $+(%,partcount,$chan)
if ($($+(%,invite,$chan),2) > 2) { msg $chan ffs you let them get away!! >:( }
} It msg's more then once. Every one who parts, gets a msg "ffs you let them get away!! >:(". It only needs to be msg'd once.
|
|
|
|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 759 |
on me:^*:part:#: {
inc $+(%,partcount,$chan)
.timer2 1 5 unset $+(%,partcount,$chan)
if ($($+(%,invite,$chan),2) > 2) { msg $chan ffs you let them get away!! >:( }
}
you can use on me:*:<EVENT> to trigger events ONLY when you trigger them. I also silenced the timer command by prefixing it with a dot. Seeing those Timer started & Timer halted will get quite annoying i also used ^* as the level, the ^ makes it do whatever commands you put before the commands mIRC does internally.
$maybe
|
|
|
|
Joined: Apr 2005
Posts: 64
Babel fish
|
OP
Babel fish
Joined: Apr 2005
Posts: 64 |
I want that message when there is a mass part. (Part with 2 or more in 5 secs)
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
on me:^*:part:#: {
inc $+(%,partcount,$chan)
.timer.unset.partcount. $+ $chan 1 5 unset $+(%,partcount,$chan)
if ($($+(%,partcount,$chan),2) == 2) { msg $chan ffs you let them get away!! >:( }
} * i replaced the timer name "2" with a real timer name, since using numbers is thundermentally wrong. * i corrected the var used in the IF to be %partcount $chanBy only displaying on == 2 it well display once on second part in 5 seconds only.
|
|
|
|
Joined: Apr 2004
Posts: 759
Hoopy frood
|
Hoopy frood
Joined: Apr 2004
Posts: 759 |
on *:part:#: {
inc $+(%,partcount,$chan)
.timer.unset.partcount. $+ $chan 1 5 unset $+(%,partcount,$chan)
if ($($+(%,partcount,$chan),2) == 2) { msg $chan ffs you let them get away!! >:( }
}
the me:^ wasnt needed either :P
$maybe
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
doh! to right, unless of course your trying to catch ya self flood /HOPing the channel :-)
|
|
|
|
|