mIRC Home    About    Download    Register    News    Help

Print Thread
#170588 11/02/07 01:42 PM
D
DuXxXieJ
DuXxXieJ
D
Code:

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



What is wrong with that?:|

#170589 11/02/07 01:58 PM
Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
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
D
DuXxXieJ
DuXxXieJ
D
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
¬¬

#170591 11/02/07 02:20 PM
Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
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
D
DuXxXieJ
DuXxXieJ
D
I wanna count how many i said "ty"

#170593 11/02/07 02:41 PM
Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
Then a simple:

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


Will be sufficient smile

hixxy #170596 11/02/07 02:52 PM
D
DuXxXieJ
DuXxXieJ
D
Yeah cool! Thanks

#170597 11/02/07 02:55 PM
D
DuXxXieJ
DuXxXieJ
D
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?

#170598 11/02/07 02:59 PM
Joined: Sep 2005
Posts: 2,630
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,630
Code:
ON *:KICK:#:{ 
  if ($nick == $me) { inc %kick }
}

hixxy #170599 11/02/07 03:00 PM
D
DuXxXieJ
DuXxXieJ
D
cool smile

#170669 12/02/07 05:48 PM
Joined: Apr 2006
Posts: 399
K
Fjord artisan
Offline
Fjord artisan
K
Joined: Apr 2006
Posts: 399
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 }
}

D
DuXxXieJ
DuXxXieJ
D
Aah, cool. ^_^ Ty.


Link Copied to Clipboard