mIRC Homepage
Posted By: Forgotten00 Idle Msg -- 30 Minute Interval - 27/04/05 11:20 PM
How do I make it that I display a msg every 30 minutes in all open channels?

and how do I make it so I can turn the Idle Msg on or off? *remotely or Client-Based*

Thankies!
Posted By: SladeKraven Re: Idle Msg -- 30 Minute Interval - 27/04/05 11:26 PM
Initiate:

/timerIdleMsg 0 1800 /amsg <Message here>

Stop:

/timerIdleMsg off
Posted By: Forgotten00 Re: Idle Msg -- 30 Minute Interval - 27/04/05 11:46 PM
so, say, I wanted it to be remotly managed... do I do this?

Under Remote:
on *:TEXT:!idle-on:#: { /timerIdleMsg 0 1800 /wa }
on *:TEXT:!idle-off:#: { /timerIdleMsg 0 1800 off }

Under Aliases:
/idle-on /timerIdleMsg 0 1800 /wa
/idle-off /timerIdleMsg 0 1800 off


And this repeats every 30 minutes? ( /wa is an alias )
Posted By: SladeKraven Re: Idle Msg -- 30 Minute Interval - 28/04/05 12:04 AM
Code:
on *:TEXT:!idle *:#: { 
  if ($2 == on) idlemsg on /wa
  if ($2 == off) idlemsg off
}

alias idlemsg {
  if ($1 == on) { .timeridlemsg 0 5 $$2- }
  if ($1 == off) { .timeridlemsg off }
}


Remotely:
Triggers:
!idle on - Turns it on
!idle off - Turns it off

From your client:

/idle on Commands.

Example: /idle on amsg Moooo!

/idle off.

-Andy
Posted By: Forgotten00 Re: Idle Msg -- 30 Minute Interval - 28/04/05 12:07 AM
you, sir, are an amazing man. Every post I see is answered by you!

Thanks! it works and congrats on the 2000 post marker!

*gives andy a cookie*
Posted By: SladeKraven Re: Idle Msg -- 30 Minute Interval - 28/04/05 12:10 AM
Hehe, thank you and you're welcome.

PS. I'll have that cookie when I move to Alberta, Calgary next month on the 28th. smile
Posted By: Forgotten00 Re: Idle Msg -- 30 Minute Interval - 28/04/05 12:32 AM
heh, jsut one final pesy question:

Code:
on *:TEXT:!winamp:#: { /dde mplug announce }
on *:TEXT:!idle *:#: { 
  if ($2 == on) idlemsg on /wa
  if ($2 == off) idlemsg off
}

alias idlemsg {
  if ($1 == on) { .timeridlemsg 0 1800 $$2- }
  if ($1 == off) { .timeridlemsg off }


how do I announce that the idle is on when !idle on is typed and announce that the idle is off when !idle off is typed, instead of it repeating every 30 minutes? Do I add
Code:
on *:TEXT:!idle on:#: { /msg $chan Idle Enabled }
; then
on *:TEXT:!idle off:#: { /msg $chan Idle Disabled }

; this code is added after the other code
Post deleted by SladeKraven
Posted By: Forgotten00 Re: Idle Msg -- 30 Minute Interval - 28/04/05 01:37 AM
New Code, the !idle rmain won't work. what now?

Code:
on *:TEXT:!winamp:#: { /dde mplug announce }
on *:TEXT:!idle *:#: { 
  if ($2 == on) {
    if (%idlemsg == on) { msg $chan Already enabled. | halt }
    idlemsg on /wa
    set %idlemsg on
    msg $chan Enabled.
  }
  if ($2 == off) { 
    if (%idlemsg == off) { msg $chan Already disabled. | halt }
    idlemsg off
    set %idlemsg off
    msg $chan Disabled.
  }
  if ($2 == rmain) {
    if (%idlemsg == on) { msg $chan Time Remaining: $duration($timer(idlemsg).secs) }
    if (%idlemsg == off) { msg $chan Idle Msg is turned off }
  }

  alias idlemsg {
    if ($1 == on) { .timeridlemsg 0 1800 $$2- }
    if ($1 == off) { .timeridlemsg off }
  }


it will just display Time Remaining:
Post deleted by SladeKraven
Posted By: Forgotten00 Re: Idle Msg -- 30 Minute Interval - 28/04/05 01:58 AM
ok, say if my bot was focused looking in a channel, how do I make it respond in the channel the user typed the trigger?
Posted By: Doqnach Re: Idle Msg -- 30 Minute Interval - 28/04/05 07:52 AM
$chan will refer to the channel the event triggerd from
Posted By: SladeKraven Re: Idle Msg -- 30 Minute Interval - 28/04/05 08:03 AM
Hey Doqnach, it was to do with the !winamp trigger, I'm not too sure how the plugin works but thats what was throwing it off. I'm not sure if it was messaging the first channel in the switchbar or.. But it was the plugin that was messaging Channel B, not Channel A. smile
Posted By: Doqnach Re: Idle Msg -- 30 Minute Interval - 28/04/05 08:34 AM
ow sorry :-P
© mIRC Discussion Forums