mIRC Home    About    Download    Register    News    Help

Print Thread
#217772 22/01/10 12:21 AM
Joined: Sep 2008
Posts: 37
R
razor32 Offline OP
Ameglian cow
OP Offline
Ameglian cow
R
Joined: Sep 2008
Posts: 37
Hi,

I was looking around for some kind of announcement script that can have a set time to announce in a certain channel.

Like

Quote:
--- Announcement ---
This is a timed announcement
-------------------------------------


I was hoping to find one so I can put in the Red Cross donation link for Haiti so it would send it in my channel.

Just wondering if anyone can help me?

Thanks

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
It amazes me that we all of a sudden care about Haiti, or is it the Dominican Republic. They're situation is caused by poverty and greed.

Anyways, check out the hawkee site.

Joined: Nov 2006
Posts: 1,559
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
Here's a quick scribble with a menu-based setup for a single channel and single-lined announcements.
Code:
menu channel {
  Haiti Announce 
  .$iif($timer(haiti),$style(2),$iif($chan(%haiti.chan),$style(1))) set channel $iif(%haiti.chan,$+([,$v1,])) : {
    set %haiti.chan $input(Enter the channel to announce at:,eog,Set channel,%haiti.chan)
  }
  .$iif($timer(haiti),$style(2),$iif((%haiti.delay isnum 1-),$style(1))) set delay $iif(%haiti.delay,$+([,$duration($v1),])): {
    set %haiti.delay $duration($iif(($input(Enter the announcement delay (e.g. X minutes):,eog,Set delay,$duration(%haiti.delay)) isnum 1-),$! min,$!))
  }
  .$iif($timer(haiti),$style(2),$iif(%haiti.msg,$style(1))) set message $iif(%haiti.msg,$+([,$len($v1) chars,])): {
    set %haiti.msg $input(Enter announcement message:,eog,Set message,%haiti.msg)
  }

  .$iif(!$timer(haiti),$iif(!$chan(%haiti.chan) || (%haiti.delay !isnum 1-) || (!%haiti.msg),$style(2)) start,stop) announcement now : {
    haiti $iif($timer(haiti),stop,start)
  }
}

alias -l haiti {
  if ($1 == stop) {
    .timerhaiti off
    echo -a * Announcement stopped.
  }
  else {
    echo -a * Announcement started (delay: $duration(%haiti.delay) $+ )
    if ($me ison %haiti.chan) { msg $v2 %haiti.msg }
    .timerhaiti 0 %haiti.delay if ( $!me ison % $+ haiti.chan ) msg $!v2 $safe2(%haiti.msg)
  }
}
alias -l safe2 { bset -t &a 1 $1- | return $!regsubex( $bvar(&a,1-) ,/(\d+)(?: |$)/g,$chr(\1)) }

on *:unload: { unset %haiti.* }

If you're looking for more time settings or multiple output lines/output targets, maybe this "radio"-announcer is of help. You have to do some setup in that script (at labeled places) though.

Last edited by Horstl; 22/01/10 02:09 AM.

Link Copied to Clipboard