mIRC Home    About    Download    Register    News    Help

Print Thread
#33479 01/07/03 07:26 PM
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
im trying to do an away script, how do u do an auto away bit, i thought of maybe if ($idle...... etc, but dont know what to atatch that too ? anyone help, confused


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
if you wanted 10 minutes then change nick it would be like.

if ($idle > 600) { /nick $me $+ |Away }
thats an example


new username: tidy_trax
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
Code:
#awaysys on
alias away_t {
  if ( $away ) scon -at1 away
  .timeraway 1 600 scon -at1 away Gone since $time $+ , $day $+ , $date
}

on *:INPUT:*: {
  if ( /* !iswm $1 ) {
    away_t
  }
}

on *:APPACTIVE: {
  if ( !$appactive ) {
    if  (( $appstate == tray ) && ( !$away )) {
      away_t
    }
  }
  else { 
    away_t
  }
}

raw 306:*: {
  .timeraway off
  halt
}
raw 305:*: {
  halt
}
#awaysys end
  


this is what i use and it works pretty good


Code:
//if ( khaled isgod ) echo yes | else echo no
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
i use,
on *:*:#:{
if ($idle > 600) { /nick $me $+ |Away }
}


new username: tidy_trax
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
thnx smile


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
mine will check your idle time on every event in the channel, props,modes,text,joins,parts,quits, etc dunno what therats but lookin at the size its more likely to be better :tongue:


new username: tidy_trax
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
well i tried that myself but i didnt know there was an on *


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
sorry i replied to your signature thinking it was a question you asked blush


new username: tidy_trax
Joined: Apr 2003
Posts: 300
A
andymps Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Apr 2003
Posts: 300
lol ok grin


Liek OMG Yuo Stoleded my MageHurtzzzz!!!11
Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
That's not the best way to do it if you're in a channel that isn't constantly moving or if you don't actually join a channel, I join a few rooms which rarely have more then 2-3 people in them, all of which are online around the same time, so an event may not trigger for hours in which case your script won't work.

I suggest using a timer which will check every N seconds/minutes from when you connected.

Something like...

Code:
on *:CONNECT: { .timerAutoAway 0 300 .signal CheckIdle }
on *:SIGNAL:CheckIdle: { if ($idle > 600) { away Auto Away... | halt } } 


I use the signal event so that $idle isn't evaluated in the timer.


- Jason
Joined: May 2003
Posts: 2,265
P
Hoopy frood
Offline
Hoopy frood
P
Joined: May 2003
Posts: 2,265
yes but, even the on ping event will work, if you use *:*:*:{
and i get pinged around every 20 seconds.


new username: tidy_trax
Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
Then you may as well make it like this:

on *:PING: {
if (($idle > 600) && (!$away)) { away Auto away... }
}

Or even the ISON raw would work because of how regularly it's triggered


- Jason
Joined: Jul 2003
Posts: 2
E
Bowl of petunias
Offline
Bowl of petunias
E
Joined: Jul 2003
Posts: 2
I've attempted scripts of my own of this nature, and most of these began sticking |Away on over and over again, ending with, "Elyssa|Away|Away|Away|Away|Away|Away" before I managed to turn it off. The result always became a thirty line script to check if a variable was set or not, if it wasn't, then setting the nick and setting it on, then when I came back setting it off again. The problem with this plan was that inter-server work usually messed it up, IE turning it off without changing the nick on all servers, so another server wound up with Elyssa|Away|Away before I had a chance to change it.


Link Copied to Clipboard