mIRC Home    About    Download    Register    News    Help

Print Thread
#78590 09/04/04 04:58 AM
Joined: Mar 2004
Posts: 175
Vogon poet
OP Offline
Vogon poet
Joined: Mar 2004
Posts: 175
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
  }
}
 


Last edited by Relinsquish; 09/04/04 05:00 AM.

- Relinsquish
#78591 09/04/04 08:32 AM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
this is a help forum, not a place where you can "relese" your addons, try at som script site like www.mircscripts.org ..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#78592 09/04/04 06:27 PM
Joined: Mar 2004
Posts: 175
Vogon poet
OP Offline
Vogon poet
Joined: Mar 2004
Posts: 175
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.


- Relinsquish
#78593 09/04/04 07:41 PM
Joined: Mar 2004
Posts: 175
Vogon poet
OP Offline
Vogon poet
Joined: Mar 2004
Posts: 175
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.


- Relinsquish
#78594 09/04/04 09:59 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
sorry, i missunderstod u.. use a timer, then check your idle time.. if ($idle == amount_of_time) { /away idle away }


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#78595 09/04/04 10:03 PM
Joined: Feb 2004
Posts: 714
Z
Hoopy frood
Offline
Hoopy frood
Z
Joined: Feb 2004
Posts: 714
Just a quick question here... when you put

if (!%awaystatus)

is that the same as

if (%awaystatus == $null) ??

Thanks, Zyzzy smile


"All we are saying is give peace a chance" -- John Lennon
#78596 09/04/04 10:55 PM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
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 }


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#78597 10/04/04 12:30 AM
Joined: Mar 2004
Posts: 175
Vogon poet
OP Offline
Vogon poet
Joined: Mar 2004
Posts: 175
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...


- Relinsquish
#78598 10/04/04 05:27 AM
Joined: Dec 2002
Posts: 1,321
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Dec 2002
Posts: 1,321
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.


DALnet: #HelpDesk and #m[color:#FF0000]IR[color:#EEEE00]C
#78599 11/04/04 01:48 AM
Joined: Mar 2004
Posts: 175
Vogon poet
OP Offline
Vogon poet
Joined: Mar 2004
Posts: 175
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.


- Relinsquish

Link Copied to Clipboard