When you type '/afk' it comes up with a box saying "Reason for being AFK" so you enter your reason, and it messages all channels that your on, " is AFK. Reason: " Anyone that says your nick when your AFK it will say "Hello I am currently away. I will get back to you as soon as possible. Reason: " It will also work when they PM you. To be back type '/back', it will also identify you with NickServ.
There are 2 parts to this script: Some Aliases and some Remote.
##### Remote ####
on *:TEXT:<Nick>:#: {
if ($me == <AFKNick>) {
notice $nick 9H3ello4 $nick $+ 3. 9I3 9A3m 9C3urrently 9A3way. 9I 9W3ill 9R3espond 9T3o 9Y3ou 9A3s 9S3oon 9A3s 9P3ossible. 9R3eason:4 %afk
}
}
on *:TEXT:*:?: {
if ($me == <AFKNick>) {
msg $nick 9H3ello4 $nick $+ 3. 9I3 9A3m 9C3urrently 9A3way. 9I 9W3ill 9R3espond 9T3o 9Y3ou 9A3s 9S3oon 9A3s 9P3ossible. 9R3eason:4 %afk
}
}
#### Aliases ####
/afk {
/nick <AFKNick>
/set -n %afk $?="Enter reason for being AFK"
/amsg 11$nick is AFK. Reason:4 %afk $+ 11.
}
/back {
/nick <Nick>
/amsg 11$nick is back from:4 %afk $+ 11.
/msg NickServ IDENTIFY <Password>
}
on :TEXT::?: {
if ($me == %nick $+ |afk) {
msg $nick 9H3ello4 %nick $+ 3. 9I3 9A3m 9C3urrently 9A3way. 9I 9W3ill 9R3espond 9T3o 9Y3ou 9A3s 9S3oon 9A3s 9P3ossible. 9R3eason:4 %afk
}
}
alias afk {
set %nick $me
set %away on
/nick %nick $+ |afk
/set -n %afk $?="Enter reason for being AFK"
/away %afk
/amsg 11 $+ %nick is AFK. Reason:4 %afk $+ 11.
}
alias back {
set %away off
/nick %nick
/away
/amsg 11 $+ %nick is back from:4 %afk $+ 11.
}
}
Hi SWNight and yuri ^_^. Anyway couple of pointers:
1) you dont need all of the /\'s in the alias part.
2) If you want to make the notice and msg silent (so you dont see it) use .notice and .msg ;)
3) Use \"unset %afk\" under the /back alias
4) Once you done 3) you can change
if ($me == <AFKNick>) {
to
if (%afk) {
(this means if there is a variable %afk then it will do the code)
Another couple of things ya can do is:
use set -ne %afk so that it unsets the variable when you close mirc if you dont go back to you\'r normal name.
Also i would use \"tnick \" instead of \"nick \" so that if you quit mirc with your afk nick, you wont come back on with your afk nick, just a thought :).
Hope this helps ;)
How you make it into Code format ?