mIRC Home    About    Download    Register    News    Help

Print Thread
#170588 11/02/07 01:42 PM
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
Code:

ON *:TEXT:*ty*:#:{
  if $nick == $me {
 set %ty 1
}
  Else {
 inc %ty
}



What is wrong with that?:|


Squee whenever a squee squee's. Squee whenever a squee does not squee.
DuXxXieJ #170589 11/02/07 01:58 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
You're missing a closing bracket at the end, and on TEXT will never trigger for your own messages. Try this:

Code:
on *:input:#:{
  if (*ty* iswm $1-) { set %ty 1 }
}
on *:text:*ty*:#:{ inc %ty }

hixxy #170590 11/02/07 02:05 PM
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
That doesn't work.
Cause if i say 1 time ty. It does %ty 1
if i say 2 ty's in a line it does %ty 2
but do i AGAIN 1 ty it does %ty 1
¬¬


Squee whenever a squee squee's. Squee whenever a squee does not squee.
DuXxXieJ #170591 11/02/07 02:20 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
This script does exactly what your original script was trying to do. Perhaps if you explain what you want to do I'll be able to help you..

hixxy #170592 11/02/07 02:39 PM
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
I wanna count how many i said "ty"


Squee whenever a squee squee's. Squee whenever a squee does not squee.
DuXxXieJ #170593 11/02/07 02:41 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Then a simple:

Code:
on *:input:#:{ inc %ty $count($1-,ty) }


Will be sufficient smile

hixxy #170596 11/02/07 02:52 PM
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
Yeah cool! Thanks


Squee whenever a squee squee's. Squee whenever a squee does not squee.
DuXxXieJ #170597 11/02/07 02:55 PM
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
Can i do that like :

ON *:KICK:#:{ inc %kick $cont($1- == $me} }

or something shocked

If im kicking, i count how many times i kicked?


Squee whenever a squee squee's. Squee whenever a squee does not squee.
DuXxXieJ #170598 11/02/07 02:59 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
Code:
ON *:KICK:#:{ 
  if ($nick == $me) { inc %kick }
}

hixxy #170599 11/02/07 03:00 PM
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
cool smile


Squee whenever a squee squee's. Squee whenever a squee does not squee.
DuXxXieJ #170669 12/02/07 05:48 PM
Joined: Apr 2006
Posts: 400
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 400
DuXxXieJ, I'd suggest using tokens for this one, it will increase the variable even if you say "pretty" or something that has "ty" in it. This will look at your sentence and see if you have "ty" as a word.

Code:
on *:INPUT:#: {
  if ($istok($1-,ty,32)) { inc %ty }
}


-Kurdish_Assass1n
Joined: Jan 2007
Posts: 280
Fjord artisan
OP Offline
Fjord artisan
Joined: Jan 2007
Posts: 280
Aah, cool. ^_^ Ty.


Squee whenever a squee squee's. Squee whenever a squee does not squee.

Link Copied to Clipboard