Away Script V2.5.0

By Roy911 on Jan 13, 2007

Away Script V2.5.0 by Roy911

Paste in your remotes.

Usage:
To turn status to away, type /away [Your Reason here]
To turn status to normal, type /back

For mIRC 6.2+

Version 2.5 Update:
-All variables should unset.
-Menu has been added for Channel, Nicklist, and the Status Screen.

/*
Away Script V2.0.0 by Roy911
irc.abxy.org:#Roy911

Usage:
To turn status to away, type /away [Your Reason here].
To turn status to normal, type /back

Version 2.5 Update:
-All variables should unset.
-Menu has been added for Channel, Nicklist, and the Status Screen.
*/

alias total_ame {
  var %orig.cid = $cid
  var %len = $scid(0)
  var %pos = 1
  while (%len != 0) {
    scid %pos
    ame $1-
    inc %pos 1
    dec %len 1
  }
  scid %orig.cid
  halt
}

on *:TEXT:*:*: { 
  if ($me isin $1-) {
    if (!%away.reason) { halt }
    else {
      if ($address($nick,2) isin %away.highlight) { halt }
      else {
        notice $nick I am away right now, $nick $+ ! I am at: %away.reason $+ . I have been gone for $duration($calc($ctime - %away.time),3) $+ . (One time response to Highlight.)
        set %away.highlight $address($nick,2) - %away.highlight
      }
    }
  }
}
on *:ACTION:*:*: { 
  if ($me isin $1-) {
    if (!%away.reason) { halt }
    else {
      if ($address($nick,2) isin %away.highlight) { halt }
      else {
        notice $nick I am away right now, $nick $+ ! I am at: %away.reason $+ . I have been gone for $duration($calc($ctime - %away.time),3) $+ . (One time response to Highlight.)
        set %away.highlight $address($nick,2) - %away.highlight
      }
    }
  }
}
alias away {
  if (!$1) { 
    set %away.reason $$?="Reason"   
    set %away.time $ctime
    total_ame is 4Away (5 $+ %away.reason $+ .)
  }
  else { 
    set %away.reason $$1-
    set %away.time $ctime
    total_ame is 4Away (5 $+ %away.reason $+ .)
  }
}
alias back {
  if (!%away.reason) { echo $active You are already Back, $me $+ ! }
  else {
    var %reason = %away.reason
    var %time = %away.time
    awayunset
    total_ame is 9Back from $qt(5 $+ %reason $+ .) (Gone for $duration($calc($ctime - %time),3) $+ )
  }
}
menu channel,nicklist,status {
  Away
  .Away://away $$?="Reason" 
  .Back://back
}

alias awayunset {
  //unset %away.*
}

Comments

Sign in to comment.
Roy911   -  Jan 19, 2007

Really, a 2.5? D:
Not really what I was expecting.

 Respond  
Aaron   -  Jan 14, 2007

mine is 6.21, thats probably why

 Respond  
Roy911   -  Jan 13, 2007

It doesn\'t?

Are you running mIRC 6.2? It\'s the only platform I\'ve tested this on.

 Respond  
Aaron   -  Jan 13, 2007

except it doesnt unset the reason for me :\

 Respond  
Aaron   -  Jan 13, 2007

not bad :)

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.