mIRC Home    About    Download    Register    News    Help

Print Thread
Kick Counter... #42613 18/08/03 12:22 AM
Joined: Aug 2003
Posts: 8
S
Siren_Myth Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Aug 2003
Posts: 8
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.

Re: Kick Counter... #42614 18/08/03 12:26 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
do you want it channel specific,user specific,or increase on every kick?

Last edited by pheonix; 18/08/03 12:26 AM.

new username: tidy_trax
Re: Kick Counter... #42615 18/08/03 12:32 AM
Joined: Aug 2003
Posts: 8
S
Siren_Myth Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Aug 2003
Posts: 8
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)

Re: Kick Counter... #42616 18/08/03 12:34 AM
Joined: May 2003
Posts: 2,265
P
pheonix Offline
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
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


new username: tidy_trax
Re: Kick Counter... #42617 18/08/03 12:39 AM
Joined: May 2003
Posts: 215
lammkott Offline
Fjord artisan
Offline
Fjord artisan
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]


- Jason
Re: Kick Counter... #42618 18/08/03 12:59 AM
Joined: Aug 2003
Posts: 8
S
Siren_Myth Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Aug 2003
Posts: 8
Alrighty.. thanks guys (or girls) for the help.. if I need anymore help, then I'll ask again... thanks.

Re: Kick Counter... #42619 18/08/03 07:25 AM
Joined: Mar 2003
Posts: 1,271
L
LocutusofBorg Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
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.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
Re: Kick Counter... #42620 18/08/03 08:37 AM
Joined: Dec 2002
Posts: 339
F
FunChatter Offline
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2002
Posts: 339
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

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

Re: Kick Counter... #42622 18/08/03 09:18 AM
Joined: Dec 2002
Posts: 1,321
H
Hammer Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
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]


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
Re: Kick Counter... #42623 18/08/03 11:03 AM
Joined: May 2003
Posts: 215
lammkott Offline
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
I wasn't aware that mIRC actually did that... Thanks for the tip smile


- Jason
Re: Kick Counter... #42624 18/08/03 01:37 PM
Joined: Aug 2003
Posts: 8
S
Siren_Myth Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
S
Joined: Aug 2003
Posts: 8
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

Re: Kick Counter... #42625 18/08/03 07:51 PM
Joined: Dec 2002
Posts: 339
F
FunChatter Offline
Fjord artisan
Offline
Fjord artisan
F
Joined: Dec 2002
Posts: 339
Better small and good than big and messy :P