mIRC Home    About    Download    Register    News    Help

Print Thread
#204247 13/09/08 07:18 AM
Joined: Dec 2006
Posts: 39
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2006
Posts: 39
Code:
on ^*:kick:#: {
  if ($nick == $me) { 
    .inc %num-kick 1
    if (!$timerrk) {
      .timerunsetnumkick 1 55 .unset %num-kick
    }
    if (%num-kick > 35) {
      .part #haha
      .unset %num-kick
    }
  }
}
alias randnickick {
  var %count = $nick(#haha, 0, a, o)
  while (%count > 0) {
    var %dn = $nick(#haha, %count, a, o)
    if ($regex(%dn, /^[A-Z][a-z][A-Z][0-9][A-Z]/)) {
      .hinc -u1m e f
      if ($hget(e,f) < 6) {
        if ((%dn !isop #) && ($read(dk.txt,w,%dn))) .kick # %dn 
      }
    }
    dec %count
  }
}


what i need is, i want run randnickick after my first kick thats mean if (%num-kick) .. but randnickick will run after 20 secs after my 1st kick .. then randnickick will be running 6 secs continuous until %num-kick reach 35 or %num-kick been unset after 55secs start from my 1st kick

simulation;
me kick abc from #haha
%num-kick start counting
unset time for %num-kick start
..20 secs after that
me kick AaA1A from #haha
me kick AaA2A from #haha
me kick AaA3A from #haha
me kick AaA4A from #haha
me kick AaA5A from #haha
...if %num-kick < 36 and %num kick ..
6 secs after that
me kick AaA6A from #haha
me kick AaA7A from #haha
me kick AaA8A from #haha
me kick AaA9A from #haha
me kick AaA1B from #haha

and its continues for every 6 secs until %num-kick reset or my kick == 35 .. thxs

Joined: Dec 2006
Posts: 39
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2006
Posts: 39
bump!

Joined: Dec 2006
Posts: 39
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2006
Posts: 39
bump! i really need help here frown

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I thought I had replied to this earlier, but it appears that my post didn't actually take. I'll see if I can find the re-write that I made, and re-post it, or if I can't, the re-write it and post the re-write later today.

RusselB #204692 28/09/08 12:58 PM
Joined: Dec 2006
Posts: 39
S
Ameglian cow
OP Offline
Ameglian cow
S
Joined: Dec 2006
Posts: 39
bump! .. Russel B hopefully you can re write back .. smile .. thanks

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I am no good with regex, although I have tried to learn it, so I haven't included the regex that you had in your original code.
If you want the regex included, which I suspect you will, I think that you'll be able to figure out where in this code it should go.
Code:
on me:*:kick:#:{
  inc %kick_count
  if %kick_count > 35 {
    unset %kick_count
    if $timer(rand_kick) {
      .timerrand_kick off
    }
  }
  else {
    set %kick_nick $knick
    if !$timer(rand_kick) {
      .timerrand_kick 1 14 rand_kick $chan
    }
  }
}
alias -l rand_kick {
  while (%kick_nick == $me) || (%kick_nick !ison $1) {
    set %kick_nick $nick($1,$r(1,$nick($1,0)))
  }
  .kick $1 %kick_nick Random kick
  .timerrand_kick 0 6 rand_kick $1
}
 


Link Copied to Clipboard