Top

===New Away Script===


mIRC Code
+ 0 likes
Please Register to submit score.
Bookmark and Share
Average Score  0.0 (of 0 scores)
Date Added  Nov 07, 2009
Last Updated  Nov 13, 2009

Introduction

This is a good away script that I have worked on. Thanks to PwnerJohn for the on PING part of it.

===Usage===
/afk <msg> -- Will set you as away, with your away message, in whatever channel you put down.
/back -- Will take you from being away, will calculate your time, and tell you how long you have been away.

This script will also automatically mark you as being away after one hour idle. You can edit it in seconds at the very first part of the script.

Only edit the settings section. Also note, there is no /back configuration, that's because it will take what you put in the /afk configuration.

Enjoy!







Grab the Code

;#Away Script Created by CadetAndrew
;http://www.hawkee.com/snippet/6892/
 
;#Edit all the settings below, only edit the code part if you know mrc well.
 
;###SETTINGS###
;##Auto-Away Configuration##
 
;#Set this to the network you would like the auto-away to work on:
set %auto.away.network 
 
;#Set this to the time (in seconds) you want your idle time to be to be marked for auto-away:
set %auto.away.duration
 
;#Set this to the channels you would like the auto-away script to say you are now away with your ;message. Separate each channel with a comma (example: #IRC,#MyChat,#TestChat,#Scripting)
set %auto.away.chan(s)
 
;#Set this to what you want your away message to be in those channels:
set %auto.away.msg
 
;##/afk Configuration##
 
;#Set this to the network you would like to be able to use /afk on:
set %away.network
 
;#Set this to the channels you would like to say you are now away in. Separate each channel with ;a comma (example: #IRC,#MyChat,#TestChat,#Scripting)
 
set %away.chan(s)
 
 
;##################CODE BELOW, ONLY EDIT IF YOU KNOW WHAT YOU ARE DOING!!###########
 
 
on 1:PING: {
  if ($idle == %auto.away.duration) && ($away == $false) && ($network == &auto.away.network) {
    /away %auto.away.msg
    /describe %auto.away.chan(s) is now away - %auto.away.msg
  }
}
 
alias afk {
  if ($network == %away.network) {
    away 
    set %away.time $ctime
    set %away.reason $1-
    describe %away.chan(s) is now away: $1-
  }
}
 
alias back {
  if ($network == %away.network) {
    /away
    /describe %away.chan(s) is now back from away: $1- (been away for $duration($calc($ctime - %away.time ) )))
    timer1 1 1 unset %away.time
    timer2 1 1 unset %reason
  }
}
 

Comments

  (16)  RSS
Ghost-writer
Comments: 257
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 8, 2009 9:05 am
well it could be more customisable but its good and does its job so i guess its okay.
Cracker200
Comments: 257
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 8, 2009 11:12 am
Ghost-Writer, you act like you know how to improve, every thing. But yet, you do not post any snippits, or tell the people how to improve it or you just critisise.(I can't spell don't say !#$@ all about it)
CadetAndrew
Comments: 22
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 8, 2009 11:31 am
C'mon let's now turn this into a script war here.

However, if you have any ideas for this script I would love to hear them. :)
Grant-
Comments: 91
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 8, 2009 11:58 am
Cracker200--What do you expect from a ten year old who ban evades, leeches, steals credit, and is a CHILD PORNOGRAPHY DISTRIBUTOR?
SketchDrawer
Comments: 5
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 8, 2009 4:39 pm
#CHANNEL could just be $chan so the user does not have to edit that.
Testor
Comments: 83
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 8, 2009 5:01 pm
Code:
  elseif ($away == $true) {
    /echo You are already away and will not be marked for auto-away.
  }

You shouldn't really have that, as if you're really away you won't be there to read that, lol.
Also, when you do come back you'll return to a window full of that, from it telling you whenever the script runs that you're away because it doesen't do a check whether it;s been triggered before, just repeats over and over again.
Ghost-writer
Comments: 257
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 8, 2009 7:35 pm
Testor, elseif ($away) echo You are already away and will not be marked for auto-away.
sunslayer
Comments: 267
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 8, 2009 11:06 pm
ghost-writer that does the exact same thing as
Code:
  elseif ($away == $true) {
    /echo You are already away and will not be marked for auto-away.
  }
using the ping event for an away script isn't the best way to do this either
SnoooP
Comments: 340
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 9, 2009 7:55 am
Grant that was class LOL
CadetAndrew
Comments: 22
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 13, 2009 5:35 pm
Thanks for the comments everyone, I'm working on making this script much more customizable and easier to set up.
CadetAndrew
Comments: 22
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 13, 2009 5:53 pm
The script is now complete! You should now only have to edit the settings part, don't worry about the code unless you know mrc well.
sunslayer
Comments: 267
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 13, 2009 6:26 pm
the code in the beginning won't do anything because its not in an event. adding a load event fixes this
Code:
on *:load: {
  set %auto.away.network
  set %auto.away.duration
  set %auto.away.chan(s)
  set %auto.away.msg
  set %away.network
  set %away.chan(s)
}
Ghost-writer
Comments: 257
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 13, 2009 9:04 pm
sunslayer, $$?"Question" so you dontj ust set it to nothing.. whitch basically does nothing.
sunslayer
Comments: 267
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 13, 2009 9:40 pm
Quote:
You should now only have to edit the settings part
adding an event does not change that. and multiple $? would annoy the fk out of me tbh
CadetAndrew
Comments: 22
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 14, 2009 8:07 am
What I could do is add this, but I'm not sure how it would come out.

Code:

on *:LOAD: {
set %auto.away.network $$?="What is the name of the network you would like auto-away to be enabled on?"
set %auto.away.duration $$?="What would you like your idle to be (in seconds) to be marked for auto-away"?
set %auto.away.chan(s) $$?="What channels would you like to say you are auto-away in? (Separate each channel with a comma. ie: #MyChan,#Chat,#Scripting)"
set %auto.away.msg $$?="What would you like your auto-away message to be?"
set %away.network $$?="What is the name of the network you would like /afk to be enabled on?"
set %away.chan(s) $$?="Which channels would you like to say you are now away in?(Separate each channel with a comma. ie: #MyChan,#Chat,#Scripting)
}


Is that what you mean? If so I can add it no problem.
Cracker200
Comments: 257
 
mIRC Snippet:  ===New Away Script===
Posted on Nov 14, 2009 12:22 pm
@Grant LMFAO i only Just red it lolz

Commenting Options

Register or Login to Hawkee.com or use your Facebook or Twitter account by clicking the corresponding button below.

  
Bottom