mIRC Home    About    Download    Register    News    Help

Print Thread
#91993 28/07/04 04:51 AM
Joined: Nov 2003
Posts: 257
A
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Nov 2003
Posts: 257
Can I get some help on where I should start ?

Joined: Jun 2003
Posts: 92
K
Babel fish
Offline
Babel fish
K
Joined: Jun 2003
Posts: 92
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.


k1ll3rz
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
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

Last edited by Zyzzyx26; 28/07/04 04:41 PM.

"All we are saying is give peace a chance" -- John Lennon
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
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


"All we are saying is give peace a chance" -- John Lennon
Joined: Nov 2003
Posts: 2,327
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
That would set you away again after you've already gone away, changing 0 to 1 will solve that problem.


New username: hixxy
Joined: Nov 2003
Posts: 257
A
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Nov 2003
Posts: 257
ok so the only way to make one is through your on input event ?

Joined: Jul 2004
Posts: 9
F
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
F
Joined: Jul 2004
Posts: 9
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!!


"Scripter For Life" - Fx

irc.sysxtreme.com
im in all the channels that are in /list

Link Copied to Clipboard