mIRC Home    About    Download    Register    News    Help

Print Thread
#111558 16/02/05 09:57 PM
Joined: Sep 2004
Posts: 237
J
JAFO Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Sep 2004
Posts: 237
Is it possible to have a while loop that decreases "/dec -c %var" in a timed increment, in other words have the decrease happen every 5 seconds vs, every second?
I'm using it on a whois for several nicks in a list and when i do a whois on say 5 users in a few seconds ... "Server Load is temporarily too heavy" , so i just need to space out the whois requests.

#111559 16/02/05 10:37 PM
M
mIRCManiac
mIRCManiac
M
Usage: /twhois nick1,nick2,nick3 ...

Code:
alias twhois {
  whois $gettok($1-,1,44)
  var %i = 2,%t = [color:red]5[/color]
  while ($gettok($1-,%i,44) != $null) {
    .timer 1 $calc((%i - 1) * %t) whois $v1
    inc %i
  }
}


Change the 5 to whatever you want.

~ Edit ~
Improved.

Last edited by mIRCManiac; 16/02/05 10:37 PM.
#111560 16/02/05 10:44 PM
D
DaveC
DaveC
D
You can set the value of %var to 5 times what you want, then when it decrements, only take action if its a factor of 5.

For your specific need, I dont really understand how you were going to use that, you cant set that off then loop waiting for it to decrease, becuase it only decreases when your script ends.

This should work for your need...

Code:
alias whoisem {
  var %i = 0
  while ($0) {
    .timer 1 %i whois $1
    inc %i 5
    tokenize 32 $2-
  }
}


just sets off a bunch of timers to do the whois job.

#111561 16/02/05 11:31 PM
Joined: Sep 2004
Posts: 237
J
JAFO Offline OP
Fjord artisan
OP Offline
Fjord artisan
J
Joined: Sep 2004
Posts: 237
Hmm..... i should be a little more specific, theres probably an easier way to do this anyhow.
Code:
   if ($did == 6) { 
    var %n = $numtok($did(5),32))
    while (%n > 0) {
      /whois $gettok($did(5),%n,32)  
      dec -c %n
    }
  } 

Can i use some method other than identifying that theres x tokens in a line then whois token x,then token x-1 and so on till x == 0.

#111562 17/02/05 02:08 AM
D
DaveC
DaveC
D
you can whois a buch of people at once
/whois bob,bill,ted

I dont know if theres a limit I havent checked, might just be a line length limit i dont know

could try

Code:
   if ($did == 6) { whois $replace($did(5),$chr(32),$chr(44)) }


Link Copied to Clipboard