mIRC Home    About    Download    Register    News    Help

Print Thread
Adding a timer doesnt work out #246185 27/05/14 01:01 AM
Joined: Apr 2014
Posts: 13
T
Tarekhere Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: Apr 2014
Posts: 13
Hello again

Code:
on admin:TEXT:.fn*:#:{
  var %a = 1, %b = 0, %c = $ticks
  msg # 1User List Scan Started..
  while ($read(users.txt,w,$+(*,$2-,*),%a)) {
    timer 1 2 msg # $v1
    var %a $calc($readn + 1)
    inc %b
  }
  timer 1 1 msg # 1 %b $iif(%b = 1,user found,users found) 01 $calc(($ticks - %c) / 1000) Secs.
}


what im trying to achieve here is a timer between each message which is 1 second, so it post each entry found after 1 second, cuz my problem is it does like that

[03:46] @ Support *!*@791375.C50C01.521AF4.B19DD4 jaguare
[03:46] @ Support *!*@791375.C50C01.521AF4.D213F3 hot26m
[03:46] @ Support *!*@791375.C50C01.521AF4.EB7107 Guest-M-tseuG
[03:46] @ Support *!*@791375.C50C01.521AF4.B19DD4 jaguare
[03:46] @ Support *!*@791375.C50C01.521AF4.B19DD4 jaguare
[03:46] @ Support *!*@791375.C50C01.521AF4.EB7107 Lebanese-M-25
[03:46] @ Support *!*@791375.C50C01.521AF4.EC1525 zeh2enehhh
[03:46] Quit Support EDM@3C71E4.66C05F.0AA898.86D33A Excess Flood

it quits with excess flood.

that timer delays only the first message, i want a delay between each entry.

thats what I have in users.txt also if it will help

*!*@5C10BC.98E9DD.B08A14.8C1B87 Guest_240
*!*@E9EA8C.380BD4.A9AC9A.4836CC Guest_599
*!*@D66EC4.6428D5.00D545.F2CFA5 UK
*!*@B68F5E.29B33D.744ECD.B9422C Star
*!*@350CE3.86AED3.456090.877DFA lila
*!*@AF8F62.539A77.D5BDDE.D94725 Guest_668

------------

Thanks for help in advance.

Re: Adding a timer doesnt work out [Re: Tarekhere] #246186 27/05/14 02:03 AM
Joined: Jan 2004
Posts: 1,327
L
Loki12583 Offline
Hoopy frood
Offline
Hoopy frood
L
Joined: Jan 2004
Posts: 1,327
Then you need to increase the delay of the timer instead of staring 10 timers all to go off in two seconds. Use $calc(2 * %b) or something

Re: Adding a timer doesnt work out [Re: Loki12583] #246194 27/05/14 08:52 AM
Joined: Apr 2014
Posts: 13
T
Tarekhere Offline OP
Pikka bird
OP Offline
Pikka bird
T
Joined: Apr 2014
Posts: 13
no idea how 2 do that !! can u help me out ?

Re: Adding a timer doesnt work out [Re: Tarekhere] #246196 27/05/14 08:57 AM
Joined: Apr 2014
Posts: 191
B
blessing Offline
Vogon poet
Offline
Vogon poet
B
Joined: Apr 2014
Posts: 191
timer 1 $calc(2 * %b) msg # $v1