mIRC Home    About    Download    Register    News    Help

Print Thread
#42613 18/08/03 12:22 AM
S
Siren_Myth
Siren_Myth
S
How can I make a kick counter? I know how to do the kick part.. but I can never figure out the counter part.. I want to make a kick script where it counts how many kicks were done... please help.

#42614 18/08/03 12:26 AM
P
pheonix
pheonix
P
do you want it channel specific,user specific,or increase on every kick?

Last edited by pheonix; 18/08/03 12:26 AM.
#42615 18/08/03 12:32 AM
S
Siren_Myth
Siren_Myth
S
Umm.. i believe I was specific enough sorry.. like i said.. a kick script where it counts how many times i kicked some1... if i wanted too.. i could do the channel/user specific stuff.. but i cant figure out HOW in the world where i can make the script count how many users i kicked using the script. confused for example: *18:29:10* * ChocoBokoBot was kicked by Siren (Reason here - This was Kick #number)

#42616 18/08/03 12:34 AM
P
pheonix
pheonix
P
on *:KICK:#:{
if ($nick == $me) && ($knick != $me) {
$iif(!%kick.count,set %kick.count 1,inc %kick.count 1)
}
}
then add
i have kicked: %kick.count users
to your kick messages

#42617 18/08/03 12:39 AM
Joined: May 2003
Posts: 215
L
Fjord artisan
Offline
Fjord artisan
L
Joined: May 2003
Posts: 215
Write a simple alias that sets a variable containing the number of times that alias has been used...

Code:
alias _kick {
  ;this will check whether the counter has started or not
  if (%kcount == $null) { set %kcount 1 }
  ;if the counter has started, this will increase the count
  else { inc %kcount }
  ;this will perform the kick adding the count to the end
  kick $1- - This was kick number %kcount
}

Usage: /_kick <#channel> <NickName> [reason]

#42618 18/08/03 12:59 AM
S
Siren_Myth
Siren_Myth
S
Alrighty.. thanks guys (or girls) for the help.. if I need anymore help, then I'll ask again... thanks.

#42619 18/08/03 07:25 AM
Joined: Mar 2003
Posts: 1,256
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,256
I'm just curious about the complex construction in those two codes for checking if %count already exist.

on *:KICK:#: inc %count

will works just as well, since if %count does not exist yet, mIRC will create it and initialize it at the value 1.

#42620 18/08/03 08:37 AM
Joined: Dec 2002
Posts: 334
F
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2002
Posts: 334
Code:
kick { inc %kicks 1 | raw -q kick $1 $2 : $+ $3- Kicks: %kicks }

in aliases this will not only count all the kicks but add the "Kicks: Xxx" in all the kicks you do auto wink

#42621 18/08/03 08:59 AM
Joined: Dec 2002
Posts: 3,534
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,534
and also overwrite the /kick alias.

#42622 18/08/03 09:18 AM
Joined: Dec 2002
Posts: 1,253
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,253
on me:*:KICK:#: inc %kick.counter
alias k if $me isop $$chan && $$1 ison $chan { .raw $+(KICK $chan $1 :,$2- [Kicks: %kick.counter,]) }

/k <nick> [reason]

#42623 18/08/03 11:03 AM
Joined: May 2003
Posts: 215
L
Fjord artisan
Offline
Fjord artisan
L
Joined: May 2003
Posts: 215
I wasn't aware that mIRC actually did that... Thanks for the tip smile

#42624 18/08/03 01:37 PM
S
Siren_Myth
Siren_Myth
S
i like it a little complex... and besides.. pheonix's and lamkott's codes werent complex... its actually easier to understand and stuff.. but stupid me didnt think about the /inc command lol... crazy frown

#42625 18/08/03 07:51 PM
Joined: Dec 2002
Posts: 334
F
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2002
Posts: 334
Better small and good than big and messy :P


Link Copied to Clipboard