mIRC Home    About    Download    Register    News    Help

Print Thread
#4389 01/01/03 06:47 PM
Joined: Jan 2003
Posts: 1
P
Pezzen Offline OP
Mostly harmless
OP Offline
Mostly harmless
P
Joined: Jan 2003
Posts: 1
Hello smile

Just wondering if I can make a autoaway script using $idle?
This is how "far" i have com with my minimal scripting knowlage...

In Aliases
Code:
/idle /timer3 0 60 /set %idl $idle
/autoaway /timer1 0 60 /check

In Remote
Code:
alias check {
  if ( %away.r == $null ) halt
  elseif (%idl > 10) {
    /set %away.r Auto-away 10 min idle...
    /set %nick $me
    /scon -a /nick $me $+ |aw
    /scon -a /away  » Reson: %away.r  » Away sen: $time ««BiX»»
  }
} 


Am i in some way right or is it totallt wrong..?

Regards
Pezzen

#4390 01/01/03 07:01 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Code:
alias autoawayt {
  if ( $timer(autoaway) != $null ) {
    .timerautoaway off
  }
  else {
    .timerautoaway 0 10 aacheck
  }
}
alias aacheck {
  if ( %away.r != $null ) { halt }
  if ( $idle >= 600 ) {
    set %away.r Auto-away 10 min idle...
    scon -a /nick $!me $!+ |aw
    scon -a /away  » Reason: %away.r  » Away sen: $time ««BiX»»
  }
}


/autoawayt would toggle autoaway on and off..

#4391 02/01/03 05:33 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
Code:

alias autoawayt {
  if ( $timer(autoaway) ) .timerautoaway off
  else .timerautoaway 0 10 aacheck
}
alias aacheck {
  if ( $idle >= 600 ) {
    set %away.r Auto-away 10 min idle...
    scon -a /nick $!me $!+ |aw
    scon -a /away  » Reason: %away.r  » Away sen: $time ««BiX»»
    .timerautoaway off
  }
}

and have your /back alias restart the timer. No sense having a timer that doesn't do anything but does nothing over and over and over and over and over using a resource when it doesn't need it.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#4392 03/01/03 05:40 AM
Joined: Jan 2003
Posts: 20
J
Ameglian cow
Offline
Ameglian cow
J
Joined: Jan 2003
Posts: 20
mhh i was searching for something like this also
but when i put it in remote and do /autoawayt nothing happens after 10 mins.. wink
yeah i know i suck cuz im a noob :tongue:


Greets Janus
#4393 04/01/03 02:06 AM
Joined: Jan 2003
Posts: 20
J
Ameglian cow
Offline
Ameglian cow
J
Joined: Jan 2003
Posts: 20
never mind, got 1 per google wink


Greets Janus

Link Copied to Clipboard