mIRC Homepage
Posted By: alkahol1k how to make an idle away? - 28/07/04 04:51 AM
Can I get some help on where I should start ?
Posted By: k1ll3rz Re: how to make an idle away? - 28/07/04 06:27 AM
on ^*:text:*:#:{
set %autoaway on
timerautoaway 300 /autoaway
}

alias autoaway {
//scon -atl ame is away [Reason: Auto Away]
}
on 1:input:#: {
timerautoaway off
scon -atl ame is Back [Reason: Auto Away]
}


^-----sumthin like that shud werk. dunno havent tested it.
Posted By: Zyzzyx26 Re: how to make an idle away? - 28/07/04 04:31 PM
Code:
on *:INPUT:*: { .timerAutoAway 1 $calc([color:red]N[/color]*60) away Auto-away after $calc([color:red]N[/color]*60) idle. }

This will reset the timer each time you say anything or type a command. Replace the N for the number of MINUTES you want to be idle before setting away.

Not Tested.

Thanks tidy_trax smile

Zyzzyx smile
Posted By: Zyzzyx26 Re: how to make an idle away? - 28/07/04 04:37 PM
That would trigger the timer everytime some else said something. Also, the timer is missing the numberrepetiton number (0,1,15..) before the interval value.

I.e.: timerTest 2 300 --> two times with 5 mins between them.

Zyzzyx smile
Posted By: tidy_trax Re: how to make an idle away? - 28/07/04 04:39 PM
That would set you away again after you've already gone away, changing 0 to 1 will solve that problem.
Posted By: alkahol1k Re: how to make an idle away? - 28/07/04 06:37 PM
ok so the only way to make one is through your on input event ?
Posted By: FragmentX Re: how to make an idle away? - 30/07/04 02:54 AM
if you want the idle to turn off after it goes on, then yeah, you have to use input, this is what i use for a simple auto idle away.
Code:
 on *:input:*:{
  if ($readini(serv.ini, idle, power) == On) {
    if (%idle != $null) { .set %idle 1 }
    if (%idle == $null) {
      .away
      .ame _( AWAY )_( Back From: )_( IDLE )_
      .echo -a _( AWAY )_( Back From: )_( IDLE )_
      .set %idle 1
    }
  }
}
alias ckidle {
  if ($readini(serv.ini, idle, power) == On) {
    if (%idle == %idletime) {
      .away _( AWAY )_( Auto Away After $calc(%idletime / 60) Minute(s) )_( IDLE )_
      .ame _( AWAY )_( Auto Away After $calc(%idletime / 60) Minute(s) )_( IDLE )_
      .echo -a _( AWAY )_( Auto Away After $calc(%idletime / 60) Minute(s) )_( IDLE )_
      .unset %idle
      halt
    }
    if (%idle < %idletime) { .inc %idle 1 | halt }
    if (%idle > %idletime) { halt }
  }
}
menu channel,status,query,menubar {
  Idle For $+ $chr(58) $duration($calc(%idle),4)
  ._( Idle Limit )_( $duration($calc(%idletime),4) )_:.set %idletime $calc($input(Auto Away After How Many Minutes?,1,Idle,$calc(%idletime / 60)) * 60)
  ._( Auto Away )_( $readini(serv.ini, idle, power) )_:{
    .writeini serv.ini idle power $iif($readini(serv.ini, idle, power) = Off,On,Off)
    if ($readini(serv.ini, idle, power) == On) { .set %idletime $calc($input(Auto Away After How Many Minutes?,1,Idle,$calc(%idletime / 60)) * 60) | .inc %idle 1 | .timerCKIDLE 0 1 ckidle }
    if ($readini(serv.ini, idle, power) == Off) { .timerCKIDLE off | .unset %idle }
  }
}
 

this is a basic more simple scripted code, it could be rescripted to make it smaller, but it works!

You can use this same one, it does not have to be changed at all just use the popup in channel! it works perfect
i have had no trouble with it!!
© mIRC Discussion Forums