mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2016
Posts: 1
T
Mostly harmless
OP Offline
Mostly harmless
T
Joined: Jun 2016
Posts: 1
on *:TEXT:!top10:#:{ run_top10 # }
alias run_top10 {
window -h @. | var %i 1
while $ini(points.ini,%i) {
var %n $v1
if ($+(*,$1,*) iswm %n) {
aline @. $gettok($remove(%n,[,]),2,46) $readini(points.ini,%n,points)
}
inc %i
}
filter -cetuww 2 32 @. @.
var %i 1 | while %i <= 10 {
var %list $addtok(%list,$line(@.,%i),44)
inc %i
}
msg $1 Top 10 point are: $replace(%list,$chr(44),$+($chr(44),$chr(32)))
window -c @.
}

Joined: Oct 2003
Posts: 3,918
A
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
One of the simplest ways is to use groups (/help groups) with /enable and /disable.

Example:

Code:
#mygroup on

on *:TEXT:*:#: {
  .disable #mygroup
  .timer 1 5 .enable #mygroup

  ; do your event stuff here
}

#mygroup end


You can do the same with a %variable that gets unset after a certain amount of time (see /set -uN) and an if guard:

Code:
on *:TEXT:*:#: {
  if (%mygroup_disabled) return
  set -u5 %mygroup_disabled $true

  ; do your event stuff here
}


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"

Link Copied to Clipboard