mIRC Home    About    Download    Register    News    Help

Print Thread
#163528 31/10/06 09:24 PM
Joined: Oct 2006
Posts: 23
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Oct 2006
Posts: 23
about one month ago i asked for help with a timer script, I would now want to improve it a bit further

Code:
on *:start: {

  .timereen-mas 0:01 1 130 checkdate
}
alias checkdate {

  ; check the date has reached the target date, if not, reset timer for tomorrow

  if $date(mmdd) < 0125 {  .timereen-mas -o 0:01 1 130 checkdate }
  else {

    ; the target date has been reached
    ; check if you are an op and able to change topic

    if $me isop #Channelname { topic #channelname 12|| 4happy winter-een-mas! 12|| }

    ; if not recheck in an hour

    else .timereen-mas -o 1 3600 checkdate
  }
}


how can I make so it triggers in every channel that I'm OPed in?

#163529 31/10/06 09:39 PM
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Code:
on *:start: {

  .timereen-mas 0:01 1 130 checkdate
}
alias checkdate {

  ; check the date has reached the target date, if not, reset timer for tomorrow

  if ($date(mmdd) < 0125) {  .timereen-mas -o 0:01 1 130 checkdate }
  else {

    ; the target date has been reached
    ; check if you are an op and able to change topic

    var %scon = $scon(0)
    while (%scon) {
      scon %scon var %cnt = $chan(0)
      while (%cnt) {
        scon %scon if ($me isop $chan(%cnt)) { topic $chan(%cnt) 12|| 4happy winter-een-mas! 12|| }
        dec %cnt
      }
      dec %scon
    }

    ; if not recheck in an hour

    else .timereen-mas -o 1 3600 checkdate
  }
}


That will work on all channels on your current network. You'll need to use scon or scid to make it work across multiple networks. I don't have time to do that right now. Someone else can set that up for you if you need it.

[EDIT]
Ok, I updated it to work on multiple networks... I think. I rarely do cross-network stuff and am I in a bit of a hurry, so perhaps someone can check over my usage of scon. I think it will work, but I could be wrong.

Last edited by Riamus2; 31/10/06 09:48 PM.
#163530 31/10/06 09:46 PM
Joined: Oct 2006
Posts: 23
F
Ameglian cow
OP Offline
Ameglian cow
F
Joined: Oct 2006
Posts: 23
multiple network suport arent needed.

thanks alot smile


Link Copied to Clipboard