mIRC Homepage
Posted By: Relinsquish Autoidle Away - 09/04/04 04:58 AM
Alright. Here is my away script. It works but the only thing missing is an auto-away for idling script. Anybody that wants to use it, feel free to. (although it sucks kinda). I got the "alias" script for idle. I'm not sure how to apply it though. My friend suggested a "while" loop which I am not familiar with. Maybe "on *:connect: {" ? I'm not too sure.
Code:
Alias f4 {
  if (!%awaystatus) {
    set %awayreason $?"Away Reason:" | if ($! == $null) { set %awayreason Away }
    set %awaynick Relin $+ $?"Away Tag:" | if ($! == $null) { set %awaynick RelinAway }
    ame 3,1i15s 3a15way 14[ 15 $+ %awayreason 14] [ 15 $+ $asctime(h:nn:sstt) 14] [ 3$15quishy3$15cript 14]
    set -s %awaytime 0
    inc -c %awaytime 1
    away %awayreason
    nick %awaynick
    set %awaystatus away
  }
  if (%awaystatus == back) {
    set %awayreason $?"Away Reason:" | if ($! == $null) { set %awayreason Away }
    set %awaynick Relin $+ $?"Away Tag:" | if ($! == $null) { set %awaynick RelinAway }
    ame 3,1i15s 3a15way 14[ 15 $+ %awayreason 14] [ 15 $+ $asctime(h:nn:sstt) 14] [ 3$15quishy3$15cript 14]
    set -s %awaytime 0
    inc -c %awaytime 1
    away %awayreason
    nick %awaynick
    set %awaystatus away
  }
  Elseif (%awaystatus == away) {
    ame 3,1i15s 3b15ack 14[ 15 $+ %awayreason 14] [ 15 $+ $duration(%awaytime) 14] [ 3$15quishy3$15cript 14]
    ni
    set %awaystatus back
    away
    unset %awayreason
    unset %awaynick
    unset %awaytime
  }
}
Alias idleaway {
  if (%awaystatus == back) && ($idle >= 900) {
    set %awayreason Idle
    set %awaynick RelinAway
    ame 3,1i15s 3a15way 14[ 15 $+ %awayreason 14] [ 15 $+ $asctime(h:nn:sstt) 14] [ 3$15quishy3$15cript 14]
    set -s %awaytime 0
    inc -c %awaytime 1
    away %awayreason
    nick %awaynick
    set %awaystatus away
  }
}
 

Posted By: sparta Re: Autoidle Away - 09/04/04 08:32 AM
this is a help forum, not a place where you can "relese" your addons, try at som script site like www.mircscripts.org ..
Posted By: Relinsquish Re: Autoidle Away - 09/04/04 06:27 PM
Uhhhh.... are you blind man? I'm asking how to make autoidle away. I only provided the code so you could see how I made the away script so you could help me with autoidle away.
Posted By: Relinsquish Re: Autoidle Away - 09/04/04 07:41 PM
Alright, I tried to script it and it froze da heck outta my mIRC. I used "on connect" and while loop. Guess that won't help.
Posted By: sparta Re: Autoidle Away - 09/04/04 09:59 PM
sorry, i missunderstod u.. use a timer, then check your idle time.. if ($idle == amount_of_time) { /away idle away }
Posted By: Zyzzyx26 Re: Autoidle Away - 09/04/04 10:03 PM
Just a quick question here... when you put

if (!%awaystatus)

is that the same as

if (%awaystatus == $null) ??

Thanks, Zyzzy smile
Posted By: Hammer Re: Autoidle Away - 09/04/04 10:55 PM
if (!%awaystatus) { is exactly the same as if ((%awaystatus == 0) || (%awaystatus == $null) || (%awaystatus == $false)) {

Each of those conditions tests for a logical false condition. If all three tests fail, then the value of the entire condition is False, which, stated another way, is Not True.

if (%awaystatus) { commands } means if (%awaystatus is anything other than 0, $null or $false) { do this code block }
if (!%awaystatus) { commands } means if (%awaystatus is 0, $null or $false) { do this code block }

Incidentaly, you can also just use if (!$away) { do stuff }
Posted By: Relinsquish Re: Autoidle Away - 10/04/04 12:30 AM
Yeah, I know how to do the "timer" way. But it really annoys me because every action I do activates a timer. Very annoying. I have seen some "away" scripts that have idle away but don't show timers... There's got to be some way of doing it besides timers and loops...
Posted By: Hammer Re: Autoidle Away - 10/04/04 05:27 AM
Why not simply write yourself an alias that checks to see if you're not away and your idle is over 15 minutes? Then just have one or more of your more active events call that alias as their last check. No timers, your idle still gets checked and you get set away if you're over 900 seconds (15 minutes) idle.

on *:QUIT: [/b]Check.Auto-Idle.Away[/b]
on *:JOIN:#: [/b]Check.Auto-Idle.Away[/b]
on *:TEXT:*:*: [/b]Check.Auto-Idle.Away[/b]
alias Check.Auto-Idle.Away if (!$away && $idle >= 900) .raw AWAY Auto-Idle Away after 15 minutes.
Posted By: Relinsquish Re: Autoidle Away - 11/04/04 01:48 AM
Well... I figured 1 out that uses only 1 timer and does not annoy. Not that your way is bad, just inaccurate as You have to have somebody do an active event for this to check idle. Here's mine, it's kinda crude way of doing this but accurate. Please post if you have any other suggestions:
Code:
Alias idleaway {
  if (%awaystatus == back) && ($idle >= 900) {
    set %awayreason 15 Minutes of Idle
    set %awaynick RelinIdle
    ame 3,1i15s 3a15way 14[ 15 $+ %awayreason 14] [ 15 $+ $asctime(h:nn:sstt) 14] [ 3$15quishy3$15cript 14]
    set -s %awaytime 0
    inc -c %awaytime 1
    away %awayreason
    nick %awaynick
    set %awaystatus away
  }
  Elseif (%awaystatus == back) && ($idle < 900) { timer 1 $calc(900 - $idle) idleaway }
}
 

And I put /idleaway in the Perform mIRC Options. This SHOULD be accurate. I'm still curious of how to do it accurately AND not use timers... I'll use this script for now.
© mIRC Discussion Forums