Bot Auto-Away

By xDaeMoN on Aug 19, 2004

A simple auto away for your bot script. It will automatically make your bot away using random messages in autoaway.txt and come back within a certain time period. Just paste this in the Remotes section (Alt-R) on your Bot script and make an 'autoaway.txt' file with your messages in the mIRC folder. Type !autoaway on/off to make it work.

on *:TEXT:!autoaway*:#: { 
  if ( $istok(on off,$2,32) ) {
    .notice $nick Auto-Away $iif(on == $2, Enabled, Disabled)
    autoaway $iif(on == $2, on, off) 
  }
  else .notice $nick Usage: !autoaway <on/off>
}

alias autoaway {
  var %min = 900, %max = 3600, %m = $1

  goto %m
  :on
  if ( $away ) .away
  .timerautoback 1 $r(%min,%max) autoaway back
  var %x = $read(autoaway.txt)  
  .away %x
  ame is away: %x
  halt

  :back
  .timerautoaway 1 $r(%min,%max) autoaway on
  ame is back. Gone for $duration($awaytime) $+ .
  .away
  halt

  :off
  if ( $away ) { 
    ame is back. Gone for $duration($awaytime) $+ .
    .away
    .timerautoback off 
  }
  else .timerautoaway off
  halt

  :%m
}

Comments

Sign in to comment.
xDaeMoN   -  Jul 09, 2005

It makes the bot look somewhat \"alive\". ;)

 Respond  
DeathRyder082   -  Jul 08, 2005

I never understood why a bot would need an away script.

 Respond  
xDaeMoN   -  Apr 11, 2005

Updated. Minimum & maximum time for the timers to be triggered are now configurable.

 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.