mIRC Homepage
Posted By: Siren_Myth Kick Counter... - 18/08/03 12:22 AM
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.
Posted By: pheonix Re: Kick Counter... - 18/08/03 12:26 AM
do you want it channel specific,user specific,or increase on every kick?
Posted By: Siren_Myth Re: Kick Counter... - 18/08/03 12:32 AM
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)
Posted By: pheonix Re: Kick Counter... - 18/08/03 12:34 AM
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
Posted By: lammkott Re: Kick Counter... - 18/08/03 12:39 AM
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]
Posted By: Siren_Myth Re: Kick Counter... - 18/08/03 12:59 AM
Alrighty.. thanks guys (or girls) for the help.. if I need anymore help, then I'll ask again... thanks.
Posted By: LocutusofBorg Re: Kick Counter... - 18/08/03 07:25 AM
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.
Posted By: FunChatter Re: Kick Counter... - 18/08/03 08:37 AM
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
Posted By: SladeKraven Re: Kick Counter... - 18/08/03 08:59 AM
and also overwrite the /kick alias.
Posted By: Hammer Re: Kick Counter... - 18/08/03 09:18 AM
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]
Posted By: lammkott Re: Kick Counter... - 18/08/03 11:03 AM
I wasn't aware that mIRC actually did that... Thanks for the tip smile
Posted By: Siren_Myth Re: Kick Counter... - 18/08/03 01:37 PM
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
Posted By: FunChatter Re: Kick Counter... - 18/08/03 07:51 PM
Better small and good than big and messy :P
© mIRC Discussion Forums