|
|
Joined: Mar 2004
Posts: 175
Vogon poet
|
OP
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.
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.
|
|
|
|
Joined: Feb 2003
Posts: 3,412
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,412 |
this is a help forum, not a place where you can "relese" your addons, try at som script site like www.mircscripts.org ..
|
|
|
|
Joined: Mar 2004
Posts: 175
Vogon poet
|
OP
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.
|
|
|
|
Joined: Mar 2004
Posts: 175
Vogon poet
|
OP
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.
|
|
|
|
Joined: Feb 2003
Posts: 3,412
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,412 |
sorry, i missunderstod u.. use a timer, then check your idle time.. if ($idle == amount_of_time) { /away idle away }
|
|
|
|
Joined: Feb 2004
Posts: 714
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Dec 2002
Posts: 1,253
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,253 |
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 }
|
|
|
|
Joined: Mar 2004
Posts: 175
Vogon poet
|
OP
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...
|
|
|
|
Joined: Dec 2002
Posts: 1,253
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,253 |
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.
|
|
|
|
Joined: Mar 2004
Posts: 175
Vogon poet
|
OP
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:
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.
|
|
|
|
|
|