mIRC Home    About    Download    Register    News    Help

Topic Options
#124300 - 04/07/05 10:32 AM counting :p
sCHuTt Offline
Ameglian cow

Registered: 25/08/04
Posts: 21
I've got this m8 of mine, an he ':p' alot. And I do mean ALOT lol.
Up to the point where it annoys me, now to annoy him back, I'd like some kind of a counter for every time he types ':p'

This possible? cuz the on:TEXT::p thingy kinda whistles up with the :: :S

- sChutt

Top
#124301 - 04/07/05 10:46 AM Re: counting :p
Sleepyfreak Offline
Vogon poet

Registered: 16/05/05
Posts: 106
Loc: Adelaide
i got a starter

Code:
 
on *:TEXT:;p:*:{
  if ($nick == yourmate'snick) {
  and i don't know how to do a counter so ask someone else
  }
}
 
_________________________
and thats the way the scout leader burns

Top
#124302 - 04/07/05 10:47 AM Re: counting :p
Mentality Offline
Planetary brain

Registered: 01/06/03
Posts: 5024
Loc: London, England
Type /set %tongue 0.

You could then use something like this:

on *:text:*:#:{
if ($nick == YourFriend) && (:p isin $1-) {
inc %tongue
}
}


Regards,
_________________________
Mentality/Chris

Top
#124303 - 04/07/05 03:28 PM Re: counting :p
Mpdreamz Offline
Hoopy frood

Registered: 27/04/04
Posts: 759
Loc: Arnhem, The Netherlands
inc creates the variable if it doesnt excist so you dont have to set it before hand
_________________________
$maybe

Top
#124304 - 04/07/05 03:43 PM Re: counting :p
Mentality Offline
Planetary brain

Registered: 01/06/03
Posts: 5024
Loc: London, England
o0o, haven't tried before!

* Mentality hands out cookies when Para isn't looking

Regards,
_________________________
Mentality/Chris

Top
#124305 - 04/07/05 05:24 PM Re: counting :p
IR_n00b Offline
Fjord artisan

Registered: 01/10/04
Posts: 200
Loc: where i am.
this should work:
on *:text:*:#: {
if ($nick == nickname) && ($regex($1-,/:P/gi)) {
var %s = $v1
if (%s) set %smiles $iif(%s == 0,%smiles,$calc(%smiles $+ %s))
}
}

im not sure if u used braclets corectly as i made this on the fly smile

Top
#124306 - 04/07/05 05:43 PM Re: counting :p
FiberOPtics Offline
Hoopy frood

Registered: 05/02/04
Posts: 2019
Loc: Leuven, Belgium
In theory, that variable could already exist, which in turn would give a wrong representation of the value of %tongue.

If %tongue had a non-numerical value, then the inc would do nothing, and if it had, it would increase, whilst we'd want it to be 0 when the script is first started.

Yes, the odds are slim, however, I thought it was justified to tell him to type /set %tongue 0 first for that reason.

Greets
_________________________
Gone.

Top
#124307 - 04/07/05 06:43 PM Re: counting :p
tidy_trax Offline
Hoopy frood

Registered: 02/11/03
Posts: 2327
Code:
on $*:text:/\72p/i:#:{ 
  if ($nick == nickname) {
    if (%tongue !isnum 1-) { set %tongue 0 }
    inc %tongue $count($1-,:p)
  }
}


Edited by tidy_trax (04/07/05 06:45 PM)
_________________________
New username: hixxy

Top
#124308 - 05/07/05 02:33 PM Re: counting :p
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: MA, USA
Just as a side note .... I made a stats script awhile back which allowed you to use a dialog and enter all the types of characters you want to use for smiles, frowns, and laughs, and then it tracks those (along with lines and various other things). That was a long time ago, so it could probably be improved, but just commenting that if you want to track multiple types of smiles as well as tracking frowns and laughs and whatever else, you might consider creating a dialog for entering the types you want to track.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top